Przeglądaj źródła

[bug-3710]试剂耗材入库登记,入库同一个批号的试剂报错“请求失败”,且库存信息没有更新

szjbdgzl 1 rok temu
rodzic
commit
12d50fa899

+ 2 - 2
ibps-provider-root/modules/provider-business/src/main/java/com/lc/ibps/components/reagent/service/InventoryService.java

@@ -48,7 +48,7 @@ public class InventoryService extends GenericProvider {
             map.put("position",inventory.getPosition());
             map.put("position",inventory.getPosition());
             List<Map<String, Object>> inv = storeService.queryInventoryByRuKu(map);
             List<Map<String, Object>> inv = storeService.queryInventoryByRuKu(map);
             if(Collections.isNotEmpty(inv)){
             if(Collections.isNotEmpty(inv)){
-                if (inv.get(0).get("").equals("否")) {
+                if (inv.get(0).get("enable_").equals("否")) {
                     throw new Exception("编码为:"+inventory.getReagentCode()+"的试剂耗材正在盘点,请等待盘点完成后再操作!");
                     throw new Exception("编码为:"+inventory.getReagentCode()+"的试剂耗材正在盘点,请等待盘点完成后再操作!");
                 }
                 }
                 inventory.setId(inv.get(0).get("id_").toString());
                 inventory.setId(inv.get(0).get("id_").toString());
@@ -255,7 +255,7 @@ public class InventoryService extends GenericProvider {
             if (BeanUtils.isEmpty(inventory)){
             if (BeanUtils.isEmpty(inventory)){
                 throw new Exception("未查询到对应库存,请核对后再修改!");
                 throw new Exception("未查询到对应库存,请核对后再修改!");
             }
             }
-            if ("both".equals(stockDto.getType()) && "否".equals(inventory.getEnable())) {
+            if ("only".equals(stockDto.getType()) && "否".equals(inventory.getEnable())) {
                 throw new RuntimeException("试剂耗材编码为:" +inventory.getReagentCode() + " 正在盘点,请等待完成!");
                 throw new RuntimeException("试剂耗材编码为:" +inventory.getReagentCode() + " 正在盘点,请等待完成!");
             }
             }
             if (BeanUtils.isNotEmpty(inventory.getWithhold()) && kcDto.getQuantity() < inventory.getWithhold()){
             if (BeanUtils.isNotEmpty(inventory.getWithhold()) && kcDto.getQuantity() < inventory.getWithhold()){