|
@@ -1558,6 +1558,8 @@ public class MeterTreeContractServiceImpl extends BaseServiceImpl<MeterTreeContr
|
|
parseExcelFileToList = parseExcelFileToList.stream().filter(l->StringUtils.isNotBlank(l.get("桩号支付编号")) && !l.get("桩号支付编号").contains("清单编号需手动填写")).collect(Collectors.toList());
|
|
parseExcelFileToList = parseExcelFileToList.stream().filter(l->StringUtils.isNotBlank(l.get("桩号支付编号")) && !l.get("桩号支付编号").contains("清单编号需手动填写")).collect(Collectors.toList());
|
|
/*节点新增*/
|
|
/*节点新增*/
|
|
List<MeterTreeContract> resultNodeListAdd = new LinkedList<>();
|
|
List<MeterTreeContract> resultNodeListAdd = new LinkedList<>();
|
|
|
|
+ /*节点修改*/
|
|
|
|
+ List<MeterTreeContract> resultNodeListUpdate = new ArrayList<>();
|
|
/*节点金额修改Ids*/
|
|
/*节点金额修改Ids*/
|
|
Set<Long> updateNodeSet = new HashSet<>();
|
|
Set<Long> updateNodeSet = new HashSet<>();
|
|
/*清单中间新增*/
|
|
/*清单中间新增*/
|
|
@@ -1609,7 +1611,20 @@ public class MeterTreeContractServiceImpl extends BaseServiceImpl<MeterTreeContr
|
|
.map(l->l.getKey()).collect(Collectors.toList());
|
|
.map(l->l.getKey()).collect(Collectors.toList());
|
|
// 查询当前节点下是否存在
|
|
// 查询当前节点下是否存在
|
|
if (hasChild && nameMap.get(name) != null){
|
|
if (hasChild && nameMap.get(name) != null){
|
|
|
|
+ //添加进修改集合,重新计算金额
|
|
updateNodeSet.add(nameMap.get(name));
|
|
updateNodeSet.add(nameMap.get(name));
|
|
|
|
+ //获取出图号和备注单独修改
|
|
|
|
+ if (StringUtils.isNotBlank(stringMap.get("图号")) || StringUtils.isNotBlank(stringMap.get("备注"))){
|
|
|
|
+ MeterTreeContract contract = new MeterTreeContract();
|
|
|
|
+ contract.setId(nameMap.get(name));
|
|
|
|
+ if (StringUtils.isNotBlank(stringMap.get("图号"))) {
|
|
|
|
+ contract.setContractPicture(stringMap.get("图号"));
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.isNotBlank(stringMap.get("备注"))){
|
|
|
|
+ contract.setRemarks(stringMap.get("备注"));
|
|
|
|
+ }
|
|
|
|
+ resultNodeListUpdate.add(contract);
|
|
|
|
+ }
|
|
// 循环需要挂载的清单
|
|
// 循环需要挂载的清单
|
|
for (String fo : allForm) {
|
|
for (String fo : allForm) {
|
|
//获取清单信息
|
|
//获取清单信息
|
|
@@ -1666,6 +1681,7 @@ public class MeterTreeContractServiceImpl extends BaseServiceImpl<MeterTreeContr
|
|
obj.setDataSourceType(4);
|
|
obj.setDataSourceType(4);
|
|
obj.setUpdateStatus(0);
|
|
obj.setUpdateStatus(0);
|
|
obj.setRemarks(stringMap.get("备注"));
|
|
obj.setRemarks(stringMap.get("备注"));
|
|
|
|
+ obj.setContractPicture(stringMap.get("图号"));
|
|
obj.setTenantId(AuthUtil.getTenantId());
|
|
obj.setTenantId(AuthUtil.getTenantId());
|
|
obj.setIsSupplement(0);
|
|
obj.setIsSupplement(0);
|
|
obj.setIsResolveForm(1);
|
|
obj.setIsResolveForm(1);
|
|
@@ -1733,7 +1749,6 @@ public class MeterTreeContractServiceImpl extends BaseServiceImpl<MeterTreeContr
|
|
BigDecimal buildPictureTotal = contractFromVO.getBuildPictureTotal(); //变更前数量
|
|
BigDecimal buildPictureTotal = contractFromVO.getBuildPictureTotal(); //变更前数量
|
|
BigDecimal changeBuildPictureTotal = contractFromVO.getChangeBuildPictureTotal(); //变更后数量
|
|
BigDecimal changeBuildPictureTotal = contractFromVO.getChangeBuildPictureTotal(); //变更后数量
|
|
BigDecimal currentPrice = contractFromVO.getCurrentPrice(); //单价
|
|
BigDecimal currentPrice = contractFromVO.getCurrentPrice(); //单价
|
|
-
|
|
|
|
BigDecimal buildPictureMoney = buildPictureTotal.multiply(currentPrice); //变更前金额
|
|
BigDecimal buildPictureMoney = buildPictureTotal.multiply(currentPrice); //变更前金额
|
|
BigDecimal changeBuildPictureMoney = changeBuildPictureTotal.multiply(currentPrice); //变更后金额
|
|
BigDecimal changeBuildPictureMoney = changeBuildPictureTotal.multiply(currentPrice); //变更后金额
|
|
|
|
|
|
@@ -1758,6 +1773,10 @@ public class MeterTreeContractServiceImpl extends BaseServiceImpl<MeterTreeContr
|
|
Collectors.mapping(ContractInventoryForm::getChangeTotal, Collectors.reducing(BigDecimal.ZERO, BigDecimal::add))));
|
|
Collectors.mapping(ContractInventoryForm::getChangeTotal, Collectors.reducing(BigDecimal.ZERO, BigDecimal::add))));
|
|
baseMapper.batchUpdateFormByNumber(meterTreeContract.getContractId(), map);
|
|
baseMapper.batchUpdateFormByNumber(meterTreeContract.getContractId(), map);
|
|
}
|
|
}
|
|
|
|
+ //修改图号或者备注
|
|
|
|
+ if (resultNodeListUpdate.size() > 0){
|
|
|
|
+ this.updateBatchById(resultNodeListUpdate);
|
|
|
|
+ }
|
|
return R.success("成功导入:节点("+addNode+")个,"+"新增清单("+addForm+")条,"+"修改清单("+updateForm+")条.");
|
|
return R.success("成功导入:节点("+addNode+")个,"+"新增清单("+addForm+")条,"+"修改清单("+updateForm+")条.");
|
|
}
|
|
}
|
|
|
|
|