From 29166bc750623bea12a367ba7c527facdb582235 Mon Sep 17 00:00:00 2001
From: 李宇 <986321569@qq.com>
Date: 星期二, 13 七月 2021 17:12:28 +0800
Subject: [PATCH] 修改转移试剂,生成领用单
---
src/main/java/com/nanometer/smartlab/service/InterfaceServiceImpl.java | 36 ++++++++++++++++++++++--------------
1 files changed, 22 insertions(+), 14 deletions(-)
diff --git a/src/main/java/com/nanometer/smartlab/service/InterfaceServiceImpl.java b/src/main/java/com/nanometer/smartlab/service/InterfaceServiceImpl.java
index ee87d4d..b773749 100644
--- a/src/main/java/com/nanometer/smartlab/service/InterfaceServiceImpl.java
+++ b/src/main/java/com/nanometer/smartlab/service/InterfaceServiceImpl.java
@@ -22,6 +22,7 @@
import org.apache.http.util.EntityUtils;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
@@ -39,7 +40,7 @@
public class InterfaceServiceImpl implements InterfaceService {
private static Logger logger = Logger.getLogger(ApiAction.class);
-
+ @Lazy
@Resource
private OpeUseFlowService opeUseFlowService;
@Resource
@@ -1036,7 +1037,7 @@
}
List<String> projects = sysLaboratoryContainer.selectProjectsByContainerCode(containerCode);
List<SysUser> userList = null;
- if (projects != null) {
+ if (projects != null && projects.size() > 0){
userList = new ArrayList<>();
for (String project : projects) {
List<SysUser> dataList = sysUserDao.getUserListByProject(project, startTime, endTime);
@@ -1253,7 +1254,8 @@
logger.error("The containerCode has not been exists!");
continue;
}
- } else if (status.equals(2)){
+ }
+ else if (status.equals(2)){
/*SysWarehouseContainer container = sysWarehouseContainerDao
.getSysWarehouseContainerByContainerCode(containerCode);
if (Objects.isNull(container) == false) {
@@ -1277,8 +1279,10 @@
if (status.equals(-1)){
continue;
}
- opeReagentStatusDao.syncOpeReagentStatus(params);
-
+ int i = opeReagentStatusDao.syncOpeReagentStatus(params);
+ if (i < 1){
+ opeReagentStatusDao.syncOpeReagentStatus(params);
+ }
}
}
@@ -1533,15 +1537,16 @@
}
sysAlarmPersonDao.insertSysAlarmPerson(sysAlarmPerson);
+ // 将人员扣分更新到人员表
+ if (warningPoint == null) {
+ warningPoint = 0;
+ }
+ // SysUser user = sysUserDao.getSysUser(userId);
+ if (user != null) {
+ sysUserDao.updateUserPointBySelective(user.getPoint() - warningPoint, user.getId());
+ }
}
- // 将人员扣分更新到人员表
- if (warningPoint == null) {
- warningPoint = 0;
- }
-// SysUser user = sysUserDao.getSysUser(userId);
- if (user != null) {
- sysUserDao.updateUserPointBySelective(user.getPoint() - warningPoint, user.getId());
- }
+
}
}
@@ -1713,8 +1718,11 @@
continue;
}
}
+ int count = opeUseFlowService.getOpeUseFlow(opeUseFlow);
+ if (count < 1) {
- this.opeUseFlowService.insertOpeUseFlow(opeUseFlow);
+ this.opeUseFlowService.insertOpeUseFlow(opeUseFlow);
+ }
}
}
--
Gitblit v1.9.2