From af607e09de61badbaef57bc0d38002e48a44ac4c Mon Sep 17 00:00:00 2001 From: 李宇 <986321569@qq.com> Date: 星期五, 12 十一月 2021 12:48:50 +0800 Subject: [PATCH] 订单领取申领人被删除报错 --- src/main/java/com/nanometer/smartlab/controller/LaboratoryStockMngController.java | 59 ++++++++++++++++++++++++++++++++++------------------------- 1 files changed, 34 insertions(+), 25 deletions(-) diff --git a/src/main/java/com/nanometer/smartlab/controller/LaboratoryStockMngController.java b/src/main/java/com/nanometer/smartlab/controller/LaboratoryStockMngController.java index f0cd689..13743de 100644 --- a/src/main/java/com/nanometer/smartlab/controller/LaboratoryStockMngController.java +++ b/src/main/java/com/nanometer/smartlab/controller/LaboratoryStockMngController.java @@ -59,6 +59,7 @@ private List<SysLaboratoryContainer> laboratoryContainers; private String reagentCode; + private String labName; /** * 数据模型 @@ -93,11 +94,11 @@ System.out.println(reagentId); try { int count = opeReagentStatusService.getOpeReagentStatusTotalCountForLab(reagentId, null, - ArrivalStatus.LABORATORY.getKey(), reagentCode, getUserId()); + ArrivalStatus.LABORATORY.getKey(), reagentCode, getUserId(),labName); this.setRowCount(count); if (count > 0) { list = opeReagentStatusService.getOpeReagentStatusListForLab(reagentId, null, - ArrivalStatus.LABORATORY.getKey(), reagentCode, getUserId(), first, pageSize); + ArrivalStatus.LABORATORY.getKey(), reagentCode, getUserId(),labName, first, pageSize); } } catch (Exception e) { logger.error(e); @@ -107,17 +108,17 @@ @Override public OpeReagentStatus getRowData(String rowKey) { - Iterator<OpeReagentStatus> iterator = this.iterator(); - if (iterator != null) { - OpeReagentStatus su = null; - while (iterator.hasNext()) { - su = iterator.next(); - if (rowKey.equals(su.getId())) { - return su; - } - } - } - return null; +// Iterator<OpeReagentStatus> iterator = this.iterator(); +// if (iterator != null) { +// OpeReagentStatus su = null; +// while (iterator.hasNext()) { +// su = iterator.next(); +// if (rowKey.equals(su.getId())) { +// return su; +// } +// } +// } + return null; } }; } @@ -143,22 +144,23 @@ } catch (Exception e) { logger.error(e); } + selectedStoreList = null; return list; } @Override public OpeReagentStatus getRowData(String rowKey) { - Iterator<OpeReagentStatus> iterator = this.iterator(); - if (iterator != null) { - OpeReagentStatus su = null; - while (iterator.hasNext()) { - su = iterator.next(); - if (rowKey.equals(su.getId())) { - return su; - } - } - } - return null; +// Iterator<OpeReagentStatus> iterator = this.iterator(); +// if (iterator != null) { +// OpeReagentStatus su = null; +// while (iterator.hasNext()) { +// su = iterator.next(); +// if (rowKey.equals(su.getId())) { +// return su; +// } +// } +// } + return opeReagentStatusService.getOpeReagentStatus(rowKey); } }; } @@ -169,7 +171,7 @@ public void exportLabStock() { try { List<Map> list = opeReagentStatusService.selectExportList(reagentId, null, - ArrivalStatus.LABORATORY.getKey(), reagentCode, getUserId()); + ArrivalStatus.LABORATORY.getKey(), reagentCode, getUserId(),labName); opeReagentStatusService.exportLabStock2Excel(list); FacesUtils.info("导出成功"); }catch (Exception e){ @@ -283,4 +285,11 @@ this.laboratoryContainers = laboratoryContainers; } + public String getLabName() { + return labName; + } + + public void setLabName(String labName) { + this.labName = labName; + } } -- Gitblit v1.9.2