From c88e71d62fdcebf292737f74ad75305caa48de59 Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Tue, 10 Jan 2023 14:30:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xkrs/controller/FileController.java | 22 ++- .../xkrs/controller/FirePointController.java | 13 -- .../com/xkrs/model/entity/FireAndRanger.java | 151 ------------------ .../qo/ShanDongFirePointVerifyStateQo.java | 38 ----- .../java/com/xkrs/model/qo/SysUserQo.java | 5 - .../model/validation/SettingQoUpdate.java | 4 - .../ShanDongFirePointVerifyStateQoUpdate.java | 4 - 7 files changed, 10 insertions(+), 227 deletions(-) delete mode 100644 src/main/java/com/xkrs/model/entity/FireAndRanger.java delete mode 100644 src/main/java/com/xkrs/model/qo/ShanDongFirePointVerifyStateQo.java delete mode 100644 src/main/java/com/xkrs/model/validation/SettingQoUpdate.java delete mode 100644 src/main/java/com/xkrs/model/validation/ShanDongFirePointVerifyStateQoUpdate.java diff --git a/src/main/java/com/xkrs/controller/FileController.java b/src/main/java/com/xkrs/controller/FileController.java index e1b7cba..9e45a33 100644 --- a/src/main/java/com/xkrs/controller/FileController.java +++ b/src/main/java/com/xkrs/controller/FileController.java @@ -21,10 +21,6 @@ import java.util.Map; import static com.xkrs.common.encapsulation.OutputEncapsulation.outputEncapsulationObject; import static com.xkrs.utils.FileUtil.getUploadInfo; -/** - * @author XinYi Song - * 文件上传 - */ @RestController public class FileController { @@ -36,20 +32,20 @@ public class FileController { /** * 上传多张图片 + * * @param files * @return */ @PostMapping("/uploadFileMore") public String uploadFileMore(MultipartFile[] files) throws Exception { Locale locale = LocaleContextHolder.getLocale(); - if (null == files || files.length == 0){ + if (null == files || files.length == 0) { return outputEncapsulationObject(PromptMessageEnum.PARAM_NULL, "result or fileType is null", locale); } List list = new ArrayList(); - for (MultipartFile file : - files) { + for (MultipartFile file : files) { boolean m = FileUtil.checkFileSize(file.getSize(), 100, "M"); - if(m == false){ + if (m == false) { return outputEncapsulationObject(PromptMessageEnum.DATA_WRONG, "图片大小不能超过100M", locale); } File file1 = fileFastDfs.multipartFileToFile(file); @@ -72,17 +68,18 @@ public class FileController { /** * 上传单张图片 + * * @param file * @return */ @PostMapping("/uploadFile") public String uploadFile(MultipartFile file) throws Exception { Locale locale = LocaleContextHolder.getLocale(); - if (null == file){ + if (null == file) { return outputEncapsulationObject(PromptMessageEnum.PARAM_NULL, "result or fileType is null", locale); } boolean m = FileUtil.checkFileSize(file.getSize(), 100, "M"); - if(m == false){ + if (m == false) { return outputEncapsulationObject(PromptMessageEnum.DATA_WRONG, "图片大小不能超过100M", locale); } File file1 = fileFastDfs.multipartFileToFile(file); @@ -104,13 +101,14 @@ public class FileController { /** * 查询火点图片路径 + * * @return */ @GetMapping("/findPath") - public String findPath(){ + public String findPath() { Locale locale = LocaleContextHolder.getLocale(); List> path = filePathDao.findPath(); - if(path == null || path.size() == 0){ + if (path == null || path.size() == 0) { return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "还未上传任何图片信息!", locale); } return outputEncapsulationObject(PromptMessageEnum.SUCCESS, path, locale); diff --git a/src/main/java/com/xkrs/controller/FirePointController.java b/src/main/java/com/xkrs/controller/FirePointController.java index 8806300..c1e31ba 100644 --- a/src/main/java/com/xkrs/controller/FirePointController.java +++ b/src/main/java/com/xkrs/controller/FirePointController.java @@ -8,7 +8,6 @@ import com.xkrs.model.entity.FirePointEntity; import com.xkrs.model.entity.SysUserEntity; import com.xkrs.model.qo.AuditFireTypeQo; import com.xkrs.model.qo.FirePointQo; -import com.xkrs.model.qo.ShanDongFirePointVerifyStateQo; import com.xkrs.service.FirePointService; import com.xkrs.service.StreetService; import com.xkrs.service.impl.FirePointServiceImpl; @@ -90,18 +89,6 @@ public class FirePointController { } } - /** - * 将山东临时火点表中的火点根据火点编号更新审核状态 - * 操作1:如果verifyState==1,将火点编号对应的火点从山东火点表转存到火点表 - * 操作2:将山东火点表中的这个火点的审核状态更新 - */ - @PostMapping("/updateverifystatebyfirecode") - public String updateVerifyStateByFireCode(@RequestBody ShanDongFirePointVerifyStateQo shanDongFirePointVerifyStateQo) { - String fireCode = shanDongFirePointVerifyStateQo.getFireCode(); - String verifyState = shanDongFirePointVerifyStateQo.getVerifyState(); - return firePointService.updateVerifyStateByFireCode(fireCode, verifyState); - } - /** * 在全国火点表中根据火点编码修改审核火点状态 */ diff --git a/src/main/java/com/xkrs/model/entity/FireAndRanger.java b/src/main/java/com/xkrs/model/entity/FireAndRanger.java deleted file mode 100644 index ea549bf..0000000 --- a/src/main/java/com/xkrs/model/entity/FireAndRanger.java +++ /dev/null @@ -1,151 +0,0 @@ -package com.xkrs.model.entity; - -import javax.persistence.*; - -/** - * 护林员和火点中间表 - * @author xkrs - */ -@Entity -@Table(name="fire_and_ranger") -public class FireAndRanger { - - /** - * 主键id - */ - @Id - @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "fire_and_ranger_seq_gen") - @SequenceGenerator(name = "fire_and_ranger_seq_gen", sequenceName = "fire_and_ranger_id_seq",allocationSize = 1) - private Integer id; - - /** - * 护林员的账号(手机号作为和火点的标识) - */ - @Column(length = 65, columnDefinition = "varchar(65)") - private String rangerName; - - /** - * 火点编码 - */ - @Column(length = 65, columnDefinition = "varchar(65)") - private String fireCode; - - /** - * 处理人 - */ - @Column(length = 65, columnDefinition = "varchar(65)") - private String handler; - - /** - * 核查人 - */ - @Column(length = 65, columnDefinition = "varchar(65)") - private String verifier; - - /** - * 处理时间(核查时间) - */ - @Column(length = 65, columnDefinition = "varchar(65)") - private String handlerTime; - - /** - * 结束时间 - */ - @Column(length = 65, columnDefinition = "varchar(65)") - private String endTime; - - @Column(length = 32, columnDefinition = "varchar(32)") - private String progressType; - - public FireAndRanger() { - } - - public FireAndRanger(Integer id, String rangerName, String fireCode, String handler, String verifier, String handlerTime, String endTime, String progressType) { - this.id = id; - this.rangerName = rangerName; - this.fireCode = fireCode; - this.handler = handler; - this.verifier = verifier; - this.handlerTime = handlerTime; - this.endTime = endTime; - this.progressType = progressType; - } - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getRangerName() { - return rangerName; - } - - public void setRangerName(String rangerName) { - this.rangerName = rangerName; - } - - public String getFireCode() { - return fireCode; - } - - public void setFireCode(String fireCode) { - this.fireCode = fireCode; - } - - public String getHandler() { - return handler; - } - - public void setHandler(String handler) { - this.handler = handler; - } - - public String getVerifier() { - return verifier; - } - - public void setVerifier(String verifier) { - this.verifier = verifier; - } - - public String getHandlerTime() { - return handlerTime; - } - - public void setHandlerTime(String handlerTime) { - this.handlerTime = handlerTime; - } - - public String getEndTime() { - return endTime; - } - - public void setEndTime(String endTime) { - this.endTime = endTime; - } - - public String getProgressType() { - return progressType; - } - - public void setProgressType(String progressType) { - this.progressType = progressType; - } - - @Override - public String toString() { - return "FireAndRanger{" + - "id=" + id + - ", rangerName='" + rangerName + '\'' + - ", fireCode='" + fireCode + '\'' + - ", handler='" + handler + '\'' + - ", verifier='" + verifier + '\'' + - ", handlerTime='" + handlerTime + '\'' + - ", endTime='" + endTime + '\'' + - ", progressType='" + progressType + '\'' + - '}'; - } -} diff --git a/src/main/java/com/xkrs/model/qo/ShanDongFirePointVerifyStateQo.java b/src/main/java/com/xkrs/model/qo/ShanDongFirePointVerifyStateQo.java deleted file mode 100644 index e6e725d..0000000 --- a/src/main/java/com/xkrs/model/qo/ShanDongFirePointVerifyStateQo.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.xkrs.model.qo; - -import com.xkrs.model.validation.ShanDongFirePointVerifyStateQoUpdate; - -import javax.validation.constraints.NotNull; - -public class ShanDongFirePointVerifyStateQo { - - @NotNull(message = "{FirePoint.fireCode.blank}", groups = {ShanDongFirePointVerifyStateQoUpdate.class}) - private String fireCode; - - @NotNull(message = "{FirePoint.verifyState.blank}", groups = {ShanDongFirePointVerifyStateQoUpdate.class}) - private String verifyState; - - public ShanDongFirePointVerifyStateQo() { - } - - public String getFireCode() { - return fireCode; - } - - public void setFireCode(String fireCode) { - this.fireCode = fireCode; - } - - public String getVerifyState() { - return verifyState; - } - - public void setVerifyState(String verifyState) { - this.verifyState = verifyState; - } - - @Override - public String toString() { - return "ShanDongFirePointVerifyStateQo{" + "fireCode='" + fireCode + '\'' + ", verifyState='" + verifyState + '\'' + '}'; - } -} diff --git a/src/main/java/com/xkrs/model/qo/SysUserQo.java b/src/main/java/com/xkrs/model/qo/SysUserQo.java index fa54f2b..b4d71ba 100644 --- a/src/main/java/com/xkrs/model/qo/SysUserQo.java +++ b/src/main/java/com/xkrs/model/qo/SysUserQo.java @@ -9,11 +9,6 @@ import javax.validation.constraints.NotNull; import javax.validation.constraints.Pattern; import javax.validation.constraints.Size; -/** - * SysUserQo - * - * @author tajochen - */ public class SysUserQo { @NotNull(message = "{SysUser.id.blank}", groups = {SysUserQoUpdate.class}) diff --git a/src/main/java/com/xkrs/model/validation/SettingQoUpdate.java b/src/main/java/com/xkrs/model/validation/SettingQoUpdate.java deleted file mode 100644 index 7d05642..0000000 --- a/src/main/java/com/xkrs/model/validation/SettingQoUpdate.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.xkrs.model.validation; - -public interface SettingQoUpdate { -} diff --git a/src/main/java/com/xkrs/model/validation/ShanDongFirePointVerifyStateQoUpdate.java b/src/main/java/com/xkrs/model/validation/ShanDongFirePointVerifyStateQoUpdate.java deleted file mode 100644 index 42f06d3..0000000 --- a/src/main/java/com/xkrs/model/validation/ShanDongFirePointVerifyStateQoUpdate.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.xkrs.model.validation; - -public interface ShanDongFirePointVerifyStateQoUpdate { -}