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("出现未知错误"); } }