From 9194a38a11cad4bff19d255a434c16c35a7ebcaf Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Thu, 2 Jun 2022 15:18:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=B1=E4=B8=9C=E4=B8=B4=E6=97=B6=E7=81=AB?= =?UTF-8?q?=E7=82=B9=E8=A1=A8=E5=88=B0=E5=85=A8=E5=9B=BD=E7=81=AB=E7=82=B9?= =?UTF-8?q?=E8=A1=A8=E7=9A=84=E6=96=B0=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xkrs/controller/FirePointController.java | 84 ++++++++++++------- 1 file changed, 53 insertions(+), 31 deletions(-) diff --git a/src/main/java/com/xkrs/controller/FirePointController.java b/src/main/java/com/xkrs/controller/FirePointController.java index 5ebddca..2696560 100644 --- a/src/main/java/com/xkrs/controller/FirePointController.java +++ b/src/main/java/com/xkrs/controller/FirePointController.java @@ -72,6 +72,29 @@ public class FirePointController { } } + /** + * 添加火点数据 + * + * @param firePointQo + * @return + */ + @PostMapping("/insertfirepointchanneltwo") + public String insertFirePointChannelTwo(@RequestBody FirePointQo firePointQo) { + // 获取区域信息 + Locale locale = LocaleContextHolder.getLocale(); + ShanDongFirePointEntity firePointEntity = firePointService.insertFirePointChannelTwo(firePointQo); + if (firePointEntity == null) { + return outputEncapsulationObject(PromptMessageEnum.PROCESS_FAIL, "添加数据失败", locale); + } else { + return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "添加成功", locale); + } + } + + /** + * 查询山东临时火点表 + * + * @return + */ @GetMapping("/queryshandongfirepointlist") public String queryShanDongFirePointList() { Locale locale = LocaleContextHolder.getLocale(); @@ -82,6 +105,36 @@ public class FirePointController { return outputEncapsulationObject(PromptMessageEnum.SUCCESS, shanDongFirePointList, locale); } + /** + * 将山东临时火点表中的火点根据火点编号更新审核状态 + * 操作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); + } + + /** + * 在全国火点表中根据火点编码修改审核火点状态 + */ + @Transactional(rollbackOn = Exception.class) + @PostMapping("/updateauditfiretype") + public String updateAuditFireType(@RequestBody AuditFireTypeQo auditFireTypeQo) { + // 获取区域信息 + Locale locale = LocaleContextHolder.getLocale(); + String fireCode = auditFireTypeQo.getFireCode(); + String auditFireType = auditFireTypeQo.getAuditFireType(); + FirePointEntity firePointByFireCode = firePointDao.findByFireCode(fireCode); + if (firePointByFireCode == null) { + return outputEncapsulationObject(PromptMessageEnum.PROCESS_FAIL, "修改失败,没有指定的火点编号", locale); + } + firePointDao.updateAuditFireTypeByFireCode(fireCode, auditFireType); + return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "修改成功", locale); + } + /** * 发短息 * @@ -99,37 +152,6 @@ public class FirePointController { return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "shanDongFirePointList", locale); } - - /** - * 根据火点编号更新审核状态 - * 操作1:将火点编号对应的火点从山东火点表转存到火点表 - * 操作2:将山东火点表中的这个火点的审核状态更新 - */ - @PostMapping("/updateverifystatebyfirecode") - public String updateVerifyStateByFireCode(@RequestBody ShanDongFirePointVerifyStateQo shanDongFirePointVerifyStateQo) { - String fireCode = shanDongFirePointVerifyStateQo.getFireCode(); - String verifyState = shanDongFirePointVerifyStateQo.getVerifyState(); - return firePointService.updateVerifyStateByFireCode(fireCode, verifyState); - } - - /** - * 根据火点编码修改审核火点状态 - */ - @Transactional(rollbackOn = Exception.class) - @PostMapping("/updateauditfiretype") - public String updateAuditFireType(@RequestBody AuditFireTypeQo auditFireTypeQo) { - // 获取区域信息 - Locale locale = LocaleContextHolder.getLocale(); - String fireCode = auditFireTypeQo.getFireCode(); - String auditFireType = auditFireTypeQo.getAuditFireType(); - FirePointEntity firePointByFireCode = firePointDao.findByFireCode(fireCode); - if (firePointByFireCode == null) { - return outputEncapsulationObject(PromptMessageEnum.PROCESS_FAIL, "修改失败,没有指定的火点编号", locale); - } - firePointDao.updateAuditFireTypeByFireCode(fireCode, auditFireType); - return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "修改成功", locale); - } - /** * 更新火点的街道编号数据 *