wangzhinan 3 years ago
parent
commit
7ac500d9f1

+ 5 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/service/a3service/MedicinedeviceService.java

@ -4774,6 +4774,7 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi
                MediicinecabinetInventory inventory =  inventoryDao.findOne(str[i]);
                //更新设备缺货状态的该药品的已变动数量
                InventoryDO inventoryDO = new InventoryDO();
                inventoryDO.setIdDevice(inventory.getIdDevice());
                inventoryDO.setCargoId(inventory.getId());
                inventoryDO.setDrugCode(inventory.getDrugCode());
                inventoryDO.setOrgCode(inventory.getOrgCode());
@ -4851,6 +4852,7 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi
                    if ("0".equals(status)) {
                        inventory.setQty("0");
                        inventoryDO.setQty(0);
                        inventory.setOrgCode(null);
                        inventory.setDrugCode(null);
                        inventory.setDrugId(null);
                        inventory.setDrugName(null);
@ -4923,6 +4925,7 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi
            MediicinecabinetInventory inventory =  inventoryDao.findOne(id);
            //更新设备缺货状态的该药品的已变动数量
            InventoryDO inventoryDO = new InventoryDO();
            inventoryDO.setIdDevice(inventory.getIdDevice());
            inventoryDO.setCargoId(inventory.getId());
            inventoryDO.setDrugCode(inventory.getDrugCode());
            inventoryDO.setOrgCode(inventory.getOrgCode());
@ -5002,6 +5005,7 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi
                    inventory.setQty("0");
                    inventoryDO.setQty(0);
                    inventory.setDrugCode(null);
                    inventory.setOrgCode(null);
                    inventory.setDrugId(null);
                    inventory.setDrugName(null);
                    inventory.setPrice(null);
@ -5090,7 +5094,7 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi
                "\tt_mediicinecabinet_inventory t\n" +
                "WHERE\n" +
                "\tt.id_device = '" + device.getId() + "'\n" +
                "\tt.id != '" + inventory.getCargoId() + "'\n" +
                "\tAND t.id != '" + inventory.getCargoId() + "'\n" +
                "AND (t.state = '1' OR t.state = '21')";
        //设备列表
        List<Map<String, Object>> list = hibenateUtils.createSQLQuery(tempConditionSql);