hyingbo
2025-08-04 4c5af84c8d4c0d5249fdfb4bbc1031f3689a9002
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentSealUpServiceImpl.java
@@ -136,11 +136,11 @@
            throw new JeecgBootException("设备不存在!");
        }
        if (!AssetStatusEnum.NORMAL.name().equals(equipment.getAssetStatus())) {
            throw new JeecgBootException("此设备当前资产状态不允许借出!");
            throw new JeecgBootException("此设备当前资产状态不允许封存!");
        }
        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
        if (sysUser == null) {
            throw new JeecgBootException("当前用户无法添加借用记录!");
            throw new JeecgBootException("当前用户无法添加封存记录!");
        }
        request.setReportUser(sysUser.getUsername());
        return equipmentSealUpMapper.insert(request) > 0;
@@ -161,9 +161,12 @@
        if (equipment == null) {
            throw new JeecgBootException("设备不存在!");
        }
        if (!AssetStatusEnum.NORMAL.name().equals(equipment.getAssetStatus())) {
            throw new JeecgBootException("此设备当前资产状态不允许封存!");
        }
        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
        if (sysUser == null) {
            throw new JeecgBootException("当前用户无法编辑借用记录!");
            throw new JeecgBootException("当前用户无法编辑封存记录!");
        }
        UpdateWrapper<EamEquipmentSealUp> updateWrapper = new UpdateWrapper<>();
        updateWrapper.set("equipment_id", request.getEquipmentId());
@@ -364,6 +367,7 @@
                }
                entity.setUnsealApprovalUser(user.getUsername());
                entity.setUnsealApprovalComment(request.getUnsealApprovalComment());
                entity.setUnsealApprovalDealType(request.getUnsealApprovalDealType());
                entity.setUnsealApprovalTime(new Date());
                // 修改设备状态
                equipment.setAssetStatus(AssetStatusEnum.NORMAL.name());