From 4448638a48b8687196291e901f23ed2522e64c2d Mon Sep 17 00:00:00 2001 From: wr <1754607820@qq.com> Date: Tue, 1 Aug 2023 15:35:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BD=E7=BD=91=E4=B8=8A=E9=80=81=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=EF=BC=8C=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../process/pojo/param/SupvProblemParam.java | 2 +- .../service/impl/SupvPushGwServiceImpl.java | 24 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvProblemParam.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvProblemParam.java index 9e8d19953..9713fbfa2 100644 --- a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvProblemParam.java +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SupvProblemParam.java @@ -150,7 +150,7 @@ public class SupvProblemParam extends BaseParam { private String rectificationStatus; @NotBlank(message = "问题发现时间") - @DateTimeStrValid(message = "问题发现时间格式有误") + @DateTimeStrValid(format="yyyy-MM-dd HH:mm:ss",message = "问题发现时间格式有误") private String discoveryTime; @EqualsAndHashCode(callSuper = true) diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvPushGwServiceImpl.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvPushGwServiceImpl.java index 4b270712e..043368df9 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvPushGwServiceImpl.java +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvPushGwServiceImpl.java @@ -228,10 +228,10 @@ public class SupvPushGwServiceImpl implements SupvPushGwService { return "操作成功:成功数据"+count+"条"; } else { String errors = mapData.get("errors").toString(); - return "操作失败:"+status+"_"+errors; + throw new BusinessException("操作失败:"+status+"_"+errors); } } else { - return "出现未知错误"; + throw new BusinessException("出现未知错误"); } } @@ -285,7 +285,6 @@ public class SupvPushGwServiceImpl implements SupvPushGwService { send = send(param, getUrl(2), "pqProblemCreate"); log.info(Thread.currentThread().getName() + "获取返回体 接收电能质量技术监督实施问题数据接口响应结果:" + send + "结束----!"); }else{ - System.out.println(1); send = send(param, getUrl(3), "pqProblemUpdate"); log.info(Thread.currentThread().getName() + "获取返回体 接收电能质量技术监督实施问题整改数据接口响应结果:" + send + "结束----!"); } @@ -309,13 +308,14 @@ public class SupvPushGwServiceImpl implements SupvPushGwService { Map mapCount = JSON.parseObject(result, Map.class); String count = mapCount.get("count").toString(); return "操作成功:成功数据"+count+"条"; - } else { + }else { String errors = map.get("errors").toString(); - return "操作失败:"+status+"_"+errors; + throw new BusinessException("操作失败:"+status+"_"+errors); } } else { - return "出现未知错误"; + throw new BusinessException("出现未知错误"); } + } @Override @@ -375,7 +375,7 @@ public class SupvPushGwServiceImpl implements SupvPushGwService { log.info(Thread.currentThread().getName() + "获取返回体 取消电能质量技术监督工作计划接口数据:" + s + "结束----!"); Map send = send(param, getUrl(5), "pqMonthReportCreate"); // Map send = new HashMap<>(); - log.info(Thread.currentThread().getName() + "获取返回体 取消电能质量技术监督工作计划接口响应结果:" + s + "结束----!"); + log.info(Thread.currentThread().getName() + "获取返回体 取消电能质量技术监督工作计划接口响应结果:" + send + "结束----!"); if (send.containsKey("succeed")) { String succeed = send.get("succeed"); if(succeed.indexOf("\\\"")!=-1){ @@ -396,10 +396,10 @@ public class SupvPushGwServiceImpl implements SupvPushGwService { return "操作成功:成功数据"+count+"条"; } else { String errors = map.get("errors").toString(); - return "操作失败:"+status+"_"+errors; + throw new BusinessException("操作失败:"+status+"_"+errors); } } else { - return "出现未知错误"; + throw new BusinessException("出现未知错误"); } } @@ -429,7 +429,7 @@ public class SupvPushGwServiceImpl implements SupvPushGwService { log.info(Thread.currentThread().getName() + "获取返回体 删除电能质量技术监督工作计划接口数据:" + s + "结束----!"); Map send = send(param, getUrl(6), "pqPlanDelete"); // Map send = new HashMap<>(); - log.info(Thread.currentThread().getName() + "获取返回体 删除电能质量技术监督工作计划接口响应结果:" + s + "结束----!"); + log.info(Thread.currentThread().getName() + "获取返回体 删除电能质量技术监督工作计划接口响应结果:" + send + "结束----!"); if (send.containsKey("succeed")) { String succeed = send.get("succeed"); if(succeed.indexOf("\\\"")!=-1){ @@ -448,10 +448,10 @@ public class SupvPushGwServiceImpl implements SupvPushGwService { return "操作成功:成功数据"+countNum+"条"; } else { String errors = map.get("errors").toString(); - return "操作失败:"+status+"_"+errors; + throw new BusinessException("操作失败:"+status+"_"+errors); } } else { - return "出现未知错误"; + throw new BusinessException("出现未知错误"); } }