Commit 9e35e15d authored by 麻笑宇's avatar 麻笑宇

feat(statistics): 新增人员和企业高级搜索功能

- 新增 CompanyAdvanceSearchEnum 和 PersonAdvanceSearchEnum 枚举类,用于定义高级搜索条件 - 在 ComprehensiveStatisticalAnalysisController 中添加新的 API接口: - queryZYXM: 查询作业项目 - queryUnitByOrgCode: 根据监管机构查询企业 - 在 ComprehensiveStatisticalAnalysisServiceImpl 中实现新的查询方法: - queryZYXM: 查询作业项目 - queryUnitByOrgCode: 根据监管机构查询企业 - 修改 queryAdvancedSearch 方法,支持企业和人员的高级搜索 - 更新 queryCompanySearchData 和 queryPersonSearchData 方法,增加新的搜索条件数据 - 重命名 AdvanceSearchEnum 为 EquipAdvanceSearchEnum,用于更清晰地表示设备相关的高级搜索条件
parent e63ee483
package com.yeejoin.amos.boot.module.statistics.api.enums;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.biz.common.annotation.TechnicalParameter;
import lombok.AllArgsConstructor;
import lombok.Getter;
@AllArgsConstructor
@Getter
public enum CompanyAdvanceSearchEnum {
/**
* 高级搜索枚举
*/
ADDRESS("详细地址", "address", TechnicalParameter.ParamType.STRING,""),
EXPIRYDATE("许可有效期", "expiryDate",TechnicalParameter.ParamType.DATE,""),
UNIT_TYPE("企业类型", "unitType",null,""),
REGULATORY_LABELS("企业等级", "regulatoryLabels",null,""),
INDUSTRY_SUPERVISOR("行业主管部门", "industrySupervisor",null,""),
ITEM_CODE("许可项目", "itemCode",null,""),
SUB_ITEM_CODE("许可子项目", "subItemCode",null,""),
OPERATING_STATUS("经营状态", "operatingStatus",null,""),
EQUIP_CATEGORY("监管设备类型", "equipCategory",null,""),
;
private String name;
private String code;
private TechnicalParameter.ParamType paramType;
private String url;
public static JSONArray getAll(){
JSONArray jsonArray = new JSONArray();
for (CompanyAdvanceSearchEnum item : values()) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("label", item.name);
jsonObject.put("value", item.code);
jsonObject.put("key", item.code);
jsonObject.put("paramType", item.paramType);
jsonObject.put("isMulti", false);
if(TechnicalParameter.ParamType.BIG_DECIMAL.equals(item.paramType)){
jsonObject.put("type","inputNumber");
}else if(TechnicalParameter.ParamType.STRING.equals(item.paramType)){
jsonObject.put("type","input");
}else if(TechnicalParameter.ParamType.DATE.equals(item.paramType)){
jsonObject.put("type","date");
}else {
jsonObject.put("type","select");
}
jsonObject.put("conditions",ConditionEnum.getByCode(item.paramType));
jsonObject.put("url", item.url);
jsonArray.add(jsonObject);
}
return jsonArray;
}
}
...@@ -8,7 +8,7 @@ import lombok.Getter; ...@@ -8,7 +8,7 @@ import lombok.Getter;
@AllArgsConstructor @AllArgsConstructor
@Getter @Getter
public enum AdvanceSearchEnum { public enum EquipAdvanceSearchEnum {
/** /**
* 高级搜索枚举 * 高级搜索枚举
...@@ -48,7 +48,7 @@ public enum AdvanceSearchEnum { ...@@ -48,7 +48,7 @@ public enum AdvanceSearchEnum {
public static JSONArray getAll(){ public static JSONArray getAll(){
JSONArray jsonArray = new JSONArray(); JSONArray jsonArray = new JSONArray();
for (AdvanceSearchEnum item : values()) { for (EquipAdvanceSearchEnum item : values()) {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.put("label", item.name); jsonObject.put("label", item.name);
jsonObject.put("value", item.code); jsonObject.put("value", item.code);
......
package com.yeejoin.amos.boot.module.statistics.api.enums;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.biz.common.annotation.TechnicalParameter;
import lombok.AllArgsConstructor;
import lombok.Getter;
@AllArgsConstructor
@Getter
public enum PersonAdvanceSearchEnum {
/**
* 高级搜索枚举
*/
NAME("人员名称", "name", TechnicalParameter.ParamType.STRING,""),
NEWPOST("人员类型", "newPost",TechnicalParameter.ParamType.DATE,""),
SUBPOST("人员子类型", "subPost",null,""),
// REGULATORY_LABELS("有无资质", "regulatoryLabels",null,""),
// REGULATORY_LABELS("资质状态", "regulatoryLabels",null,""),
CERT_TYPE("证书类型", "certType",null,""),
PERMISSION_LEVEL("证书级别", "permissionLevel",null,""),
JOB_ITEM("作业项目", "jobItem",null,""),
ISSUE_DATE("发证日期", "issueDate",TechnicalParameter.ParamType.DATE,""),
EDUCATION("学历", "education",null,""),
ADDRESS("住址", "address",TechnicalParameter.ParamType.STRING,""),
EQUIP_TYPE("监管设备类型", "equipType",null,""),
;
private String name;
private String code;
private TechnicalParameter.ParamType paramType;
private String url;
public static JSONArray getAll(){
JSONArray jsonArray = new JSONArray();
for (PersonAdvanceSearchEnum item : values()) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("label", item.name);
jsonObject.put("value", item.code);
jsonObject.put("key", item.code);
jsonObject.put("paramType", item.paramType);
jsonObject.put("isMulti", false);
if(TechnicalParameter.ParamType.BIG_DECIMAL.equals(item.paramType)){
jsonObject.put("type","inputNumber");
}else if(TechnicalParameter.ParamType.STRING.equals(item.paramType)){
jsonObject.put("type","input");
}else if(TechnicalParameter.ParamType.DATE.equals(item.paramType)){
jsonObject.put("type","date");
}else {
jsonObject.put("type","select");
}
jsonObject.put("conditions",ConditionEnum.getByCode(item.paramType));
jsonObject.put("url", item.url);
jsonArray.add(jsonObject);
}
return jsonArray;
}
}
...@@ -43,7 +43,7 @@ public enum UnitTypeEnum { ...@@ -43,7 +43,7 @@ public enum UnitTypeEnum {
for (UnitTypeEnum e : UnitTypeEnum.values()) { for (UnitTypeEnum e : UnitTypeEnum.values()) {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.put("label",e.name); jsonObject.put("label",e.name);
jsonObject.put("value",e.code); jsonObject.put("value",e.name);
jsonObject.put("key",e.code); jsonObject.put("key",e.code);
jsonArray.add(jsonObject); jsonArray.add(jsonObject);
} }
......
...@@ -128,10 +128,22 @@ public class ComprehensiveStatisticalAnalysisController extends BaseController { ...@@ -128,10 +128,22 @@ public class ComprehensiveStatisticalAnalysisController extends BaseController {
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/select/queryZZZT") @GetMapping(value = "/select/queryZYXM")
@ApiOperation(httpMethod = "GET", value = "查询资质状态", notes = "查询资质状态") @ApiOperation(httpMethod = "GET", value = "查询作业项目", notes = "查询作业项目")
public ResponseModel<JSONArray> queryZZZT() { public ResponseModel<JSONArray> queryZYXM(@RequestParam String type) {
return ResponseHelper.buildResponse(statisticalAnalysisService.queryZZZT()); return ResponseHelper.buildResponse(statisticalAnalysisService.queryZYXM(type));
}
/**
* @param
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/select/queryUnitByOrgCode")
@ApiOperation(httpMethod = "GET", value = "根据监管机构查询企业", notes = "根据监管机构查询企业")
public ResponseModel<JSONArray> queryUnitByOrgCode(@RequestParam String orgCode) {
return ResponseHelper.buildResponse(statisticalAnalysisService.queryUnitByOrgCode(orgCode));
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment