From 9591d4a4184a76f2af997a47c3bd883beecb1ea2 Mon Sep 17 00:00:00 2001
From: skyouc <creaycat@gmail.com>
Date: 星期五, 12 十二月 2025 14:56:42 +0800
Subject: [PATCH] no message
---
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java | 30 +++++++++++++++++++++++-------
1 files changed, 23 insertions(+), 7 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 1eca080..93237b3 100644
--- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -656,6 +656,7 @@
waitPakin.setAnfme(detlDto.getAnfme());
waitPakin.setThreeCode(detlDto.getThreeCode());
waitPakin.setStatus("Y");
+ waitPakin.setSuppCode(detlDto.getStandby1());
waitPakin.setStandby1(detlDto.getStandby1());
waitPakin.setStandby2(detlDto.getStandby2());
waitPakin.setStandby3(detlDto.getStandby3());
@@ -1694,7 +1695,8 @@
throw new CoolException("鏄庣粏鍐呭涓嶅瓨鍦紒锛�");
}
- Double v = stationDetl.getAnfme() - stationDetl.getWorkQty();
+ Double v = Math.round((stationDetl.getAnfme() - stationDetl.getWorkQty()) * 10000) / 10000.0;
+
if (detlDto.getAnfme().compareTo(v) > 0) {
throw new CoolException("缁勬墭涓婇檺涓猴細" + stationDetl.getAnfme() + ", 宸茬粍鎵橈細" + stationDetl.getWorkQty() + ", 杩樺彲缁勬墭锛�" + v);
}
@@ -1725,7 +1727,7 @@
throw new CoolException("淇濆瓨鍏ュ簱閫氱煡妗eけ璐�");
}
- Double v1 = stationDetl.getWorkQty() + detlDto.getAnfme();
+ Double v1 = Math.round((stationDetl.getWorkQty() + detlDto.getAnfme()) * 10000) / 10000.0 ;
stationDetl.setWorkQty(v1);
if (!basStationDetlService.updateById(stationDetl)) {
@@ -1735,6 +1737,19 @@
if (v1.compareTo(stationDetl.getWorkQty()) >= 0) {
if (!basStationDetlService.deleteById(stationDetl)) {
throw new CoolException("鍘熷鏁版嵁绉婚櫎澶辫触锛�");
+ }
+ }
+
+ List<BasStationDetl> devNo = basStationDetlService.selectList(new EntityWrapper<BasStationDetl>().eq("dev_no", stationDetl.getDevNo()));
+ if (Objects.isNull(devNo) || devNo.isEmpty()) {
+ BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>()
+ .eq("loc_sts", LocStsType.LOC_STS_TYPE_F.type)
+ .eq("dev_no", stationDetl.getDevNo()));
+ if (!Objects.isNull(station)) {
+ station.setLocSts(LocStsType.LOC_STS_TYPE_D.type);
+ if (!basStationService.updateById(station)) {
+ throw new CoolException("绔欑偣鐘舵�佷慨鏀瑰け璐锛侊紒");
+ }
}
}
@@ -1777,11 +1792,11 @@
throw new CoolException("绔欑偣涓嶅瓨鍦�!!");
}
- station.setLocSts(LocStsType.LOC_STS_TYPE_O.type);
- if (!basStationService.updateById(station)) {
- throw new CoolException("绔欑偣鐘舵�佷慨鏀瑰け璐�!");
- }
- basStationDetlService.delete(new EntityWrapper<BasStationDetl>().eq("dev_no", station.getDevNo()));
+// station.setLocSts(LocStsType.LOC_STS_TYPE_O.type);
+// if (!basStationService.updateById(station)) {
+// throw new CoolException("绔欑偣鐘舵�佷慨鏀瑰け璐�!");
+// }
+// basStationDetlService.delete(new EntityWrapper<BasStationDetl>().eq("dev_no", station.getDevNo()));
// // 浠诲姟瀹屾垚
// task.setWrkSts(15L);
@@ -1974,6 +1989,7 @@
waitPakins.forEach(waitPakin -> {
WrkDetl wrkDetl = new WrkDetl();
wrkDetl.sync(waitPakin);
+ wrkDetl.setSuppCode(waitPakin.getSuppCode());
wrkDetl.setWrkNo(wrkMast.getWrkNo());
wrkDetl.setIoTime(wrkMast.getIoTime());
wrkDetl.setAppeTime(now);
--
Gitblit v1.9.1