fix: 体系搜索,国内海外标准将标准状态换成文本状态
This commit is contained in:
@@ -51,6 +51,9 @@ public class StandSystemDTO {
|
||||
@ApiModelProperty(value = "标准状态")
|
||||
private String standState;
|
||||
|
||||
@ApiModelProperty(value = "文本状态")
|
||||
private String textStatus;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "开始发布日期")
|
||||
|
||||
+10
-7
@@ -276,7 +276,9 @@ public class SarMenuStandardNewServiceNewImpl extends ServiceImpl<SarMenuStandar
|
||||
SarMenuStandard.setSystemSortDFS(sarMenuStandard, currentNumber);
|
||||
|
||||
// 国标外标标准状态字典
|
||||
List<TsDicType> gbStateDictList = dicItemService.selectAllDicTypeNameByDicCode("STANDSTATE");
|
||||
// List<TsDicType> gbStateDictList = dicItemService.selectAllDicTypeNameByDicCode("STANDSTATE");
|
||||
// 国标外标标准文本状态
|
||||
List<TsDicType> gbTextStateDictList = dicItemService.selectAllDicTypeNameByDicCode("WBZTCLASS");
|
||||
// 企标标准状态字典
|
||||
List<TsDicType> esStateDictList = dicItemService.selectAllDicTypeNameByDicCode("TEXTSTATUSBUSS");
|
||||
|
||||
@@ -289,7 +291,8 @@ public class SarMenuStandardNewServiceNewImpl extends ServiceImpl<SarMenuStandar
|
||||
SarMenuStandard node = SarMenuStandard.findNodeById(targetNode, dto.getMenuId());
|
||||
dto.setSystemSort(node.getSystemSort());
|
||||
// 翻译
|
||||
this.translateStandardSystemDTO(dto, gbStateDictList, esStateDictList);
|
||||
// this.translateStandardSystemDTO(dto, gbStateDictList, esStateDictList);
|
||||
this.translateStandardSystemDTO(dto, gbTextStateDictList, esStateDictList);
|
||||
}
|
||||
|
||||
// 两个时间排序
|
||||
@@ -348,19 +351,19 @@ public class SarMenuStandardNewServiceNewImpl extends ServiceImpl<SarMenuStandar
|
||||
return page;
|
||||
}
|
||||
|
||||
private void translateStandardSystemDTO(StandSystemDTO dto, List<TsDicType> gbStateDictList, List<TsDicType> esStateDictList) {
|
||||
private void translateStandardSystemDTO(StandSystemDTO dto, List<TsDicType> gbTextStateDictList, List<TsDicType> esStateDictList) {
|
||||
// 翻译数据来源、标准状态
|
||||
switch (dto.getDataSource()) {
|
||||
case "INLAND":
|
||||
dto.setDataSource("国内标准库");
|
||||
dto.setStandState(gbStateDictList.stream()
|
||||
.filter(dict -> dict.getDicTypeCode().equals(dto.getStandState()))
|
||||
dto.setStandState(gbTextStateDictList.stream()
|
||||
.filter(dict -> dict.getDicTypeCode().equals(dto.getTextStatus()))
|
||||
.findFirst().orElse(new TsDicType()).getDicTypeName());
|
||||
break;
|
||||
case "FOREIGN":
|
||||
dto.setDataSource("海外标准库");
|
||||
dto.setStandState(gbStateDictList.stream()
|
||||
.filter(dict -> dict.getDicTypeCode().equals(dto.getStandState()))
|
||||
dto.setStandState(gbTextStateDictList.stream()
|
||||
.filter(dict -> dict.getDicTypeCode().equals(dto.getTextStatus()))
|
||||
.findFirst().orElse(new TsDicType()).getDicTypeName());
|
||||
break;
|
||||
case "ENTERPRISE":
|
||||
|
||||
@@ -177,9 +177,11 @@
|
||||
<select id="getStandInfoSystemData" resultType="com.adc.da.slrs.sarMenuStandard.entity.StandSystemDTO">
|
||||
SELECT
|
||||
gb.ID AS standId,
|
||||
CONCAT(gb.STAND_SORT, ' ', gb.STAND_NUMBER) AS standNo,
|
||||
CONCAT(gb.STAND_SORT, ' ', ifnull(gb.STAND_NUMBER,''),
|
||||
case when gb.STAND_YEAR is not null and gb.STAND_YEAR!= '' then concat('-',gb.STAND_YEAR) else '' end) AS standNo,
|
||||
gb.STAND_NAME AS standName,
|
||||
gb.STAND_STATE AS standState,
|
||||
gb.TEXT_STATUS AS textStatus,
|
||||
CASE
|
||||
WHEN gb.ISSUE_TIME = '' THEN NULL
|
||||
ELSE gb.ISSUE_TIME
|
||||
|
||||
Reference in New Issue
Block a user