zhs 2 rokov pred
rodič
commit
a0055e7841

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

@@ -785,6 +785,11 @@ public class AskGoodsServiceImpl implements AskGoodsService {
                 return map;
             }
             Inventory inventory = askGoodsMapper.getInventory(askGoods); //库存数量
+            if(inventory != null){
+                map.put("msg", "500");
+                map.put("errMsg", "暂无库存");
+                return map;
+            }
             AskGoods askGoods1 = askGoodsMapper.getWareInfo(askGoods); //要货单数量
             int alreadyNum =  askGoodsMapper.getAskInfoNumVitrual(askGoods);//已扫描总数
             int inventoryAlready =  askGoodsMapper.getInventoryAlready(askGoods);//库存已扫描数量

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

@@ -908,7 +908,7 @@ public class WarehousingServiceImpl implements WarehousingService {
         try{
             Map<String, Object> mapVal = warehousingMapper.getSumWarehousingVirtual(warehousingVirtual);
             Double num = Double.parseDouble(warehousingVirtual.getNum()) + Double.parseDouble(mapVal.get("scanNum").toString());
-            if(Double.parseDouble(mapVal.get("num").toString()) < num){
+            if(Double.doubleToLongBits(Double.parseDouble(mapVal.get("num").toString())) < Double.doubleToLongBits(num)){
                 String surplus = String.valueOf(Double.parseDouble(mapVal.get("num").toString()) - Double.parseDouble(mapVal.get("scanNum").toString()));
                 map.put("msg", "500");
                 map.put("errMsg", "扫描数量超过单据数量,剩余要扫数量" + surplus);

+ 1 - 1
src/main/resources/mapper/WarehouseTransferMapper.xml

@@ -191,7 +191,7 @@
         from tld_inventory a
         join tld_storage_location b on a.storage_location_code = b.storage_location_code
         join tld_warehouse c on b.warehouse_where = c.tld_id
-        where a.material_id = #{materialId} and a.account_sleeve = #{companyNumber} and a.hold = '0' and (c.warehouse_type = '0' or c.warehouse_type = '1' or c.warehouse_type = '2')
+        where a.material_id = #{materialId} and a.account_sleeve = #{companyNumber} and a.hold = '0' and (c.warehouse_type = '0' or c.warehouse_type = '1' or c.warehouse_type = '2') and a.wbs = #{wbs}
         <if test="warehouseWhere != null and warehouseWhere != ''">
             and c.tld_id = #{warehouseWhere}
         </if>