feat: 三标详情通用接口(自动匹配标准类型)
This commit is contained in:
+8
@@ -22,6 +22,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author: liao
|
||||
@@ -45,6 +46,13 @@ public class LawsCommonController {
|
||||
return Result.OK(lawsCommonService.getManyStandardSelectionBox(selectionBoxVO, pageNo, pageSize));
|
||||
}
|
||||
|
||||
@ApiOperation(value="根据标准号查询标准", notes="根据标准号查询标准")
|
||||
@GetMapping(value = "/getInfoByStandardNo")
|
||||
public Result<Map<String, Object>> getInfoByStandardNo(
|
||||
@RequestParam("standardNumber") String standardNumber) {
|
||||
return Result.OK(lawsCommonService.getInfoByStandardNo(standardNumber));
|
||||
}
|
||||
|
||||
@ApiOperation(value="标准右侧抽屉", notes="标准右侧抽屉")
|
||||
@GetMapping(value = "/getStandardRightBox")
|
||||
public Result<IPage<ManyStandardSelectionBox>> getStandardRightBox(ManyStandardSelectionBoxVO selectionBoxVO,
|
||||
|
||||
+7
@@ -215,4 +215,11 @@ public interface ILawsCommonService {
|
||||
* @return
|
||||
*/
|
||||
List<LawsTag> getAdvancedQueryCondition(String moduleValue);
|
||||
|
||||
/**
|
||||
* 根据标准编号获取标准信息
|
||||
* @param standardNumber
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> getInfoByStandardNo(String standardNumber);
|
||||
}
|
||||
|
||||
+45
-14
@@ -192,12 +192,12 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
// 筛选出用于查询的字段
|
||||
List<LawsTag> fieldListCondition;
|
||||
// 首页高级检索使用
|
||||
if(parameterMap.containsKey("home_search_key")){
|
||||
if (parameterMap.containsKey("home_search_key")) {
|
||||
parameterMap.remove("home_search_key");
|
||||
fieldListSelect = fieldList;
|
||||
fieldListCondition = fieldList.stream().filter(lawsTag -> Objects.equals(YesOrNoEnum.YES.getValue(),
|
||||
lawsTag.getIsShowSearch().toString())).collect(Collectors.toList());
|
||||
}else{
|
||||
} else {
|
||||
// 筛选出查询列表显示的字段(不传id查列表)
|
||||
fieldListSelect = fieldList.stream().filter(lawsTag -> YesOrNoEnum.YES.getValue()
|
||||
.equals(lawsTag.getIsShowList().toString())).collect(Collectors.toList());
|
||||
@@ -480,7 +480,7 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
// 如果是分标委
|
||||
LawsStandardization lawsStandardization = lawsStandardizationService.getById(value);
|
||||
resultMap.put(key, value);
|
||||
if (!Objects.isNull(lawsStandardization)){
|
||||
if (!Objects.isNull(lawsStandardization)) {
|
||||
resultMap.put(key + FieldCommon._DICT_TEXT, lawsStandardization.getName());
|
||||
}
|
||||
} else if (FieldCommon.PART_NAME.equals(key) && StringUtils.isNotBlank(value)) {
|
||||
@@ -789,11 +789,11 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
// 标准状态
|
||||
String standardState = (String) parameterMap.get(FieldCommon.STANDARD_STATE);
|
||||
// 报批 或 发布
|
||||
if (standardState.contains("3") || standardState.contains("4")){
|
||||
if (standardState.contains("3") || standardState.contains("4")) {
|
||||
// 修改标准状态为发布或报批后,征求意见流程的超期待办,流程结束,不进入已办中
|
||||
try {
|
||||
processFbStandardConsultationService.endOverDueBackLog(String.valueOf(parameterMap.get("id")));
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -1980,7 +1980,7 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
}
|
||||
}
|
||||
// 体系
|
||||
String standardSystem = (String) parameterMap.get(FieldCommon.STANDARD_SYSTEM);
|
||||
String standardSystem = (String) parameterMap.get(FieldCommon.STANDARD_SYSTEM);
|
||||
if (StrUtil.isNotBlank(standardSystem)) {
|
||||
idSearch = true;
|
||||
LambdaQueryWrapper<LawsNodeRelation> standSystemWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -1991,7 +1991,7 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
parameterMap.remove(FieldCommon.STANDARD_SYSTEM);
|
||||
}
|
||||
// 代替标准号
|
||||
String replaceStandard = (String) parameterMap.get(FieldCommon.REPLACED_STANDARD);
|
||||
String replaceStandard = (String) parameterMap.get(FieldCommon.REPLACED_STANDARD);
|
||||
if (StrUtil.isNotBlank(replaceStandard)) {
|
||||
List<String> standardNo = Arrays.asList(replaceStandard.split(","));
|
||||
String sql = getLawsReplacedStandardSql(tableName, standardNo, " replaced ", "1");
|
||||
@@ -1999,7 +1999,7 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
parameterMap.remove(FieldCommon.REPLACED_STANDARD);
|
||||
}
|
||||
// 被代替标准号
|
||||
String replacedByStandard = (String) parameterMap.get(FieldCommon.REPLACED_BY_STANDARD);
|
||||
String replacedByStandard = (String) parameterMap.get(FieldCommon.REPLACED_BY_STANDARD);
|
||||
if (StrUtil.isNotBlank(replacedByStandard)) {
|
||||
List<String> standardNo = Arrays.asList(replacedByStandard.split(","));
|
||||
String sql = getLawsReplacedByStandardSql(tableName, standardNo, " replaced_by ", "1");
|
||||
@@ -2007,7 +2007,7 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
parameterMap.remove(FieldCommon.REPLACED_BY_STANDARD);
|
||||
}
|
||||
// 引用标准号
|
||||
String referenceStandard = (String) parameterMap.get(FieldCommon.REFERENCE_STANDARD);
|
||||
String referenceStandard = (String) parameterMap.get(FieldCommon.REFERENCE_STANDARD);
|
||||
if (StrUtil.isNotBlank(referenceStandard)) {
|
||||
List<String> standardNo = Arrays.asList(referenceStandard.split(","));
|
||||
String sql = getLawsReplacedStandardSql(tableName, standardNo, " replaced ", "2");
|
||||
@@ -2015,7 +2015,7 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
parameterMap.remove(FieldCommon.REFERENCE_STANDARD);
|
||||
}
|
||||
// 被引用标准号
|
||||
String referencedStandard = (String) parameterMap.get(FieldCommon.REFERENCED_STANDARD);
|
||||
String referencedStandard = (String) parameterMap.get(FieldCommon.REFERENCED_STANDARD);
|
||||
if (StrUtil.isNotBlank(referencedStandard)) {
|
||||
List<String> standardNo = Arrays.asList(referencedStandard.split(","));
|
||||
String sql = getLawsReplacedByStandardSql(tableName, standardNo, " replaced_by ", "2");
|
||||
@@ -2024,7 +2024,7 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
}
|
||||
|
||||
// 分标委
|
||||
String biddingCommittee = (String) parameterMap.get(FieldCommon.BIDDING_COMMITTEE);
|
||||
String biddingCommittee = (String) parameterMap.get(FieldCommon.BIDDING_COMMITTEE);
|
||||
if (StrUtil.isNotBlank(biddingCommittee)) {
|
||||
LambdaQueryWrapper<LawsStandardization> standardizationWrapper = new LambdaQueryWrapper<>();
|
||||
standardizationWrapper.eq(LawsStandardization::getPid, "0");
|
||||
@@ -2201,9 +2201,9 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
} else if (FieldCommon.TYPE_SIMPLE_OPTION.contains(fieldShowType)) {
|
||||
// 单选
|
||||
// 单选用户弹框
|
||||
if(Objects.equals(LawsFieldTypeEnum.USER_SINGLE.getValue(),fieldShowType)){
|
||||
getSysUserSql(tableName,selectCondition, key, value);
|
||||
}else{
|
||||
if (Objects.equals(LawsFieldTypeEnum.USER_SINGLE.getValue(), fieldShowType)) {
|
||||
getSysUserSql(tableName, selectCondition, key, value);
|
||||
} else {
|
||||
simpleOption(selectCondition, key, value);
|
||||
}
|
||||
} else if (LawsFieldTypeEnum.DATE_SINGLE.getValue().equals(fieldShowType)) {
|
||||
@@ -2470,6 +2470,37 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
return fieldList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getInfoByStandardNo(String standardNumber) {
|
||||
Map<String, Object> result;
|
||||
// 用国标外标企标分别查询
|
||||
LawsDomesticStandard gbStandard = lawsDomesticStandardService.getOne(new LambdaQueryWrapper<LawsDomesticStandard>()
|
||||
.eq(LawsDomesticStandard::getStandardNumber, standardNumber));
|
||||
if (gbStandard != null) {
|
||||
this.addLookHistory(gbStandard.getId(), "1", TableNameEnum.DOMESTIC_REGULATIONS.getValue(), standardNumber);
|
||||
result = this.getByIdAndModule(gbStandard.getId(), TableNameEnum.DOMESTIC_REGULATIONS.getValue(), "1", standardNumber);
|
||||
result.put("source", TableNameEnum.DOMESTIC_REGULATIONS.getName());
|
||||
return result;
|
||||
}
|
||||
LawsOverseasStandard fbStandard = lawsOverseasStandardService.getOne(new LambdaQueryWrapper<LawsOverseasStandard>()
|
||||
.eq(LawsOverseasStandard::getStandardNumber, standardNumber));
|
||||
if (fbStandard != null) {
|
||||
this.addLookHistory(fbStandard.getId(), "1", TableNameEnum.FOREIGN_REGULATIONS.getValue(), standardNumber);
|
||||
result = this.getByIdAndModule(fbStandard.getId(), TableNameEnum.FOREIGN_REGULATIONS.getValue(), "1", standardNumber);
|
||||
result.put("source", TableNameEnum.FOREIGN_REGULATIONS.getName());
|
||||
return result;
|
||||
}
|
||||
LawsEnterpriseStandard esStandard = lawsEnterpriseStandardService.getOne(new LambdaQueryWrapper<LawsEnterpriseStandard>()
|
||||
.eq(LawsEnterpriseStandard::getStandardNumber, standardNumber));
|
||||
if (esStandard != null) {
|
||||
this.addLookHistory(esStandard.getId(), "1", TableNameEnum.ENTERPRISE_STANDARDS.getValue(), standardNumber);
|
||||
result = this.getByIdAndModule(esStandard.getId(), TableNameEnum.ENTERPRISE_STANDARDS.getValue(), "1", standardNumber);
|
||||
result.put("source", TableNameEnum.ENTERPRISE_STANDARDS.getName());
|
||||
return result;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建企标导入模板的Workbook
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user