update 标准法规

This commit is contained in:
liao
2023-09-18 18:14:36 +08:00
parent 8777461841
commit e6ba82aab6
6 changed files with 17 additions and 13 deletions
@@ -16,6 +16,7 @@ public class ResultCommon {
public static final String EMPTY_STANDARD_NUMBER = "message.empty.standard.number"; // 标准编号不能为空
public static final String EMPTY_STANDARD_NAME = "message.empty.standard.name"; // 标准名称不能为空
public static final String EMPTY_COMMON = "message.empty.common"; // {0}不能为空
public static final String EXIST_STANDARD_NUMBER = "message.exists.standard.number"; // 标准编号已经存在
public static final String RMR_SET_QUALITY_OVER_TEN = "es.rmr.setQuality.overTen"; // 请最多选择10条
@@ -295,6 +295,10 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
if (StringUtils.isBlank(standardNumber)) {
throw new JeroBootException(ResultCommon.EMPTY_STANDARD_NUMBER);
}
ManyStandardSelectionBox singleStandard = getSingleStandard(standardNumber);
if (!Objects.isNull(singleStandard)) {
throw new JeroBootException(ResultCommon.EXIST_STANDARD_NUMBER);
}
// 标准名称不能为空
String standardName = (String) parameterMap.get(FieldCommon.STANDARD_NAME);
if (StringUtils.isBlank(standardName)) {
@@ -555,11 +559,8 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
}
List<String> idList = Arrays.asList(ids.split(","));
// 操作数据库进行删除操作
int rowsDeleted = lawsCommonMapper.logicalDeleteByIdsAndModule(tableName, idList);
if (rowsDeleted > 0) {
return MessageUtils.getMessage(ResultCommon.OK);
}
return MessageUtils.getMessage(ResultCommon.ERROR);
lawsCommonMapper.logicalDeleteByIdsAndModule(tableName, idList);
return MessageUtils.getMessage(ResultCommon.OK);
}
@Override
@@ -1,12 +1,11 @@
package com.jero.modules.laws.standard.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.jero.modules.laws.common.constant.FieldCommon;
import com.jero.modules.laws.standard.entity.LawsDomesticStandard;
import com.jero.modules.laws.common.service.ILawsCommonService;
import com.jero.modules.laws.common.vo.ManyStandardSelectionBox;
import com.jero.modules.laws.standard.entity.LawsNodeRelation;
import com.jero.modules.laws.standard.entity.LawsTreeNode;
import com.jero.modules.laws.standard.mapper.LawsNodeRelationMapper;
import com.jero.modules.laws.standard.service.ILawsDomesticStandardService;
import com.jero.modules.laws.standard.service.ILawsNodeRelationService;
import com.jero.modules.laws.standard.service.ILawsTreeNodeService;
import com.spire.ms.System.Collections.ArrayList;
@@ -33,7 +32,7 @@ public class LawsNodeRelationServiceImpl extends ServiceImpl<LawsNodeRelationMap
@Autowired
private ILawsTreeNodeService lawsTreeNodeService;
@Autowired
private ILawsDomesticStandardService lawsDomesticStandardService;
private ILawsCommonService lawsCommonService;
/**
* @Author: liao
@@ -88,8 +87,10 @@ public class LawsNodeRelationServiceImpl extends ServiceImpl<LawsNodeRelationMap
@Override
public void addRelation(String nodeIds, String standardNumber) {
// 根据standardNumber查询标准id
LambdaQueryWrapper<LawsDomesticStandard> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(LawsDomesticStandard::getStandardNumber, standardNumber);
ManyStandardSelectionBox singleStandard = lawsCommonService.getSingleStandard(standardNumber);
String standardId = singleStandard.getId();
List<String> nodeIdList = Arrays.asList(nodeIds.split(","));
}
@@ -12,7 +12,7 @@ message.empty.source=The source cannot be empty
message.empty.common=The {0} cannot be empty
message.empty.standard.number=The standard number cannot be empty
message.empty.standard.name=The standard name cannot be empty
message.exists.standard.number=standard number already exists
successfully.cleared=successfully cleared
successfully.deleted.in.bulk=successfully deleted in bulk
@@ -11,6 +11,7 @@ message.empty.source=The source cannot be empty
message.empty.common=The {0} cannot be empty
message.empty.standard.number=The standard number cannot be empty
message.empty.standard.name=The standard name cannot be empty
message.exists.standard.number=standard number already exists
es.rmr.setQuality.overTen=Please select up to 10
@@ -12,7 +12,7 @@ message.empty.source=\u6765\u6E90\u4E0D\u80FD\u4E3A\u7A7A
message.empty.common={0}\u4E0D\u80FD\u4E3A\u7A7A
message.empty.standard.number=\u6807\u51C6\u7F16\u53F7\u4E0D\u80FD\u4E3A\u7A7A
message.empty.standard.name=\u6807\u51C6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A
message.exists.standard.number=标准编号已经存在
successfully.cleared=\u6E05\u9664\u6210\u529F
successfully.deleted.in.bulk=\u6279\u91CF\u5220\u9664\u6210\u529F