Переглянути джерело

计量合同段附加信息

Signed-off-by: liuyc <56808083@qq.com>
liuyc 9 місяців тому
батько
коміт
26e6764cd4

+ 18 - 16
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ContractInfoServiceImpl.java

@@ -810,14 +810,16 @@ public class ContractInfoServiceImpl extends BaseServiceImpl<ContractInfoMapper,
                     }
                 }
 
-                /*总承包合同段(计量合同段)*/
-            } else if (contractInfo.getContractType().equals(4)) {
-                if (ObjectUtil.isNotEmpty(contractInfo.getMeterContractInfo())) {
-                    MeterContractInfo meterContractInfo = contractInfo.getMeterContractInfo();
-                    meterContractInfo.setContractId(contractInfo.getId());
-                    meterContractInfoClient.saveOrUpdate(meterContractInfo);
-                }
+
+            }
+            /*总承包合同段(计量合同段)*/
+            //else if (contractInfo.getContractType().equals(4)) {
+            if (ObjectUtil.isNotEmpty(contractInfo.getMeterContractInfo())) {
+                MeterContractInfo meterContractInfo = contractInfo.getMeterContractInfo();
+                meterContractInfo.setContractId(contractInfo.getId());
+                meterContractInfoClient.saveOrUpdate(meterContractInfo);
             }
+            //}
 
             return this.submitContractRelevantInfo(row, contractInfo);
 
@@ -886,14 +888,15 @@ public class ContractInfoServiceImpl extends BaseServiceImpl<ContractInfoMapper,
                     }
                 }
 
-                /*总承包合同段(计量合同段)*/
-            } else if (contractInfo.getContractType().equals(4)) {
-                if (ObjectUtil.isNotEmpty(contractInfo.getMeterContractInfo())) {
-                    MeterContractInfo meterContractInfo = contractInfo.getMeterContractInfo();
-                    meterContractInfo.setContractId(contractInfo.getId());
-                    meterContractInfoClient.saveOrUpdate(meterContractInfo);
-                }
             }
+            /*总承包合同段(计量合同段)*/
+            //else if (contractInfo.getContractType().equals(4)) {
+            if (ObjectUtil.isNotEmpty(contractInfo.getMeterContractInfo())) {
+                MeterContractInfo meterContractInfo = contractInfo.getMeterContractInfo();
+                meterContractInfo.setContractId(contractInfo.getId());
+                meterContractInfoClient.saveOrUpdate(meterContractInfo);
+            }
+            //}
 
             return this.submitContractRelevantInfo(row, contractInfo);
         }
@@ -937,7 +940,6 @@ public class ContractInfoServiceImpl extends BaseServiceImpl<ContractInfoMapper,
                     addList.add(newObj);
                 }
 
-
                 if (addList.size() > 0) {
                     //保存数据
                     saveUserInfoByProjectService.saveBatch(addList);
@@ -991,7 +993,7 @@ public class ContractInfoServiceImpl extends BaseServiceImpl<ContractInfoMapper,
 //                }
                 //删除之前所有的地址,再新增
                 projectContractAreaMapper.delete(new LambdaQueryWrapper<ProjectContractArea>()
-                    .eq(ProjectContractArea::getContractId,projectContractArea.getContractId()));
+                        .eq(ProjectContractArea::getContractId, projectContractArea.getContractId()));
                 int res = projectContractAreaMapper.insert(projectContractArea);
                 return res > 0;
 //                return true;