git
heheng
2025-03-06 07a6e79342c381d4d8c98a92a216c41dc9502a09
hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzHazmatBasicServiceImpl.java
@@ -83,6 +83,7 @@
        HzSecientificVo hzSecientificVo = secientificMapper.selectBySecientificName(hazmatBasic.getName());
        hazmatBasic.setPeculiarityType(hzSecientificVo!=null? hzSecientificVo.getPeculiarityType() : null);
        hazmatBasic.setPeculiarityNumber(hzSecientificVo!=null? hzSecientificVo.getPeculiarityNumber() : 0);
        hazmatBasic.setSecientificId(hzSecientificVo!=null? hzSecientificVo.getId() : null);
        int row = baseMapper.insert(hazmatBasic);
        if (row < 1) {
@@ -99,6 +100,10 @@
        SysUser currentUser = SecurityUtils.getLoginUser().getUser();
        checkUserAllowed(hazmatBasic,currentUser);
        hazmatBasic.setUpdateBy(currentUser.getUsername());
        HzSecientificVo hzSecientificVo = secientificMapper.selectBySecientificName(hazmatBasic.getName());
        hazmatBasic.setPeculiarityType(hzSecientificVo!=null? hzSecientificVo.getPeculiarityType() : null);
        hazmatBasic.setPeculiarityNumber(hzSecientificVo!=null? hzSecientificVo.getPeculiarityNumber() : 0);
        hazmatBasic.setSecientificId(hzSecientificVo!=null? hzSecientificVo.getId() : null);
        int row=baseMapper.updateById(hazmatBasic);
        if(row<1){
            throw new ApiException("更新危化品基础信息失败");
@@ -170,6 +175,7 @@
            HzSecientificVo hzSecientificVo = secientificMapper.selectBySecientificName(hazmatBasic.getName());
            hazmatBasic.setPeculiarityType(hzSecientificVo!=null? hzSecientificVo.getPeculiarityType() : "");
            hazmatBasic.setPeculiarityNumber(hzSecientificVo!=null? hzSecientificVo.getPeculiarityNumber() : 0);
            hazmatBasic.setSecientificId(hzSecientificVo!=null? hzSecientificVo.getId() : null);
            hazmatBasic.setKind(kind);
            hazmatBasic.setMinPackage(minPackage);