eight
2024-11-25 f2f709bbefa5052ff89b91c534c118f10a45363f
装机设备需要医生手动输入,防止出错
已修改2个文件
6 ■■■■■ 文件已修改
jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/ErrorCodeConstants.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/ErrorCodeConstants.java
@@ -35,6 +35,7 @@
    ErrorCode DEVICE_NOT_EXISTS = new ErrorCode(1_010_005_001,  "设备不存在");
    ErrorCode DEVICE_NOT_FREE = new ErrorCode(1_010_005_002,  "设备非空闲或不存在");
    ErrorCode DEVICE_NOT_RECEIVED = new ErrorCode(1_010_005_003,  "设备未领用或不存在");
    ErrorCode DEVICE_NOT_PAT_RECEIVED = new ErrorCode(1_010_005_004,  "不是该患者领用的设备");
    ErrorCode DEV_INSTALL_NOT_EXISTS = new ErrorCode(1_010_006_000, "装机不存在");
    ErrorCode DEV_INSTALL_EXCEPTION = new ErrorCode(1_010_006_001, "装机内部错误");
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentServiceImpl.java
@@ -252,10 +252,11 @@
        String userNickname = SecurityFrameworkUtils.getLoginUserNickname();
        Long rent_id = createReqVO.getId();
        // 对于已有领用,但是装机时使用的不是已领用设备,需释放 源领用 设备
        DevRentDO devRentDO = getDevRent(rent_id);
        // 对于已有领用,但是装机时使用的不是已领用设备,报错
        if ( null != devRentDO.getDevId() && !createReqVO.getDevId().equals(devRentDO.getDevId()) ) {
            markDevFree( devRentDO.getDevId(), rent_id);
            throw exception(DEVICE_NOT_PAT_RECEIVED);
        }
        // 设置设备 使用中