Bladeren bron

问题修改

xiaochen 2 jaren geleden
bovenliggende
commit
e0e280b4ed

+ 7 - 1
src/main/java/com/tld/service/impl/AskGoodsServiceImpl.java

@@ -1060,9 +1060,15 @@ public class AskGoodsServiceImpl implements AskGoodsService {
                             for (JSONObject jsonObject2 : retunList) {
                                 if (jsonObject2.get("WMSCode").toString().equals(map.get("WMSCode")) && jsonObject2.get("WareHouse").toString().equals(map.get("WareHouse"))) {
                                     //如果失败存入报错信息跟数据
+                                    List<JSONObject> retunList2 = new LinkedList<>();
+                                    retunList2.add(jsonObject2);
+                                    JSONObject ReqOutStocks1 = new JSONObject();
+                                    ReqOutStocks1.put("BILLs", retunList2);
+                                    JSONObject ReqOutStocks2 = new JSONObject();
+                                    ReqOutStocks2.put("strJson",ReqOutStocks1);
                                     error.setErrorInfo(map.get("FailReason").toString());
                                     error.setUrl("http://42.159.85.29:52480/cwbase/sg/V1/ERP/TELD/DEVTEST/API_WMS_PurInStock/CreateGRReqInStock");
-                                    error.setDataVal(jsonObject2.toString()).setType("生产收货");
+                                    error.setDataVal(ReqOutStocks2.toJSONString()).setType("生产收货");
                                     errorMapper.addError(error);
                                 }
                             }

+ 2 - 1
src/main/java/com/tld/service/impl/WarehouseTransferServiceImpl.java

@@ -125,7 +125,8 @@ public class WarehouseTransferServiceImpl implements WarehouseTransferService {
                         .setWbs(warehouseTransfer.getWbs())//wbs
                         .setMaterialId(materialId)//物料id
                         .setAccountSleeve(warehouseTransfer.getAccountSleeve())//公司
-                        .setWllbClass(material.getWllbClass());
+                        .setWllbClass(material.getWllbClass())
+                        .setAttribute(askGoods.getAttribute());
                 warehousing.add(WarehousingVirtual1);
                 askGoods.setStorageLocationCode(askGoods.getStorageLocationCode());
                 askGoodsMapper.addRemoval(askGoods);//插入出库流水

+ 3 - 3
src/main/resources/mapper/DeliveryMapper.xml

@@ -91,12 +91,12 @@
         <if test="attribute != null and attribute != ''">
             and a.attribute = #{attribute}
         </if>
-        <if test="producDate != null and producDate != ''">
-            and a.produc_batch = #{producDate}
-        </if>
         <if test="serial != null and serial != ''">
             and a.serial = #{serial}
         </if>
+        <if test="storageLocationCode != null and storageLocationCode != ''">
+            and a.storage_location_code = #{storageLocationCode}
+        </if>
     </select>
     <!-- 查询指定库存被占用数量 -->
     <select id="getVitrual" resultType="int">

+ 3 - 3
src/main/resources/mapper/WarehousingMapper.xml

@@ -374,12 +374,12 @@
         (select count(*)
         from tld_inventory a
         join tld_storage_location b on a.storage_location_code = b.storage_location_code
-        where a.supplier_id = #{suppId} and a.serial = #{unique} and a.wllb_code = #{wllbCode} and a.produc_date =
+        where a.supplier_id = #{suppId} and a.serial = #{unique} and a.wllb_code = #{wllbCode} and a.produc_batch =
         #{producDate}
         <if test="warehouseWhere != null and warehouseWhere != ''">
             and b.warehouse_where = #{warehouseWhere}
         </if>) as inventoryCount,
-        (select count(*) from tld_warehousing_virtual where supp_id = #{suppId} and serial = #{unique} and wllb_code =
+        (select count(*) from tld_warehousing_virtual where supp_id = #{suppId} and serial = #{unique} and produc_batch =
         #{wllbCode} and produc_date = #{producDate}) as virtualCount
         from dual
     </select>
@@ -953,7 +953,7 @@
                 where attribute = #{attribute}
                   and serial = #{serial}
                   and wllb_code = #{materialCode}
-                  and produc_date = #{producBatch}) as inventoryCount,
+                  and produc_batch = #{producBatch}) as inventoryCount,
                (select count(*)
                 from tld_warehousing_virtual
                 where attribute = #{attribute}