|
|
@@ -94,7 +94,7 @@ public class SmsCheckIndexController {
|
|
|
/**
|
|
|
* 查询领导角色的 最新动态、我的任务、本月目标
|
|
|
*
|
|
|
- * @param taskId 对象
|
|
|
+ * @param taskIds 对象
|
|
|
* @param pageNo 页码
|
|
|
* @param pageSize 每页条数
|
|
|
* @param request 请求
|
|
|
@@ -102,18 +102,19 @@ public class SmsCheckIndexController {
|
|
|
*/
|
|
|
@ApiOperation(value="领导角色的 最新动态、我的任务、本月目标", notes="领导角色的 最新动态、我的任务、本月目标")
|
|
|
@GetMapping(value = "/typeWork")
|
|
|
- public Result<Dict> typeWork(String taskId,
|
|
|
+ public Result<Dict> typeWork(@RequestParam(name="taskIds",required = false)List<String> taskIds,
|
|
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
|
@RequestParam(name="pageSize", defaultValue="5") Integer pageSize,
|
|
|
HttpServletRequest request) {
|
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
// 最新动态
|
|
|
SmsCheckCustomerInfoLog infoLog = new SmsCheckCustomerInfoLog();
|
|
|
- if (StrUtil.isNotBlank(taskId)) {
|
|
|
- infoLog.setTaskId(taskId);
|
|
|
- }
|
|
|
+
|
|
|
infoLog.setTargetUsername(sysUser.getUsername());
|
|
|
QueryWrapper<SmsCheckCustomerInfoLog> infoLogQuery = QueryGenerator.initQueryWrapper(infoLog, request.getParameterMap());
|
|
|
+ if (CollUtil.isNotEmpty(taskIds)) {
|
|
|
+ infoLogQuery.lambda().in(SmsCheckCustomerInfoLog::getTaskId, taskIds);
|
|
|
+ }
|
|
|
infoLogQuery.lambda().orderByDesc(SmsCheckCustomerInfoLog::getCreateTime);
|
|
|
IPage<SmsCheckCustomerInfoLog> infoLogPage = infoLogService.page(new Page<>(pageNo, pageSize), infoLogQuery);
|
|
|
|
|
|
@@ -129,11 +130,11 @@ public class SmsCheckIndexController {
|
|
|
|
|
|
// 我的任务
|
|
|
SmsCheckCustomerInfo info = new SmsCheckCustomerInfo();
|
|
|
- if (StrUtil.isNotBlank(taskId)) {
|
|
|
- info.setTaskId(taskId);
|
|
|
- }
|
|
|
info.setCreateBy(sysUser.getUsername());
|
|
|
QueryWrapper<SmsCheckCustomerInfo> infoQuery = QueryGenerator.initQueryWrapper(info, request.getParameterMap());
|
|
|
+ if (CollUtil.isNotEmpty(taskIds)) {
|
|
|
+ infoQuery.lambda().in(SmsCheckCustomerInfo::getTaskId, taskIds);
|
|
|
+ }
|
|
|
// 稽核状态 0:未处理;1:未完善;2:待稽核;3:已整改;4:待整改;5:稽核通过;
|
|
|
infoQuery.lambda().in(SmsCheckCustomerInfo::getCheckState, Arrays.asList(2, 3));
|
|
|
infoQuery.lambda().orderByDesc(SmsCheckCustomerInfo::getCreateTime);
|
|
|
@@ -148,29 +149,41 @@ public class SmsCheckIndexController {
|
|
|
|
|
|
// 本月目标
|
|
|
SmsCheckCustomerInfo target = new SmsCheckCustomerInfo();
|
|
|
- if (StrUtil.isNotBlank(taskId)) {
|
|
|
- target.setTaskId(taskId);
|
|
|
- }
|
|
|
// 用户名关联
|
|
|
target.setCreateBy(sysUser.getUsername());
|
|
|
// 稽核状态 0:未处理;1:未完善;2:待稽核;3:已整改;4:待整改;5:稽核通过;
|
|
|
// 全部
|
|
|
QueryWrapper<SmsCheckCustomerInfo> allTargetQuery = QueryGenerator.initQueryWrapper(target, request.getParameterMap());
|
|
|
+ if (CollUtil.isNotEmpty(taskIds)) {
|
|
|
+ allTargetQuery.lambda().in(SmsCheckCustomerInfo::getTaskId, taskIds);
|
|
|
+ }
|
|
|
long allCount = infoService.count(allTargetQuery);
|
|
|
// 未完善
|
|
|
QueryWrapper<SmsCheckCustomerInfo> undoTargetQuery = QueryGenerator.initQueryWrapper(target, request.getParameterMap());
|
|
|
+ if (CollUtil.isNotEmpty(taskIds)) {
|
|
|
+ undoTargetQuery.lambda().in(SmsCheckCustomerInfo::getTaskId, taskIds);
|
|
|
+ }
|
|
|
undoTargetQuery.lambda().in(SmsCheckCustomerInfo::getCheckState, Arrays.asList(0,1));
|
|
|
long undoCount = infoService.count(undoTargetQuery);
|
|
|
// 待稽核
|
|
|
QueryWrapper<SmsCheckCustomerInfo> uncheckTargetQuery = QueryGenerator.initQueryWrapper(target, request.getParameterMap());
|
|
|
+ if (CollUtil.isNotEmpty(taskIds)) {
|
|
|
+ uncheckTargetQuery.lambda().in(SmsCheckCustomerInfo::getTaskId, taskIds);
|
|
|
+ }
|
|
|
uncheckTargetQuery.lambda().in(SmsCheckCustomerInfo::getCheckState, Arrays.asList(2,3));
|
|
|
long uncheckCount = infoService.count(uncheckTargetQuery);
|
|
|
// 待整改
|
|
|
QueryWrapper<SmsCheckCustomerInfo> checkedTargetQuery = QueryGenerator.initQueryWrapper(target, request.getParameterMap());
|
|
|
+ if (CollUtil.isNotEmpty(taskIds)) {
|
|
|
+ checkedTargetQuery.lambda().in(SmsCheckCustomerInfo::getTaskId, taskIds);
|
|
|
+ }
|
|
|
checkedTargetQuery.lambda().in(SmsCheckCustomerInfo::getCheckState, Arrays.asList(4));
|
|
|
long checkedCount = infoService.count(checkedTargetQuery);
|
|
|
// 通过
|
|
|
QueryWrapper<SmsCheckCustomerInfo> doneTargetQuery = QueryGenerator.initQueryWrapper(target, request.getParameterMap());
|
|
|
+ if (CollUtil.isNotEmpty(taskIds)) {
|
|
|
+ doneTargetQuery.lambda().in(SmsCheckCustomerInfo::getTaskId, taskIds);
|
|
|
+ }
|
|
|
doneTargetQuery.lambda().in(SmsCheckCustomerInfo::getCheckState, Arrays.asList(5));
|
|
|
long doneCount = infoService.count(doneTargetQuery);
|
|
|
|
|
|
@@ -195,7 +208,7 @@ public class SmsCheckIndexController {
|
|
|
/**
|
|
|
* 查询客户经理角色的 最新动态、我的任务、本月目标
|
|
|
*
|
|
|
- * @param taskId 对象
|
|
|
+ * @param taskIds 对象
|
|
|
* @param pageNo 页码
|
|
|
* @param pageSize 每页条数
|
|
|
* @param request 请求
|
|
|
@@ -203,18 +216,18 @@ public class SmsCheckIndexController {
|
|
|
*/
|
|
|
@ApiOperation(value="完善客户经理角色的 最新动态、我的任务、本月目标", notes="客户经理角色的 最新动态、我的任务、本月目标")
|
|
|
@GetMapping(value = "/typeInfo")
|
|
|
- public Result<Dict> typeInfo(String taskId,
|
|
|
+ public Result<Dict> typeInfo(@RequestParam(name="taskIds",required = false)List<String> taskIds,
|
|
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
|
@RequestParam(name="pageSize", defaultValue="5") Integer pageSize,
|
|
|
HttpServletRequest request) {
|
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
// 最新动态
|
|
|
SmsCheckWorkLog workLog = new SmsCheckWorkLog();
|
|
|
- if (StrUtil.isNotBlank(taskId)) {
|
|
|
- workLog.setTaskId(taskId);
|
|
|
- }
|
|
|
workLog.setTargetUsername(sysUser.getUsername());
|
|
|
QueryWrapper<SmsCheckWorkLog> workLogQuery = QueryGenerator.initQueryWrapper(workLog, request.getParameterMap());
|
|
|
+ if (CollUtil.isNotEmpty(taskIds)) {
|
|
|
+ workLogQuery.lambda().in(SmsCheckWorkLog::getTaskId, taskIds);
|
|
|
+ }
|
|
|
workLogQuery.lambda().orderByDesc(SmsCheckWorkLog::getCreateTime);
|
|
|
IPage<SmsCheckWorkLog> workLogPage = workLogService.page(new Page<>(pageNo, pageSize), workLogQuery);
|
|
|
|
|
|
@@ -230,12 +243,12 @@ public class SmsCheckIndexController {
|
|
|
|
|
|
// 我的任务
|
|
|
SmsCheckCustomerInfo info = new SmsCheckCustomerInfo();
|
|
|
- if (StrUtil.isNotBlank(taskId)) {
|
|
|
- info.setTaskId(taskId);
|
|
|
- }
|
|
|
// 员工工号关联
|
|
|
info.setStaffNo(sysUser.getWorkNo());
|
|
|
QueryWrapper<SmsCheckCustomerInfo> infoQuery = QueryGenerator.initQueryWrapper(info, request.getParameterMap());
|
|
|
+ if (CollUtil.isNotEmpty(taskIds)) {
|
|
|
+ infoQuery.lambda().in(SmsCheckCustomerInfo::getTaskId, taskIds);
|
|
|
+ }
|
|
|
// 稽核状态 0:未处理;1:未完善;2:待稽核;3:已整改;4:待整改;5:稽核通过;
|
|
|
infoQuery.lambda().in(SmsCheckCustomerInfo::getCheckState, Arrays.asList(0, 1, 4));
|
|
|
infoQuery.lambda().orderByDesc(SmsCheckCustomerInfo::getCreateTime);
|
|
|
@@ -250,28 +263,40 @@ public class SmsCheckIndexController {
|
|
|
|
|
|
// 本月目标
|
|
|
SmsCheckCustomerInfo target = new SmsCheckCustomerInfo();
|
|
|
- if (StrUtil.isNotBlank(taskId)) {
|
|
|
- target.setTaskId(taskId);
|
|
|
- }
|
|
|
//target.setCreateBy(sysUser.getUsername());
|
|
|
// 稽核状态 0:未处理;1:未完善;2:待稽核;3:已整改;4:待整改;5:稽核通过;
|
|
|
// 全部
|
|
|
QueryWrapper<SmsCheckCustomerInfo> allTargetQuery = QueryGenerator.initQueryWrapper(target, request.getParameterMap());
|
|
|
+ if (CollUtil.isNotEmpty(taskIds)) {
|
|
|
+ allTargetQuery.lambda().in(SmsCheckCustomerInfo::getTaskId, taskIds);
|
|
|
+ }
|
|
|
long allCount = infoService.count(allTargetQuery);
|
|
|
// 未完善
|
|
|
QueryWrapper<SmsCheckCustomerInfo> undoTargetQuery = QueryGenerator.initQueryWrapper(target, request.getParameterMap());
|
|
|
+ if (CollUtil.isNotEmpty(taskIds)) {
|
|
|
+ undoTargetQuery.lambda().in(SmsCheckCustomerInfo::getTaskId, taskIds);
|
|
|
+ }
|
|
|
undoTargetQuery.lambda().in(SmsCheckCustomerInfo::getCheckState, Arrays.asList(0,1));
|
|
|
long undoCount = infoService.count(undoTargetQuery);
|
|
|
// 待稽核
|
|
|
QueryWrapper<SmsCheckCustomerInfo> uncheckTargetQuery = QueryGenerator.initQueryWrapper(target, request.getParameterMap());
|
|
|
+ if (CollUtil.isNotEmpty(taskIds)) {
|
|
|
+ uncheckTargetQuery.lambda().in(SmsCheckCustomerInfo::getTaskId, taskIds);
|
|
|
+ }
|
|
|
uncheckTargetQuery.lambda().in(SmsCheckCustomerInfo::getCheckState, Arrays.asList(2,3));
|
|
|
long uncheckCount = infoService.count(uncheckTargetQuery);
|
|
|
// 待整改
|
|
|
QueryWrapper<SmsCheckCustomerInfo> checkedTargetQuery = QueryGenerator.initQueryWrapper(target, request.getParameterMap());
|
|
|
+ if (CollUtil.isNotEmpty(taskIds)) {
|
|
|
+ checkedTargetQuery.lambda().in(SmsCheckCustomerInfo::getTaskId, taskIds);
|
|
|
+ }
|
|
|
checkedTargetQuery.lambda().in(SmsCheckCustomerInfo::getCheckState, Arrays.asList(4));
|
|
|
long checkedCount = infoService.count(checkedTargetQuery);
|
|
|
// 通过
|
|
|
QueryWrapper<SmsCheckCustomerInfo> doneTargetQuery = QueryGenerator.initQueryWrapper(target, request.getParameterMap());
|
|
|
+ if (CollUtil.isNotEmpty(taskIds)) {
|
|
|
+ doneTargetQuery.lambda().in(SmsCheckCustomerInfo::getTaskId, taskIds);
|
|
|
+ }
|
|
|
doneTargetQuery.lambda().in(SmsCheckCustomerInfo::getCheckState, Arrays.asList(5));
|
|
|
long doneCount = infoService.count(doneTargetQuery);
|
|
|
|