From 8d0e66e935ead9bfeb4a822c0fefb512e4bf2c85 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期四, 02 十一月 2023 16:33:54 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java |   30 ++++++++++++++++++++++++++++--
 1 files changed, 28 insertions(+), 2 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 842e968..ff4db4a 100644
--- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -106,12 +106,16 @@
         }
 
         int countLoc = locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet",param.getBarcode()));
+        int countLoc2 =  manLocDetlMapper.selectCount(new EntityWrapper<ManLocDetl>().eq("zpallet",param.getBarcode()));
         WrkMast wrkMast = wrkMastService.selectByBarcode(param.getBarcode());
         if (wrkMast != null && wrkMast.getIoType() < 100){
             throw new CoolException("宸ヤ綔妗�/搴撳瓨鏉$爜鏁版嵁宸插瓨鍦�===>>" + param.getBarcode());
 
         }
         if (countLoc > 0 ) {
+            throw new CoolException("宸ヤ綔妗�/搴撳瓨鏉$爜鏁版嵁宸插瓨鍦�===>>" + param.getBarcode());
+        }
+        if (countLoc2 > 0 ) {
             throw new CoolException("宸ヤ綔妗�/搴撳瓨鏉$爜鏁版嵁宸插瓨鍦�===>>" + param.getBarcode());
         }
 
@@ -556,12 +560,23 @@
             if (orderDetl.getAnfme() - (jsonOrderDetl.getAnfme() + orderDetl.getWorkQty()) < 0) {
                 return R.error("鍏ュ簱鏁伴噺澶т簬鍙叆鏁伴噺");
             }
+
+
             //鏌ヨ骞冲簱涓槸鍚︽湁涓�鏍风殑鐗╂枡鍙凤紝鏈夌殑璇濈洿鎺ュ鍔犳暟閲�
             ManLocDetl checkManLocDetl = manLocDetlService.selectInventory(jsonLocNo,orderDetl.getMatnr(),jsonOrderDetl.getBatch());
             if (checkManLocDetl == null) {
-
                 ManLocDetl manLocDetl = new ManLocDetl();
                 Synchro.Copy(orderDetl, manLocDetl);
+
+                BigDecimal decimal = BigDecimal.valueOf(jsonOrderDetl.getAnfme()).subtract(BigDecimal.valueOf(jsonOrderDetl.getAnfme()).setScale(0,BigDecimal.ROUND_DOWN));
+                if (decimal.doubleValue() > 0){
+                    manLocDetl.setPrice(1.0);
+                }else {
+                    manLocDetl.setPrice(2.0);
+                }
+
+
+
                 manLocDetl.setLocNo(node.getName());
                 manLocDetl.setNodeId(node.getId());
                 manLocDetl.setMatnr(orderDetl.getMatnr());
@@ -791,8 +806,19 @@
             if (node.equals(null)){
                 return R.error("鏈煡璇㈠埌搴撲綅淇℃伅");
             }
-            Date date = new Date();
             ManLocDetl manLocDetl = new ManLocDetl();  //鍒濆鍖栧簱瀛樺疄浣撶被
+            //鑾峰彇缁勬墭灏忔暟浣�
+            BigDecimal decimal = BigDecimal.valueOf(waitPakin.getAnfme()).subtract(BigDecimal.valueOf(waitPakin.getAnfme()).setScale(0,BigDecimal.ROUND_DOWN));
+            if (decimal.doubleValue() > 0){
+                manLocDetl.setPrice(1.0);
+            }else {
+                manLocDetl.setPrice(2.0);
+            }
+
+
+
+            Date date = new Date();
+
             manLocDetl.setLocNo(node.getName());
             manLocDetl.setNodeId(node.getId());
             manLocDetl.setZpallet(waitPakin.getZpallet());

--
Gitblit v1.9.1