拆分已入库文本列表查询增加字典字段
This commit is contained in:
@@ -29,6 +29,10 @@ public class OSSFile extends JeroEntity {
|
|||||||
@Excel(name = "标准文件类型(使用数据库字段名)")
|
@Excel(name = "标准文件类型(使用数据库字段名)")
|
||||||
private String standardFileType;
|
private String standardFileType;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(value = "文本状态")
|
||||||
|
private String standardFileType_dictText;
|
||||||
|
|
||||||
@ApiModelProperty(value = "关联ID")
|
@ApiModelProperty(value = "关联ID")
|
||||||
private String connectId;
|
private String connectId;
|
||||||
|
|
||||||
|
|||||||
+17
-3
@@ -10,6 +10,7 @@ import com.jero.common.constant.enums.LanguageEnum;
|
|||||||
import com.jero.common.constant.enums.ModuleEnum;
|
import com.jero.common.constant.enums.ModuleEnum;
|
||||||
import com.jero.common.constant.enums.YesOrNoEnum;
|
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||||
import com.jero.common.exception.JeroBootException;
|
import com.jero.common.exception.JeroBootException;
|
||||||
|
import com.jero.common.system.vo.DictModel;
|
||||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||||
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
||||||
import com.jero.modules.document.enums.FieldTypeEnum;
|
import com.jero.modules.document.enums.FieldTypeEnum;
|
||||||
@@ -377,9 +378,14 @@ public class SarFileSplitInfoServiceImpl extends ServiceImpl<SarFileSplitInfoMap
|
|||||||
wrapper.in(OSSFile::getStandardId, collect2);
|
wrapper.in(OSSFile::getStandardId, collect2);
|
||||||
}
|
}
|
||||||
wrapper.eq(StringUtils.isNotBlank(param.getStandardFileType()), OSSFile::getStandardFileType, param.getStandardFileType());
|
wrapper.eq(StringUtils.isNotBlank(param.getStandardFileType()), OSSFile::getStandardFileType, param.getStandardFileType());
|
||||||
wrapper.orderByDesc(OSSFile::getCreateTime);
|
//限制process_manuscript字典,standardFileType值只限制在process_manuscript集合中
|
||||||
|
List<DictModel> process_manuscript = sysDictService.queryDictItemsByCode("process_manuscript");
|
||||||
|
List<String> dictList = process_manuscript.stream().map(vo -> vo.getValue()).collect(Collectors.toList());
|
||||||
|
wrapper.in(OSSFile::getStandardFileType, dictList);
|
||||||
|
//限制查询word文档
|
||||||
|
wrapper.last(" AND (file_name LIKE " + "'%.docx'" + " OR file_name LIKE " + "'%.doc' )");
|
||||||
Page<OSSFile> pageList = ossFileService.page(page, wrapper);
|
Page<OSSFile> pageList = ossFileService.page(page, wrapper);
|
||||||
//为来源、标准号、标准名称赋值
|
//为来源、标准号、标准名称、文本状态赋值
|
||||||
Map<String, List<LawsDomesticStandard>> collect1 = lawsDomesticStandards.stream().collect(Collectors.groupingBy(LawsDomesticStandard::getId));
|
Map<String, List<LawsDomesticStandard>> collect1 = lawsDomesticStandards.stream().collect(Collectors.groupingBy(LawsDomesticStandard::getId));
|
||||||
Map<String, List<LawsEnterpriseStandard>> collect2 = lawsEnterpriseStandards.stream().collect(Collectors.groupingBy(LawsEnterpriseStandard::getId));
|
Map<String, List<LawsEnterpriseStandard>> collect2 = lawsEnterpriseStandards.stream().collect(Collectors.groupingBy(LawsEnterpriseStandard::getId));
|
||||||
for (OSSFile record : pageList.getRecords()) {
|
for (OSSFile record : pageList.getRecords()) {
|
||||||
@@ -391,14 +397,22 @@ public class SarFileSplitInfoServiceImpl extends ServiceImpl<SarFileSplitInfoMap
|
|||||||
record.setOrigin_dictText(origin_dictText);
|
record.setOrigin_dictText(origin_dictText);
|
||||||
record.setStandardNumber(standard.getStandardNumber());
|
record.setStandardNumber(standard.getStandardNumber());
|
||||||
record.setStandardName(standard.getStandardName());
|
record.setStandardName(standard.getStandardName());
|
||||||
|
if (StringUtils.isNotBlank(record.getStandardFileType())){
|
||||||
|
String standardFileType_dictText = sysDictService.queryDictTextByKey("process_manuscript", record.getStandardFileType());
|
||||||
|
record.setStandardFileType_dictText(standardFileType_dictText);
|
||||||
|
}
|
||||||
}else {
|
}else {
|
||||||
List<LawsEnterpriseStandard> domesticStandards = collect2.get(standardId);
|
List<LawsEnterpriseStandard> domesticStandards = collect2.get(standardId);
|
||||||
if (domesticStandards != null && !domesticStandards.isEmpty()){
|
if (domesticStandards != null && !domesticStandards.isEmpty()){
|
||||||
LawsEnterpriseStandard standard = domesticStandards.get(0);
|
LawsEnterpriseStandard standard = domesticStandards.get(0);
|
||||||
String origin_dictText = sysDictService.queryDictTextByKey("split_standard_source", "2");
|
String origin_dictText = sysDictService.queryDictTextByKey("split_standard_source", "3");
|
||||||
record.setOrigin_dictText(origin_dictText);
|
record.setOrigin_dictText(origin_dictText);
|
||||||
record.setStandardNumber(standard.getStandardNumber());
|
record.setStandardNumber(standard.getStandardNumber());
|
||||||
record.setStandardName(standard.getStandardName());
|
record.setStandardName(standard.getStandardName());
|
||||||
|
if (StringUtils.isNotBlank(record.getStandardFileType())){
|
||||||
|
String standardFileType_dictText = sysDictService.queryDictTextByKey("process_manuscript", record.getStandardFileType());
|
||||||
|
record.setStandardFileType_dictText(standardFileType_dictText);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user