Commit 5f5f0b41 authored by helinlin's avatar helinlin

开发特种设备通讯录接口

parent 698ca70d
......@@ -4,10 +4,14 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.BizRecordCount;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.IdxUjer;
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.component.feign.model.Page;
import com.yeejoin.amos.feign.privilege.Privilege;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
......@@ -25,8 +29,12 @@ public class InspectionController {
@Autowired
InspectionService inspectionService;
@Autowired
IdxFeignService idxFeignService;
/**
* 双重预防
*
* @param dimensionTableId
* @param selectValue
* @param bizType
......@@ -50,6 +58,7 @@ public class InspectionController {
/**
* 生产、使用环节
*
* @param bizRecordCountList
* @return
*/
......@@ -62,6 +71,7 @@ public class InspectionController {
/**
* 生成安全监察指令书编号
*
* @param bizTable
* @return
*/
......@@ -74,6 +84,7 @@ public class InspectionController {
/**
* 查询行政复议机构和行政诉讼机构
*
* @return
*/
@GetMapping("/getSafetySupervisionInfo")
......@@ -82,4 +93,23 @@ public class InspectionController {
public ResponseModel<JSONObject> getSafetySupervisionInfo() {
return ResponseHelper.buildResponse(inspectionService.getSafetySupervisionInfo());
}
@GetMapping("/contacts")
@ApiOperation(value = "通讯录")
@TycloudOperation(ApiLevel = UserType.AGENCY)
public ResponseModel<Page> contacts(
@RequestParam(required = false) String realName,
@RequestParam(required = false) String mobile,
@RequestParam(required = false) String dimensionTableId,
@RequestParam(required = false) String selectValue,
@RequestParam int current,
@RequestParam int size
) {
List<String> ids = null;
if (StringUtils.hasText(selectValue)) {
ids = idxFeignService.getTreeChildIds(dimensionTableId, selectValue).getResult();
}
Page result = Privilege.agencyUserClient.queryForPage(null, realName, mobile, null, current, size, ids).getResult();
return ResponseHelper.buildResponse(result);
}
}
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