diff --git a/sql/1106.sql b/sql/1106.sql new file mode 100644 index 0000000..3709c07 --- /dev/null +++ b/sql/1106.sql @@ -0,0 +1,14 @@ +CREATE TABLE `file_class` ( + `id` int NOT NULL AUTO_INCREMENT, + `class_title` varchar(255) NOT NULL, + `class_remarks` varchar(255) DEFAULT NULL, + `problem_sources_code` varchar(40) NOT NULL COMMENT '问题来源', + `sort_id` int DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=6 COMMENT='文件分类'; + +INSERT INTO `negative`.`file_class`(`id`, `class_title`, `class_remarks`, `problem_sources_code`, `sort_id`) VALUES (1, '容错免责样本申请表', NULL, '2', 1); +INSERT INTO `negative`.`file_class`(`id`, `class_title`, `class_remarks`, `problem_sources_code`, `sort_id`) VALUES (2, '针对群众不满意原因,提供无过错的音视频、微信或短信截图等证明资料', NULL, '2', 2); +INSERT INTO `negative`.`file_class`(`id`, `class_title`, `class_remarks`, `problem_sources_code`, `sort_id`) VALUES (3, '110、122接处警开始、结束及处置过程中的视频截图', '需体现单警装备', '2', 3); +INSERT INTO `negative`.`file_class`(`id`, `class_title`, `class_remarks`, `problem_sources_code`, `sort_id`) VALUES (4, '自动回访不满意后所对的回访录音', NULL, '2', 4); +INSERT INTO `negative`.`file_class`(`id`, `class_title`, `class_remarks`, `problem_sources_code`, `sort_id`) VALUES (5, '单位/个人所做其他工作', NULL, '2', 5); diff --git a/src/main/java/com/biutag/supervision/constants/enums/ProblemSourcesEnum.java b/src/main/java/com/biutag/supervision/constants/enums/ProblemSourcesEnum.java index a284597..b3245cb 100644 --- a/src/main/java/com/biutag/supervision/constants/enums/ProblemSourcesEnum.java +++ b/src/main/java/com/biutag/supervision/constants/enums/ProblemSourcesEnum.java @@ -7,7 +7,7 @@ import lombok.Getter; @AllArgsConstructor public enum ProblemSourcesEnum { XCDC("现场督察", "13"), - SZDC("数字督察", "14"), + LMGZ("灵敏感知", "14"), ZXDC("专项督察", "15"), SPDC("视频督察", "16"), @@ -28,8 +28,7 @@ public enum ProblemSourcesEnum { JYDC("警意调查", "3"), CFJD("持法监督", "4"), JCKH("检查考核", "8"), - QT("其他", "9"), - LMGZ("灵敏感知", "27"); + QT("其他", "9"); private String label; diff --git a/src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClueTaskController.java b/src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClueTaskController.java index 4baa0a1..c39e8c6 100644 --- a/src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClueTaskController.java +++ b/src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClueTaskController.java @@ -1,10 +1,13 @@ package com.biutag.supervision.controller.sensitivePerception; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.biutag.supervision.pojo.Result; +import com.biutag.supervision.pojo.entity.ModelClue; import com.biutag.supervision.pojo.model.ModelClueTaskDepartModel; import com.biutag.supervision.pojo.model.ModelClueTaskModel; import com.biutag.supervision.pojo.param.ModelClueTaskQueryParam; +import com.biutag.supervision.service.ModelClueService; import com.biutag.supervision.service.ModelClueTaskService; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.GetMapping; @@ -25,6 +28,8 @@ public class ModelClueTaskController { private final ModelClueTaskService modelClueTaskService; + private final ModelClueService modelClueService; + @GetMapping public Result> page(ModelClueTaskQueryParam param) { return Result.success(modelClueTaskService.page(param)); @@ -35,4 +40,10 @@ public class ModelClueTaskController { return Result.success(modelClueTaskService.listDepart(taskId)); } + @GetMapping("{taskId}/clues") + public Result> listDepart(@PathVariable Integer taskId, Page page) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper().eq(ModelClue::getTaskId, taskId); + return Result.success(modelClueService.page(page, queryWrapper)); + } + } diff --git a/src/main/java/com/biutag/supervision/controller/sensitivePerception/ProfileDepartController.java b/src/main/java/com/biutag/supervision/controller/sensitivePerception/ProfileDepartController.java index 7ff5656..4f5bd32 100644 --- a/src/main/java/com/biutag/supervision/controller/sensitivePerception/ProfileDepartController.java +++ b/src/main/java/com/biutag/supervision/controller/sensitivePerception/ProfileDepartController.java @@ -130,7 +130,7 @@ public class ProfileDepartController { businessTypeGroup.get(key).size())).toList(); profileDepart.setBusinessTypeList(businessTypeList); // 个人问题排名 - List policeBarList = profileDepartMapper.selectPoliceTop10(departId, beginTime, endTime); + List policeBarList = profileDepartMapper.selectPoliceNegativeCount(departId, beginTime, endTime); profileDepart.setPoliceBarList(policeBarList); // 风险问题构成 雷达图 diff --git a/src/main/java/com/biutag/supervision/controller/system/RoleController.java b/src/main/java/com/biutag/supervision/controller/system/RoleController.java index e7866d1..7c11ac5 100644 --- a/src/main/java/com/biutag/supervision/controller/system/RoleController.java +++ b/src/main/java/com/biutag/supervision/controller/system/RoleController.java @@ -1,6 +1,7 @@ package com.biutag.supervision.controller.system; import cn.hutool.core.util.IdUtil; +import com.biutag.supervision.constants.enums.StatusEnum; import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.entity.BaseRole; import com.biutag.supervision.pojo.entity.RoleMenu; @@ -33,6 +34,7 @@ public class RoleController { role.setRoleId(String.valueOf(IdUtil.getSnowflakeNextId())); role.setCreateTime(LocalDateTime.now()); role.setUpdateTime(LocalDateTime.now()); + role.setStatus(StatusEnum.ENABLE.getValue()); return Result.success(baseRoleService.save(role)); } diff --git a/src/main/java/com/biutag/supervision/controller/work/NegativeController.java b/src/main/java/com/biutag/supervision/controller/work/NegativeController.java index eda9da7..9c8a534 100644 --- a/src/main/java/com/biutag/supervision/controller/work/NegativeController.java +++ b/src/main/java/com/biutag/supervision/controller/work/NegativeController.java @@ -1,11 +1,15 @@ package com.biutag.supervision.controller.work; +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.biutag.supervision.flow.FlowService; import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.domain.NegativeDetail; import com.biutag.supervision.pojo.dto.ActionDto; import com.biutag.supervision.pojo.dto.NegativeDto; +import com.biutag.supervision.pojo.entity.Negative; import com.biutag.supervision.pojo.entity.NegativeTask; import com.biutag.supervision.pojo.param.NegativeQueryParam; import com.biutag.supervision.pojo.vo.NegativeQueryVo; @@ -16,6 +20,8 @@ import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; +import java.time.LocalDateTime; + @RequiredArgsConstructor @RequestMapping("negative") @RestController @@ -44,6 +50,31 @@ public class NegativeController { return Result.success(negativeService.save(negativeDto)); } + @PutMapping + public Result update(@Valid @RequestBody NegativeDto negativeDto) { + if (StrUtil.isBlank(negativeDto.getId())) { + throw new RuntimeException("数据异常,请系统联系管理员【问题ID为空】"); + } + LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper<>(); + updateWrapper.eq(Negative::getId, negativeDto.getId()) + .set(Negative::getProblemSources, negativeDto.getProblemSources()) + .set(Negative::getProblemSourcesCode, negativeDto.getProblemSourcesCode()) + .set(Negative::getBusinessTypeCode, negativeDto.getBusinessTypeCode()) + .set(Negative::getBusinessTypeName, negativeDto.getBusinessTypeName()) + .set(Negative::getCaseNumber, negativeDto.getCaseNumber()) + .set(Negative::getInvolveProblem, negativeDto.getInvolveProblem()) + .set(Negative::getPoliceType, negativeDto.getPoliceType()) + .set(Negative::getPoliceTypeName, negativeDto.getPoliceTypeName()) + .set(Negative::getDiscoveryTime, negativeDto.getDiscoveryTime()) + .set(Negative::getHappenTime, negativeDto.getHappenTime()) + .set(Negative::getResponderName, negativeDto.getResponderName()) + .set(Negative::getContactPhone, negativeDto.getContactPhone()) + .set(Negative::getThingDesc, negativeDto.getThingDesc()) + .set(Negative::getUpdTime, LocalDateTime.now()); + negativeService.update(updateWrapper); + return Result.success(); + } + @PostMapping("{id}/execute") public Result execute(@PathVariable String id, @RequestBody ActionDto action) { action.setNegativeId(id); diff --git a/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java b/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java index 5afeb74..9f62f95 100644 --- a/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java +++ b/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java @@ -153,7 +153,7 @@ public class ApplyCompletionAction implements Action { SupDepart depart = departService.getById(currentWork.getDepartId()); String parentDepartId; String parentDepartName; - if (DepartLevelEnum.SECOND.getValue().equals(depart.getLevel())) { + if (negative.getIsSecondHandle()) { parentDepartId = AppConstants.ROOT_DEPART_ID; parentDepartName = AppConstants.ROOT_DEPART_NAME; } else { diff --git a/src/main/java/com/biutag/supervision/flow/action/SaveAction.java b/src/main/java/com/biutag/supervision/flow/action/SaveAction.java index bf3ff7e..92aedb2 100644 --- a/src/main/java/com/biutag/supervision/flow/action/SaveAction.java +++ b/src/main/java/com/biutag/supervision/flow/action/SaveAction.java @@ -2,6 +2,7 @@ package com.biutag.supervision.flow.action; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.util.IdUtil; +import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.biutag.supervision.constants.enums.InspectCaseEnum; import com.biutag.supervision.constants.enums.IsRectifyEnum; @@ -11,10 +12,8 @@ import com.biutag.supervision.pojo.dto.flow.VerifyData; import com.biutag.supervision.pojo.entity.Negative; import com.biutag.supervision.pojo.entity.NegativeBlame; import com.biutag.supervision.pojo.entity.NegativeProblemRelation; -import com.biutag.supervision.service.NegativeBlameService; -import com.biutag.supervision.service.NegativeFileService; -import com.biutag.supervision.service.NegativeProblemRelationService; -import com.biutag.supervision.service.NegativeService; +import com.biutag.supervision.pojo.entity.SupDepart; +import com.biutag.supervision.service.*; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; @@ -37,6 +36,8 @@ public class SaveAction implements Action { private final NegativeFileService fileService; + private final SupDepartService departService; + @Override public void next(ActionDto actionDto) { VerifyData verifyData = BeanUtil.toBean(actionDto.getData(), VerifyData.class); @@ -61,6 +62,11 @@ public class SaveAction implements Action { updateWrapper.set(Negative::getRectifyRestrictionDays, verifyData.getRectifyRestrictionDays()); } } + if (StrUtil.isNotBlank(verifyData.getInvolveDepartId())) { + SupDepart depart = departService.getById(verifyData.getInvolveDepartId()); + updateWrapper.set(Negative::getInvolveDepartId, verifyData.getInvolveDepartId()) + .set(Negative::getInvolveDepartName, depart.getShortName()); + } negativeService.update(updateWrapper); if (!verifyData.getBlames().isEmpty()) { diff --git a/src/main/java/com/biutag/supervision/flow/action/SecondLocalProcessingAction.java b/src/main/java/com/biutag/supervision/flow/action/SecondLocalProcessingAction.java index 6ecb619..9ed071b 100644 --- a/src/main/java/com/biutag/supervision/flow/action/SecondLocalProcessingAction.java +++ b/src/main/java/com/biutag/supervision/flow/action/SecondLocalProcessingAction.java @@ -1,6 +1,7 @@ package com.biutag.supervision.flow.action; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.biutag.supervision.constants.enums.ProcessingStatusEnum; import com.biutag.supervision.pojo.dto.ActionDto; import com.biutag.supervision.pojo.entity.Negative; import com.biutag.supervision.service.NegativeService; @@ -24,6 +25,7 @@ public class SecondLocalProcessingAction implements Action { negativeService.update(new LambdaUpdateWrapper() .set(Negative::getFlowKey, actionDto.getNextFlowKey()) .set(Negative::getIsSecondHandle, true) + .set(Negative::getProcessingStatus, ProcessingStatusEnum.processing.name()) .set(Negative::getUpdTime, LocalDateTime.now()) .eq(Negative::getId, actionDto.getNegativeId())); } diff --git a/src/main/java/com/biutag/supervision/flow/action/ThreeSignReturnAction.java b/src/main/java/com/biutag/supervision/flow/action/ThreeSignReturnAction.java index 459c0cf..f3c0f79 100644 --- a/src/main/java/com/biutag/supervision/flow/action/ThreeSignReturnAction.java +++ b/src/main/java/com/biutag/supervision/flow/action/ThreeSignReturnAction.java @@ -68,6 +68,7 @@ public class ThreeSignReturnAction implements Action { .set(Negative::getIsRectifyName, null) .set(Negative::getAccountabilityTarget, null) .set(Negative::getRectifyRestrictionDays, null) + .set(Negative::getIsSecondHandle, false) .eq(Negative::getId, negativeId)); // 删除涉及人员 blameService.remove(negativeId); diff --git a/src/main/java/com/biutag/supervision/job/DepartJob.java b/src/main/java/com/biutag/supervision/job/DepartJob.java index 7fae51e..a64e019 100644 --- a/src/main/java/com/biutag/supervision/job/DepartJob.java +++ b/src/main/java/com/biutag/supervision/job/DepartJob.java @@ -39,7 +39,7 @@ public class DepartJob { /** * 1个小时 */ - @Scheduled(fixedRate = 1000 * 60 * 60) +// @Scheduled(fixedRate = 1000 * 60 * 60) public void updatePoliceSize() { List departs = departService.list(new LambdaQueryWrapper().eq(SupDepart::getLevel, 3)); departs.forEach(item -> { diff --git a/src/main/java/com/biutag/supervision/mapper/FileClassMapper.java b/src/main/java/com/biutag/supervision/mapper/FileClassMapper.java new file mode 100644 index 0000000..0baeecf --- /dev/null +++ b/src/main/java/com/biutag/supervision/mapper/FileClassMapper.java @@ -0,0 +1,8 @@ +package com.biutag.supervision.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.biutag.supervision.pojo.entity.FileClass; + +public interface FileClassMapper extends BaseMapper { + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/mapper/ProfileDepartMapper.java b/src/main/java/com/biutag/supervision/mapper/ProfileDepartMapper.java index 71a2ee3..9a6b103 100644 --- a/src/main/java/com/biutag/supervision/mapper/ProfileDepartMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/ProfileDepartMapper.java @@ -2,10 +2,8 @@ package com.biutag.supervision.mapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.biutag.supervision.pojo.dto.common.BarItem; -import com.biutag.supervision.pojo.dto.common.PieItem; import com.biutag.supervision.pojo.model.DepartNegativeModel; import org.apache.ibatis.annotations.Param; -import org.apache.ibatis.annotations.Select; import java.util.Date; import java.util.List; @@ -19,7 +17,7 @@ public interface ProfileDepartMapper { Page queryDepartNegative(Page page, Date beginTime, Date endTime, String departName, String departId); - List selectPoliceTop10(String departId, Date beginTime, Date endTime); + List selectPoliceNegativeCount(String departId, Date beginTime, Date endTime); List selectProblemType(String departId, Date beginTime, Date endTime); diff --git a/src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java b/src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java index 1666a09..bebabb4 100644 --- a/src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java +++ b/src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java @@ -1,5 +1,6 @@ package com.biutag.supervision.pojo.domain; +import com.biutag.supervision.pojo.entity.FileClass; import com.biutag.supervision.pojo.entity.NegativeFile; import com.biutag.supervision.pojo.entity.NegativeThingFile; import com.fasterxml.jackson.annotation.JsonFormat; @@ -179,4 +180,6 @@ public class NegativeVo { private List thingFiles = new ArrayList<>(); + private List fileClasses = new ArrayList<>(); + } diff --git a/src/main/java/com/biutag/supervision/pojo/dto/flow/VerifyData.java b/src/main/java/com/biutag/supervision/pojo/dto/flow/VerifyData.java index 21a2e3c..ad30aff 100644 --- a/src/main/java/com/biutag/supervision/pojo/dto/flow/VerifyData.java +++ b/src/main/java/com/biutag/supervision/pojo/dto/flow/VerifyData.java @@ -44,6 +44,9 @@ public class VerifyData { // 涉及案件/警情编号 private String caseNumber; + // 涉及单位 + private String involveDepartId; + private List blames = new ArrayList<>(); private List files = new ArrayList<>(); diff --git a/src/main/java/com/biutag/supervision/pojo/entity/FileClass.java b/src/main/java/com/biutag/supervision/pojo/entity/FileClass.java new file mode 100644 index 0000000..6275bf1 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/entity/FileClass.java @@ -0,0 +1,35 @@ +package com.biutag.supervision.pojo.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Getter; +import lombok.Setter; + +import java.time.LocalDateTime; + +@Setter +@Getter +public class FileClass { + + // + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + // + @TableField("class_title") + private String classTitle; + + // + @TableField("class_remarks") + private String classRemarks; + + // 问题来源 + @TableField("problem_sources_code") + private String problemSourcesCode; + + // + @TableField("sort_id") + private Integer sortId; + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/model/NegativeFavModel.java b/src/main/java/com/biutag/supervision/pojo/model/NegativeFavModel.java index 00537e7..6e3d5ef 100644 --- a/src/main/java/com/biutag/supervision/pojo/model/NegativeFavModel.java +++ b/src/main/java/com/biutag/supervision/pojo/model/NegativeFavModel.java @@ -52,4 +52,9 @@ public class NegativeFavModel { // 部门ID(工作表) private String workDepartId; + private String flowKey; + + // 办理状态 + private String processingStatus; + } diff --git a/src/main/java/com/biutag/supervision/pojo/model/NegativeWorkModel.java b/src/main/java/com/biutag/supervision/pojo/model/NegativeWorkModel.java index d61117f..2052e39 100644 --- a/src/main/java/com/biutag/supervision/pojo/model/NegativeWorkModel.java +++ b/src/main/java/com/biutag/supervision/pojo/model/NegativeWorkModel.java @@ -87,4 +87,7 @@ public class NegativeWorkModel { // 涉嫌问题 private String involveProblem; + // 是否能申请延期 true = 能 false = 不能 + private Boolean extensionApplyFlag; + } diff --git a/src/main/java/com/biutag/supervision/service/BaseRoleService.java b/src/main/java/com/biutag/supervision/service/BaseRoleService.java index 3ea8d9d..2f8cbe0 100644 --- a/src/main/java/com/biutag/supervision/service/BaseRoleService.java +++ b/src/main/java/com/biutag/supervision/service/BaseRoleService.java @@ -3,6 +3,7 @@ package com.biutag.supervision.service; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.biutag.supervision.constants.enums.StatusEnum; import com.biutag.supervision.pojo.entity.BaseRole; import com.biutag.supervision.mapper.BaseRoleMapper; import com.biutag.supervision.pojo.entity.BaseRoleUser; @@ -25,7 +26,8 @@ public class BaseRoleService extends ServiceImpl { public List list(RoleQueryParam roleQueryParam) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.like(StrUtil.isNotBlank(roleQueryParam.getRoleName()), BaseRole::getRoleName, roleQueryParam.getRoleName()); + queryWrapper.like(StrUtil.isNotBlank(roleQueryParam.getRoleName()), BaseRole::getRoleName, roleQueryParam.getRoleName()) + .eq(BaseRole::getStatus, StatusEnum.ENABLE.getValue()); return list(queryWrapper); } diff --git a/src/main/java/com/biutag/supervision/service/FileClassService.java b/src/main/java/com/biutag/supervision/service/FileClassService.java new file mode 100644 index 0000000..e191a97 --- /dev/null +++ b/src/main/java/com/biutag/supervision/service/FileClassService.java @@ -0,0 +1,18 @@ +package com.biutag.supervision.service; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.biutag.supervision.pojo.entity.FileClass; +import com.biutag.supervision.mapper.FileClassMapper; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class FileClassService extends ServiceImpl { + + public List list(String problemSourcesCode) { + return list(new LambdaQueryWrapper().eq(FileClass::getProblemSourcesCode, problemSourcesCode).orderByAsc(FileClass::getSortId)); + } + +} diff --git a/src/main/java/com/biutag/supervision/service/NegativeQueryService.java b/src/main/java/com/biutag/supervision/service/NegativeQueryService.java index d7fc4ab..87186fe 100644 --- a/src/main/java/com/biutag/supervision/service/NegativeQueryService.java +++ b/src/main/java/com/biutag/supervision/service/NegativeQueryService.java @@ -44,7 +44,9 @@ public class NegativeQueryService { queryWrapper.in(Negative::getHandleThreeDepartId, user.getAuthDepartIds()); } } - queryWrapper.like(StrUtil.isNotBlank(param.getOriginId()), Negative::getOriginId, param.getOriginId()) + queryWrapper.and(StrUtil.isNotBlank(param.getOriginId()), (qw) -> { + qw.like(Negative::getOriginId, param.getOriginId()).or().eq(Negative::getId, param.getOriginId()); + }) .in(!param.getProcessingStatus().isEmpty(), Negative::getProcessingStatus, param.getProcessingStatus()) .eq(StrUtil.isNotBlank(param.getFlowKey()), Negative::getFlowKey, param.getFlowKey()) .like(StrUtil.isNotBlank(param.getThingDesc()), Negative::getThingDesc, param.getThingDesc()) @@ -75,9 +77,12 @@ public class NegativeQueryService { } if (Objects.nonNull(param.getTimeoutFlag())) { if (param.getTimeoutFlag()) { - queryWrapper.isNotNull(Negative::getCompleteDate).apply("TIMESTAMPDIFF(HOUR, crtTime, completeDate) > 72"); + queryWrapper.eq(Negative::getProcessingStatus, ProcessingStatusEnum.completed.name()).gt(Negative::getHandleTimeout, 0); } else { - queryWrapper.isNotNull(Negative::getCompleteDate).apply("TIMESTAMPDIFF(HOUR, crtTime, completeDate) <= 72"); + queryWrapper + .and(query -> { + query.ne(Negative::getProcessingStatus, ProcessingStatusEnum.completed.name()).or().gt(Negative::getHandleTimeout, 0); + }); } } // 涉及单位 diff --git a/src/main/java/com/biutag/supervision/service/NegativeService.java b/src/main/java/com/biutag/supervision/service/NegativeService.java index 1cb1276..796b903 100644 --- a/src/main/java/com/biutag/supervision/service/NegativeService.java +++ b/src/main/java/com/biutag/supervision/service/NegativeService.java @@ -64,6 +64,8 @@ public class NegativeService extends ServiceImpl { private final SupDepartService departService; + private final FileClassService fileClassService; + public NegativeDetail get(String id, Integer workId) { Negative negative = getById(id); List blameVos = blameService.list(id); @@ -84,8 +86,12 @@ public class NegativeService extends ServiceImpl { vo.setInvolveProblemLables(involveProblemLables); } vo.setBlames(blameVos); - vo.setFiles(files); + vo.setThingFiles(thingFiles); + vo.setFiles(files); + if (StrUtil.isNotBlank(vo.getProblemSourcesCode())) { + vo.setFileClasses(fileClassService.list(vo.getProblemSourcesCode())); + } NegativeDetail detail = new NegativeDetail() .setNegative(vo) .setActionHistory(flows) diff --git a/src/main/resources/application-local.yml b/src/main/resources/application-local.yml index 7c967c0..506acbc 100644 --- a/src/main/resources/application-local.yml +++ b/src/main/resources/application-local.yml @@ -19,9 +19,9 @@ spring: port: 6379 password: 123456 -#mybatis-plus: -# configuration: -# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl +mybatis-plus: + configuration: + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl fdfs: tracker-list: #TrackerList参数,支持多个 diff --git a/src/main/resources/mapper/NegativeFavMapper.xml b/src/main/resources/mapper/NegativeFavMapper.xml index 77cb878..d04798b 100644 --- a/src/main/resources/mapper/NegativeFavMapper.xml +++ b/src/main/resources/mapper/NegativeFavMapper.xml @@ -5,8 +5,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - SELECT p.name label, count( DISTINCT n.id ) value @@ -54,13 +54,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEFT JOIN negative n ON nb.negativeId = n.id AND n.checkStatus IN ( '1', '2' ) AND n.crtTime BETWEEN #{beginTime} AND #{endTime} - WHERE p.org_id = #{departId} + WHERE p.org_id = #{departId} and n.id is not null GROUP BY p.name, p.id_code ORDER BY value DESC - LIMIT 10