wangming 2 tygodni temu
rodzic
commit
4fa7bb3f3c

+ 6 - 1
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZchxNdtProjectNdtCheckWeldSeamServiceImpl.java

@@ -1,5 +1,6 @@
 package com.rongwei.bscommon.sys.service.impl;
 
+import cn.hutool.core.util.ObjectUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -34,6 +35,10 @@ public class ZchxNdtProjectNdtCheckWeldSeamServiceImpl extends ServiceImpl<ZchxN
     @Override
     public void completeWeld(String checkId, List<String> completedWeldList) {
 
+        if(ObjectUtil.isEmpty(completedWeldList)) {
+            return ;
+        }
+
         // 所有设值为未完成
         final LambdaUpdateWrapper<ZchxNdtProjectNdtCheckWeldSeamDo> updateUncomWrapper = Wrappers.lambdaUpdate();
         updateUncomWrapper.set(ZchxNdtProjectNdtCheckWeldSeamDo::getResult, "20")
@@ -43,7 +48,7 @@ public class ZchxNdtProjectNdtCheckWeldSeamServiceImpl extends ServiceImpl<ZchxN
 
         // 修改为完成
         final LambdaUpdateWrapper<ZchxNdtProjectNdtCheckWeldSeamDo> updateComWrapper = Wrappers.lambdaUpdate();
-        updateUncomWrapper.set(ZchxNdtProjectNdtCheckWeldSeamDo::getResult, "10")
+        updateComWrapper.set(ZchxNdtProjectNdtCheckWeldSeamDo::getResult, "10")
                 .in(ZchxNdtProjectNdtCheckWeldSeamDo::getWeldcode, completedWeldList)
                 .eq(ZchxNdtProjectNdtCheckWeldSeamDo::getCheckid, checkId);
         update(updateComWrapper);