Jelajahi Sumber

fix rongliang bug

wangzhinan 3 tahun lalu
induk
melakukan
1bd9d333e9

+ 9 - 3
svr/svr-base/src/main/java/com/yihu/jw/base/service/a3service/MedicinedeviceService.java

@ -505,7 +505,7 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi
    }
    /**
     * 更新设备网络状态
     * 上传设备异常信息
     * @param
     * @param
     * @return
@ -4600,6 +4600,7 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi
                inventoryDO.setOrgCode(inventory.getOrgCode());
                inventoryDO.setRatedInventory(inventory.getRatedInventory());
                boolean cargoCapacityChanged = false;
                int changedCapacity = 0;
                //库存变动
                if (org.apache.commons.lang3.StringUtils.isNoneBlank(qty)){
                    if (Integer.parseInt(qty) > 99) {
@ -4623,6 +4624,7 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi
                    //提升容量至库存数(修改的库存数大于容量时)
                    if (Integer.parseInt(qty) > Integer.parseInt(inventory.getCargoCapacity())) {
                        cargoCapacityChanged = true;
                        changedCapacity = Integer.parseInt(qty);
                        inventory.setCargoCapacity(qty);
                    }
                    inventory.setQty(qty);
@ -4661,6 +4663,7 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi
                        throw new Exception("货道容量最多99个,如超过请放置另一格");
                    }
                    inventory.setCargoCapacity(cargoCapacity);
                    changedCapacity = Integer.parseInt(cargoCapacity);
                    cargoCapacityChanged = true;
                }
                //更改货道容量-end
@ -4724,7 +4727,7 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi
                    Integer noOnlineTotal1 = 0;
                    if (totalMap!=null){
                        if (totalMap.get("cargoCapacity") != null) {
                            noOnlineTotal1 = (int) Double.parseDouble(totalMap.get("cargoCapacity").toString() + Integer.parseInt(qty));
                            noOnlineTotal1 = (int) Double.parseDouble(totalMap.get("cargoCapacity").toString() + changedCapacity);
                        }
                    }
                    mediicinedevice.setCapacity(String.valueOf(noOnlineTotal1));
@ -4740,6 +4743,7 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi
            inventoryDO.setOrgCode(inventory.getOrgCode());
            inventoryDO.setRatedInventory(inventory.getRatedInventory());
            boolean cargoCapacityChanged = false;
            int changedCapacity = 0;
            //库存变动
            if (org.apache.commons.lang3.StringUtils.isNoneBlank(qty)){
                if (Integer.parseInt(qty) > 99) {
@ -4763,6 +4767,7 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi
                //提升容量至库存数(修改的库存数大于容量时)
                if (Integer.parseInt(qty) > Integer.parseInt(inventory.getCargoCapacity())) {
                    cargoCapacityChanged = true;
                    changedCapacity = Integer.parseInt(qty);
                    inventory.setCargoCapacity(qty);
                }
                inventory.setQty(qty);
@ -4801,6 +4806,7 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi
                    throw new Exception("货道容量最多99个,如超过请放置另一格");
                }
                inventory.setCargoCapacity(cargoCapacity);
                changedCapacity = Integer.parseInt(cargoCapacity);
                cargoCapacityChanged = true;
            }
            //更改货道容量-end
@ -4864,7 +4870,7 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi
                Integer noOnlineTotal1 = 0;
                if (totalMap!=null){
                    if (totalMap.get("cargoCapacity") != null) {
                        noOnlineTotal1 = (int) Double.parseDouble(totalMap.get("cargoCapacity").toString()) + Integer.parseInt(qty);
                        noOnlineTotal1 = (int) Double.parseDouble(totalMap.get("cargoCapacity").toString()) + changedCapacity;
                    }
                }
                mediicinedevice.setCapacity(String.valueOf(noOnlineTotal1));