Commit afaa7479 authored by tianyiming's avatar tianyiming

监管业务发起相关提交

parent e7fb3ea8
...@@ -167,4 +167,19 @@ public class CommonController extends BaseController { ...@@ -167,4 +167,19 @@ public class CommonController extends BaseController {
record.put("label", e.getName()); record.put("label", e.getName());
return record; return record;
} }
/**
* 查询监管业务名称列表
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "查询监管业务名称列表", notes = "查询监管业务名称列表")
@GetMapping(value = "/superviseBusinessCategory")
public ResponseModel<Object> equipTree(String type) {
return ResponseHelper.buildResponse(commonService.superviseBusinessCategory(type));
}
} }
...@@ -40,4 +40,6 @@ public interface ICommonService { ...@@ -40,4 +40,6 @@ public interface ICommonService {
void generateCertificateReport(Map<String, Object> map, HttpServletResponse response); void generateCertificateReport(Map<String, Object> map, HttpServletResponse response);
List<LinkedHashMap> creatApproveTree(); List<LinkedHashMap> creatApproveTree();
List<Map<String, Object>> superviseBusinessCategory(String type);
} }
...@@ -12,15 +12,18 @@ import com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper; ...@@ -12,15 +12,18 @@ import com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper;
import com.yeejoin.amos.boot.module.jg.biz.service.ICommonService; import com.yeejoin.amos.boot.module.jg.biz.service.ICommonService;
import com.yeejoin.amos.boot.module.jg.biz.utils.FileExporter; import com.yeejoin.amos.boot.module.jg.biz.utils.FileExporter;
import com.yeejoin.amos.boot.module.jg.biz.utils.ImageUtils; import com.yeejoin.amos.boot.module.jg.biz.utils.ImageUtils;
import com.yeejoin.amos.boot.module.jg.biz.utils.JsonUtils;
import com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils; import com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils;
import com.yeejoin.amos.boot.module.jg.flc.api.fegin.PrivilegeFeginService; import com.yeejoin.amos.boot.module.jg.flc.api.fegin.PrivilegeFeginService;
import com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory; import com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory;
import com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum;
import com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper; import com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper;
import com.yeejoin.amos.component.feign.model.FeignClientResult; import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.systemctl.Systemctl; import com.yeejoin.amos.feign.systemctl.Systemctl;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
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.core.io.Resource;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
...@@ -54,6 +57,10 @@ public class CommonServiceImpl implements ICommonService { ...@@ -54,6 +57,10 @@ public class CommonServiceImpl implements ICommonService {
@Autowired @Autowired
CommonMapper commonMapper; CommonMapper commonMapper;
@Value("classpath:/json/superviseBusinessCategory.json")
private Resource superviseBusinessCategory;
//行政区划redis缓存key //行政区划redis缓存key
private static final String PROVINCE = "PROVINCE"; private static final String PROVINCE = "PROVINCE";
private static final String CITY = "CITY"; private static final String CITY = "CITY";
...@@ -205,6 +212,33 @@ public class CommonServiceImpl implements ICommonService { ...@@ -205,6 +212,33 @@ public class CommonServiceImpl implements ICommonService {
return resultTree; return resultTree;
} }
@Override
public List<Map<String, Object>> superviseBusinessCategory(String type) {
Map<String, List<Map<String, Object>>> resourceJson = JsonUtils.getResourceJson(superviseBusinessCategory);
List<Map<String, Object>> mapList = new ArrayList<>();
switch (type) {
case "SGGZ":
mapList = resourceJson.get("SGGZ");
break;
case "DJGL":
mapList = resourceJson.get("DJGL");
break;
case "WBBA":
mapList = resourceJson.get("WBBA");
break;
case "SBYJ":
mapList = resourceJson.get("SBYJ");
break;
case "TYQY":
mapList = resourceJson.get("TYQY");
break;
case "ZXBF":
mapList = resourceJson.get("ZXBF");
break;
}
return mapList;
}
private List<LinkedHashMap> deleteTreeData(List<LinkedHashMap> result) { private List<LinkedHashMap> deleteTreeData(List<LinkedHashMap> result) {
Iterator it = result.iterator(); Iterator it = result.iterator();
while (it.hasNext()) { while (it.hasNext()) {
......
{
"SGGZ": [
{
"name": "安装告知",
"code": "GZ01"
},
{
"name": "改造告知",
"code": "GZ02"
},
{
"name": "维修告知",
"code": "GZ03"
},
{
"name": "移装告知",
"code": "GZ04"
}
],
"DJGL":[
{
"name": "使用登记",
"code": "DJ01"
},
{
"name": "改造变更登记",
"code": "DJ02"
},
{
"name": "移装变更登记",
"code": "DJ03"
},
{
"name": "单位变更登记",
"code": "DJ04"
},
{
"name": "更名变更登记",
"code": "DJ05"
}
],
"WBBA":[
{
"name": "维保备案",
"code": "WB01"
}
],
"SBYJ":[
{
"name": "设备移交",
"code": "YJ01"
}
],
"TYQY":[
{
"name": "停用启用",
"code": "QT01"
}
],
"ZXBF":[
{
"name": "注销报废",
"code": "BF01"
}
]
}
\ No newline at end of file
...@@ -393,6 +393,11 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -393,6 +393,11 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
if (ValidationUtil.isEmpty(type)) { if (ValidationUtil.isEmpty(type)) {
mapList = resourceJson.get(EquipmentClassifityEnum.BDLS.getCode()); mapList = resourceJson.get(EquipmentClassifityEnum.BDLS.getCode());
} else { } else {
if ("ZXBF".equals(type) || "TYQY".equals(type)) {
type = "superviseBusiness";
} else {
type = EquipmentClassifityEnum.BDLS.getCode();
}
mapList = resourceJson.get(type); mapList = resourceJson.get(type);
} }
for (Map map : mapList) { for (Map map : mapList) {
......
...@@ -114,5 +114,11 @@ ...@@ -114,5 +114,11 @@
"name": "客运索道", "name": "客运索道",
"code": "9000" "code": "9000"
} }
],
"superviseBusiness": [
{
"name": "电梯",
"code": "3000"
}
] ]
} }
\ No newline at end of file
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