Commit 3883847f authored by xuzhang's avatar xuzhang

[feat][DOC]代码迁移

parent 7049b1c1
package com.yonde.dcs.core.controller;
import cn.hutool.core.collection.CollectionUtil;
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.document.common.entity.vo.DxDocumentVO;
import com.yonde.dex.basedata.entity.api.ApiResult;
import com.yonde.dex.basedata.entity.vo.IdVO;
import com.yonde.dex.taskmonitor.api.interfaces.TaskMessagePusher;
import com.yonde.dex.wfc.common.vo.DxWfProcessSearchVO;
import com.yonde.dex.wfc.common.vo.DxWfProcessVO;
import com.yonde.dex.wfc.feign.api.WfcProcessFeign;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.*;
/**
* @program: service
* @description: 自动任务服务接口
* @author: dang wei
* @create: 2021-07-13 10:01
*/
@RestController
@RequestMapping("/task")
@Api(tags = "自动任务服务接口")
public class ExtAutoTaskController {
@Autowired
WfcProcessFeign wfcProcessFeign;
@Autowired
TaskMessagePusher taskMessagePusher;
@Autowired
private ExtAutoTaskService autoTaskService;
@Autowired
private ExtDocUtil extDocUtil;
@Autowired
private ExtSendFormLinkService sendFormLinkService;
@ApiOperation("电子签名")
@PostMapping({"/esign"})
public ApiResult esign(@RequestBody IdVO entity) {
DxWfProcessSearchVO dxWfProcessSearchVO = new DxWfProcessSearchVO();
dxWfProcessSearchVO.setPboClass(entity.getDxClassname());
dxWfProcessSearchVO.setPboId(entity.getId());
Page<DxWfProcessVO> dxWfProcessVODxPage = this.wfcProcessFeign.getProcessList(dxWfProcessSearchVO, 1, 1);
if (CollectionUtil.isNotEmpty(dxWfProcessVODxPage.getContent())) {
DxWfProcessVO dxWfProcessVO = dxWfProcessVODxPage.getContent().get(0);
String pboKey = "";
String signNode = "";
if (DxDocumentVO.class.getName().equals(entity.getDxClassname())) {
pboKey = "doc";
signNode = "Activity_0st1yf8";
}
// DxWfTaskContext dxWfTaskContext = new DxWfTaskContext(dxWfProcessVO.getBusinessKey(), dxWfProcessVO.getId(), dxWfProcessVO.getProcessDef().getId(), signNode, null, (Map) null);
//todo 在4.1中未找到WfcSignMessage 注释了71-74行
// WfcSignMessage wfcSignMessage = new WfcSignMessage(new HashMap());
// wfcSignMessage.setWfTaskContext(dxWfTaskContext);
// wfcSignMessage.setSignType(pboKey);
// TaskMessage taskMessage = (new WfcSignMessageBuilder()).newTasks(wfcSignMessage);
// this.taskMessagePusher.sendMessage(taskMessage);
this.taskMessagePusher.sendMessage(null);
return ApiResult.ok("重新发送电子签名请求成功!");
} else {
return ApiResult.ok("该对象未走签审流程!");
}
}
@ApiOperation(value = "更新PDF", notes = "更新PDF", httpMethod = "GET")
@GetMapping(value = "/updatePdf/{id}")
public ApiResult updatePdf(@PathVariable Long id) {
DxDocumentVO documentVO = extDocUtil.findDocObjFileLinks(id);
//重新生成设计图册签名
autoTaskService.generateQHTechDoc(documentVO, null);
if (Constants.OUTDATED_NOTIFY.equals(documentVO.getSubTypeName())) {
//特殊处理过时文件通知单
autoTaskService.generateOutdatedDocNotify(documentVO);
} else {
//重新生成单据签名
autoTaskService.generateDocWordSign(documentVO, null, "二");
}
return ApiResult.ok("更新成功!");
}
}
...@@ -12,6 +12,7 @@ import lombok.extern.slf4j.Slf4j; ...@@ -12,6 +12,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -24,7 +25,9 @@ import java.util.stream.Collectors; ...@@ -24,7 +25,9 @@ import java.util.stream.Collectors;
public class ValidateSecretListener extends AbstractEventListener<BaseService.DataChangeEvent> { public class ValidateSecretListener extends AbstractEventListener<BaseService.DataChangeEvent> {
@Autowired @Autowired
private DictDataFeignService dictDataService; private DictDataFeignService dictDataService;
@Qualifier("com.yonde.dex.context.feign.ContextProjectServiceFeign")
@Autowired @Autowired
private ContextServiceFeign contextServiceFeign; private ContextServiceFeign contextServiceFeign;
@Override @Override
......
package com.yonde.dcs.core.service;
import com.yonde.dcs.document.common.entity.vo.DxDocumentVO;
import com.yonde.dcs.plan.common.vo.ExtPlanVO;
import java.util.Map;
/**
* @program: inet-pdm-service
* @description: 自动任务服务接口
* @author: dang wei
* @create: 2021-09-27 09:41
*/
public interface ExtAutoTaskService {
/**
* 客户化文档修改状态
*
* @param documentVO
*/
void extChangeDocState(DxDocumentVO documentVO, String state);
/**
* 给选择的提资方人员发放通知
*
* @param documentVO
* @param userId
*/
void informativeUser(DxDocumentVO documentVO, String userId);
/**
* 设置提资审核
*
* @param taskParticipant
* @param processInstId
* @param key
* @param value
*/
void extSetProcessVariable(Map<String, Object> taskParticipant, String processInstId, String key, Object value);
/**
* 设置提资人变量
*
* @param processInstId
* @param varKey
* @param informativeUser
*/
void setInformativeUser(String processInstId, String varKey, String informativeUser);
/**
* 自动发送联系单
*/
void sendContractDoc(DxDocumentVO documentVO, String contractName);
/**
* 创建过时文件通知单
*
* @param documentVO
*/
void createDocNotify(DxDocumentVO documentVO);
/**
* 设置编制节点人员回显事件
*
* @param taskId
* @param documentVO
*/
void setProcessSelectionInfo(String taskId, DxDocumentVO documentVO);
/**
* 任务完成后更新pbo属性,驳回操作,设置编制节点人员回显
*
* @param taskId
* @param documentVO
*/
void getProcessSelectionInfo(String taskId, DxDocumentVO documentVO);
/**
* 计划生命周期事件
*
* @param extPlanVO
*/
void pressPlanInfo(ExtPlanVO extPlanVO) throws Exception;
/**
* 内部接口-生成提资信息word
*
* @param documentVO
*/
void generateInformationWord(DxDocumentVO documentVO);
/**
* 生成NCR审查单word
*/
void generateNcrReviewWord(DxDocumentVO documentVO, Map<String, Object> wfTaskContext);
/**
* 生成word签字
*
* @param documentVO
* @param wfTaskContext
* @param fileName 同室审核完生成签名附件为(附件1),签审流程走完后生成签名附件为(附件2),没有是为""。
*/
void generateDocWordSign(DxDocumentVO documentVO, Map<String, Object> wfTaskContext, String fileName);
/**
* 内部接口-保存内部接口信息的总体室、审核签审信息值
*/
void savedInterfaceWf(DxDocumentVO documentVO, Map<String, Object> wfTaskContext);
/**
* 自动任务-编制节点后生成word方法(自动任务修改方法)
*/
void generateWordByAutoMethod(DxDocumentVO documentVo);
/**
* 自动任务-校验图册下的图纸是否检入
*/
void checkLockerUtil(DxDocumentVO documentVo);
/**
* 自动任务-生成QH技术文件签审页
*/
void generateQHTechDoc(DxDocumentVO documentVO, Map<String, Object> wfTaskContext);
/**
* 结束流程实例
*
* @param iterationObject
*/
// TODO: 2024/7/31 DxIterationVO在4.1不存在
// void endProcess(DxIterationVO iterationObject);
/**
* 生成过时文件通知单word
*
* @param documentVO
*/
void generateOutdatedDocNotify(DxDocumentVO documentVO);
/**
* 已发布后修改状态已过时
*/
void changeOldDataState(DxDocumentVO documentVO);
}
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