Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage

This commit is contained in:
zyx.net
2022-07-15 16:21:56 +08:00
7 changed files with 88 additions and 21 deletions
@@ -450,13 +450,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
.collect(Collectors.toList());
}
} else {
fieldList = fieldList.stream().filter(e -> {
boolean showFlag = false;
if(YesOrNoEnum.YES.getValue().equals(StringUtils.valueOf(e.getIsQuery())) || e.getDbFieldName().equals("id")){
showFlag = true;
}
return showFlag;
}).collect(Collectors.toList());
fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(StringUtils.valueOf(e.getIsQuery()))).collect(Collectors.toList());
if(CutEnum.CN.getValue().equals(cut)){
fieldList = fieldList.stream().filter(e->!"title_en".equals(e.getDbFieldName())).collect(Collectors.toList());
}else{
@@ -3637,8 +3631,6 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
}
conditionSb.append(" and " + key + " like concat(concat('%','" + value + "'),'%') ESCAPE '/'");
// conditionSb.append(" and " + key + " like concat(concat('%','" + value + "'),'%')");
} else if (StringUtils.equals(fieldName,"id")){
conditionSb.append(" and " + key + " ='" + value + "'");
}
}
}
@@ -210,4 +210,12 @@ public class LawsTechnologyEvaluationEOController extends JeroController<LawsTec
List<Map<String,Object>> result = this.lawsTechnologyEvaluationEOService.importItemExcel(file,cut,request);
return Result.OK(result);
}
@ApiOperation(value="根据id查询明细数据", notes="根据id查询明细数据")
@PostMapping(value = "/queryPageDummyById")
@ResponseBody
public Result<?> queryPageDummyById(@RequestBody Map<String,Object> parameter) {
List<Map<String, Object>> result = this.lawsTechnologyEvaluationEOService.queryPageDummyById(parameter);
return Result.OK(result);
}
}
@@ -86,4 +86,6 @@ public interface ILawsTechnologyEvaluationEOService extends IService<LawsTechnol
void exportItemTemplate(String cut, HttpServletResponse response, HttpServletRequest request);
List<Map<String,Object>> importItemExcel(MultipartFile file, String cut, HttpServletRequest request)throws Exception;
List<Map<String, Object>> queryPageDummyById(Map<String, Object> parameter);
}
@@ -28,12 +28,9 @@ import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.usermodel.HSSFRichTextString;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddress;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@@ -401,6 +398,73 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
return result;
}
@Override
public List<Map<String, Object>> queryPageDummyById(Map<String, Object> parameter) {
String cut = (String) parameter.get("cut");//中英文切换标识
String id = (String) parameter.get("id");
//文档库字段
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(ModuleEnum.DOCUMENT_LIBRARY.getValue());
List<String> fileFieldStrList = fieldList.stream()
.filter(e -> FieldTypeEnum.FILE.getValue().equals(e.getFieldShowType())).map(OnlCgformField::getDbFieldName)
.collect(Collectors.toList());
List<Map<String, Object>> result = this.bussDocumentLibraryEOMapper.queryListByIds(id);
//树形数据字典
List<SysCategory> categoryList = this.sysCategoryService.list();
//过滤出树形字段
List<OnlCgformField> treeFieldList = fieldList.stream()
.filter(e -> FieldTypeEnum.TREE.getValue().equals(e.getFieldShowType()))
.collect(Collectors.toList());
//数据字典
List<SysDictItem> sysDictItems = this.sysDictItemServiceImpl.selectItemsAll();
//下拉选处理数据字典
for (Map record : result) {
Map<String, Object> record1 = (Map) record;
String technology_territory = (String)record1.get("technology_territory");
List<String> connectIdList = new ArrayList<>();
for (Map.Entry<String, Object> entry : record1.entrySet()) {
//下拉选处理数据字典
this.bussDocumentLibraryEOService.dictItem(sysDictItems, entry, cut, fieldList,null);
this.bussDocumentLibraryEOService.treeDictItem(categoryList, entry, treeFieldList, cut,null);
if(fileFieldStrList.contains(entry.getKey())){
if(entry.getValue()!=null){
connectIdList.add(entry.getValue().toString());
}
}
}
record1.put("technology_territory_id",technology_territory);
if(CollectionUtils.isNotEmpty(connectIdList)){
//根据id查询当前文档库数据是否有拆分数据。
QueryWrapper<SarFileSplitInfoEO> splitInfoEOQueryWrapper = new QueryWrapper<>();
splitInfoEOQueryWrapper.lambda().in(SarFileSplitInfoEO::getConnectId,connectIdList);
List<SarFileSplitInfoEO> sarFileSplitInfoList = new ArrayList<>();
List<SarFileSplitInfoEO> sarFileSplitInfoListTemp = sarFileSplitInfoService.list(splitInfoEOQueryWrapper);
if (CollectionUtils.isNotEmpty(sarFileSplitInfoListTemp)){
sarFileSplitInfoListTemp.forEach(splitInfo -> {
//查询出已回传的数据
String flag = ""; // 1 已回传 0未回传。
if(StringUtils.isNotEmpty(splitInfo.getFileId())){
flag = "1";
sarFileSplitInfoList.add(splitInfo);
}else {
flag = "0";
}
splitInfo.setFlag(flag);
});
record1.put("sarFileSplitInfoList",sarFileSplitInfoList);
}
}
}
return result;
}
private String getTreeName(String cut, List<SysCategory> categoryList, List<String> technologyTerritoryList) {
StringBuilder sb = new StringBuilder();
for (String technologyTerritory : technologyTerritoryList) {
@@ -347,15 +347,15 @@
id: this.formInline.standId
}
this.loading = true
let url = ''
if (this.isTrue) {
url = this.url.addModelListOne
} else {
url = this.url.addModelList
}
postAction(url, query).then((res) => {
// let url = ''
// if (this.isTrue) {
// url = this.url.addModelListOne
// } else {
// url = this.url.addModelList
// }
postAction('/lawsTechnologyEvaluation/lawsTechnologyEvaluationEO/queryPageDummyById', query).then((res) => {
if (res.success) {
let content = res.result.records || []
let content = res.result || []
this.selectedRowKeysRecord.push({
standId: content[0].id,
serialNumber: content[0].serial_number,
@@ -275,7 +275,7 @@
}
.title-text {
width: 33px;
width: 73px;
color: #000F16;
display: inline-block;
font-weight: 500;
@@ -382,6 +382,7 @@
id: row.id,
processBackground: row.processBackground,
serialNumber: row.serialNumber,
lawsTechnologyEvaluationId:row.id,
standId: row.standId,
remark:row.remark
}