Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
155d6d2e
Commit
155d6d2e
authored
Jan 04, 2024
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补充待办功能
parent
374be0e2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
120 additions
and
4 deletions
+120
-4
CommonserviceImpl.java
.../boot/module/jyjc/biz/service/impl/CommonserviceImpl.java
+9
-0
JyjcInspectionApplicationServiceImpl.java
...iz/service/impl/JyjcInspectionApplicationServiceImpl.java
+43
-3
JyjcOpeningApplicationServiceImpl.java
...c/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
+68
-1
No files found.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/CommonserviceImpl.java
View file @
155d6d2e
...
@@ -140,4 +140,13 @@ public class CommonserviceImpl {
...
@@ -140,4 +140,13 @@ public class CommonserviceImpl {
model
.
setStartDate
(
new
Date
());
model
.
setStartDate
(
new
Date
());
return
model
;
return
model
;
}
}
public
void
deleteTaskModel
(
String
id
){
List
<
TaskV2Model
>
result
=
Systemctl
.
taskV2Client
.
selectListByRelationId
(
id
).
getResult
();
TaskV2Model
model
=
result
.
stream
().
sorted
((
r1
,
r2
)
->
r2
.
getCreateDate
().
compareTo
(
r1
.
getCreateDate
()))
// 按时间降序排序
.
findFirst
()
.
orElse
(
null
);
Systemctl
.
taskV2Client
.
delete
(
String
.
valueOf
(
model
.
getSequenceNbr
()));
}
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcInspectionApplicationServiceImpl.java
View file @
155d6d2e
...
@@ -213,7 +213,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -213,7 +213,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
if
(
StringUtils
.
isNotBlank
(
model
.
getProcessInstanceId
())){
if
(
StringUtils
.
isNotBlank
(
model
.
getProcessInstanceId
())){
commonservice
.
buildTaskModel
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"instanceId"
,
model
.
getProcessInstanceId
()).
put
(
"startDate"
,
new
Date
())
commonservice
.
buildTaskModel
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"instanceId"
,
model
.
getProcessInstanceId
()).
put
(
"startDate"
,
new
Date
())
.
put
(
"agencyCode"
,
reginParams
.
getUserModel
().
getAgencyCode
()).
put
(
"userId"
,
reginParams
.
getUserModel
().
getUserId
()).
put
(
"startUser"
,
reginParams
.
getUserModel
().
getUserId
()).
put
(
"startUserId"
,
reginParams
.
getUserModel
().
getUserId
())
.
put
(
"agencyCode"
,
reginParams
.
getUserModel
().
getAgencyCode
()).
put
(
"userId"
,
reginParams
.
getUserModel
().
getUserId
()).
put
(
"startUser"
,
reginParams
.
getUserModel
().
getUserId
()).
put
(
"startUserId"
,
reginParams
.
getUserModel
().
getUserId
())
.
put
(
"taskStatus"
,
FlowStatusEnum
.
REJECTED
.
getCode
()).
put
(
"taskStatusLabel"
,
FlowStatusEnum
.
REJECT
ED
.
getName
()).
put
(
"taskName"
,
taskName
).
put
(
"taskType"
,
model
.
getBizType
()).
put
(
"taskTypeLabel"
,
BizTypeEnum
.
getNameByCode
(
model
.
getBizType
())).
put
(
"taskContent"
,
""
)
.
put
(
"taskStatus"
,
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()).
put
(
"taskStatusLabel"
,
FlowStatusEnum
.
TO_BE_PROCESS
ED
.
getName
()).
put
(
"taskName"
,
taskName
).
put
(
"taskType"
,
model
.
getBizType
()).
put
(
"taskTypeLabel"
,
BizTypeEnum
.
getNameByCode
(
model
.
getBizType
())).
put
(
"taskContent"
,
""
)
.
put
(
"taskTitle"
,
reginParams
.
getUserModel
().
getUserName
()+
"发起了"
+
taskName
).
put
(
"taskDesc"
,
""
).
put
(
"taskCode"
,
model
.
getApplicationNo
())
.
put
(
"taskTitle"
,
reginParams
.
getUserModel
().
getUserName
()+
"发起了"
+
taskName
).
put
(
"taskDesc"
,
""
).
put
(
"taskCode"
,
model
.
getApplicationNo
())
.
put
(
"extras"
,
JSON
.
toJSONString
(
model
)).
put
(
"createUserId"
,
reginParams
.
getUserModel
().
getUserName
()).
put
(
"startUserId"
,
reginParams
.
getUserModel
().
getUserId
())
.
put
(
"extras"
,
JSON
.
toJSONString
(
model
)).
put
(
"createUserId"
,
reginParams
.
getUserModel
().
getUserName
()).
put
(
"startUserId"
,
reginParams
.
getUserModel
().
getUserId
())
.
put
(
"routePath"
,
url
.
replace
(
"{sequenceNbr}"
,
String
.
valueOf
(
model
.
getSequenceNbr
())).
replace
(
"{userId}"
,
reginParams
.
getUserModel
().
getUserId
()).
replace
(
"{roleIds}"
,
roleIds
))
.
put
(
"routePath"
,
url
.
replace
(
"{sequenceNbr}"
,
String
.
valueOf
(
model
.
getSequenceNbr
())).
replace
(
"{userId}"
,
reginParams
.
getUserModel
().
getUserId
()).
replace
(
"{roleIds}"
,
roleIds
))
...
@@ -286,6 +286,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -286,6 +286,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
execueFlow
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"op"
,
"提交"
).
put
(
"instanceId"
,
model
.
getProcessInstanceId
()).
put
(
"comments"
,
""
).
build
());
execueFlow
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"op"
,
"提交"
).
put
(
"instanceId"
,
model
.
getProcessInstanceId
()).
put
(
"comments"
,
""
).
build
());
Map
<
String
,
Object
>
nextNodeInfo
=
workflowHelper
.
getNextWorkflowNode
(
model
.
getProcessInstanceId
());
Map
<
String
,
Object
>
nextNodeInfo
=
workflowHelper
.
getNextWorkflowNode
(
model
.
getProcessInstanceId
());
String
role
=
(
String
)
nextNodeInfo
.
get
(
"role"
);
String
role
=
(
String
)
nextNodeInfo
.
get
(
"role"
);
String
taskName
=
(
String
)
nextNodeInfo
.
get
(
"taskName"
);
model
.
setNextExecuteIds
(
role
);
model
.
setNextExecuteIds
(
role
);
model
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
model
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
if
(!
org
.
springframework
.
util
.
ObjectUtils
.
isEmpty
(
model
.
getWorkflowRole
()))
{
if
(!
org
.
springframework
.
util
.
ObjectUtils
.
isEmpty
(
model
.
getWorkflowRole
()))
{
...
@@ -294,6 +295,37 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -294,6 +295,37 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
model
.
setWorkflowRole
(
role
);
model
.
setWorkflowRole
(
role
);
}
}
this
.
updateWithModel
(
model
);
this
.
updateWithModel
(
model
);
String
json
=
null
;
try
{
json
=
IOUtils
.
toString
(
bizTypeInfo
.
getInputStream
(),
java
.
lang
.
String
.
valueOf
(
StandardCharsets
.
UTF_8
));
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
List
<
Map
>
list
=
parseArray
(
json
,
Map
.
class
);
String
url
=
null
;
for
(
Map
map
:
list
)
{
if
(
map
.
get
(
"type"
).
equals
(
model
.
getBizType
()
)&&
"look"
.
equals
(
map
.
get
(
"pageType"
))){
url
=
map
.
get
(
"url"
).
toString
();
}
}
Map
<
String
,
Object
>
userOrgRoleMap
=
FeignUtil
.
remoteCall
(()
->
Privilege
.
userOrgRoleClient
.
getme
());
List
<
String
>
userOrgRoleList
=
(
List
<
String
>)
userOrgRoleMap
.
get
(
"roleId"
);
String
roleIds
=
String
.
join
(
","
,
userOrgRoleList
);
commonservice
.
buildTaskModel
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"instanceId"
,
model
.
getProcessInstanceId
()).
put
(
"startDate"
,
new
Date
())
.
put
(
"agencyCode"
,
reginParams
.
getUserModel
().
getAgencyCode
()).
put
(
"userId"
,
reginParams
.
getUserModel
().
getUserId
()).
put
(
"startUser"
,
reginParams
.
getUserModel
().
getUserId
()).
put
(
"startUserId"
,
reginParams
.
getUserModel
().
getUserId
())
.
put
(
"taskStatus"
,
FlowStatusEnum
.
REJECTED
.
getCode
()).
put
(
"taskStatusLabel"
,
FlowStatusEnum
.
REJECTED
.
getName
()).
put
(
"taskName"
,
taskName
).
put
(
"taskType"
,
model
.
getBizType
()).
put
(
"taskTypeLabel"
,
BizTypeEnum
.
getNameByCode
(
model
.
getBizType
())).
put
(
"taskContent"
,
""
)
.
put
(
"taskTitle"
,
reginParams
.
getUserModel
().
getUserName
()+
"发起了"
+
taskName
).
put
(
"taskDesc"
,
""
).
put
(
"taskCode"
,
model
.
getApplicationNo
())
.
put
(
"extras"
,
JSON
.
toJSONString
(
model
)).
put
(
"createUserId"
,
reginParams
.
getUserModel
().
getUserName
()).
put
(
"startUserId"
,
reginParams
.
getUserModel
().
getUserId
())
.
put
(
"routePath"
,
url
.
replace
(
"{sequenceNbr}"
,
String
.
valueOf
(
model
.
getSequenceNbr
())).
replace
(
"{userId}"
,
reginParams
.
getUserModel
().
getUserId
()).
replace
(
"{roleIds}"
,
roleIds
))
.
build
());
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"relationId"
,
model
.
getProcessInstanceId
());
params
.
put
(
"taskStatus"
,
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
());
params
.
put
(
"taskStatusLabel"
,
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
());
TaskV2Model
taskV2Model
=
commonservice
.
updateTaskModel
(
params
);
}
}
return
model
;
return
model
;
}
}
...
@@ -414,6 +446,12 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -414,6 +446,12 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
log
.
warn
(
"JyjcInspectionApplicationModel Not Found!"
);
log
.
warn
(
"JyjcInspectionApplicationModel Not Found!"
);
return
;
return
;
}
}
params
.
put
(
"relationId"
,
inspectionApplicationModel
.
getProcessInstanceId
());
params
.
put
(
"taskStatus"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
params
.
put
(
"taskStatusLabel"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
TaskV2Model
taskV2Model
=
commonservice
.
updateTaskModel
(
params
);
List
<
JyjcInspectionResult
>
resultModels
=
new
ArrayList
(
applicationEquipModels
.
size
());
List
<
JyjcInspectionResult
>
resultModels
=
new
ArrayList
(
applicationEquipModels
.
size
());
//List<String> codes = createCodeService.createApplicationFormCode(ApplicationFormTypeEnum.JG.getCode(), applicationEquipModels.size());
//List<String> codes = createCodeService.createApplicationFormCode(ApplicationFormTypeEnum.JG.getCode(), applicationEquipModels.size());
List
<
String
>
codes
=
tzsServiceFeignClient
.
applicationFormCode
(
ApplicationFormTypeEnum
.
JG
.
getCode
(),
applicationEquipModels
.
size
()).
getResult
();
List
<
String
>
codes
=
tzsServiceFeignClient
.
applicationFormCode
(
ApplicationFormTypeEnum
.
JG
.
getCode
(),
applicationEquipModels
.
size
()).
getResult
();
...
@@ -459,8 +497,9 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -459,8 +497,9 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
String
op
=
params
.
get
(
"op"
).
toString
();
String
op
=
params
.
get
(
"op"
).
toString
();
Long
sequenceNbr
=
Long
.
parseLong
(
params
.
get
(
"sequenceNbr"
)
+
""
);
Long
sequenceNbr
=
Long
.
parseLong
(
params
.
get
(
"sequenceNbr"
)
+
""
);
params
.
put
(
"taskStatus"
,
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
());
params
.
put
(
"relationId"
,
instanceId
);
params
.
put
(
"taskStatusLabel"
,
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
());
params
.
put
(
"taskStatus"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
params
.
put
(
"taskStatusLabel"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
TaskV2Model
taskV2Model
=
commonservice
.
updateTaskModel
(
params
);
TaskV2Model
taskV2Model
=
commonservice
.
updateTaskModel
(
params
);
JyjcInspectionApplicationModel
model
=
this
.
queryBySeq
(
sequenceNbr
);
JyjcInspectionApplicationModel
model
=
this
.
queryBySeq
(
sequenceNbr
);
String
json
=
null
;
String
json
=
null
;
...
@@ -539,6 +578,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -539,6 +578,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
return
false
;
return
false
;
}
}
updateModelByInstanceId
(
inspectionApplicationModel
.
getSequenceNbr
(),
inspectionApplicationModel
.
getProcessInstanceId
(),
MapBuilder
.<
String
,
Object
>
create
().
put
(
"status"
,
FlowStatusEnum
.
ROLLBACK
.
getCode
()
+
""
).
build
(),
true
);
updateModelByInstanceId
(
inspectionApplicationModel
.
getSequenceNbr
(),
inspectionApplicationModel
.
getProcessInstanceId
(),
MapBuilder
.<
String
,
Object
>
create
().
put
(
"status"
,
FlowStatusEnum
.
ROLLBACK
.
getCode
()
+
""
).
build
(),
true
);
commonservice
.
deleteTaskModel
(
inspectionApplicationModel
.
getProcessInstanceId
());
return
true
;
return
true
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
View file @
155d6d2e
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.map.MapBuilder
;
import
cn.hutool.core.map.MapBuilder
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
...
@@ -13,6 +14,7 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
...
@@ -13,6 +14,7 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.BizTypeEnum
;
import
com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcBaseMapper
;
import
com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcBaseMapper
;
import
com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcOpeningApplicationMapper
;
import
com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcOpeningApplicationMapper
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcGeographicModel
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcGeographicModel
;
...
@@ -32,10 +34,14 @@ import com.yeejoin.amos.boot.module.ymt.api.mapper.TzBaseEnterpriseInfoMapper;
...
@@ -32,10 +34,14 @@ import com.yeejoin.amos.boot.module.ymt.api.mapper.TzBaseEnterpriseInfoMapper;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.TzBaseUnitLicenceMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.TzBaseUnitLicenceMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.TzsUserInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.TzsUserInfoMapper
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.AjaxResult
;
import
com.yeejoin.amos.feign.workflow.model.AjaxResult
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -52,9 +58,13 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
...
@@ -52,9 +58,13 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.io.IOException
;
import
java.nio.charset.StandardCharsets
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
static
com
.
alibaba
.
fastjson
.
JSON
.
parseArray
;
/**
/**
* 服务实现类
* 服务实现类
...
@@ -81,6 +91,8 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -81,6 +91,8 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
@Value
(
"${jyjc.user-post:6615}"
)
@Value
(
"${jyjc.user-post:6615}"
)
private
String
jyjcUserPost
;
private
String
jyjcUserPost
;
@Value
(
"classpath:/json/bizTypeInfo.json"
)
private
org
.
springframework
.
core
.
io
.
Resource
bizTypeInfo
;
@Autowired
@Autowired
private
RedisUtils
redisUtils
;
private
RedisUtils
redisUtils
;
...
@@ -91,7 +103,8 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -91,7 +103,8 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
private
TzBaseEnterpriseInfoMapper
enterpriseInfoMapper
;
private
TzBaseEnterpriseInfoMapper
enterpriseInfoMapper
;
@Autowired
@Autowired
private
TzsUserInfoMapper
userInfoMapper
;
private
TzsUserInfoMapper
userInfoMapper
;
@Autowired
CommonserviceImpl
commonservice
;
@Autowired
@Autowired
private
WorkflowHelper
workflowHelper
;
private
WorkflowHelper
workflowHelper
;
@Autowired
@Autowired
...
@@ -125,6 +138,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -125,6 +138,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
// 查询下节点任务
// 查询下节点任务
Map
<
String
,
Object
>
nextNodeInfo
=
workflowHelper
.
getNextWorkflowNode
(
instanceId
);
Map
<
String
,
Object
>
nextNodeInfo
=
workflowHelper
.
getNextWorkflowNode
(
instanceId
);
String
role
=
(
String
)
nextNodeInfo
.
get
(
"role"
);
String
role
=
(
String
)
nextNodeInfo
.
get
(
"role"
);
String
taskName
=
(
String
)
nextNodeInfo
.
get
(
"taskName"
);
model
.
setNextExecuteIds
(
role
);
model
.
setNextExecuteIds
(
role
);
model
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
model
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
if
(!
org
.
springframework
.
util
.
ObjectUtils
.
isEmpty
(
model
.
getWorkflowRole
()))
{
if
(!
org
.
springframework
.
util
.
ObjectUtils
.
isEmpty
(
model
.
getWorkflowRole
()))
{
...
@@ -132,6 +146,32 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -132,6 +146,32 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
}
else
{
}
else
{
model
.
setWorkflowRole
(
role
);
model
.
setWorkflowRole
(
role
);
}
}
String
json
=
null
;
try
{
json
=
IOUtils
.
toString
(
bizTypeInfo
.
getInputStream
(),
java
.
lang
.
String
.
valueOf
(
StandardCharsets
.
UTF_8
));
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
List
<
Map
>
list
=
parseArray
(
json
,
Map
.
class
);
String
url
=
null
;
for
(
Map
map
:
list
)
{
if
(
map
.
get
(
"type"
).
equals
(
"opening"
)&&
"look"
.
equals
(
map
.
get
(
"pageType"
))){
url
=
map
.
get
(
"url"
).
toString
();
}
}
Map
<
String
,
Object
>
userOrgRoleMap
=
FeignUtil
.
remoteCall
(()
->
Privilege
.
userOrgRoleClient
.
getme
());
List
<
String
>
userOrgRoleList
=
(
List
<
String
>)
userOrgRoleMap
.
get
(
"roleId"
);
String
roleIds
=
String
.
join
(
","
,
userOrgRoleList
);
commonservice
.
buildTaskModel
(
MapBuilder
.<
String
,
Object
>
create
().
put
(
"instanceId"
,
model
.
getWorkflowProstanceId
()).
put
(
"startDate"
,
new
Date
())
.
put
(
"agencyCode"
,
reginParams
.
getUserModel
().
getAgencyCode
()).
put
(
"userId"
,
reginParams
.
getUserModel
().
getUserId
()).
put
(
"startUser"
,
reginParams
.
getUserModel
().
getUserId
()).
put
(
"startUserId"
,
reginParams
.
getUserModel
().
getUserId
())
.
put
(
"taskStatus"
,
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()).
put
(
"taskStatusLabel"
,
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
()).
put
(
"taskName"
,
taskName
).
put
(
"taskType"
,
"opening"
).
put
(
"taskTypeLabel"
,
"检验业务"
).
put
(
"taskContent"
,
""
)
.
put
(
"taskTitle"
,
reginParams
.
getUserModel
().
getUserName
()+
"发起了"
+
taskName
).
put
(
"taskDesc"
,
""
).
put
(
"taskCode"
,
model
.
getApplicationSeq
())
.
put
(
"extras"
,
JSON
.
toJSONString
(
model
)).
put
(
"createUserId"
,
reginParams
.
getUserModel
().
getUserName
()).
put
(
"startUserId"
,
reginParams
.
getUserModel
().
getUserId
())
.
put
(
"routePath"
,
url
.
replace
(
"{sequenceNbr}"
,
String
.
valueOf
(
model
.
getSequenceNbr
())).
replace
(
"{userId}"
,
reginParams
.
getUserModel
().
getUserId
()).
replace
(
"{roleIds}"
,
roleIds
))
.
build
());
}
else
{
}
else
{
// 只有第一次改为待提交
// 只有第一次改为待提交
if
(
entity
==
null
)
{
if
(
entity
==
null
)
{
...
@@ -494,9 +534,35 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -494,9 +534,35 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
if
(
"1"
.
equals
(
op
))
{
if
(
"1"
.
equals
(
op
))
{
// 如果是回退, 则业务状态改为驳回
// 如果是回退, 则业务状态改为驳回
status
=
FlowStatusEnum
.
REJECTED
.
getCode
()
+
""
;
status
=
FlowStatusEnum
.
REJECTED
.
getCode
()
+
""
;
params
.
put
(
"relationId"
,
instanceId
);
params
.
put
(
"taskStatus"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
params
.
put
(
"taskStatusLabel"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
TaskV2Model
taskV2Model
=
commonservice
.
updateTaskModel
(
params
);
String
json
=
null
;
try
{
json
=
IOUtils
.
toString
(
bizTypeInfo
.
getInputStream
(),
java
.
lang
.
String
.
valueOf
(
StandardCharsets
.
UTF_8
));
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
List
<
Map
>
list
=
parseArray
(
json
,
Map
.
class
);
String
url
=
null
;
for
(
Map
map
:
list
)
{
if
(
map
.
get
(
"type"
).
equals
(
"opening"
)&&
"edit"
.
equals
(
map
.
get
(
"pageType"
))){
url
=
map
.
get
(
"url"
).
toString
();
}
}
taskV2Model
.
setRoutePath
(
url
);
Map
<
String
,
Object
>
nextNodeInfo
=
workflowHelper
.
getNextWorkflowNode
(
instanceId
);
String
roles
=
(
String
)
nextNodeInfo
.
get
(
"role"
);
taskV2Model
.
setExecuteUserIds
(
roles
);
commonservice
.
buildTaskModel
(
BeanUtil
.
beanToMap
(
taskV2Model
));
}
else
{
}
else
{
if
(
"流程结束"
.
equals
(
taskName
))
{
if
(
"流程结束"
.
equals
(
taskName
))
{
status
=
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()
+
""
;
status
=
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()
+
""
;
params
.
put
(
"taskStatus"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
params
.
put
(
"taskStatusLabel"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
TaskV2Model
taskV2Model
=
commonservice
.
updateTaskModel
(
params
);
}
else
{
}
else
{
status
=
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()
+
""
;
status
=
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()
+
""
;
}
}
...
@@ -526,6 +592,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -526,6 +592,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
Map
<
String
,
Object
>
nextNodeInfo
=
workflowHelper
.
getNextWorkflowNode
(
jyjcOpeningApplication
.
getWorkflowProstanceId
());
Map
<
String
,
Object
>
nextNodeInfo
=
workflowHelper
.
getNextWorkflowNode
(
jyjcOpeningApplication
.
getWorkflowProstanceId
());
String
role
=
(
String
)
nextNodeInfo
.
get
(
"role"
);
String
role
=
(
String
)
nextNodeInfo
.
get
(
"role"
);
Long
id
=
Long
.
parseLong
(
sequenceNbr
);
Long
id
=
Long
.
parseLong
(
sequenceNbr
);
commonservice
.
deleteTaskModel
(
jyjcOpeningApplication
.
getWorkflowProstanceId
());
updateModelByInstanceId
(
id
,
jyjcOpeningApplication
.
getWorkflowProstanceId
(),
FlowStatusEnum
.
ROLLBACK
.
getCode
()
+
""
,
role
,
true
);
updateModelByInstanceId
(
id
,
jyjcOpeningApplication
.
getWorkflowProstanceId
(),
FlowStatusEnum
.
ROLLBACK
.
getCode
()
+
""
,
role
,
true
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
BadRequest
(
"撤回流程失败,请联系管理员!"
);
throw
new
BadRequest
(
"撤回流程失败,请联系管理员!"
);
...
...
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