|
|
@@ -43,6 +43,7 @@ import com.ydtech.modules.protocol.entity.po.PtlAreaLicense;
|
|
|
import com.ydtech.modules.protocol.service.PtlAgreementService;
|
|
|
import com.ydtech.modules.protocol.service.PtlAreaLicenseService;
|
|
|
import com.ydtech.modules.protocol.utils.AssertionUtils;
|
|
|
+import com.ydtech.modules.protocols.constants.AgreementProductCostsAuditStatus;
|
|
|
import com.ydtech.modules.protocols.dao.PtlAgreementProductCostsNewMapper;
|
|
|
import com.ydtech.modules.protocols.entity.po.*;
|
|
|
import com.ydtech.modules.protocols.entity.vo.*;
|
|
|
@@ -185,9 +186,6 @@ public class PtlAgreementProductCostsNewServiceImpl extends ServiceImpl<PtlAgree
|
|
|
.gt(PtlAgreementProductCostsNew::getCostsEndDate, LocalDateTime.now());
|
|
|
}
|
|
|
}
|
|
|
- // 费用状态
|
|
|
- ptlAgreementProductCostsNewLambdaQueryWrapper
|
|
|
- .eq(agreementProductQueryVo.getValidStatus() != null, PtlAgreementProductCostsNew::getValidStatus, agreementProductQueryVo.getValidStatus());
|
|
|
//统配描述
|
|
|
if (agreementProductQueryVo.getDesc() != null) {
|
|
|
ptlAgreementProductCostsNewLambdaQueryWrapper.like(PtlAgreementProductCostsNew::getDesc, agreementProductQueryVo.getDesc());
|
|
|
@@ -528,7 +526,6 @@ public class PtlAgreementProductCostsNewServiceImpl extends ServiceImpl<PtlAgree
|
|
|
.lt(PtlAgreementProductCostsNew::getCostsStartDate, formattedDateTime)
|
|
|
.gt(PtlAgreementProductCostsNew::getCostsEndDate, formattedDateTime)
|
|
|
.eq(PtlAgreementProductCostsNew::getIsAudit, "1")//查找审核已通过的
|
|
|
- .eq(PtlAgreementProductCostsNew::getValidStatus, ValidStatus.AVS_1.getCode()) // 有效状态
|
|
|
.orderBy(true, true, PtlAgreementProductCostsNew::getPriorityLevel));
|
|
|
|
|
|
List<AgreementProductCosts> agreementProductCosts = new ArrayList<>();
|
|
|
@@ -795,8 +792,8 @@ public class PtlAgreementProductCostsNewServiceImpl extends ServiceImpl<PtlAgree
|
|
|
}
|
|
|
|
|
|
PtlAgreementProductCostsNew old = getById(agreementProductCosts.getId());
|
|
|
- if (!ValidStatus.AVS_0.getCode().equals(old.getValidStatus())) {
|
|
|
- throw new SystemException("请先禁用后再编辑费用");
|
|
|
+ if (!AgreementProductCostsAuditStatus.COSTS_AUDIT_STATUS_3.getCode().equals(old.getIsAudit())) {
|
|
|
+ throw new SystemException("请先禁用后再编辑修改费用");
|
|
|
}
|
|
|
//更新费用主表信息
|
|
|
PtlAgreementProductCostsNew ptlAgreementProductCost = ptlAgreementProductCostsNewService.getById(agreementProductCosts.getId());
|
|
|
@@ -2471,7 +2468,7 @@ public class PtlAgreementProductCostsNewServiceImpl extends ServiceImpl<PtlAgree
|
|
|
.set(InsAreaCompany::getCodeValidStatus, ValidStatus.AVS_0.getCode())
|
|
|
.in(InsAreaCompany::getId, insFeeOrderIdList)
|
|
|
.update();
|
|
|
- ptlAgreementProductCostsNew.setValidStatus(ValidStatus.AVS_0.getCode());
|
|
|
+ ptlAgreementProductCostsNew.setIsAudit(AgreementProductCostsAuditStatus.COSTS_AUDIT_STATUS_3.getCode());
|
|
|
boolean b = updateById(ptlAgreementProductCostsNew);
|
|
|
AssertionUtils.isSucceed(b, "修改费用状态失败");
|
|
|
return HttpResult.ok("修改成功");
|
|
|
@@ -2506,7 +2503,7 @@ public class PtlAgreementProductCostsNewServiceImpl extends ServiceImpl<PtlAgree
|
|
|
.in(InsAreaCompany::getId, insFeeOrderIdList)
|
|
|
.update();
|
|
|
|
|
|
- list.forEach(ptlAgreementProductCostsNew -> ptlAgreementProductCostsNew.setValidStatus(ValidStatus.AVS_0.getCode()));
|
|
|
+ list.forEach(ptlAgreementProductCostsNew -> ptlAgreementProductCostsNew.setIsAudit(AgreementProductCostsAuditStatus.COSTS_AUDIT_STATUS_3.getCode()));
|
|
|
|
|
|
boolean b = updateBatchById(list);
|
|
|
AssertionUtils.isSucceed(b, "修改费用状态失败");
|