|
@@ -199,10 +199,12 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
@ApiModelProperty(value = "刷新文件题名")
|
|
|
@ApiOperationSupport(order = 28)
|
|
|
public R<Boolean> flushQueryName(@RequestBody FlushQueryNameDTO dto){
|
|
|
- if(dto.getMap().size()<=0){
|
|
|
+ if(dto.getList().size()<=0){
|
|
|
throw new ServiceException("请选择要刷新的文件");
|
|
|
}
|
|
|
- List<Long> idList=new ArrayList<>(dto.getMap().keySet());
|
|
|
+ List<Long> idList = dto.getList().stream().map(FlushQueryNameDTO.MapValue::getId).collect(Collectors.toList());
|
|
|
+ Map<Long, String> nodeNameMap = dto.getList().stream()
|
|
|
+ .collect(Collectors.toMap(FlushQueryNameDTO.MapValue::getId, FlushQueryNameDTO.MapValue::getNodeName));
|
|
|
List<InformationQuery> queryList = this.informationQueryService.list(Wrappers.<InformationQuery>lambdaQuery()
|
|
|
.select(InformationQuery::getId, InformationQuery::getName,InformationQuery::getProjectId,InformationQuery::getClassify,InformationQuery::getStatus,InformationQuery::getWbsId).in(InformationQuery::getId, idList));
|
|
|
String sgSuffix="";
|
|
@@ -221,7 +223,7 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
if(dto.getType()==1){
|
|
|
result=wbsParamClient.createFileTitle(contract);
|
|
|
}else {
|
|
|
- result=dto.getMap().get(query.getId());
|
|
|
+ result=nodeNameMap.get(query.getId());
|
|
|
}
|
|
|
if(contract!=null&&contract.getMajorDataType()!=null&&contract.getMajorDataType()==4){
|
|
|
if(query.getClassify()!=null&&query.getClassify()==1&&StringUtils.isNotEmpty(sgSuffix)){
|
|
@@ -258,7 +260,7 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
ancestorsPId = ancestorsPId.substring(2);
|
|
|
}
|
|
|
ancestorsPId=ancestorsPId+","+contract.getPKeyId();
|
|
|
- String sql="select node_name,node_type from m_wbs_tree_contract where p_key_id in ("+ancestorsPId+") and is_deleted=0";
|
|
|
+ String sql="select REPLACE(REPLACE(node_name, CHAR(10), ''), CHAR(13), '') as node_name,node_type from m_wbs_tree_contract where p_key_id in ("+ancestorsPId+") and is_deleted=0";
|
|
|
List<WbsTreeContract> nodeNames = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(WbsTreeContract.class));
|
|
|
param = param.trim().replaceAll("(?i:c)", "");
|
|
|
List<String> list = Arrays.asList(param.split("[^.\\d]"));
|