|
|
|
@ -137,10 +137,17 @@ public class DataScreenService { |
|
|
|
String todayStr = DateUtil.format(new Date(), DatePattern.NORM_DATE_FORMAT); |
|
|
|
String todayStr = DateUtil.format(new Date(), DatePattern.NORM_DATE_FORMAT); |
|
|
|
if (StrUtil.isBlank(deptId)) { |
|
|
|
if (StrUtil.isBlank(deptId)) { |
|
|
|
Long today = mailSourceService.count(todayStr); |
|
|
|
Long today = mailSourceService.count(todayStr); |
|
|
|
Long total = mailMarkService.count(); |
|
|
|
Long total = mailMarkService.count(new LambdaQueryWrapper<MailMark>() |
|
|
|
Long completedCases = mailMarkService.count(new LambdaQueryWrapper<MailMark>().eq(MailMark::getCompleted, AppConstants.TRUE)); |
|
|
|
.ge(MailMark::getMailTime, AppConstants.BEGIN_TIME)); |
|
|
|
Long resolvedCases = mailMarkService.count(new LambdaQueryWrapper<MailMark>().eq(MailMark::getResolved, AppConstants.TRUE)); |
|
|
|
Long completedCases = mailMarkService.count(new LambdaQueryWrapper<MailMark>() |
|
|
|
Long satisfiedCases = mailMarkService.count(new LambdaQueryWrapper<MailMark>().eq(MailMark::getSatisfied, AppConstants.TRUE)); |
|
|
|
.ge(MailMark::getMailTime, AppConstants.BEGIN_TIME) |
|
|
|
|
|
|
|
.eq(MailMark::getCompleted, AppConstants.TRUE)); |
|
|
|
|
|
|
|
Long resolvedCases = mailMarkService.count(new LambdaQueryWrapper<MailMark>() |
|
|
|
|
|
|
|
.ge(MailMark::getMailTime, AppConstants.BEGIN_TIME) |
|
|
|
|
|
|
|
.eq(MailMark::getResolved, AppConstants.TRUE)); |
|
|
|
|
|
|
|
Long satisfiedCases = mailMarkService.count(new LambdaQueryWrapper<MailMark>() |
|
|
|
|
|
|
|
.ge(MailMark::getMailTime, AppConstants.BEGIN_TIME) |
|
|
|
|
|
|
|
.eq(MailMark::getSatisfied, AppConstants.TRUE)); |
|
|
|
MailDatavStats stats = new MailDatavStats() |
|
|
|
MailDatavStats stats = new MailDatavStats() |
|
|
|
.setToday(today) |
|
|
|
.setToday(today) |
|
|
|
.setTotal(total) |
|
|
|
.setTotal(total) |
|
|
|
@ -153,37 +160,39 @@ public class DataScreenService { |
|
|
|
return stats; |
|
|
|
return stats; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
DeptVo deptVo = deptService.detail(deptId); |
|
|
|
DeptVo deptVo = deptService.detail(deptId); |
|
|
|
Long today = mailSourceService.count(new QueryWrapper<MailSource>().eq("TO_CHAR(mail_time, 'YYYY-MM-DD')", todayStr)); |
|
|
|
Long today = mailSourceService.count(new QueryWrapper<MailSource>() |
|
|
|
|
|
|
|
.eq("TO_CHAR(mail_time, 'YYYY-MM-DD')", todayStr)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LambdaQueryWrapper<MailMark> queryWrapper = new LambdaQueryWrapper<MailMark>() |
|
|
|
|
|
|
|
.ge(MailMark::getMailTime, AppConstants.BEGIN_TIME); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LambdaQueryWrapper<MailMark> completedCasesQueryWrapper = new LambdaQueryWrapper<MailMark>() |
|
|
|
|
|
|
|
.ge(MailMark::getMailTime, AppConstants.BEGIN_TIME) |
|
|
|
|
|
|
|
.eq(MailMark::getCompleted, AppConstants.TRUE); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LambdaQueryWrapper<MailMark> satisfiedCasesQueryWrapper = new LambdaQueryWrapper<MailMark>() |
|
|
|
|
|
|
|
.ge(MailMark::getMailTime, AppConstants.BEGIN_TIME) |
|
|
|
|
|
|
|
.eq(MailMark::getSatisfied, AppConstants.TRUE); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LambdaQueryWrapper<MailMark> resolvedCasesQueryWrapper = new LambdaQueryWrapper<MailMark>() |
|
|
|
|
|
|
|
.ge(MailMark::getMailTime, AppConstants.BEGIN_TIME) |
|
|
|
|
|
|
|
.eq(MailMark::getResolved, AppConstants.TRUE); |
|
|
|
|
|
|
|
|
|
|
|
LambdaQueryWrapper<MailMark> queryWrapper = new LambdaQueryWrapper<MailMark>(); |
|
|
|
|
|
|
|
if (deptVo.getLevel() == 1) { |
|
|
|
if (deptVo.getLevel() == 1) { |
|
|
|
queryWrapper.eq(MailMark::getFirstDeptId, deptId); |
|
|
|
queryWrapper.eq(MailMark::getFirstDeptId, deptId); |
|
|
|
} else if (deptVo.getLevel() == 2) { |
|
|
|
|
|
|
|
queryWrapper.eq(MailMark::getSecondDeptId, deptId); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Long total = mailMarkService.count(queryWrapper); |
|
|
|
|
|
|
|
LambdaQueryWrapper<MailMark> completedCasesQueryWrapper = new LambdaQueryWrapper<MailMark>().eq(MailMark::getCompleted, AppConstants.TRUE); |
|
|
|
|
|
|
|
if (deptVo.getLevel() == 1) { |
|
|
|
|
|
|
|
completedCasesQueryWrapper.eq(MailMark::getFirstDeptId, deptId); |
|
|
|
completedCasesQueryWrapper.eq(MailMark::getFirstDeptId, deptId); |
|
|
|
} else if (deptVo.getLevel() == 2) { |
|
|
|
|
|
|
|
completedCasesQueryWrapper.eq(MailMark::getSecondDeptId, deptId); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Long completedCases = mailMarkService.count(completedCasesQueryWrapper); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LambdaQueryWrapper<MailMark> resolvedCasesQueryWrapper = new LambdaQueryWrapper<MailMark>().eq(MailMark::getResolved, AppConstants.TRUE); |
|
|
|
|
|
|
|
if (deptVo.getLevel() == 1) { |
|
|
|
|
|
|
|
resolvedCasesQueryWrapper.eq(MailMark::getFirstDeptId, deptId); |
|
|
|
resolvedCasesQueryWrapper.eq(MailMark::getFirstDeptId, deptId); |
|
|
|
|
|
|
|
satisfiedCasesQueryWrapper.eq(MailMark::getFirstDeptId, deptId); |
|
|
|
} else if (deptVo.getLevel() == 2) { |
|
|
|
} else if (deptVo.getLevel() == 2) { |
|
|
|
|
|
|
|
queryWrapper.eq(MailMark::getSecondDeptId, deptId); |
|
|
|
|
|
|
|
completedCasesQueryWrapper.eq(MailMark::getSecondDeptId, deptId); |
|
|
|
resolvedCasesQueryWrapper.eq(MailMark::getSecondDeptId, deptId); |
|
|
|
resolvedCasesQueryWrapper.eq(MailMark::getSecondDeptId, deptId); |
|
|
|
|
|
|
|
satisfiedCasesQueryWrapper.eq(MailMark::getSecondDeptId, deptId); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Long total = mailMarkService.count(queryWrapper); |
|
|
|
|
|
|
|
Long completedCases = mailMarkService.count(completedCasesQueryWrapper); |
|
|
|
Long resolvedCases = mailMarkService.count(resolvedCasesQueryWrapper); |
|
|
|
Long resolvedCases = mailMarkService.count(resolvedCasesQueryWrapper); |
|
|
|
LambdaQueryWrapper<MailMark> satisfiedCasesQueryWrapper = new LambdaQueryWrapper<MailMark>().eq(MailMark::getSatisfied, AppConstants.TRUE); |
|
|
|
|
|
|
|
if (deptVo.getLevel() == 1) { |
|
|
|
|
|
|
|
satisfiedCasesQueryWrapper.eq(MailMark::getFirstDeptId, deptId); |
|
|
|
|
|
|
|
} else if (deptVo.getLevel() == 2) { |
|
|
|
|
|
|
|
satisfiedCasesQueryWrapper.eq(MailMark::getSecondDeptId, deptId); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Long satisfiedCases = mailMarkService.count(satisfiedCasesQueryWrapper); |
|
|
|
Long satisfiedCases = mailMarkService.count(satisfiedCasesQueryWrapper); |
|
|
|
MailDatavStats stats = new MailDatavStats() |
|
|
|
MailDatavStats stats = new MailDatavStats() |
|
|
|
.setToday(today) |
|
|
|
.setToday(today) |
|
|
|
@ -299,10 +308,10 @@ public class DataScreenService { |
|
|
|
public Map<String, Object> getToDayDuty(Map<String, String> params) { |
|
|
|
public Map<String, Object> getToDayDuty(Map<String, String> params) { |
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
if (params.size() == 0) { |
|
|
|
if (params.size() == 0) { |
|
|
|
List<Duty> dutySjList = baseMapper.getToDayDuty("0", null); |
|
|
|
List<Duty> dutySjList = baseMapper.selectDutyListByTodayAndDeptPId("0", null); |
|
|
|
List<Duty> dutyFjList = baseMapper.getToDayDuty(DeptTypeEnum.SJ_TYPE.getType(), null); |
|
|
|
List<Duty> dutyFjList = baseMapper.selectDutyListByTodayAndDeptPId(DeptTypeEnum.SJ_TYPE.getType(), null); |
|
|
|
List<Duty> dutyZdList = baseMapper.getToDayDuty(DeptTypeEnum.ZD_TYPE.getType(), null); |
|
|
|
List<Duty> dutyZdList = baseMapper.selectDutyListByTodayAndDeptPId(DeptTypeEnum.ZD_TYPE.getType(), null); |
|
|
|
List<Duty> dutyBwList = baseMapper.getToDayDuty(DeptTypeEnum.BW_TYPE.getType(), null); |
|
|
|
List<Duty> dutyBwList = baseMapper.selectDutyListByTodayAndDeptPId(DeptTypeEnum.BW_TYPE.getType(), null); |
|
|
|
map.put("dutySjList", dutySjList); |
|
|
|
map.put("dutySjList", dutySjList); |
|
|
|
map.put("dutyFjList", dutyFjList); |
|
|
|
map.put("dutyFjList", dutyFjList); |
|
|
|
map.put("dutyZdList", dutyZdList); |
|
|
|
map.put("dutyZdList", dutyZdList); |
|
|
|
@ -314,10 +323,10 @@ public class DataScreenService { |
|
|
|
public Map<String, Object> getToIndexDuty() { |
|
|
|
public Map<String, Object> getToIndexDuty() { |
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
String deptId = AdminThreadLocal.getDeptId(); |
|
|
|
String deptId = AdminThreadLocal.getDeptId(); |
|
|
|
List<Duty> dutySjList = baseMapper.getToDayDuty(DeptTypeEnum.SJ_TYPE.getType(), null); |
|
|
|
List<Duty> dutySjList = baseMapper.selectDutyListByTodayAndDeptPId(DeptTypeEnum.SJ_TYPE.getType(), null); |
|
|
|
List<Duty> dutyFjList = baseMapper.getToDayDuty(DeptTypeEnum.FJ_TYPE.getType(), deptId); |
|
|
|
List<Duty> dutyFjList = baseMapper.selectDutyListByTodayAndDeptPId(DeptTypeEnum.FJ_TYPE.getType(), deptId); |
|
|
|
List<Duty> dutyPcsList = baseMapper.getToDayDuty(DeptTypeEnum.PCS_TYPE.getType(), deptId); |
|
|
|
List<Duty> dutyPcsList = baseMapper.selectDutyListByTodayAndDeptPId(DeptTypeEnum.PCS_TYPE.getType(), deptId); |
|
|
|
List<Duty> dutyDdList = baseMapper.getToDayDuty(DeptTypeEnum.DD_TYPE.getType(), deptId); |
|
|
|
List<Duty> dutyDdList = baseMapper.selectDutyListByTodayAndDeptPId(DeptTypeEnum.DD_TYPE.getType(), deptId); |
|
|
|
map.put("dutySjList", dutySjList); |
|
|
|
map.put("dutySjList", dutySjList); |
|
|
|
map.put("dutyFjList", dutyFjList); |
|
|
|
map.put("dutyFjList", dutyFjList); |
|
|
|
map.put("dutyPcsList", dutyPcsList); |
|
|
|
map.put("dutyPcsList", dutyPcsList); |
|
|
|
|