From 3912ec2bd1fc4b86909807904ab39f4c11a3e5f3 Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Wed, 26 Apr 2023 09:35:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E7=81=AB=E7=82=B9=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xkrs/controller/DispatchFirePointController.java | 12 +++++------- .../service/impl/DispatchFirePointServiceImpl.java | 12 ++++++------ 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/xkrs/controller/DispatchFirePointController.java b/src/main/java/com/xkrs/controller/DispatchFirePointController.java index 9d9d4aa..4139697 100644 --- a/src/main/java/com/xkrs/controller/DispatchFirePointController.java +++ b/src/main/java/com/xkrs/controller/DispatchFirePointController.java @@ -66,13 +66,11 @@ public class DispatchFirePointController { // sysUserDao.save(sysUserEntity); // } - //310 0000 - - for (int i = 0; i < 10000; i++) { - firePointOrdinaryDao.updateProCityCode(i * 310L, (i + 1) * 310L); - firePointOrdinaryDao.updateProCityName(i * 310L, (i + 1) * 310L); - System.out.println(i + "/" + 10000); - } +// for (int i = 0; i < 10000; i++) { +// firePointOrdinaryDao.updateProCityCode(i * 310L, (i + 1) * 310L); +// firePointOrdinaryDao.updateProCityName(i * 310L, (i + 1) * 310L); +// System.out.println(i + "/" + 10000); +// } return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "OKKKK", locale); } diff --git a/src/main/java/com/xkrs/service/impl/DispatchFirePointServiceImpl.java b/src/main/java/com/xkrs/service/impl/DispatchFirePointServiceImpl.java index 27952a0..11228da 100644 --- a/src/main/java/com/xkrs/service/impl/DispatchFirePointServiceImpl.java +++ b/src/main/java/com/xkrs/service/impl/DispatchFirePointServiceImpl.java @@ -179,19 +179,19 @@ public class DispatchFirePointServiceImpl implements DispatchFirePointService { }; //根据fireCode找到火点 List firePointList = firePointOrdinaryDao.findAll(specification); - if (firePointList.size() == 1) { - FirePointOrdinaryEntity firePoint = firePointList.get(0); + for (FirePointOrdinaryEntity firePoint : firePointList) { firePoint.setFireStatus(status);//设置火点的研判标志属性 firePointOrdinaryDao.save(firePoint);//数据库保存 - } else { - ErrorInfoLogUtils.log("操作异常,审核系统发送的fireCode在秸秆系统中size() != 1:fireCode = " + fireCode + ",status = " + fireCode); + } + if (firePointList.size() != 1) { + ErrorInfoLogUtils.log("item 更新成功。数据异常,审核系统发送的fireCode在秸秆系统中size() != 1:fireCode = " + fireCode + ",status = " + fireCode); } } catch (Exception e) { e.printStackTrace(); - return outputEncapsulationObject(PromptMessageEnum.PROCESS_FAIL, "更新失败", locale); + return outputEncapsulationObject(PromptMessageEnum.PROCESS_FAIL, "item 更新失败", locale); } } - return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "更新成功", locale); + return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "for 更新成功", locale); } }