From 1ebf5f80a7cbd40f1f7bbabee9bd557794f64fd9 Mon Sep 17 00:00:00 2001 From: renkaige Date: Tue, 8 Jan 2019 20:39:51 +0600 Subject: [PATCH] =?UTF-8?q?=E4=B8=BAasn=E5=8D=95=E5=90=91=E6=B5=81?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=B7=BB=E5=8A=A0=E8=BF=90=E8=90=A5=E5=95=86?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/restful/NtcConnRecordPercent.java | 13 +++++++++++ .../restful/NtcLogSearchController.java | 23 +++++++++++++++---- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/nis/domain/restful/NtcConnRecordPercent.java b/src/main/java/com/nis/domain/restful/NtcConnRecordPercent.java index 6d1b21e..0f445c9 100644 --- a/src/main/java/com/nis/domain/restful/NtcConnRecordPercent.java +++ b/src/main/java/com/nis/domain/restful/NtcConnRecordPercent.java @@ -24,6 +24,7 @@ public class NtcConnRecordPercent implements Serializable { private String ppsPercent; private String searchFoundStartTime;// 开始发现时间 private String searchFoundEndTime;// 结束发现时间 + private String searchEntranceId; public String getBps() { return bps; @@ -74,4 +75,16 @@ public class NtcConnRecordPercent implements Serializable { public void setSearchFoundEndTime(String searchFoundEndTime) { this.searchFoundEndTime = searchFoundEndTime; } + @JsonIgnore + public String getSearchEntranceId() { + return searchEntranceId; + } + + public void setSearchEntranceId(String searchEntranceId) { + this.searchEntranceId = searchEntranceId; + } + + + + } diff --git a/src/main/java/com/nis/web/controller/restful/NtcLogSearchController.java b/src/main/java/com/nis/web/controller/restful/NtcLogSearchController.java index f2dbc2c..de71421 100644 --- a/src/main/java/com/nis/web/controller/restful/NtcLogSearchController.java +++ b/src/main/java/com/nis/web/controller/restful/NtcLogSearchController.java @@ -696,7 +696,8 @@ public class NtcLogSearchController extends BaseRestController { ntcConnRecordLog.setSearchFoundEndTime(map.get("endTime")); } ntcLogService.queryConditionCheck(auditLogThread, start, ntcConnRecordLog, NtcConnRecordLog.class, page); - ntcLogService.ntcConnRecordLogsQueryConditionCheck(auditLogThread, start, ntcConnRecordLog, NtcConnRecordLog.class, page); + ntcLogService.ntcConnRecordLogsQueryConditionCheck(auditLogThread, start, ntcConnRecordLog, + NtcConnRecordLog.class, page); logDataService.getData(page, ntcConnRecordLog); } catch (Exception e) { auditLogThread.setExceptionInfo("通联关系日志检索失败:" + e.getMessage()); @@ -749,7 +750,7 @@ public class NtcLogSearchController extends BaseRestController { if (!StringUtil.isBlank(ntcConnRecordPercent.getSearchFoundStartTime())) { sdf.setLenient(false); sdf.parse(ntcConnRecordPercent.getSearchFoundStartTime()); - } + } } catch (ParseException e) { throw new RestServiceException("searchFoundStartTime参数格式错误", RestBusinessCode.param_formate_error.getValue()); @@ -757,6 +758,16 @@ public class NtcLogSearchController extends BaseRestController { throw new RestServiceException("searchFoundStartTime参数错误", RestBusinessCode.param_formate_error.getValue()); } + try { + if (!StringUtil.isBlank(ntcConnRecordPercent.getSearchEntranceId())) { + Integer.parseInt(ntcConnRecordPercent.getSearchEntranceId()); + } + } catch (NumberFormatException e) { + throw new RestServiceException("searchEntranceId参数格式错误", + RestBusinessCode.param_formate_error.getValue()); + } catch (Exception e) { + throw new RestServiceException("searchEntranceId参数错误", RestBusinessCode.param_formate_error.getValue()); + } logDataService.getNtcConnRecordPercent(ntcConnRecordPercent); } catch (Exception e) { @@ -823,14 +834,16 @@ public class NtcLogSearchController extends BaseRestController { try { if (!StringUtil.isBlank(ntcAsnRecord.getSearchAsnType())) { Integer.parseInt(ntcAsnRecord.getSearchAsnType()); - }else { + } else { throw new RestServiceException("searchAsnType参数不能为空", RestBusinessCode.param_formate_error.getValue()); } } catch (NumberFormatException e) { - throw new RestServiceException("searchAsnType参数格式错误"+e.getMessage(), RestBusinessCode.param_formate_error.getValue()); + throw new RestServiceException("searchAsnType参数格式错误" + e.getMessage(), + RestBusinessCode.param_formate_error.getValue()); } catch (Exception e) { - throw new RestServiceException("searchAsnType参数错误"+e.getMessage(), RestBusinessCode.param_formate_error.getValue()); + throw new RestServiceException("searchAsnType参数错误" + e.getMessage(), + RestBusinessCode.param_formate_error.getValue()); } logDataService.getNtcAsnRecord(page, ntcAsnRecord);