Explorar el Código

Merge branch '20221117_sun修正适老化导入及高龄津贴导入' of sckj/mz-cloud into master

15143018065 hace 2 años
padre
commit
dca7b8509a

+ 2 - 1
ruoyi-modules/mz-business-btgl/src/main/java/com/ruoyi/business/service/impl/ZwywBtglGlbtServiceImpl.java

@@ -18,6 +18,7 @@ import com.ruoyi.system.api.enums.ExamineStatus;
 import com.ruoyi.system.api.model.LoginUser;
 import com.ruoyi.system.mapper.SysDeptJlMapper;
 import io.seata.common.util.CollectionUtils;
+import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -201,7 +202,7 @@ public class ZwywBtglGlbtServiceImpl implements IZwywBtglGlbtService
             glbt.setXzqh(n.getXzqh());
             glbt.setSqrZjhm(SecurityUtils.sm4encrypt_ECB(EncryptionUtils.key, n.getSqrZjhm()));
             glbt.setStatus(AdvancedStatus.MONTH.getCode());
-            if (CollectionUtils.isNotEmpty(zwywBtglGlbtMapper.selectList(new LambdaQueryWrapper<>(glbt)))){
+            if (ObjectUtils.isNotEmpty(zwywBtglGlbtMapper.selectOne(new LambdaQueryWrapper<>(glbt)))){
                 msg.append("<").append("证件号码:").append(n.getSqrZjhm()).append(" >已存在当前系统中,请修改。<br />");
             }
             if (StringUtils.isEmpty(n.getBfje())) {

+ 6 - 2
ruoyi-modules/mz-business-btgl/src/main/java/com/ruoyi/business/service/impl/ZwywBtglLrbtglServiceImpl.java

@@ -10,6 +10,7 @@ import com.ruoyi.common.core.exception.ServiceException;
 import com.ruoyi.common.core.utils.DateUtils;
 import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.security.utils.AmountUtils;
+import com.ruoyi.common.security.utils.EncryptionUtils;
 import com.ruoyi.common.security.utils.ImportUtils;
 import com.ruoyi.common.security.utils.SecurityUtils;
 import com.ruoyi.system.api.enums.DataStatus;
@@ -194,8 +195,11 @@ public class ZwywBtglLrbtglServiceImpl  implements IZwywBtglLrbtglService
         for (ZwywBtglLrbtgl n: zwywBtglLrbtglList){
             msg.append(ImportUtils.checkAndTrans(n));
             n.setSljg(ExamineStatus.SNO.getCode());
-            if (ObjectUtils.isNotEmpty(zwywBtglLrbtglMapper.getZwywBtglLrbtgl(n.getZjlx(), n.getZjhm(),
-                    DataStatus.NORMAL.getCode()))){
+            ZwywBtglLrbtgl lrbt = new ZwywBtglLrbtgl();
+            lrbt.setZjlx(n.getZjlx());
+            lrbt.setZjhm(SecurityUtils.sm4encrypt_ECB(EncryptionUtils.key, n.getZjhm()));
+            lrbt.setStatus(DataStatus.NORMAL.getCode());
+            if (ObjectUtils.isNotEmpty(zwywBtglLrbtglMapper.selectOne(new LambdaQueryWrapper<>(lrbt)))){
                 msg.append("<").append("证件号码:").append(n.getZjhm()).append(" >已存在,请修改。");
             }
             if (StringUtils.isEmpty(n.getRjsr())) {

+ 2 - 2
ruoyi-modules/mz-business-lrgl/src/main/java/com/ruoyi/business/service/impl/ZwywLrZvxxServiceImpl.java

@@ -126,7 +126,7 @@ public class ZwywLrZvxxServiceImpl implements IZwywLrZvxxService
             originZvxx = ZwywLrZvxx;
         }
         if(StringUtils.isNotBlank(ZwywLrZvxx.getZnzjlx())){ // 如果身份证类型存在
-            if(ZwywLrZvxx.getZnzjlx().equals(DocumentTypeStatus.INLAND.getCode())){ // 身份证类型为'内地'
+            if(StringUtils.equals(ZwywLrZvxx.getZnzjlx(), DocumentTypeStatus.INLAND.getCode())){ // 身份证类型为'内地'
                 if(StringUtils.isNotBlank(ZwywLrZvxx.getZjhm())){
                     if(!IDCardUtil.idCardValidate(ZwywLrZvxx.getZjhm())){
                         throw new ServiceException("身份证件类型为内地居民身份证时,身份证格式不正确!");
@@ -139,7 +139,7 @@ public class ZwywLrZvxxServiceImpl implements IZwywLrZvxxService
             }
         }else {
             if(StringUtils.isNotBlank(ZwywLrZvxx.getZjhm())){ // 身份证类型不存在 且 身份证号码不为空
-                if(originZvxx.getZnzjlx().equals(DocumentTypeStatus.INLAND.getCode())){ //历史身份证为'内地'
+                if(StringUtils.equals(originZvxx.getZnzjlx(), DocumentTypeStatus.INLAND.getCode())){ //历史身份证为'内地'
                     if(!IDCardUtil.idCardValidate(ZwywLrZvxx.getZjhm())){
                         throw new ServiceException("身份证件类型为内地居民身份证时,身份证格式不正确!");
                     }