Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dcs-doc-expand
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
INET-TWO
server
dcs-doc-expand
Commits
52ecd47a
Commit
52ecd47a
authored
Aug 12, 2024
by
xuzhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[feat][DOC]迁移类缺失问题修改/DEX4.1升级补丁
parent
1a5fc527
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
114 additions
and
108 deletions
+114
-108
pom.xml
dcs-doc-expand-core/pom.xml
+4
-0
ExtAutoTaskController.java
.../com/yonde/dcs/core/controller/ExtAutoTaskController.java
+8
-8
DocTransactionEvent.java
...n/java/com/yonde/dcs/core/events/DocTransactionEvent.java
+3
-6
OutdatedDocNotifyUtils.java
...va/com/yonde/dcs/core/factory/OutdatedDocNotifyUtils.java
+10
-6
ExtAutoTaskService.java
...n/java/com/yonde/dcs/core/service/ExtAutoTaskService.java
+6
-6
ExtAutoTaskServiceImpl.java
...m/yonde/dcs/core/service/impl/ExtAutoTaskServiceImpl.java
+10
-10
WorkFlowUtil.java
...e/src/main/java/com/yonde/dcs/core/util/WorkFlowUtil.java
+64
-63
ExtAutoTaskServiceFeign.java
...ain/java/com/yonde/dcs/feign/ExtAutoTaskServiceFeign.java
+8
-8
pom.xml
pom.xml
+1
-1
No files found.
dcs-doc-expand-core/pom.xml
View file @
52ecd47a
...
...
@@ -159,6 +159,10 @@
<artifactId>
itext-asian
</artifactId>
<version>
5.2.0
</version>
</dependency>
<dependency>
<groupId>
com.yonde.dex
</groupId>
<artifactId>
dex-wfc-common
</artifactId>
</dependency>
</dependencies>
</project>
dcs-doc-expand-core/src/main/java/com/yonde/dcs/core/controller/ExtAutoTaskController.java
View file @
52ecd47a
...
...
@@ -89,13 +89,13 @@ public class ExtAutoTaskController {
public
ApiResult
updatePdf
(
@PathVariable
Long
id
)
{
DxDocumentVO
documentVO
=
extDocUtil
.
findDocObjFileLinks
(
id
);
//重新生成设计图册签名
autoTaskService
.
generateQHTechDoc
(
String
.
valueOf
(
id
)
,
null
);
autoTaskService
.
generateQHTechDoc
(
id
,
null
);
if
(
Constants
.
OUTDATED_NOTIFY
.
equals
(
documentVO
.
getSubTypeName
()))
{
//特殊处理过时文件通知单
autoTaskService
.
generateOutdatedDocNotify
(
documentVO
);
}
else
{
//重新生成单据签名
autoTaskService
.
generateDocWordSign
(
String
.
valueOf
(
id
)
,
null
,
"二"
);
autoTaskService
.
generateDocWordSign
(
id
,
null
,
"二"
);
}
return
ApiResult
.
ok
(
"更新成功!"
);
}
...
...
@@ -167,13 +167,13 @@ public class ExtAutoTaskController {
@ApiOperation
(
value
=
"生成NCR审查单word"
,
notes
=
"生成NCR审查单word"
,
httpMethod
=
"POST"
)
@PostMapping
(
value
=
"/generateNcrReviewWord"
)
public
void
generateNcrReviewWord
(
@RequestParam
(
"documentId"
)
Stri
ng
documentId
,
@RequestBody
Map
<
String
,
Object
>
wfTaskContext
)
{
public
void
generateNcrReviewWord
(
@RequestParam
(
"documentId"
)
Lo
ng
documentId
,
@RequestBody
Map
<
String
,
Object
>
wfTaskContext
)
{
autoTaskService
.
generateNcrReviewWord
(
documentId
,
wfTaskContext
);
}
@ApiOperation
(
value
=
"生成word签字"
,
notes
=
"生成word签字"
,
httpMethod
=
"POST"
)
@PostMapping
(
value
=
"/generateDocWordSign"
)
public
void
generateDocWordSign
(
@RequestParam
(
"documentId"
)
Stri
ng
documentId
,
public
void
generateDocWordSign
(
@RequestParam
(
"documentId"
)
Lo
ng
documentId
,
@RequestBody
Map
<
String
,
Object
>
wfTaskContext
,
@RequestParam
(
"fileName"
)
String
fileName
)
{
autoTaskService
.
generateDocWordSign
(
documentId
,
wfTaskContext
,
fileName
);
...
...
@@ -181,7 +181,7 @@ public class ExtAutoTaskController {
@ApiOperation
(
value
=
"内部接口-保存内部接口信息的总体室、审核签审信息值"
,
notes
=
"内部接口-保存内部接口信息的总体室、审核签审信息值"
,
httpMethod
=
"POST"
)
@PostMapping
(
value
=
"/savedInterfaceWf"
)
public
void
savedInterfaceWf
(
@RequestParam
(
"documentId"
)
Stri
ng
documentId
,
@RequestBody
Map
<
String
,
Object
>
wfTaskContext
)
{
public
void
savedInterfaceWf
(
@RequestParam
(
"documentId"
)
Lo
ng
documentId
,
@RequestBody
Map
<
String
,
Object
>
wfTaskContext
)
{
autoTaskService
.
savedInterfaceWf
(
documentId
,
wfTaskContext
);
}
...
...
@@ -199,7 +199,7 @@ public class ExtAutoTaskController {
@ApiOperation
(
value
=
"自动任务-生成QH技术文件签审页"
,
notes
=
"自动任务-生成QH技术文件签审页"
,
httpMethod
=
"POST"
)
@PostMapping
(
value
=
"/generateQHTechDoc"
)
public
void
generateQHTechDoc
(
@RequestParam
(
"documentId"
)
Stri
ng
documentId
,
@RequestBody
Map
<
String
,
Object
>
wfTaskContext
)
{
public
void
generateQHTechDoc
(
@RequestParam
(
"documentId"
)
Lo
ng
documentId
,
@RequestBody
Map
<
String
,
Object
>
wfTaskContext
)
{
autoTaskService
.
generateQHTechDoc
(
documentId
,
wfTaskContext
);
}
...
...
@@ -219,13 +219,13 @@ public class ExtAutoTaskController {
@ApiOperation
(
value
=
"申请内容 签名"
,
notes
=
"申请内容 签名"
,
httpMethod
=
"POST"
)
@PostMapping
(
value
=
"/autoApplicantSign"
)
public
void
autoApplicantSign
(
@RequestParam
(
"applicantId"
)
Stri
ng
applicantId
,
@RequestBody
Map
<
String
,
Object
>
wfTaskContext
)
{
public
void
autoApplicantSign
(
@RequestParam
(
"applicantId"
)
Lo
ng
applicantId
,
@RequestBody
Map
<
String
,
Object
>
wfTaskContext
)
{
autoTaskService
.
autoApplicantSign
(
applicantId
,
wfTaskContext
);
}
@ApiOperation
(
value
=
"接口单签名"
,
notes
=
"接口单签名"
,
httpMethod
=
"POST"
)
@PostMapping
(
value
=
"/autoInterFaceSign"
)
public
void
autoInterFaceSign
(
@RequestParam
(
"extInterfaceId"
)
Stri
ng
extInterfaceId
,
@RequestBody
Map
<
String
,
Object
>
wfTaskContext
)
{
public
void
autoInterFaceSign
(
@RequestParam
(
"extInterfaceId"
)
Lo
ng
extInterfaceId
,
@RequestBody
Map
<
String
,
Object
>
wfTaskContext
)
{
autoTaskService
.
autoInterFaceSign
(
extInterfaceId
,
wfTaskContext
);
}
...
...
dcs-doc-expand-core/src/main/java/com/yonde/dcs/core/events/DocTransactionEvent.java
View file @
52ecd47a
...
...
@@ -69,11 +69,9 @@ public class DocTransactionEvent {
private
void
refreshInContractAmount
(
Long
contractId
)
{
//已到款
//待拨付
//todo feign添加
// extIncomeContractService.calculateIncome(contractId);
extIncomeContractService
.
calculateIncome
(
contractId
);
//XXX年到款
//todo feign添加
// extIncomeContractService.reCalculIncomeById(contractId);
extIncomeContractService
.
reCalculIncomeById
(
contractId
);
}
/**
...
...
@@ -85,7 +83,6 @@ public class DocTransactionEvent {
//已付金额
//未付金额
//付款比例
//todo feign添加
// extSpendingContractService.calculateSpending(contractId);
extSpendingContractService
.
calculateSpending
(
contractId
);
}
}
dcs-doc-expand-core/src/main/java/com/yonde/dcs/core/factory/OutdatedDocNotifyUtils.java
View file @
52ecd47a
...
...
@@ -4,16 +4,20 @@ import cn.hutool.core.io.FileUtil;
import
com.alibaba.fastjson.JSONObject
;
import
com.yonde.dcs.core.constants.Constants
;
import
com.yonde.dcs.core.constants.SignConstants
;
import
com.yonde.dcs.core.service.ExtDocService
;
import
com.yonde.dcs.core.util.DateUtils
;
import
com.yonde.dcs.core.util.WorkFlowUtil
;
import
com.yonde.dcs.core.word.ImportWordService
;
import
com.yonde.dcs.document.common.entity.vo.DxDocumentVO
;
import
com.yonde.dex.wfc.common.vo.DxWfActivityVO
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
...
...
@@ -71,12 +75,12 @@ public class OutdatedDocNotifyUtils {
//页数
jsonObject
.
put
(
"page"
,
pages
);
//todo 获取参与者
// List<WfTaskDefinition
VO> activities = wfProcessInfoVO.getActivityInfo();
//
if (!CollectionUtils.isEmpty(activities)) {
//
//写入签名数据(总体室)
//
jsonObject.put("bmfzr_photo", workFlowUtil.getSignImage(activities, SignConstants.ZTSSignTaskList));
//
jsonObject.put("bmfzr_date", workFlowUtil.getEndDate(activities, SignConstants.ZTSSignTaskList));
//
}
List
<
DxWfActivity
VO
>
activities
=
wfProcessInfoVO
.
getActivityInfo
();
if
(!
CollectionUtils
.
isEmpty
(
activities
))
{
//写入签名数据(总体室)
jsonObject
.
put
(
"bmfzr_photo"
,
workFlowUtil
.
getSignImage
(
activities
,
SignConstants
.
ZTSSignTaskList
));
jsonObject
.
put
(
"bmfzr_date"
,
workFlowUtil
.
getEndDate
(
activities
,
SignConstants
.
ZTSSignTaskList
));
}
//模板名称
importWordService
.
getWordAllTable
(
jsonObject
,
path
+
file
+
".docx"
,
outFilePath
+
"outFile.docx"
);
return
jsonObject
;
...
...
dcs-doc-expand-core/src/main/java/com/yonde/dcs/core/service/ExtAutoTaskService.java
View file @
52ecd47a
...
...
@@ -97,7 +97,7 @@ public interface ExtAutoTaskService extends ExtAutoTaskServiceFeign {
/**
* 生成NCR审查单word
*/
void
generateNcrReviewWord
(
Stri
ng
documentId
,
Map
<
String
,
Object
>
wfTaskContext
);
void
generateNcrReviewWord
(
Lo
ng
documentId
,
Map
<
String
,
Object
>
wfTaskContext
);
/**
* 生成word签字
...
...
@@ -106,12 +106,12 @@ public interface ExtAutoTaskService extends ExtAutoTaskServiceFeign {
* @param wfTaskContext
* @param fileName 同室审核完生成签名附件为(附件1),签审流程走完后生成签名附件为(附件2),没有是为""。
*/
void
generateDocWordSign
(
Stri
ng
documentId
,
Map
<
String
,
Object
>
wfTaskContext
,
String
fileName
);
void
generateDocWordSign
(
Lo
ng
documentId
,
Map
<
String
,
Object
>
wfTaskContext
,
String
fileName
);
/**
* 内部接口-保存内部接口信息的总体室、审核签审信息值
*/
void
savedInterfaceWf
(
Stri
ng
documentId
,
Map
<
String
,
Object
>
wfTaskContext
);
void
savedInterfaceWf
(
Lo
ng
documentId
,
Map
<
String
,
Object
>
wfTaskContext
);
/**
...
...
@@ -127,7 +127,7 @@ public interface ExtAutoTaskService extends ExtAutoTaskServiceFeign {
/**
* 自动任务-生成QH技术文件签审页
*/
void
generateQHTechDoc
(
Stri
ng
documentId
,
Map
<
String
,
Object
>
wfTaskContext
);
void
generateQHTechDoc
(
Lo
ng
documentId
,
Map
<
String
,
Object
>
wfTaskContext
);
/**
* 结束流程实例
...
...
@@ -157,7 +157,7 @@ public interface ExtAutoTaskService extends ExtAutoTaskServiceFeign {
* @param wfTaskContext
*/
@SneakyThrows
void
autoApplicantSign
(
Stri
ng
applicantId
,
Map
<
String
,
Object
>
wfTaskContext
);
void
autoApplicantSign
(
Lo
ng
applicantId
,
Map
<
String
,
Object
>
wfTaskContext
);
/**
* 接口单签名
...
...
@@ -165,7 +165,7 @@ public interface ExtAutoTaskService extends ExtAutoTaskServiceFeign {
* @param extInterfaceId
* @param wfTaskContext
*/
void
autoInterFaceSign
(
Stri
ng
extInterfaceId
,
Map
<
String
,
Object
>
wfTaskContext
);
void
autoInterFaceSign
(
Lo
ng
extInterfaceId
,
Map
<
String
,
Object
>
wfTaskContext
);
/**
* 签审对象 关联的接口单 状态置为已终止 (签审对象的终止流程)
...
...
dcs-doc-expand-core/src/main/java/com/yonde/dcs/core/service/impl/ExtAutoTaskServiceImpl.java
View file @
52ecd47a
...
...
@@ -777,8 +777,8 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
* @param wfTaskContext
*/
@Override
public
void
generateNcrReviewWord
(
Stri
ng
documentId
,
Map
<
String
,
Object
>
wfTaskContext
)
{
DxDocumentVO
documentVO
=
extDocUtil
.
findDocObjFileLinks
(
Long
.
valueOf
(
documentId
)
);
public
void
generateNcrReviewWord
(
Lo
ng
documentId
,
Map
<
String
,
Object
>
wfTaskContext
)
{
DxDocumentVO
documentVO
=
extDocUtil
.
findDocObjFileLinks
(
documentId
);
try
{
String
templatePath
=
Constants
.
MTEMPLATE_ABSOLUTE_PATH
;
String
templateName
=
"NCRReview.docx"
;
...
...
@@ -883,9 +883,9 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
}
@Override
public
void
generateDocWordSign
(
Stri
ng
documentId
,
Map
<
String
,
Object
>
wfTaskContext
,
String
fileName
)
{
public
void
generateDocWordSign
(
Lo
ng
documentId
,
Map
<
String
,
Object
>
wfTaskContext
,
String
fileName
)
{
//深度查询展开ObjLink
DxDocumentVO
documentVO
=
extDocUtil
.
findDocObjFileLinks
(
Long
.
valueOf
(
documentId
)
);
DxDocumentVO
documentVO
=
extDocUtil
.
findDocObjFileLinks
(
documentId
);
log
.
info
(
"自动任务======生成word签名开始"
);
// TODO: 2024/7/31 4.1返回对象不匹对 WfProcessInstVO
// WfProcessInstVO wfProcessInstVO = workFlowUtil.getWfProcessInst(documentVO);
...
...
@@ -931,8 +931,8 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
* @param wfTaskContext
*/
@Override
public
void
savedInterfaceWf
(
Stri
ng
documentId
,
Map
<
String
,
Object
>
wfTaskContext
)
{
DxDocumentVO
documentVO
=
extDocUtil
.
findDocObjFileLinks
(
Long
.
valueOf
(
documentId
)
);
public
void
savedInterfaceWf
(
Lo
ng
documentId
,
Map
<
String
,
Object
>
wfTaskContext
)
{
DxDocumentVO
documentVO
=
extDocUtil
.
findDocObjFileLinks
(
documentId
);
DxWfTaskContext
context
=
(
DxWfTaskContext
)
wfTaskContext
.
get
(
"context"
);
String
processId
=
context
.
getProcessId
();
// TODO: 2024/7/31 4.1此方法不存在 getProcessInstDetailById(processId)
...
...
@@ -1058,8 +1058,8 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
* 自动任务-生成QH技术文件签审页
*/
@Override
public
void
generateQHTechDoc
(
Stri
ng
documentId
,
Map
<
String
,
Object
>
wfTaskContext
)
{
DxDocumentVO
documentVO
=
extDocUtil
.
findDocObjFileLinks
(
Long
.
valueOf
(
documentId
)
);
public
void
generateQHTechDoc
(
Lo
ng
documentId
,
Map
<
String
,
Object
>
wfTaskContext
)
{
DxDocumentVO
documentVO
=
extDocUtil
.
findDocObjFileLinks
(
documentId
);
if
((
Constants
.
TECHNICAL_FILE
.
equals
(
documentVO
.
getDxDocumentExpand
().
getOneLevCategory
())))
{
//TODO: 2024/7/31 4.1 不存在这个方法getWfProcessInst
// DxWfProcessVO wfProcessInstVO = workFlowUtil.getWfProcessInst(documentVO);
...
...
@@ -1214,7 +1214,7 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
*/
@SneakyThrows
@Override
public
void
autoApplicantSign
(
Stri
ng
applicantId
,
Map
<
String
,
Object
>
wfTaskContext
)
{
public
void
autoApplicantSign
(
Lo
ng
applicantId
,
Map
<
String
,
Object
>
wfTaskContext
)
{
DxWfTaskContext
context
=
(
DxWfTaskContext
)
wfTaskContext
.
get
(
"context"
);
SearchQueryCondition
queryCondition
=
SearchUtil
.
buildQueryWithOpenAttr
(
"id"
,
SearchItem
.
Operator
.
EQ
,
applicantId
,
"objFileLinks.target"
);
DxPageImpl
<
ExtApplicantVO
>
recursion
=
extApplicantService
.
findRecursion
(
queryCondition
);
...
...
@@ -1378,7 +1378,7 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
*/
@SneakyThrows
@Override
public
void
autoInterFaceSign
(
Stri
ng
extInterfaceId
,
Map
<
String
,
Object
>
wfTaskContext
)
{
public
void
autoInterFaceSign
(
Lo
ng
extInterfaceId
,
Map
<
String
,
Object
>
wfTaskContext
)
{
//TODO
// DxWfTaskContext context = (DxWfTaskContext) wfTaskContext.get("context");
// SearchQueryCondition queryCondition = SearchUtil.buildQueryWithOpenAttr("id", SearchItem.Operator.EQ, extInterfaceId, "objFileLinks.target");
...
...
dcs-doc-expand-core/src/main/java/com/yonde/dcs/core/util/WorkFlowUtil.java
View file @
52ecd47a
...
...
@@ -2,17 +2,22 @@ package com.yonde.dcs.core.util;
import
com.yonde.dcs.core.constants.SignConstants
;
import
com.yonde.dcs.document.common.entity.vo.DxDocumentVO
;
import
com.yonde.dex.user.common.vo.DxUserInfoVO
;
import
com.yonde.dex.user.feign.DxUserInfoFeign
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessTaskVO
;
import
com.yonde.dex.wfc.common.enums.TaskStateEnum
;
import
com.yonde.dex.wfc.common.vo.*
;
import
com.yonde.dex.wfc.feign.api.WfcProcessFeign
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
java.util.List
;
import
java.util.Map
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* @program: inet-pdm-service
...
...
@@ -34,12 +39,12 @@ public class WorkFlowUtil {
* @param iterationVO
* @return
*/
//
TODO: 2024/8/1 DxIterationVO不存在
// public
WfProcessInst
VO getWfProcessInst(DxIterationVO iterationVO) {
//
TODO
// public
DxWfProcess
VO getWfProcessInst(DxIterationVO iterationVO) {
// DxWfProcessSearchVO wfProcessInstSearchVO = new DxWfProcessSearchVO();
// wfProcessInstSearchVO.setPboClass(iterationVO.getClass().getName());
// wfProcessInstSearchVO.setPboId(iterationVO.getVersionId());
// Page<
WfProcessInst
VO> wfProcessInstVOPage = this.instanceService.getProcessList(wfProcessInstSearchVO, 1, 10);
// Page<
DxWfProcess
VO> wfProcessInstVOPage = this.instanceService.getProcessList(wfProcessInstSearchVO, 1, 10);
// if (!CollectionUtils.isEmpty(wfProcessInstVOPage.getContent())) {
// return wfProcessInstVOPage.getContent().get(0);
// }
...
...
@@ -52,12 +57,12 @@ public class WorkFlowUtil {
* @param doc
* @return
*/
//
TODO: 2024/8/1 getProcessInstList方法不存在
// public
WfProcessInst
VO getWfProcessInst(DxDocumentVO doc) {
//
TODO
// public
DxWfProcess
VO getWfProcessInst(DxDocumentVO doc) {
// WfProcessInstSearchVO wfProcessInstSearchVO = new WfProcessInstSearchVO();
// wfProcessInstSearchVO.setPboClass(DxDocumentVO.class.getName());
// wfProcessInstSearchVO.setPboId(doc.getVersionId());
// Page<
WfProcessInst
VO> wfProcessInstVOPage = this.instanceService.getProcessInstList(wfProcessInstSearchVO, 1, 10);
// Page<
DxWfProcess
VO> wfProcessInstVOPage = this.instanceService.getProcessInstList(wfProcessInstSearchVO, 1, 10);
// if (!CollectionUtils.isEmpty(wfProcessInstVOPage.getContent())) {
// return wfProcessInstVOPage.getContent().get(0);
// }
...
...
@@ -69,17 +74,17 @@ public class WorkFlowUtil {
*
* @param doc
*/
//
TODO: 2024/8/1 getProcessInstList方法不存在
//
TODO
public
Map
<
String
,
List
<
DxWfProcessTaskVO
>>
getWfInfo
(
DxDocumentVO
doc
)
{
//
WfProcessInst
VO wfProcessInstVO = getWfProcessInst(doc);
//
DxWfProcess
VO wfProcessInstVO = getWfProcessInst(doc);
// if (!ObjectUtils.isEmpty(wfProcessInstVO)) {
// WfProcessInfoVO wfProcessInfo = this.instanceService.getProcessInstSimpleDetailById(wfProcessInstVO.getId());
// List<WfProcessTaskVO> historyInfoList = wfProcessInfo.getHistoryInfo();
//
Dx
WfProcessInfoVO wfProcessInfo = this.instanceService.getProcessInstSimpleDetailById(wfProcessInstVO.getId());
// List<
Dx
WfProcessTaskVO> historyInfoList = wfProcessInfo.getHistoryInfo();
//
// List<String> checkResult = Arrays.asList("提交", "通过");
// Map<String, List<WfProcessTaskVO>> wfHistoryMap = historyInfoList.stream().filter(p -> TaskStateEnum.COMPLETE.name().equals(p.getState()) && checkResult.contains(p.getResult()))
// .sorted(Comparator.comparing(WfProcessTaskVO::getEndTime).reversed())
// .collect(Collectors.groupingBy(WfProcessTaskVO::getName));
// Map<String, List<
Dx
WfProcessTaskVO>> wfHistoryMap = historyInfoList.stream().filter(p -> TaskStateEnum.COMPLETE.name().equals(p.getState()) && checkResult.contains(p.getResult()))
// .sorted(Comparator.comparing(
Dx
WfProcessTaskVO::getEndTime).reversed())
// .collect(Collectors.groupingBy(
Dx
WfProcessTaskVO::getName));
//
// return wfHistoryMap;
// }
...
...
@@ -125,34 +130,32 @@ public class WorkFlowUtil {
* @param activityName
* @return
*/
// TODO: 2024/8/1 WfTaskDefinitionVO类不存在
// public String getSignImage(List<WfTaskDefinitionVO> activities, List<String> activityName) {
// for (WfTaskDefinitionVO wf : activities) {
// if (activityName.contains(wf.getTaskName())) {
// return getActivityUserName(wf);
// }
// }
// return " ";
// }
public
String
getSignImage
(
List
<
DxWfActivityVO
>
activities
,
List
<
String
>
activityName
)
{
for
(
DxWfActivityVO
wf
:
activities
)
{
if
(
activityName
.
contains
(
wf
.
getTaskName
()))
{
return
getActivityUserName
(
wf
);
}
}
return
" "
;
}
/**
* 获取用户名称及用户id
*/
// TODO: 2024/8/1 WfTaskDefinitionVO类不存在
// public String getActivityUserName(WfTaskDefinitionVO activity) {
// String str = " ";
// List<WfProcessTaskVO> taskList = activity.getTaskList();
// for (WfProcessTaskVO wf : taskList) {
// if (wf.getState().equals(TaskStateEnum.COMPLETE.name()) && (SignConstants.WfResultList.contains(wf.getResult()))) {
// //获取用户名称和id
// String userName = wf.getAssigneeName();
// String userId = wf.getAssignee();
// UserVO userVO = userService.get(Long.parseLong(userId));
// str = userVO.getUserAccount() + ".png";
// }
// }
// return str;
// }
public
String
getActivityUserName
(
DxWfActivityVO
activity
)
{
String
str
=
" "
;
List
<
DxWfProcessTaskVO
>
taskList
=
activity
.
getTaskList
();
for
(
DxWfProcessTaskVO
wf
:
taskList
)
{
if
(
wf
.
getState
().
equals
(
TaskStateEnum
.
COMPLETE
.
name
())
&&
(
SignConstants
.
WfResultList
.
contains
(
wf
.
getResult
())))
{
//获取用户名称和id
String
userName
=
wf
.
getAssigneeName
();
String
userId
=
wf
.
getAssignee
();
DxUserInfoVO
userVO
=
(
DxUserInfoVO
)
userService
.
get
(
Long
.
parseLong
(
userId
));
str
=
userVO
.
getUserAccount
()
+
".png"
;
}
}
return
str
;
}
/**
* 获取某个环节结束时间
...
...
@@ -161,15 +164,14 @@ public class WorkFlowUtil {
* @param activityName
* @return
*/
// TODO: 2024/8/1 WfTaskDefinitionVO类不存在
// public String getEndDate(List<WfTaskDefinitionVO> activities, List<String> activityName) {
// for (WfTaskDefinitionVO wf : activities) {
// if (activityName.contains(wf.getTaskName())) {
// return Optional.ofNullable(getActiveEndDate(wf)).orElse("");
// }
// }
// return " ";
// }
public
String
getEndDate
(
List
<
DxWfActivityVO
>
activities
,
List
<
String
>
activityName
)
{
for
(
DxWfActivityVO
wf
:
activities
)
{
if
(
activityName
.
contains
(
wf
.
getTaskName
()))
{
return
Optional
.
ofNullable
(
getActiveEndDate
(
wf
)).
orElse
(
""
);
}
}
return
" "
;
}
/**
* 修改后的处理获取日期
...
...
@@ -177,18 +179,17 @@ public class WorkFlowUtil {
* @param activity
* @return
*/
// TODO: 2024/8/1 WfTaskDefinitionVO类不存在
// private String getActiveEndDate(WfTaskDefinitionVO activity) {
// List<WfProcessTaskVO> taskList = activity.getTaskList();
// String date = "";
// SimpleDateFormat dateFm = new SimpleDateFormat("yyyy-MM-dd");
// if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(taskList)) {
// for (WfProcessTaskVO wf : taskList) {
// if (wf.getState().equals(TaskStateEnum.COMPLETE.name()) && (SignConstants.WfResultList.contains(wf.getResult()))) {
// return dateFm.format(wf.getEndTime()).replace(".", "-");
// }
// }
// }
// return date;
// }
private
String
getActiveEndDate
(
DxWfActivityVO
activity
)
{
List
<
DxWfProcessTaskVO
>
taskList
=
activity
.
getTaskList
();
String
date
=
""
;
SimpleDateFormat
dateFm
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
if
(
org
.
apache
.
commons
.
collections4
.
CollectionUtils
.
isNotEmpty
(
taskList
))
{
for
(
DxWfProcessTaskVO
wf
:
taskList
)
{
if
(
wf
.
getState
().
equals
(
TaskStateEnum
.
COMPLETE
.
name
())
&&
(
SignConstants
.
WfResultList
.
contains
(
wf
.
getResult
())))
{
return
dateFm
.
format
(
wf
.
getEndTime
()).
replace
(
"."
,
"-"
);
}
}
}
return
date
;
}
}
dcs-doc-expand-feign/src/main/java/com/yonde/dcs/feign/ExtAutoTaskServiceFeign.java
View file @
52ecd47a
...
...
@@ -24,8 +24,8 @@ import java.util.Map;
@Api
(
tags
=
"ExtAutoTask-FEIGN"
)
@FeignClient
(
value
=
"${dcs.feign.DCS-DOC}"
,
path
=
"/task"
)
public
interface
ExtAutoTaskServiceFeign
{
@ApiOperation
(
value
=
"客户化文档修改状态"
,
notes
=
"客户化文档修改状态"
,
httpMethod
=
"P
U
T"
)
@P
u
tMapping
(
value
=
"/extChangeDocState"
)
@ApiOperation
(
value
=
"客户化文档修改状态"
,
notes
=
"客户化文档修改状态"
,
httpMethod
=
"P
OS
T"
)
@P
os
tMapping
(
value
=
"/extChangeDocState"
)
void
extChangeDocState
(
@RequestBody
DxDocumentVO
documentVO
,
@RequestParam
(
name
=
"state"
)
String
state
);
@ApiOperation
(
value
=
"给选择的提资方人员发放通知"
,
notes
=
"给选择的提资方人员发放通知"
,
httpMethod
=
"POST"
)
...
...
@@ -71,15 +71,15 @@ public interface ExtAutoTaskServiceFeign {
@ApiOperation
(
value
=
"生成NCR审查单word"
,
notes
=
"生成NCR审查单word"
,
httpMethod
=
"POST"
)
@PostMapping
(
value
=
"/generateNcrReviewWord"
)
void
generateNcrReviewWord
(
@RequestParam
(
"documentId"
)
Stri
ng
documentId
,
@RequestBody
Map
<
String
,
Object
>
wfTaskContext
);
void
generateNcrReviewWord
(
@RequestParam
(
"documentId"
)
Lo
ng
documentId
,
@RequestBody
Map
<
String
,
Object
>
wfTaskContext
);
@ApiOperation
(
value
=
"生成word签字"
,
notes
=
"生成word签字"
,
httpMethod
=
"POST"
)
@PostMapping
(
value
=
"/generateDocWordSign"
)
void
generateDocWordSign
(
@RequestParam
(
"documentId"
)
Stri
ng
documentId
,
@RequestBody
Map
<
String
,
Object
>
wfTaskContext
,
@RequestParam
(
"fileName"
)
String
fileName
);
void
generateDocWordSign
(
@RequestParam
(
"documentId"
)
Lo
ng
documentId
,
@RequestBody
Map
<
String
,
Object
>
wfTaskContext
,
@RequestParam
(
"fileName"
)
String
fileName
);
@ApiOperation
(
value
=
"内部接口-保存内部接口信息的总体室、审核签审信息值"
,
notes
=
"内部接口-保存内部接口信息的总体室、审核签审信息值"
,
httpMethod
=
"POST"
)
@PostMapping
(
value
=
"/savedInterfaceWf"
)
void
savedInterfaceWf
(
@RequestParam
(
"documentId"
)
Stri
ng
documentId
,
@RequestBody
Map
<
String
,
Object
>
wfTaskContext
);
void
savedInterfaceWf
(
@RequestParam
(
"documentId"
)
Lo
ng
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
(
@RequestParam
(
"documentId"
)
Stri
ng
documentId
,
@RequestBody
Map
<
String
,
Object
>
wfTaskContext
);
void
generateQHTechDoc
(
@RequestParam
(
"documentId"
)
Lo
ng
documentId
,
@RequestBody
Map
<
String
,
Object
>
wfTaskContext
);
//endProcess
...
...
@@ -105,11 +105,11 @@ public interface ExtAutoTaskServiceFeign {
@ApiOperation
(
value
=
"申请内容 签名"
,
notes
=
"申请内容 签名"
,
httpMethod
=
"POST"
)
@PostMapping
(
value
=
"/autoApplicantSign"
)
void
autoApplicantSign
(
@RequestParam
(
"applicantId"
)
Stri
ng
applicantId
,
@RequestBody
Map
<
String
,
Object
>
wfTaskContext
);
void
autoApplicantSign
(
@RequestParam
(
"applicantId"
)
Lo
ng
applicantId
,
@RequestBody
Map
<
String
,
Object
>
wfTaskContext
);
@ApiOperation
(
value
=
"接口单签名"
,
notes
=
"接口单签名"
,
httpMethod
=
"POST"
)
@PostMapping
(
value
=
"/autoInterFaceSign"
)
void
autoInterFaceSign
(
@RequestParam
(
"extInterfaceId"
)
Stri
ng
extInterfaceId
,
@RequestBody
Map
<
String
,
Object
>
wfTaskContext
);
void
autoInterFaceSign
(
@RequestParam
(
"extInterfaceId"
)
Lo
ng
extInterfaceId
,
@RequestBody
Map
<
String
,
Object
>
wfTaskContext
);
@ApiOperation
(
value
=
"签审对象的终止流程"
,
notes
=
"签审对象的终止流程"
,
httpMethod
=
"POST"
)
@PostMapping
(
value
=
"/autoInterfaceEnd"
)
...
...
pom.xml
View file @
52ecd47a
...
...
@@ -4,7 +4,7 @@
<parent>
<groupId>
com.yonde.dcs
</groupId>
<artifactId>
dcs-integration-dependences
</artifactId>
<version>
4.1-RELEASE
</version>
<version>
4.1-
20240809-
RELEASE
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<packaging>
pom
</packaging>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment