update 标准法规
This commit is contained in:
@@ -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条
|
||||
|
||||
|
||||
+6
-5
@@ -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
|
||||
|
||||
+7
-6
@@ -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(","));
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user