|
|
@@ -11,6 +11,7 @@ import com.sundot.airport.ledger.domain.LedgerSeizureStats;
|
|
11
|
11
|
import com.sundot.airport.ledger.domain.vo.*;
|
|
12
|
12
|
import com.sundot.airport.ledger.mapper.LedgerSeizureStatsMapper;
|
|
13
|
13
|
import com.sundot.airport.ledger.service.ILedgerSeizureStatsService;
|
|
|
14
|
+import com.sundot.airport.system.mapper.SysDeptMapper;
|
|
14
|
15
|
import com.sundot.airport.system.service.ISysDeptService;
|
|
15
|
16
|
import com.sundot.airport.system.service.ISysUserService;
|
|
16
|
17
|
import lombok.extern.slf4j.Slf4j;
|
|
|
@@ -35,7 +36,7 @@ public class LedgerSeizureStatsServiceImpl extends ServiceImpl<LedgerSeizureStat
|
|
35
|
36
|
private LedgerSeizureStatsMapper mapper;
|
|
36
|
37
|
|
|
37
|
38
|
@Autowired
|
|
38
|
|
- private ISysDeptService sysDeptService;
|
|
|
39
|
+ private SysDeptMapper sysDeptMapper;
|
|
39
|
40
|
|
|
40
|
41
|
@Autowired
|
|
41
|
42
|
private ISysUserService sysUserService;
|
|
|
@@ -162,7 +163,7 @@ public class LedgerSeizureStatsServiceImpl extends ServiceImpl<LedgerSeizureStat
|
|
162
|
163
|
private List<CountSeizureSingleQuantityResVO> handleGroupLevelQuery(CountQueryReqVO countQueryReq, List<Date> dateRange) {
|
|
163
|
164
|
List<CountSeizureSingleQuantityResVO> resultList = Lists.newArrayList();
|
|
164
|
165
|
|
|
165
|
|
- SysDept groupDept = sysDeptService.selectDeptById(countQueryReq.getGroupId());
|
|
|
166
|
+ SysDept groupDept = sysDeptMapper.selectDeptById(countQueryReq.getGroupId());
|
|
166
|
167
|
String groupName = (groupDept != null) ? groupDept.getDeptName() : "小组" + countQueryReq.getGroupId();
|
|
167
|
168
|
|
|
168
|
169
|
List<SysUser> members = sysUserService.selectUserByDeptId(countQueryReq.getGroupId());
|
|
|
@@ -207,10 +208,10 @@ public class LedgerSeizureStatsServiceImpl extends ServiceImpl<LedgerSeizureStat
|
|
207
|
208
|
private List<CountSeizureSingleQuantityResVO> handleTeamLevelQuery(CountQueryReqVO countQueryReq, List<Date> dateRange) {
|
|
208
|
209
|
List<CountSeizureSingleQuantityResVO> resultList = Lists.newArrayList();
|
|
209
|
210
|
|
|
210
|
|
- SysDept teamDept = sysDeptService.selectDeptById(countQueryReq.getTeamId());
|
|
|
211
|
+ SysDept teamDept = sysDeptMapper.selectDeptById(countQueryReq.getTeamId());
|
|
211
|
212
|
String teamName = (teamDept != null) ? teamDept.getDeptName() : "班组" + countQueryReq.getTeamId();
|
|
212
|
213
|
|
|
213
|
|
- List<SysDept> groups = sysDeptService.selectChildrenDeptById(countQueryReq.getTeamId());
|
|
|
214
|
+ List<SysDept> groups = sysDeptMapper.selectChildrenDeptById(countQueryReq.getTeamId());
|
|
214
|
215
|
if (CollUtil.isEmpty(groups)) {
|
|
215
|
216
|
for (Date date : dateRange) {
|
|
216
|
217
|
resultList.add(new CountSeizureSingleQuantityResVO(date, teamName));
|
|
|
@@ -254,10 +255,10 @@ public class LedgerSeizureStatsServiceImpl extends ServiceImpl<LedgerSeizureStat
|
|
254
|
255
|
private List<CountSeizureSingleQuantityResVO> handleDeptLevelQuery(CountQueryReqVO countQueryReq, List<Date> dateRange) {
|
|
255
|
256
|
List<CountSeizureSingleQuantityResVO> resultList = Lists.newArrayList();
|
|
256
|
257
|
|
|
257
|
|
- SysDept dept = sysDeptService.selectDeptById(countQueryReq.getDeptId());
|
|
|
258
|
+ SysDept dept = sysDeptMapper.selectDeptById(countQueryReq.getDeptId());
|
|
258
|
259
|
String deptName = (dept != null) ? dept.getDeptName() : "部门" + countQueryReq.getDeptId();
|
|
259
|
260
|
|
|
260
|
|
- List<SysDept> teams = sysDeptService.selectChildrenDeptById(countQueryReq.getDeptId());
|
|
|
261
|
+ List<SysDept> teams = sysDeptMapper.selectChildrenDeptById(countQueryReq.getDeptId());
|
|
261
|
262
|
if (CollUtil.isEmpty(teams)) {
|
|
262
|
263
|
for (Date date : dateRange) {
|
|
263
|
264
|
resultList.add(new CountSeizureSingleQuantityResVO(date, deptName));
|
|
|
@@ -304,7 +305,7 @@ public class LedgerSeizureStatsServiceImpl extends ServiceImpl<LedgerSeizureStat
|
|
304
|
305
|
SysDept stationDept = new SysDept();
|
|
305
|
306
|
stationDept.setStatus("0");
|
|
306
|
307
|
stationDept.setDeptType("STATION");
|
|
307
|
|
- List<SysDept> stationList = sysDeptService.selectDeptList(stationDept);
|
|
|
308
|
+ List<SysDept> stationList = sysDeptMapper.selectDeptList(stationDept);
|
|
308
|
309
|
|
|
309
|
310
|
if (CollUtil.isEmpty(stationList)) {
|
|
310
|
311
|
return resultList;
|
|
|
@@ -315,7 +316,7 @@ public class LedgerSeizureStatsServiceImpl extends ServiceImpl<LedgerSeizureStat
|
|
315
|
316
|
SysDept brigadeDept = new SysDept();
|
|
316
|
317
|
brigadeDept.setStatus("0");
|
|
317
|
318
|
brigadeDept.setDeptType("BRIGADE");
|
|
318
|
|
- List<SysDept> allBrigades = sysDeptService.selectDeptList(brigadeDept);
|
|
|
319
|
+ List<SysDept> allBrigades = sysDeptMapper.selectDeptList(brigadeDept);
|
|
319
|
320
|
|
|
320
|
321
|
List<SysDept> brigades = allBrigades.stream()
|
|
321
|
322
|
.filter(b -> b.getParentId() != null && b.getParentId().equals(station.getDeptId()))
|