ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java
@@ -251,7 +251,7 @@ @ApiOperation(value = "结案") @PutMapping("/end_case") public CommonResult endCase(@RequestParam Integer caseId, @RequestParam String result) { public CommonResult endCase(@RequestParam Long caseId, @RequestParam String result) { baseCaseService.endCase(caseId, result); return CommonResult.success("end case success~!"); } ycl-platform/src/main/java/com/ycl/controller/caseHandler/DispatchHandleController.java
@@ -57,7 +57,7 @@ @ApiOperation(value = "上传违规/违建处置结果") @PostMapping("/addition_dispose_result") public CommonResult searchDisposeList(@RequestParam Integer caseId, public CommonResult searchDisposeList(@RequestParam Long caseId, @RequestParam Integer type, @RequestBody UploadDisposingResultParam uploadDisposingResultParam) { AdminUserDetails user = (AdminUserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); @@ -79,7 +79,7 @@ BeanUtils.copyProperties(uploadDisposingResultParam, investigation); investigation.setBaseCaseId(caseId); investigation.setCreateTime(LocalDateTime.now()); investigation.setCreateUser(user.getUserId().intValue()); investigation.setCreateUser(user.getUserId().longValue()); investigation.setPartyId(partyInfo.getId()); iInvestigationService.save(investigation); //到达 @@ -87,7 +87,7 @@ BeanUtils.copyProperties(uploadDisposingResultParam, arrivalSituation); arrivalSituation.setBaseCaseId(caseId); arrivalSituation.setCreateTime(LocalDateTime.now()); arrivalSituation.setCreateUser(user.getUserId().intValue()); arrivalSituation.setCreateUser(user.getUserId().longValue()); iArrivalSituationService.save(arrivalSituation); //文书 Integer illegalBuildingType = 2; @@ -97,7 +97,7 @@ writ.setBaseCaseId(caseId); writ.setIllegalBuildingId(caseId); writ.setCreateTime(LocalDateTime.now()); writ.setCreateUser(user.getUserId().intValue()); writ.setCreateUser(user.getUserId().longValue()); iWritService.save(writ); } baseCaseService.update(new LambdaUpdateWrapper<BaseCase>().eq(BaseCase::getId, caseId).set(BaseCase::getState, BaseCaseStatus.CHECK)); @@ -105,7 +105,7 @@ disposeRecord.setBaseCaseId(caseId); disposeRecord.setState(0); disposeRecord.setCreateTime(LocalDateTime.now()); disposeRecord.setCreateUser(user.getUserId().intValue()); disposeRecord.setCreateUser(user.getUserId().longValue()); disposeRecord.setStepName("核查"); iDisposeRecordService.save(disposeRecord); return CommonResult.success("add success"); ycl-platform/src/main/java/com/ycl/controller/message/MessageController.java
@@ -1,5 +1,17 @@ package com.ycl.controller.message; import com.ycl.api.CommonResult; import com.ycl.bo.AdminUserDetails; import com.ycl.dto.message.MessageParam; import com.ycl.service.message.IMessageService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; /** * <p> * 消息管理 前端控制器 @@ -8,5 +20,21 @@ * @author mg * @since 2022-10-08 */ @RestController @RequestMapping("/message") @Api(tags = "消息") public class MessageController { @Autowired IMessageService iMessageService; @ApiOperation(value = "发送消息") @RequestMapping(value = "/sendMessage", method = RequestMethod.POST) @ResponseBody public CommonResult sendMessage(@Validated @RequestBody MessageParam messageParam) { AdminUserDetails user = (AdminUserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); //设置创建人 messageParam.setCreateUser(user.getUserId()); return CommonResult.success(iMessageService.sendMessage(messageParam)); } } ycl-platform/src/main/java/com/ycl/dto/caseHandler/ChechParam.java
@@ -19,12 +19,12 @@ * 案件id */ @ApiModelProperty(value = "案件id") private Integer baseCaseId; private Long baseCaseId; /** * 当前处理人 */ @ApiModelProperty(value = "当前处理人") private Integer currentUser; private Long currentUser; /** * 审核状态 */ ycl-platform/src/main/java/com/ycl/dto/caseHandler/DispatchInfoParam.java
@@ -19,12 +19,12 @@ * 案件id */ @ApiModelProperty(value = "案件id") private Integer baseCaseId; private Long baseCaseId; /** * 执法人员 */ @ApiModelProperty(value = "执法人员") private Integer lawEnforcer; private Long lawEnforcer; /** * 执法人员姓名 */ @@ -34,7 +34,7 @@ * 执法车 */ @ApiModelProperty(value = "执法车") private Integer enforcementCar; private Long enforcementCar; /** * 执法队伍 */ ycl-platform/src/main/java/com/ycl/dto/message/MessageParam.java
New file @@ -0,0 +1,77 @@ package com.ycl.dto.message; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; /** * <p> * 消息参数体 * </p> * * @author mg * @since 2022-10-08 */ @Data @ApiModel("消息参数体") public class MessageParam { /** * 标题 */ @ApiModelProperty(value = "标题") @NotBlank(message = "标题为空") private String head; /** * 消息类型 */ @ApiModelProperty(value = "消息类型") @NotBlank(message = "消息类型为空") private Long messageType; /** * 消息体 */ @ApiModelProperty(value = "消息体") @NotNull(message = "消息体为空") private String body; /** * 发送者 */ @ApiModelProperty(value = "发送者") @NotNull(message = "发送者为空") private String targetFrom; /** * 接收者 */ @ApiModelProperty(value = "接收者") @NotBlank(message = "接收者为空") private String targetTo; /** * 随机码 */ @ApiModelProperty(value = "随机码") private String randomCode; /** * 发送时间 */ @ApiModelProperty(value = "发送时间") @NotBlank(message = "发送时间为空") private String sendTime; /** * 状态0-未发布1-已发布 */ @ApiModelProperty(value = "状态0-未发布1-已发布") private Integer status; /** * 备注 */ @ApiModelProperty(value = "备注 ps:预留字段") private String remark; /** * 创建人 */ @ApiModelProperty(value = "创建人") private Long createUser; } ycl-platform/src/main/java/com/ycl/entity/caseHandler/ArrivalSituation.java
@@ -30,14 +30,14 @@ @TableId(value = "id", type = IdType.AUTO) @ApiModelProperty(value = "id") private Integer id; private Long id; /** * 案件id */ @TableField("base_case_id") @ApiModelProperty(value = "案件id") private Integer baseCaseId; private Long baseCaseId; /** * 到达时间 @@ -79,7 +79,7 @@ */ @TableField("create_user") @ApiModelProperty(value = "创建人") private Integer createUser; private Long createUser; /** * 创建时间 ycl-platform/src/main/java/com/ycl/entity/caseHandler/BaseCase.java
@@ -35,7 +35,7 @@ */ @TableId(value = "id", type = IdType.AUTO) @ApiModelProperty(value = "id") private Integer id; private Long id; /** * 事件编号 @@ -105,7 +105,7 @@ */ @TableField("create_user") @ApiModelProperty(value = "登记人") private Integer createUser; private Long createUser; /** * 处理状态(0误报 1上报 2立案 3派遣 4处置 5核查 6结案) ycl-platform/src/main/java/com/ycl/entity/caseHandler/DispatchInfo.java
@@ -94,7 +94,7 @@ */ @TableField("create_user") @ApiModelProperty(value = "创建人") private Integer createUser; private Long createUser; /** * 创建时间 */ ycl-platform/src/main/java/com/ycl/entity/caseHandler/DisposeRecord.java
@@ -29,21 +29,21 @@ private static final long serialVersionUID = 1L; @TableId(value = "id", type = IdType.AUTO) private Integer id; private Long id; /** * 案件id */ @TableField("base_case_id") @ApiModelProperty(value = "案件id") private Integer baseCaseId; private Long baseCaseId; /** * 处置流程环节配置Id */ @TableField("workflow_config_step_id") @ApiModelProperty(value = "处置流程环节配置Id") private Integer workflowConfigStepId; private Long workflowConfigStepId; /** * 环节名称 @@ -92,7 +92,7 @@ */ @TableField("create_user") @ApiModelProperty(value = "创建人") private Integer createUser; private Long createUser; /** * 创建时间 ycl-platform/src/main/java/com/ycl/entity/caseHandler/IllegalBuilding.java
@@ -1,12 +1,12 @@ package com.ycl.entity.caseHandler; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.Version; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableField; import java.io.Serializable; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import lombok.EqualsAndHashCode; import java.io.Serializable; /** * <p> @@ -27,7 +27,7 @@ * 案件id(同ums_base_case表id) */ @TableId("base_case_id") private Integer baseCaseId; private Long baseCaseId; /** * 违建类别 ycl-platform/src/main/java/com/ycl/entity/caseHandler/Investigation.java
@@ -11,6 +11,7 @@ import java.io.Serializable; import java.time.LocalDateTime; import java.util.Date; /** * <p> @@ -30,14 +31,14 @@ @TableId(value = "id", type = IdType.AUTO) @ApiModelProperty(value = "id") private Integer id; private Long id; /** * 案件id */ @TableField("base_case_id") @ApiModelProperty(value = "案件id") private Integer baseCaseId; private Long baseCaseId; /** * 承办队员 @@ -58,7 +59,7 @@ */ @TableField("investigation_time") @ApiModelProperty(value = "时间") private LocalDateTime investigationTime; private Date investigationTime; /** * 地址 @@ -100,7 +101,7 @@ */ @TableField("create_user") @ApiModelProperty(value = "创建人") private Integer createUser; private Long createUser; /** * 创建时间 ycl-platform/src/main/java/com/ycl/entity/caseHandler/Violations.java
@@ -1,12 +1,11 @@ package com.ycl.entity.caseHandler; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.Version; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableField; import java.io.Serializable; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.*; import java.io.Serializable; /** * <p> @@ -30,7 +29,7 @@ * 案件id(同ums_base_case表id) */ @TableId("id") private Integer id; private Long id; /** * 大类 ycl-platform/src/main/java/com/ycl/entity/caseHandler/WorkflowConfigStep.java
@@ -32,14 +32,14 @@ */ @TableId(value = "id", type = IdType.AUTO) @ApiModelProperty(value = "id") private Integer id; private Long id; /** * 处置流程配置id */ @TableField(value = "workflow_config_id") @ApiModelProperty(value = "处置流程配置id") private Integer workflowConfigId ; private Long workflowConfigId ; /** * 环节名称 ycl-platform/src/main/java/com/ycl/entity/caseHandler/Writ.java
@@ -32,14 +32,14 @@ */ @TableId("base_case_id") @ApiModelProperty(value = "案件id") private Integer baseCaseId; private Long baseCaseId; /** * 违建id */ @TableField("illegal_building_id") @ApiModelProperty(value = "违建id") private Integer illegalBuildingId; private Long illegalBuildingId; /** * 文书种类 @@ -137,7 +137,7 @@ */ @TableField("create_user") @ApiModelProperty(value = "创建人") private Integer createUser; private Long createUser; /** * 创建时间 ycl-platform/src/main/java/com/ycl/entity/message/Message.java
New file @@ -0,0 +1,155 @@ package com.ycl.entity.message; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import java.io.Serializable; import java.util.Date; /** * <p> * 消息实体类 * </p> * * @author mg * @since 2022-10-08 */ @Data @EqualsAndHashCode(callSuper = false) @TableName("ums_message") @ApiModel(value = "消息表") public class Message implements Serializable { private static final long serialVersionUID = 1L; /** * 主键 */ @TableId(value = "id", type = IdType.AUTO) @ApiModelProperty(value = "主键") private Long id; /** * 标题 */ @TableField("head") @ApiModelProperty(value = "标题") @NotBlank(message = "标题为空") private String head; /** * 消息类型 */ @TableField("message_type") @ApiModelProperty(value = "消息类型") @NotBlank(message = "消息类型为空") private Long messageType; /** * 消息体 */ @TableField("body") @ApiModelProperty(value = "消息体") @NotNull(message = "消息体为空") private String body; /** * 发送者 */ @TableField("target_from") @ApiModelProperty(value = "发送者") @NotNull(message = "发送者为空") private String targetFrom; /** * 接收者 */ @TableField("target_to") @ApiModelProperty(value = "接收者") @NotBlank(message = "接收者为空") private String targetTo; /** * 消息编号 */ @TableField("message_number") @ApiModelProperty(value = "消息编号") @NotBlank(message = "消息编号为空") private String messageNumber; /** * 随机码 */ @TableField("random_code") @ApiModelProperty(value = "随机码") private String randomCode; /** * 过期时间 */ @TableField("over_time") @ApiModelProperty(value = "过期时间") private Date overTime; /** * 发送时间 */ @TableField("send_time") @ApiModelProperty(value = "发送时间") private Date sendTime; /** * 状态0-未发布1-已发布 */ @TableField("status") @ApiModelProperty(value = "状态0-未发布1-已发布") private Integer status; /** * 是否查看0-未查看1-已查看 */ @TableField("is_view") @ApiModelProperty(value = "状态0-未发布1-已发布") private Integer isView; /** * 备注 */ @TableField("remark") @ApiModelProperty(value = "备注 ps:预留字段") private String remark; /** * 数据版本 */ @TableField("version") @ApiModelProperty(value = "数据版本") private Integer version; /** * 创建人 */ @TableField("create_user") @ApiModelProperty(value = "创建人") private Long createUser; /** * 创建时间 */ @TableField("create_time") @ApiModelProperty(value = "创建时间") private Date createTime; /** * 更新人 */ @TableField("update_user") @ApiModelProperty(value = "创建人") private Long updateUser; /** * 更新时间 */ @TableField("update_time") @ApiModelProperty(value = "更新时间") private Date updateTime; } ycl-platform/src/main/java/com/ycl/mapper/message/MessageMapper.java
New file @@ -0,0 +1,15 @@ package com.ycl.mapper.message; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ycl.entity.message.Message; /** * <p> * 消息 Mapper 接口 * </p> * * @author mg * @since 2022-10-08 */ public interface MessageMapper extends BaseMapper<Message> { } ycl-platform/src/main/java/com/ycl/service/caseHandler/IBaseCaseService.java
@@ -32,9 +32,9 @@ Page listIllegalBuilding(Page page, Integer state, Integer resource); Boolean saveViolationCase(ViolationParam violationParam,Integer id); Boolean saveViolationCase(ViolationParam violationParam,Long id); Boolean saveIllegalBuildingCase(IllegalBuildingParam illegalBuildingParam, Integer id); Boolean saveIllegalBuildingCase(IllegalBuildingParam illegalBuildingParam, Long id); /** * 同步案件进度 * @@ -49,5 +49,5 @@ ArrayList<String> listCaseImages(Integer id, Integer type); void endCase(Integer caseId, String result); void endCase(Long caseId, String result); } ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java
@@ -196,7 +196,7 @@ } @Override public Boolean saveViolationCase(ViolationParam violationParam, Integer id) { public Boolean saveViolationCase(ViolationParam violationParam, Long id) { Violations violations = new Violations(); BeanUtils.copyProperties(violationParam, violations); violations.setId(id); @@ -205,7 +205,7 @@ } @Override public Boolean saveIllegalBuildingCase(IllegalBuildingParam illegalBuildingParam, Integer id) { public Boolean saveIllegalBuildingCase(IllegalBuildingParam illegalBuildingParam, Long id) { IllegalBuilding illegalBuilding = new IllegalBuilding(); BeanUtils.copyProperties(illegalBuildingParam, illegalBuilding); illegalBuilding.setBaseCaseId(id); @@ -318,7 +318,7 @@ } @Override public void endCase(Integer caseId, String result) { public void endCase(Long caseId, String result) { AdminUserDetails user = (AdminUserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); Integer state = 1; String endCaseName = "结案"; @@ -331,7 +331,7 @@ disposeRecord.setWorkflowConfigStepId(workflowConfigStepMapper .selectOne(new LambdaQueryWrapper<WorkflowConfigStep>().eq(WorkflowConfigStep::getName, endCaseName)) .getWorkflowConfigId()); disposeRecord.setCreateUser(user.getUserId().intValue()); disposeRecord.setCreateUser(user.getUserId().longValue()); disposeRecord.setResult(result); disposeRecord.setState(state); disposeRecord.setCreateTime(LocalDateTime.now()); ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/CheckHandleServiceImpl.java
@@ -33,7 +33,7 @@ //新增流程记录信息 DisposeRecord disposeRecord = new DisposeRecord(); disposeRecord.setBaseCaseId(chechParam.getBaseCaseId()); disposeRecord.setWorkflowConfigStepId(3); disposeRecord.setWorkflowConfigStepId(3L); disposeRecord.setState(chechParam.getStatus()); disposeRecord.setCreateUser(chechParam.getCurrentUser()); disposeRecord.setStepName("核查"); ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/ViolationsServiceImpl.java
@@ -1,19 +1,17 @@ package com.ycl.service.caseHandler.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ycl.entity.caseHandler.BaseCase; import com.ycl.entity.caseHandler.EventSource; import com.ycl.entity.caseHandler.QuestionCategory; import com.ycl.entity.caseHandler.Violations; import com.ycl.entity.dict.DataDictionary; import com.ycl.entity.video.VideoAlarmReport; import com.ycl.entity.video.VideoPoint; import com.ycl.mapper.caseHandler.ViolationsMapper; import com.ycl.service.caseHandler.IBaseCaseService; import com.ycl.service.caseHandler.IViolationsService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ycl.service.video.impl.IVideoPointService; import com.ycl.service.video.impl.VideoPointServiceImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -53,7 +51,7 @@ videoPoint = pointList.get(0); } BaseCase baseCase = BaseCase.builder().eventSource(EventSource.VIDEO.getCode()).category(QuestionCategory.VIOLATION.getCode()) .createTime(LocalDateTime.now()).createUser(0).state(1).alarmTime(videoAlarmReport.getAlarmTime()).build(); .createTime(LocalDateTime.now()).createUser(0L).state(1).alarmTime(videoAlarmReport.getAlarmTime()).build(); Violations violations = new Violations(); if (videoPoint != null) { baseCase.setLatitude(videoPoint.getLatitude()); ycl-platform/src/main/java/com/ycl/service/message/IMessageService.java
New file @@ -0,0 +1,18 @@ package com.ycl.service.message; import com.baomidou.mybatisplus.extension.service.IService; import com.ycl.dto.message.MessageParam; import com.ycl.entity.message.Message; /** * <p> * 消息服务类 * </p> * * @author mg * @since 2022-10-08 */ public interface IMessageService extends IService<Message> { Message sendMessage(MessageParam messageParam); } ycl-platform/src/main/java/com/ycl/service/message/impl/IMessageServiceImpl.java
New file @@ -0,0 +1,33 @@ package com.ycl.service.message.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ycl.dto.message.MessageParam; import com.ycl.entity.message.Message; import com.ycl.mapper.message.MessageMapper; import com.ycl.service.message.IMessageService; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import java.util.Date; /** * <p> * 服务实现类 * </p> * * @author mg * @since 2022-10-08 */ @Service public class IMessageServiceImpl extends ServiceImpl<MessageMapper, Message> implements IMessageService { @Override public Message sendMessage(MessageParam mssageParam) { Message message = new Message(); BeanUtils.copyProperties(mssageParam, message); //生成默认参数 message.setCreateTime(new Date()); message.setUpdateTime(new Date()); baseMapper.insert(message); return message; } }