根据标准id查询分解单的文本类型返回结构修改
This commit is contained in:
+2
-2
@@ -123,8 +123,8 @@ public class SarStandItemsController extends BaseController<SarStandItems> {
|
||||
|
||||
@ApiOperation(value = "|SarFileSplitInfoEO|根据标准id查询分解单的文本类型")
|
||||
@GetMapping("getFileType")
|
||||
public ResponseMessage<Map<String,String>> getFileType(String standId){
|
||||
Map<String, String> fileType = ServiceImpl.getFileType(standId);
|
||||
public ResponseMessage<List<Map<String, String>>> getFileType(String standId){
|
||||
List<Map<String, String>> fileType = ServiceImpl.getFileType(standId);
|
||||
|
||||
return Result.success(fileType);
|
||||
}
|
||||
|
||||
+9
-5
@@ -242,13 +242,17 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
||||
return sarStandItems;
|
||||
}
|
||||
|
||||
public Map<String,String> getFileType(String standId){
|
||||
public List<Map<String, String>> getFileType(String standId){
|
||||
List<String> fileType = dao.getFileType(standId);
|
||||
Map<String, String> typeNameMap = InitStandAttrUtil.standInlandAttrFieldList.stream()
|
||||
.collect(Collectors.toMap(SarStandAttrDetails::getAttrField, SarStandAttrDetails::getAttrName));
|
||||
List<Map<String, String>> collect = InitStandAttrUtil.standInlandAttrFieldList.stream()
|
||||
.map(item -> {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("label", item.getAttrName());
|
||||
map.put("value", item.getAttrField());
|
||||
return map;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
|
||||
Map<String, String> collect = fileType.stream()
|
||||
.collect(Collectors.toMap(a -> a, b -> typeNameMap.get(b)));
|
||||
return collect;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user