Browse Source

问题修改

zhs 2 years ago
parent
commit
5d2662f57c

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

@@ -110,7 +110,7 @@ public class InviteServiceImpl implements InviteService {
         Map<String, Object> map = new HashMap<>();
         try{
             Map<String, Object> mapVal = inviteMapper.getScanIsNot(askGoods);
-            if((Double.parseDouble(mapVal.get("inventoryNum").toString()) - Double.parseDouble(mapVal.get("virtualNum").toString())) == 0){
+            if((Double.parseDouble(mapVal.get("inventoryNum").toString()) - Double.parseDouble(mapVal.get("virtualNum").toString())) <= 0){
                 map.put("msg", "500");
                 map.put("errMsg", "已全部出库");
                 return map;

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

@@ -566,7 +566,7 @@ public class QueryListServiceImpl implements QueryListService {
                         if (jsonObject2.get("State").toString().equals("0")) {
                             //如果失败存入报错信息跟数据
                             error.setErrorInfo(jsonObject2.get("Msg").toString());
-                            error.setUrl("http://42.159.85.29:52480/cwbase/sg/V1/ERP/TELD/DEVTEST/API_WMS_PurInStock/CreateProductiveOutStock");
+                            error.setUrl(errorVal.getUrl());
                             error.setDataVal(errorVal.getDataVal()).setType(errorVal.getType());
                             errorMapper.addError(error);
                         } else {

+ 3 - 2
src/main/java/com/tld/service/impl/WarehousingServiceImpl.java

@@ -735,7 +735,8 @@ public class WarehousingServiceImpl implements WarehousingService {
                         .setEntryNumber(notice1.getEntryNumber())//gs分录号
                         .setMaterialId(notice1.getMaterialId())//物料id
                         .setId(notice1.getId())//分录单id
-                        .setWarehousingNum(warehousingVirtual.getNum());//入库数量
+                        .setWarehousingNum(warehousingVirtual.getNum())//入库数量
+                        .setStorageLocationCode(warehousingVirtual.getStorageLocationCode());//入库库位
                 warehousingMapper.addReturnWarehousing(returnWarehousing);
                 warehousingMapper.delVirtual(uniqueCode);//删除临时表数据
             }
@@ -866,7 +867,7 @@ public class WarehousingServiceImpl implements WarehousingService {
             notice.setStorageCode(storageCode)//入库单编号
                   .setCompanyNumber(inventory.getAccountSleeve())//所属公司
                   .setStorageLocationCode(inventory.getStorageLocationCode())//库位编号
-                  .setNum(inventory.getNum()) //数量
+                  .setNum(inventory.getAmount()) //数量
                   .setWarehouseWhere(dictionaryMapper.getWarehouse(inventory.getStorageLocationCode()))//仓库ID
                   .setMaterialId(materialClass.getTldId());//物料ID
             //流水

+ 2 - 2
src/main/resources/application.yml

@@ -41,8 +41,8 @@ spring:
     async:
       request-timeout: 20000
   redis:
-    host: 8.142.144.205
-#    host: 10.2.111.91
+#    host: 8.142.144.205
+    host: 10.2.111.91
     port: 6379
     password: '#09SilverB'
     jedis:

+ 2 - 2
src/main/resources/mapper/AskGoodsMapper.xml

@@ -200,7 +200,7 @@
                 where supplier_id = #{supplierId}
                   and serial = #{serial}
                   and wllb_code = #{wllbCode}
-                  and produc_date = #{producDate}) as inventoryNum,
+                  and produc_batch = #{producDate}) as inventoryNum,
                (select ifnull(sum(num), 0)
                 from tld_ask_goods_vitrual
                 where supplier_id = #{supplierId}
@@ -949,7 +949,7 @@
         produc_batch,
         attribute
         from tld_inventory where storage_location_code = #{storageLocationCode} and material_id = #{materialId} and
-        account_sleeve = #{accountSleeve} and amount <![CDATA[>=]]> #{num}
+        account_sleeve = #{accountSleeve} and amount <![CDATA[>=]]> (#{num} + 0)
         <if test="wbs != null">
             and wbs = #{wbs}
         </if>

+ 13 - 3
src/main/resources/mapper/InviteMapper.xml

@@ -160,9 +160,19 @@
     </select>
     <!-- 查询是否扫描 -->
     <select id="getScanIsNot" resultType="java.util.Map">
-        select
-            (select ifnull(amount,0) from tld_inventory where supplier_id = #{supplierId} and serial = #{serial} and wllb_code = #{wllbCode} and produc_date = #{producDate}) as inventoryNum,
-            (select ifnull(sum(num),0) from tld_ask_goods_vitrual where supplier_id = #{supplierId} and serial = #{serial} and wllb_code = #{wllbCode} and produc_date = #{producDate} and type = #{type}) as virtualNum
+        select (select ifnull(amount, 0)
+                from tld_inventory
+                where supplier_id = #{supplierId}
+                  and serial = #{serial}
+                  and wllb_code = #{wllbCode}
+                  and produc_batch = #{producDate}) as inventoryNum,
+               (select ifnull(sum(num), 0)
+                from tld_ask_goods_vitrual
+                where supplier_id = #{supplierId}
+                  and serial = #{serial}
+                  and wllb_code = #{wllbCode}
+                  and produc_date = #{producDate}
+                  and type = #{type})              as virtualNum
         from dual
     </select>
     <!-- 查询指定送货单信息 -->