From 94714af765326bc0567a336952b0811667b7be92 Mon Sep 17 00:00:00 2001
From: lyfO_o <764716047@qq.com>
Date: 星期三, 27 十月 2021 16:59:27 +0800
Subject: [PATCH] 货柜预警接口:alarm 字典:alarm_type 01 主电掉电,备电工作 显示:名称+地点+柜号+内容
---
src/main/java/com/nanometer/smartlab/controller/LaboratoryStockMngController.java | 70 +++++++++++++++++++++++------------
1 files changed, 46 insertions(+), 24 deletions(-)
diff --git a/src/main/java/com/nanometer/smartlab/controller/LaboratoryStockMngController.java b/src/main/java/com/nanometer/smartlab/controller/LaboratoryStockMngController.java
index 8fd719b..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,26 +144,40 @@
} 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);
}
};
}
return reagentStoreDataModel;
+ }
+
+
+ public void exportLabStock() {
+ try {
+ List<Map> list = opeReagentStatusService.selectExportList(reagentId, null,
+ ArrivalStatus.LABORATORY.getKey(), reagentCode, getUserId(),labName);
+ opeReagentStatusService.exportLabStock2Excel(list);
+ FacesUtils.info("导出成功");
+ }catch (Exception e){
+ e.printStackTrace();
+ FacesUtils.warn("导出失败");
+ }
}
public int getAction() {
@@ -270,4 +285,11 @@
this.laboratoryContainers = laboratoryContainers;
}
+ public String getLabName() {
+ return labName;
+ }
+
+ public void setLabName(String labName) {
+ this.labName = labName;
+ }
}
--
Gitblit v1.9.2