diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/entity/SysCategory.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/entity/SysCategory.java index 2a3388f90..d3cf2568c 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/entity/SysCategory.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/entity/SysCategory.java @@ -60,9 +60,9 @@ public class SysCategory implements Serializable,Comparable{ private java.lang.String sysOrgCode; /**数据字典id*/ - @Excel(name = "数据字典id", width = 15) - @Dict(dictTable = "sys_dict", dicText = "id", dicCode = "id") - @ApiModelProperty(value = "是否为标签内容-数据字典(1是 0否)") +// @Excel(name = "数据字典id", width = 15) +// @Dict(dictTable = "sys_dict", dicText = "id", dicCode = "id") + @ApiModelProperty(value = "数据字典id") private java.lang.String sysDictId; /**是否有子节点*/ @@ -104,6 +104,9 @@ public class SysCategory implements Serializable,Comparable{ @TableField(exist = false) private java.lang.String itemValue; + @TableField(exist = false) + private String cut; + @Override public int compareTo(SysCategory o) { //比较条件我们定的是按照code的长度升序 diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/SysCategoryServiceImpl.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/SysCategoryServiceImpl.java index 3b61ad3a9..c14d6b8b1 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/SysCategoryServiceImpl.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/SysCategoryServiceImpl.java @@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.jero.common.constant.CommonConstant; import com.jero.common.constant.FillRuleConstant; +import com.jero.common.constant.enums.CutEnum; import com.jero.common.exception.JeroBootException; import com.jero.common.util.FillRuleUtil; import com.jero.common.util.oConvertUtils; @@ -31,6 +32,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * @Description: 分类字典 @@ -88,6 +90,19 @@ public class SysCategoryServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("sys_dict_id", sysCategory.getSysDictId()).eq("del_flag",CommonConstant.DEL_FLAG_0); + List sysCategoryList = list(queryWrapper); + List sysCategoryNameList = sysCategoryList.stream().map(e -> e.getName()).collect(Collectors.toList()); + if(sysCategoryNameList.contains(sysCategory.getName())){ + if(CutEnum.CN.getValue().equals(sysCategory.getCut())) { + throw new JeroBootException("名称不能重复!"); + }else{ + throw new JeroBootException("The name cannot be duplicate!"); + } + } + baseMapper.insert(sysCategory); } 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; + } + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/mapper/xml/ProjectLibraryBaseMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/mapper/xml/ProjectLibraryBaseMapper.xml index a0f45c3a4..3bf037ee1 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/mapper/xml/ProjectLibraryBaseMapper.xml +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/mapper/xml/ProjectLibraryBaseMapper.xml @@ -59,10 +59,10 @@ - and pni.project_name like '%1%%' escape '1' + and( pni.project_name like '%1%%' escape '1' or pni.project_name like '%1%%' escape '1') - and pni.project_name like concat('%',#{params.projectName},'%') + and(pni.project_name like concat('%',#{params.projectName},'%') or pyni.year_name like ('%',#{params.projectName},'%')) diff --git a/jero-web/src/views/documentManage/tags/dialog/ListTable.vue b/jero-web/src/views/documentManage/tags/dialog/ListTable.vue index 0c560629b..3cd0c22e2 100644 --- a/jero-web/src/views/documentManage/tags/dialog/ListTable.vue +++ b/jero-web/src/views/documentManage/tags/dialog/ListTable.vue @@ -1,6 +1,10 @@