Browse Source

正则优化,链属导入

sqg 4 năm trước cách đây
mục cha
commit
7f2e903d8b

+ 3 - 3
sc-service/src/main/java/com/huyi/service/conmany/controller/OwnCompanyManageController.java

@@ -210,7 +210,7 @@ public class OwnCompanyManageController extends BaseController
             throw new Exception("企业名称不能为空");
         }
         //企业名称正则校验
-        String checkScyName = "^[\\u4E00-\\u9FFF0-9A-Z《》()()]+$";
+        String checkScyName = "^[\\u4E00-\\u9FFF0-9A-Z《》()()-]+$";
         Pattern regeScyName = Pattern.compile(checkScyName);
         Matcher matcherScyName = regeScyName.matcher(scyName);
         boolean isMatScyName = matcherScyName.matches();
@@ -415,7 +415,7 @@ public class OwnCompanyManageController extends BaseController
             throw new Exception("企业名称不能为空");
         }
         //企业名称正则校验
-        String checkScyName = "^([\\u4e00-\\u9fa5]+|[a-zA-Z0-9]+)$";
+        String checkScyName = "^[0-9A-Z\\u4E00-\\u9FFF《》()()-]+$";
         Pattern regeScyName = Pattern.compile(checkScyName);
         Matcher matcherScyName = regeScyName.matcher(scyName);
         boolean isMatScyName = matcherScyName.matches();
@@ -444,7 +444,7 @@ public class OwnCompanyManageController extends BaseController
             throw new Exception("联系人长度不能超过30字;请检查是否正确");
         }
         //联系人正则校验
-        String checkNickName = "^([\\u4e00-\\u9fa5]+|[a-zA-Z0-9]+)$";
+        String checkNickName = "^[A-Za-z\\u4e00-\\u9fa5]+$";
         Pattern regeNickName = Pattern.compile(checkNickName);
         Matcher matcherNickName = regeNickName.matcher(nickName);
         boolean isMatNickName = matcherNickName.matches();

+ 2 - 0
sc-service/src/main/java/com/huyi/service/rel/controller/CompanyRelImportController.java

@@ -408,6 +408,8 @@ public class CompanyRelImportController extends BaseController
                 sysCompanySpare.setScpId(scpId);
                 //录入企业
                 sysCompanySpare.setScpCompanyId(hId);
+                //链属关联Id
+                sysCompanySpare.setScpRelId(id);
                 //企业名称
                 sysCompanySpare.setScpName(scyName);
                 //统一社会信用代码

+ 1 - 1
sc-service/src/main/java/com/huyi/service/rel/controller/OwnCompanyRelController.java

@@ -330,7 +330,7 @@ public class OwnCompanyRelController extends BaseController
         if(CommonUtil.isEmpty(scyName)){
             throw new Exception("企业名称不能为空");
         }
-        String checkScyName = "^[\\u4E00-\\u9FFF0-9A-Z《》()()]+$";
+        String checkScyName = "^[\\u4E00-\\u9FFF0-9A-Z《》()()-]+$";
         Pattern regeScyName = Pattern.compile(checkScyName);
         Matcher matcherScyName = regeScyName.matcher(scyName);
         boolean isMatScyName = matcherScyName.matches();

+ 1 - 1
sc-service/src/main/resources/mapper/rel/OwnCompanyRelMapper.xml

@@ -102,7 +102,7 @@
         <if test="paramMap.scpContarct != null and paramMap.scpContarct != '' ">
             AND e.scp_contarct LIKE CONCAT('%', #{paramMap.scpContarct}, '%')
         </if>
-        ORDER BY r.create_time DESC, e.create_by DESC
+        ORDER BY r.create_time DESC
     </select>
 
 <!--            <select id="selectCompanyRelList" parameterType="map" resultType="map">-->