@@ -2,6 +2,7 @@ | |||||
<project version="4"> | <project version="4"> | ||||
<component name="CompilerConfiguration"> | <component name="CompilerConfiguration"> | ||||
<annotationProcessing> | <annotationProcessing> | ||||
<profile default="true" name="Default" enabled="true" /> | |||||
<profile name="Maven default annotation processors profile" enabled="true"> | <profile name="Maven default annotation processors profile" enabled="true"> | ||||
<sourceOutputDir name="target/generated-sources/annotations" /> | <sourceOutputDir name="target/generated-sources/annotations" /> | ||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" /> | <sourceTestOutputDir name="target/generated-test-sources/test-annotations" /> | ||||
@@ -8,5 +8,5 @@ | |||||
</list> | </list> | ||||
</option> | </option> | ||||
</component> | </component> | ||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK" /> | |||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" /> | |||||
</project> | </project> |
@@ -0,0 +1,3 @@ | |||||
U | |||||
java:S1118":Add a private constructor to hide the implicit public one.(áÛ«îýÿÿÿÿ |
@@ -0,0 +1,3 @@ | |||||
U | |||||
java:S1118":Add a private constructor to hide the implicit public one.(±ÎÞèýÿÿÿÿ |
@@ -0,0 +1,95 @@ | |||||
o | |||||
java:S1192„"SDefine a constant instead of duplicating this literal "Unexpected value: " 3 times.(¡þé£üÿÿÿÿ | |||||
n | |||||
java:S1192Ä"WDefine a constant instead of duplicating this literal "状æ€�机执行失败!" 3 times.(¨¾¦ø | |||||
e | |||||
java:S1192—"IDefine a constant instead of duplicating this literal "approve_" 5 times.(¢¡öñüÿÿÿÿ | |||||
t java:S135È"YReduce the total number of break and continue statements in this loop to use at most one.(ÃŽÍÎþÿÿÿÿ | |||||
A | |||||
java:S5411Å"*Use the primitive boolean expression here.(•„¹¾ | |||||
Z | |||||
java:S2583Å"CChange this condition so that it does not always evaluate to "true"(•„¹¾ | |||||
W java:S125ƒ"<This block of commented-out lines of code should be removed.(³ŽàÜøÿÿÿÿ | |||||
W java:S125ª"<This block of commented-out lines of code should be removed.(³ŽàÜøÿÿÿÿ | |||||
W java:S125Ù"<This block of commented-out lines of code should be removed.(“¸»ûÿÿÿÿ | |||||
R java:S125Û"<This block of commented-out lines of code should be removed.(�³Ÿˆ | |||||
Q | |||||
java:S6213–":Rename this variable to not match a restricted identifier.(˜Š¡© | |||||
b | |||||
java:S3252œ"FUse static access with "com.alibaba.fastjson.JSON" for "toJSONString".(ÖÔÿ‹øÿÿÿÿ | |||||
N | |||||
java:S1135¢"2Complete the task associated to this TODO comment.(©†î¿ÿÿÿÿÿ | |||||
[ | |||||
java:S1854ë"?Remove this useless assignment to local variable "projectName".(Ϥõ…ûÿÿÿÿ | |||||
\ | |||||
java:S1854ç"ERemove this useless assignment to local variable "processInstanceId".(ËŽÿð | |||||
M | |||||
java:S1481ç"6Remove this unused "processInstanceId" local variable.(ËŽÿð | |||||
L | |||||
java:S1481ë"0Remove this unused "projectName" local variable.(Ϥõ…ûÿÿÿÿ | |||||
Q | |||||
java:S6213í":Rename this variable to not match a restricted identifier.(˜Š¡© | |||||
b | |||||
java:S3252ó"FUse static access with "com.alibaba.fastjson.JSON" for "toJSONString".(ÖÔÿ‹øÿÿÿÿ | |||||
N | |||||
java:S1135õ"2Complete the task associated to this TODO comment.(Ü™´æúÿÿÿÿ | |||||
N | |||||
java:S1135÷"2Complete the task associated to this TODO comment.(üʸßüÿÿÿÿ | |||||
Q | |||||
java:S6213‰":Rename this variable to not match a restricted identifier.(˜Š¡© | |||||
b | |||||
java:S3252�"FUse static access with "com.alibaba.fastjson.JSON" for "toJSONString".(ÖÔÿ‹øÿÿÿÿ | |||||
N | |||||
java:S1135©"2Complete the task associated to this TODO comment.(Ä‹µëûÿÿÿÿ | |||||
N | |||||
java:S1135Ò"2Complete the task associated to this TODO comment.(‘¢Èýÿÿÿÿ | |||||
I | |||||
java:S1135¬"2Complete the task associated to this TODO comment.(•Øþ� | |||||
I | |||||
java:S1135Ï"2Complete the task associated to this TODO comment.(•Øþ� | |||||
k | |||||
java:S3252ç"OUse static access with "cn.hutool.core.text.CharSequenceUtil" for "isNotBlank".(¥‚°€ýÿÿÿÿ | |||||
[ | |||||
java:S1854€"?Remove this useless assignment to local variable "projectName".(Ϥõ…ûÿÿÿÿ | |||||
] | |||||
java:S1854¸"ARemove this useless assignment to local variable "currentUserId".(þÅøÜùÿÿÿÿ | |||||
\ | |||||
java:S1854¶"@Remove this useless assignment to local variable "beforeUserId".(©ï¿‹ýÿÿÿÿ | |||||
L | |||||
java:S1481€"0Remove this unused "projectName" local variable.(Ϥõ…ûÿÿÿÿ | |||||
I | |||||
java:S1135Œ"2Complete the task associated to this TODO comment.(¥ÿ¬¾ | |||||
M | |||||
java:S1481¶"1Remove this unused "beforeUserId" local variable.(©ï¿‹ýÿÿÿÿ | |||||
N | |||||
java:S1481¸"2Remove this unused "currentUserId" local variable.(þÅøÜùÿÿÿÿ | |||||
W java:S125¹"<This block of commented-out lines of code should be removed.(ï–õ‡þÿÿÿÿ | |||||
I | |||||
java:S1135Ã"2Complete the task associated to this TODO comment.(®–˜ˆ | |||||
b | |||||
java:S3252�"FUse static access with "com.alibaba.fastjson.JSON" for "toJSONString".(ÖÔÿ‹øÿÿÿÿ | |||||
I | |||||
java:S1135¢"2Complete the task associated to this TODO comment.(æ·â® | |||||
W java:S125Ð"<This block of commented-out lines of code should be removed.(åÔÙÍýÿÿÿÿ | |||||
N | |||||
java:S1135Ù"2Complete the task associated to this TODO comment.(«¾Òýÿÿÿÿ | |||||
W java:S125õ"<This block of commented-out lines of code should be removed.(˜€ÔÑýÿÿÿÿ | |||||
I | |||||
java:S2201‘"+The return value of "collect" must be used.(Ú¿±ì8œß²úæ0 | |||||
? | |||||
java:S3864‘"!Remove this use of "Stream.peek".(Ú¿±ì8�ß²úæ0 | |||||
\ | |||||
java:S3252µ"EUse static access with "com.alibaba.fastjson.JSON" for "parseObject".(ÿ�€Ú | |||||
N | |||||
java:S2201Ù"+The return value of "collect" must be used.(ÔûÙøúÿÿÿÿ8²ß²úæ0 | |||||
D | |||||
java:S3864Ù"!Remove this use of "Stream.peek".(ÔûÙøúÿÿÿÿ8³ß²úæ0 | |||||
M | |||||
java:S1172Þ"1Remove this unused method parameter "instanceId".(™ÃÉþÿÿÿÿ | |||||
W java:S125ì"<This block of commented-out lines of code should be removed.(³ŽàÜøÿÿÿÿ | |||||
W java:S125”"<This block of commented-out lines of code should be removed.(³ŽàÜøÿÿÿÿ | |||||
R java:S125É"<This block of commented-out lines of code should be removed.(ÝÎÞÁ | |||||
W java:S125ð"<This block of commented-out lines of code should be removed.(³ŽàÜøÿÿÿÿ | |||||
W java:S125£ "<This block of commented-out lines of code should be removed.(“¸»ûÿÿÿÿ | |||||
W java:S125Ë "<This block of commented-out lines of code should be removed.(³ŽàÜøÿÿÿÿ |
@@ -0,0 +1,3 @@ | |||||
\ | |||||
java:S1128"ARemove this unused import 'javax.validation.constraints.NotNull'.(áç¥ãüÿÿÿÿ |
@@ -0,0 +1,5 @@ | |||||
B | |||||
java:S1602s",Remove useless curly braces around statement(Ƙ¸ƒ | |||||
O | |||||
java:S1128"-Remove this unused import 'java.util.Arrays'.(î–˜Éüÿÿÿÿ8¼�¨ùæ0 |
@@ -0,0 +1,5 @@ | |||||
f | |||||
java:S1128"IRemove this unused import 'com.wflow.workflow.bean.vo.ProcessInstanceVo'.(†å˜¯8¬ûøæ0 | |||||
b | |||||
java:S1128"ERemove this unused import 'com.wflow.workflow.bean.vo.ProcessTaskVo'.(�ÑÇù8¬ûøæ0 |
@@ -0,0 +1,15 @@ | |||||
\ | |||||
java:S1118(":Add a private constructor to hide the implicit public one.(¬º‹×ûÿÿÿÿ8Ý´ûãæ0 | |||||
h | |||||
java:S3776R"RRefactor this method to reduce its Cognitive Complexity from 18 to the 15 allowed.(§°¯î | |||||
^ | |||||
java:S3252\"HUse static access with "com.alibaba.excel.EasyExcelFactory" for "write".( òŸ€ | |||||
c | |||||
java:S3252^"HUse static access with "com.alibaba.excel.EasyExcelFactory" for "write".(µû•Ðÿÿÿÿÿ | |||||
d | |||||
java:S3252n"NUse static access with "com.alibaba.excel.EasyExcelFactory" for "writerSheet".(ìç±Ú | |||||
” | |||||
java:S1130…"}Remove the declaration of thrown exception 'java.io.UnsupportedEncodingException', as it cannot be thrown from method's body.(±®ðÚ | |||||
] | |||||
java:S6213”":Rename this variable to not match a restricted identifier.(ÿ‚Î×þÿÿÿÿ8�õøãæ0 |
@@ -0,0 +1,72 @@ | |||||
\ java:S112•"FDefine and throw a dedicated exception instead of using a generic one.( ÐÇï | |||||
a java:S112§"FDefine and throw a dedicated exception instead of using a generic one.(ˆòóµùÿÿÿÿ | |||||
a java:S112Æ"FDefine and throw a dedicated exception instead of using a generic one.(ËÿÜÎÿÿÿÿÿ | |||||
a | |||||
java:S1192c"KDefine a constant instead of duplicating this literal "HmacSHA256" 4 times.(öüõî | |||||
a | |||||
java:S1192n"FDefine a constant instead of duplicating this literal "UTF-8" 5 times.(»”ýªüÿÿÿÿ | |||||
k java:S117?"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(³×ߢúÿÿÿÿ | |||||
K | |||||
java:S1191"5Use classes from the Java API instead of Sun classes.(—øÛÖ | |||||
] | |||||
java:S2259ý"AA "NullPointerException" could be thrown; "fin" is nullable here.(µö¹šúÿÿÿÿ | |||||
m | |||||
java:S2095ê"QUse try-with-resources or close this "BufferedInputStream" in a "finally" clause.(ˆ£Þðþÿÿÿÿ | |||||
j | |||||
java:S2095ž"NUse try-with-resources or close this "FileOutputStream" in a "finally" clause.(ÖŽ“¯úÿÿÿÿ | |||||
n | |||||
java:S2095Ÿ"RUse try-with-resources or close this "BufferedOutputStream" in a "finally" clause.(㨿®þÿÿÿÿ | |||||
j | |||||
java:S3008("TRename this field "ProjectID" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(Šõö· | |||||
n | |||||
java:S3008)"XRename this field "ProjectSecret" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ôØÚ¬ | |||||
Q java:S125""<This block of commented-out lines of code should be removed.(¹ä¶¢ | |||||
‡ | |||||
java:S1130/"lRemove the declaration of thrown exception 'java.lang.Exception', as it cannot be thrown from method's body.(ÙؤÞýÿÿÿÿ | |||||
\ | |||||
java:S1075@"ARefactor your code to get this URI from a customizable parameter.(«é¥™øÿÿÿÿ | |||||
Q java:S125H"<This block of commented-out lines of code should be removed.(ÅøúÈ | |||||
P java:S125h"<This block of commented-out lines of code should be removed.(…‘ïs | |||||
N java:S106m"9Replace this use of System.out or System.err by a logger.(àÙø¼ | |||||
T | |||||
java:S4719n"9Replace charset name argument with StandardCharsets.UTF_8(»”ýªüÿÿÿÿ | |||||
Q java:S125q"<This block of commented-out lines of code should be removed.(իз | |||||
O java:S106‡"9Replace this use of System.out or System.err by a logger.(…¢üÔ | |||||
O java:S106‰"9Replace this use of System.out or System.err by a logger.(…¢üÔ | |||||
P | |||||
java:S4719�"9Replace charset name argument with StandardCharsets.UTF_8(ÄÌ ¯ | |||||
O java:S106�"9Replace this use of System.out or System.err by a logger.(µ³õ’ | |||||
P | |||||
java:S4719š"9Replace charset name argument with StandardCharsets.UTF_8(Å¡Ö° | |||||
U | |||||
java:S4719¬"9Replace charset name argument with StandardCharsets.UTF_8(÷�‚ßþÿÿÿÿ | |||||
A | |||||
java:S1197º"*Move the array designators [] to the type.(ˆö�ì | |||||
i java:S100â"NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(åñÜýÿÿÿÿ | |||||
H | |||||
java:S1481ã",Remove this unused "encoder" local variable.(Ã�‰˜üÿÿÿÿ | |||||
W java:S125÷"<This block of commented-out lines of code should be removed.(óºõŒýÿÿÿÿ | |||||
F | |||||
java:S2093è"*Change this "try" to a try-with-resources.(¡»¢üùÿÿÿÿ | |||||
R java:S125«"<This block of commented-out lines of code should be removed.(›�ÎŒ | |||||
F | |||||
java:S2093•"*Change this "try" to a try-with-resources.(¡»¢üùÿÿÿÿ | |||||
_ | |||||
java:S5361Ã"HReplace this call to "replaceAll()" by a call to the "replace()" method.(ç†ö» | |||||
_ | |||||
java:S5361Ã"HReplace this call to "replaceAll()" by a call to the "replace()" method.(ç†ö» | |||||
_ | |||||
java:S5361Ã"HReplace this call to "replaceAll()" by a call to the "replace()" method.(ç†ö» | |||||
_ | |||||
java:S5361Ã"HReplace this call to "replaceAll()" by a call to the "replace()" method.(ç†ö» | |||||
_ | |||||
java:S5361Ã"HReplace this call to "replaceAll()" by a call to the "replace()" method.(ç†ö» | |||||
_ | |||||
java:S5361Ã"HReplace this call to "replaceAll()" by a call to the "replace()" method.(ç†ö» | |||||
_ | |||||
java:S5361Ã"HReplace this call to "replaceAll()" by a call to the "replace()" method.(ç†ö» | |||||
_ | |||||
java:S5361Ã"HReplace this call to "replaceAll()" by a call to the "replace()" method.(ç†ö» | |||||
F | |||||
java:S1144§"*Remove this unused private "sign1" method.(ˆòóµùÿÿÿÿ |
@@ -0,0 +1,5 @@ | |||||
t | |||||
java:S1488u"^Immediately return this expression instead of assigning it to the temporary variable "result".(ë™©Ý | |||||
z | |||||
java:S1488�"^Immediately return this expression instead of assigning it to the temporary variable "result".(©¶üÈúÿÿÿÿ |
@@ -0,0 +1,3 @@ | |||||
X | |||||
java:S1214"CMove constants defined in this interfaces to another class or enum.(Ôô• |
@@ -0,0 +1,31 @@ | |||||
{ | |||||
Ksrc/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectListReq.java,4\d\4d181ee0ef35161a71fa355047c13e9ab5aa4793 | |||||
… | |||||
Usrc/main/java/com/ningdatech/pmapi/todocenter/model/dto/req/ReqProcessHandlerDTO.java,3\a\3a29a241dcf97a75f4de88a48dacd988a7193f67 | |||||
€ | |||||
Psrc/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectLibListItemVO.java,0\3\032c44040c9d507864de35d7170661addf623095 | |||||
v | |||||
Fsrc/main/java/com/ningdatech/pmapi/common/constant/CommonConstant.java,0\2\02999ca52b20720a6dba73a2ea57a018dba90084 | |||||
q | |||||
Asrc/main/java/com/ningdatech/pmapi/common/util/ExcelDownUtil.java,d\3\d39b8ec842398247637f12ea4caf897c9a0a8463 | |||||
v | |||||
Fsrc/main/java/com/ningdatech/pmapi/todocenter/constant/WorkNotice.java,f\1\f1ece2c596126c2753f07e9c33ac1dee153eca7c | |||||
} | |||||
Msrc/main/java/com/ningdatech/pmapi/user/service/impl/UserInfoServiceImpl.java,b\7\b7eec6c95fd743ceb0853f62f1870e78ac47fa1d | |||||
u | |||||
Esrc/main/java/com/ningdatech/pmapi/user/service/IUserInfoService.java,e\4\e427e2fbf9cff46a15e651e8759e4487828aaa90 | |||||
w | |||||
Gsrc/main/java/com/ningdatech/pmapi/projectlib/helper/ProjectHelper.java,0\0\002597a7f172f343a6cffcd273be74aa895d74b3 | |||||
z | |||||
Jsrc/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java,9\2\92bb80058f98a2589a95655e976c4c3b31905e3f | |||||
‚ | |||||
Rsrc/main/java/com/ningdatech/pmapi/todocenter/controller/TodoCenterController.java,e\c\ecd8157d3ccb289d327361f90fcef4d14eddb335 | |||||
� | |||||
Qsrc/main/java/com/ningdatech/pmapi/todocenter/model/dto/req/ToBeProcessedReq.java,8\c\8c928fdb02a7d0f06b9a34c0b545a00ddf44aab7 | |||||
z | |||||
Jsrc/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java,7\a\7a4df0ff8172ed96c29e54029f6ecac024700aa5 | |||||
‚ | |||||
Rsrc/main/java/com/ningdatech/pmapi/todocenter/model/dto/vo/ResToBeProcessedVO.java,a\9\a90097c62f2d5eef81300bceaa14afa9559ec829 | |||||
n | |||||
>src/main/java/com/ningdatech/pmapi/irs/sign/IRSAPIRequest.java,d\7\d7146276b7a0a780dc7631a29b70c58f9c37fac3 |
@@ -1,70 +0,0 @@ | |||||
package com.ningdatech.pmapi.todocenter.bean.entity; | |||||
import com.ningdatech.pmapi.todocenter.bean.vo.ProgressNodeAuditInfoVo; | |||||
import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; | |||||
import com.wflow.workflow.bean.process.enums.ApprovalModeEnum; | |||||
import com.wflow.workflow.bean.process.enums.NodeTypeEnum; | |||||
import com.wflow.workflow.enums.ProcessHandlerEnum; | |||||
import lombok.AllArgsConstructor; | |||||
import lombok.Builder; | |||||
import lombok.Data; | |||||
import lombok.NoArgsConstructor; | |||||
import java.util.Date; | |||||
/** | |||||
* 流程节点实体 | |||||
* | |||||
* @author CMM | |||||
* @since 2023/01/31 12:24 | |||||
*/ | |||||
@Data | |||||
@Builder | |||||
@AllArgsConstructor | |||||
@NoArgsConstructor | |||||
public class ProgressNode { | |||||
/** | |||||
* 节点ID | |||||
*/ | |||||
private String nodeId; | |||||
/** | |||||
* 任务ID | |||||
*/ | |||||
private String taskId; | |||||
/** | |||||
* 审批类型 | |||||
*/ | |||||
private ApprovalModeEnum approvalMode; | |||||
/** | |||||
* 节点类型 | |||||
*/ | |||||
private NodeTypeEnum nodeType; | |||||
/** | |||||
* 节点名称 | |||||
*/ | |||||
private String name; | |||||
/** | |||||
* 节点相关人员 | |||||
*/ | |||||
private ProcessInstanceUserDto user; | |||||
/** | |||||
* 该节点动作操作类型 | |||||
*/ | |||||
private ProcessHandlerEnum action; | |||||
/** | |||||
* 审核信息 | |||||
*/ | |||||
private ProgressNodeAuditInfoVo auditInfo; | |||||
/** | |||||
* 处理结果 | |||||
*/ | |||||
private ProcessHandlerEnum result; | |||||
/** | |||||
* 开始时间 | |||||
*/ | |||||
private Date startTime; | |||||
/** | |||||
* 结束时间 | |||||
*/ | |||||
private Date finishTime; | |||||
} |
@@ -1,19 +1,13 @@ | |||||
package com.ningdatech.pmapi.todocenter.bean.vo; | package com.ningdatech.pmapi.todocenter.bean.vo; | ||||
import com.ningdatech.pmapi.todocenter.bean.entity.ProgressNode; | |||||
import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; | import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; | ||||
import com.wflow.workflow.bean.process.form.Form; | |||||
import com.wflow.workflow.bean.vo.ProcessProgressVo; | |||||
import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||
import lombok.Builder; | import lombok.Builder; | ||||
import lombok.Data; | import lombok.Data; | ||||
import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||
import java.util.Date; | |||||
import java.util.List; | |||||
import java.util.Map; | |||||
/** | /** | ||||
* 流程进展详情实体 | * 流程进展详情实体 | ||||
* | * | ||||
@@ -25,44 +19,19 @@ import java.util.Map; | |||||
@AllArgsConstructor | @AllArgsConstructor | ||||
@NoArgsConstructor | @NoArgsConstructor | ||||
public class ProcessProgressDetailVo { | public class ProcessProgressDetailVo { | ||||
/** | /** | ||||
* 审批实例ID | |||||
*/ | |||||
private String instanceId; | |||||
/** | |||||
* 表单配置项 | |||||
*/ | |||||
private List<Form> formItems; | |||||
/** | |||||
* 表单值 | |||||
*/ | |||||
private Map<String, Object> formData; | |||||
/** | |||||
* 流程进度步骤 | |||||
*/ | |||||
private List<ProgressNode> progress; | |||||
/** | |||||
* 流程定义名称 | |||||
*/ | |||||
private String processDefName; | |||||
/** | |||||
* 版本 | |||||
* 流程处理详情 | |||||
*/ | */ | ||||
private Integer version; | |||||
private ProcessProgressVo processProgressVo; | |||||
/** | /** | ||||
* 流程状态 | * 流程状态 | ||||
*/ | */ | ||||
private String status; | private String status; | ||||
/** | /** | ||||
* 流程结果 | |||||
*/ | |||||
private String result; | |||||
/** | |||||
* 发起人 | * 发起人 | ||||
*/ | */ | ||||
private ProcessInstanceUserDto startUser; | private ProcessInstanceUserDto startUser; | ||||
/** | |||||
* 发起时间 | |||||
*/ | |||||
private Date startTime; | |||||
} | } |
@@ -1,41 +0,0 @@ | |||||
package com.ningdatech.pmapi.todocenter.bean.vo; | |||||
import com.ningdatech.pmapi.todocenter.bean.entity.ProcessComment; | |||||
import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.AllArgsConstructor; | |||||
import lombok.Builder; | |||||
import lombok.Data; | |||||
import lombok.NoArgsConstructor; | |||||
import java.util.Date; | |||||
/** | |||||
* 流程节点审核信息 | |||||
* | |||||
* @author CMM | |||||
* @since 2023/02/01 16:52 | |||||
*/ | |||||
@Data | |||||
@NoArgsConstructor | |||||
@AllArgsConstructor | |||||
@Builder | |||||
public class ProgressNodeAuditInfoVo extends ProcessComment { | |||||
@ApiModelProperty("评论ID") | |||||
private String id; | |||||
@ApiModelProperty("评论") | |||||
private String type; | |||||
@ApiModelProperty("任务ID") | |||||
private String taskId; | |||||
@ApiModelProperty("评论类型") | |||||
private String commentType; | |||||
@ApiModelProperty("评论用户信息") | |||||
private ProcessInstanceUserDto user; | |||||
@ApiModelProperty("评论时间") | |||||
private Date createTime; | |||||
} |
@@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.ningdatech.basic.exception.BizException; | import com.ningdatech.basic.exception.BizException; | ||||
import com.ningdatech.basic.model.PageVo; | import com.ningdatech.basic.model.PageVo; | ||||
import com.ningdatech.basic.util.NdDateUtils; | |||||
import com.ningdatech.pmapi.common.constant.CommonConstant; | import com.ningdatech.pmapi.common.constant.CommonConstant; | ||||
import com.ningdatech.pmapi.common.model.entity.ExcelExportWriter; | import com.ningdatech.pmapi.common.model.entity.ExcelExportWriter; | ||||
import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent; | import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent; | ||||
@@ -24,10 +23,8 @@ import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; | |||||
import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; | import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; | ||||
import com.ningdatech.pmapi.projectlib.service.IProjectService; | import com.ningdatech.pmapi.projectlib.service.IProjectService; | ||||
import com.ningdatech.pmapi.todocenter.bean.entity.ProcessComment; | import com.ningdatech.pmapi.todocenter.bean.entity.ProcessComment; | ||||
import com.ningdatech.pmapi.todocenter.bean.entity.ProgressNode; | |||||
import com.ningdatech.pmapi.todocenter.bean.entity.WorkNoticeInfo; | import com.ningdatech.pmapi.todocenter.bean.entity.WorkNoticeInfo; | ||||
import com.ningdatech.pmapi.todocenter.bean.vo.ProcessProgressDetailVo; | import com.ningdatech.pmapi.todocenter.bean.vo.ProcessProgressDetailVo; | ||||
import com.ningdatech.pmapi.todocenter.bean.vo.ProgressNodeAuditInfoVo; | |||||
import com.ningdatech.pmapi.todocenter.enumeration.IsAppendProjectEnum; | import com.ningdatech.pmapi.todocenter.enumeration.IsAppendProjectEnum; | ||||
import com.ningdatech.pmapi.todocenter.extension.cmd.BackToHisApprovalNodeCmd; | import com.ningdatech.pmapi.todocenter.extension.cmd.BackToHisApprovalNodeCmd; | ||||
import com.ningdatech.pmapi.todocenter.extension.cmd.SaveCommentCmd; | import com.ningdatech.pmapi.todocenter.extension.cmd.SaveCommentCmd; | ||||
@@ -40,22 +37,20 @@ import com.ningdatech.pmapi.user.entity.UserInfo; | |||||
import com.ningdatech.pmapi.user.service.IUserInfoService; | import com.ningdatech.pmapi.user.service.IUserInfoService; | ||||
import com.ningdatech.zwdd.client.ZwddClient; | import com.ningdatech.zwdd.client.ZwddClient; | ||||
import com.wflow.bean.entity.WflowCcTasks; | import com.wflow.bean.entity.WflowCcTasks; | ||||
import com.wflow.bean.entity.WflowModelHistorys; | |||||
import com.wflow.bean.entity.WflowModels; | import com.wflow.bean.entity.WflowModels; | ||||
import com.wflow.contants.HisProInsEndActId; | import com.wflow.contants.HisProInsEndActId; | ||||
import com.wflow.exception.BusinessException; | import com.wflow.exception.BusinessException; | ||||
import com.wflow.mapper.WflowCcTasksMapper; | import com.wflow.mapper.WflowCcTasksMapper; | ||||
import com.wflow.mapper.WflowModelHistorysMapper; | import com.wflow.mapper.WflowModelHistorysMapper; | ||||
import com.wflow.utils.CodeUtil; | |||||
import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; | import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; | ||||
import com.wflow.workflow.bean.process.ProcessNode; | |||||
import com.wflow.workflow.bean.process.ProgressNode; | |||||
import com.wflow.workflow.bean.process.enums.ApprovalModeEnum; | import com.wflow.workflow.bean.process.enums.ApprovalModeEnum; | ||||
import com.wflow.workflow.bean.process.enums.NodeTypeEnum; | import com.wflow.workflow.bean.process.enums.NodeTypeEnum; | ||||
import com.wflow.workflow.bean.process.form.Form; | |||||
import com.wflow.workflow.bean.process.props.ApprovalProps; | import com.wflow.workflow.bean.process.props.ApprovalProps; | ||||
import com.wflow.workflow.bean.vo.ProcessInstanceVo; | import com.wflow.workflow.bean.vo.ProcessInstanceVo; | ||||
import com.wflow.workflow.bean.vo.ProcessProgressVo; | |||||
import com.wflow.workflow.bean.vo.ProcessTaskVo; | import com.wflow.workflow.bean.vo.ProcessTaskVo; | ||||
import com.wflow.workflow.config.WflowGlobalVarDef; | |||||
import com.wflow.workflow.bean.vo.ProgressNodeAuditInfoVo; | |||||
import com.wflow.workflow.enums.ProcessHandlerEnum; | import com.wflow.workflow.enums.ProcessHandlerEnum; | ||||
import com.wflow.workflow.enums.ProcessStatusEnum; | import com.wflow.workflow.enums.ProcessStatusEnum; | ||||
import com.wflow.workflow.service.*; | import com.wflow.workflow.service.*; | ||||
@@ -72,14 +67,12 @@ import org.flowable.engine.runtime.ActivityInstance; | |||||
import org.flowable.engine.runtime.Execution; | import org.flowable.engine.runtime.Execution; | ||||
import org.flowable.engine.task.Comment; | import org.flowable.engine.task.Comment; | ||||
import org.flowable.task.api.Task; | import org.flowable.task.api.Task; | ||||
import org.flowable.task.api.TaskInfo; | |||||
import org.flowable.task.api.history.HistoricTaskInstance; | import org.flowable.task.api.history.HistoricTaskInstance; | ||||
import org.flowable.variable.api.history.HistoricVariableInstance; | import org.flowable.variable.api.history.HistoricVariableInstance; | ||||
import org.springframework.beans.BeanUtils; | import org.springframework.beans.BeanUtils; | ||||
import org.springframework.stereotype.Component; | import org.springframework.stereotype.Component; | ||||
import javax.servlet.http.HttpServletResponse; | import javax.servlet.http.HttpServletResponse; | ||||
import java.time.LocalDateTime; | import java.time.LocalDateTime; | ||||
import java.time.format.DateTimeFormatter; | |||||
import java.util.*; | import java.util.*; | ||||
import java.util.stream.Collectors; | import java.util.stream.Collectors; | ||||
@@ -816,183 +809,25 @@ public class TodoCenterManage { | |||||
* @return 流程进度及表单详情 | * @return 流程进度及表单详情 | ||||
*/ | */ | ||||
public ProcessProgressDetailVo getProcessDetail(String instanceId, Long projectId) { | public ProcessProgressDetailVo getProcessDetail(String instanceId, Long projectId) { | ||||
HistoricProcessInstance instance = historyService.createHistoricProcessInstanceQuery() | |||||
.processInstanceId(instanceId) | |||||
.singleResult(); | |||||
// 取表单及表单数据 | |||||
HistoricVariableInstance forms = historyService.createHistoricVariableInstanceQuery() | |||||
.processInstanceId(instanceId) | |||||
.variableName(WflowGlobalVarDef.WFLOW_FORMS) | |||||
.singleResult(); | |||||
List<HistoricVariableInstance> formDatas = null; | |||||
List<HistoricTaskInstance> historicTaskInstances = historyService.createHistoricTaskInstanceQuery() | |||||
.processInstanceId(instanceId).list(); | |||||
formDatas = historyService.createHistoricVariableInstanceQuery() | |||||
.executionIds(historicTaskInstances.stream() | |||||
.map(HistoricTaskInstance::getExecutionId) | |||||
.collect(Collectors.toSet())) | |||||
.processInstanceId(instanceId).list(); | |||||
// 取节点设置 | |||||
HistoricVariableInstance nodeProps = historyService.createHistoricVariableInstanceQuery() | |||||
.processInstanceId(instanceId).variableName(WflowGlobalVarDef.WFLOW_NODE_PROPS).singleResult(); | |||||
Map<String, Object> nodePropsValue = (Map<String, Object>) nodeProps.getValue(); | |||||
WflowModelHistorys modelHistory = modelHistorysMapper.selectOne(new QueryWrapper<>(WflowModelHistorys.builder() | |||||
.processDefId(instance.getProcessDefinitionId()) | |||||
.version(instance.getProcessDefinitionVersion()) | |||||
.build())); | |||||
ProcessNode<?> currentNode = nodeCatchService.reloadProcessByStr(modelHistory.getProcess()).get("undefined"); | |||||
//UserInfo userInfo = userInfoService.getById(Long.valueOf(instance.getStartUserId())); | |||||
//HashSet<String> userSet = new HashSet<>(); | |||||
//userSet.add(String.valueOf(userInfo.getId())); | |||||
//Map<String, ProcessInstanceUserDto> userMap = userInfoService.getUserMapByIds(userSet); | |||||
//ProcessInstanceUserDto startUser = userMap.get(String.valueOf(userInfo.getId())); | |||||
List<ProgressNode> taskRecords = getHisTaskRecords(instanceId, nodePropsValue); | |||||
// 获取添加抄送任务 | |||||
taskRecords.addAll(getCcTaskRecords(instanceId)); | |||||
if (ObjectUtil.isNull(instance.getEndTime())) { | |||||
// TODO 下版实现 获取等待中且还未开始的任务,如果存在条件则需要直接解析条件 | |||||
taskRecords.addAll(getFutureTask(instanceId)); | |||||
ProcessProgressVo progressInstanceDetail = processInstanceService.getProgressInstanceDetail(null, instanceId); | |||||
List<ProgressNode> progressInfo = progressInstanceDetail.getProgressInfo(); | |||||
Set<String> userSet = progressInfo.stream().map(ProgressNode::getUserId).collect(Collectors.toSet()); | |||||
Map<String, ProcessInstanceUserDto> userMapByIds = userInfoService.getUserMapByIds(userSet); | |||||
// 装配节点审核人员信息 | |||||
for (ProgressNode progressNode : progressInfo) { | |||||
progressNode.setUser(userMapByIds.get(progressNode.getUserId())); | |||||
} | } | ||||
taskRecords = taskRecords.stream() | |||||
.sorted(Comparator.comparing(ProgressNode::getStartTime)) | |||||
.collect(Collectors.toList()); | |||||
taskRecords.add(0, ProgressNode.builder() | |||||
.nodeId("root") | |||||
.name("提交申请") | |||||
//.user(userInfoVO) | |||||
.nodeType(NodeTypeEnum.ROOT) | |||||
.startTime(instance.getStartTime()) | |||||
.finishTime(instance.getStartTime()) | |||||
.taskId("root") | |||||
.result(ProcessHandlerEnum.PASS).build()); | |||||
// 提取全量表单数据 | |||||
Map<String, Object> formData = formDatas.stream() | |||||
.filter(CodeUtil.distinctByKey(HistoricVariableInstance::getVariableName)) | |||||
.collect(Collectors.toMap(HistoricVariableInstance::getVariableName, HistoricVariableInstance::getValue)); | |||||
ProcessProgressDetailVo res = ProcessProgressDetailVo.builder() | |||||
.instanceId(instanceId) | |||||
.version(instance.getProcessDefinitionVersion()) | |||||
.formItems(formService.filterFormAndDataByPermConfig((List<Form>) forms.getValue(), formData, currentNode)) | |||||
.formData(formData).processDefName(instance.getProcessDefinitionName()) | |||||
.result(instance.getEndActivityId()) | |||||
.startTime(instance.getStartTime()) | |||||
.progress(taskRecords) | |||||
.build(); | |||||
//res.setStartUser(startUser); | |||||
progressInstanceDetail.setProgressInfo(progressInfo); | |||||
ProcessProgressDetailVo res = new ProcessProgressDetailVo(); | |||||
res.setProcessProgressVo(progressInstanceDetail); | |||||
Project project = projectService.getById(projectId); | Project project = projectService.getById(projectId); | ||||
res.setStatus(ProcessStatusEnum.getDescByCode(project.getProcessStatus())); | res.setStatus(ProcessStatusEnum.getDescByCode(project.getProcessStatus())); | ||||
return res; | return res; | ||||
} | } | ||||
/** | /** | ||||
* 获取抄送的流程实例信息 | |||||
* | |||||
* @param instanceId 实例ID | |||||
* @return 抄送我的流程 | |||||
*/ | |||||
private List<ProgressNode> getCcTaskRecords(String instanceId) { | |||||
Set<String> ccUsers = new HashSet<>(); | |||||
List<ProgressNode> ccList = ccTasksMapper.selectList(new QueryWrapper<WflowCcTasks>() | |||||
.eq("instance_id", instanceId)) | |||||
.stream() | |||||
.map(task -> { | |||||
ccUsers.add(task.getUserId()); | |||||
return ProgressNode.builder().nodeId(task.getNodeId()).nodeType(NodeTypeEnum.CC) | |||||
.name(task.getNodeName()) | |||||
.user(ProcessInstanceUserDto.builder().userId(task.getUserId()).build()) | |||||
.startTime(task.getCreateTime()) | |||||
.finishTime(task.getCreateTime()) | |||||
.build(); | |||||
}).collect(Collectors.toList()); | |||||
if (isNotEmpty(ccUsers)) { | |||||
Map<String, ProcessInstanceUserDto> userMap = userInfoService.getUserMapByIds(ccUsers); | |||||
ccList.stream().peek(v -> v.setUser(userMap.get(v.getUser().getUserId()))).collect(Collectors.toList()); | |||||
} | |||||
return ccList; | |||||
} | |||||
/** | |||||
* 获取流程的审批历史记录 | |||||
* | |||||
* @param instanceId 审批实例ID | |||||
* @param nodeProps 节点设置 | |||||
* @return 历史记录列表 | |||||
*/ | |||||
private List<ProgressNode> getHisTaskRecords(String instanceId, Map<String, Object> nodeProps) { | |||||
List<HistoricActivityInstance> list = historyService.createHistoricActivityInstanceQuery() | |||||
.processInstanceId(instanceId).orderByHistoricActivityInstanceStartTime().asc().list(); | |||||
Set<String> userSet = new HashSet<>(); | |||||
// 获取节点处理结果 | |||||
Map<String, ProcessHandlerEnum> varMap = historyService.createHistoricVariableInstanceQuery() | |||||
.processInstanceId(instanceId) | |||||
.variableNameLike("approve_%") | |||||
.list().stream() | |||||
.collect(Collectors.toMap(HistoricVariableInstance::getVariableName, v -> (ProcessHandlerEnum) v.getValue())); | |||||
Map<String, List<ProgressNodeAuditInfoVo>> commentMap = new HashMap<>(); | |||||
// 统一处理所有评论数据,省的多次查询 | |||||
List<ProgressNodeAuditInfoVo> cmvos = taskService.getProcessInstanceComments(instanceId).stream() | |||||
.map(comment -> { | |||||
userSet.add(comment.getUserId()); | |||||
ProgressNodeAuditInfoVo progressNodeAuditInfoVo = ProgressNodeAuditInfoVo.builder() | |||||
.id(comment.getId()) | |||||
.taskId(comment.getTaskId()) | |||||
.commentType(comment.getType()) | |||||
.type("COMMENT") | |||||
.createTime(comment.getTime()) | |||||
.user(ProcessInstanceUserDto.builder().userId(comment.getUserId()).build()) | |||||
.build(); | |||||
ProcessComment processComment = JSONObject.parseObject(comment.getFullMessage(), ProcessComment.class); | |||||
progressNodeAuditInfoVo.setText(processComment.getText()); | |||||
progressNodeAuditInfoVo.setAttachments(processComment.getAttachments()); | |||||
return progressNodeAuditInfoVo; | |||||
}).collect(Collectors.toList()); | |||||
cmvos.forEach(cm -> { | |||||
// 把评论数据按照task进行归类 | |||||
String taskId = Optional.ofNullable(cm.getTaskId()).orElse(instanceId); | |||||
List<ProgressNodeAuditInfoVo> vos = commentMap.computeIfAbsent(taskId, k -> new ArrayList<>()); | |||||
vos.add(cm); | |||||
}); | |||||
// 再将评论按照任务一次构建,方便取出 | |||||
Map<String, ProgressNodeAuditInfoVo> commentsMap = | |||||
cmvos.stream().collect(Collectors.toMap(ProgressNodeAuditInfoVo::getTaskId, c -> c)); | |||||
List<ProgressNode> progressNodes = list.stream().filter(his -> ObjectUtil.isNotNull(his.getTaskId())) | |||||
.map(his -> { | |||||
Object props = nodeProps.get(his.getActivityId()); | |||||
ApprovalModeEnum approvalMode = null; | |||||
if (props instanceof ApprovalProps) { | |||||
approvalMode = ((ApprovalProps) props).getMode(); | |||||
} | |||||
userSet.add(his.getAssignee()); | |||||
return ProgressNode.builder() | |||||
.nodeId(his.getActivityId()) | |||||
.name(his.getActivityName()) | |||||
.nodeType(NodeTypeEnum.APPROVAL) | |||||
.user(ProcessInstanceUserDto.builder().userId(his.getAssignee()).build()) | |||||
.startTime(his.getStartTime()) | |||||
.finishTime(his.getEndTime()) | |||||
.taskId(his.getTaskId()) | |||||
.approvalMode(approvalMode) | |||||
.auditInfo(commentsMap.get(his.getTaskId())) | |||||
.result(varMap.get("approve_" + his.getTaskId())).build(); | |||||
}).collect(Collectors.toList()); | |||||
if (isNotEmpty(userSet)) { | |||||
Map<String, ProcessInstanceUserDto> userMap = userInfoService.getUserMapByIds(userSet); | |||||
progressNodes.stream().peek(v -> v.setUser(userMap.get(v.getUser().getUserId()))).collect(Collectors.toList()); | |||||
} | |||||
return progressNodes; | |||||
} | |||||
private List<ProgressNode> getFutureTask(String instanceId) { | |||||
// 根据流程遍历后续节点,期间要穿越后续包含并行网关和条件网关的节点 | |||||
return Collections.emptyList(); | |||||
} | |||||
/** | |||||
* 待办中心我已处理项目列表查询 | * 待办中心我已处理项目列表查询 | ||||
* | * | ||||
* @param param | * @param param | ||||