Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
jyzb_platformV2
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
赵剑炜
jyzb_platformV2
Commits
511b48b7
Commit
511b48b7
authored
Dec 04, 2023
by
赵剑炜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决评论乱码问题
parent
2199d824
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
13 行增加
和
4 行删除
+13
-4
WorkProcessServiceImpl.java
jyzb-process/src/main/java/com/junmp/junmpProcess/service/Bussiness/impl/WorkProcessServiceImpl.java
+5
-0
FlowTaskServiceImpl.java
jyzb-process/src/main/java/com/junmp/junmpProcess/service/impl/FlowTaskServiceImpl.java
+8
-4
没有找到文件。
jyzb-process/src/main/java/com/junmp/junmpProcess/service/Bussiness/impl/WorkProcessServiceImpl.java
View file @
511b48b7
...
...
@@ -79,6 +79,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
java.nio.charset.StandardCharsets
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -765,6 +766,8 @@ public class WorkProcessServiceImpl extends ServiceImpl<ProcessTemplatesMapper,
}
else
if
(
"userTask"
.
equals
(
historicActivityInstance
.
getActivityType
())){
List
<
Comment
>
comments
=
commentsMap
.
get
(
historicActivityInstance
.
getTaskId
());
if
(
CollUtil
.
isNotEmpty
(
comments
)){
for
(
Comment
comment
:
comments
)
{
if
(
"opinion"
.
equals
(
comment
.
getType
())){
...
...
@@ -801,6 +804,8 @@ public class WorkProcessServiceImpl extends ServiceImpl<ProcessTemplatesMapper,
taskDetailVO
.
setSignImage
(
comment1
.
getFullMessage
());
}
}
Object
a
=
comments
.
get
(
0
).
getFullMessage
().
getBytes
(
StandardCharsets
.
UTF_8
);
// Object comMsg= taskService.getProcessInstanceComments(processInstanceId);
taskDetailVO
.
setComment
(
comments
.
get
(
0
).
getFullMessage
());
taskDetailVO
.
setAttachmentVOList
(
attachmentVOList
);
taskDetailVOS
.
add
(
taskDetailVO
);
...
...
jyzb-process/src/main/java/com/junmp/junmpProcess/service/impl/FlowTaskServiceImpl.java
View file @
511b48b7
...
...
@@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.TypeReference
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.junmp.junmpProcess.common.utils.HttpStatus
;
import
com.junmp.junmpProcess.common.utils.ResponseResult
;
...
...
@@ -51,6 +52,7 @@ import org.flowable.engine.TaskService;
import
org.flowable.engine.history.HistoricActivityInstance
;
import
org.flowable.engine.history.HistoricProcessInstance
;
import
org.flowable.engine.history.HistoricProcessInstanceQuery
;
import
org.flowable.engine.impl.persistence.entity.CommentEntity
;
import
org.flowable.engine.repository.ProcessDefinition
;
import
org.flowable.engine.runtime.ActivityInstance
;
import
org.flowable.engine.runtime.ProcessInstance
;
...
...
@@ -68,6 +70,9 @@ import springfox.documentation.spring.web.json.Json;
import
javax.annotation.Resource
;
import
java.io.InputStream
;
import
java.nio.ByteBuffer
;
import
java.nio.CharBuffer
;
import
java.nio.charset.Charset
;
import
java.nio.charset.StandardCharsets
;
import
java.util.*
;
import
java.util.function.Function
;
...
...
@@ -718,7 +723,6 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
}
else
if
(
"userTask"
.
equals
(
historicActivityInstance
.
getActivityType
())){
List
<
Comment
>
comments
=
commentsMap
.
get
(
historicActivityInstance
.
getTaskId
());
if
(
CollUtil
.
isNotEmpty
(
comments
)){
for
(
Comment
comment
:
comments
)
{
if
(
"opinion"
.
equals
(
comment
.
getType
())){
...
...
@@ -759,9 +763,9 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
taskDetailVO
.
setSignImage
(
comment1
.
getFullMessage
());
}
}
String
s
=
new
String
(
comments
.
get
(
0
).
getFullMessage
().
getBytes
(
StandardCharsets
.
UTF_8
),
StandardCharsets
.
UTF_8
)
;
System
.
out
.
println
(
"s = "
+
s
);
taskDetailVO
.
setComment
(
new
String
(
comments
.
get
(
0
).
getFullMessage
().
getBytes
(
StandardCharsets
.
UTF_8
),
StandardCharsets
.
UTF_8
));
CommentEntity
commentTransfer
=
(
CommentEntity
)
comment
;
taskDetailVO
.
setComment
(
commentTransfer
.
getMessage
(
));
taskDetailVO
.
setAttachmentVOList
(
attachmentVOList
);
taskDetailVOS
.
add
(
taskDetailVO
);
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论