From a1e90c3da21d88f994bac9c1feb91bf40e53a44d Mon Sep 17 00:00:00 2001 From: 李宇 <986321569@qq.com> Date: 星期三, 18 八月 2021 13:01:21 +0800 Subject: [PATCH] 耗材无供应商也显示,申购管理试剂库、申请履历、收藏不显示无效试剂和无供应商试剂 可显示无供应商的耗材 --- src/main/java/com/nanometer/smartlab/controller/ApplyMngController.java | 100 +++++++++++++++++++++++++------------------------ 1 files changed, 51 insertions(+), 49 deletions(-) diff --git a/src/main/java/com/nanometer/smartlab/controller/ApplyMngController.java b/src/main/java/com/nanometer/smartlab/controller/ApplyMngController.java index 11315c3..68ddbb9 100644 --- a/src/main/java/com/nanometer/smartlab/controller/ApplyMngController.java +++ b/src/main/java/com/nanometer/smartlab/controller/ApplyMngController.java @@ -239,7 +239,7 @@ if(selectedList!=null&&selectedList.size()>0){ realDataList=selectedList; }else { - realDataList=opeApplyService.getOpeApplyList(reagentName, startDeadline, endDeadline, status, getUserId(), null, queryCAS, null, null,null,applyUserName); + realDataList=opeApplyService.getOpeApplyList(reagentName, startDeadline, endDeadline, status, getUserId(), null, queryCAS, null, null,null,applyUserName,(byte)1); } List<String> headerList = new ArrayList<>(); @@ -501,10 +501,10 @@ public List<OpeApply> load(int first, int pageSize, String sortField, SortOrder sortOrder, Map<String, Object> filters) { List<OpeApply> list = null; try { - int count = opeApplyService.getOpeApplyTotalCount(reagentName, startDeadline, endDeadline, status, getUserId(), null, queryCAS,null,applyUserName); + int count = opeApplyService.getOpeApplyTotalCount(reagentName, startDeadline, endDeadline, status, getUserId(), null, queryCAS,null,applyUserName,(byte)1); this.setRowCount(count); if (count > 0) { - list = opeApplyService.getOpeApplyList(reagentName, startDeadline, endDeadline, status, getUserId(), null, queryCAS, first, pageSize,null,applyUserName); + list = opeApplyService.getOpeApplyList(reagentName, startDeadline, endDeadline, status, getUserId(), null, queryCAS, first, pageSize,null,applyUserName,(byte)1); for(int i=0;i<list.size();i++){ if(list.get(i).getBeforeApproveUserId()!=null&&!list.get(i).getBeforeApproveUserId().equals("")){ String name=list.get(i).getApproveUserName(); @@ -519,22 +519,23 @@ } catch (Exception e) { logger.error(e); } + selectedList = null; return list; } @Override public OpeApply getRowData(String rowKey) { - Iterator<OpeApply> iterator = this.iterator(); - if (iterator != null) { - OpeApply oa = null; - while (iterator.hasNext()) { - oa = iterator.next(); - if (rowKey.equals(oa.getId())) { - return oa; - } - } - } - return null; +// Iterator<OpeApply> iterator = this.iterator(); +// if (iterator != null) { +// OpeApply oa = null; +// while (iterator.hasNext()) { +// oa = iterator.next(); +// if (rowKey.equals(oa.getId())) { +// return oa; +// } +// } +// } + return opeApplyService.getOpeApply(rowKey); } }; } @@ -562,17 +563,17 @@ @Override public SysReagent getRowData(String rowKey) { - Iterator<SysReagent> iterator = this.iterator(); - if (iterator != null) { - SysReagent sr = null; - while (iterator.hasNext()) { - sr = iterator.next(); - if (rowKey.equals(sr.getId())) { - return sr; - } - } - } - return null; +// Iterator<SysReagent> iterator = this.iterator(); +// if (iterator != null) { +// SysReagent sr = null; +// while (iterator.hasNext()) { +// sr = iterator.next(); +// if (rowKey.equals(sr.getId())) { +// return sr; +// } +// } +// } + return sysReagentService.getRowData(rowKey); } }; } @@ -601,17 +602,17 @@ @Override public SysReagent getRowData(String rowKey) { - Iterator<SysReagent> iterator = this.iterator(); - if (iterator != null) { - SysReagent sr = null; - while (iterator.hasNext()) { - sr = iterator.next(); - if (rowKey.equals(sr.getId())) { - return sr; - } - } - } - return null; +// Iterator<SysReagent> iterator = this.iterator(); +// if (iterator != null) { +// SysReagent sr = null; +// while (iterator.hasNext()) { +// sr = iterator.next(); +// if (rowKey.equals(sr.getId())) { +// return sr; +// } +// } +// } + return sysReagentService.getRowData(rowKey); } }; } @@ -629,12 +630,13 @@ String applyUserId = getUserId(); int count = 0; if (StringUtils.isNotBlank(applyUserId)) { - count = opeApplyService.getOpeApplyTotalCount(null, null, null, null, applyUserId, null, null,applyCode,null); + count = opeApplyService.getOpeApplyTotalCount(null, null, null, null, applyUserId, null, null,applyCode,null,(byte)0); } this.setRowCount(count); if (count > 0) { - list = opeApplyService.getOpeApplyList(null, null, null, null, applyUserId, null, null, first, pageSize,applyCode,null); + list = opeApplyService.getOpeApplyList(null, null, null, null, applyUserId, null, null, first, pageSize,applyCode,null,(byte)0); } + selectedList = null; } catch (Exception e) { logger.error(e); } @@ -643,17 +645,17 @@ @Override public OpeApply getRowData(String rowKey) { - Iterator<OpeApply> iterator = this.iterator(); - if (iterator != null) { - OpeApply oa = null; - while (iterator.hasNext()) { - oa = iterator.next(); - if (rowKey.equals(oa.getId())) { - return oa; - } - } - } - return null; +// Iterator<OpeApply> iterator = this.iterator(); +// if (iterator != null) { +// OpeApply oa = null; +// while (iterator.hasNext()) { +// oa = iterator.next(); +// if (rowKey.equals(oa.getId())) { +// return oa; +// } +// } +// } + return opeApplyService.getOpeApply(rowKey); } }; } -- Gitblit v1.9.2