Commit 8dee8b08 authored by chenzhao's avatar chenzhao

修改巡检点新增

parent e5dce878
...@@ -964,8 +964,7 @@ public class OrgUsrController extends BaseController { ...@@ -964,8 +964,7 @@ public class OrgUsrController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "查询单位基本信息", notes = "查询单位基本信息") @ApiOperation(httpMethod = "GET", value = "查询单位基本信息", notes = "查询单位基本信息")
@GetMapping(value = "/getCompanyInfo") @GetMapping(value = "/getCompanyInfo")
public ResponseModel<OrgUsr> getCompanyInfo(String companyId) throws Exception { public ResponseModel<Object> getCompanyInfo(@RequestParam String companyId) throws Exception {
return ResponseHelper.buildResponse(iOrgUsrService.getByIduser(companyId)); return ResponseHelper.buildResponse(iOrgUsrService.getByIduser(companyId));
} }
} }
\ No newline at end of file
...@@ -1131,9 +1131,11 @@ public class PointController extends AbstractBaseController { ...@@ -1131,9 +1131,11 @@ public class PointController extends AbstractBaseController {
point.setOrgCode(loginOrgCode); //点归属于公司 point.setOrgCode(loginOrgCode); //点归属于公司
point.setCreatorId(user.getUserId()); point.setCreatorId(user.getUserId());
Object result = jcsFeignClient.getCompanyInfo(point.getChargeDeptId()).getResult();
String bizOrgCode = ((Map<String, Object>) result).get("bizOrgCode").toString(); ResponseModel<Object> companyInfo = jcsFeignClient.getCompanyInfo(point.getChargeDeptId());
String bizOrgName = ((Map<String, Object>) result).get("bizOrgName").toString(); Object obj = companyInfo.getResult();
String bizOrgCode = ((Map<String, Object>) obj).get("bizOrgCode").toString();
String bizOrgName = ((Map<String, Object>) obj).get("bizOrgName").toString();
point.setBizOrgCode(bizOrgCode); point.setBizOrgCode(bizOrgCode);
point.setBizOrgName(bizOrgName); point.setBizOrgName(bizOrgName);
iPointService.addPointNew(point); iPointService.addPointNew(point);
......
...@@ -3,6 +3,7 @@ package com.yeejoin.amos.patrol.business.feign; ...@@ -3,6 +3,7 @@ package com.yeejoin.amos.patrol.business.feign;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.component.feign.model.FeignClientResult; import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
...@@ -62,6 +63,6 @@ public interface JcsFeignClient { ...@@ -62,6 +63,6 @@ public interface JcsFeignClient {
FeignClientResult<List<Map<String, Object>>> selectByIdList(@RequestBody List<String> id); FeignClientResult<List<Map<String, Object>>> selectByIdList(@RequestBody List<String> id);
@GetMapping(value = "/org-usr/getCompanyInfo") @GetMapping(value = "/org-usr/getCompanyInfo")
ResponseModel<Object> getCompanyInfo(String companyId); ResponseModel<Object> getCompanyInfo(@RequestParam(value = "companyId") String companyId);
} }
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