Ver código fonte

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

liyg 1 ano atrás
pai
commit
2d59770852

+ 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 = "展示公司信息")

+ 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);
 }
 
 

+ 4 - 4
src/main/resources/application-prod.yml

@@ -26,11 +26,11 @@ openfeign:
   ColumnDataFeign:
     url: ${COLUMNDATAFEIGN_URL:172.16.90.202:80}
   AmsFeign:
-    url: ${AMSFEIGN_URL:172.16.90.202:8000}
-#    url: ${AMSFEIGN_URL:localhost:8079}
+#    url: ${AMSFEIGN_URL:172.16.90.202:8000}
+    url: ${AMSFEIGN_URL:localhost:8079}
   TmsFeign:
-    url: ${TMSFEIGN_URL:172.16.90.202:8000}
-#    url: ${TMSFEIGN_URL:localhost:8086}
+#    url: ${TMSFEIGN_URL:172.16.90.202:8000}
+    url: ${TMSFEIGN_URL:localhost:8086}
   WMSFeign:
     url: ${WMSFEIGN_URL:172.16.90.202:8000}
   RmsFeign:

+ 6 - 0
src/main/resources/com/steerinfo/dil/mapper/UniversalMapper.xml

@@ -1351,6 +1351,9 @@
             <if test="prodCode != null and prodCode != ''">
                 and REGEXP_LIKE(t.prod_code, #{prodCode})
             </if>
+            <if test="prodName != null and prodName != ''">
+                and REGEXP_LIKE(b.material_name, #{prodName})
+            </if>
         </where>
         union all
         select '' as "prodCodePk",
@@ -1382,6 +1385,9 @@
             <if test="prodCode != null and prodCode != ''">
                 and REGEXP_LIKE(b.material_code, #{prodCode})
             </if>
+            <if test="prodName != null and prodName != ''">
+                and REGEXP_LIKE(b.material_name, #{prodName})
+            </if>
             <if test="materialId != null and materialId != ''">
                 and REGEXP_LIKE(b.material_id, #{materialId})
             </if>