Commit e52fb5bc1775c9d585c0cf9ab7134a54862313b7

Authored by 姜超
1 parent 372542af

feature(*): 修改指标查询VO

修改指标查询VO
fw-morax-dao/src/main/resources/mapper/CombineIndicatorParamDao.xml
... ... @@ -37,6 +37,8 @@
37 37 <result column="apply_types" property="applyTypes" typeHandler="cn.fw.common.data.mybatis.handler.IntegerListTypeHandler"/>
38 38 <result column="data_scope_types" property="dataScopeTypes" typeHandler="cn.fw.common.data.mybatis.handler.IntegerListTypeHandler"/>
39 39 <result column="enable" property="enable"/>
  40 + <result column="business_origin_name" property="businessOriginName"/>
  41 + <result column="business_origin_unit" property="businessOriginUnit"/>
40 42 </resultMap>
41 43  
42 44  
... ... @@ -108,7 +110,9 @@
108 110 t2.role_names,
109 111 t2.enable,
110 112 t2.unit,
111   - t2.report_path
  113 + t2.report_path,
  114 + t2.business_origin_name,
  115 + t2.business_origin_unit
112 116 </if>
113 117 <if test="codeType == 2">
114 118 t2.id,
... ...
fw-morax-domain/src/main/java/cn/fw/morax/domain/vo/MonthlyTargetValueVO.java
... ... @@ -41,5 +41,14 @@ public class MonthlyTargetValueVO {
41 41 */
42 42 private BigDecimal minimumStandardValue;
43 43  
  44 + /**
  45 + * 业务系统计算目标前名称
  46 + */
  47 + private String businessOriginName;
  48 +
  49 + /**
  50 + * 业务系统计算目标前单位
  51 + */
  52 + private String businessOriginUnit;
44 53 }
45 54  
... ...
fw-morax-domain/src/main/java/cn/fw/morax/domain/vo/StageTargetValueVO.java
... ... @@ -41,5 +41,15 @@ public class StageTargetValueVO {
41 41 */
42 42 private BigDecimal minimumStandardValue;
43 43  
  44 + /**
  45 + * 业务系统计算目标前名称
  46 + */
  47 + private String businessOriginName;
  48 +
  49 + /**
  50 + * 业务系统计算目标前单位
  51 + */
  52 + private String businessOriginUnit;
  53 +
44 54 }
45 55  
... ...
fw-morax-domain/src/main/java/cn/fw/morax/domain/vo/eval/CompositeIndicatorVO.java
... ... @@ -143,6 +143,16 @@ public class CompositeIndicatorVO {
143 143 private String businessName;
144 144  
145 145 /**
  146 + * 业务系统计算目标前名称
  147 + */
  148 + private String businessOriginName;
  149 +
  150 + /**
  151 + * 业务系统计算目标前单位
  152 + */
  153 + private String businessOriginUnit;
  154 +
  155 + /**
146 156 * 组合指标
147 157 */
148 158 private List<CompositeIndicatorVO> combines;
... ...
fw-morax-service/src/main/java/cn/fw/morax/service/biz/IndicatorCommonService.java
... ... @@ -2,6 +2,14 @@ package cn.fw.morax.service.biz;
2 2  
3 3 import cn.fw.morax.common.config.DicKeyCofigProperties;
4 4 import cn.fw.morax.common.config.SpecialIndicatorCodeVal;
  5 +import cn.fw.morax.common.utils.PublicUtil;
  6 +import cn.fw.morax.domain.db.kpi.IndicatorUserStageTargetValue;
  7 +import cn.fw.morax.domain.db.kpi.IndicatorUserTargetValue;
  8 +import cn.fw.morax.domain.db.kpi.Indicators;
  9 +import cn.fw.morax.domain.enums.DimensionTypeEnum;
  10 +import cn.fw.morax.domain.enums.EvalScopeEnum;
  11 +import cn.fw.morax.domain.vo.MonthlyTargetValueVO;
  12 +import cn.fw.morax.domain.vo.StageTargetValueVO;
5 13 import cn.fw.morax.rpc.ehr.EhrRpcService;
6 14 import cn.fw.morax.rpc.erp.ErpRpcService;
7 15 import cn.fw.morax.rpc.file.FileRpcService;
... ... @@ -13,11 +21,15 @@ import cn.fw.morax.service.data.eval.EvalIndicatorService;
13 21 import cn.fw.morax.service.data.eval.EvalIndicatorValueService;
14 22 import cn.fw.morax.service.data.kpi.*;
15 23 import cn.fw.morax.service.data.salary.SalaryClosureService;
  24 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  25 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
16 26 import lombok.RequiredArgsConstructor;
17 27 import lombok.extern.slf4j.Slf4j;
18 28 import org.springframework.data.redis.core.StringRedisTemplate;
19 29 import org.springframework.stereotype.Service;
20 30  
  31 +import java.time.LocalDate;
  32 +
21 33 /**
22 34 * @author jiangchao
23 35 * @des: 指标公共服务
... ... @@ -34,6 +46,100 @@ public class IndicatorCommonService {
34 46 private final IndicatorUserTargetValueService indicatorUserTargetValueService;
35 47 private final IndicatorUserStageTargetValueService indicatorUserStageTargetValueService;
36 48  
  49 + public MonthlyTargetValueVO queryStaffIndicatorTarget(Long userId, String indicatorCode, LocalDate dataDate) {
  50 + return this.queryIndicatorTarget(userId, EvalScopeEnum.STAFF, indicatorCode, dataDate);
  51 + }
  52 +
  53 + public MonthlyTargetValueVO queryIndicatorTarget(Long referId, EvalScopeEnum scopeType, String indicatorCode, LocalDate dataDate) {
  54 + if (PublicUtil.isEmpty(referId) || PublicUtil.isEmpty(scopeType) || PublicUtil.isEmpty(indicatorCode) || PublicUtil.isEmpty(dataDate)) {
  55 + log.error("查询门店阶段指标目标信息,参数错误");
  56 + return null;
  57 + }
  58 + //原始指标不为空,用原始指标查目标
  59 + Indicators indicators = indicatorsService.queryByCode(indicatorCode, Boolean.FALSE);
  60 + if (PublicUtil.isNotEmpty(indicators) && PublicUtil.isNotEmpty(indicators.getOriginIndicatorCode())) {
  61 + indicatorCode = indicators.getOriginIndicatorCode();
  62 + indicators = indicatorsService.queryByCode(indicators.getOriginIndicatorCode(), Boolean.FALSE);
  63 + }
  64 + LambdaQueryWrapper<IndicatorUserTargetValue> queryWrapper = Wrappers.<IndicatorUserTargetValue>lambdaQuery();
  65 + if (EvalScopeEnum.STAFF.equals(scopeType)) {
  66 + queryWrapper.eq(IndicatorUserTargetValue::getUserId, referId)
  67 + .eq(IndicatorUserTargetValue::getShopId, -1L)
  68 + .eq(IndicatorUserTargetValue::getDimensionType, DimensionTypeEnum.STAFF);
  69 + } else {
  70 + queryWrapper.eq(IndicatorUserTargetValue::getUserId, -1L)
  71 + .eq(IndicatorUserTargetValue::getShopId, referId)
  72 + .eq(IndicatorUserTargetValue::getDimensionType, DimensionTypeEnum.SHOP);
  73 + }
  74 + IndicatorUserTargetValue indicatorUserTargetValue = indicatorUserTargetValueService.getOne(queryWrapper
  75 + .eq(IndicatorUserTargetValue::getIndicatorCode, indicatorCode)
  76 + .eq(IndicatorUserTargetValue::getDataDate, dataDate)
  77 + .eq(IndicatorUserTargetValue::getYn, Boolean.TRUE)
  78 + , Boolean.FALSE);
  79 + if (PublicUtil.isEmpty(indicatorUserTargetValue)) {
  80 + return new MonthlyTargetValueVO();
  81 + }
  82 + MonthlyTargetValueVO monthlyTargetValueVO = PublicUtil.copy(indicatorUserTargetValue, MonthlyTargetValueVO.class);
  83 + this.setOriginInfo(monthlyTargetValueVO, indicators);
  84 + return monthlyTargetValueVO;
  85 + }
  86 +
  87 + public void setOriginInfo(MonthlyTargetValueVO monthlyTargetValueVO, Indicators indicators) {
  88 + if (PublicUtil.isNotEmpty(indicators)) {
  89 + if (PublicUtil.isNotEmpty(indicators.getBusinessOriginName())) {
  90 + monthlyTargetValueVO.setBusinessOriginName(indicators.getBusinessOriginName());
  91 + }
  92 + if (PublicUtil.isNotEmpty(indicators.getBusinessOriginUnit())) {
  93 + monthlyTargetValueVO.setBusinessOriginUnit(indicators.getBusinessOriginUnit());
  94 + }
  95 + }
  96 + }
  97 +
  98 + public StageTargetValueVO queryIndicatorStageTarget(Long referId, EvalScopeEnum scopeType, String indicatorCode, LocalDate startDate, LocalDate endDate) {
  99 + if (PublicUtil.isEmpty(referId) || PublicUtil.isEmpty(scopeType) || PublicUtil.isEmpty(indicatorCode) || PublicUtil.isEmpty(startDate) || PublicUtil.isEmpty(endDate)) {
  100 + log.error("查询门店阶段指标目标信息,参数错误");
  101 + return null;
  102 + }
  103 + //原始指标不为空,用原始指标查目标
  104 + Indicators indicators = indicatorsService.queryByCode(indicatorCode, Boolean.FALSE);
  105 + if (PublicUtil.isNotEmpty(indicators) && PublicUtil.isNotEmpty(indicators.getOriginIndicatorCode())) {
  106 + indicatorCode = indicators.getOriginIndicatorCode();
  107 + indicators = indicatorsService.queryByCode(indicators.getOriginIndicatorCode(), Boolean.FALSE);
  108 + }
  109 +
  110 + LambdaQueryWrapper<IndicatorUserStageTargetValue> queryWrapper = Wrappers.<IndicatorUserStageTargetValue>lambdaQuery();
  111 + if (EvalScopeEnum.STAFF.equals(scopeType)) {
  112 + queryWrapper.eq(IndicatorUserStageTargetValue::getUserId, referId)
  113 + .eq(IndicatorUserStageTargetValue::getShopId, -1L)
  114 + .eq(IndicatorUserStageTargetValue::getDimensionType, DimensionTypeEnum.STAFF);
  115 + } else {
  116 + queryWrapper.eq(IndicatorUserStageTargetValue::getUserId, -1L)
  117 + .eq(IndicatorUserStageTargetValue::getShopId, referId)
  118 + .eq(IndicatorUserStageTargetValue::getDimensionType, DimensionTypeEnum.SHOP);
  119 + }
  120 + IndicatorUserStageTargetValue stageTargetValue = indicatorUserStageTargetValueService.getOne(queryWrapper
  121 + .eq(IndicatorUserStageTargetValue::getIndicatorCode, indicatorCode)
  122 + .eq(IndicatorUserStageTargetValue::getBeginDate, startDate)
  123 + .eq(IndicatorUserStageTargetValue::getEndDate, endDate)
  124 + .eq(IndicatorUserStageTargetValue::getYn, Boolean.TRUE)
  125 + , Boolean.FALSE);
  126 + if (PublicUtil.isEmpty(stageTargetValue)) {
  127 + return null;
  128 + }
  129 + StageTargetValueVO stageTargetValueVO = PublicUtil.copy(stageTargetValue, StageTargetValueVO.class);
  130 + this.setStageOriginInfo(stageTargetValueVO, indicators);
  131 + return stageTargetValueVO;
  132 + }
37 133  
  134 + public void setStageOriginInfo(StageTargetValueVO stageTargetValueVO, Indicators indicators) {
  135 + if (PublicUtil.isNotEmpty(indicators)) {
  136 + if (PublicUtil.isNotEmpty(indicators.getBusinessOriginName())) {
  137 + stageTargetValueVO.setBusinessOriginName(indicators.getBusinessOriginName());
  138 + }
  139 + if (PublicUtil.isNotEmpty(indicators.getBusinessOriginUnit())) {
  140 + stageTargetValueVO.setBusinessOriginUnit(indicators.getBusinessOriginUnit());
  141 + }
  142 + }
  143 + }
38 144  
39 145 }
... ...
fw-morax-service/src/main/java/cn/fw/morax/service/biz/eval/EvalGroupPoolService.java
... ... @@ -22,6 +22,7 @@ import cn.fw.morax.domain.vo.kpi.KpiIndicatorRankStaffVO;
22 22 import cn.fw.morax.domain.vo.kpi.KpiIndicatorRankVO;
23 23 import cn.fw.morax.rpc.ehr.dto.StaffBaseInfoDTO;
24 24 import cn.fw.morax.service.biz.CommonService;
  25 +import cn.fw.morax.service.biz.IndicatorCommonService;
25 26 import cn.fw.morax.service.data.eval.*;
26 27 import cn.fw.morax.service.data.kpi.IndicatorUserStageTargetValueService;
27 28 import cn.fw.morax.service.data.kpi.IndicatorUserTargetValueService;
... ... @@ -66,7 +67,6 @@ public class EvalGroupPoolService {
66 67 private final EvalGroupRewardTargetHitLogService evalGroupRewardTargetHitLogService;
67 68 private final EvalGroupRewardPreconditionService evalGroupRewardPreconditionService;
68 69 private final EvalGroupIndicatorLaddersService evalGroupIndicatorLaddersService;
69   - private final IndicatorUserTargetValueService indicatorUserTargetValueService;
70 70 private final EvalGroupIndicatorHitLogService evalGroupIndicatorHitLogService;
71 71 private final EvalPoolIndicatorDetailService evalPoolIndicatorDetailService;
72 72 private final EvalGroupIndicatorParamService evalGroupIndicatorParamService;
... ... @@ -78,6 +78,7 @@ public class EvalGroupPoolService {
78 78 private final EvalGroupRewardHitLogService evalGroupRewardHitLogService;
79 79 private final IndicatorUserValueService indicatorUserValueService;
80 80 private final EvalIndicatorValueService evalIndicatorValueService;
  81 + private final IndicatorCommonService indicatorCommonService;
81 82 private final EvalGroupUserService evalGroupUserService;
82 83 private final EvalRewardPointService evalRewardPointService;
83 84 private final EvalGroupRewardDimService evalGroupRewardDimService;
... ... @@ -686,21 +687,21 @@ public class EvalGroupPoolService {
686 687 indicatorDetailVO.setMultiStage(evalGroupRank.getMultiStage());
687 688 if (Boolean.TRUE.equals(evalGroupRank.getMultiStage())) {
688 689 for (EvalGroupIndicatorParamVO paramVO : indicatorDetailVO.getLadderParams()) {
689   - StageTargetValueVO stageTargetValueVO = indicatorUserStageTargetValueService.queryIndicatorTarget(referId, scopeType,
  690 + StageTargetValueVO stageTargetValueVO = indicatorCommonService.queryIndicatorStageTarget(referId, scopeType,
690 691 paramVO.getCode(), evalGroupRankStage.getBeginTime(), evalGroupRankStage.getOverTime());
691 692 paramVO.setBusinessStageTargetVo(stageTargetValueVO);
692 693 }
693 694 for (EvalGroupIndicatorParamVO paramVO : indicatorDetailVO.getCommissionParams()) {
694   - StageTargetValueVO stageTargetValueVO = indicatorUserStageTargetValueService.queryIndicatorTarget(referId, scopeType,
  695 + StageTargetValueVO stageTargetValueVO = indicatorCommonService.queryIndicatorStageTarget(referId, scopeType,
695 696 paramVO.getCode(), evalGroupRankStage.getBeginTime(), evalGroupRankStage.getOverTime());
696 697 paramVO.setBusinessStageTargetVo(stageTargetValueVO);
697 698 }
698 699 } else {
699 700 for (EvalGroupIndicatorParamVO paramVO : indicatorDetailVO.getLadderParams()) {
700   - paramVO.setBusinessTargetVo(indicatorUserTargetValueService.queryIndicatorTarget(referId, scopeType, paramVO.getCode(), dataDate));
  701 + paramVO.setBusinessTargetVo(indicatorCommonService.queryIndicatorTarget(referId, scopeType, paramVO.getCode(), dataDate));
701 702 }
702 703 for (EvalGroupIndicatorParamVO paramVO : indicatorDetailVO.getCommissionParams()) {
703   - paramVO.setBusinessTargetVo(indicatorUserTargetValueService.queryIndicatorTarget(referId, scopeType, paramVO.getCode(), dataDate));
  704 + paramVO.setBusinessTargetVo(indicatorCommonService.queryIndicatorTarget(referId, scopeType, paramVO.getCode(), dataDate));
704 705 }
705 706 }
706 707 }
... ... @@ -991,35 +992,35 @@ public class EvalGroupPoolService {
991 992 EvalGroupRank evalGroupRank = evalGroupRankService.getById(evalGroupRankStage.getEvalGroupRankId());
992 993 if (Boolean.TRUE.equals(evalGroupRank.getMultiStage())) {
993 994 for (EvalGroupRewardParamVO paramVO : reward.getLadderParams()) {
994   - StageTargetValueVO stageTargetValueVO = indicatorUserStageTargetValueService.queryIndicatorTarget(referId, scopeType,
  995 + StageTargetValueVO stageTargetValueVO = indicatorCommonService.queryIndicatorStageTarget(referId, scopeType,
995 996 paramVO.getCode(), evalGroupRankStage.getBeginTime(), evalGroupRankStage.getOverTime());
996 997 paramVO.setBusinessStageTargetVo(stageTargetValueVO);
997 998 }
998 999 for (EvalGroupRewardParamVO paramVO : reward.getCommissionParams()) {
999   - StageTargetValueVO stageTargetValueVO = indicatorUserStageTargetValueService.queryIndicatorTarget(referId, scopeType,
  1000 + StageTargetValueVO stageTargetValueVO = indicatorCommonService.queryIndicatorStageTarget(referId, scopeType,
1000 1001 paramVO.getCode(), evalGroupRankStage.getBeginTime(), evalGroupRankStage.getOverTime());
1001 1002 paramVO.setBusinessStageTargetVo(stageTargetValueVO);
1002 1003 }
1003 1004 for (EvalGroupRewardParamVO paramVO : reward.getExemptionPunishCondParams()) {
1004   - StageTargetValueVO stageTargetValueVO = indicatorUserStageTargetValueService.queryIndicatorTarget(referId, scopeType,
  1005 + StageTargetValueVO stageTargetValueVO = indicatorCommonService.queryIndicatorStageTarget(referId, scopeType,
1005 1006 paramVO.getCode(), evalGroupRankStage.getBeginTime(), evalGroupRankStage.getOverTime());
1006 1007 paramVO.setBusinessStageTargetVo(stageTargetValueVO);
1007 1008 }
1008 1009 for (EvalGroupRewardPreconditionVO preconditionVO : reward.getConds()) {
1009   - preconditionVO.setBusinessTargetVo(indicatorUserTargetValueService.queryIndicatorTarget(referId, scopeType, preconditionVO.getCode(), dataDate));
  1010 + preconditionVO.setBusinessTargetVo(indicatorCommonService.queryIndicatorTarget(referId, scopeType, preconditionVO.getCode(), dataDate));
1010 1011 }
1011 1012 } else {
1012 1013 for (EvalGroupRewardParamVO paramVO : reward.getLadderParams()) {
1013   - paramVO.setBusinessTargetVo(indicatorUserTargetValueService.queryIndicatorTarget(referId, scopeType, paramVO.getCode(), dataDate));
  1014 + paramVO.setBusinessTargetVo(indicatorCommonService.queryIndicatorTarget(referId, scopeType, paramVO.getCode(), dataDate));
1014 1015 }
1015 1016 for (EvalGroupRewardParamVO paramVO : reward.getCommissionParams()) {
1016   - paramVO.setBusinessTargetVo(indicatorUserTargetValueService.queryIndicatorTarget(referId, scopeType, paramVO.getCode(), dataDate));
  1017 + paramVO.setBusinessTargetVo(indicatorCommonService.queryIndicatorTarget(referId, scopeType, paramVO.getCode(), dataDate));
1017 1018 }
1018 1019 for (EvalGroupRewardParamVO paramVO : reward.getExemptionPunishCondParams()) {
1019   - paramVO.setBusinessTargetVo(indicatorUserTargetValueService.queryIndicatorTarget(referId, scopeType, paramVO.getCode(), dataDate));
  1020 + paramVO.setBusinessTargetVo(indicatorCommonService.queryIndicatorTarget(referId, scopeType, paramVO.getCode(), dataDate));
1020 1021 }
1021 1022 for (EvalGroupRewardPreconditionVO preconditionVO : reward.getConds()) {
1022   - preconditionVO.setBusinessTargetVo(indicatorUserTargetValueService.queryIndicatorTarget(referId, scopeType, preconditionVO.getCode(), dataDate));
  1023 + preconditionVO.setBusinessTargetVo(indicatorCommonService.queryIndicatorTarget(referId, scopeType, preconditionVO.getCode(), dataDate));
1023 1024 }
1024 1025 }
1025 1026 }
... ...
fw-morax-service/src/main/java/cn/fw/morax/service/biz/eval/EvalIndicatorBizService.java
... ... @@ -603,6 +603,12 @@ public class EvalIndicatorBizService {
603 603 if (PublicUtil.isNotEmpty(indicators.getUnit())) {
604 604 compositeIndicator.setUnit(indicators.getUnit());
605 605 }
  606 + if (PublicUtil.isNotEmpty(indicators.getBusinessOriginUnit())) {
  607 + compositeIndicator.setBusinessOriginUnit(indicators.getBusinessOriginUnit());
  608 + }
  609 + if (PublicUtil.isNotEmpty(indicators.getBusinessOriginName())) {
  610 + compositeIndicator.setBusinessOriginName(indicators.getBusinessOriginName());
  611 + }
606 612 // if (PublicUtil.isNotEmpty(indicators.getOriginDataType())) {
607 613 // compositeIndicator.setOriginDataType(indicators.getOriginDataType());
608 614 // }
... ...
fw-morax-service/src/main/java/cn/fw/morax/service/biz/kpi/KpiGroupIndicatorBizService.java
... ... @@ -10,6 +10,7 @@ import cn.fw.morax.domain.enums.*;
10 10 import cn.fw.morax.domain.vo.MonthlyTargetValueVO;
11 11 import cn.fw.morax.domain.vo.kpi.*;
12 12 import cn.fw.morax.service.biz.CommonService;
  13 +import cn.fw.morax.service.biz.IndicatorCommonService;
13 14 import cn.fw.morax.service.data.eval.EvalIndicatorService;
14 15 import cn.fw.morax.service.data.kpi.*;
15 16 import com.alibaba.fastjson.JSON;
... ... @@ -39,6 +40,7 @@ public class KpiGroupIndicatorBizService {
39 40 private final KpiGroupIndicatorHitLogService kpiGroupIndicatorHitLogService;
40 41 private final KpiGroupIndicatorParamService kpiGroupIndicatorParamService;
41 42 private final KpiGroupIndicatorPreconditionService kpiGroupIndicatorPreconditionService;
  43 + private final IndicatorCommonService indicatorCommonService;
42 44 private final KpiGroupIndicatorTargetHitLogService kpiGroupIndicatorTargetHitLogService;
43 45 private final KpiGroupIndicatorPreconditionLaddersService kpiGroupIndicatorPreconditionLaddersService;
44 46 private final KpiPoolIndicatorValueService kpiPoolIndicatorValueService;
... ... @@ -199,7 +201,7 @@ public class KpiGroupIndicatorBizService {
199 201 List<KpiGroupIndicatorPreconditionVO> preconditionVOS = kpiGroupIndicatorPreconditionService.getHitVos(kpiGroupIndicatorId, userId, dataDate);
200 202 detailVO.setConds(preconditionVOS);
201 203 for (KpiGroupIndicatorPreconditionVO preconditionVO : preconditionVOS) {
202   - preconditionVO.setBusinessTargetVo(indicatorUserTargetValueService.queryStaffIndicatorTarget(userId, preconditionVO.getIndicatorCode(), dataDate));
  204 + preconditionVO.setBusinessTargetVo(indicatorCommonService.queryStaffIndicatorTarget(userId, preconditionVO.getIndicatorCode(), dataDate));
203 205 //条件目标记录
204 206 if (! TargetTypeEnum.NO.equals(preconditionVO.getTargetType())) {
205 207 KpiGroupIndicatorTargetHitLog kpiGroupIndicatorTargetHitLog = kpiGroupIndicatorTargetHitLogService.getOne(Wrappers.<KpiGroupIndicatorTargetHitLog>lambdaQuery()
... ... @@ -268,7 +270,7 @@ public class KpiGroupIndicatorBizService {
268 270 .collect(Collectors.toMap(KpiGroupIndicatorTargetHitLog::getReferId, Function.identity(), (v1, v2) -> v1));
269 271 for (KpiGroupIndicatorParamVO paramVO : paramVos) {
270 272  
271   - paramVO.setBusinessTargetVo(indicatorUserTargetValueService.queryStaffIndicatorTarget(userId, paramVO.getIndicatorCode(), localDate));
  273 + paramVO.setBusinessTargetVo(indicatorCommonService.queryStaffIndicatorTarget(userId, paramVO.getIndicatorCode(), localDate));
272 274  
273 275 if (paramTargetHitLogMap.containsKey(paramVO.getId())) {
274 276 KpiGroupIndicatorTargetHitLog targetHitLog = paramTargetHitLogMap.get(paramVO.getId());
... ...
fw-morax-service/src/main/java/cn/fw/morax/service/biz/salary/SalaryPoolBizService.java
1 1 package cn.fw.morax.service.biz.salary;
2 2  
3 3 import cn.fw.common.data.mybatis.pagination.PageData;
4   -import cn.fw.common.exception.BusinessException;
5 4 import cn.fw.common.page.AppPage;
6 5 import cn.fw.common.web.auth.LoginAuthBean;
7 6 import cn.fw.morax.common.constant.Constant;
... ... @@ -20,13 +19,12 @@ import cn.fw.morax.domain.dto.salary.SalaryGroupRankConfigQueryDTO;
20 19 import cn.fw.morax.domain.dto.salary.SalaryLeaveConfigDetailsUseDTO;
21 20 import cn.fw.morax.domain.enums.*;
22 21 import cn.fw.morax.domain.vo.SalarySelectorVO;
23   -import cn.fw.morax.domain.vo.SelectorVO;
24 22 import cn.fw.morax.domain.vo.salary.*;
25 23 import cn.fw.morax.rpc.erp.ErpRpcService;
26 24 import cn.fw.morax.service.biz.CommonService;
  25 +import cn.fw.morax.service.biz.IndicatorCommonService;
27 26 import cn.fw.morax.service.biz.kpi.KpiPoolCommonService;
28 27 import cn.fw.morax.service.data.CalSnapshotsLogService;
29   -import cn.fw.morax.service.data.kpi.IndicatorUserTargetValueService;
30 28 import cn.fw.morax.service.data.kpi.IndicatorUserValueService;
31 29 import cn.fw.morax.service.data.kpi.KpiPoolService;
32 30 import cn.fw.morax.service.data.salary.*;
... ... @@ -37,7 +35,6 @@ import com.google.common.collect.Lists;
37 35 import lombok.Getter;
38 36 import lombok.RequiredArgsConstructor;
39 37 import lombok.extern.slf4j.Slf4j;
40   -import org.apache.commons.lang3.math.NumberUtils;
41 38 import org.springframework.beans.factory.annotation.Value;
42 39 import org.springframework.cache.annotation.Cacheable;
43 40 import org.springframework.stereotype.Service;
... ... @@ -55,7 +52,6 @@ import java.util.function.Function;
55 52 import java.util.stream.Collectors;
56 53  
57 54 import static cn.fw.common.businessvalidator.Validator.BV;
58   -import static cn.fw.common.web.util.ResultBuilder.success;
59 55  
60 56 /**
61 57 * @author : kurisu
... ... @@ -72,7 +68,6 @@ public class SalaryPoolBizService {
72 68 private final SalaryGroupProjectTargetHitLogService salaryGroupProjectTargetHitLogService;
73 69 private final SalaryGroupProjectSettinService salaryGroupProjectSettinService;
74 70 private final SalaryGroupProjectHitLogService salaryGroupProjectHitLogService;
75   - private final IndicatorUserTargetValueService indicatorUserTargetValueService;
76 71 private final SalaryGroupProjectParamService salaryGroupProjectParamService;
77 72 private final SalaryGeneralSettinService salaryGeneralSettinService;
78 73 private final SalaryGroupProjectService salaryGroupProjectService;
... ... @@ -81,6 +76,7 @@ public class SalaryPoolBizService {
81 76 private final SalarySpecialPoolService salarySpecialPoolService;
82 77 private final SalaryPoolDetailService salaryPoolDetailService;
83 78 private final SalaryPoolCommonService salaryPoolCommonService;
  79 + private final IndicatorCommonService indicatorCommonService;
84 80 private final CalSnapshotsLogService calSnapshotsLogService;
85 81 private final SalaryGroupUserService salaryGroupUserService;
86 82 private final KpiPoolCommonService kpiPoolCommonService;
... ... @@ -1208,7 +1204,7 @@ public class SalaryPoolBizService {
1208 1204  
1209 1205 List<String> baseWageIndicatorCodes = new ArrayList<String>(){{add(getWorkAgeCode());add(getBaseSalaryCode());}};
1210 1206 for (SalaryGroupProjectParamVO paramVO : params) {
1211   - paramVO.setBusinessTargetVo(indicatorUserTargetValueService.queryStaffIndicatorTarget(userId, paramVO.getIndicatorCode(), localDate));
  1207 + paramVO.setBusinessTargetVo(indicatorCommonService.queryStaffIndicatorTarget(userId, paramVO.getIndicatorCode(), localDate));
1212 1208  
1213 1209 paramVO.setBaseWage(baseWageIndicatorCodes.contains(paramVO.getIndicatorCode()));
1214 1210 //有目标
... ... @@ -1303,7 +1299,7 @@ public class SalaryPoolBizService {
1303 1299 }
1304 1300  
1305 1301 for (SalaryGroupProjectPreconditionVO preconditionVO : preconditionVos) {
1306   - preconditionVO.setBusinessTargetVo(indicatorUserTargetValueService.queryStaffIndicatorTarget(userId, preconditionVO.getIndicatorCode(), localDate));
  1302 + preconditionVO.setBusinessTargetVo(indicatorCommonService.queryStaffIndicatorTarget(userId, preconditionVO.getIndicatorCode(), localDate));
1307 1303 preconditionVO.setHit(Boolean.FALSE);
1308 1304 //有目标
1309 1305 if (condTargetHitLogMap.containsKey(preconditionVO.getId())) {
... ...
fw-morax-service/src/main/java/cn/fw/morax/service/data/kpi/IndicatorUserStageTargetValueService.java
... ... @@ -27,19 +27,19 @@ import java.util.Set;
27 27 */
28 28 public interface IndicatorUserStageTargetValueService extends ILocalService<IndicatorUserStageTargetValue> {
29 29  
30   - /**
31   - * 查询员工指标目标
32   - */
33   - StageTargetValueVO queryStaffIndicatorTarget(Long userId, String indicatorCode, LocalDate startDate, LocalDate endDate);
34   -
35   - /**
36   - * 查询门店指标目标
37   - */
38   - StageTargetValueVO queryShopIndicatorTarget(Long userId, String indicatorCode, LocalDate startDate, LocalDate endDate);
  30 +// /**
  31 +// * 查询员工指标目标
  32 +// */
  33 +// StageTargetValueVO queryStaffIndicatorTarget(Long userId, String indicatorCode, LocalDate startDate, LocalDate endDate);
  34 +//
  35 +// /**
  36 +// * 查询门店指标目标
  37 +// */
  38 +// StageTargetValueVO queryShopIndicatorTarget(Long userId, String indicatorCode, LocalDate startDate, LocalDate endDate);
39 39  
40 40 /**
41 41 * 查询指标目标
42 42 */
43   - StageTargetValueVO queryIndicatorTarget(Long referId, EvalScopeEnum scopeType, String indicatorCode, LocalDate startDate, LocalDate endDate);
  43 +// StageTargetValueVO queryIndicatorTarget(Long referId, EvalScopeEnum scopeType, String indicatorCode, LocalDate startDate, LocalDate endDate);
44 44  
45 45 }
... ...
fw-morax-service/src/main/java/cn/fw/morax/service/data/kpi/IndicatorUserTargetValueService.java
... ... @@ -19,19 +19,19 @@ import java.time.LocalDate;
19 19 */
20 20 public interface IndicatorUserTargetValueService extends ILocalService<IndicatorUserTargetValue> {
21 21  
22   - /**
23   - * 查询员工指标目标
24   - */
25   - MonthlyTargetValueVO queryStaffIndicatorTarget(Long userId, String indicatorCode, LocalDate dataDate);
26   -
27   - /**
28   - * 查询门店指标目标
29   - */
30   - MonthlyTargetValueVO queryShopIndicatorTarget(Long shopId, String indicatorCode, LocalDate dataDate);
31   -
32   - /**
33   - * 查询门店指标目标
34   - */
35   - MonthlyTargetValueVO queryIndicatorTarget(Long referId, EvalScopeEnum scopeType, String indicatorCode, LocalDate dataDate);
  22 +// /**
  23 +// * 查询员工指标目标
  24 +// */
  25 +// MonthlyTargetValueVO queryStaffIndicatorTarget(Long userId, String indicatorCode, LocalDate dataDate);
  26 +//
  27 +// /**
  28 +// * 查询门店指标目标
  29 +// */
  30 +// MonthlyTargetValueVO queryShopIndicatorTarget(Long shopId, String indicatorCode, LocalDate dataDate);
  31 +//
  32 +// /**
  33 +// * 查询门店指标目标
  34 +// */
  35 +// MonthlyTargetValueVO queryIndicatorTarget(Long referId, EvalScopeEnum scopeType, String indicatorCode, LocalDate dataDate);
36 36  
37 37 }
... ...
fw-morax-service/src/main/java/cn/fw/morax/service/data/kpi/impl/IndicatorUserStageTargetValueServiceImpl.java
... ... @@ -43,76 +43,76 @@ import java.util.Set;
43 43 public class IndicatorUserStageTargetValueServiceImpl extends ServiceImpl<IndicatorUserStageTargetValueDao, IndicatorUserStageTargetValue>
44 44 implements IndicatorUserStageTargetValueService {
45 45  
46   - @Override
47   - public StageTargetValueVO queryStaffIndicatorTarget(Long userId, String indicatorCode, LocalDate startDate, LocalDate endDate) {
48   - if (PublicUtil.isEmpty(userId) || PublicUtil.isEmpty(indicatorCode) || PublicUtil.isEmpty(startDate) || PublicUtil.isEmpty(endDate)) {
49   - log.error("查询人员阶段指标目标信息,参数错误");
50   - return null;
51   - }
52   - IndicatorUserStageTargetValue stageTargetValue = this.getOne(Wrappers.<IndicatorUserStageTargetValue>lambdaQuery()
53   - .eq(IndicatorUserStageTargetValue::getUserId, userId)
54   - .eq(IndicatorUserStageTargetValue::getShopId, -1L)
55   - .eq(IndicatorUserStageTargetValue::getDimensionType, DimensionTypeEnum.STAFF)
56   - .eq(IndicatorUserStageTargetValue::getIndicatorCode, indicatorCode)
57   - .eq(IndicatorUserStageTargetValue::getBeginDate, startDate)
58   - .eq(IndicatorUserStageTargetValue::getEndDate, endDate)
59   - .eq(IndicatorUserStageTargetValue::getYn, Boolean.TRUE)
60   - , Boolean.FALSE);
61   - if (PublicUtil.isEmpty(stageTargetValue)) {
62   - return null;
63   - }
64   - StageTargetValueVO stageTargetValueVO = PublicUtil.copy(stageTargetValue, StageTargetValueVO.class);
65   - return stageTargetValueVO;
66   - }
  46 +// @Override
  47 +// public StageTargetValueVO queryStaffIndicatorTarget(Long userId, String indicatorCode, LocalDate startDate, LocalDate endDate) {
  48 +// if (PublicUtil.isEmpty(userId) || PublicUtil.isEmpty(indicatorCode) || PublicUtil.isEmpty(startDate) || PublicUtil.isEmpty(endDate)) {
  49 +// log.error("查询人员阶段指标目标信息,参数错误");
  50 +// return null;
  51 +// }
  52 +// IndicatorUserStageTargetValue stageTargetValue = this.getOne(Wrappers.<IndicatorUserStageTargetValue>lambdaQuery()
  53 +// .eq(IndicatorUserStageTargetValue::getUserId, userId)
  54 +// .eq(IndicatorUserStageTargetValue::getShopId, -1L)
  55 +// .eq(IndicatorUserStageTargetValue::getDimensionType, DimensionTypeEnum.STAFF)
  56 +// .eq(IndicatorUserStageTargetValue::getIndicatorCode, indicatorCode)
  57 +// .eq(IndicatorUserStageTargetValue::getBeginDate, startDate)
  58 +// .eq(IndicatorUserStageTargetValue::getEndDate, endDate)
  59 +// .eq(IndicatorUserStageTargetValue::getYn, Boolean.TRUE)
  60 +// , Boolean.FALSE);
  61 +// if (PublicUtil.isEmpty(stageTargetValue)) {
  62 +// return null;
  63 +// }
  64 +// StageTargetValueVO stageTargetValueVO = PublicUtil.copy(stageTargetValue, StageTargetValueVO.class);
  65 +// return stageTargetValueVO;
  66 +// }
  67 +//
  68 +// @Override
  69 +// public StageTargetValueVO queryShopIndicatorTarget(Long shopId, String indicatorCode, LocalDate startDate, LocalDate endDate) {
  70 +// if (PublicUtil.isEmpty(shopId) || PublicUtil.isEmpty(indicatorCode) || PublicUtil.isEmpty(startDate) || PublicUtil.isEmpty(endDate)) {
  71 +// log.error("查询门店阶段指标目标信息,参数错误");
  72 +// return null;
  73 +// }
  74 +// IndicatorUserStageTargetValue stageTargetValue = this.getOne(Wrappers.<IndicatorUserStageTargetValue>lambdaQuery()
  75 +// .eq(IndicatorUserStageTargetValue::getUserId, -1L)
  76 +// .eq(IndicatorUserStageTargetValue::getShopId, shopId)
  77 +// .eq(IndicatorUserStageTargetValue::getDimensionType, DimensionTypeEnum.SHOP)
  78 +// .eq(IndicatorUserStageTargetValue::getIndicatorCode, indicatorCode)
  79 +// .eq(IndicatorUserStageTargetValue::getBeginDate, startDate)
  80 +// .eq(IndicatorUserStageTargetValue::getEndDate, endDate)
  81 +// .eq(IndicatorUserStageTargetValue::getYn, Boolean.TRUE)
  82 +// , Boolean.FALSE);
  83 +// if (PublicUtil.isEmpty(stageTargetValue)) {
  84 +// return null;
  85 +// }
  86 +// StageTargetValueVO stageTargetValueVO = PublicUtil.copy(stageTargetValue, StageTargetValueVO.class);
  87 +// return stageTargetValueVO;
  88 +// }
67 89  
68   - @Override
69   - public StageTargetValueVO queryShopIndicatorTarget(Long shopId, String indicatorCode, LocalDate startDate, LocalDate endDate) {
70   - if (PublicUtil.isEmpty(shopId) || PublicUtil.isEmpty(indicatorCode) || PublicUtil.isEmpty(startDate) || PublicUtil.isEmpty(endDate)) {
71   - log.error("查询门店阶段指标目标信息,参数错误");
72   - return null;
73   - }
74   - IndicatorUserStageTargetValue stageTargetValue = this.getOne(Wrappers.<IndicatorUserStageTargetValue>lambdaQuery()
75   - .eq(IndicatorUserStageTargetValue::getUserId, -1L)
76   - .eq(IndicatorUserStageTargetValue::getShopId, shopId)
77   - .eq(IndicatorUserStageTargetValue::getDimensionType, DimensionTypeEnum.SHOP)
78   - .eq(IndicatorUserStageTargetValue::getIndicatorCode, indicatorCode)
79   - .eq(IndicatorUserStageTargetValue::getBeginDate, startDate)
80   - .eq(IndicatorUserStageTargetValue::getEndDate, endDate)
81   - .eq(IndicatorUserStageTargetValue::getYn, Boolean.TRUE)
82   - , Boolean.FALSE);
83   - if (PublicUtil.isEmpty(stageTargetValue)) {
84   - return null;
85   - }
86   - StageTargetValueVO stageTargetValueVO = PublicUtil.copy(stageTargetValue, StageTargetValueVO.class);
87   - return stageTargetValueVO;
88   - }
89   -
90   - @Override
91   - public StageTargetValueVO queryIndicatorTarget(Long referId, EvalScopeEnum scopeType, String indicatorCode, LocalDate startDate, LocalDate endDate) {
92   - if (PublicUtil.isEmpty(referId) || PublicUtil.isEmpty(scopeType) || PublicUtil.isEmpty(indicatorCode) || PublicUtil.isEmpty(startDate) || PublicUtil.isEmpty(endDate)) {
93   - log.error("查询门店阶段指标目标信息,参数错误");
94   - return null;
95   - }
96   - LambdaQueryWrapper<IndicatorUserStageTargetValue> queryWrapper = Wrappers.<IndicatorUserStageTargetValue>lambdaQuery();
97   - if (EvalScopeEnum.STAFF.equals(scopeType)) {
98   - queryWrapper.eq(IndicatorUserStageTargetValue::getUserId, referId)
99   - .eq(IndicatorUserStageTargetValue::getShopId, -1L)
100   - .eq(IndicatorUserStageTargetValue::getDimensionType, DimensionTypeEnum.STAFF);
101   - } else {
102   - queryWrapper.eq(IndicatorUserStageTargetValue::getUserId, -1L)
103   - .eq(IndicatorUserStageTargetValue::getShopId, referId)
104   - .eq(IndicatorUserStageTargetValue::getDimensionType, DimensionTypeEnum.SHOP);
105   - }
106   - IndicatorUserStageTargetValue stageTargetValue = this.getOne(queryWrapper
107   - .eq(IndicatorUserStageTargetValue::getIndicatorCode, indicatorCode)
108   - .eq(IndicatorUserStageTargetValue::getBeginDate, startDate)
109   - .eq(IndicatorUserStageTargetValue::getEndDate, endDate)
110   - .eq(IndicatorUserStageTargetValue::getYn, Boolean.TRUE)
111   - , Boolean.FALSE);
112   - if (PublicUtil.isEmpty(stageTargetValue)) {
113   - return null;
114   - }
115   - StageTargetValueVO stageTargetValueVO = PublicUtil.copy(stageTargetValue, StageTargetValueVO.class);
116   - return stageTargetValueVO;
117   - }
  90 +// @Override
  91 +// public StageTargetValueVO queryIndicatorTarget(Long referId, EvalScopeEnum scopeType, String indicatorCode, LocalDate startDate, LocalDate endDate) {
  92 +// if (PublicUtil.isEmpty(referId) || PublicUtil.isEmpty(scopeType) || PublicUtil.isEmpty(indicatorCode) || PublicUtil.isEmpty(startDate) || PublicUtil.isEmpty(endDate)) {
  93 +// log.error("查询门店阶段指标目标信息,参数错误");
  94 +// return null;
  95 +// }
  96 +// LambdaQueryWrapper<IndicatorUserStageTargetValue> queryWrapper = Wrappers.<IndicatorUserStageTargetValue>lambdaQuery();
  97 +// if (EvalScopeEnum.STAFF.equals(scopeType)) {
  98 +// queryWrapper.eq(IndicatorUserStageTargetValue::getUserId, referId)
  99 +// .eq(IndicatorUserStageTargetValue::getShopId, -1L)
  100 +// .eq(IndicatorUserStageTargetValue::getDimensionType, DimensionTypeEnum.STAFF);
  101 +// } else {
  102 +// queryWrapper.eq(IndicatorUserStageTargetValue::getUserId, -1L)
  103 +// .eq(IndicatorUserStageTargetValue::getShopId, referId)
  104 +// .eq(IndicatorUserStageTargetValue::getDimensionType, DimensionTypeEnum.SHOP);
  105 +// }
  106 +// IndicatorUserStageTargetValue stageTargetValue = this.getOne(queryWrapper
  107 +// .eq(IndicatorUserStageTargetValue::getIndicatorCode, indicatorCode)
  108 +// .eq(IndicatorUserStageTargetValue::getBeginDate, startDate)
  109 +// .eq(IndicatorUserStageTargetValue::getEndDate, endDate)
  110 +// .eq(IndicatorUserStageTargetValue::getYn, Boolean.TRUE)
  111 +// , Boolean.FALSE);
  112 +// if (PublicUtil.isEmpty(stageTargetValue)) {
  113 +// return null;
  114 +// }
  115 +// StageTargetValueVO stageTargetValueVO = PublicUtil.copy(stageTargetValue, StageTargetValueVO.class);
  116 +// return stageTargetValueVO;
  117 +// }
118 118 }
... ...
fw-morax-service/src/main/java/cn/fw/morax/service/data/kpi/impl/IndicatorUserTargetValueServiceImpl.java
... ... @@ -31,73 +31,73 @@ import java.time.LocalDate;
31 31 public class IndicatorUserTargetValueServiceImpl extends ServiceImpl<IndicatorUserTargetValueDao, IndicatorUserTargetValue>
32 32 implements IndicatorUserTargetValueService {
33 33  
34   - @Override
35   - public MonthlyTargetValueVO queryStaffIndicatorTarget(Long userId, String indicatorCode, LocalDate dataDate) {
36   - if (PublicUtil.isEmpty(userId) || PublicUtil.isEmpty(indicatorCode) || PublicUtil.isEmpty(dataDate)) {
37   - log.error("查询人员月度指标目标信息,参数错误");
38   - return new MonthlyTargetValueVO();
39   - }
40   - IndicatorUserTargetValue indicatorUserTargetValue = this.getOne(Wrappers.<IndicatorUserTargetValue>lambdaQuery()
41   - .eq(IndicatorUserTargetValue::getUserId, userId)
42   - .eq(IndicatorUserTargetValue::getShopId, -1L)
43   - .eq(IndicatorUserTargetValue::getDimensionType, DimensionTypeEnum.STAFF)
44   - .eq(IndicatorUserTargetValue::getIndicatorCode, indicatorCode)
45   - .eq(IndicatorUserTargetValue::getDataDate, dataDate)
46   - .eq(IndicatorUserTargetValue::getYn, Boolean.TRUE)
47   - , Boolean.FALSE);
48   - if (PublicUtil.isEmpty(indicatorUserTargetValue)) {
49   - return new MonthlyTargetValueVO();
50   - }
51   - MonthlyTargetValueVO monthlyTargetValueVO = PublicUtil.copy(indicatorUserTargetValue, MonthlyTargetValueVO.class);
52   - return monthlyTargetValueVO;
53   - }
54   -
55   - @Override
56   - public MonthlyTargetValueVO queryShopIndicatorTarget(Long shopId, String indicatorCode, LocalDate dataDate) {
57   - if (PublicUtil.isEmpty(shopId) || PublicUtil.isEmpty(indicatorCode) || PublicUtil.isEmpty(dataDate)) {
58   - log.error("查询门店月度指标目标信息,参数错误");
59   - return new MonthlyTargetValueVO();
60   - }
61   - IndicatorUserTargetValue indicatorUserTargetValue = this.getOne(Wrappers.<IndicatorUserTargetValue>lambdaQuery()
62   - .eq(IndicatorUserTargetValue::getUserId, -1L)
63   - .eq(IndicatorUserTargetValue::getShopId, shopId)
64   - .eq(IndicatorUserTargetValue::getDimensionType, DimensionTypeEnum.SHOP)
65   - .eq(IndicatorUserTargetValue::getIndicatorCode, indicatorCode)
66   - .eq(IndicatorUserTargetValue::getDataDate, dataDate)
67   - .eq(IndicatorUserTargetValue::getYn, Boolean.TRUE)
68   - , Boolean.FALSE);
69   - if (PublicUtil.isEmpty(indicatorUserTargetValue)) {
70   - return new MonthlyTargetValueVO();
71   - }
72   - MonthlyTargetValueVO monthlyTargetValueVO = PublicUtil.copy(indicatorUserTargetValue, MonthlyTargetValueVO.class);
73   - return monthlyTargetValueVO;
74   - }
75   -
76   - @Override
77   - public MonthlyTargetValueVO queryIndicatorTarget(Long referId, EvalScopeEnum scopeType, String indicatorCode, LocalDate dataDate) {
78   - if (PublicUtil.isEmpty(referId) || PublicUtil.isEmpty(scopeType) || PublicUtil.isEmpty(indicatorCode) || PublicUtil.isEmpty(dataDate)) {
79   - log.error("查询门店阶段指标目标信息,参数错误");
80   - return null;
81   - }
82   - LambdaQueryWrapper<IndicatorUserTargetValue> queryWrapper = Wrappers.<IndicatorUserTargetValue>lambdaQuery();
83   - if (EvalScopeEnum.STAFF.equals(scopeType)) {
84   - queryWrapper.eq(IndicatorUserTargetValue::getUserId, referId)
85   - .eq(IndicatorUserTargetValue::getShopId, -1L)
86   - .eq(IndicatorUserTargetValue::getDimensionType, DimensionTypeEnum.STAFF);
87   - } else {
88   - queryWrapper.eq(IndicatorUserTargetValue::getUserId, -1L)
89   - .eq(IndicatorUserTargetValue::getShopId, referId)
90   - .eq(IndicatorUserTargetValue::getDimensionType, DimensionTypeEnum.SHOP);
91   - }
92   - IndicatorUserTargetValue indicatorUserTargetValue = this.getOne(queryWrapper
93   - .eq(IndicatorUserTargetValue::getIndicatorCode, indicatorCode)
94   - .eq(IndicatorUserTargetValue::getDataDate, dataDate)
95   - .eq(IndicatorUserTargetValue::getYn, Boolean.TRUE)
96   - , Boolean.FALSE);
97   - if (PublicUtil.isEmpty(indicatorUserTargetValue)) {
98   - return new MonthlyTargetValueVO();
99   - }
100   - MonthlyTargetValueVO monthlyTargetValueVO = PublicUtil.copy(indicatorUserTargetValue, MonthlyTargetValueVO.class);
101   - return monthlyTargetValueVO;
102   - }
  34 +// @Override
  35 +// public MonthlyTargetValueVO queryStaffIndicatorTarget(Long userId, String indicatorCode, LocalDate dataDate) {
  36 +// if (PublicUtil.isEmpty(userId) || PublicUtil.isEmpty(indicatorCode) || PublicUtil.isEmpty(dataDate)) {
  37 +// log.error("查询人员月度指标目标信息,参数错误");
  38 +// return new MonthlyTargetValueVO();
  39 +// }
  40 +// IndicatorUserTargetValue indicatorUserTargetValue = this.getOne(Wrappers.<IndicatorUserTargetValue>lambdaQuery()
  41 +// .eq(IndicatorUserTargetValue::getUserId, userId)
  42 +// .eq(IndicatorUserTargetValue::getShopId, -1L)
  43 +// .eq(IndicatorUserTargetValue::getDimensionType, DimensionTypeEnum.STAFF)
  44 +// .eq(IndicatorUserTargetValue::getIndicatorCode, indicatorCode)
  45 +// .eq(IndicatorUserTargetValue::getDataDate, dataDate)
  46 +// .eq(IndicatorUserTargetValue::getYn, Boolean.TRUE)
  47 +// , Boolean.FALSE);
  48 +// if (PublicUtil.isEmpty(indicatorUserTargetValue)) {
  49 +// return new MonthlyTargetValueVO();
  50 +// }
  51 +// MonthlyTargetValueVO monthlyTargetValueVO = PublicUtil.copy(indicatorUserTargetValue, MonthlyTargetValueVO.class);
  52 +// return monthlyTargetValueVO;
  53 +// }
  54 +//
  55 +// @Override
  56 +// public MonthlyTargetValueVO queryShopIndicatorTarget(Long shopId, String indicatorCode, LocalDate dataDate) {
  57 +// if (PublicUtil.isEmpty(shopId) || PublicUtil.isEmpty(indicatorCode) || PublicUtil.isEmpty(dataDate)) {
  58 +// log.error("查询门店月度指标目标信息,参数错误");
  59 +// return new MonthlyTargetValueVO();
  60 +// }
  61 +// IndicatorUserTargetValue indicatorUserTargetValue = this.getOne(Wrappers.<IndicatorUserTargetValue>lambdaQuery()
  62 +// .eq(IndicatorUserTargetValue::getUserId, -1L)
  63 +// .eq(IndicatorUserTargetValue::getShopId, shopId)
  64 +// .eq(IndicatorUserTargetValue::getDimensionType, DimensionTypeEnum.SHOP)
  65 +// .eq(IndicatorUserTargetValue::getIndicatorCode, indicatorCode)
  66 +// .eq(IndicatorUserTargetValue::getDataDate, dataDate)
  67 +// .eq(IndicatorUserTargetValue::getYn, Boolean.TRUE)
  68 +// , Boolean.FALSE);
  69 +// if (PublicUtil.isEmpty(indicatorUserTargetValue)) {
  70 +// return new MonthlyTargetValueVO();
  71 +// }
  72 +// MonthlyTargetValueVO monthlyTargetValueVO = PublicUtil.copy(indicatorUserTargetValue, MonthlyTargetValueVO.class);
  73 +// return monthlyTargetValueVO;
  74 +// }
  75 +//
  76 +// @Override
  77 +// public MonthlyTargetValueVO queryIndicatorTarget(Long referId, EvalScopeEnum scopeType, String indicatorCode, LocalDate dataDate) {
  78 +// if (PublicUtil.isEmpty(referId) || PublicUtil.isEmpty(scopeType) || PublicUtil.isEmpty(indicatorCode) || PublicUtil.isEmpty(dataDate)) {
  79 +// log.error("查询门店阶段指标目标信息,参数错误");
  80 +// return null;
  81 +// }
  82 +// LambdaQueryWrapper<IndicatorUserTargetValue> queryWrapper = Wrappers.<IndicatorUserTargetValue>lambdaQuery();
  83 +// if (EvalScopeEnum.STAFF.equals(scopeType)) {
  84 +// queryWrapper.eq(IndicatorUserTargetValue::getUserId, referId)
  85 +// .eq(IndicatorUserTargetValue::getShopId, -1L)
  86 +// .eq(IndicatorUserTargetValue::getDimensionType, DimensionTypeEnum.STAFF);
  87 +// } else {
  88 +// queryWrapper.eq(IndicatorUserTargetValue::getUserId, -1L)
  89 +// .eq(IndicatorUserTargetValue::getShopId, referId)
  90 +// .eq(IndicatorUserTargetValue::getDimensionType, DimensionTypeEnum.SHOP);
  91 +// }
  92 +// IndicatorUserTargetValue indicatorUserTargetValue = this.getOne(queryWrapper
  93 +// .eq(IndicatorUserTargetValue::getIndicatorCode, indicatorCode)
  94 +// .eq(IndicatorUserTargetValue::getDataDate, dataDate)
  95 +// .eq(IndicatorUserTargetValue::getYn, Boolean.TRUE)
  96 +// , Boolean.FALSE);
  97 +// if (PublicUtil.isEmpty(indicatorUserTargetValue)) {
  98 +// return new MonthlyTargetValueVO();
  99 +// }
  100 +// MonthlyTargetValueVO monthlyTargetValueVO = PublicUtil.copy(indicatorUserTargetValue, MonthlyTargetValueVO.class);
  101 +// return monthlyTargetValueVO;
  102 +// }
103 103 }
... ...