Commit f90ec7e419148f775d8b80a69b563f1c986b43d3
1 parent
b5babc65
feature(*): 新增台阶类型
新增台阶类型
Showing
14 changed files
with
61 additions
and
85 deletions
fw-morax-dao/src/main/java/cn/fw/morax/dao/eval/EvalIndicatorImportDetailDao.java
... | ... | @@ -19,7 +19,6 @@ import java.util.List; |
19 | 19 | */ |
20 | 20 | public interface EvalIndicatorImportDetailDao extends BaseMapper<EvalIndicatorImportDetail> { |
21 | 21 | |
22 | - List<EvalIndicatorImportDetail> getLastUserValue(@Param("recordId") Long recordId, @Param("dimensionType") Integer dimensionType); | |
22 | + List<EvalIndicatorImportDetail> getLastValue(@Param("recordId") Long recordId, @Param("dimensionType") Integer dimensionType); | |
23 | 23 | |
24 | - List<EvalIndicatorImportDetail> getLastShopValue(@Param("recordId") Long recordId, @Param("dimensionType") Integer dimensionType); | |
25 | 24 | } | ... | ... |
fw-morax-dao/src/main/resources/mapper/eval/EvalIndicatorImportDetailDao.xml
... | ... | @@ -50,7 +50,7 @@ |
50 | 50 | <!-- </select>--> |
51 | 51 | |
52 | 52 | |
53 | - <select id="getLastUserValue" resultType="cn.fw.morax.domain.db.eval.EvalIndicatorImportDetail"> | |
53 | + <select id="getLastValue" resultType="cn.fw.morax.domain.db.eval.EvalIndicatorImportDetail"> | |
54 | 54 | select |
55 | 55 | t1.id, |
56 | 56 | t1.user_id, |
... | ... | @@ -60,10 +60,9 @@ |
60 | 60 | t1.indicator_name, |
61 | 61 | t1.indicator_code, |
62 | 62 | t1.indicator_value, |
63 | - t1.value_type, | |
63 | + t1.data_type, | |
64 | 64 | t1.data_date, |
65 | - t1.error_type, | |
66 | - t1.group_id | |
65 | + t1.error_type | |
67 | 66 | FROM |
68 | 67 | eval_indicator_import_detail t1, |
69 | 68 | ( |
... | ... | @@ -85,39 +84,5 @@ |
85 | 84 | t1.id = t2.pk |
86 | 85 | </select> |
87 | 86 | |
88 | - <select id="getLastShopValue" resultType="cn.fw.morax.domain.db.eval.EvalIndicatorImportDetail"> | |
89 | - select | |
90 | - t1.id, | |
91 | - t1.user_id, | |
92 | - t1.user_name, | |
93 | - t1.shop_id, | |
94 | - t1.shop_name, | |
95 | - t1.indicator_name, | |
96 | - t1.indicator_code, | |
97 | - t1.indicator_value, | |
98 | - t1.value_type, | |
99 | - t1.data_date, | |
100 | - t1.error_type, | |
101 | - t1.group_id | |
102 | - FROM | |
103 | - eval_indicator_import_detail t1, | |
104 | - ( | |
105 | - SELECT CONVERT | |
106 | - ( SUBSTRING_INDEX( group_concat( id ORDER BY `create_time` DESC ), ',', 1 ), SIGNED ) pk | |
107 | - FROM | |
108 | - eval_indicator_import_detail | |
109 | - WHERE | |
110 | - error_type IS NULL | |
111 | - AND dimension_type = #{dimensionType} | |
112 | - <if test="recordId != null"> | |
113 | - AND record_id = #{recordId} | |
114 | - </if> | |
115 | - AND yn = 1 | |
116 | - GROUP BY | |
117 | - shop_id | |
118 | - ) t2 | |
119 | - WHERE | |
120 | - t1.id = t2.pk | |
121 | - </select> | |
122 | 87 | |
123 | 88 | </mapper> |
124 | 89 | \ No newline at end of file | ... | ... |
fw-morax-dao/src/main/resources/mapper/eval/EvalIndicatorValueMapper.xml
... | ... | @@ -36,7 +36,7 @@ |
36 | 36 | t2.`group_id` |
37 | 37 | from eval_indicator_value t2 |
38 | 38 | where t2.indicator_code = #{indicatorCode} |
39 | - and DATE_FORMAT(t2.data_date, '%Y-%m-%d') <![CDATA[<=]]> DATE_FORMAT(#{dataDate}, '%Y-%m-%d') | |
39 | + and DATE_FORMAT(t2.data_date, '%Y-%m-%d') <![CDATA[>=]]> DATE_FORMAT(#{dataDate}, '%Y-%m-%d') | |
40 | 40 | and t2.dimension_type = #{dimensionType} |
41 | 41 | <if test="userId != null"> |
42 | 42 | and t2.user_id = #{userId} | ... | ... |
fw-morax-dao/src/main/resources/mapper/eval/EvalShopPoolDao.xml
... | ... | @@ -20,7 +20,7 @@ |
20 | 20 | </resultMap> |
21 | 21 | |
22 | 22 | <sql id="all_columns"> |
23 | - id,eval_id,egc,eval_group_id,shop_id,shop_name,reward,status,score,score_ratio,monthly,group_id, | |
23 | + id,eval_id,egc,eval_group_id,shop_id,shop_name,reward,status,score,score_ratio,monthly,group_id | |
24 | 24 | </sql> |
25 | 25 | |
26 | 26 | <select id="getLastPool" resultType="cn.fw.morax.domain.db.eval.EvalShopPool"> |
... | ... | @@ -29,13 +29,12 @@ |
29 | 29 | FROM |
30 | 30 | eval_shop_pool t1, |
31 | 31 | ( |
32 | - SELECT CONVERT | |
33 | - ( SUBSTRING_INDEX( group_concat( id ORDER BY `create_time` DESC ), ',', 1 ), SIGNED ) pk | |
32 | + SELECT CONVERT( SUBSTRING_INDEX( group_concat( id ORDER BY `create_time` DESC ), ',', 1 ), SIGNED ) pk | |
34 | 33 | FROM |
35 | 34 | eval_shop_pool |
36 | 35 | WHERE |
37 | 36 | DATE_FORMAT( create_time, '%Y-%m' ) >= #{monthly} |
38 | - AND group_id = #{group_id} | |
37 | + AND group_id = #{groupId} | |
39 | 38 | AND yn = 1 |
40 | 39 | GROUP BY |
41 | 40 | shop_id | ... | ... |
fw-morax-domain/src/main/java/cn/fw/morax/domain/db/eval/EvalIndicatorImportDetail.java
fw-morax-server/src/main/java/cn/fw/morax/server/controller/app/EvalPoolController.java
... | ... | @@ -169,7 +169,9 @@ public class EvalPoolController { |
169 | 169 | if (dto.getIsEvalGroupIndicator() && PublicUtil.isEmpty(dto.getEvalGroupIndicatorParamId()) && |
170 | 170 | PublicUtil.isEmpty(dto.getEvalGroupIndicatorPreconditionId())) { |
171 | 171 | throw new BusinessException("参数错误"); |
172 | - } else if (PublicUtil.isEmpty(dto.getEvalGroupRewardParamId()) && PublicUtil.isEmpty(dto.getEvalGroupRewardPreconditionId())) { | |
172 | + } | |
173 | + if (! dto.getIsEvalGroupIndicator() && PublicUtil.isEmpty(dto.getEvalGroupRewardParamId()) && | |
174 | + PublicUtil.isEmpty(dto.getEvalGroupRewardPreconditionId())) { | |
173 | 175 | throw new BusinessException("参数错误"); |
174 | 176 | } |
175 | 177 | return success(evalGroupPoolService.queryIndicatorRank(dto, EvalScopeEnum.STAFF)); |
... | ... | @@ -187,7 +189,9 @@ public class EvalPoolController { |
187 | 189 | if (dto.getIsEvalGroupIndicator() && PublicUtil.isEmpty(dto.getEvalGroupIndicatorParamId()) && |
188 | 190 | PublicUtil.isEmpty(dto.getEvalGroupIndicatorPreconditionId())) { |
189 | 191 | throw new BusinessException("参数错误"); |
190 | - } else if (PublicUtil.isEmpty(dto.getEvalGroupRewardParamId()) && PublicUtil.isEmpty(dto.getEvalGroupRewardPreconditionId())) { | |
192 | + } | |
193 | + if (! dto.getIsEvalGroupIndicator() && PublicUtil.isEmpty(dto.getEvalGroupRewardParamId()) && | |
194 | + PublicUtil.isEmpty(dto.getEvalGroupRewardPreconditionId())) { | |
191 | 195 | throw new BusinessException("参数错误"); |
192 | 196 | } |
193 | 197 | return success(evalGroupPoolService.queryIndicatorRank(dto, EvalScopeEnum.SHOP)); | ... | ... |
fw-morax-server/src/main/java/cn/fw/morax/server/runner/CheckCommandLineRunner.java
... | ... | @@ -4,10 +4,7 @@ import cn.fw.morax.common.utils.EventBusUtil; |
4 | 4 | import cn.fw.morax.domain.db.salary.SalaryGeneralSettin; |
5 | 5 | import cn.fw.morax.rpc.oop.OopRpcService; |
6 | 6 | import cn.fw.morax.rpc.oop.dto.GroupDTO; |
7 | -import cn.fw.morax.service.component.KpiGroupChangeObserver; | |
8 | -import cn.fw.morax.service.component.KpiStarAdjustmentObserver; | |
9 | -import cn.fw.morax.service.component.PaySalaryObserver; | |
10 | -import cn.fw.morax.service.component.SalaryGroupChangeObserver; | |
7 | +import cn.fw.morax.service.component.*; | |
11 | 8 | import cn.fw.morax.service.data.salary.SalaryGeneralSettinService; |
12 | 9 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
13 | 10 | import lombok.RequiredArgsConstructor; |
... | ... | @@ -33,6 +30,7 @@ import java.util.List; |
33 | 30 | @RequiredArgsConstructor |
34 | 31 | public class CheckCommandLineRunner implements CommandLineRunner { |
35 | 32 | private final SalaryGeneralSettinService salaryGeneralSettinService; |
33 | + private final EvalIndicatorSaveObserver evalIndicatorSaveObserver; | |
36 | 34 | private final KpiStarAdjustmentObserver kpiStarAdjustmentObserver; |
37 | 35 | private final SalaryGroupChangeObserver salaryGroupChangeObserver; |
38 | 36 | private final KpiGroupChangeObserver kpiGroupChangeObserver; |
... | ... | @@ -54,6 +52,7 @@ public class CheckCommandLineRunner implements CommandLineRunner { |
54 | 52 | EventBusUtil.asyncRegister(paySalaryObserver); |
55 | 53 | EventBusUtil.asyncRegister(kpiGroupChangeObserver); |
56 | 54 | EventBusUtil.asyncRegister(salaryGroupChangeObserver); |
55 | + EventBusUtil.asyncRegister(evalIndicatorSaveObserver); | |
57 | 56 | } |
58 | 57 | |
59 | 58 | /** | ... | ... |
fw-morax-service/src/main/java/cn/fw/morax/service/biz/eval/EvalGroupPoolService.java
... | ... | @@ -260,11 +260,11 @@ public class EvalGroupPoolService { |
260 | 260 | * @return |
261 | 261 | */ |
262 | 262 | public Set<SelectorVO> evalPoolSelector(Long userId, YearMonth yearMonth) { |
263 | - List<EvalUserPoolVO> userPools = evalUserPoolService.getPools(yearMonth, userId); | |
264 | - if (CollectionUtils.isEmpty(userPools)) { | |
263 | + List<EvalUserPool> pools = userEvalPool(userId, yearMonth); | |
264 | + if (CollectionUtils.isEmpty(pools)) { | |
265 | 265 | return new HashSet<>(); |
266 | 266 | } |
267 | - return userPools.stream().map(r -> SelectorVO.whit(r.getId(), r.getEvalName(), r.getEvalGroupName())).collect(Collectors.toSet()); | |
267 | + return pools.stream().map(r -> SelectorVO.whit(r.getId(), r.getPostName(), r.getShopName() + "")).collect(Collectors.toSet()); | |
268 | 268 | } |
269 | 269 | |
270 | 270 | ... | ... |
fw-morax-service/src/main/java/cn/fw/morax/service/biz/eval/EvalIndicatorReportService.java
... | ... | @@ -36,10 +36,7 @@ import java.math.BigDecimal; |
36 | 36 | import java.time.LocalDate; |
37 | 37 | import java.time.YearMonth; |
38 | 38 | import java.time.format.DateTimeFormatter; |
39 | -import java.util.ArrayList; | |
40 | -import java.util.List; | |
41 | -import java.util.Map; | |
42 | -import java.util.Optional; | |
39 | +import java.util.*; | |
43 | 40 | import java.util.function.Function; |
44 | 41 | import java.util.stream.Collectors; |
45 | 42 | |
... | ... | @@ -124,12 +121,13 @@ public class EvalIndicatorReportService { |
124 | 121 | public void uploadStaffIndicator(MultipartFile file, LoginAuthBean user) { |
125 | 122 | MultiKeyMap<String, EvalUserPool> staffPostMap = getShopUserPoolMap(user); |
126 | 123 | Map<String, EvalIndicator> evalIndicatorMap = getNameIndicatorMap(); |
127 | - EvalIndicatorImportRecord importRecord = createRecord(user); | |
124 | + EvalIndicatorImportRecord importRecord = createRecord(user, DimensionTypeEnum.STAFF); | |
128 | 125 | evalIndicatorImportRecordService.save(importRecord); |
129 | 126 | List<EvalIndicatorImportDetail> details = new ArrayList<>(); |
130 | 127 | List<StaffIndicatorValueVO> indicatorValues = this.analysisExcel(file, StaffIndicatorValueVO.class); |
131 | 128 | Long importRecordId = importRecord.getId(); |
132 | 129 | Integer errorNum = 0; |
130 | + Set<String> uploadIndicatorCodes = new HashSet<>(); | |
133 | 131 | for (StaffIndicatorValueVO staff : indicatorValues) { |
134 | 132 | EvalIndicatorImportDetail importDetail = new EvalIndicatorImportDetail(); |
135 | 133 | importDetail.setDataDate(transferDate(staff.getDataDate())); |
... | ... | @@ -145,6 +143,7 @@ public class EvalIndicatorReportService { |
145 | 143 | } |
146 | 144 | if (evalIndicatorMap.containsKey(staff.getIndicatorName())) { |
147 | 145 | EvalIndicator evalIndicator = evalIndicatorMap.get(staff.getIndicatorName()); |
146 | + uploadIndicatorCodes.add(evalIndicator.getCode()); | |
148 | 147 | importDetail.setIndicatorCode(evalIndicator.getCode()); |
149 | 148 | importDetail.setIndicatorName(evalIndicator.getName()); |
150 | 149 | importDetail.setIndicatorValue(new BigDecimal(staff.getIndicatorValue())); |
... | ... | @@ -167,9 +166,12 @@ public class EvalIndicatorReportService { |
167 | 166 | evalIndicatorImportRecordService.updateById(importRecord); |
168 | 167 | evalIndicatorImportDetailService.saveBatch(details); |
169 | 168 | |
170 | - ImportEvalIndicatorEvent importEvalIndicatorEvent = new ImportEvalIndicatorEvent(importRecord.getIndicatorCode(), | |
171 | - importRecord.getId(), importRecord.getGroupId(), importRecord.getUploadTime()); | |
172 | - EventBusUtil.asyncPost(importEvalIndicatorEvent); | |
169 | + for (String indicatorCode : uploadIndicatorCodes) { | |
170 | + ImportEvalIndicatorEvent importEvalIndicatorEvent = new ImportEvalIndicatorEvent(indicatorCode, | |
171 | + importRecord.getId(), importRecord.getGroupId(), importRecord.getUploadTime()); | |
172 | + EventBusUtil.asyncPost(importEvalIndicatorEvent); | |
173 | + } | |
174 | + | |
173 | 175 | } |
174 | 176 | |
175 | 177 | public <T> List<T> analysisExcel(MultipartFile file, Class<T> tClass) { |
... | ... | @@ -208,15 +210,16 @@ public class EvalIndicatorReportService { |
208 | 210 | } |
209 | 211 | |
210 | 212 | @Transactional(rollbackFor = Exception.class) |
211 | - public List<ShopIndicatorValueVO> uploadShopIndicator(MultipartFile file, LoginAuthBean user) { | |
213 | + public void uploadShopIndicator(MultipartFile file, LoginAuthBean user) { | |
212 | 214 | Map<String, EvalShopPool> shopPoolMap = this.getShopPoolMap(user); |
213 | 215 | Map<String, EvalIndicator> evalIndicatorMap = getNameIndicatorMap(); |
214 | - EvalIndicatorImportRecord importRecord = createRecord(user); | |
216 | + EvalIndicatorImportRecord importRecord = createRecord(user, DimensionTypeEnum.SHOP); | |
215 | 217 | evalIndicatorImportRecordService.save(importRecord); |
216 | 218 | Long importRecordId = importRecord.getId(); |
217 | 219 | List<EvalIndicatorImportDetail> details = new ArrayList<>(); |
218 | 220 | List<ShopIndicatorValueVO> indicatorValues = this.analysisExcel(file, ShopIndicatorValueVO.class); |
219 | 221 | Integer errorNum = 0; |
222 | + Set<String> uploadIndicatorCodes = new HashSet<>(); | |
220 | 223 | for (ShopIndicatorValueVO shop : indicatorValues) { |
221 | 224 | EvalIndicatorImportDetail importDetail = new EvalIndicatorImportDetail(); |
222 | 225 | importDetail.setDataDate(transferDate(shop.getDataDate())); |
... | ... | @@ -230,6 +233,7 @@ public class EvalIndicatorReportService { |
230 | 233 | } |
231 | 234 | if (evalIndicatorMap.containsKey(shop.getIndicatorName())) { |
232 | 235 | EvalIndicator evalIndicator = evalIndicatorMap.get(shop.getIndicatorName()); |
236 | + uploadIndicatorCodes.add(evalIndicator.getCode()); | |
233 | 237 | importDetail.setIndicatorCode(evalIndicator.getCode()); |
234 | 238 | importDetail.setIndicatorName(evalIndicator.getName()); |
235 | 239 | importDetail.setIndicatorValue(new BigDecimal(shop.getIndicatorValue())); |
... | ... | @@ -246,18 +250,18 @@ public class EvalIndicatorReportService { |
246 | 250 | importRecord.setSuccessNum(indicatorValues.size() - errorNum); |
247 | 251 | evalIndicatorImportRecordService.updateById(importRecord); |
248 | 252 | evalIndicatorImportDetailService.saveBatch(details); |
249 | - ImportEvalIndicatorEvent importEvalIndicatorEvent = new ImportEvalIndicatorEvent(importRecord.getIndicatorCode(), | |
250 | - importRecord.getId(), importRecord.getGroupId(), importRecord.getUploadTime()); | |
251 | - EventBusUtil.asyncPost(importEvalIndicatorEvent); | |
252 | - | |
253 | - return null; | |
253 | + for (String indicatorCode : uploadIndicatorCodes) { | |
254 | + ImportEvalIndicatorEvent importEvalIndicatorEvent = new ImportEvalIndicatorEvent(indicatorCode, | |
255 | + importRecord.getId(), importRecord.getGroupId(), importRecord.getUploadTime()); | |
256 | + EventBusUtil.asyncPost(importEvalIndicatorEvent); | |
257 | + } | |
254 | 258 | } |
255 | 259 | |
256 | - public EvalIndicatorImportRecord createRecord(LoginAuthBean user) { | |
260 | + public EvalIndicatorImportRecord createRecord(LoginAuthBean user, DimensionTypeEnum dimensionType) { | |
257 | 261 | EvalIndicatorImportRecord importRecord = new EvalIndicatorImportRecord(); |
258 | 262 | importRecord.setImportUserId(user.getUserId()); |
259 | 263 | importRecord.setImportUserName(user.getUserName()); |
260 | - importRecord.setDimensionType(DimensionTypeEnum.STAFF); | |
264 | + importRecord.setDimensionType(dimensionType); | |
261 | 265 | importRecord.setUploadTime(LocalDate.now()); |
262 | 266 | importRecord.setGroupId(user.getGroupId()); |
263 | 267 | importRecord.setYn(Boolean.TRUE); | ... | ... |
fw-morax-service/src/main/java/cn/fw/morax/service/biz/eval/EvalIndicatorValueBizService.java
... | ... | @@ -605,6 +605,7 @@ public class EvalIndicatorValueBizService { |
605 | 605 | EvalReportVO reportVO = new EvalReportVO(); |
606 | 606 | Map<EvalScopeEnum, List<EvalGroup>> evalScopeEnumMap = evalGroups.stream().collect(Collectors.groupingBy(EvalGroup::getScopeType)); |
607 | 607 | |
608 | + //人员 | |
608 | 609 | List<EvalGroup> staffGroups = evalScopeEnumMap.get(EvalScopeEnum.STAFF); |
609 | 610 | if (PublicUtil.isNotEmpty(staffGroups)) { |
610 | 611 | List<EvalIndicatorImportUserVO> importUsers = new ArrayList<>(); |
... | ... | @@ -625,6 +626,7 @@ public class EvalIndicatorValueBizService { |
625 | 626 | reportVO.setUsers(importUsers); |
626 | 627 | } |
627 | 628 | |
629 | + //门店 | |
628 | 630 | List<EvalGroup> shopGroups = evalScopeEnumMap.get(EvalScopeEnum.SHOP); |
629 | 631 | if (PublicUtil.isNotEmpty(shopGroups)) { |
630 | 632 | List<Long> shopGroupIds = shopGroups.stream().flatMap(evalGroup -> evalGroup.getShopIds().stream()) | ... | ... |
fw-morax-service/src/main/java/cn/fw/morax/service/component/EvalIndicatorSaveObserver.java
... | ... | @@ -78,6 +78,7 @@ public class EvalIndicatorSaveObserver { |
78 | 78 | LocalDate dataDate = event.getDataDate(); |
79 | 79 | Long recordId = event.getEvalIndicatorImportRecordId(); |
80 | 80 | EvalIndicatorImportRecord importRecord = evalIndicatorImportRecordService.getById(recordId); |
81 | + Long groupId = importRecord.getGroupId(); | |
81 | 82 | List<EvalIndicatorImportDetail> shopDetails = evalIndicatorImportDetailService.getLastShopValue(recordId); |
82 | 83 | List<EvalIndicatorImportDetail> userDetails = evalIndicatorImportDetailService.getLastUserValue(recordId); |
83 | 84 | |
... | ... | @@ -93,22 +94,24 @@ public class EvalIndicatorSaveObserver { |
93 | 94 | indicatorValue.setIndicatorValue(shopDetail.getIndicatorValue()); |
94 | 95 | indicatorValue.setDataType(shopDetail.getDataType()); |
95 | 96 | indicatorValue.setDataDate(dataDate); |
96 | - indicatorValue.setGroupId(shopDetail.getGroupId()); | |
97 | + indicatorValue.setGroupId(groupId); | |
97 | 98 | indicatorValue.setYn(Boolean.TRUE); |
98 | 99 | } |
99 | 100 | |
100 | - for (EvalIndicatorImportDetail shopDetail : userDetails) { | |
101 | + for (EvalIndicatorImportDetail userDetail : userDetails) { | |
101 | 102 | |
102 | 103 | EvalIndicatorValue indicatorValue = new EvalIndicatorValue(); |
103 | - indicatorValue.setShopId(shopDetail.getShopId()); | |
104 | - indicatorValue.setShopName(shopDetail.getShopName()); | |
104 | + indicatorValue.setUserId(userDetail.getUserId()); | |
105 | + indicatorValue.setUserName(userDetail.getUserName()); | |
106 | + indicatorValue.setShopId(userDetail.getShopId()); | |
107 | + indicatorValue.setShopName(userDetail.getShopName()); | |
105 | 108 | indicatorValue.setDimensionType(DimensionTypeEnum.STAFF); |
106 | - indicatorValue.setIndicatorCode(shopDetail.getIndicatorCode()); | |
107 | - indicatorValue.setIndicatorName(shopDetail.getIndicatorName()); | |
108 | - indicatorValue.setIndicatorValue(shopDetail.getIndicatorValue()); | |
109 | - indicatorValue.setDataType(shopDetail.getDataType()); | |
109 | + indicatorValue.setIndicatorCode(userDetail.getIndicatorCode()); | |
110 | + indicatorValue.setIndicatorName(userDetail.getIndicatorName()); | |
111 | + indicatorValue.setIndicatorValue(userDetail.getIndicatorValue()); | |
112 | + indicatorValue.setDataType(userDetail.getDataType()); | |
110 | 113 | indicatorValue.setDataDate(dataDate); |
111 | - indicatorValue.setGroupId(shopDetail.getGroupId()); | |
114 | + indicatorValue.setGroupId(groupId); | |
112 | 115 | indicatorValue.setYn(Boolean.TRUE); |
113 | 116 | } |
114 | 117 | |
... | ... | @@ -116,7 +119,6 @@ public class EvalIndicatorSaveObserver { |
116 | 119 | return; |
117 | 120 | } |
118 | 121 | evalIndicatorValueService.saveBatch(evalIndicatorValues); |
119 | - | |
120 | 122 | this.checkDataReport(event.getCode(), event.getDataDate(), event.getGroupId()); |
121 | 123 | } |
122 | 124 | ... | ... |
fw-morax-service/src/main/java/cn/fw/morax/service/data/eval/EvalIndicatorValueService.java
fw-morax-service/src/main/java/cn/fw/morax/service/data/eval/impl/EvalIndicatorImportDetailServiceImpl.java
... | ... | @@ -27,11 +27,11 @@ public class EvalIndicatorImportDetailServiceImpl extends ServiceImpl<EvalIndica |
27 | 27 | |
28 | 28 | @Override |
29 | 29 | public List<EvalIndicatorImportDetail> getLastUserValue(Long recordId) { |
30 | - return this.baseMapper.getLastUserValue(recordId, DimensionTypeEnum.STAFF.getValue()); | |
30 | + return this.baseMapper.getLastValue(recordId, DimensionTypeEnum.STAFF.getValue()); | |
31 | 31 | } |
32 | 32 | |
33 | 33 | @Override |
34 | 34 | public List<EvalIndicatorImportDetail> getLastShopValue(Long recordId) { |
35 | - return this.baseMapper.getLastShopValue(recordId, DimensionTypeEnum.SHOP.getValue()); | |
35 | + return this.baseMapper.getLastValue(recordId, DimensionTypeEnum.SHOP.getValue()); | |
36 | 36 | } |
37 | 37 | } | ... | ... |
fw-morax-service/src/main/java/cn/fw/morax/service/data/eval/impl/EvalIndicatorValueServiceImpl.java
... | ... | @@ -27,6 +27,8 @@ public class EvalIndicatorValueServiceImpl extends ServiceImpl<EvalIndicatorValu |
27 | 27 | |
28 | 28 | @Override |
29 | 29 | public EvalIndicatorValue queryLastValue(Long referId, DimensionTypeEnum dimensionType, String indicatorCode, LocalDate dataDate) { |
30 | + //上报数据有周期,查最新上报数据需要扩大时间范围 | |
31 | + dataDate = dataDate.minusMonths(1L); | |
30 | 32 | if (DimensionTypeEnum.STAFF.equals(dimensionType)) { |
31 | 33 | return this.baseMapper.queryLastValue(referId, null, dimensionType, indicatorCode, dataDate); |
32 | 34 | } | ... | ... |