diff --git a/src/main/java/com/qs/serve/modules/seeyon/SeeYonController.java b/src/main/java/com/qs/serve/modules/seeyon/SeeYonController.java index 2dbe2ec8..558b4e37 100644 --- a/src/main/java/com/qs/serve/modules/seeyon/SeeYonController.java +++ b/src/main/java/com/qs/serve/modules/seeyon/SeeYonController.java @@ -75,8 +75,8 @@ public class SeeYonController { * @return */ @GetMapping("pageMyCallback") - public R> pageCallbackList(){ - return R.ok(commonCheckService.pageCallback(new TodoVoQuery())); + public R> pageCallbackList(TodoVoQuery todoVoQuery){ + return R.ok(commonCheckService.pageCallback(todoVoQuery)); } /** diff --git a/src/main/java/com/qs/serve/modules/seeyon/entity/dto/TodoVoQuery.java b/src/main/java/com/qs/serve/modules/seeyon/entity/dto/TodoVoQuery.java index 28d85ef3..6a449a8b 100644 --- a/src/main/java/com/qs/serve/modules/seeyon/entity/dto/TodoVoQuery.java +++ b/src/main/java/com/qs/serve/modules/seeyon/entity/dto/TodoVoQuery.java @@ -1,6 +1,9 @@ package com.qs.serve.modules.seeyon.entity.dto; import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDate; /** * @author YenHex @@ -9,6 +12,18 @@ import lombok.Data; @Data public class TodoVoQuery { + private String title; + + private String targetType; + + private String targetCode; + + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate startDate; + + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate endDate; + private String userId; private Integer startRow; diff --git a/src/main/java/com/qs/serve/modules/tbs/entity/dto/TbsContractCostSubItem.java b/src/main/java/com/qs/serve/modules/tbs/entity/dto/TbsContractCostSubItem.java index 8579b4d1..66526cf4 100644 --- a/src/main/java/com/qs/serve/modules/tbs/entity/dto/TbsContractCostSubItem.java +++ b/src/main/java/com/qs/serve/modules/tbs/entity/dto/TbsContractCostSubItem.java @@ -52,4 +52,24 @@ public class TbsContractCostSubItem { } + @Data + public static class CusCenterRate{ + // 季度客户所属成本中心费用金额 + private String qtdCusCenterCost; + // 季度客户所属成本中心发货金额 + private String qtdCusCenterSend; + // 季度客户所属成本中心费用率 + private String qtdCusCenterExpenseRate; + // 季度客户所属成本中心目标费用率 + private String qtdCusCenterTargetExpenseRate; + // 年度客户所属成本中心费用金额 + private String ytdCusCenterCost; + // 年度客户所属成本中心发货金额 + private String ytdCusCenterSend; + // 年度客户所属成本中心费用率 + private String ytdCusCenterExpenseRate; + // 年度客户所属成本中心目标费用率 + private String ytdCusCenterTargetExpenseRate; + } + } diff --git a/src/main/java/com/qs/serve/modules/tbs/entity/so/TbsBudgetSo.java b/src/main/java/com/qs/serve/modules/tbs/entity/so/TbsBudgetSo.java index 3d93f516..a7c0122c 100644 --- a/src/main/java/com/qs/serve/modules/tbs/entity/so/TbsBudgetSo.java +++ b/src/main/java/com/qs/serve/modules/tbs/entity/so/TbsBudgetSo.java @@ -34,6 +34,9 @@ public class TbsBudgetSo implements Serializable { /** 预算编码 */ private String budgetNumber; + /** 审批流程状态 */ + private Integer budgetCheckState; + /** 科目编码搜索值 */ private String subjectValue; diff --git a/src/main/java/com/qs/serve/modules/tbs/service/impl/TbsCostApplyServiceImpl.java b/src/main/java/com/qs/serve/modules/tbs/service/impl/TbsCostApplyServiceImpl.java index 2f92253d..61d06637 100644 --- a/src/main/java/com/qs/serve/modules/tbs/service/impl/TbsCostApplyServiceImpl.java +++ b/src/main/java/com/qs/serve/modules/tbs/service/impl/TbsCostApplyServiceImpl.java @@ -697,6 +697,9 @@ public class TbsCostApplyServiceImpl extends ServiceImpl cusCenterRates = new ArrayList<>(); + //关联 data.put("sub", subList); } diff --git a/src/main/java/com/qs/serve/modules/third/service/PortalOfCostApplication.java b/src/main/java/com/qs/serve/modules/third/service/PortalOfCostApplication.java index 35c27740..f17df85d 100644 --- a/src/main/java/com/qs/serve/modules/third/service/PortalOfCostApplication.java +++ b/src/main/java/com/qs/serve/modules/third/service/PortalOfCostApplication.java @@ -577,6 +577,10 @@ public class PortalOfCostApplication { String activityCode = costCode; + if(StringUtils.hasText(activityCode)){ + activityCode = CodeGenUtil.generate(CodeGenUtil.SourceKey.Activity); + } + String activityTitle = createBo.getActivityTitle(); if(!StringUtils.hasText(activityTitle)){ activityTitle = "由核销API生成的活动"; @@ -761,7 +765,7 @@ public class PortalOfCostApplication { //保存核销申请 VtbVerification verification = new VtbVerification(); - verification.setVerificationCode("HX"+ CodeGenUtil.generate(CodeGenUtil.SourceKey.Verification)); + verification.setVerificationCode("MHX"+ CodeGenUtil.generate(CodeGenUtil.SourceKey.Verification)); verification.setCostApplyId(costApply.getId()); verification.setFinishedTime(nowTime); verification.setVerificationState(VtbVerificationState.Finished.getCode()); @@ -812,7 +816,7 @@ public class PortalOfCostApplication { tv.setMoney(totalAmount); //tv.setCreateUser(); tv.setCreateTime(timeString); - tv.setCheckUser(user.getName()); + //tv.setCheckUser(user.getName()); tv.setCheckTime(timeString); tv.setCusCode(supplier.getCode()); tv.setCusName(supplier.getName()); diff --git a/src/main/resources/mapper/bms/BmsChannelPointMapper.xml b/src/main/resources/mapper/bms/BmsChannelPointMapper.xml index 77d8e889..438c74f6 100644 --- a/src/main/resources/mapper/bms/BmsChannelPointMapper.xml +++ b/src/main/resources/mapper/bms/BmsChannelPointMapper.xml @@ -66,11 +66,14 @@ bms_channel_point.`update_by` - select + + select 'CostBill' as target_type, cost.id as target_id, cost.`code` as target_code, cost.charge_theme as title, - cost.submit_time - from tbs_cost_apply cost where cost.charge_state = 4 and cost.user_id = #{query.userId} and cost.del_flag = 0 - UNION - select + cost.submit_time as `time` + from tbs_cost_apply cost where cost.charge_state = 4 and cost.user_id = #{query.userId} and cost.del_flag = 0 + + and cost.charge_theme like concat('%',#{query.title},'%') + + + and cost.code like concat('%',#{query.targetCode},'%') + + + and cost.submit_time >= #{query.startDate} + + + and cost.submit_time <= #{query.endDate} + + + + select 'ReleasePolicy' as target_type, policy.id as target_id, policy.policy_code as target_code, policy.title, - policy.submit_time - from tzc_policy policy where policy.policy_status = 4 and policy.user_id = #{query.userId} and policy.del_flag = 0 - UNION - select + policy.submit_time as `time` + from tzc_policy policy where policy.policy_status = 4 and policy.user_id = #{query.userId} and policy.del_flag = 0 + + and policy.title like concat('%',#{query.title},'%') + + + and policy.policy_code like concat('%',#{query.targetCode},'%') + + + and policy.submit_time >= #{query.startDate} + + + and policy.submit_time <= #{query.endDate} + + + + + select 'CheckCost' as target_type, vtb.id as target_id, vtb.`verification_code` as target_code, act.act_title as title, - vtb.create_time as submit_time - from vtb_verification vtb - left join tbs_activity act on vtb.activity_id = act.id - where vtb.verification_state = 3 and vtb.user_id = #{query.userId} and act.del_flag = 0 and vtb.del_flag = 0 - UNION - select + vtb.create_time as `time` + from vtb_verification vtb + left join tbs_activity act on vtb.activity_id = act.id + where vtb.verification_state = 3 and vtb.user_id = #{query.userId} and act.del_flag = 0 and vtb.del_flag = 0 + + and act.act_title like concat('%',#{query.title},'%') + + + and vtb.`verification_code` like concat('%',#{query.targetCode},'%') + + + and vtb.create_time >= #{query.startDate} + + + and vtb.create_time <= #{query.endDate} + + + + + select 'budgetAdjust' as target_type, budget.id as target_id, budget.budget_number as target_code, budget.budget_code as title, - budget.submit_time - from tbs_budget budget - where budget.budget_check_state = 3 and budget.user_id = #{query.userId} and budget.del_flag = 0 - UNION - select + budget.submit_time as `time` + from tbs_budget budget + where budget.budget_check_state = 3 and budget.user_id = #{query.userId} and budget.del_flag = 0 + + and budget.budget_code like concat('%',#{query.title},'%') + + + and budget.budget_number like concat('%',#{query.targetCode},'%') + + + and budget.submit_time >= #{query.startDate} + + + and budget.submit_time <= #{query.endDate} + + + + + select 'budgetAdjust2' as target_type, budget_change.id as target_id, budget_change.change_code as target_code, budget_change.budget_title as title, - budget_change.submit_time - from tbs_budget_change budget_change - where budget_change.budget_check_state = 3 and budget_change.user_id = #{query.userId} and budget_change.del_flag = 0 + budget_change.submit_time as `time` + from tbs_budget_change budget_change + where budget_change.budget_check_state = 3 and budget_change.user_id = #{query.userId} and budget_change.del_flag = 0 + + and budget_change.budget_title like concat('%',#{query.title},'%') + + + and budget_change.change_code like concat('%',#{query.targetCode},'%') + + + and budget_change.submit_time >= #{query.startDate} + + + and budget_change.submit_time <= #{query.endDate} + + + + + select + 'CostBill' as target_type, + cost.id as target_id, + cost.`code` as target_code, + cost.charge_theme as title, + cost.submit_time as `time` + from tbs_cost_apply cost where cost.charge_state = 4 and cost.user_id = #{query.userId} and cost.del_flag = 0 + + and cost.charge_theme like concat('%',#{query.title},'%') + + + and cost.code like concat('%',#{query.targetCode},'%') + + + and cost.submit_time >= #{query.startDate} + + + and cost.submit_time <= #{query.endDate} + + UNION + select + 'ReleasePolicy' as target_type, + policy.id as target_id, + policy.policy_code as target_code, + policy.title, + policy.submit_time + from tzc_policy policy where policy.policy_status = 4 and policy.user_id = #{query.userId} and policy.del_flag = 0 + + and policy.title like concat('%',#{query.title},'%') + + + and policy.policy_code like concat('%',#{query.targetCode},'%') + + + and policy.submit_time >= #{query.startDate} + + + and policy.submit_time <= #{query.endDate} + + UNION + select + 'CheckCost' as target_type, + vtb.id as target_id, + vtb.`verification_code` as target_code, + act.act_title as title, + vtb.create_time as `time` + from vtb_verification vtb + left join tbs_activity act on vtb.activity_id = act.id + where vtb.verification_state = 3 and vtb.user_id = #{query.userId} and act.del_flag = 0 and vtb.del_flag = 0 + + and act.act_title like concat('%',#{query.title},'%') + + + and vtb.`verification_code` like concat('%',#{query.targetCode},'%') + + + and vtb.create_time >= #{query.startDate} + + + and vtb.create_time <= #{query.endDate} + + UNION + select + 'budgetAdjust' as target_type, + budget.id as target_id, + budget.budget_number as target_code, + budget.budget_code as title, + budget.submit_time as `time` + from tbs_budget budget + where budget.budget_check_state = 3 and budget.user_id = #{query.userId} and budget.del_flag = 0 + + and budget.budget_code like concat('%',#{query.title},'%') + + + and budget.budget_number like concat('%',#{query.targetCode},'%') + + + and budget.submit_time >= #{query.startDate} + + + and budget.submit_time <= #{query.endDate} + + UNION + select + 'budgetAdjust2' as target_type, + budget_change.id as target_id, + budget_change.change_code as target_code, + budget_change.budget_title as title, + budget_change.submit_time as `time` + from tbs_budget_change budget_change + where budget_change.budget_check_state = 3 and budget_change.user_id = #{query.userId} and budget_change.del_flag = 0 + + and budget_change.budget_title like concat('%',#{query.title},'%') + + + and budget_change.change_code like concat('%',#{query.targetCode},'%') + + + and budget_change.submit_time >= #{query.startDate} + + + and budget_change.submit_time <= #{query.endDate} + + limit #{query.startRow},#{query.pageSize} diff --git a/src/main/resources/mapper/tbs/TbsBudgetMapper.xml b/src/main/resources/mapper/tbs/TbsBudgetMapper.xml index 84137fc6..cde26ca5 100644 --- a/src/main/resources/mapper/tbs/TbsBudgetMapper.xml +++ b/src/main/resources/mapper/tbs/TbsBudgetMapper.xml @@ -79,8 +79,9 @@ #{selectId} - and `tbs_budget`.`budget_number` like concat('%',#{query.budgetNumber},'%') + and `tbs_budget`.`budget_number` like concat('%',#{query.budgetNumber},'%') and `tbs_budget`.`budget_state` = #{query.budgetState} + and `tbs_budget`.`budget_check_state` = #{query.budgetCheckState} and `tbs_budget`.`budget_code` like concat('%',#{query.budgetCode},'%') and ( @@ -98,7 +99,7 @@ and `tbs_budget`.`schedule_id` = #{query.scheduleId} and `tbs_budget`.`schedule_code` = #{query.scheduleCode} - and `tbs_budget`.`schedule_name` = #{query.scheduleName} + and `tbs_budget`.`schedule_name` like concat('%',#{query.scheduleName},'%') and ( `tbs_budget_condition`.`target_type` = 'brand' diff --git a/src/main/resources/mapper/tbs/TbsCostApplyMapper.xml b/src/main/resources/mapper/tbs/TbsCostApplyMapper.xml index 90ee5873..4605ac65 100644 --- a/src/main/resources/mapper/tbs/TbsCostApplyMapper.xml +++ b/src/main/resources/mapper/tbs/TbsCostApplyMapper.xml @@ -51,6 +51,7 @@ tbs_cost_apply.`supplier_biz_region_second_name`, tbs_cost_apply.`supplier_biz_region_third_name`, tbs_cost_apply.`charge_state`, + tbs_cost_apply.`check_state`, tbs_cost_apply.`submit_time`, tbs_cost_apply.`pass_time`, tbs_cost_apply.`remark`, @@ -142,6 +143,7 @@ + and `tbs_cost_apply`.`check_state` = #{query.checkState} and `tbs_cost_apply`.`id` = #{query.id} and `tbs_cost_apply`.`code` like concat('%', #{query.code},'%') and `tbs_cost_apply`.`charge_theme` like concat('%', #{query.chargeTheme},'%')