Commit cb112b06 by kenzo

add workflow

parent 7c948fe6
...@@ -301,11 +301,4 @@ public class ExpertController { ...@@ -301,11 +301,4 @@ public class ExpertController {
return ApiResult.successWithResult(expertService.getPeiXunKeChengKeJieFuJian(req)); return ApiResult.successWithResult(expertService.getPeiXunKeChengKeJieFuJian(req));
} }
// 课程详情 课节列表 分页列表
// @PostMapping("/exam/kecheng/kejie/page")
// public ApiResult<BasePageResp<PeiXunKeChengKeJiePageResp>> pagePeiXunKeChengKeJie(@RequestBody @Validated PeiXunKeChengKeJiePageReq req) {
// return ApiResult.successWithResult(expertService.pagePeiXunKeChengKeJie(req));
// }
} }
...@@ -10,15 +10,17 @@ import java.util.List; ...@@ -10,15 +10,17 @@ import java.util.List;
@Builder @Builder
public class PingBiaoZhuanYeTreeNodeResp { public class PingBiaoZhuanYeTreeNodeResp {
private String id; private String zhuanYeGuid;
private String code; private String zhuanYeName;
private String name; private String zhuanYeBH;
private Integer level; private String parentGuid;
private Integer zhuanYeShuXing;
private Integer sort; private Integer level;
private String path; private String path;
......
package com.cnooc.expert.controller.workflow; 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.workflow.model.request.ApprovePathSettingPageReq;
import com.cnooc.expert.controller.workflow.model.response.ApprovePathSettingPageResp;
import com.cnooc.expert.service.WorkflowService; import com.cnooc.expert.service.WorkflowService;
import lombok.AllArgsConstructor; 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.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -12,4 +19,10 @@ public class WorkflowController { ...@@ -12,4 +19,10 @@ public class WorkflowController {
private final WorkflowService workflowService; private final WorkflowService workflowService;
// 获取审批路径
@PostMapping("/approve-path-setting/page")
public ApiResult<BasePageResp<ApprovePathSettingPageResp>> pageApprovePathSetting(@RequestBody @Validated ApprovePathSettingPageReq req) {
return ApiResult.successWithResult(workflowService.pageApprovePathSetting(req));
}
} }
package com.cnooc.expert.controller.workflow.model.request;
import com.cnooc.expert.common.request.BasePageRequest;
import lombok.Data;
import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public class ApprovePathSettingPageReq extends BasePageRequest {
private String subjectId;
private String subjectName;
private String businessId;
private String businessTypeCode;
}
package com.cnooc.expert.controller.workflow.model.response;
import lombok.Builder;
import lombok.Data;
import java.util.List;
@Data
@Builder
public class ApprovePathSettingPageResp {
private String defId;
private String defName;
private String opinion;
private String pathId;
private Boolean useIfream;
private Integer engineType;
private String ifreamUrl;
private String fileId;
private String suggestMsg;
private String receiveSettingCode;
private String receiveSettingName;
private String upSubjectName;
private String upSubjectId;
private String needUpApproval;
private String signingComments;
private String noNeedUpApprovalCode;
private String noNeedUpApprovalInfo;
private List<ApprovePath> templatePaths;
@Data
@Builder
public static class ApprovePath {
private String nodeId;
private String nodeName;
private String approvePersonName;
private String subjectName;
private String email;
private List<ApprovePathAccount> accountList;
}
@Data
@Builder
public static class ApprovePathAccount {
private String account;
private String name;
private String subjectName;
private String email;
}
}
package com.cnooc.expert.external.portal.api; package com.cnooc.expert.external.portal.api;
public interface PortalServiceApi { import com.cnooc.expert.external.expert.model.request.ExpertInfoAppReq;
import com.cnooc.expert.external.expert.model.response.ExpertInfoAppResp;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.HeaderMap;
import retrofit2.http.POST;
import java.util.Map;
public interface PortalServiceApi {
@POST("")
Call<ExpertInfoAppResp> getZhuanJiaInfoAppById(@HeaderMap Map<String, Object> headers, @Body ExpertInfoAppReq expertInfoAppReq);
} }
...@@ -937,31 +937,34 @@ public class ExpertService { ...@@ -937,31 +937,34 @@ public class ExpertService {
List<PingBiaoZhuanYeTreeNodeResp> children3 = Lists.newArrayList( List<PingBiaoZhuanYeTreeNodeResp> children3 = Lists.newArrayList(
PingBiaoZhuanYeTreeNodeResp.builder() PingBiaoZhuanYeTreeNodeResp.builder()
.id("c59fd63413a55127ee575af9acebf7f8") .zhuanYeGuid("1deba76c65ddace77e9f9d5284b8c64d")
.code("A020102") .zhuanYeName("建设综合协调")
.name("铁路") .zhuanYeBH("A070101")
.parentGuid("ff114e70bab3f20be5dc6f4d9b0a137a")
.zhuanYeShuXing(2)
.level(null) .level(null)
.sort(null)
.path("$$$A02$$$A0201$$$A020102$$$") .path("$$$A02$$$A0201$$$A020102$$$")
.children(Collections.emptyList()) .children(Collections.emptyList())
.build(), .build(),
PingBiaoZhuanYeTreeNodeResp.builder() PingBiaoZhuanYeTreeNodeResp.builder()
.id("3e045f75167b06eaaa9332dddca76504") .zhuanYeGuid("503fec1a9c6f911626797c4fa647b771")
.code("A020107") .zhuanYeName("建设进度管理")
.name("火电") .zhuanYeBH("A070102")
.parentGuid("ff114e70bab3f20be5dc6f4d9b0a137a")
.zhuanYeShuXing(2)
.level(null) .level(null)
.sort(null)
.path("$$$A02$$$A0201$$$A020102$$$") .path("$$$A02$$$A0201$$$A020102$$$")
.children(Collections.emptyList()) .children(Collections.emptyList())
.build() .build()
); );
List<PingBiaoZhuanYeTreeNodeResp> children2 = Lists.newArrayList( List<PingBiaoZhuanYeTreeNodeResp> children2 = Lists.newArrayList(
PingBiaoZhuanYeTreeNodeResp.builder() PingBiaoZhuanYeTreeNodeResp.builder()
.id("ee219c9d3163151add3474ba296f55da") .zhuanYeGuid("ff114e70bab3f20be5dc6f4d9b0a137a")
.code("A0201") .zhuanYeName("建设项目管理")
.name("投资策划与决策") .zhuanYeBH("A0701")
.parentGuid("f34ee958d81545bd0196ec33e36e3c08")
.zhuanYeShuXing(2)
.level(null) .level(null)
.sort(null)
.path("$$$A02$$$A0201$$$") .path("$$$A02$$$A0201$$$")
.children(children3) .children(children3)
.build() .build()
...@@ -969,17 +972,17 @@ public class ExpertService { ...@@ -969,17 +972,17 @@ public class ExpertService {
List<PingBiaoZhuanYeTreeNodeResp> children1 = Lists.newArrayList( List<PingBiaoZhuanYeTreeNodeResp> children1 = Lists.newArrayList(
PingBiaoZhuanYeTreeNodeResp.builder() PingBiaoZhuanYeTreeNodeResp.builder()
.id("2fbccc3477502e9fae23a1f50dee27e2") .zhuanYeGuid("f34ee958d81545bd0196ec33e36e3c08")
.code("A02") .zhuanYeName("项目管理(含代建)")
.name("投资策划与决策") .zhuanYeBH("A07")
.parentGuid("0")
.zhuanYeShuXing(2)
.level(null) .level(null)
.sort(null)
.path("$$$A02$$$") .path("$$$A02$$$")
.children(children2) .children(children2)
.build() .build()
); );
return children1; return children1;
} }
......
package com.cnooc.expert.service; 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 lombok.AllArgsConstructor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
@AllArgsConstructor @AllArgsConstructor
@Service @Service
public class WorkflowService { public class WorkflowService {
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