Explorar o código

外部报验功能

wangming hai 1 ano
pai
achega
3f8270a900

+ 5 - 5
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxOutsideInspectionItpServiceImpl.java

@@ -69,7 +69,7 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
         List<String> newItpIdList = new ArrayList<>();
 
         int count = -1;
-        for(String structurName : structurNames) {
+        for(int m = 0, n = structurNames.length; m < n; m++) {
             for(String inspectionContent : inspectionContents) {
                 count++;
                 SysSerialVo sysSerialVo = new SysSerialVo();
@@ -80,21 +80,21 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
                 sysSerialVo.setInitValue(0L);
                 String code = serialNumberService.getCodeByTemplate(sysSerialVo);
                 if(count == 0) { //第一个做修改
-                    itpDo.setStructurename(structurName);
+                    itpDo.setStructurename(structurNames[m]);
                     itpDo.setInspectioncontent(inspectionContent);
                     itpDo.setInspectioncode(code);
-                    itpDo.setStructureid(structureIds[count]);
+                    itpDo.setStructureid(structureIds[m]);
                     updateList.add(itpDo);
                     continue;
                 }
 
                 ZhcxOutsideInspectionItpDo entity = new ZhcxOutsideInspectionItpDo();
                 BeanUtil.copyProperties(itpDo, entity);
-                entity.setStructurename(structurName);
+                entity.setStructurename(structurNames[m]);
                 entity.setInspectioncontent(inspectionContent);
                 entity.setId(SecurityUtil.getUUID());
                 entity.setInspectioncode(code);
-                entity.setStructureid(structureIds[count]);
+                entity.setStructureid(structureIds[m]);
                 insertList.add(entity);
                 newItpIdList.add(entity.getId());