diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/IBussDocumentLibraryEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/IBussDocumentLibraryEOService.java index 05be0f6fd..d6f90f45f 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/IBussDocumentLibraryEOService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/IBussDocumentLibraryEOService.java @@ -60,6 +60,13 @@ public interface IBussDocumentLibraryEOService extends IService> queryCondition(String flag, String cut,String searchFlag); + /** + * 查询条件(法规清单或虚拟清单高级搜索需要的数据) + * + * @return + */ + List> queryConditionInventory(String flag, String cut); + /** * 列表表头 * diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java index 7e17e6c0f..208c6412b 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java @@ -419,6 +419,62 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl> queryConditionInventory(String flag, String cut) { + List fieldList = onlCgformFieldService.getFieldList(ModuleEnum.DOCUMENT_LIBRARY.getValue()); + //高级搜索中过滤掉编号,标题,状态 + fieldList = fieldList.stream() + .filter(e -> !"serial_number".equals(e.getDbFieldName()) + && !"title".equals(e.getDbFieldName()) + && !"title_en".equals(e.getDbFieldName()) + && !"state".equals(e.getDbFieldName())) + .collect(Collectors.toList()); + + if (fieldList.size() != 0) { + //过滤出搜索条件() + fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsQuery()))).collect(Collectors.toList()); + } + //树形数据字典 + List sysCategoryTree = sysCategoryService.getSysCategoryTree(); + List> list = new ArrayList<>(); + for (OnlCgformField onlCgformField : fieldList) { + Map map = new HashMap<>(); + map.put("type",""); + map.put("dictCode",""); + //判断是输入框还是日期类型 + String fieldShowType = onlCgformField.getFieldShowType(); + if(FieldTypeEnum.TEXT_STRING.getValue().equals(fieldShowType)){ + map.put("type","string"); + }else if(FieldTypeEnum.DATE_SINGLE.getValue().equals(fieldShowType)){ + map.put("type","date"); + }else if(FieldTypeEnum.PULL_SINGLE.getValue().equals(fieldShowType) || FieldTypeEnum.PULL_MORE.getValue().equals(fieldShowType)){ + map.put("dictCode",onlCgformField.getDictField()); + } + map.put("value",onlCgformField.getDbFieldName()); + if(CutEnum.CN.getValue().equals(cut)){ + map.put("text",onlCgformField.getDbFieldTxt()); + }else{ + map.put("text",onlCgformField.getDbFieldEnName()); + } + + if ("technology_territory".equals(onlCgformField.getDbFieldName())) { + List sysCategoryTreeVOList = sysCategoryTree.stream().filter(e -> onlCgformField.getDictId().equals(e.getDictId())).collect(Collectors.toList()); + map.put("tree", sysCategoryTreeVOList); + } else { + map.put("tree", new ArrayList<>()); + } + + list.add(map); + } + return list; + } /** * 列表表头 diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/controller/DummyInventoryInfoEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/controller/DummyInventoryInfoEOController.java index 0ce478b4b..4e6367700 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/controller/DummyInventoryInfoEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/controller/DummyInventoryInfoEOController.java @@ -5,11 +5,13 @@ import com.jero.common.api.vo.Result; import com.jero.common.aspect.annotation.AutoLog; import com.jero.common.constant.enums.CutEnum; import com.jero.common.system.base.controller.JeroController; +import com.jero.modules.document.service.IBussDocumentLibraryEOService; import com.jero.modules.dummy.entity.DummyInventoryInfoEO; import com.jero.modules.dummy.service.IDummyInventoryInfoEOService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; +import net.sf.json.JSONObject; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; @@ -18,6 +20,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.servlet.ModelAndView; @@ -26,9 +29,10 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.Arrays; import java.util.List; +import java.util.Map; - /** +/** * @Description: 虚拟清单详情表 * @Author: jero-boot * @Date: 2022-04-11 @@ -41,6 +45,8 @@ import java.util.List; public class DummyInventoryInfoEOController extends JeroController { @Autowired private IDummyInventoryInfoEOService dummyInventoryInfoEOService; + @Autowired + private IBussDocumentLibraryEOService bussDocumentLibraryEOService; /** * 分页列表查询 @@ -266,4 +272,29 @@ public class DummyInventoryInfoEOController extends JeroController用于查询文档库字段属 + * 虚拟清单添加调取文档库时高级搜索条件 + * @param flag + * @return + */ + @AutoLog(value = "虚拟清单添加调取文档库时高级搜索条件") + @ApiOperation(value="虚拟清单添加调取文档库时高级搜索条件", notes="虚拟清单添加调取文档库时高级搜索条件") + @GetMapping(value = "/queryConditionInventory") + public Result>> queryConditionInventory(@RequestParam(name="flag",required=true) String flag, + @RequestParam(name="cut",required=true) String cut) { + List> list = bussDocumentLibraryEOService.queryConditionInventory(flag,cut); + return Result.OK(list); + } + + @ApiOperation(value="虚拟清单中添加调用文档库数据--分页", notes="虚拟清单中添加调用文档库数据--分页") + @PostMapping(value = "/queryPageDummy") + @ResponseBody + public JSONObject queryPageDummy(@RequestBody Map parameter) { + IPage infoPage = bussDocumentLibraryEOService.getPageDummy(parameter); + Result ok = Result.OK(infoPage); + JSONObject jsonResult = JSONObject.fromObject(ok); + return jsonResult; + } + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectLawsInventoryEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectLawsInventoryEOController.java index a0ed39ea1..1796040b2 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectLawsInventoryEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectLawsInventoryEOController.java @@ -28,6 +28,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.servlet.ModelAndView; @@ -377,4 +378,30 @@ public class ProjectLawsInventoryEOController extends JeroController用于查询文档库字段属 + * 法规清单添加调取文档库时高级搜索条件 + * @param flag + * @return + */ + @AutoLog(value = "法规清单添加调取文档库时高级搜索条件") + @ApiOperation(value="法规清单添加调取文档库时高级搜索条件", notes="法规清单添加调取文档库时高级搜索条件") + @GetMapping(value = "/queryConditionInventory") + public Result>> queryConditionInventory(@RequestParam(name="flag",required=true) String flag, + @RequestParam(name="cut",required=true) String cut) { + List> list = bussDocumentLibraryEOService.queryConditionInventory(flag,cut); + return Result.OK(list); + } + + + @ApiOperation(value="法规清单中添加调用文档库数据--分页", notes="法规清单中添加调用文档库数据--分页") + @PostMapping(value = "/queryPageDummy") + @ResponseBody + public net.sf.json.JSONObject queryPageDummy(@RequestBody Map parameter) { + IPage infoPage = bussDocumentLibraryEOService.getPageDummy(parameter); + Result ok = Result.OK(infoPage); + net.sf.json.JSONObject jsonResult = net.sf.json.JSONObject.fromObject(ok); + return jsonResult; + } + }