|
@@ -265,6 +265,19 @@ public class MiddleMeterApplyServiceImpl extends BaseServiceImpl<MiddleMeterAppl
|
|
throw new ServiceException("请添加需要计量的清单");
|
|
throw new ServiceException("请添加需要计量的清单");
|
|
}
|
|
}
|
|
this.save(apply);
|
|
this.save(apply);
|
|
|
|
+ if (StringUtils.isNotBlank(apply.getCalculateFormula())) {
|
|
|
|
+ //如果存在计算式,每次同步修改所有期的当前节点计算式
|
|
|
|
+ this.update(new LambdaUpdateWrapper<MiddleMeterApply>()
|
|
|
|
+ .eq(MiddleMeterApply::getContractId,dto.getContractId())
|
|
|
|
+ .eq(MiddleMeterApply::getContractUnitId,dto.getContractUnitId())
|
|
|
|
+ .set(MiddleMeterApply::getCalculateFormula,dto.getCalculateFormula()));
|
|
|
|
+ //再同步修改合同计量单元当前节点的计算式
|
|
|
|
+ meterTreeContractService.update(new LambdaUpdateWrapper<MeterTreeContract>()
|
|
|
|
+ .eq(MeterTreeContract::getId,dto.getContractUnitId())
|
|
|
|
+ .set(MeterTreeContract::getCalculateFormula,dto.getCalculateFormula()));
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -438,6 +451,18 @@ public class MiddleMeterApplyServiceImpl extends BaseServiceImpl<MiddleMeterAppl
|
|
inventoryFormApplyService.saveBatch(formApplies);
|
|
inventoryFormApplyService.saveBatch(formApplies);
|
|
}
|
|
}
|
|
this.updateById(apply);
|
|
this.updateById(apply);
|
|
|
|
+ if (StringUtils.isNotBlank(apply.getCalculateFormula())) {
|
|
|
|
+ //如果存在计算式,每次同步修改所有期的当前节点计算式
|
|
|
|
+ this.update(new LambdaUpdateWrapper<MiddleMeterApply>()
|
|
|
|
+ .eq(MiddleMeterApply::getContractId,dto.getContractId())
|
|
|
|
+ .eq(MiddleMeterApply::getContractUnitId,dto.getContractUnitId())
|
|
|
|
+ .set(MiddleMeterApply::getCalculateFormula,dto.getCalculateFormula()));
|
|
|
|
+ //再同步修改合同计量单元当前节点的计算式
|
|
|
|
+ meterTreeContractService.update(new LambdaUpdateWrapper<MeterTreeContract>()
|
|
|
|
+ .eq(MeterTreeContract::getId,dto.getContractUnitId())
|
|
|
|
+ .set(MeterTreeContract::getCalculateFormula,dto.getCalculateFormula()));
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -885,6 +910,16 @@ public class MiddleMeterApplyServiceImpl extends BaseServiceImpl<MiddleMeterAppl
|
|
if (apply == null){
|
|
if (apply == null){
|
|
throw new ServiceException("未找到中间计量申请信息");
|
|
throw new ServiceException("未找到中间计量申请信息");
|
|
}
|
|
}
|
|
|
|
+ //查询查询当前计量期信息
|
|
|
|
+ ContractMeterPeriod period = contractMeterPeriodService.getById(apply.getContractPeriodId());
|
|
|
|
+ if (period == null){
|
|
|
|
+ throw new ServiceException("未找到当前计量期信息");
|
|
|
|
+ }
|
|
|
|
+ //获取任务信息
|
|
|
|
+ Task task = baseMapper.getTaskInfo(apply.getContractId(),period.getId());
|
|
|
|
+ if (task == null){
|
|
|
|
+ throw new ServiceException("未找到任务信息");
|
|
|
|
+ }
|
|
//根据文件id,查询出queryInfo数据
|
|
//根据文件id,查询出queryInfo数据
|
|
if (StringUtils.isBlank(fileIds)){
|
|
if (StringUtils.isBlank(fileIds)){
|
|
throw new ServiceException("请选择关联资料");
|
|
throw new ServiceException("请选择关联资料");
|
|
@@ -1073,8 +1108,8 @@ public class MiddleMeterApplyServiceImpl extends BaseServiceImpl<MiddleMeterAppl
|
|
}
|
|
}
|
|
//末尾拼接所有WBS节点,所有计量节点
|
|
//末尾拼接所有WBS节点,所有计量节点
|
|
str.append(vo2.getLinkWbs()+",");
|
|
str.append(vo2.getLinkWbs()+",");
|
|
- str2.append(vo2.getId());
|
|
|
|
- str3.append(vo2.getLinkForm());
|
|
|
|
|
|
+ str2.append(vo2.getId()+",");
|
|
|
|
+ str3.append(vo2.getLinkForm()+",");
|
|
|
|
|
|
}
|
|
}
|
|
if (voList.size() == 0 || StringUtils.isBlank(str.toString()) || StringUtils.isBlank(str2.toString()) || StringUtils.isBlank(str3.toString())){
|
|
if (voList.size() == 0 || StringUtils.isBlank(str.toString()) || StringUtils.isBlank(str2.toString()) || StringUtils.isBlank(str3.toString())){
|
|
@@ -1111,7 +1146,7 @@ public class MiddleMeterApplyServiceImpl extends BaseServiceImpl<MiddleMeterAppl
|
|
//查询出当前计量期所有未删除的计量单,如果不为空,则过滤出最大后缀
|
|
//查询出当前计量期所有未删除的计量单,如果不为空,则过滤出最大后缀
|
|
List<MiddleMeterApply> applyList = this.list(new LambdaQueryWrapper<MiddleMeterApply>()
|
|
List<MiddleMeterApply> applyList = this.list(new LambdaQueryWrapper<MiddleMeterApply>()
|
|
.eq(MiddleMeterApply::getContractId, contractId)
|
|
.eq(MiddleMeterApply::getContractId, contractId)
|
|
- .eq(MiddleMeterApply::getContractPeriodId, period));
|
|
|
|
|
|
+ .eq(MiddleMeterApply::getContractPeriodId, periodId));
|
|
//获取当前计量期所有已经计量的数量(),用于生成计量单编号
|
|
//获取当前计量期所有已经计量的数量(),用于生成计量单编号
|
|
if (applyList.size() == 0){
|
|
if (applyList.size() == 0){
|
|
count = 1;
|
|
count = 1;
|