From da2c594ade5d69621dd11a13bb758477e2dc079e Mon Sep 17 00:00:00 2001 From: “djh” <“3298565835@qq.com”> Date: 星期三, 07 五月 2025 15:57:51 +0800 Subject: [PATCH] 危化品新版修改 --- hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzHazmatBasicServiceImpl.java | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzHazmatBasicServiceImpl.java b/hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzHazmatBasicServiceImpl.java index 5a41154..2c829f3 100644 --- a/hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzHazmatBasicServiceImpl.java +++ b/hazmat-system/src/main/java/com/gkhy/hazmat/system/service/impl/HzHazmatBasicServiceImpl.java @@ -16,6 +16,7 @@ import com.gkhy.hazmat.common.utils.SecurityUtils; import com.gkhy.hazmat.common.utils.StringUtils; import com.gkhy.hazmat.system.domain.HzHazmatBasic; +import com.gkhy.hazmat.system.domain.vo.HzBasicVo; import com.gkhy.hazmat.system.domain.vo.HzSecientificVo; import com.gkhy.hazmat.system.mapper.HzHazmatBasicMapper; import com.gkhy.hazmat.system.mapper.HzSecientificMapper; @@ -50,7 +51,7 @@ @Override public CommonPage selectHazmatBasicList(HzHazmatBasic hazmatBasic) { SysUser currentUser = SecurityUtils.getLoginUser().getUser(); - if (!currentUser.getUserType().equals(UserTypeEnum.SYSTEM_USER.getCode())) { + if (!currentUser.getUserType().equals(UserTypeEnum.SYSTEM_USER.getCode()) && !currentUser.getUserType().equals(UserTypeEnum.CHECK_USER.getCode())) { hazmatBasic.setCompanyId(currentUser.getCompanyId()); } PageUtils.startPage(); @@ -83,6 +84,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 +101,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 +176,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); @@ -198,6 +205,11 @@ return hazmatBasicList.size(); } + @Override + public List<HzBasicVo> basicCount() { + return baseMapper.basicCount(); + } + public void validateData(HazmatBasicExcelData hazmatBasicExcelData){ if(StringUtils.isBlank(hazmatBasicExcelData.getName())){ -- Gitblit v1.9.2