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/ApplyMngController.java | 33 +++++++++++++++++++++++++++------
1 files changed, 27 insertions(+), 6 deletions(-)
diff --git a/src/main/java/com/nanometer/smartlab/controller/ApplyMngController.java b/src/main/java/com/nanometer/smartlab/controller/ApplyMngController.java
index 68ddbb9..b7ebec2 100644
--- a/src/main/java/com/nanometer/smartlab/controller/ApplyMngController.java
+++ b/src/main/java/com/nanometer/smartlab/controller/ApplyMngController.java
@@ -5,6 +5,7 @@
import com.nanometer.smartlab.entity.SysReagent;
import com.nanometer.smartlab.entity.SysUser;
import com.nanometer.smartlab.entity.enumtype.ApplyStatus;
+import com.nanometer.smartlab.entity.enumtype.ValidFlag;
import com.nanometer.smartlab.exception.BusinessException;
import com.nanometer.smartlab.service.*;
import com.nanometer.smartlab.util.Constants;
@@ -73,6 +74,8 @@
private Integer status;
private Integer favor;
private List<ApplyStatus> statusSelectList;
+ private String controlProduct;
+
private LazyDataModel<SysReagent> reagentDataModel;
private LazyDataModel<SysReagent> reagentFavorDataModel;
@@ -239,7 +242,7 @@
if(selectedList!=null&&selectedList.size()>0){
realDataList=selectedList;
}else {
- realDataList=opeApplyService.getOpeApplyList(reagentName, startDeadline, endDeadline, status, getUserId(), null, queryCAS, null, null,null,applyUserName,(byte)1);
+ realDataList=opeApplyService.getOpeApplyList(reagentName, startDeadline,controlProduct, endDeadline, status, getUserId(), null, queryCAS, null, null,null,applyUserName,(byte)1);
}
List<String> headerList = new ArrayList<>();
@@ -501,10 +504,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,(byte)1);
+ int count = opeApplyService.getOpeApplyTotalCount(reagentName, startDeadline,controlProduct, 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,(byte)1);
+ list = opeApplyService.getOpeApplyList(reagentName, startDeadline,controlProduct, 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();
@@ -630,11 +633,11 @@
String applyUserId = getUserId();
int count = 0;
if (StringUtils.isNotBlank(applyUserId)) {
- count = opeApplyService.getOpeApplyTotalCount(null, null, null, null, applyUserId, null, null,applyCode,null,(byte)0);
+ count = opeApplyService.getOpeApplyTotalCount(null, null, null,null, null, applyUserId, null, null,applyCode,null,(byte)1);
}
this.setRowCount(count);
if (count > 0) {
- list = opeApplyService.getOpeApplyList(null, null, null, null, applyUserId, null, null, first, pageSize,applyCode,null,(byte)0);
+ list = opeApplyService.getOpeApplyList(null, null,null, null, null, applyUserId, null, null, first, pageSize,applyCode,null,(byte)1);
}
selectedList = null;
} catch (Exception e) {
@@ -743,7 +746,17 @@
//申请一个申购编号
String applyCode = this.sysSequenceService.getApplyCode();
for (OpeApply opeApply : this.applyNewList) {
-
+ if (opeApply.getReagent().getValidFlag() == null
+ ||opeApply.getReagent().getValidFlag().equals(ValidFlag.INVALID)){
+ FacesUtils.warn(opeApply.getReagent().getName()+",该试剂已删除,请选择其他试剂");
+ return;
+ }
+ if (opeApply.getReagent().getType() == 1
+ && (opeApply.getReagent().getSupplierFlag() == null
+ || opeApply.getReagent().getSupplierFlag().equals(ValidFlag.INVALID))){
+ FacesUtils.warn(opeApply.getReagent().getName()+",该试剂供应商已删除,请选择其他试剂");
+ return;
+ }
opeApply.setId(IDUtils.uuid());
opeApply.setApplyCode(applyCode);
opeApply.setApplyUserId(applyUser.getId());
@@ -993,4 +1006,12 @@
public void setTabValue(int tabValue) {
this.tabValue = tabValue;
}
+
+ public String getControlProduct() {
+ return controlProduct;
+ }
+
+ public void setControlProduct(String controlProduct) {
+ this.controlProduct = controlProduct;
+ }
}
--
Gitblit v1.9.2