|
@@ -1729,9 +1729,7 @@ public class MeterTreeContractServiceImpl extends BaseServiceImpl<MeterTreeContr
|
|
obj.setRemarks(stringMap.get("备注"));
|
|
obj.setRemarks(stringMap.get("备注"));
|
|
obj.setContractPicture(stringMap.get("图号"));
|
|
obj.setContractPicture(stringMap.get("图号"));
|
|
obj.setTenantId(AuthUtil.getTenantId());
|
|
obj.setTenantId(AuthUtil.getTenantId());
|
|
- obj.setIsSupplement(0);
|
|
|
|
obj.setIsResolveForm(1);
|
|
obj.setIsResolveForm(1);
|
|
- obj.setIsLock(0);
|
|
|
|
resultNodeListAdd.add(obj);
|
|
resultNodeListAdd.add(obj);
|
|
updateNodeSet.add(aLong);
|
|
updateNodeSet.add(aLong);
|
|
for (String fo : allForm) {
|
|
for (String fo : allForm) {
|
|
@@ -1784,33 +1782,7 @@ public class MeterTreeContractServiceImpl extends BaseServiceImpl<MeterTreeContr
|
|
|
|
|
|
/*节点金额修改*/
|
|
/*节点金额修改*/
|
|
if (updateNodeSet.size() > 0) {
|
|
if (updateNodeSet.size() > 0) {
|
|
- for (Long treeContractId : updateNodeSet) {
|
|
|
|
- /*重新计算节点下的清单数量金额等*/
|
|
|
|
- List<ContractFromVO> decompositionList = contractInventoryFormMapper.getNodeResolveForm(meterTreeContract.getContractId(), treeContractId);
|
|
|
|
- if (ObjectUtil.isNotEmpty(decompositionList) && decompositionList.size() > 0) {
|
|
|
|
- BigDecimal moneyAll = BigDecimal.ZERO;
|
|
|
|
- BigDecimal moneyChangeAll = BigDecimal.ZERO;
|
|
|
|
-
|
|
|
|
- for (ContractFromVO contractFromVO : decompositionList) {
|
|
|
|
- BigDecimal buildPictureTotal = contractFromVO.getBuildPictureTotal(); //变更前数量
|
|
|
|
- BigDecimal changeBuildPictureTotal = contractFromVO.getChangeBuildPictureTotal(); //变更后数量
|
|
|
|
- BigDecimal currentPrice = contractFromVO.getCurrentPrice(); //单价
|
|
|
|
- BigDecimal buildPictureMoney = buildPictureTotal.multiply(currentPrice); //变更前金额
|
|
|
|
- BigDecimal changeBuildPictureMoney = changeBuildPictureTotal.multiply(currentPrice); //变更后金额
|
|
|
|
-
|
|
|
|
- moneyAll = moneyAll.add(buildPictureMoney);
|
|
|
|
- moneyChangeAll = moneyChangeAll.add(changeBuildPictureMoney);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- String sql = "UPDATE s_meter_tree_contract " +
|
|
|
|
- "SET build_picture_money = ?, " +
|
|
|
|
- "change_money = ? WHERE id = ?";
|
|
|
|
- jdbcTemplate.update(sql,
|
|
|
|
- moneyAll,
|
|
|
|
- moneyChangeAll,
|
|
|
|
- treeContractId);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ this.asyncCalculateNodeMoney2(updateNodeSet);
|
|
}
|
|
}
|
|
//修改合同工程清单的变更后数量
|
|
//修改合同工程清单的变更后数量
|
|
if (InventoryFormListUpdate.size() > 0) {
|
|
if (InventoryFormListUpdate.size() > 0) {
|
|
@@ -1821,7 +1793,10 @@ public class MeterTreeContractServiceImpl extends BaseServiceImpl<MeterTreeContr
|
|
}
|
|
}
|
|
//修改图号或者备注
|
|
//修改图号或者备注
|
|
if (resultNodeListUpdate.size() > 0){
|
|
if (resultNodeListUpdate.size() > 0){
|
|
- this.updateBatchById(resultNodeListUpdate);
|
|
|
|
|
|
+ List<List<MeterTreeContract>> lists = CommonUtil.splitList(resultNodeListUpdate, 1000);
|
|
|
|
+ for (List<MeterTreeContract> voList : lists) {
|
|
|
|
+ baseMapper.batchUpdateMeter(voList);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return R.success("成功导入:节点("+addNode+")个,"+"新增清单("+addForm+")条,"+"修改清单("+updateForm+")条.");
|
|
return R.success("成功导入:节点("+addNode+")个,"+"新增清单("+addForm+")条,"+"修改清单("+updateForm+")条.");
|
|
}
|
|
}
|