Ver código fonte

Merge branch 'master' of https://gitee.com/antai-wuliu/ANTAI-API

dengpan 1 ano atrás
pai
commit
a649ac5617

+ 31 - 0
src/main/java/com/steerinfo/dil/controller/RMScontroller.java

@@ -626,6 +626,37 @@ public class RMScontroller extends BaseRESTfulController {
         return rmsFeign.importPersonnel(map);
     }
 
+    @ApiOperation("导入人员信息")
+    @PostMapping("/importPersonnelSyncSSO")
+    public RESTfulResult importPersonnelSyncSSO(@RequestBody MultipartFile file,
+                                          String userId,
+                                          String userName) throws Exception {
+        Map<String, Object> map = new HashMap<>();
+        //获取Excel中包含的对象数组
+        List<Map<String, Object>> list = ExcelToolUtils.getExcelList(file, 0);
+        map.put("list", list);
+        for (Map<String, Object> item : list) {
+            //校验行
+            if(
+                    item.get("姓名")==null || item.get("姓名").equals("")
+                            || item.get("身份证号")==null || item.get("身份证号").equals("")
+                            || item.get("手机")==null || item.get("手机").equals("")
+                            || item.get("单位")==null || item.get("单位").equals("")
+                            || item.get("岗位名称")==null || item.get("岗位名称").equals("")
+            ){
+                throw new Exception("单元格数据异常,请检查模板或数据是否正确!");
+            }
+            item.put("companyId",item.get("单位"));
+            item.put("personnelPost",item.get("岗位名称"));
+            item.put("personnelName",item.get("姓名"));
+            item.put("personnelPhone",item.get("手机"));
+            item.put("identityCard",item.get("身份证号"));
+        }
+        map.put("userId",userId);
+        map.put("userName",userName);
+        return rmsFeign.importPersonnelSyncSSO(map);
+    }
+
 
     //================公司
     @ApiOperation(value = "展示公司信息")

+ 7 - 0
src/main/java/com/steerinfo/dil/controller/TMSController.java

@@ -765,4 +765,11 @@ public class TMSController extends BaseRESTfulController {
     @ApiOperation("多拼派车")
     @PostMapping("/saleDispatchDuoPin")
     RESTfulResult saleDispatchDuoPin(@RequestBody Map<String,Object> map) {return tmsFeign.saleDispatchDuoPin(map);}
+
+
+    @ApiOperation("同步生产实绩")
+    @PostMapping("/syncProductionResult")
+    RESTfulResult syncProductionResult(@RequestBody Map<String,Object> map) {
+        return tmsFeign.syncProductionResult(map);
+    }
 }

+ 3 - 0
src/main/java/com/steerinfo/dil/feign/RmsFeign.java

@@ -894,6 +894,9 @@ public interface RmsFeign {
     Map<String, Object> relevance(@RequestBody(required = false) Map<String, Object> mapValue);
     @PostMapping(value = "api/v1/rms/rmscompanybmts/cancelRelevance")
     Map<String, Object> cancelRelevance(@RequestBody(required = false) Map<String, Object> mapValue);
+
+    @PostMapping(value = "api/v1/rms/rmspersonnel/importPersonnelSyncSSO")
+    RESTfulResult importPersonnelSyncSSO(@RequestBody(required = false)Map<String, Object> map);
 }
 
 

+ 3 - 0
src/main/java/com/steerinfo/dil/feign/TmsFeign.java

@@ -275,6 +275,9 @@ public interface TmsFeign {
 
     @PostMapping(value = "api/v1/tms/omstransorders/saleDispatchDuoPin")
     RESTfulResult saleDispatchDuoPin(@RequestBody Map<String, Object> map);
+
+    @PostMapping(value = "api/v1/tms/omstransorders/syncProductionResult")
+    RESTfulResult syncProductionResult(@RequestBody Map<String, Object> map);
 }
 
 

+ 11 - 1
src/main/resources/com/steerinfo/dil/mapper/UniversalMapper.xml

@@ -829,7 +829,17 @@
         rc.LINE_ID  "lineId",
         'operationRangeName' "prop"
         from RMS_TRANS_RANGE RC
-        where DELETED = 0
+        left join rms_operation_point rop_s
+        on rop_s.operation_point_id = RC.start_point_id
+        left join rms_operation_point rop_e
+        on rop_e.operation_point_id = RC.end_point_id
+        <where>
+            and RC.DELETED = 0
+            <if test="isNc!=null and isNc!=''">
+                and rop_s.alternate_fields1 = 'NC'
+                and rop_e.alternate_fields1 = 'NC'
+            </if>
+        </where>
         )
         <where>
             <if test="index!=null and index!=''">