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
1cb95188
Commit
1cb95188
authored
Aug 12, 2024
by
pchxue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
迁移问题处理
parent
52ecd47a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
299 additions
and
158 deletions
+299
-158
ExtDocController.java
.../java/com/yonde/dcs/core/controller/ExtDocController.java
+103
-0
ExtDocService.java
...c/main/java/com/yonde/dcs/core/service/ExtDocService.java
+23
-23
ExtDocServiceImpl.java
...va/com/yonde/dcs/core/service/impl/ExtDocServiceImpl.java
+118
-104
WorkFlowUtil.java
...e/src/main/java/com/yonde/dcs/core/util/WorkFlowUtil.java
+55
-31
No files found.
dcs-doc-expand-core/src/main/java/com/yonde/dcs/core/controller/ExtDocController.java
0 → 100644
View file @
1cb95188
package
com
.
yonde
.
dcs
.
core
.
controller
;
import
com.yonde.dcs.common.vo.ExtReviseVersionVO
;
import
com.yonde.dcs.core.service.ExtDocService
;
import
com.yonde.dcs.document.common.entity.vo.DxDocumentVO
;
import
com.yonde.dcs.entity.po.ExtAtlasDrawingLink
;
import
com.yonde.dex.basedata.entity.api.ApiResult
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.util.List
;
/**
* @program: inet-pdm-service
* @description: 客制化文档接口
* @author: dang wei
* @create: 2021-09-18 13:38
*/
@Api
(
tags
=
{
"客制化文档信息接口"
})
@RestController
@RequestMapping
({
"/DxDocument/ext"
})
//@BasePermission("DCS-DOC:Doc")
public
class
ExtDocController
{
@Autowired
private
ExtDocService
extDocService
;
/**
* 版本升级
*
* @param id
* @param reviseVersionVO
* @return
*/
@ApiOperation
(
"版本升级"
)
@PostMapping
({
"/version/{id}/revise"
})
// @SubPermission({"versionRevise"})
public
ApiResult
reviseDocVersion
(
@PathVariable
Long
id
,
@RequestBody
ExtReviseVersionVO
reviseVersionVO
)
{
DxDocumentVO
dxDocumentVO
=
extDocService
.
reviseDocVersion
(
id
,
reviseVersionVO
);
return
ApiResult
.
ok
(
dxDocumentVO
,
"升版成功"
);
}
/**
* 内部接口提交审阅按钮业务
*
* @param id
* @return
*/
@ApiOperation
(
"内部接口提交审阅按钮"
)
@PostMapping
(
"/submitProcess/{id}"
)
public
ApiResult
submitReview
(
@PathVariable
Long
id
)
{
DxDocumentVO
dxDocumentVO
=
extDocService
.
submitReview
(
id
);
return
ApiResult
.
ok
(
dxDocumentVO
,
"提交审阅成功!"
);
}
/**
* 批量下载图册
*
* @param response
* @param id
* @throws IOException
*/
@ApiOperation
(
value
=
"批量下载"
,
notes
=
"批量下载"
,
httpMethod
=
"GET"
)
@GetMapping
(
value
=
"/batchDownloadDoc"
)
public
void
batchDownloadDoc
(
HttpServletResponse
response
,
@RequestParam
(
"id"
)
Long
id
)
throws
IOException
{
extDocService
.
batchDownloadDoc
(
response
,
id
);
}
/**
* 校验图册图纸
*
* @param drawingLinkList
*/
@ApiOperation
(
value
=
"校验图册图纸"
,
notes
=
"校验图册图纸"
,
httpMethod
=
"POST"
)
@PostMapping
(
value
=
"/checkAtlas"
)
public
ApiResult
checkAtlas
(
@RequestBody
List
<
ExtAtlasDrawingLink
>
drawingLinkList
)
{
String
message
=
extDocService
.
checkAtlas
(
drawingLinkList
);
return
ApiResult
.
ok
(
message
);
}
/**
* 更新文件申请及相关单据
*
* @param documentVO
* @return
*/
@ApiOperation
(
value
=
"更新文件申请及相关单据"
,
notes
=
"更新文件申请及相关单据"
,
httpMethod
=
"POST"
)
@PostMapping
(
value
=
"/updateDocApplication"
)
public
ApiResult
updateDocApplication
(
@RequestBody
DxDocumentVO
documentVO
)
{
DxDocumentVO
dxDocumentVO
=
extDocService
.
updateDocApplication
(
documentVO
);
return
ApiResult
.
ok
(
dxDocumentVO
);
}
@ApiOperation
(
value
=
"获取升版的图册图纸"
,
notes
=
"获取升版的图册图纸"
,
httpMethod
=
"POST"
)
@PostMapping
(
value
=
"/upgradeAtlasDrawing"
)
public
ApiResult
getUpgradeAtlasDrawingList
(
@RequestBody
DxDocumentVO
documentVO
)
{
List
<
DxDocumentVO
>
atlasDrawingList
=
extDocService
.
getUpgradeAtlasDrawingList
(
documentVO
);
return
ApiResult
.
ok
(
atlasDrawingList
);
}
}
dcs-doc-expand-core/src/main/java/com/yonde/dcs/core/service/ExtDocService.java
View file @
1cb95188
...
@@ -4,6 +4,7 @@ import com.yonde.dcs.common.vo.ExtAtlasDrawingLinkVO;
...
@@ -4,6 +4,7 @@ import com.yonde.dcs.common.vo.ExtAtlasDrawingLinkVO;
import
com.yonde.dcs.common.vo.ExtReviseVersionVO
;
import
com.yonde.dcs.common.vo.ExtReviseVersionVO
;
import
com.yonde.dcs.document.common.entity.vo.DxDocumentVO
;
import
com.yonde.dcs.document.common.entity.vo.DxDocumentVO
;
import
com.yonde.dcs.entity.po.ExtAtlasDrawingLink
;
import
com.yonde.dcs.entity.po.ExtAtlasDrawingLink
;
import
com.yonde.dex.wfc.common.vo.DxWfActivityVO
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
...
@@ -111,27 +112,28 @@ public interface ExtDocService {
...
@@ -111,27 +112,28 @@ public interface ExtDocService {
* @param wfProcessInfoVO
* @param wfProcessInfoVO
* @param fileName
* @param fileName
*/
*/
// TODO: 2024/7/31 2.1有WfProcessInfoVO 4.1没有这个VO
void
generateDocWordSign
(
DxDocumentVO
documentVo
,
Class
classType
,
DxWfProcessInfoVO
wfProcessInfoVO
,
String
fileName
);
// void generateDocWordSign(DxDocumentVO documentVo, Class classType, WfProcessInfoVO wfProcessInfoVO, String fileName);
// TODO: 2024/7/31 2.1有WfTaskDefinitionVO 4.1没有这个VO
/**
// /**
* 获取签名图片
// * 获取签名图片
*
// *
* @param activities
// * @param activities
* @param activityName
// * @param activityName
* @return
// * @return
*/
// */
// TODO: xpc 将WfTaskDefinitionVO改为DxWfActivityVO
// String getSignImage(List<WfTaskDefinitionVO> activities, String activityName);
String
getSignImage
(
List
<
DxWfActivityVO
>
activities
,
String
activityName
);
//
// /**
/**
// * 获取签名日期
* 获取签名日期
// *
*
// * @param activities
* @param activities
// * @param activityName
* @param activityName
// * @return
* @return
// */
*/
// String getEndDate(List<WfTaskDefinitionVO> activities, String activityName);
// TODO: xpc 将WfTaskDefinitionVO改为DxWfActivityVO
String
getEndDate
(
List
<
DxWfActivityVO
>
activities
,
String
activityName
);
Boolean
validate
(
DxDocumentVO
documentVO
);
Boolean
validate
(
DxDocumentVO
documentVO
);
...
@@ -143,8 +145,6 @@ public interface ExtDocService {
...
@@ -143,8 +145,6 @@ public interface ExtDocService {
*/
*/
List
<
ExtAtlasDrawingLinkVO
>
recursionAtlasDoc
(
Long
id
);
List
<
ExtAtlasDrawingLinkVO
>
recursionAtlasDoc
(
Long
id
);
void
generateDocWordSign
(
DxDocumentVO
documentVo
,
Class
classType
,
DxWfProcessInfoVO
wfProcessInfoVO
,
String
fileName
);
/**
/**
* 获取升版的图册图纸
* 获取升版的图册图纸
*
*
...
...
dcs-doc-expand-core/src/main/java/com/yonde/dcs/core/service/impl/ExtDocServiceImpl.java
View file @
1cb95188
This diff is collapsed.
Click to expand it.
dcs-doc-expand-core/src/main/java/com/yonde/dcs/core/util/WorkFlowUtil.java
View file @
1cb95188
package
com
.
yonde
.
dcs
.
core
.
util
;
package
com
.
yonde
.
dcs
.
core
.
util
;
import
com.yonde.dcs.core.constants.SignConstants
;
import
com.yonde.dcs.core.constants.SignConstants
;
import
com.yonde.dcs.document.common.entity.vo.DxDocumentVO
;
import
com.yonde.dcs.document.common.entity.vo.DxDocumentVO
;
import
com.yonde.dex.user.common.vo.DxUserInfoVO
;
import
com.yonde.dex.user.common.vo.DxUserInfoVO
;
import
com.yonde.dex.user.feign.DxUserInfoFeign
;
import
com.yonde.dex.user.feign.DxUserInfoFeign
;
import
com.yonde.dex.version.plugin.common.entity.DxIterationVOHolder
;
import
com.yonde.dex.wfc.common.enums.TaskStateEnum
;
import
com.yonde.dex.wfc.common.enums.TaskStateEnum
;
import
com.yonde.dex.wfc.common.vo.*
;
import
com.yonde.dex.wfc.common.vo.DxWfActivityVO
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessSearchVO
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessTaskVO
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessVO
;
import
com.yonde.dex.wfc.feign.api.WfcProcessFeign
;
import
com.yonde.dex.wfc.feign.api.WfcProcessFeign
;
import
com.yonde.dex.wfc.feign.api.WfcTaskFeign
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
...
@@ -31,6 +35,8 @@ public class WorkFlowUtil {
...
@@ -31,6 +35,8 @@ public class WorkFlowUtil {
@Autowired
@Autowired
private
WfcProcessFeign
instanceService
;
private
WfcProcessFeign
instanceService
;
@Autowired
@Autowired
private
WfcTaskFeign
wfcTaskFeign
;
@Autowired
private
DxUserInfoFeign
userService
;
private
DxUserInfoFeign
userService
;
/**
/**
...
@@ -39,17 +45,25 @@ public class WorkFlowUtil {
...
@@ -39,17 +45,25 @@ public class WorkFlowUtil {
* @param iterationVO
* @param iterationVO
* @return
* @return
*/
*/
//TODO
// TODO: 2024/8/1 DxIterationVO不存在
// public DxWfProcessVO getWfProcessInst(DxIterationVO iterationVO) {
// TODO: xpc WfProcessInstVO不存在改为DxWfProcessVO,IterationVO不存在改为DxIterationVOHolder
public
DxWfProcessVO
getWfProcessInst
(
DxIterationVOHolder
iterationVO
)
{
// TODO: getProcessInstList方法不存在改为getProcessList
// DxWfProcessSearchVO wfProcessInstSearchVO = new DxWfProcessSearchVO();
// DxWfProcessSearchVO wfProcessInstSearchVO = new DxWfProcessSearchVO();
// wfProcessInstSearchVO.setPboClass(iterationVO.getClass().getName());
// wfProcessInstSearchVO.setPboClass(iterationVO.getClass().getName());
// wfProcessInstSearchVO.setPboId(iterationVO.getVersionId());
// wfProcessInstSearchVO.setPboId(iterationVO.getVersionId());
// Page<DxWfProcessVO> wfProcessInstVOPage = this.instanceService.getProcessList(wfProcessInstSearchVO, 1, 10);
// Page<WfProcessInstVO> wfProcessInstVOPage = this.instanceService.getProcessList(wfProcessInstSearchVO, 1, 10);
// if (!CollectionUtils.isEmpty(wfProcessInstVOPage.getContent())) {
DxWfProcessSearchVO
dxWfProcessSearchVO
=
new
DxWfProcessSearchVO
();
// return wfProcessInstVOPage.getContent().get(0);
dxWfProcessSearchVO
.
setPboClass
(
iterationVO
.
getClass
().
getName
());
// }
dxWfProcessSearchVO
.
setPboId
(
iterationVO
.
getVersionId
());
// return null;
Page
<
DxWfProcessVO
>
processList
=
instanceService
.
getProcessList
(
dxWfProcessSearchVO
,
1
,
10
);
// }
if
(!
CollectionUtils
.
isEmpty
(
processList
.
getContent
()))
{
return
processList
.
getContent
().
get
(
0
);
}
return
null
;
}
/**
/**
* 获取流程实例
* 获取流程实例
...
@@ -57,37 +71,43 @@ public class WorkFlowUtil {
...
@@ -57,37 +71,43 @@ public class WorkFlowUtil {
* @param doc
* @param doc
* @return
* @return
*/
*/
//TODO
// TODO: xpc WfProcessInstVO不存在改为DxWfProcessVO
// public DxWfProcessVO getWfProcessInst(DxDocumentVO doc) {
public
DxWfProcessVO
getWfProcessInst
(
DxDocumentVO
doc
)
{
// TODO: getProcessInstList方法不存在改为getProcessList
// WfProcessInstSearchVO wfProcessInstSearchVO = new WfProcessInstSearchVO();
// WfProcessInstSearchVO wfProcessInstSearchVO = new WfProcessInstSearchVO();
// wfProcessInstSearchVO.setPboClass(DxDocumentVO.class.getName());
// wfProcessInstSearchVO.setPboClass(DxDocumentVO.class.getName());
// wfProcessInstSearchVO.setPboId(doc.getVersionId());
// wfProcessInstSearchVO.setPboId(doc.getVersionId());
// Page<DxWfProcessVO> wfProcessInstVOPage = this.instanceService.getProcessInstList(wfProcessInstSearchVO, 1, 10);
// Page<WfProcessInstVO> wfProcessInstVOPage = this.instanceService.getProcessInstList(wfProcessInstSearchVO, 1, 10);
// if (!CollectionUtils.isEmpty(wfProcessInstVOPage.getContent())) {
DxWfProcessSearchVO
dxWfProcessSearchVO
=
new
DxWfProcessSearchVO
();
// return wfProcessInstVOPage.getContent().get(0);
dxWfProcessSearchVO
.
setPboClass
(
DxDocumentVO
.
class
.
getName
());
// }
dxWfProcessSearchVO
.
setPboId
(
doc
.
getVersionId
());
// return null;
Page
<
DxWfProcessVO
>
processList
=
instanceService
.
getProcessList
(
dxWfProcessSearchVO
,
1
,
10
);
// }
if
(!
CollectionUtils
.
isEmpty
(
processList
.
getContent
()))
{
return
processList
.
getContent
().
get
(
0
);
}
return
null
;
}
/**
/**
* 通过pbo获取流程实例签审详情信息
* 通过pbo获取流程实例签审详情信息
*
*
* @param doc
* @param doc
*/
*/
//TODO
public
Map
<
String
,
List
<
DxWfProcessTaskVO
>>
getWfInfo
(
DxDocumentVO
doc
)
{
public
Map
<
String
,
List
<
DxWfProcessTaskVO
>>
getWfInfo
(
DxDocumentVO
doc
)
{
// DxWfProcessVO wfProcessInstVO = getWfProcessInst(doc);
// TODO: WfProcessInstVO不存在改为DxWfProcessVO
// if (!ObjectUtils.isEmpty(wfProcessInstVO)) {
DxWfProcessVO
wfProcessInstVO
=
getWfProcessInst
(
doc
);
// DxWfProcessInfoVO wfProcessInfo = this.instanceService.getProcessInstSimpleDetailById(wfProcessInstVO.getId());
if
(!
ObjectUtils
.
isEmpty
(
wfProcessInstVO
))
{
// List<DxWfProcessTaskVO> historyInfoList = wfProcessInfo.getHistoryInfo();
// TODO: xpc getProcessInstList方法不存在,根据逻辑改为getHisTaskList
//
// WfProcessInfoVO wfProcessInfo = this.instanceService.getProcessInstSimpleDetailById(wfProcessInstVO.getId());
// List<String> checkResult = Arrays.asList("提交", "通过");
// List<DxWfProcessTaskVO> historyInfoList = wfProcessInfo.getHistoryInfo();
// Map<String, List<DxWfProcessTaskVO>> wfHistoryMap = historyInfoList.stream().filter(p -> TaskStateEnum.COMPLETE.name().equals(p.getState()) && checkResult.contains(p.getResult()))
Page
<
DxWfProcessTaskVO
>
taskList
=
wfcTaskFeign
.
getHisTaskList
(
wfProcessInstVO
.
getId
(),
null
,
1
,
Integer
.
MAX_VALUE
);
// .sorted(Comparator.comparing(DxWfProcessTaskVO::getEndTime).reversed())
List
<
String
>
checkResult
=
Arrays
.
asList
(
"提交"
,
"通过"
);
// .collect(Collectors.groupingBy(DxWfProcessTaskVO::getName));
Map
<
String
,
List
<
DxWfProcessTaskVO
>>
wfHistoryMap
=
taskList
.
stream
().
filter
(
p
->
TaskStateEnum
.
COMPLETE
.
name
().
equals
(
p
.
getState
())
&&
checkResult
.
contains
(
p
.
getResult
()))
//
.
sorted
(
Comparator
.
comparing
(
DxWfProcessTaskVO:
:
getEndTime
).
reversed
())
// return wfHistoryMap;
.
collect
(
Collectors
.
groupingBy
(
DxWfProcessTaskVO:
:
getName
));
// }
return
wfHistoryMap
;
}
return
null
;
return
null
;
}
}
...
@@ -130,6 +150,7 @@ public class WorkFlowUtil {
...
@@ -130,6 +150,7 @@ public class WorkFlowUtil {
* @param activityName
* @param activityName
* @return
* @return
*/
*/
// TODO: xpc 将WfTaskDefinitionVO改为DxWfActivityVO
public
String
getSignImage
(
List
<
DxWfActivityVO
>
activities
,
List
<
String
>
activityName
)
{
public
String
getSignImage
(
List
<
DxWfActivityVO
>
activities
,
List
<
String
>
activityName
)
{
for
(
DxWfActivityVO
wf
:
activities
)
{
for
(
DxWfActivityVO
wf
:
activities
)
{
if
(
activityName
.
contains
(
wf
.
getTaskName
()))
{
if
(
activityName
.
contains
(
wf
.
getTaskName
()))
{
...
@@ -142,6 +163,7 @@ public class WorkFlowUtil {
...
@@ -142,6 +163,7 @@ public class WorkFlowUtil {
/**
/**
* 获取用户名称及用户id
* 获取用户名称及用户id
*/
*/
// TODO: xpc 将WfTaskDefinitionVO改为DxWfActivityVO
public
String
getActivityUserName
(
DxWfActivityVO
activity
)
{
public
String
getActivityUserName
(
DxWfActivityVO
activity
)
{
String
str
=
" "
;
String
str
=
" "
;
List
<
DxWfProcessTaskVO
>
taskList
=
activity
.
getTaskList
();
List
<
DxWfProcessTaskVO
>
taskList
=
activity
.
getTaskList
();
...
@@ -164,6 +186,7 @@ public class WorkFlowUtil {
...
@@ -164,6 +186,7 @@ public class WorkFlowUtil {
* @param activityName
* @param activityName
* @return
* @return
*/
*/
// TODO: xpc 将WfTaskDefinitionVO改为DxWfActivityVO
public
String
getEndDate
(
List
<
DxWfActivityVO
>
activities
,
List
<
String
>
activityName
)
{
public
String
getEndDate
(
List
<
DxWfActivityVO
>
activities
,
List
<
String
>
activityName
)
{
for
(
DxWfActivityVO
wf
:
activities
)
{
for
(
DxWfActivityVO
wf
:
activities
)
{
if
(
activityName
.
contains
(
wf
.
getTaskName
()))
{
if
(
activityName
.
contains
(
wf
.
getTaskName
()))
{
...
@@ -179,6 +202,7 @@ public class WorkFlowUtil {
...
@@ -179,6 +202,7 @@ public class WorkFlowUtil {
* @param activity
* @param activity
* @return
* @return
*/
*/
// TODO: xpc 将WfTaskDefinitionVO改为DxWfActivityVO
private
String
getActiveEndDate
(
DxWfActivityVO
activity
)
{
private
String
getActiveEndDate
(
DxWfActivityVO
activity
)
{
List
<
DxWfProcessTaskVO
>
taskList
=
activity
.
getTaskList
();
List
<
DxWfProcessTaskVO
>
taskList
=
activity
.
getTaskList
();
String
date
=
""
;
String
date
=
""
;
...
...
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