| | |
| | | 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) { |
| | |
| | | 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("更新危化品基础信息失败"); |
| | |
| | | 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); |