Commit 1a5fc527 authored by xuzhang's avatar xuzhang

[feat][DOC]自动化任务Feign接口添加

parent 21ec4376
......@@ -8,6 +8,7 @@ import com.yonde.dcs.core.constants.Constants;
import com.yonde.dcs.core.service.ExtAutoTaskService;
import com.yonde.dcs.core.service.ExtSendFormLinkService;
import com.yonde.dcs.core.util.ExtDocUtil;
import com.yonde.dcs.core.util.ExtWfcUtil;
import com.yonde.dcs.document.common.entity.vo.DxDocumentVO;
import com.yonde.dcs.plan.common.vo.ExtPlanVO;
import com.yonde.dex.basedata.entity.api.ApiResult;
......@@ -21,9 +22,11 @@ import io.swagger.annotations.ApiOperation;
import lombok.SneakyThrows;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.Date;
import java.util.Map;
/**
......@@ -86,13 +89,13 @@ public class ExtAutoTaskController {
public ApiResult updatePdf(@PathVariable Long id) {
DxDocumentVO documentVO = extDocUtil.findDocObjFileLinks(id);
//重新生成设计图册签名
autoTaskService.generateQHTechDoc(documentVO, null);
autoTaskService.generateQHTechDoc(String.valueOf(id), null);
if (Constants.OUTDATED_NOTIFY.equals(documentVO.getSubTypeName())) {
//特殊处理过时文件通知单
autoTaskService.generateOutdatedDocNotify(documentVO);
} else {
//重新生成单据签名
autoTaskService.generateDocWordSign(documentVO, null, "二");
autoTaskService.generateDocWordSign(String.valueOf(id), null, "二");
}
return ApiResult.ok("更新成功!");
}
......@@ -111,10 +114,10 @@ public class ExtAutoTaskController {
@ApiOperation(value = "设置提资审核", notes = "设置提资审核", httpMethod = "POST")
@PostMapping(value = "/extSetProcessVariable")
public void extSetProcessVariable(Map<String, Object> taskParticipant,
public void extSetProcessVariable(@RequestBody Map<String, Object> taskParticipant,
@RequestParam("processInstId") String processInstId,
@RequestParam("key") String key,
Object value) {
@RequestParam("value") String value) {
autoTaskService.extSetProcessVariable(taskParticipant, processInstId, key, value);
}
......@@ -164,22 +167,22 @@ public class ExtAutoTaskController {
@ApiOperation(value = "生成NCR审查单word", notes = "生成NCR审查单word", httpMethod = "POST")
@PostMapping(value = "/generateNcrReviewWord")
public void generateNcrReviewWord(@RequestBody DxDocumentVO documentVO, Map<String, Object> wfTaskContext) {
autoTaskService.generateNcrReviewWord(documentVO, wfTaskContext);
public void generateNcrReviewWord(@RequestParam("documentId") String documentId, @RequestBody Map<String, Object> wfTaskContext) {
autoTaskService.generateNcrReviewWord(documentId, wfTaskContext);
}
@ApiOperation(value = "生成word签字", notes = "生成word签字", httpMethod = "POST")
@PostMapping(value = "/generateDocWordSign")
public void generateDocWordSign(@RequestBody DxDocumentVO documentVO,
Map<String, Object> wfTaskContext,
@RequestParam("fileName")String fileName) {
autoTaskService.generateDocWordSign(documentVO, wfTaskContext,fileName);
public void generateDocWordSign(@RequestParam("documentId") String documentId,
@RequestBody Map<String, Object> wfTaskContext,
@RequestParam("fileName") String fileName) {
autoTaskService.generateDocWordSign(documentId, wfTaskContext, fileName);
}
@ApiOperation(value = "内部接口-保存内部接口信息的总体室、审核签审信息值", notes = "内部接口-保存内部接口信息的总体室、审核签审信息值", httpMethod = "POST")
@PostMapping(value = "/savedInterfaceWf")
public void savedInterfaceWf(@RequestBody DxDocumentVO documentVO, Map<String, Object> wfTaskContext) {
autoTaskService.savedInterfaceWf(documentVO, wfTaskContext);
public void savedInterfaceWf(@RequestParam("documentId") String documentId, @RequestBody Map<String, Object> wfTaskContext) {
autoTaskService.savedInterfaceWf(documentId, wfTaskContext);
}
@ApiOperation(value = "自动任务-编制节点后生成word方法", notes = "自动任务-编制节点后生成word方法", httpMethod = "POST")
......@@ -196,8 +199,8 @@ public class ExtAutoTaskController {
@ApiOperation(value = "自动任务-生成QH技术文件签审页", notes = "自动任务-生成QH技术文件签审页", httpMethod = "POST")
@PostMapping(value = "/generateQHTechDoc")
public void generateQHTechDoc(@RequestBody DxDocumentVO documentVO, Map<String, Object> wfTaskContext) {
autoTaskService.generateQHTechDoc(documentVO,wfTaskContext);
public void generateQHTechDoc(@RequestParam("documentId") String documentId, @RequestBody Map<String, Object> wfTaskContext) {
autoTaskService.generateQHTechDoc(documentId, wfTaskContext);
}
//endProcess
......@@ -216,14 +219,14 @@ public class ExtAutoTaskController {
@ApiOperation(value = "申请内容 签名", notes = "申请内容 签名", httpMethod = "POST")
@PostMapping(value = "/autoApplicantSign")
public void autoApplicantSign(@RequestBody ExtApplicantVO applicantVO, Map<String, Object> wfTaskContext) {
autoTaskService.autoApplicantSign(applicantVO,wfTaskContext);
public void autoApplicantSign(@RequestParam("applicantId") String applicantId, @RequestBody Map<String, Object> wfTaskContext) {
autoTaskService.autoApplicantSign(applicantId, wfTaskContext);
}
@ApiOperation(value = "接口单签名", notes = "接口单签名", httpMethod = "POST")
@PostMapping(value = "/autoInterFaceSign")
public void autoInterFaceSign(@RequestBody ExtInterfaceVO extInterfaceVO, Map<String, Object> wfTaskContext) {
autoTaskService.autoInterFaceSign(extInterfaceVO,wfTaskContext);
public void autoInterFaceSign(@RequestParam("extInterfaceId") String extInterfaceId, @RequestBody Map<String, Object> wfTaskContext) {
autoTaskService.autoInterFaceSign(extInterfaceId, wfTaskContext);
}
@ApiOperation(value = "签审对象的终止流程", notes = "签审对象的终止流程", httpMethod = "POST")
......@@ -249,4 +252,12 @@ public class ExtAutoTaskController {
public void stopAllExtApplicantFaceFlow(@RequestBody ExtInterfaceVO extInterfaceVO) {
autoTaskService.stopAllExtApplicantFaceFlow(extInterfaceVO);
}
@ApiOperation(value = "设置接口单 的提资日期 (接口单流程走完第一个 提资节点后设置)", notes = "设置接口单 的提资日期 (接口单流程走完第一个 提资节点后设置)", httpMethod = "POST")
@PostMapping(value = "/autoSetTzri")
public void autoSetTzri(@RequestBody ExtInterfaceVO interfaceVO) {
autoTaskService.autoSetTzri(interfaceVO);
}
}
package com.yonde.dcs.core.service;
import com.yonde.dcs.common.vo.ExtApplicantVO;
import com.yonde.dcs.common.vo.ExtAuditObjectVO;
import com.yonde.dcs.common.vo.ExtInterfaceVO;
......@@ -43,7 +41,7 @@ public interface ExtAutoTaskService extends ExtAutoTaskServiceFeign {
* @param key
* @param value
*/
void extSetProcessVariable(Map<String, Object> taskParticipant, String processInstId, String key, Object value);
void extSetProcessVariable(Map<String, Object> taskParticipant, String processInstId, String key, String value);
/**
* 设置提资人变量
......@@ -99,21 +97,21 @@ public interface ExtAutoTaskService extends ExtAutoTaskServiceFeign {
/**
* 生成NCR审查单word
*/
void generateNcrReviewWord(DxDocumentVO documentVO, Map<String, Object> wfTaskContext);
void generateNcrReviewWord(String documentId, Map<String, Object> wfTaskContext);
/**
* 生成word签字
*
* @param documentVO
* @param documentId
* @param wfTaskContext
* @param fileName 同室审核完生成签名附件为(附件1),签审流程走完后生成签名附件为(附件2),没有是为""。
*/
void generateDocWordSign(DxDocumentVO documentVO, Map<String, Object> wfTaskContext, String fileName);
void generateDocWordSign(String documentId, Map<String, Object> wfTaskContext, String fileName);
/**
* 内部接口-保存内部接口信息的总体室、审核签审信息值
*/
void savedInterfaceWf(DxDocumentVO documentVO, Map<String, Object> wfTaskContext);
void savedInterfaceWf(String documentId, Map<String, Object> wfTaskContext);
/**
......@@ -129,7 +127,7 @@ public interface ExtAutoTaskService extends ExtAutoTaskServiceFeign {
/**
* 自动任务-生成QH技术文件签审页
*/
void generateQHTechDoc(DxDocumentVO documentVO, Map<String, Object> wfTaskContext);
void generateQHTechDoc(String documentId, Map<String, Object> wfTaskContext);
/**
* 结束流程实例
......@@ -146,6 +144,7 @@ public interface ExtAutoTaskService extends ExtAutoTaskServiceFeign {
* @param documentVO
*/
void generateOutdatedDocNotify(DxDocumentVO documentVO);
/**
* 已发布后修改状态已过时
*/
......@@ -154,22 +153,23 @@ public interface ExtAutoTaskService extends ExtAutoTaskServiceFeign {
/**
* 申请内容 签名
*
* @param applicantVO
* @param applicantId
* @param wfTaskContext
*/
@SneakyThrows
void autoApplicantSign(ExtApplicantVO applicantVO, Map<String, Object> wfTaskContext);
void autoApplicantSign(String applicantId, Map<String, Object> wfTaskContext);
/**
* 接口单签名
*
* @param extInterfaceVO
* @param extInterfaceId
* @param wfTaskContext
*/
void autoInterFaceSign(ExtInterfaceVO extInterfaceVO, Map<String, Object> wfTaskContext);
void autoInterFaceSign(String extInterfaceId, Map<String, Object> wfTaskContext);
/**
* 签审对象 关联的接口单 状态置为已终止 (签审对象的终止流程)
*
* @param auditObjectVO
*/
@SneakyThrows
......@@ -177,6 +177,7 @@ public interface ExtAutoTaskService extends ExtAutoTaskServiceFeign {
/**
* 申请内容走完流程后 自动启动 接口单的流程
*
* @param applicantVO 申请内容
*/
void startInterFaceFlow(ExtApplicantVO applicantVO);
......@@ -190,7 +191,15 @@ public interface ExtAutoTaskService extends ExtAutoTaskServiceFeign {
/**
* 签审对象 扫描所有提资单 并更新状态
*
* @param extInterfaceVO
*/
void stopAllExtApplicantFaceFlow(ExtInterfaceVO extInterfaceVO);
/**
* 设置接口单 的提资日期 (接口单流程走完第一个 提资节点后设置)
* @param interfaceVO
*/
@SneakyThrows
void autoSetTzri(ExtInterfaceVO interfaceVO);
}
......@@ -34,10 +34,10 @@ public interface ExtAutoTaskServiceFeign {
@ApiOperation(value = "设置提资审核", notes = "设置提资审核", httpMethod = "POST")
@PostMapping(value = "/extSetProcessVariable")
void extSetProcessVariable(Map<String, Object> taskParticipant,
void extSetProcessVariable(@RequestBody Map<String, Object> taskParticipant,
@RequestParam("processInstId") String processInstId,
@RequestParam("key") String key,
Object value);
@RequestParam("value") String value);
@ApiOperation(value = "设置提资人变量", notes = "设置提资人变量", httpMethod = "POST")
@PostMapping(value = "/setInformativeUser")
......@@ -71,15 +71,15 @@ public interface ExtAutoTaskServiceFeign {
@ApiOperation(value = "生成NCR审查单word", notes = "生成NCR审查单word", httpMethod = "POST")
@PostMapping(value = "/generateNcrReviewWord")
void generateNcrReviewWord(@RequestBody DxDocumentVO documentVO, Map<String, Object> wfTaskContext);
void generateNcrReviewWord(@RequestParam("documentId") String documentId, @RequestBody Map<String, Object> wfTaskContext);
@ApiOperation(value = "生成word签字", notes = "生成word签字", httpMethod = "POST")
@PostMapping(value = "/generateDocWordSign")
void generateDocWordSign(@RequestBody DxDocumentVO documentVO, Map<String, Object> wfTaskContext, @RequestParam("fileName") String fileName);
void generateDocWordSign(@RequestParam("documentId") String documentId, @RequestBody Map<String, Object> wfTaskContext, @RequestParam("fileName") String fileName);
@ApiOperation(value = "内部接口-保存内部接口信息的总体室、审核签审信息值", notes = "内部接口-保存内部接口信息的总体室、审核签审信息值", httpMethod = "POST")
@PostMapping(value = "/savedInterfaceWf")
void savedInterfaceWf(@RequestBody DxDocumentVO documentVO, Map<String, Object> wfTaskContext);
void savedInterfaceWf(@RequestParam("documentId") String documentId, @RequestBody Map<String, Object> wfTaskContext);
@ApiOperation(value = "自动任务-编制节点后生成word方法", notes = "自动任务-编制节点后生成word方法", httpMethod = "POST")
@PostMapping(value = "/generateWordByAutoMethod")
......@@ -91,7 +91,7 @@ public interface ExtAutoTaskServiceFeign {
@ApiOperation(value = "自动任务-生成QH技术文件签审页", notes = "自动任务-生成QH技术文件签审页", httpMethod = "POST")
@PostMapping(value = "/generateQHTechDoc")
void generateQHTechDoc(@RequestBody DxDocumentVO documentVO, Map<String, Object> wfTaskContext);
void generateQHTechDoc(@RequestParam("documentId") String documentId, @RequestBody Map<String, Object> wfTaskContext);
//endProcess
......@@ -105,11 +105,11 @@ public interface ExtAutoTaskServiceFeign {
@ApiOperation(value = "申请内容 签名", notes = "申请内容 签名", httpMethod = "POST")
@PostMapping(value = "/autoApplicantSign")
void autoApplicantSign(@RequestBody ExtApplicantVO applicantVO, Map<String, Object> wfTaskContext);
void autoApplicantSign(@RequestParam("applicantId") String applicantId, @RequestBody Map<String, Object> wfTaskContext);
@ApiOperation(value = "接口单签名", notes = "接口单签名", httpMethod = "POST")
@PostMapping(value = "/autoInterFaceSign")
void autoInterFaceSign(@RequestBody ExtInterfaceVO extInterfaceVO, Map<String, Object> wfTaskContext);
void autoInterFaceSign(@RequestParam("extInterfaceId") String extInterfaceId, @RequestBody Map<String, Object> wfTaskContext);
@ApiOperation(value = "签审对象的终止流程", notes = "签审对象的终止流程", httpMethod = "POST")
@PostMapping(value = "/autoInterfaceEnd")
......@@ -126,4 +126,8 @@ public interface ExtAutoTaskServiceFeign {
@ApiOperation(value = "签审对象 扫描所有提资单 并更新状态", notes = "签审对象 扫描所有提资单 并更新状态", httpMethod = "POST")
@PostMapping(value = "/stopAllExtApplicantFaceFlow")
void stopAllExtApplicantFaceFlow(@RequestBody ExtInterfaceVO extInterfaceVO);
@ApiOperation(value = "设置接口单 的提资日期 (接口单流程走完第一个 提资节点后设置)", notes = "设置接口单 的提资日期 (接口单流程走完第一个 提资节点后设置)", httpMethod = "POST")
@PostMapping(value = "/autoSetTzri")
void autoSetTzri(@RequestBody ExtInterfaceVO interfaceVO);
}
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