法规技术评估-根据文档库id,查询文档库数据接口。
This commit is contained in:
+8
@@ -210,4 +210,12 @@ public class LawsTechnologyEvaluationEOController extends JeroController<LawsTec
|
|||||||
List<Map<String,Object>> result = this.lawsTechnologyEvaluationEOService.importItemExcel(file,cut,request);
|
List<Map<String,Object>> result = this.lawsTechnologyEvaluationEOService.importItemExcel(file,cut,request);
|
||||||
return Result.OK(result);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -86,4 +86,6 @@ public interface ILawsTechnologyEvaluationEOService extends IService<LawsTechnol
|
|||||||
void exportItemTemplate(String cut, HttpServletResponse response, HttpServletRequest request);
|
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>> importItemExcel(MultipartFile file, String cut, HttpServletRequest request)throws Exception;
|
||||||
|
|
||||||
|
List<Map<String, Object>> queryPageDummyById(Map<String, Object> parameter);
|
||||||
}
|
}
|
||||||
|
|||||||
+67
-3
@@ -28,12 +28,9 @@ import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
|||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
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.HSSFSheet;
|
||||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||||
import org.apache.poi.ss.usermodel.*;
|
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.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -401,6 +398,73 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
|||||||
return result;
|
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) {
|
private String getTreeName(String cut, List<SysCategory> categoryList, List<String> technologyTerritoryList) {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
for (String technologyTerritory : technologyTerritoryList) {
|
for (String technologyTerritory : technologyTerritoryList) {
|
||||||
|
|||||||
Reference in New Issue
Block a user