Commit 12ea4e85 authored by zhangsen's avatar zhangsen

安装告知 属地监管部门组件替换

parent b84b271a
......@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
......@@ -233,6 +234,38 @@ public class CommonController extends BaseController {
/**
* 获取管辖分局树
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getCreatTreeByInstallation")
@ApiOperation(httpMethod = "GET", value = "获取管辖分局树安装告知使用", notes = "获取管辖分局树安装告知使用")
public ResponseModel<Object> getCreatTreeByInstallation(String county) {
List<LinkedHashMap> creatTree = commonService.getCreatTree();
String code = county.split("_")[0];
List<LinkedHashMap> infoByCounty = getInfoByCounty(code, creatTree);
return ResponseHelper.buildResponse(infoByCounty);
}
private List<LinkedHashMap> getInfoByCounty(String county, List<LinkedHashMap> children) {
for (LinkedHashMap item : children) {
if (item.get("level").toString().equals("county") && item.get("companyCode").toString().equals(county)) {
return (List<LinkedHashMap>) item.get("children");
} else {
if (!ObjectUtils.isEmpty(item.get("children"))) {
List<LinkedHashMap> children1 = getInfoByCounty(county, (List<LinkedHashMap>) item.get("children"));
if (!CollectionUtils.isEmpty(children1)) {
return children1;
}
}
}
}
return new ArrayList<>();
}
/**
* 公共转办接口
* /jg/common/transfer
*/
......
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