Browse Source

fix: 修复BUG

main
wxc 1 year ago
parent
commit
be4f3a668d
  1. 14
      sql/1106.sql
  2. 5
      src/main/java/com/biutag/supervision/constants/enums/ProblemSourcesEnum.java
  3. 11
      src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClueTaskController.java
  4. 2
      src/main/java/com/biutag/supervision/controller/sensitivePerception/ProfileDepartController.java
  5. 2
      src/main/java/com/biutag/supervision/controller/system/RoleController.java
  6. 31
      src/main/java/com/biutag/supervision/controller/work/NegativeController.java
  7. 2
      src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java
  8. 14
      src/main/java/com/biutag/supervision/flow/action/SaveAction.java
  9. 2
      src/main/java/com/biutag/supervision/flow/action/SecondLocalProcessingAction.java
  10. 1
      src/main/java/com/biutag/supervision/flow/action/ThreeSignReturnAction.java
  11. 2
      src/main/java/com/biutag/supervision/job/DepartJob.java
  12. 8
      src/main/java/com/biutag/supervision/mapper/FileClassMapper.java
  13. 4
      src/main/java/com/biutag/supervision/mapper/ProfileDepartMapper.java
  14. 3
      src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java
  15. 3
      src/main/java/com/biutag/supervision/pojo/dto/flow/VerifyData.java
  16. 35
      src/main/java/com/biutag/supervision/pojo/entity/FileClass.java
  17. 5
      src/main/java/com/biutag/supervision/pojo/model/NegativeFavModel.java
  18. 3
      src/main/java/com/biutag/supervision/pojo/model/NegativeWorkModel.java
  19. 4
      src/main/java/com/biutag/supervision/service/BaseRoleService.java
  20. 18
      src/main/java/com/biutag/supervision/service/FileClassService.java
  21. 11
      src/main/java/com/biutag/supervision/service/NegativeQueryService.java
  22. 8
      src/main/java/com/biutag/supervision/service/NegativeService.java
  23. 6
      src/main/resources/application-local.yml
  24. 3
      src/main/resources/mapper/NegativeFavMapper.xml
  25. 2
      src/main/resources/mapper/NegativeWorkMapper.xml
  26. 7
      src/main/resources/mapper/ProfileDepartMapper.xml
  27. 2
      src/test/java/com/biutag/supervision/tools/GenCodeTests.java

14
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);

5
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;

11
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<ModelClueTaskModel>> 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<Page<ModelClue>> listDepart(@PathVariable Integer taskId, Page<ModelClue> page) {
LambdaQueryWrapper<ModelClue> queryWrapper = new LambdaQueryWrapper<ModelClue>().eq(ModelClue::getTaskId, taskId);
return Result.success(modelClueService.page(page, queryWrapper));
}
}

2
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<BarItem> policeBarList = profileDepartMapper.selectPoliceTop10(departId, beginTime, endTime);
List<BarItem> policeBarList = profileDepartMapper.selectPoliceNegativeCount(departId, beginTime, endTime);
profileDepart.setPoliceBarList(policeBarList);
// 风险问题构成 雷达图

2
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));
}

31
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<Boolean> update(@Valid @RequestBody NegativeDto negativeDto) {
if (StrUtil.isBlank(negativeDto.getId())) {
throw new RuntimeException("数据异常,请系统联系管理员【问题ID为空】");
}
LambdaUpdateWrapper<Negative> 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<Boolean> execute(@PathVariable String id, @RequestBody ActionDto action) {
action.setNegativeId(id);

2
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 {

14
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()) {

2
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<Negative>()
.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()));
}

1
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);

2
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<SupDepart> departs = departService.list(new LambdaQueryWrapper<SupDepart>().eq(SupDepart::getLevel, 3));
departs.forEach(item -> {

8
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<FileClass> {
}

4
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<DepartNegativeModel> queryDepartNegative(Page<DepartNegativeModel> page, Date beginTime, Date endTime, String departName, String departId);
List<BarItem> selectPoliceTop10(String departId, Date beginTime, Date endTime);
List<BarItem> selectPoliceNegativeCount(String departId, Date beginTime, Date endTime);
List<BarItem> selectProblemType(String departId, Date beginTime, Date endTime);

3
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<NegativeThingFile> thingFiles = new ArrayList<>();
private List<FileClass> fileClasses = new ArrayList<>();
}

3
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<Blame> blames = new ArrayList<>();
private List<FileVo> files = new ArrayList<>();

35
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;
}

