From f0c28c1962d5635db98c79fa9f05a55d43894d11 Mon Sep 17 00:00:00 2001
From: 18516761980 <tqsxp@163.com>
Date: 星期三, 30 十一月 2022 10:08:09 +0800
Subject: [PATCH] #回退11-14部分代码

---
 src/main/resources/mapper/OrderDetlMapper.xml               |   41 ++++++++++----------
 src/main/webapp/static/js/order/out.js                      |    2 
 src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java |    2 
 src/main/resources/mapper/LocDetlMapper.xml                 |   70 ++++++++++++++--------------------
 src/main/webapp/static/js/order/order.js                    |    2 
 src/main/webapp/views/order/out.html                        |    2 
 src/main/java/com/zy/asrs/controller/OutController.java     |    1 
 7 files changed, 53 insertions(+), 67 deletions(-)

diff --git a/src/main/java/com/zy/asrs/controller/OutController.java b/src/main/java/com/zy/asrs/controller/OutController.java
index 85ea98c..a58988f 100644
--- a/src/main/java/com/zy/asrs/controller/OutController.java
+++ b/src/main/java/com/zy/asrs/controller/OutController.java
@@ -67,7 +67,6 @@
 
             List<LocDetl> locDetls = locDetlService.queryStock(orderDetl.getMatnr(), orderDetl.getBatch(), null, exist);
 
