Kaynağa Gözat

问题修改

xiaochen 2 yıl önce
ebeveyn
işleme
a15d74c14f

+ 8 - 0
src/main/java/com/tld/config/SaticScheduleTask.java

@@ -54,4 +54,12 @@ public class SaticScheduleTask {
     public void callPlugOutWarehousing(){
         askGoodsService.getCallPlugOutWarehousing();
     }
+
+    /**
+     * 批量回调 生产收货接口文档/报工单 w
+     */
+    @Scheduled(cron = "0 */30 * * * ?")
+    public void callWorkOrder(){
+        askGoodsService.getCallWorkOrder();
+    }
 }

+ 2 - 0
src/main/java/com/tld/mapper/AskGoodsMapper.java

@@ -251,4 +251,6 @@ public interface AskGoodsMapper {
     String getUserName(@Param("userName") String userName);
 
     void addInventory(Inventory inventory);
+
+    List<Map<String, Object>> getCallWorkOrder();
 }

+ 4 - 0
src/main/java/com/tld/model/AskGoods.java

@@ -55,6 +55,10 @@ public class AskGoods implements Serializable {
      * wbs编号
      */
     private String wbsCode;
+    /**
+     * wbs编号
+     */
+    private String wbsCodes;
     /**
      * 计量单位
      */

+ 2 - 0
src/main/java/com/tld/service/AskGoodsService.java

@@ -112,4 +112,6 @@ public interface AskGoodsService {
     void errorParkingReturn();
 
     void getCallPlugOutWarehousing();
+
+    void getCallWorkOrder();
 }

+ 17 - 0
src/main/java/com/tld/service/impl/AskGoodsServiceImpl.java

@@ -1987,6 +1987,23 @@ public class AskGoodsServiceImpl implements AskGoodsService {
         }
     }
 
+    /**
+     * 批量回调 生产收货接口文档/报工单 w
+     */
+    @Override
+    public void getCallWorkOrder() {
+        //查询入库返回GS表信息
+        List<Map<String, Object>> list = askGoodsMapper.getCallWorkOrder();
+        if(list.size() != 0) {
+            //入库回传 5
+            for (Map<String, Object> map : list) {
+                //查询用户信息
+                String userName = askGoodsMapper.getUserName(map.get("UserName").toString());
+                CreateGRReqInStock(map.get("storageCode").toString(),userName);
+            }
+        }
+    }
+
     @Override
     public void getCallback() {
         List<ReturRemoval> list = askGoodsMapper.getCallback();

+ 12 - 1
src/main/resources/mapper/AskGoodsMapper.xml

@@ -719,7 +719,7 @@
             a.wbs,
             f.name as wbsCode,
             f.name as wbsName,
-            f.code as wbsCode,
+            f.code as wbsCodes,
             a.entry_number,
             g.name as companyName,
             c.source_type,
@@ -781,6 +781,9 @@
         <if test="moveType != null and moveType != ''">
             and c.move_type like CONCAT(CONCAT('%', #{moveType}), '%')
         </if>
+        <if test="wbsName != null and wbsName != ''">
+            and f.name like CONCAT(CONCAT('%', #{wbsName}), '%')
+        </if>
         order by a.id desc
     </select>
     <!-- 查询半成品出库流水 -->
@@ -1689,6 +1692,7 @@
             transmission_type
         from tld_error
         where transmission_type = '1'
+        and type = '出库回传'
     </select>
     <!--查询入库返回GS表信息-->
     <select id="getCallPlugOutWarehousing" resultType="java.util.Map">
@@ -1702,6 +1706,13 @@
     <select id="getUserName" resultType="java.lang.String">
         select real_name from tld_user where user_name = #{userName}
     </select>
+    <!--批量回调 生产收货接口文档/报工单 w-->
+    <select id="getCallWorkOrder" resultType="java.util.Map">
+        select
+            storage_code as storageCode,
+            user_name as userName
+        from tld_return_gs_warehousing where source_type  <![CDATA[=]]> 'W'
+    </select>
     <!-- 修改数据传输状态 -->
     <update id="updateRemoval">
         update tld_removal set transmission_type = "1" where storage_code = #{removalCode}

+ 7 - 1
src/main/resources/mapper/QueryListMappeer.xml

@@ -142,6 +142,9 @@
             <if test="wbs != null and wbs != ''">
                 and a.wbs like CONCAT(CONCAT('%', #{wbs}), '%')
             </if>
+            <if test="wbsName != null and wbsName != ''">
+                and h.name like CONCAT(CONCAT('%', #{wbsName}), '%')
+            </if>
             <if test="warehouseId != null and warehouseId != ''">
                 and f.tld_id = #{warehouseId}
             </if>
@@ -282,7 +285,10 @@
                 and a.supplier_id like CONCAT(CONCAT('%', #{supplierId}), '%')
             </if>
             <if test="wbs != null and wbs != ''">
-                and h.name like CONCAT(CONCAT('%', #{wbs}), '%')
+                and a.wbs like CONCAT(CONCAT('%', #{wbs}), '%')
+            </if>
+            <if test="wbsName != null and wbsName != ''">
+                and h.name like CONCAT(CONCAT('%', #{wbsName}), '%')
             </if>
             <if test="warehouseId != null and warehouseId != ''">
                 and f.tld_id =  #{warehouseId}