5
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;
}

3
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;
}

4
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<BaseRoleMapper, BaseRole> {
public List<BaseRole> list(RoleQueryParam roleQueryParam) {
LambdaQueryWrapper<BaseRole> 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);
}

18
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<FileClassMapper, FileClass> {
public List<FileClass> list(String problemSourcesCode) {
return list(new LambdaQueryWrapper<FileClass>().eq(FileClass::getProblemSourcesCode, problemSourcesCode).orderByAsc(FileClass::getSortId));
}
}

11
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);
});
}
}
// 涉及单位

8
src/main/java/com/biutag/supervision/service/NegativeService.java

@ -64,6 +64,8 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
private final SupDepartService departService;
private final FileClassService fileClassService;
public NegativeDetail get(String id, Integer workId) {
Negative negative = getById(id);
List<Blame> blameVos = blameService.list(id);
@ -84,8 +86,12 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
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)

6
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参数,支持多个

3
src/main/resources/mapper/NegativeFavMapper.xml

@ -5,8 +5,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.biutag.supervision.mapper.NegativeFavMapper">
<select id="queryPage" resultType="com.biutag.supervision.pojo.model.NegativeFavModel">
select f.negative_id, n.originId, n.happenTime, n.discoveryTime, n.problemSources, n.thingDesc, n.contactPhone, n.responderName,
n.businessTypeCode, n.businessTypeName, n.policeTypeName, n.policeType, n.involveDepartName, n.involveDepartId, n.processing_status
select f.negative_id, n.*
from negative_fav f
left join negative n on f.negative_id = n.id
${ew.getCustomSqlSegment}

2
src/main/resources/mapper/NegativeWorkMapper.xml

@ -8,7 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select w.id, w.negative_id, w.depart_id work_depart_id, n.originId, n.happenTime, n.discoveryTime, n.problemSources, n.thingDesc, n.contactPhone,
n.responderName, n.businessTypeCode, n.businessTypeName, n.policeTypeName, n.policeType, n.involveDepartName, n.involveDepartId, n.processing_status,
n.flow_key, n.first_distribute_time, n.max_sign_duration, n.max_handle_duration, n.extension_days,
n.handle_second_depart_id, n.handle_second_depart_name, n.handle_three_depart_id, n.handle_three_depart_name, n.involveProblem
n.handle_second_depart_id, n.handle_second_depart_name, n.handle_three_depart_id, n.handle_three_depart_name, n.involveProblem, n.extension_apply_flag
from negative_work w
left join negative n on w.negative_id = n.id
${ew.getCustomSqlSegment}

7
src/main/resources/mapper/ProfileDepartMapper.xml

@ -44,7 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
verify_size DESC
</select>
<select id="selectPoliceTop10" resultType="com.biutag.supervision.pojo.dto.common.BarItem">
<select id="selectPoliceNegativeCount" resultType="com.biutag.supervision.pojo.dto.common.BarItem">
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
</select>
<select id="selectProblemType" resultType="com.biutag.supervision.pojo.dto.common.BarItem">
@ -95,6 +94,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND n.checkStatus IN ( '1', '2' )
AND n.involveDepartId = #{departId}
AND n.crtTime BETWEEN #{beginTime} AND #{endTime}
where
pr.`threeLevelContent` is not null
GROUP BY
pr.`threeLevelContent`
having value > 0

2
src/test/java/com/biutag/supervision/tools/GenCodeTests.java

@ -25,7 +25,7 @@ public class GenCodeTests {
@Test
public void genEntity() throws TemplateException, IOException {
String tableName = "sup_depart_police_size";
String tableName = "file_class";
String tableSchema = "negative";
boolean genMapper = true;
boolean genService = true;

Loading…
Cancel
Save