虚拟清单,法规清单--高级搜索
This commit is contained in:
+7
@@ -60,6 +60,13 @@ public interface IBussDocumentLibraryEOService extends IService<BussDocumentLibr
|
|||||||
*/
|
*/
|
||||||
List<Map<String, Object>> queryCondition(String flag, String cut,String searchFlag);
|
List<Map<String, Object>> queryCondition(String flag, String cut,String searchFlag);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询条件(法规清单或虚拟清单高级搜索需要的数据)
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Map<String, Object>> queryConditionInventory(String flag, String cut);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表表头
|
* 列表表头
|
||||||
*
|
*
|
||||||
|
|||||||
+56
@@ -419,6 +419,62 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 查询条件(法规清单或虚拟清单高级搜索需要的数据)
|
||||||
|
*
|
||||||
|
* @param flag
|
||||||
|
* @param cut
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Map<String, Object>> queryConditionInventory(String flag, String cut) {
|
||||||
|
List<OnlCgformField> 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<SysCategoryTreeVO> sysCategoryTree = sysCategoryService.getSysCategoryTree();
|
||||||
|
List<Map<String, Object>> list = new ArrayList<>();
|
||||||
|
for (OnlCgformField onlCgformField : fieldList) {
|
||||||
|
Map<String, Object> 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<SysCategoryTreeVO> 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;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表表头
|
* 列表表头
|
||||||
|
|||||||
+32
-1
@@ -5,11 +5,13 @@ import com.jero.common.api.vo.Result;
|
|||||||
import com.jero.common.aspect.annotation.AutoLog;
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
import com.jero.common.constant.enums.CutEnum;
|
import com.jero.common.constant.enums.CutEnum;
|
||||||
import com.jero.common.system.base.controller.JeroController;
|
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.entity.DummyInventoryInfoEO;
|
||||||
import com.jero.modules.dummy.service.IDummyInventoryInfoEOService;
|
import com.jero.modules.dummy.service.IDummyInventoryInfoEOService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
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.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
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.bind.annotation.RestController;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
@@ -26,9 +29,10 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 虚拟清单详情表
|
* @Description: 虚拟清单详情表
|
||||||
* @Author: jero-boot
|
* @Author: jero-boot
|
||||||
* @Date: 2022-04-11
|
* @Date: 2022-04-11
|
||||||
@@ -41,6 +45,8 @@ import java.util.List;
|
|||||||
public class DummyInventoryInfoEOController extends JeroController<DummyInventoryInfoEO, IDummyInventoryInfoEOService> {
|
public class DummyInventoryInfoEOController extends JeroController<DummyInventoryInfoEO, IDummyInventoryInfoEOService> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IDummyInventoryInfoEOService dummyInventoryInfoEOService;
|
private IDummyInventoryInfoEOService dummyInventoryInfoEOService;
|
||||||
|
@Autowired
|
||||||
|
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
@@ -266,4 +272,29 @@ public class DummyInventoryInfoEOController extends JeroController<DummyInventor
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询条件 标识传 1-->用于查询文档库字段属
|
||||||
|
* 虚拟清单添加调取文档库时高级搜索条件
|
||||||
|
* @param flag
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "虚拟清单添加调取文档库时高级搜索条件")
|
||||||
|
@ApiOperation(value="虚拟清单添加调取文档库时高级搜索条件", notes="虚拟清单添加调取文档库时高级搜索条件")
|
||||||
|
@GetMapping(value = "/queryConditionInventory")
|
||||||
|
public Result<List<Map<String,Object>>> queryConditionInventory(@RequestParam(name="flag",required=true) String flag,
|
||||||
|
@RequestParam(name="cut",required=true) String cut) {
|
||||||
|
List<Map<String,Object>> list = bussDocumentLibraryEOService.queryConditionInventory(flag,cut);
|
||||||
|
return Result.OK(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value="虚拟清单中添加调用文档库数据--分页", notes="虚拟清单中添加调用文档库数据--分页")
|
||||||
|
@PostMapping(value = "/queryPageDummy")
|
||||||
|
@ResponseBody
|
||||||
|
public JSONObject queryPageDummy(@RequestBody Map<String,Object> parameter) {
|
||||||
|
IPage infoPage = bussDocumentLibraryEOService.getPageDummy(parameter);
|
||||||
|
Result<IPage> ok = Result.OK(infoPage);
|
||||||
|
JSONObject jsonResult = JSONObject.fromObject(ok);
|
||||||
|
return jsonResult;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+27
@@ -28,6 +28,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
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.bind.annotation.RestController;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
@@ -377,4 +378,30 @@ public class ProjectLawsInventoryEOController extends JeroController<ProjectLaws
|
|||||||
return this.projectLawsInventoryEOService.change(parmas);
|
return this.projectLawsInventoryEOService.change(parmas);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询条件 标识传 1-->用于查询文档库字段属
|
||||||
|
* 法规清单添加调取文档库时高级搜索条件
|
||||||
|
* @param flag
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "法规清单添加调取文档库时高级搜索条件")
|
||||||
|
@ApiOperation(value="法规清单添加调取文档库时高级搜索条件", notes="法规清单添加调取文档库时高级搜索条件")
|
||||||
|
@GetMapping(value = "/queryConditionInventory")
|
||||||
|
public Result<List<Map<String,Object>>> queryConditionInventory(@RequestParam(name="flag",required=true) String flag,
|
||||||
|
@RequestParam(name="cut",required=true) String cut) {
|
||||||
|
List<Map<String,Object>> list = bussDocumentLibraryEOService.queryConditionInventory(flag,cut);
|
||||||
|
return Result.OK(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value="法规清单中添加调用文档库数据--分页", notes="法规清单中添加调用文档库数据--分页")
|
||||||
|
@PostMapping(value = "/queryPageDummy")
|
||||||
|
@ResponseBody
|
||||||
|
public net.sf.json.JSONObject queryPageDummy(@RequestBody Map<String,Object> parameter) {
|
||||||
|
IPage infoPage = bussDocumentLibraryEOService.getPageDummy(parameter);
|
||||||
|
Result<IPage> ok = Result.OK(infoPage);
|
||||||
|
net.sf.json.JSONObject jsonResult = net.sf.json.JSONObject.fromObject(ok);
|
||||||
|
return jsonResult;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user