Commit 68ff765e by kenzo

updata

parent 7b847770
package com.cnooc.expert.config;
import com.google.gson.Gson;
import okhttp3.OkHttpClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.context.annotation.Profile;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
import java.util.concurrent.TimeUnit;
@Configuration
@Profile("pre")
public class RetrofitPreConfiguration {
/**
* 专家服务
* @param gson
* @return
*/
@Bean("retrofitExpert")
@Primary
public Retrofit RetrofitExpert(Gson gson) {
return createRetrofit("https://pre.randomuser.me/", gson);
}
/**
* 工作流服务
* @param gson
* @return
*/
@Bean("retrofitWorkflow")
public Retrofit RetrofitWorkflow(Gson gson) {
return createRetrofit("https://pre.randomuser.com/", gson);
}
/**
* 平台服务
* @param gson
* @return
*/
@Bean("retrofitPortal")
public Retrofit RetrofitPortal(Gson gson) {
return createRetrofit("https://pre.randomuser.cn/", gson);
}
/**
* 主体服务
* @param gson
* @return
*/
@Bean("retrofitSubject")
public Retrofit RetrofitSubject(Gson gson) {
return createRetrofit("https://pre.randomuser.cn.com/", gson);
}
private Retrofit createRetrofit(String baseUrl, Gson gson) {
OkHttpClient okHttpClient = new OkHttpClient.Builder()
.connectTimeout(30, TimeUnit.SECONDS)
.readTimeout(30, TimeUnit.SECONDS)
.build();
return new Retrofit.Builder()
.baseUrl(baseUrl)
.client(okHttpClient)
.addConverterFactory(GsonConverterFactory.create(gson))
.build();
}
}
package com.cnooc.expert.controller.expert.model.response;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class ExpertInfoGetResp {
private String businessId;
......@@ -246,12 +250,34 @@ public class ExpertInfoGetResp {
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public static class Zg {
private String base64ZgFile;
private String base64ZgFileName;
private Long createTime;
private String createTimeText;
private String creatorName;
private String dictGuid;
private Long huoQuDate;
private String modifierName;
private Long modifyTime;
private String modifyTimeText;
private Long obtainTime;
private String qiTaZiGe;
private String zgFileGuid;
private String zhuanJiaGuid;
private String zhuanJiaShiXiangGuid;
private String ziGeGuid;
private String ziGeName;
private String ziGeZhengShuHao;
private String ziXinXiGuid;
}
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public static class Zc {
private String base64ZcFile;
......@@ -293,6 +319,8 @@ public class ExpertInfoGetResp {
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public static class Pb {
private Long createTime;
private String createTimeText;
......@@ -331,6 +359,8 @@ public class ExpertInfoGetResp {
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public static class Hb {
private Long createTime;
private String createTimeText;
......@@ -350,6 +380,8 @@ public class ExpertInfoGetResp {
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public static class Ps {
private Long createTime;
private String creatorGuid;
......@@ -369,6 +401,8 @@ public class ExpertInfoGetResp {
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public static class Language {
private String languageGuid;
private String zhuanJiaGuid;
......@@ -377,11 +411,13 @@ public class ExpertInfoGetResp {
private String languageId;
private String shuLianChengDu;
private String shuLianChengDuId;
private String ziXinXiGuid;
}
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public static class XueLi {
private Long biYeTime;
private String biYeYuanXiao;
......
package com.cnooc.expert.controller.portal;
import com.cnooc.expert.common.response.ApiResult;
import com.cnooc.expert.common.response.BasePageResp;
import com.cnooc.expert.controller.common.AbstractBaseController;
import com.cnooc.expert.controller.portal.model.request.AgentNumReq;
import com.cnooc.expert.controller.portal.model.request.AgentPageReq;
import com.cnooc.expert.controller.portal.model.request.MessagePageReq;
import com.cnooc.expert.controller.portal.model.response.AgentNumResp;
import com.cnooc.expert.controller.portal.model.response.MessageNumResp;
import com.cnooc.expert.service.PortalMockService;
import com.cnooc.expert.service.PortalService;
import com.fasterxml.jackson.core.JsonProcessingException;
import lombok.AllArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@AllArgsConstructor
@RestController
@RequestMapping("/mock/portal")
public class PortalMockController extends AbstractBaseController {
private final PortalMockService portalMockService;
// *** 业务待办 ***
@PostMapping("/agent/num/test")
public String agentNumTest(AgentNumReq req) throws JsonProcessingException {
return objectMapper.writeValueAsString(portalMockService.getAgentNum(req));
}
/**
* 已办待办数量
*
* @return
*/
@PostMapping("/agent/num")
public ApiResult<AgentNumResp> agentNum(AgentNumReq req) {
return ApiResult.successWithResult(portalMockService.getAgentNum(req));
}
/**
* 已办待办分页列表
*
* @return
*/
@PostMapping("/agent/page")
public ApiResult<BasePageResp<Object>> agentPage(@RequestBody @Validated AgentPageReq req) {
int curUserId = 1;
return ApiResult.successWithResult(portalMockService.pageAgentNum(req));
}
// *** 我的消息 ***
/**
* 已读未读数量查询
*
* @return
*/
@PostMapping("/message/num")
public ApiResult<MessageNumResp> messageNum() {
return ApiResult.successWithResult(portalMockService.getMessageNum(null));
}
/**
* 消息列表查询
*
* @param req
* @return
*/
@PostMapping("/message/page")
public ApiResult<BasePageResp<Object>> messagePage(@RequestBody @Validated MessagePageReq req) {
int curUserId = 1;
return ApiResult.successWithResult(portalMockService.pageMessageNum(req));
}
}
package com.cnooc.expert.controller.subject;
import com.cnooc.expert.common.response.ApiResult;
import com.cnooc.expert.common.response.BasePageResp;
import com.cnooc.expert.controller.common.AbstractBaseController;
import com.cnooc.expert.controller.subject.model.request.CompanyPageReq;
import com.cnooc.expert.controller.subject.model.response.CompanyPageResp;
import com.cnooc.expert.service.SubjectService;
import lombok.AllArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@AllArgsConstructor
@RestController
@RequestMapping("/subject")
public class SubjectController extends AbstractBaseController {
private final SubjectService subjectService;
/**
* 公司列表
*
* @return
*/
@PostMapping("/company/page")
public ApiResult<BasePageResp<CompanyPageResp>> companyPage(@RequestBody @Validated CompanyPageReq req) {
BasePageResp<CompanyPageResp> apiResp = subjectService.pageCompany(req);
return ApiResult.successWithResult(apiResp);
}
}
package com.cnooc.expert.controller.subject;
import com.cnooc.expert.common.response.ApiResult;
import com.cnooc.expert.common.response.BasePageResp;
import com.cnooc.expert.controller.common.AbstractBaseController;
import com.cnooc.expert.controller.subject.model.request.CompanyPageReq;
import com.cnooc.expert.controller.subject.model.response.CompanyPageResp;
import com.cnooc.expert.service.SubjectMockService;
import com.cnooc.expert.service.SubjectService;
import lombok.AllArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@AllArgsConstructor
@RestController
@RequestMapping("/mock/subject")
public class SubjectMockController extends AbstractBaseController {
private final SubjectMockService subjectMockService;
/**
* 公司列表
*
* @return
*/
@PostMapping("/company/page")
public ApiResult<BasePageResp<CompanyPageResp>> companyPage(@RequestBody @Validated CompanyPageReq req) {
BasePageResp<CompanyPageResp> apiResp = subjectMockService.pageCompany(req);
return ApiResult.successWithResult(apiResp);
}
}
package com.cnooc.expert.controller.subject.model.request;
import com.cnooc.expert.common.request.BasePageRequest;
import lombok.Data;
import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public class CompanyPageReq extends BasePageRequest {
}
package com.cnooc.expert.controller.expert.model.response;
package com.cnooc.expert.controller.subject.model.response;
import lombok.Builder;
import lombok.Data;
......
package com.cnooc.expert.controller.workflow;
import com.cnooc.expert.common.response.ApiResult;
import com.cnooc.expert.common.response.BasePageResp;
import com.cnooc.expert.controller.common.AbstractBaseController;
import com.cnooc.expert.controller.workflow.model.request.ApprovePathSettingPageReq;
import com.cnooc.expert.controller.workflow.model.response.ApprovePathSettingPageResp;
import com.cnooc.expert.service.WorkflowMockService;
import com.cnooc.expert.service.WorkflowService;
import lombok.AllArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@AllArgsConstructor
@RestController
@RequestMapping("/mock/workflow")
public class WorkflowMockController extends AbstractBaseController {
private final WorkflowMockService workflowMockService;
// 获取审批路径
@PostMapping("/approve-path-setting/page")
public ApiResult<BasePageResp<ApprovePathSettingPageResp>> pageApprovePathSetting(@RequestBody @Validated ApprovePathSettingPageReq req) {
return ApiResult.successWithResult(workflowMockService.pageApprovePathSetting(req));
}
}
......@@ -9,11 +9,26 @@ import java.util.List;
@Builder
public class ApiBasePageResp<T> {
private Integer total;
private Integer totalCount;
private Integer pages;
private Integer pageSize;
private Integer current;
private Integer pageNum;
private Integer firstResult;
private Integer pageNo;
private Boolean firstPage;
private Integer totalPage;
private Boolean lastPage;
private Integer nextPage;
private Integer prePage;
private List<T> list;
private List<T> data;
}
package com.cnooc.expert.external.common.model.response;
import com.cnooc.expert.common.exception.GlobalErrorCodeConstants;
import lombok.Getter;
import lombok.Setter;
import lombok.Data;
import java.io.Serializable;
@Setter
@Getter
@Data
public class ApiBaseResult<T> implements Serializable {
private static final long serialVersionUID = 1L;
private Boolean success;
/**
* 响应码
*/
private Integer httpCode;
private String errCode;
/**
* 响应消息
*/
private String message;
private String errMessage;
/**
* 响应数据
*/
private T result;
public ApiBaseResult(int httpCode, String message, T result) {
this.httpCode = httpCode;
this.message = message;
this.result = result;
}
/**
* 成功返回结果
*/
public static <T> ApiBaseResult<T> successWithResult(T result) {
return new ApiBaseResult<>(GlobalErrorCodeConstants.SUCCESS.getCode(), GlobalErrorCodeConstants.SUCCESS.getMsg(), result);
}
/**
* 成功返回结果
*/
public static <T> ApiBaseResult<T> success() {
return new ApiBaseResult<>(GlobalErrorCodeConstants.SUCCESS.getCode(), GlobalErrorCodeConstants.SUCCESS.getMsg(), null);
}
public static <T> ApiBaseResult<T> success(String message) {
return new ApiBaseResult<>(GlobalErrorCodeConstants.SUCCESS.getCode(), message, null);
}
/**
* 失败返回结果
*/
public static <T> ApiBaseResult<T> error(String message) {
return new ApiBaseResult<>(GlobalErrorCodeConstants.SYSTEM_ERROR.getCode(), message, null);
}
/**
* 失败返回结果
*/
public static <T> ApiBaseResult<T> error(int httpCode, String message) {
return new ApiBaseResult<>(httpCode, message, null);
}
/**
* 失败返回结果,并带有数据
*/
public static <T> ApiBaseResult<T> errorWithResult(int httpCode, String message, T result) {
return new ApiBaseResult<>(httpCode, message, result);
}
// Getters and Setters
private T data;
}
package com.cnooc.expert.external.expert.api;
import com.cnooc.expert.controller.expert.model.request.ExpertInfoUpdateApiReq;
import com.cnooc.expert.external.common.model.response.ApiBasePageResp;
import com.cnooc.expert.external.common.model.response.ApiBaseResult;
import com.cnooc.expert.external.expert.model.request.CityTreeApiReq;
......@@ -31,6 +32,9 @@ public interface ExpertServiceApi {
@POST("/api/mini/zjfw/zggrxxgl/queryInfoForEdit")
Call<ApiBaseResult<ExpertInfoGetApiResp>> getExpertInfo(@HeaderMap Map<String, Object> headers, @Body ExpertInfoGetApiReq req);
@POST("/api/mini/saas-expert/zjfw/zggrxxgl/updateAllInfo?type=1")
Call<ApiBaseResult<ExpertInfoGetApiResp>> updateExpertInfoApi(@HeaderMap Map<String, Object> headers, @Body ExpertInfoUpdateApiReq req);
/* 字典、枚举 */
@POST("/api/mini/common/nofilter/getEnum")
Call<ApiBaseResult<List<CommonNofilterEnumGetApiResp>>> getCommonNofilterEnum(@HeaderMap Map<String, Object> headers, @Body CommonNofilterEnumGetApiReq req);
......
......@@ -6,4 +6,7 @@ import lombok.Data;
@Data
@Builder
public class ExpertInfoGetApiReq {
private String zhuanJiaGuid;
}
package com.cnooc.expert.external.expert.service;
import com.cnooc.expert.controller.expert.model.request.ExpertInfoUpdateApiReq;
import com.cnooc.expert.external.common.AbstractRetrofitManager;
import com.cnooc.expert.external.common.model.response.ApiBasePageResp;
import com.cnooc.expert.external.common.model.response.ApiBaseResult;
......@@ -43,6 +44,12 @@ public class ExpertServiceClient extends AbstractRetrofitManager {
return this.getResponseBody(call, "getExpertInfo");
}
public ApiBaseResult<ExpertInfoGetApiResp> updateExpertInfo(ExpertInfoUpdateApiReq req) {
Map<String, Object> headers = super.getHeaders();
Call<ApiBaseResult<ExpertInfoGetApiResp>> call = expertServiceApi.updateExpertInfoApi(headers, req);
return this.getResponseBody(call, "updateExpertInfo");
}
public ApiBaseResult<List<CommonNofilterEnumGetApiResp>> getCommonNofilterEnum(CommonNofilterEnumGetApiReq req) {
Map<String, Object> headers = super.getHeaders();
Call<ApiBaseResult<List<CommonNofilterEnumGetApiResp>>> call = expertServiceApi.getCommonNofilterEnum(headers, req);
......
......@@ -11,10 +11,19 @@ public class PlatformCompanyPageApiReq {
private Integer pageSize;
// 业务类型 集合 4 申请成为供应商 5 申请成为平台采购商 6 申请成为招标代理 7 申请成为企业专属供应商 8自然人供应商 -1 运营平台 12 企业专属招标代理
private Integer businessType;
// 是否有效 0 无效; 1 有效
private Boolean validStatus;
// 租户ID
private Integer tenantId;
// 单位名称
private String subjectName;
// 企业代码
private String creditCode;
}
......@@ -3,8 +3,6 @@ package com.cnooc.expert.external.subject.service;
import com.cnooc.expert.external.common.AbstractRetrofitManager;
import com.cnooc.expert.external.common.model.response.ApiBasePageResp;
import com.cnooc.expert.external.common.model.response.ApiBaseResult;
import com.cnooc.expert.external.portal.model.request.AgentNumGetApiReq;
import com.cnooc.expert.external.portal.model.response.AgentNumGetApiResp;
import com.cnooc.expert.external.subject.api.SubjectServiceApi;
import com.cnooc.expert.external.subject.model.request.PlatformCompanyPageApiReq;
import com.cnooc.expert.external.subject.model.response.PlatformCompanyPageApiResp;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
package com.cnooc.expert.service;
import com.cnooc.expert.common.response.BasePageResp;
import com.cnooc.expert.controller.portal.model.request.AgentNumReq;
import com.cnooc.expert.controller.portal.model.request.AgentPageReq;
import com.cnooc.expert.controller.portal.model.request.MessageNumReq;
import com.cnooc.expert.controller.portal.model.request.MessagePageReq;
import com.cnooc.expert.controller.portal.model.response.AgentNumResp;
import com.cnooc.expert.controller.portal.model.response.AgentPageResp;
import com.cnooc.expert.controller.portal.model.response.MessageNumResp;
import com.cnooc.expert.controller.portal.model.response.MessagePageResp;
import com.cnooc.expert.external.portal.service.PortalServiceClient;
import com.google.common.collect.Lists;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.List;
@AllArgsConstructor
@Service
public class PortalMockService {
private final PortalServiceClient portalServiceClient;
private String getCurUserAccount() {
return "ex_zhanglh15";
}
public AgentNumResp getAgentNum(AgentNumReq req) {
// AgentNumGetApiReq apiReq = AgentNumGetApiReq.builder()
// .account(this.getCurUserAccount())
// .title(req.getTitle())
// .build();
// ApiBaseResult<AgentNumGetApiResp> apiResp = portalServiceClient.getAgentNumApi(apiReq);
// return apiResp;
AgentNumResp result = AgentNumResp.builder()
.backlogNum(0)
.doneNum(3)
.build();
return result;
}
public BasePageResp<Object> pageAgentNum(AgentPageReq req) {
// AgentNumPageApiReq apiReq = AgentNumPageApiReq.builder()
// .pageNum(req.getPageNo())
// .pageSize(req.getPageSize())
// .account(this.getCurUserAccount())
// .status(req.getStatus())
// .title(req.getTitle())
// .build();
// ApiBaseResult<ApiBasePageResp<AgentNumPageApiResp>> apiResp = portalServiceClient.pageAgentNumApi(apiReq);
List<Object> data = Lists.newArrayList(
AgentPageResp.builder()
.id(182182)
.account("wzzx18")
.content("供应商测试-资格审查评审")
.createName("")
.createTime("2025-10-24T05:49:14.000+0000")
.createdTime("")
.infoId("c0b939e87b29c7bd22197cd95f6e1e84")
.modifyName("")
.pushType(3)
.redirectUrl("https://req-e.m-bid.cnooc.com.cn/workbench/todoEventIndex?id=c0b939e87b29c7bd22197cd95f6e1e84")
.status(true)
.title("供应商测试-资格审查评审")
.type("资格审查评审")
.updatedTime("")
.build(),
AgentPageResp.builder()
.id(121804)
.account("wzzx18")
.content("AutoTest_新签单次合同_货物_生产经营_非集采_法定_邀请招标_20250508134836-资格审查评审")
.createName("")
.createTime("2025-05-08T06:07:27.000+0000")
.createdTime("")
.infoId("be027ac3f4a57accb850ae0b2b7fd293")
.modifyName("")
.pushType(3)
.redirectUrl("https://req-e.m-bid.cnooc.com.cn/workbench/todoEventIndex?id=be027ac3f4a57accb850ae0b2b7fd293")
.status(true)
.title("AutoTest_新签单次合同_货物_生产经营_非集采_法定_邀请招标_20250508134836-资格审查评审")
.type("资格审查评审")
.updatedTime("")
.build(),
AgentPageResp.builder()
.id(120738)
.account("wzzx18")
.content("物装中心十八已被邀请入库,可进行申请")
.createName("")
.createTime("2025-04-23T06:54:00.000+0000")
.createdTime("")
.infoId("e499147e-ebee-4f3b-a3d4-58e897b8f841")
.modifyName("")
.pushType(3)
.redirectUrl("https://req-e.m-bid.cnooc.com.cn/workbench/todoEventIndex?id=c0b939e87b29c7bd22197cd95f6e1e84")
.status(true)
.title("物装中心十八-专家认证")
.type("专家认证")
.updatedTime("")
.build()
);
return BasePageResp.builder()
.current(1)
.pages(1)
.total(3)
.data(data)
.build();
}
public MessageNumResp getMessageNum(MessageNumReq req) {
// MessageNumGetApiReq apiReq = MessageNumGetApiReq.builder()
// .receivers(this.getCurUserAccount())
// .build();
// ApiBaseResult<MessageNumGetApiResp> apiResp = portalServiceClient.getMessageNumApi(apiReq);
// return apiResp;
MessageNumResp result = MessageNumResp.builder()
.read(1)
.unRead(1)
.build();
return result;
}
public BasePageResp<Object> pageMessageNum(MessagePageReq req) {
// MessageNumPageApiReq apiReq = MessageNumPageApiReq.builder()
// .pageNum(req.getPageNo())
// .pageSize(req.getPageSize())
// .receivers(this.getCurUserAccount())
// .status(req.getStatus())
// .build();
// ApiBaseResult<ApiBasePageResp<MessageNumPageApiResp>> apiResp = portalServiceClient.pageMessageNumApi(apiReq);
// return apiResp;
List<Object> data = Lists.newArrayList(
MessagePageResp.builder()
.id(182182)
.contentId("")
.createBy("")
.createName("")
.createTime("2024-12-30 14:53:49")
.endTime("")
.infoId("c0b939e87b29c7bd22197cd95f6e1e84")
.messageContent("专家状态已修改为: 手动冻结")
.messageHeader("专家状态已修改为: 手动冻结")
.modifyBy("")
.modifyName("")
.orgId("")
.receiver("")
.receivers("")
.redirectUrl("https://req-e.m-bid.cnooc.com.cn/workbench/todoEventIndex?id=c0b939e87b29c7bd22197cd95f6e1e84")
.startTime("")
.status(1)
.updatedTime("")
.visiblePosition("")
.build()
);
return BasePageResp.builder()
.current(1)
.pages(1)
.total(1)
.data(data)
.build();
}
}
package com.cnooc.expert.service;
import com.cnooc.expert.common.response.BasePageResp;
import com.cnooc.expert.controller.subject.model.request.CompanyPageReq;
import com.cnooc.expert.controller.subject.model.response.CompanyPageResp;
import com.google.common.collect.Lists;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
@AllArgsConstructor
public class SubjectMockService {
public BasePageResp<CompanyPageResp> pageCompany(CompanyPageReq req) {
List<CompanyPageResp> data = Lists.newArrayList(
CompanyPageResp.builder()
.id("1420053958893662209")
.subjectId("1420053958767833088")
.subjectName("江苏瑞尔姆电器安安有限公司")
.businessType(5)
.creditCode("91320577MA4Y6K7H0F")
.contactPerson("张三")
.contactPhone("13800138000")
.contactEmail("zhangsan@cnooc.com.cn")
.build(),
CompanyPageResp.builder()
.id("1420051042464067584")
.subjectId("1420051042065608705")
.subjectName("中海科技很大的公司")
.businessType(5)
.creditCode("91320507MA4Y6K7H0F")
.contactPerson("里斯")
.contactPhone("13333333333")
.contactEmail("lisi@cnooc.com.cn")
.build()
);
return BasePageResp.<CompanyPageResp>builder()
.current(1)
.pages(1)
.total(2)
.data(data)
.build();
}
}
package com.cnooc.expert.service;
import com.cnooc.expert.common.response.BasePageResp;
import com.cnooc.expert.controller.subject.model.request.CompanyPageReq;
import com.cnooc.expert.controller.subject.model.response.CompanyPageResp;
import com.cnooc.expert.external.subject.service.SubjectServiceClient;
import com.google.common.collect.Lists;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
@AllArgsConstructor
public class SubjectService {
private SubjectServiceClient subjectServiceClient;
public BasePageResp<CompanyPageResp> pageCompany(CompanyPageReq req) {
List<CompanyPageResp> data = Lists.newArrayList(
CompanyPageResp.builder()
.id("1420053958893662209")
.subjectId("1420053958767833088")
.subjectName("江苏瑞尔姆电器安安有限公司")
.businessType(5)
.creditCode("91320577MA4Y6K7H0F")
.contactPerson("张三")
.contactPhone("13800138000")
.contactEmail("zhangsan@cnooc.com.cn")
.build(),
CompanyPageResp.builder()
.id("1420051042464067584")
.subjectId("1420051042065608705")
.subjectName("中海科技很大的公司")
.businessType(5)
.creditCode("91320507MA4Y6K7H0F")
.contactPerson("里斯")
.contactPhone("13333333333")
.contactEmail("lisi@cnooc.com.cn")
.build()
);
return BasePageResp.<CompanyPageResp>builder()
.current(1)
.pages(1)
.total(2)
.data(data)
.build();
}
}
package com.cnooc.expert.service;
import com.cnooc.expert.common.response.BasePageResp;
import com.cnooc.expert.controller.workflow.model.request.ApprovePathSettingPageReq;
import com.cnooc.expert.controller.workflow.model.response.ApprovePathSettingPageResp;
import com.cnooc.expert.external.workflow.service.WorkflowServiceClient;
import com.google.common.collect.Lists;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.List;
@AllArgsConstructor
@Service
public class WorkflowMockService {
private final WorkflowServiceClient workflowServiceClient;
public BasePageResp<ApprovePathSettingPageResp> pageApprovePathSetting(ApprovePathSettingPageReq req) {
List<ApprovePathSettingPageResp.ApprovePathAccount> accountList = Lists.newArrayList(
ApprovePathSettingPageResp.ApprovePathAccount.builder()
.account("ex_liujh27")
.name("刘俊")
.subjectName("中国海洋石油集团有限公司")
.email("ex_liujh27@cnooc.com.cn")
.build()
);
List<ApprovePathSettingPageResp.ApprovePath> templatePaths = Lists.newArrayList(
ApprovePathSettingPageResp.ApprovePath.builder()
.nodeId("node246ec7f3c7571dd631a93f34fa8aeb4b")
.nodeName("一级")
.approvePersonName("刘俊")
.subjectName("中国海洋石油集团有限公司")
.email("ex_liujh27@cnooc.com.cn")
.accountList(accountList)
.build()
);
List<ApprovePathSettingPageResp> data = Lists.newArrayList(
ApprovePathSettingPageResp.builder()
.defId("e2dbccf455ec448b8a8284dc2c6c3b04")
.defName("中移深化-专家审批")
.opinion(null)
.pathId(null)
.useIfream(true)
.engineType(1)
.ifreamUrl("https://flow.t-bid.cnooc.com.cn/deta/scene-talk/approvalFlowChart.html?templateId=e2dbccf455ec448b8a8284dc2c6c3b04&approveId=")
.fileId(null)
.suggestMsg("1111")
.receiveSettingCode(null)
.receiveSettingName(null)
.upSubjectName(null)
.upSubjectId(null)
.needUpApproval(null)
.signingComments(null)
.noNeedUpApprovalCode(null)
.noNeedUpApprovalInfo(null)
.templatePaths(templatePaths)
.build()
);
return BasePageResp.<ApprovePathSettingPageResp>builder()
.current(1)
.pages(1)
.total(1)
.data(data)
.build();
}
}
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