-            System.out.println(locDetls);
             for (LocDetl locDetl : locDetls) {
                 if (issued > 0) {
                     LocDto locDto = new LocDto(locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getMaktx(), locDetl.getBatch(), orderDetl.getOrderNo(),
diff --git a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
index 40b0221..cc172ba 100644
--- a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -812,7 +812,7 @@
                     boolean flag = true;
                     List<OrderDetl> orderDetls = orderDetlService.selectList(new EntityWrapper<OrderDetl>().eq("order_no",wrkDetl.getOrderNo()));
                     for(OrderDetl orderDetl : orderDetls){
-                        if(orderDetl.getQty() > 0){
+                        if(orderDetl.getWorkQty() > 0){
                             flag = false;
                         }
                     }
diff --git a/src/main/resources/mapper/LocDetlMapper.xml b/src/main/resources/mapper/LocDetlMapper.xml
index 330d26f..54a237e 100644
--- a/src/main/resources/mapper/LocDetlMapper.xml
+++ b/src/main/resources/mapper/LocDetlMapper.xml
@@ -108,14 +108,14 @@
     <select id="getStockOutPage" resultMap="BaseResultMap">
         select * from
         (
-            select
-            ROW_NUMBER() over (order by a.appe_time,a.matnr,a.loc_no) as row,
-            a.*
-            from asr_loc_detl a
-            left join asr_loc_mast b on a.loc_no = b.loc_no
-            where 1=1
-            and b.loc_sts = 'F'
-            <include refid="stockOutCondition"></include>
+        select
+        ROW_NUMBER() over (order by a.appe_time,a.matnr,a.loc_no) as row,
+        a.*
+        from asr_loc_detl a
+        left join asr_loc_mast b on a.loc_no = b.loc_no
+        where 1=1
+        and b.loc_sts = 'F'
+        <include refid="stockOutCondition"></include>
         ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
     </select>
 
@@ -132,19 +132,19 @@
     <select id="getStockStatis" resultType="com.zy.asrs.entity.LocDetl">
         select * from
         (
-            select
-            ROW_NUMBER() over (order by sum(a.anfme) desc) as row
-            , a.matnr
-            , sum(a.anfme) as anfme
-            from asr_loc_detl a
-            where 1=1
-            <include refid="stockOutCondition"></include>
-            group by a.matnr
-         ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
+        select
+        ROW_NUMBER() over (order by sum(a.anfme) desc) as row
+        , a.matnr
+        , sum(a.anfme) as anfme
+        from asr_loc_detl a
+        where 1=1
+        <include refid="stockOutCondition"></include>
+        group by a.matnr
+        ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
     </select>
 
     <select id="getStockStatisCount" parameterType="java.util.Map" resultType="java.lang.Integer">
-     select count(1) as count from
+        select count(1) as count from
         (
         select
         a.matnr
@@ -152,7 +152,7 @@
         where 1=1
         <include refid="stockOutCondition"></include>
         group by a.matnr
-     ) b
+        ) b
     </select>
 
     <select id="getStockStatisExcel" resultType="com.zy.asrs.entity.LocDetl">
@@ -202,14 +202,14 @@
         where 1=1
         and b.loc_sts = 'F'
         and a.matnr = #{matnr}
-<!--        <choose>-->
-<!--            <when test="batch != null and batch != ''">-->
-<!--                and a.batch = #{batch}-->
-<!--            </when>-->
-<!--            <otherwise>-->
-<!--                and (a.batch IS NULL OR a.batch = '')-->
-<!--            </otherwise>-->
-<!--        </choose>-->
+        <!--        <choose>-->
+        <!--            <when test="batch != null and batch != ''">-->
+        <!--                and a.batch = #{batch}-->
+        <!--            </when>-->
+        <!--            <otherwise>-->
+        <!--                and (a.batch IS NULL OR a.batch = '')-->
+        <!--            </otherwise>-->
+        <!--        </choose>-->
         <if test="batch != null and batch != ''">
             and a.batch = #{batch}
         </if>
@@ -282,22 +282,10 @@
         desc
     </select>
 
-    <select id="queryStockOther" resultMap="BaseResultMap">
-            select a.*
-    from asr_loc_detl a
-    left join asr_loc_mast b on a.loc_no = b.loc_no
-    where 1=1
-    and b.loc_sts = 'F'
-    and a.matnr=  #{matnr}
-    <if test="locNo !=null and locNo !=''">
-    and a.loc_no !=  #{locNo}
-    </if>
-
-    </select>
     <select id="queryStockAnfme" resultType="java.lang.Double">
         select sum(anfme) as count from man_loc_detl
-         where 1=1
-         and matnr = #{matnr}
+        where 1=1
+        and matnr = #{matnr}
         <if test="batch != null and batch != ''">
             and batch = #{batch}
         </if>
diff --git a/src/main/resources/mapper/OrderDetlMapper.xml b/src/main/resources/mapper/OrderDetlMapper.xml
index bb7dc9f..25b6cf8 100644
--- a/src/main/resources/mapper/OrderDetlMapper.xml
+++ b/src/main/resources/mapper/OrderDetlMapper.xml
@@ -98,17 +98,17 @@
     <select id="getPakoutPage" resultMap="BaseResultMap">
         select * from
         (
-            select
-            ROW_NUMBER() over (order by mo.create_time desc) as row,
-            mod.*
-            from man_order_detl mod
-            inner join man_order mo on mod.order_id = mo.id
-            inner join man_doc_type mdt on mo.doc_type = mdt.doc_id
-            where 1=1
-            and mo.settle &lt;= 2
-            and mo.status = 1
-            and mdt.pakout = 1
-            <include refid="pakOutPageCondition"></include>
+        select
+        ROW_NUMBER() over (order by mo.create_time desc) as row,
+        mod.*
+        from man_order_detl mod
+        inner join man_order mo on mod.order_id = mo.id
+        inner join man_doc_type mdt on mo.doc_type = mdt.doc_id
+        where 1=1
+        and mo.settle &lt;= 2
+        and mo.status = 1
+        and mdt.pakout = 1
+        <include refid="pakOutPageCondition"></include>
         ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
     </select>
 
@@ -127,7 +127,7 @@
 
     <update id="increase">
         update man_order_detl
-        set work_qty = work_qty + #{qty}
+        set qty = qty + #{qty}
         where 1=1
         and order_id = #{orderId}
         and matnr = #{matnr}
@@ -147,7 +147,14 @@
         where 1=1
         and order_no = #{orderNo}
         and matnr = #{matnr}
-
+        <choose>
+            <when test="batch != null and batch != ''">
+                and batch = #{batch}
+            </when>
+            <otherwise>
+                and (batch IS NULL OR batch = '')
+            </otherwise>
+        </choose>
     </update>
 
     <update id="modifyStatus">
@@ -191,14 +198,6 @@
                 and (batch IS NULL OR batch = '')
             </otherwise>
         </choose>
-    </update>
-
-    <update id="increaseWorkQtytest">
-        update man_order_detl
-        set work_qty = work_qty + #{anfme}
-        where 1=1
-        and order_no = #{orderNo}
-        and matnr = #{matnr};
     </update>
 
 </mapper>
diff --git a/src/main/webapp/static/js/order/order.js b/src/main/webapp/static/js/order/order.js
index b7bac8b..7214d80 100644
--- a/src/main/webapp/static/js/order/order.js
+++ b/src/main/webapp/static/js/order/order.js
@@ -199,7 +199,7 @@
                     }
                     layer.load(2);
                     $.ajax({
-                        url: baseUrl+"/order/form/" + (isExpAdd?"add":"modify") + "/authtest",
+                        url: baseUrl+"/order/form/" + (isExpAdd?"add":"modify") + "/auth",
                         headers: {'token': localStorage.getItem('token')},
                         data: JSON.stringify({
                             orderId: Number(data.field.id),
diff --git a/src/main/webapp/static/js/order/out.js b/src/main/webapp/static/js/order/out.js
index 96d77dc..86f2b28 100644
--- a/src/main/webapp/static/js/order/out.js
+++ b/src/main/webapp/static/js/order/out.js
@@ -127,7 +127,7 @@
         let loadIndex = layer.load(2);
         console.log("1111")
         $.ajax({
-            url: baseUrl + "/out/pakout/preview/authtest",
+            url: baseUrl + "/out/pakout/preview/auth",
             headers: {'token': localStorage.getItem('token')},
             contentType: 'application/json;charset=UTF-8',
             data: JSON.stringify(ids),
diff --git a/src/main/webapp/views/order/out.html b/src/main/webapp/views/order/out.html
index a010ce9..9a59d23 100644
--- a/src/main/webapp/views/order/out.html
+++ b/src/main/webapp/views/order/out.html
@@ -152,7 +152,7 @@
 
 <!-- 琛屽伐鍏锋爮 -->
 <script type="text/html" id="operate">
-    {{#if (d.anfme > d.workQty){ }}
+    {{#if (d.anfme > d.qty){ }}
     <a class="layui-btn layui-btn-xs layui-btn-danger btn-pakoutPreview" lay-event="pakoutPreview"><i class="layui-icon layui-icon-prev-circle"></i>鍑哄簱</a>
     {{# } }}
 </script>

--
Gitblit v1.9.1