Quellcode durchsuchen

协议费用修改后,进入到代办事项的报价费用审核页面

诚泰费用都重新修改过,但是财务审核这没有提示需要审核的新费用
lipf vor 4 Monaten
Ursprung
Commit
dc3e21f4f6

+ 1 - 1
tenant/organization/src/main/java/com/jzg/organization/controller/PtlAgreementCostController.java

@@ -45,7 +45,7 @@ public class PtlAgreementCostController {
     @OperatorTrajectory(moduleName = "报价配置/费用管理/修改费用",OperationDict = OperationTypeEnum.EDITED_AGREEMENT, type = "U", mapperClass = PtlAgreementCostMapper.class,entityClass = PtlAgreementCostEnd.class)
     @Operation(summary = "协议费用管理修改")
     @PostMapping("update")
-    public HttpResult update(@RequestBody @Valid PtlAgreementCostEnd costEndList){
+    public HttpResult<String> update(@RequestBody @Valid PtlAgreementCostEnd costEndList){
         return ptlAgreementCostService.update(costEndList);
     }
 

+ 7 - 1
tenant/organization/src/main/java/com/jzg/organization/service/PtlAgreementCostService.java

@@ -21,7 +21,13 @@ public interface PtlAgreementCostService extends IService<PtlAgreementCost> {
     HttpResult save(PtlAgreemenCostAdd ptlAgreemenCostAdd);
 
 
-    HttpResult update(PtlAgreementCostEnd costEndList);
+    /**
+     * 协议费用管理修改
+     *
+     * @author lipf
+     * @date 2026/5/22 11:26
+     */
+    HttpResult<String> update(PtlAgreementCostEnd costEndList);
 
 
     HttpResult queryById(@NotNull(message = "id不能为空") Long id);

+ 12 - 3
tenant/organization/src/main/java/com/jzg/organization/service/impl/PtlAgreementCostServiceImpl.java

@@ -128,9 +128,16 @@ public class PtlAgreementCostServiceImpl extends ServiceImpl<PtlAgreementCostMap
         return HttpResult.ok(ReturnInformation.SUCCESS_MESSAGE);
     }
 
+    /**
+     * 协议费用管理修改
+     *
+     * @author lipf
+     * @date 2026/5/22 11:26
+     */
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public HttpResult update(PtlAgreementCostEnd ptlAgreementCostEnd) {
+    public HttpResult<String> update(PtlAgreementCostEnd ptlAgreementCostEnd) {
+        log.info("协议费用修改。ptlAgreementCostEnd=[{}]", JSONUtil.toJsonStr(ptlAgreementCostEnd));
         if (ListUtils.hasDuplicates(ptlAgreementCostEnd.getRuleConditions())){
             return HttpResult.error("已存在相同且有效的费用规则,请检查");
         }
@@ -145,6 +152,8 @@ public class PtlAgreementCostServiceImpl extends ServiceImpl<PtlAgreementCostMap
             }
         }
         PtlAgreementCost ptlAgreementCost = BeanUtil.copyProperties(ptlAgreementCostEnd, PtlAgreementCost.class);
+        // modify by lipf, 2026年5月22日11:28:34 设置为待审核状态
+        ptlAgreementCost.setApproved(0);
         ptlAgreementCost.setCostRules(buildDescString(ptlAgreementCostEnd.getRuleConditions()));
         if (baseMapper.updateById(ptlAgreementCost) <= 0) {
             throw new RuntimeException(ReturnInformation.UPDATE_FAILED);
@@ -347,10 +356,10 @@ public class PtlAgreementCostServiceImpl extends ServiceImpl<PtlAgreementCostMap
         log.info("查询协议费用信息:costParam=[{}]", JSONUtil.toJsonStr(costParam));
         Page<CostManagementVo> costManagementVoPage = baseMapper.pageList(costParam.getPage(), costParam);
         costManagementVoPage.getRecords().forEach(item->{
-            if(item.getCostRules() != null && !item.getCostRules().equals("")){
+            if(item.getCostRules() != null && !item.getCostRules().isEmpty()){
                 item.setCostRules(item.getCostRules().substring(0,item.getCostRules().length()-1));
             }
-            if(item.getRuleDescription() != null && !item.getRuleDescription().equals("")){
+            if(item.getRuleDescription() != null && !item.getRuleDescription().isEmpty()){
                 item.setRuleDescription(item.getRuleDescription().substring(0,item.getRuleDescription().length()-1));
             }
             // 刷新有效状态