diff --git a/src/main/java/com/qs/serve/modules/tbs/entity/so/TbsScheduleItemSearch.java b/src/main/java/com/qs/serve/modules/tbs/entity/so/TbsScheduleItemSearch.java index 5c5da5fb..c85128ba 100644 --- a/src/main/java/com/qs/serve/modules/tbs/entity/so/TbsScheduleItemSearch.java +++ b/src/main/java/com/qs/serve/modules/tbs/entity/so/TbsScheduleItemSearch.java @@ -65,4 +65,16 @@ public class TbsScheduleItemSearch { private Integer pageSize; + /** + * 用于查询预算审批中的数据 + */ + private String type; + private String tarCode; + private String tarTitle; + private String supplierCode; + private String supplierName; + private String userCode; + private String userName; + + } diff --git a/src/main/java/com/qs/serve/modules/tbs/mapper/TbsBudgetLog2Mapper.java b/src/main/java/com/qs/serve/modules/tbs/mapper/TbsBudgetLog2Mapper.java index ca243a4d..85b88a2f 100644 --- a/src/main/java/com/qs/serve/modules/tbs/mapper/TbsBudgetLog2Mapper.java +++ b/src/main/java/com/qs/serve/modules/tbs/mapper/TbsBudgetLog2Mapper.java @@ -80,6 +80,7 @@ public interface TbsBudgetLog2Mapper extends BaseMapper { */ @InterceptorIgnore(tenantLine = "true") List getBudgetLogCheckingList( + @Param("query")TbsScheduleItemSearch param, @Param("selectIds") List ids ,@Param("scheduleItemBudgetIds") List scheduleItemBudgetIds , @Param("policyNumbers")List policyNumbers diff --git a/src/main/java/com/qs/serve/modules/tbs/service/impl/TbsScheduleItemBudgetServiceImpl.java b/src/main/java/com/qs/serve/modules/tbs/service/impl/TbsScheduleItemBudgetServiceImpl.java index 74048d31..36682694 100644 --- a/src/main/java/com/qs/serve/modules/tbs/service/impl/TbsScheduleItemBudgetServiceImpl.java +++ b/src/main/java/com/qs/serve/modules/tbs/service/impl/TbsScheduleItemBudgetServiceImpl.java @@ -390,7 +390,7 @@ public class TbsScheduleItemBudgetServiceImpl extends ServiceImpl budgetLogs = tbsBudgetLog2Mapper.getBudgetLogCheckingList(new ArrayList<>(budgetIds),param.getScheduleItemBudgetIds(), BudgetLogOptFlag.finalPolicyOptFlag,BudgetLogOptFlag.finalCostOptFlag); + List budgetLogs = tbsBudgetLog2Mapper.getBudgetLogCheckingList(param,new ArrayList<>(budgetIds),param.getScheduleItemBudgetIds(), BudgetLogOptFlag.finalPolicyOptFlag,BudgetLogOptFlag.finalCostOptFlag); return budgetLogs; } diff --git a/src/main/java/com/qs/serve/modules/tzc/controller/TzcPolicyController.java b/src/main/java/com/qs/serve/modules/tzc/controller/TzcPolicyController.java index 2c39e326..4baea14e 100644 --- a/src/main/java/com/qs/serve/modules/tzc/controller/TzcPolicyController.java +++ b/src/main/java/com/qs/serve/modules/tzc/controller/TzcPolicyController.java @@ -184,6 +184,15 @@ public class TzcPolicyController { public R getById(@PathVariable("id") String id){ TzcPolicy tzcPolicy = tzcPolicyService.getById(id); if(tzcPolicy!=null){ + if(tzcPolicy.getPolicyStatus().equals(TzcPolicyStatus.Status_1_Checking)){ + //尝试进行补偿 + try { + tzcPolicyOperationService.runCompensate(id); + tzcPolicy = tzcPolicyService.getById(id); + }catch (Exception e){ + + } + } List policyItemList = tzcPolicyItemService.listByPolicyId(tzcPolicy.getId()); tzcPolicy.setPolicyItemList(policyItemList); } @@ -450,7 +459,7 @@ public class TzcPolicyController { * @param id * @return */ - @PostMapping("/cancellation/{id}") + @DeleteMapping("/cancellation/{id}") public R cancellation(@PathVariable Long id){ List tzcPolicyItemList = tzcPolicyItemService.listByPolicyId(id); List itemIds = tzcPolicyItemList.stream().map(TzcPolicyItem::getId).collect(Collectors.toList()); diff --git a/src/main/resources/mapper/tbs/TbsBudget2Mapper.xml b/src/main/resources/mapper/tbs/TbsBudget2Mapper.xml index 84d4d79c..d31136e7 100644 --- a/src/main/resources/mapper/tbs/TbsBudget2Mapper.xml +++ b/src/main/resources/mapper/tbs/TbsBudget2Mapper.xml @@ -144,7 +144,7 @@ tbs_cost_apply.id as tar_id, tbs_cost_apply.code as tar_code, tbs_cost_apply.charge_theme as tar_title, - sum(tbs_budget_log.amount) as total_amount, + -sum(tbs_budget_log.amount) as total_amount, tbs_cost_apply.supplier_code, tbs_cost_apply.supplier_name, tbs_cost_apply.user_code, @@ -168,6 +168,15 @@ #{selectId} + + and 1=0 + and tbs_cost_apply.code like concat('%',#{query.tarCode},'%') + and tbs_cost_apply.charge_theme like concat('%',#{query.tarTitle},'%') + and tbs_cost_apply.supplier_code like concat('%',#{query.supplierCode},'%') + and tbs_cost_apply.supplier_name like concat('%',#{query.supplierName},'%') + and tbs_cost_apply.user_code like concat('%',#{query.userCode},'%') + and tbs_cost_apply.user_name like concat('%',#{query.userName},'%') + group by tbs_budget_log.cost_apply_id union @@ -177,7 +186,7 @@ tzc_policy.id as tar_id, tzc_policy.policy_code as tar_code, tzc_policy.title as tar_title, - sum(tbs_budget_log.amount) as total_amount, + -sum(tbs_budget_log.amount) as total_amount, tzc_policy.supplier_code, tzc_policy.supplier_name, tzc_policy.user_code, @@ -201,6 +210,15 @@ #{selectId} + + and 1=0 + and tzc_policy.policy_code like concat('%',#{query.tarCode},'%') + and tzc_policy.title like concat('%',#{query.tarTitle},'%') + and tzc_policy.supplier_code like concat('%',#{query.supplierCode},'%') + and tzc_policy.supplier_name like concat('%',#{query.supplierName},'%') + and tzc_policy.user_code like concat('%',#{query.userCode},'%') + and tzc_policy.user_name like concat('%',#{query.userName},'%') + group by tbs_budget_log.policy_id