From 31d7788cf41d7a134326e790fb0cbbe5353ec4a3 Mon Sep 17 00:00:00 2001
From: LSH <brook_w@163.com>
Date: 星期三, 17 八月 2022 17:46:23 +0800
Subject: [PATCH] Revert "#"
---
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 53 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
index 76ede1d..683ff79 100644
--- a/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
@@ -15,9 +15,11 @@
import com.zy.asrs.service.*;
import com.zy.asrs.utils.MatUtils;
import com.zy.common.model.DetlDto;
+import com.zy.common.model.enums.WorkNoType;
import com.zy.common.utils.NodeUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.expression.spel.ast.NullLiteral;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -61,6 +63,8 @@
private TestMastService testMastService;
@Autowired
private LocMastService locMastService;
+ @Autowired
+ private WorkService workService;
@Override
@Transactional
@@ -600,6 +604,7 @@
waitPakin.setAppeTime(requestTime);
waitPakin.setModiUser(null);
waitPakin.setModiTime(requestTime);
+ waitPakin.setDeadWarn(param.getSettingTimes());
if (!waitPakinService.insert(waitPakin)) {
throw new CoolException("淇濆瓨鍏ュ簱閫氱煡妗eけ璐�");
}
@@ -609,18 +614,24 @@
@Transactional
public void infoReview(Review review) {
Wrapper wrapper = new EntityWrapper<TestMast>()
- .eq("loc_no", review.getLocNo());
+ .eq("loc_no", review.getLocNo())
+ .eq("barcode", review.getBarcode())
+ .eq("user_Id", review.getUserId());
LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", review.getLocNo()));
- if (locMast.getPackStatus()!=1){
+ if (null == locMast ||locMast.getPackStatus()!=1) {
throw new CoolException("浜у搧鐘舵�佷笉鏄� 1:寰呮祴璇�");
}
TestMast testMast = testMastService.selectOne(wrapper);
if(null != testMast){
if (testMast.getStatus()==1){
- testMast.setStatus(2);
+ testMast.setStatus(3);
testMast.setModiTime(new Date());
if (!testMastService.update(testMast,wrapper)){
-
+ throw new CoolException("鏇存柊娴嬭瘯鐘舵�佸け璐�");
+ }
+ locMast.setPackStatus(2);
+ if (!locMastService.update(locMast,new EntityWrapper<LocMast>().eq("loc_no", review.getLocNo()))){
+ throw new CoolException("鏇存柊浜у搧鐘舵�佸け璐�");
}
}else if (Cools.isEmpty(testMast.getStatus())){
throw new CoolException("鐘舵�佸紓甯�");
@@ -631,6 +642,44 @@
throw new CoolException("娴嬭瘯鐢宠澶辫触");
}
}
+
+
+ @Override
+ @Transactional
+ public Boolean testFinish(Review review) {
+ Boolean success=true;
+ Wrapper wrapper = new EntityWrapper<TestMast>()
+ .eq("loc_no", review.getLocNo())
+ .eq("barcode", review.getBarcode())
+ .eq("user_Id", review.getUserId());
+ LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", review.getLocNo()));
+ if (locMast.getPackStatus()!=2){
+ throw new CoolException("浜у搧鐘舵�佷笉鏄� 2:娴嬭瘯涓�");
+ }
+ TestMast testMast = testMastService.selectOne(wrapper);
+ if(null != testMast){
+ if (testMast.getStatus()==3){
+ testMast.setStatus(4);
+ testMast.setModiTime(new Date());
+ if (!testMastService.update(testMast,wrapper)){
+ throw new CoolException("鏇存敼娴嬭瘯鐘舵�佸け璐�");
+ }
+ locMast.setPackStatus(3);
+ if (!locMastService.update(locMast, wrapper)){
+ throw new CoolException("鏇存敼浜у搧鐘舵�佸け璐�");
+ }
+ }else if (Cools.isEmpty(testMast.getStatus())){
+ throw new CoolException("鐘舵�佸紓甯�");
+ }else {
+ throw new CoolException("鐘舵�佷笉鏄� 2:娴嬭瘯涓�");
+ }
+ } else {
+ throw new CoolException("鐘舵�佸紓甯�");
+ }
+
+ return success;
+ }
+
/*...........................璧e窞鏂板..............浠ヤ笂.............璧e窞鏂板...........................*/
}
--
Gitblit v1.9.1