Commit ecd7f3c7 authored by wujiang's avatar wujiang

修改注册企业问题

parent 5ee9a522
...@@ -60,7 +60,7 @@ public class TaBusinessServiceImpl extends BaseService<TaAccessConfigModel, TaAc ...@@ -60,7 +60,7 @@ public class TaBusinessServiceImpl extends BaseService<TaAccessConfigModel, TaAc
JSONObject data = jsonObject.getJSONObject("data"); JSONObject data = jsonObject.getJSONObject("data");
//如果不存在该企业 则直接返回null //如果不存在该企业 则直接返回null
if(ValidationUtil.isEmpty(data)){ if(ValidationUtil.isEmpty(data)){
return null; return result;
} }
//分割字符串 根据详细地址分割出 省/市/区、街道地址、小区地址 //分割字符串 根据详细地址分割出 省/市/区、街道地址、小区地址
String address = data.getString("dom"); String address = data.getString("dom");
......
...@@ -7,8 +7,10 @@ import com.yeejoin.amos.boot.module.tzs.flc.api.dto.BizRecordCount; ...@@ -7,8 +7,10 @@ import com.yeejoin.amos.boot.module.tzs.flc.api.dto.BizRecordCount;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.IdxUjerDto; import com.yeejoin.amos.boot.module.tzs.flc.api.dto.IdxUjerDto;
import com.yeejoin.amos.boot.module.tzs.flc.api.feign.IdxFeignService; import com.yeejoin.amos.boot.module.tzs.flc.api.feign.IdxFeignService;
import com.yeejoin.amos.boot.module.tzs.flc.api.service.InspectionService; import com.yeejoin.amos.boot.module.tzs.flc.api.service.InspectionService;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.component.feign.model.Page; import com.yeejoin.amos.component.feign.model.Page;
import com.yeejoin.amos.feign.privilege.Privilege; import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.privilege.model.CompanyModel; import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -27,140 +29,140 @@ import java.util.*; ...@@ -27,140 +29,140 @@ import java.util.*;
@Api(value = "监察处置分析") @Api(value = "监察处置分析")
public class InspectionController { public class InspectionController {
@Autowired @Autowired
InspectionService inspectionService; InspectionService inspectionService;
@Autowired @Autowired
IdxFeignService idxFeignService; IdxFeignService idxFeignService;
/** /**
* 双重预防 * 双重预防
* *
* @param dimensionTableId * @param dimensionTableId
* @param selectValue * @param selectValue
* @param bizType * @param bizType
* @param current * @param current
* @param size * @param size
* @return * @return
*/ */
@GetMapping("/bizDetailList") @GetMapping("/bizDetailList")
@ApiOperation(value = "检察任务填报详情") @ApiOperation(value = "检察任务填报详情")
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
public ResponseModel<IPage<IdxUjerDto>> bizDetailList( public ResponseModel<IPage<IdxUjerDto>> bizDetailList(@RequestParam String dimensionTableId,
@RequestParam String dimensionTableId, @RequestParam String selectValue, @RequestParam(required = false) String bizType, @RequestParam int current,
@RequestParam String selectValue, @RequestParam int size) {
@RequestParam(required = false) String bizType, IPage<IdxUjerDto> page = inspectionService.bizDetailList(dimensionTableId, selectValue, bizType, current, size);
@RequestParam int current, return ResponseHelper.buildResponse(page);
@RequestParam int size }
) {
IPage<IdxUjerDto> page = inspectionService.bizDetailList(dimensionTableId, selectValue, bizType, current, size);
return ResponseHelper.buildResponse(page);
}
/** /**
* 生产、使用环节 * 生产、使用环节
* *
* @param bizRecordCountList * @param bizRecordCountList
* @return * @return
*/ */
@PostMapping("/safetySupervision") @PostMapping("/safetySupervision")
@ApiOperation(value = "安全监察统计") @ApiOperation(value = "安全监察统计")
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
public ResponseModel<List<Map<String, Object>>> safetySupervisionList(@RequestBody List<BizRecordCount> bizRecordCountList) { public ResponseModel<List<Map<String, Object>>> safetySupervisionList(
return ResponseHelper.buildResponse(inspectionService.bizRecordCountByField(bizRecordCountList)); @RequestBody List<BizRecordCount> bizRecordCountList) {
} return ResponseHelper.buildResponse(inspectionService.bizRecordCountByField(bizRecordCountList));
}
/** /**
* 生产、使用环节 * 生产、使用环节
* *
* @param bizRecordCount * @param bizRecordCount
* @return * @return
*/ */
@PostMapping("/safetySupervisionForMap") @PostMapping("/safetySupervisionForMap")
@ApiOperation(value = "安全监察统计") @ApiOperation(value = "安全监察统计")
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
public ResponseModel<Map<String, Object>> safetySupervisionForMap(@RequestBody BizRecordCount bizRecordCount) { public ResponseModel<Map<String, Object>> safetySupervisionForMap(@RequestBody BizRecordCount bizRecordCount) {
return ResponseHelper.buildResponse(inspectionService.bizRecordCountByField(bizRecordCount)); return ResponseHelper.buildResponse(inspectionService.bizRecordCountByField(bizRecordCount));
} }
/** /**
* 生成安全监察指令书编号 * 生成安全监察指令书编号
* *
* @param bizTable * @param bizTable
* @return * @return
*/ */
@GetMapping("/getSafetySupervisionCode") @GetMapping("/getSafetySupervisionCode")
@ApiOperation(value = "生成安全监察指令书编号") @ApiOperation(value = "生成安全监察指令书编号")
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
public ResponseModel<JSONObject> getSafetySupervisionCode(@RequestParam String bizTable) { public ResponseModel<JSONObject> getSafetySupervisionCode(@RequestParam String bizTable) {
return ResponseHelper.buildResponse(inspectionService.getSafetySupervisionCode(bizTable)); return ResponseHelper.buildResponse(inspectionService.getSafetySupervisionCode(bizTable));
} }
/** /**
* 获取所有安全监察指令书编号 * 获取所有安全监察指令书编号
* *
* @param bizTable * @param bizTable
* @return * @return
*/ */
@GetMapping("/getSafetySupervisionCodeMap") @GetMapping("/getSafetySupervisionCodeMap")
@ApiOperation(value = "获取所有安全监察指令书编号") @ApiOperation(value = "获取所有安全监察指令书编号")
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
public ResponseModel<JSONObject> getSafetySupervisionCodeMap(@RequestParam String bizTable, @RequestParam String mapKey, @RequestParam String mapValue) { public ResponseModel<JSONObject> getSafetySupervisionCodeMap(@RequestParam String bizTable,
return ResponseHelper.buildResponse(inspectionService.getSafetySupervisionCodeMap(bizTable, mapKey, mapValue)); @RequestParam String mapKey, @RequestParam String mapValue) {
} return ResponseHelper.buildResponse(inspectionService.getSafetySupervisionCodeMap(bizTable, mapKey, mapValue));
}
/** /**
* 查询行政复议机构和行政诉讼机构 * 查询行政复议机构和行政诉讼机构
* *
* @return * @return
*/ */
@GetMapping("/getSafetySupervisionInfo") @GetMapping("/getSafetySupervisionInfo")
@ApiOperation(value = "查询行政复议机构和行政诉讼机构") @ApiOperation(value = "查询行政复议机构和行政诉讼机构")
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
public ResponseModel<JSONObject> getSafetySupervisionInfo() { public ResponseModel<JSONObject> getSafetySupervisionInfo() {
return ResponseHelper.buildResponse(inspectionService.getSafetySupervisionInfo()); return ResponseHelper.buildResponse(inspectionService.getSafetySupervisionInfo());
} }
@GetMapping("/contacts") @GetMapping("/contacts")
@ApiOperation(value = "通讯录") @ApiOperation(value = "通讯录")
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
public ResponseModel<Page> contacts( public ResponseModel<Page<AgencyUserModel>> contacts(@RequestParam(required = false) String realName,
@RequestParam(required = false) String realName, @RequestParam(required = false) String mobile, @RequestParam(required = false) String dimensionTableId,
@RequestParam(required = false) String mobile, @RequestParam(required = false) String selectValue, @RequestParam int current, @RequestParam int size) {
@RequestParam(required = false) String dimensionTableId, // List<String> ids = new ArrayList<>();
@RequestParam(required = false) String selectValue, // if (StringUtils.hasText(selectValue)) {
@RequestParam int current, // Collection<CompanyModel> a = Privilege.companyClient.querySubAgencyTree(Long.valueOf(selectValue)).getResult();
@RequestParam int size // ids = recursion(a,ids);
) { // }
List<String> ids = new ArrayList<>(); FeignClientResult<CompanyModel> company = Privilege.companyClient.seleteOne(Long.valueOf(selectValue));
if (StringUtils.hasText(selectValue)) { FeignClientResult<Page<AgencyUserModel>> result = new FeignClientResult<Page<AgencyUserModel>>();
Collection<CompanyModel> a = Privilege.companyClient.querySubAgencyTree(Long.valueOf(selectValue)).getResult(); if (company.getResult() != null) {
ids = recursion(a,ids); result = Privilege.agencyUserClient.queryForPageByCompany(company.getResult().getOrgCode(), "county",
} mobile, realName, current, size);
Page result = Privilege.agencyUserClient.queryForPage(null, realName, mobile, null, current, size, ids).getResult(); }
return ResponseHelper.buildResponse(result); return ResponseHelper.buildResponse(result.getResult());
} }
public List recursion(Collection feign,List ids){ public List recursion(Collection feign, List ids) {
if(feign == null){ if (feign == null) {
return ids; return ids;
} }
Iterator iter = feign.iterator(); Iterator iter = feign.iterator();
while(iter.hasNext()){ while (iter.hasNext()) {
String json = JSON.toJSONString(iter.next()); String json = JSON.toJSONString(iter.next());
CompanyModel companyModel = JSON.parseObject(json,CompanyModel.class); CompanyModel companyModel = JSON.parseObject(json, CompanyModel.class);
if(!companyModel.getLevel().equals("company")){ if (!companyModel.getLevel().equals("company")) {
ids.add(String.valueOf(companyModel.getSequenceNbr())); ids.add(String.valueOf(companyModel.getSequenceNbr()));
} }
recursion(companyModel.getChildren(),ids); recursion(companyModel.getChildren(), ids);
} }
return ids; return ids;
} }
@GetMapping("/getMapByRegion/{regionSeq}") @GetMapping("/getMapByRegion/{regionSeq}")
@ApiOperation(value = "获取下级行政区划下的所有数据") @ApiOperation(value = "获取下级行政区划下的所有数据")
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
public ResponseModel<com.baomidou.mybatisplus.extension.plugins.pagination.Page> getMapByRegion(@PathVariable(value = "regionSeq") Long regionSeq, @RequestParam(value = "tableId") String tableId, @RequestParam(value = "type") String type) { public ResponseModel<com.baomidou.mybatisplus.extension.plugins.pagination.Page> getMapByRegion(
return ResponseHelper.buildResponse(inspectionService.getMapByRegion(regionSeq, tableId, type)); @PathVariable(value = "regionSeq") Long regionSeq, @RequestParam(value = "tableId") String tableId,
} @RequestParam(value = "type") String type) {
return ResponseHelper.buildResponse(inspectionService.getMapByRegion(regionSeq, tableId, type));
}
} }
...@@ -242,6 +242,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI ...@@ -242,6 +242,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
// RequestContext.setAppKey(); // RequestContext.setAppKey();
// RequestContext.setProduct(); // RequestContext.setProduct();
Map<String, Object> resultMap = accessFeignService.getData(unitCode).getResult(); Map<String, Object> resultMap = accessFeignService.getData(unitCode).getResult();
// RequestEntity requestEntity = new RequestEntity( // RequestEntity requestEntity = new RequestEntity(
// null, //body部分数据 // null, //body部分数据
// headers, //头 // headers, //头
......
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