From 608fb6f9529ce51291ef682638a5efc7dd51ac63 Mon Sep 17 00:00:00 2001
From: zwl <1051256694@qq.com>
Date: 星期二, 18 十一月 2025 08:21:08 +0800
Subject: [PATCH] 1.完善找库位 2.新增erp订单删除后,wms订单跟着删除功能 3.新增订单完成后,上报erp,erp报错后显现在出货单中 4.新增一键查询到异常完成订单 5.对销售单据和其他单据进行区分出库 6.对中间表订单状态进行完善 7.新增锁单功能 8.新增任务查询维护加上订单号
---
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java | 228 ++++++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 186 insertions(+), 42 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
index 2e8c7f3..f31590c 100644
--- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -4,7 +4,10 @@
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
-import com.core.common.*;
+import com.core.common.BaseRes;
+import com.core.common.Cools;
+import com.core.common.DateUtils;
+import com.core.common.SnowflakeIdWorker;
import com.core.exception.CoolException;
import com.zy.asrs.entity.*;
import com.zy.asrs.entity.param.CombParam;
@@ -14,22 +17,27 @@
import com.zy.asrs.mapper.ManLocDetlMapper;
import com.zy.asrs.service.*;
import com.zy.asrs.utils.MatUtils;
-import com.zy.common.CodeRes;
import com.zy.common.constant.MesConstant;
import com.zy.common.entity.Parameter;
import com.zy.common.model.DetlDto;
import com.zy.common.model.MesCombParam;
import com.zy.common.service.CommonService;
import com.zy.common.utils.HttpHandler;
+import com.zy.third.entity.ExdInstockSource;
+import com.zy.third.entity.ExdStock;
+import com.zy.third.entity.ExdvYanbu;
+import com.zy.third.mapper.ExdMaterialMapper;
+import com.zy.third.mapper.ExdStockMapper;
+import com.zy.third.service.ExdInstockSourceService;
+import com.zy.third.service.ExdMaterialService;
+import com.zy.third.service.ExdStockService;
+import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.List;
+import java.util.*;
/**
* 绉诲姩绔湇鍔℃牳蹇冪被
@@ -47,6 +55,8 @@
private OrderService orderService;
@Autowired
private OrderDetlService orderDetlService;
+ @Autowired
+ private OrderDetl1Service orderDetl1Service;
@Autowired
private BasDevpService basDevpService;
@Autowired
@@ -77,35 +87,85 @@
private ManLocDetlService manLocDetlService;
@Autowired
private ManLocDetlMapper manLocDetlMapper;
+ @Autowired
+ private ExdMaterialMapper exdMaterialMapper;
+ @Autowired
+ private ExdStockMapper exdStockMapper;
+ @Autowired
+ private ExdStockService exdStockService;
+ @Autowired
+ private ExdInstockSourceService exdInstockSourceService;
@Override
@Transactional
- public void comb(CombParam param, Long userId) {
+ public void comb(CombParam param, Long userId, String fxId) {
+ if (Cools.isEmpty(fxId)){
+ throw new CoolException("璇风敤鑷繁鐨勮处鍙风粍鎵�");
+ }
if (Cools.isEmpty(param.getBarcode(), param.getCombMats())) {
throw new CoolException(BaseRes.PARAM);
}
// 鍒ゆ柇鏄惁鏈夌浉鍚屾潯鐮佺殑鏁版嵁
if (waitPakinService.selectCount(new EntityWrapper<WaitPakin>().
eq("zpallet", param.getBarcode()).eq("io_status", "N")) > 0) {
- throw new CoolException(param.getBarcode() + "鏁版嵁姝e湪杩涜鍏ュ簱");
+ throw new CoolException(param.getBarcode() + "鏁版嵁缁勬墭妗d腑宸插瓨鍦�");
}
- int countLoc = locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet",param.getBarcode()));
- int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet",param.getBarcode()));
- if (countLoc > 0 || countWrk > 0) {
- throw new CoolException("宸ヤ綔妗�/搴撳瓨鏉$爜鏁版嵁宸插瓨鍦�===>>" + param.getBarcode());
+
+ int countLoc = locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet", param.getBarcode()));
+ int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet", param.getBarcode()));
+// int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet",param.getBarcode())
+// .last(" wrk_no IN ( SELECT wrk_no FROM asr_wrk_mast WHERE wrk_sts != 15 )"));
+
+ if (countLoc > 0) {
+ throw new CoolException("搴撳瓨鏉$爜鏁版嵁宸插瓨鍦�===>>" + param.getBarcode());
+ }
+ if (countWrk > 0) {
+ throw new CoolException("宸ヤ綔妗f潯鐮佹暟鎹凡瀛樺湪===>>" + param.getBarcode());
}
Date now = new Date();
+ //杩涜鎵瑰彿绛涢�夛紝鎵瑰彿鍙兘鍞竴
+ Set<String> batchs = new HashSet<>();
+ List<String> strings = new ArrayList<>();
+ long time = new Date().getTime();
+ //鐢熶骇鍏ュ簱瀵逛竴鍧ㄧ墿鏂欒繘琛岀粦瀹氥�傚敮涓�鍊�
+ String fbillno = param.getBarcode()+"--"+time;
+ for (CombParam.CombMat mat : param.getCombMats()) {
+ if (Cools.isEmpty(mat.getBatch())) {
+ continue;
+ }
+ batchs.add(mat.getBatch());
+ strings.add(mat.getBatch());
+ WaitPakin waitPakin = waitPakinService.selectOne(new EntityWrapper<WaitPakin>().eq("batch", mat.getBatch()));
+ WrkDetl batch = wrkDetlService.selectOne(new EntityWrapper<WrkDetl>().eq("batch", mat.getBatch()));
+ LocDetl batch1 = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("batch", mat.getBatch()));
+ if (!Cools.isEmpty(batch) || !Cools.isEmpty(batch1) || !Cools.isEmpty(waitPakin)) {
+ throw new CoolException("璇ョ墿鏂欐壒鍙�" + mat.getBatch() + "宸插湪鍏ュ簱閫氱煡妗c�佷换鍔℃槑缁嗗拰搴撳瓨涓瓨鍦�");
+ }
+ }
+ if (batchs.size() < strings.size()) {
+ throw new CoolException("鏈夐噸澶嶇殑鐗╂枡鎵瑰彿");
+ }
+ int i = 1;
// 鏃犲崟缁勬墭
if (Cools.isEmpty(param.getOrderNo())) {
// 鐢熸垚鍏ュ簱閫氱煡妗�
List<DetlDto> detlDtos = new ArrayList<>();
param.getCombMats().forEach(elem -> {
+ // 鍒ゆ柇鏄惁鏈夌浉鍚屾潯鐮佺殑鏁版嵁
+ if (!Cools.isEmpty(elem.getBc())){
+ if (waitPakinService.selectCount(new EntityWrapper<WaitPakin>().
+ eq("three_code", elem.getBc())) > 0) {
+ throw new CoolException( elem.getBc() + "鏁版嵁缁勬墭妗d腑宸插瓨鍦�");
+ }
+ }
+
DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme());
+ detlDto.setBc(elem.getBc());
if (DetlDto.has(detlDtos, detlDto)) {
DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch());
assert one != null;
@@ -118,12 +178,16 @@
for (DetlDto detlDto : detlDtos) {
Mat mat = matService.selectByMatnr(detlDto.getMatnr());
+ if (Cools.isEmpty(detlDto.getBatch())) {
+ detlDto.setBatch("");
+ }
if (Cools.isEmpty(mat)) {
throw new CoolException(detlDto.getMatnr() + "鍟嗗搧妗f涓嶅瓨鍦�");
}
WaitPakin waitPakin = new WaitPakin();
waitPakin.sync(mat);
- waitPakin.setBatch(detlDto.getBatch());
+ waitPakin.setBatch(detlDto.getBc());
+ waitPakin.setThreeCode(detlDto.getBc());
waitPakin.setZpallet(param.getBarcode()); // 鎵樼洏鐮�
waitPakin.setIoStatus("N"); // 鍏ュ嚭鐘舵��
waitPakin.setAnfme(detlDto.getAnfme()); // 鏁伴噺
@@ -131,12 +195,41 @@
waitPakin.setAppeUser(userId);
waitPakin.setAppeTime(now);
waitPakin.setModiUser(userId);
+ waitPakin.setColor(userId+"");
waitPakin.setModiTime(now);
+ //鐢熶骇鍏ュ簱瀵逛竴鍧ㄧ墿鏂欒繘琛岀粦瀹氥�傚敮涓�鍊�
+ waitPakin.setOrigin(fbillno);
+ ExdvYanbu barcode1 = exdMaterialMapper.getBacode(detlDto.getBc());
+ String pid="03.98";
+ if(!Cools.isEmpty(barcode1)&&!Cools.isEmpty(barcode1.getProdinkind())){
+ pid=barcode1.getProdinkind();
+ }
+ ExdStock id = exdStockService.selectOne(new EntityWrapper<ExdStock>().eq("Fnumber", pid));
+ waitPakin.setBrand(id.getFname());//浠撳簱
+ waitPakin.setInspect(param.isType() ? 1 : 0);
+ if (i == 1) {
+// 0锛氫笉闇�瑕佽ˉ绌烘墭鐩�
+// 1锛氬皬鎵樼洏
+// 2锛氬ぇ鎵樼洏
+ waitPakin.setItemNum(param.getBarcodeSize());
+ waitPakin.setMemo(Cools.isEmpty(param.getRsta()) ? "" : param.getRsta());//婧愮珯鐐�
+ /**
+ * agv鐘舵��
+ * 0锛氭棤闇�璋冪敤AGV
+ * 1锛氱瓑寰呰皟鐢ˋGV
+ * 2锛欰GV浠诲姟涓嬪彂鎴愬姛
+ * 3锛欰GV浠诲姟瀹屾垚
+ * 4锛氱粰杈撻�佺嚎涓嬪彂鍏ュ簱鎸囦护
+ */
+ waitPakin.setBeBatch(Cools.isEmpty(param.getRsta())?0:1);
+ waitPakin.setSuppCode(param.getBarcode());
+ }
+ i++;
if (!waitPakinService.insert(waitPakin)) {
throw new CoolException("淇濆瓨鍏ュ簱閫氱煡妗eけ璐�");
}
}
- // 鍏宠仈缁勬墭
+ // 鍏宠仈缁勬墭
} else {
Order order = orderService.selectByNo(param.getOrderNo());
if (order.getSettle() > 2) {
@@ -152,7 +245,11 @@
throw new CoolException(orderDetl.getMatnr() + "鍏ュ簱鏁伴噺涓嶅悎娉�");
}
// 淇敼璁㈠崟浣滀笟鏁伴噺
- if (!orderDetlService.increaseWorkQty(order.getId(), elem.getMatnr(), elem.getBatch(), elem.getAnfme())) {
+ if (!orderDetlService.increaseWorkQty2(order.getId(), elem.getMatnr(), elem.getBatch(), elem.getAnfme(), userId)) {
+ throw new CoolException("淇敼鍗曟嵁浣滀笟鏁伴噺澶辫触");
+ }
+ // 淇敼瀛愬崟璁㈠崟浣滀笟鏁伴噺
+ if (!orderDetl1Service.increaseWorkQty2(order.getId(), elem.getMatnr(), elem.getBatch(), elem.getAnfme(), userId)) {
throw new CoolException("淇敼鍗曟嵁浣滀笟鏁伴噺澶辫触");
}
@@ -173,7 +270,7 @@
WaitPakin waitPakin = new WaitPakin();
waitPakin.sync(mat);
waitPakin.setOrderNo(order.getOrderNo()); // 鍗曟嵁缂栧彿
- waitPakin.setBatch(detlDto.getBatch()); // 搴忓垪鐮�
+ waitPakin.setBatch(detlDto.getBatch()); // 鎵瑰彿
waitPakin.setZpallet(param.getBarcode()); // 鎵樼洏鐮�
waitPakin.setIoStatus("N"); // 鍏ュ嚭鐘舵��
waitPakin.setAnfme(detlDto.getAnfme()); // 鏁伴噺
@@ -182,15 +279,48 @@
waitPakin.setAppeTime(now);
waitPakin.setModiUser(userId);
waitPakin.setModiTime(now);
+ waitPakin.setColor(userId+"");
+
+ OrderDetl orderDetl = orderDetlService.selectOne(new EntityWrapper<OrderDetl>()
+ .eq("matnr", detlDto.getMatnr()).eq("order_no", order.getOrderNo())
+ .eq("batch", detlDto.getBatch()));
+ waitPakin.setBrand(orderDetl.getBrand());//浠撳簱
+ waitPakin.setInspect(param.isType() ? 1 : 0);
+ if (i == 1) {
+// 0锛氫笉闇�瑕佽ˉ绌烘墭鐩�
+// 1锛氬皬鎵樼洏
+// 2锛氬ぇ鎵樼洏
+ waitPakin.setItemNum(param.getBarcodeSize());
+ waitPakin.setMemo(Cools.isEmpty(param.getRsta()) ? "" : param.getRsta());//婧愮珯鐐�
+ /**
+ * agv鐘舵��
+ * 0锛氭棤闇�璋冪敤AGV
+ * 1锛氱瓑寰呰皟鐢ˋGV
+ * 2锛欰GV浠诲姟涓嬪彂鎴愬姛
+ * 3锛欰GV浠诲姟瀹屾垚
+ * 4锛氱粰杈撻�佺嚎涓嬪彂鍏ュ簱鎸囦护
+ */
+ waitPakin.setBeBatch(param.getBeBatch());
+ waitPakin.setSuppCode(param.getBarcode());
+ }
+ i++;
if (!waitPakinService.insert(waitPakin)) {
throw new CoolException("淇濆瓨鍏ュ簱閫氱煡妗eけ璐�");
}
}
orderService.updateSettle(order.getId(), 2L, userId);
+ List<ExdInstockSource> fBillNo = exdInstockSourceService.selectList(new EntityWrapper<ExdInstockSource>().eq("FBillNo", order.getOrderNo()));
+ if(fBillNo != null){
+ for(ExdInstockSource exdInstockSource : fBillNo){
+ exdInstockSource.setStatus(10);
+ exdInstockSourceService.updateById(exdInstockSource);
+ }
+ }
}
}
+ // 鍟嗗搧涓婃灦
@Override
public void onSale(CombParam param) {
Date now = new Date();
@@ -202,23 +332,23 @@
}
// 鑾峰彇鍟嗗搧鍒楄〃
- for(CombParam.CombMat combMat : param.getCombMats()){
+ for (CombParam.CombMat combMat : param.getCombMats()) {
Mat mat = matService.selectByMatnr(combMat.getMatnr());
- if (Cools.isEmpty(mat)){
+ if (Cools.isEmpty(mat)) {
throw new CoolException(combMat.getMatnr() + ":鍟嗗搧妗f涓嶅瓨鍦紒");
}
- if (Cools.isEmpty(combMat.getAnfme()) || combMat.getAnfme()==0){
+ if (Cools.isEmpty(combMat.getAnfme()) || combMat.getAnfme() == 0) {
throw new CoolException(combMat.getMatnr() + ":鍟嗗搧鏁伴噺鏈夎锛�");
}
- if (Cools.isEmpty(combMat.getBatch())){
- throw new CoolException(combMat.getMatnr() + ":鍟嗗搧鎵瑰彿鏈夎锛�");
+ if (Cools.isEmpty(combMat.getBatch())) {
+// throw new CoolException(combMat.getMatnr() + ":鍟嗗搧鎵瑰彿鏈夎锛�");
}
ManLocDetl manLocDetl = new ManLocDetl();
manLocDetl.setLocNo(locno);
manLocDetl.setNodeId(node.getId());
manLocDetl.setMaktx(mat.getMaktx());
manLocDetl.setMatnr(mat.getMatnr());
- manLocDetl.setBatch(combMat.getBatch());
+ manLocDetl.setBatch(Cools.isEmpty(combMat.getBatch()) ? "" : combMat.getBatch());
manLocDetl.setAnfme(combMat.getAnfme());
manLocDetl.setModiTime(now);
if (!manLocDetlService.insert(manLocDetl)) {
@@ -227,15 +357,25 @@
}
}
+ // 鍟嗗搧涓嬫灦
@Override
public void offSale(OffSaleParam offSaleParam) {
- List<ManLocDetl> manLocDetls = manLocDetlMapper.selectLocNo0(offSaleParam.getLocNo(), offSaleParam.getMatnr());
- if (Cools.isEmpty(manLocDetls)){
- throw new CoolException("鍟嗗搧涓嬫灦澶辫触锛�");
+ ManLocDetl manLocDetl = manLocDetlMapper.selectLocNo0(offSaleParam.getLocNo(), offSaleParam.getMatnr());
+ if (Cools.isEmpty(manLocDetl)) {
+ throw new CoolException("鏃犳鍟嗗搧锛�");
}
- int i = manLocDetlMapper.deleteLocNo0(offSaleParam.getLocNo(), offSaleParam.getMatnr());
- System.out.println(i);
+ double anfme = manLocDetl.getAnfme() - offSaleParam.getAnfme();
+ if (anfme < 0) {
+ throw new CoolException("鍟嗗搧搴撳瓨涓嶈冻锛�");
+ } else if (anfme == 0) {
+ manLocDetlMapper.deleteLocNo0(offSaleParam.getLocNo(), offSaleParam.getMatnr());
+ }
+ manLocDetlMapper.updateAnfme0(anfme, manLocDetl.getNodeId());
}
+
+ // 鏌ユ壘鍟嗗搧
+
+
@Override
@Transactional
public void adjust(MobileAdjustParam param, Long userId) {
@@ -289,7 +429,9 @@
// 娣诲姞鏄庣粏
for (WrkDetl wrkDetl : list) {
- if (wrkDetl.getAnfme() == 0.0D) { continue; }
+ if (wrkDetl.getAnfme() == 0.0D) {
+ continue;
+ }
// todo 鐩樼偣璁板綍銆佷繚瀛樿皟鏁磋褰�
String orderNo = wrkDetl.getOrderNo();
Mat mat = matService.selectByMatnr(wrkDetl.getMatnr());
@@ -305,7 +447,7 @@
}
// 淇敼鐩樼偣浠诲姟涓绘。鐘舵��
- wrkMast.setFullPlt(wrkDetlService.selectByWrkNo(wrkMast.getWrkNo()).size() != 0?"Y":"N");
+ wrkMast.setFullPlt(wrkDetlService.selectByWrkNo(wrkMast.getWrkNo()).size() != 0 ? "Y" : "N");
wrkMast.setModiTime(now);
wrkMast.setModiUser(userId);
if (!wrkMastService.updateById(wrkMast)) {
@@ -382,10 +524,10 @@
if (jsonObject.getInteger("code").equals(200)) {
success = true;
} else if (jsonObject.getInteger("code").equals(500)) {
- log.error("璇锋眰鎺ュ彛澶辫触锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", MesConstant.URL+MesConstant.PACK_DOWN_URL, JSON.toJSONString(mesCombParam), response);
+ log.error("璇锋眰鎺ュ彛澶辫触锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", MesConstant.URL + MesConstant.PACK_DOWN_URL, JSON.toJSONString(mesCombParam), response);
throw new CoolException(jsonObject.getString("msg"));
} else {
- log.error("璇锋眰鎺ュ彛澶辫触锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", MesConstant.URL+MesConstant.PACK_DOWN_URL, JSON.toJSONString(mesCombParam), response);
+ log.error("璇锋眰鎺ュ彛澶辫触锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", MesConstant.URL + MesConstant.PACK_DOWN_URL, JSON.toJSONString(mesCombParam), response);
throw new CoolException("涓婃姤mes绯荤粺澶辫触");
}
} catch (Exception e) {
@@ -403,7 +545,9 @@
response,
success
);
- } catch (Exception e) { log.error("", e); }
+ } catch (Exception e) {
+ log.error("", e);
+ }
}
}
@@ -480,19 +624,19 @@
BasDevp sta = basDevpService.checkSiteStatus(staNo);
//鏍规嵁璁㈠崟鍙风敓鎴愬嚭搴撲换鍔″伐浣滄。
Order order = orderService.selectOne(new EntityWrapper<Order>().eq("order_no", orderNo));
- if (order.getSettle() != 1 && order.getSettle() != 2){
+ if (order.getSettle() != 1 && order.getSettle() != 2) {
throw new CoolException("璇ヨ鍗曞凡澶勭悊");
}
List<OrderDetl> orderDetls = orderDetlService.selectList(new EntityWrapper<OrderDetl>().eq("order_no", orderNo));
Date now = new Date();
- for(OrderDetl orderDetl : orderDetls){
+ for (OrderDetl orderDetl : orderDetls) {
//鏌ヨ鎵�鏈夊簱浣嶇姸鎬佷负F鐨勫簱浣嶄俊鎭�
- List<LocDetl> locDetls = locDetlService.queryStock(orderDetl.getMatnr(),orderDetl.getBatch(),null,null);
+ List<LocDetl> locDetls = locDetlService.queryStock(orderDetl.getMatnr(), orderDetl.getBatch(), null, null);
if (locDetls.size() == 0) {
throw new CoolException("搴撳瓨涓病鏈夎鐗╂枡");
}
- for(LocDetl locDetl : locDetls){
+ for (LocDetl locDetl : locDetls) {
//濡傛灉璇ュ簱浣嶅嚭搴撹矾绾挎墍鐢ㄧ殑鍫嗗灈鏈簅ut_enable涓嶄负Y,璺宠繃璇ュ惊鐜�
LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>()
.eq("loc_no", locDetl.getLocNo()));
@@ -501,13 +645,13 @@
}
BasCrnp crn_no = basCrnpService.selectOne(new EntityWrapper<BasCrnp>()
.eq("crn_no", locMast.getCrnNo()));
- if (Cools.isEmpty(crn_no) || !crn_no.getOutEnable().equals("Y")){
+ if (Cools.isEmpty(crn_no) || !crn_no.getOutEnable().equals("Y")) {
continue;
}
//鍙嚭搴撴暟閲� = 璁㈠崟鏁伴噺 - 浣滀笟涓暟閲�
Double outQty = orderDetl.getAnfme() - orderDetl.getWorkQty();
- if(outQty <= 0){
+ if (outQty <= 0) {
break;
}
// 鍒ゆ柇鍏ュ嚭搴撶被鍨嬶細101.鍏ㄦ澘鍑哄簱 or 103.鎷f枡鍑哄簱
@@ -519,18 +663,18 @@
order.setSettle(2L);
order.setUpdateBy(userId);
order.setUpdateTime(now);
- if(!orderService.update(order, new EntityWrapper<Order>().eq("order_no", orderNo))){
+ if (!orderService.update(order, new EntityWrapper<Order>().eq("order_no", orderNo))) {
throw new CoolException("鏇存柊璁㈠崟鐘舵�佸け璐�");
}
orderDetl.setWorkQty(orderDetl.getWorkQty() + curOutQty);
orderDetl.setUpdateBy(userId);
orderDetl.setUpdateTime(now);
Wrapper wrapper = new EntityWrapper<OrderDetl>().eq("order_no", orderNo)
- .eq("matnr",orderDetl.getMatnr());
- if(!Cools.isEmpty(orderDetl.getBatch())){
+ .eq("matnr", orderDetl.getMatnr());
+ if (!Cools.isEmpty(orderDetl.getBatch())) {
wrapper.eq("batch", orderDetl.getBatch());
}
- if(!orderDetlService.update(orderDetl, wrapper)){
+ if (!orderDetlService.update(orderDetl, wrapper)) {
throw new CoolException("鏇存柊璁㈠崟鏄庣粏澶辫触");
}
}
--
Gitblit v1.9.1