危化品全生命周期管理后端
“djh”
2025-05-07 da2c594ade5d69621dd11a13bb758477e2dc079e
hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/TaBooWarningServiceImpl.java
@@ -17,6 +17,7 @@
import com.gkhy.hazmat.common.utils.SecurityUtils;
import com.gkhy.hazmat.system.domain.*;
import com.gkhy.hazmat.system.domain.vo.HzEntryTransferVO;
import com.gkhy.hazmat.system.domain.vo.HzTabooVo;
import com.gkhy.hazmat.system.domain.vo.TabooDisVo;
import com.gkhy.hazmat.system.mapper.*;
import com.gkhy.hazmat.system.service.HzEntryRecordService;
@@ -61,7 +62,9 @@
    public CommonPage selectHzTabooWarningPageList(HzTabooWarning hzTabooWarning) {
        PageUtils.startPage();
        SysUser currentUser=SecurityUtils.getLoginUser().getUser();
        hzTabooWarning.setCompanyId(currentUser.getCompanyId());
        if (!currentUser.getUserType().equals(UserTypeEnum.CHECK_USER.getCode())){
            hzTabooWarning.setCompanyId(currentUser.getCompanyId());
        }
        List<HzTabooWarning> hzTabooWarnings = baseMapper.selectHzTabooWarningList(hzTabooWarning);
        return CommonPage.restPage(hzTabooWarnings);
    }
@@ -69,7 +72,9 @@
    @Override
    public List<HzTabooWarning> selectHzTabooWarningList(HzTabooWarning tabooWarning) {
        SysUser currentUser=SecurityUtils.getLoginUser().getUser();
        tabooWarning.setCompanyId(currentUser.getCompanyId());
        if (!currentUser.getUserType().equals(UserTypeEnum.CHECK_USER.getCode())){
            tabooWarning.setCompanyId(currentUser.getCompanyId());
        }
        tabooWarning.setState(0);
        return baseMapper.selectHzTabooWarningList(tabooWarning);
    }
@@ -181,9 +186,17 @@
        //处理数据本身
         baseMapper.updateById(new HzTabooWarning().setState(1).setUpdateBy(currentUser.getUsername()).setId(entryTransferVO.getId()));
         baseMapper.updateById(new HzTabooWarning().setState(1).
                 setUpdateBy(currentUser.getUsername()).setReCupboardId(entryTransferVO.getCupboardId()).setReWarehouseId(entryTransferVO.getWarehouseId())
                 .setId(entryTransferVO.getId()));
    }
    @Override
    public List<HzTabooVo> listCount(Integer state) {
        return baseMapper.selectListCount(state);
    }
    public void checkUserAllowed(HzEntryRecord entryRecord,SysUser user) {
        if (user.getUserType().equals(UserTypeEnum.SYSTEM_USER.getCode())) {
            throw new ApiException("管理员不能操作");