From c2d6b1df9e1a2163a333b57a63b9593c69746da8 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 07 七月 2020 10:27:45 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java | 95 +++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 90 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java b/src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java
index 57df444..dfcc9da 100644
--- a/src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java
+++ b/src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java
@@ -231,19 +231,104 @@
break;
// 搴撲綅绉昏浆
case 11:
-
+ // 榛樿鐩爣搴撲綅鏄┖鏉�
+ String locType = "D";
+ // 搴撲綅绉昏浆鍒ゆ柇鏄惁涓虹┖鏉跨Щ杞�
+ if (wrkMast.getEmptyMk().equals("N")) {
+ locType = "F";
+ // 杞Щ搴撳瓨鏄庣粏鏁版嵁: 搴撳瓨鍙� 鐢卞伐浣滄。婧愬簱浣嶅彉涓虹洰鏍囧簱浣�
+ if (!locDetlService.updateLocNo(wrkMast.getLocNo(), wrkMast.getSourceLocNo())) {
+ exceptionHandle(""); // todo
+ }
+ }
+ // todo:luxiaotao 3)淇敼鐩樼偣閫氱煡妗� status ==> Y
+ // 淇敼婧愬簱浣嶇姸鎬� ==> O
+ LocMast sourceLoc = locMastService.selectById(wrkMast.getSourceLocNo());
+ if (null != sourceLoc) {
+ sourceLoc.setBarcode("");
+ sourceLoc.setLocType("O");
+ sourceLoc.setModiTime(now);
+ sourceLoc.setIoTime(now);
+ if (!locMastService.updateById(sourceLoc)) {
+ exceptionHandle(""); // todo
+ }
+ }
+ // 淇敼鐩爣搴撲綅鐘舵�� ==> .locType
+ locMast.setLocType(locType);
+ locMast.setBarcode(wrkMast.getBarcode());
+ locMast.setIoTime(now);
+ locMast.setModiTime(now);
+ if (!locMastService.updateById(locMast)) {
+ exceptionHandle(""); // todo
+ }
break;
default:
break;
}
+ // 淇敼宸ヤ綔涓绘。鐘舵��
+ wrkMast.setWrkSts(5L);
+ wrkMast.setModiTime(now);
+ if (!wrkMastService.updateById(wrkMast)) {
+ exceptionHandle(""); // todo
+ }
}
private void doOut(WrkMast wrkMast){
-
+ Date now = new Date();
+ LocMast locMast = locMastService.selectById(wrkMast.getSourceLocNo());
+ if (null == locMast) {
+ exceptionHandle(""); // todo
+ return;
+ }
+ switch (wrkMast.getIoType()) {
+ // 鍏ㄦ澘鍑哄簱
+ case 101:
+ // 鏍规嵁宸ヤ綔鍙凤紝鏌ヨ宸ヤ綔鏄庣粏妗�
+ List<WrkDetl> wrkDetls101 = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkMast.getWrkNo()));
+ if (wrkDetls101.isEmpty()) {
+ exceptionHandle(""); // todo
+ }
+ for (WrkDetl wrkDetl : wrkDetls101) {
+ // todo:luxiaotao 3)淇敼鍑哄簱閫氱煡妗� status ==> Y
+ }
+ // 鍒犻櫎宸ヤ綔妗f簮搴撲綅鐨勫簱瀛樻槑缁�
+ if (!locDetlService.delete(new EntityWrapper<LocDetl>().eq("loc_no", wrkMast.getSourceLocNo()))) {
+ exceptionHandle(""); // todo
+ }
+ // 淇敼搴撲綅鐘舵�� R ===>> O
+ if (locMast.getLocType().equals("R")) {
+ locMast.setLocType("O");
+ locMast.setBarcode("");
+ locMast.setModiTime(now);
+ locMast.setIoTime(now);
+ if (!locMastService.updateById(locMast)) {
+ exceptionHandle(""); // todo
+ }
+ }
+ break;
+ // 绌烘澘鍑哄簱
+ case 110:
+ // 淇敼搴撲綅鐘舵�� R ===>> O
+ if (locMast.getLocType().equals("R")) {
+ locMast.setLocType("O");
+ locMast.setBarcode("");
+ locMast.setModiTime(now);
+ locMast.setIoTime(now);
+ if (!locMastService.updateById(locMast)) {
+ exceptionHandle(""); // todo
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ // 淇敼宸ヤ綔涓绘。鐘舵��
+ wrkMast.setWrkSts(15L);
+ wrkMast.setModiTime(now);
+ if (!wrkMastService.updateById(wrkMast)) {
+ exceptionHandle(""); // todo
+ }
}
-
-
-
public static void main(String[] args) {
for (int i = 0;i<10;i++) {
--
Gitblit v1.9.1