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
5b2cd766
Commit
5b2cd766
authored
Dec 22, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
电梯注销业务开发bug修改
parent
cf559217
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
24 deletions
+68
-24
JgScrapCancelDto.java
...yeejoin/amos/boot/module/jg/api/dto/JgScrapCancelDto.java
+6
-0
JgScrapCancelMapper.xml
...-jg-api/src/main/resources/mapper/JgScrapCancelMapper.xml
+3
-3
JgScrapCancelServiceImpl.java
.../module/jg/biz/service/impl/JgScrapCancelServiceImpl.java
+59
-21
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/JgScrapCancelDto.java
View file @
5b2cd766
...
@@ -100,4 +100,10 @@ public class JgScrapCancelDto extends BaseDto {
...
@@ -100,4 +100,10 @@ public class JgScrapCancelDto extends BaseDto {
*/
*/
private
String
useUnitName
;
private
String
useUnitName
;
/**
* 设备ID
*/
private
String
record
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgScrapCancelMapper.xml
View file @
5b2cd766
...
@@ -12,8 +12,8 @@
...
@@ -12,8 +12,8 @@
select ur.sequence_nbr as sequenceNbr,
select ur.sequence_nbr as sequenceNbr,
ur.instance_id as instanceId,
ur.instance_id as instanceId,
ur.audit_status as auditStatus,
ur.audit_status as auditStatus,
ur.rec_date
as recDate,
DATE_FORMAT(ur.rec_date,'%Y-%m-%d')
as recDate,
ur.create_date
as createDate,
DATE_FORMAT(ur.create_date,'%Y-%m-%d')
as createDate,
ur.receive_org_code as receiveOrgCode,
ur.receive_org_code as receiveOrgCode,
ur.receive_org_name as receiveOrgName,
ur.receive_org_name as receiveOrgName,
ur.receive_company_code as receiveCompanyCode,
ur.receive_company_code as receiveCompanyCode,
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
ur.instance_status as instanceStatus,
ur.instance_status as instanceStatus,
ur.promoter,
ur.promoter,
ifnull(ur.next_execute_ids,'') as nextExecuteIds,
ifnull(ur.next_execute_ids,'') as nextExecuteIds,
audit_pass_date
as auditPassDate,
DATE_FORMAT(ur.audit_pass_date,'%Y-%m-%d')
as auditPassDate,
use.USE_UNIT_CREDIT_CODE as useUnitCreditCode,
use.USE_UNIT_CREDIT_CODE as useUnitCreditCode,
ur.use_unit_name as useUnitName,
ur.use_unit_name as useUnitName,
ur.use_unit_code as useUnitCode,
ur.use_unit_code as useUnitCode,
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgScrapCancelServiceImpl.java
View file @
5b2cd766
...
@@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSONArray;
...
@@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSONArray;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
...
@@ -15,17 +16,21 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgScrapCancelDto;
...
@@ -15,17 +16,21 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgScrapCancelDto;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgScrapCancel
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgScrapCancel
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgScrapCancelEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgScrapCancelEq
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CancelTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CancelTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.
Cancel
WorkFlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgScrapCancelEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgScrapCancelEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgScrapCancelMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgScrapCancelMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgScrapCancelService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgScrapCancelService
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgRegisterInfoService
;
import
com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeignService
;
import
com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeignService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgRegisterInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.SuperviseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.SuperviseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgOtherInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgOtherInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgUseInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgUseInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.SuperviseInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.SuperviseInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.service.ICreateCodeService
;
import
com.yeejoin.amos.boot.module.ymt.api.service.ICreateCodeService
;
...
@@ -121,8 +126,8 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -121,8 +126,8 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
[]
taskName
=
new
String
[]{
"流程结束"
};
String
[]
taskName
=
new
String
[]{
"流程结束"
};
JSONObject
jgScrapCancelAdd
=
jgInstallationNoticeDtoMap
.
get
(
"jgScrapCancelAdd"
);
JSONObject
jgScrapCancelAdd
=
jgInstallationNoticeDtoMap
.
get
(
"jgScrapCancelAdd"
);
String
equipId
=
jgScrapCancelAdd
.
get
(
"
SEQUENCE_NBR
"
).
toString
();
String
equipId
=
jgScrapCancelAdd
.
get
(
"
record
"
).
toString
();
jgScrapCancelAdd
.
remove
(
"
SEQUENCE_NBR
"
);
jgScrapCancelAdd
.
remove
(
"
record
"
);
JgScrapCancelDto
model
=
JSON
.
parseObject
(
jgScrapCancelAdd
.
toJSONString
(),
JgScrapCancelDto
.
class
);
JgScrapCancelDto
model
=
JSON
.
parseObject
(
jgScrapCancelAdd
.
toJSONString
(),
JgScrapCancelDto
.
class
);
model
.
setSEQUENCE_NBR
(
equipId
);
model
.
setSEQUENCE_NBR
(
equipId
);
...
@@ -190,6 +195,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -190,6 +195,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
ajaxResult1
=
Workflow
.
taskClient
.
completeByTask
(
taskId
,
dto
);
ajaxResult1
=
Workflow
.
taskClient
.
completeByTask
(
taskId
,
dto
);
if
(
ajaxResult1
.
get
(
"code"
).
equals
(
200
))
{
if
(
ajaxResult1
.
get
(
"code"
).
equals
(
200
))
{
getNext
(
roleListSecond
,
instanceId
,
taskName
);
getNext
(
roleListSecond
,
instanceId
,
taskName
);
roleListFirst
.
addAll
(
roleListSecond
);
}
else
{
}
else
{
log
.
error
(
"提交失败"
);
log
.
error
(
"提交失败"
);
}
}
...
@@ -215,14 +221,14 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -215,14 +221,14 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
dto
.
setNextExecuteIds
(
String
.
join
(
","
,
roleListSecond
));
dto
.
setNextExecuteIds
(
String
.
join
(
","
,
roleListSecond
));
dto
.
setInstanceStatus
(
String
.
join
(
","
,
roleListFirst
));
dto
.
setInstanceStatus
(
String
.
join
(
","
,
roleListFirst
));
dto
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
dto
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
dto
.
setStatus
(
taskName
[
0
]);
//
dto.setStatus(taskName[0]);
jgRelationEquip
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
jgRelationEquip
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
jgRelationEquip
.
setEquipTransferId
(
applyNo
);
jgRelationEquip
.
setEquipTransferId
(
applyNo
);
if
(!
CollectionUtils
.
isEmpty
(
instanceIdList
))
{
if
(!
CollectionUtils
.
isEmpty
(
instanceIdList
))
{
dto
.
setInstanceId
(
instanceIdList
.
get
(
i
));
dto
.
setInstanceId
(
instanceIdList
.
get
(
i
));
dto
.
setAuditStatus
(
String
.
valueOf
(
CancelWorkFlowStatusEnum
.
RECEIVE
.
getPass
()));
dto
.
setAuditStatus
(
String
.
valueOf
(
WorkFlowStatusEnum
.
CANCEL_
RECEIVE
.
getPass
()));
}
else
{
}
else
{
dto
.
setAuditStatus
(
String
.
valueOf
(
CancelWorkFlowStatusEnum
.
SUBMIT
.
getPass
()));
dto
.
setAuditStatus
(
String
.
valueOf
(
WorkFlowStatusEnum
.
CANCEL_
SUBMIT
.
getPass
()));
}
}
dto
.
setUseUnitCode
(
reginParams
.
getCompany
().
getCompanyCode
());
dto
.
setUseUnitCode
(
reginParams
.
getCompany
().
getCompanyCode
());
dto
.
setUseUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
dto
.
setUseUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
...
@@ -276,14 +282,19 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -276,14 +282,19 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
}
}
}
}
JgScrapCancel
jgScrapCancel
=
new
JgScrapCancel
();
JgScrapCancel
jgScrapCancel
=
new
JgScrapCancel
();
BeanUtils
.
copyProperties
(
jgScrapCancelDto
,
jgScrapCancel
);
BeanUtils
.
copyProperties
(
jgScrapCancelDto
,
jgScrapCancel
,
"useUnitName"
,
"useUnitName"
);
boolean
submit
=
submit
(
jgScrapCancel
,
op
);
boolean
submit
=
submit
(
jgScrapCancel
,
op
);
LambdaUpdateWrapper
<
JgScrapCancelEq
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
JgScrapCancelEq:
:
getEquipTransferId
,
jgScrapCancel
.
getSequenceNbr
());
JgScrapCancelEq
jgScrapCancelEq
=
new
JgScrapCancelEq
();
jgScrapCancelEq
.
setEquId
(
jgScrapCancelDto
.
getRecord
());
jgScrapCancelEqMapper
.
update
(
jgScrapCancelEq
,
updateWrapper
);
if
(
submit
)
{
if
(
submit
)
{
// 查询下节点任务
// 查询下节点任务
getNext
(
roleListSecond
,
jgScrapCancel
.
getInstanceId
(),
taskName
);
getNext
(
roleListSecond
,
jgScrapCancel
.
getInstanceId
(),
taskName
);
String
join
=
String
.
join
(
","
,
roleListSecond
);
String
join
=
String
.
join
(
","
,
roleListSecond
);
jgScrapCancel
.
setStatus
(
taskName
[
0
]);
//
jgScrapCancel.setStatus(taskName[0]);
if
(!
ObjectUtils
.
isEmpty
(
jgScrapCancel
.
getInstanceStatus
()))
{
if
(!
ObjectUtils
.
isEmpty
(
jgScrapCancel
.
getInstanceStatus
()))
{
jgScrapCancel
.
setInstanceStatus
(
jgScrapCancel
.
getInstanceStatus
()
+
","
+
join
);
jgScrapCancel
.
setInstanceStatus
(
jgScrapCancel
.
getInstanceStatus
()
+
","
+
join
);
}
else
{
}
else
{
...
@@ -291,13 +302,18 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -291,13 +302,18 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
}
}
jgScrapCancel
.
setPromoter
(
RequestContext
.
getExeUserId
());
jgScrapCancel
.
setPromoter
(
RequestContext
.
getExeUserId
());
jgScrapCancel
.
setNextExecuteIds
(
String
.
join
(
","
,
roleListSecond
));
jgScrapCancel
.
setNextExecuteIds
(
String
.
join
(
","
,
roleListSecond
));
jgScrapCancel
.
setAuditStatus
(
String
.
valueOf
(
CancelWorkFlowStatusEnum
.
RECEIVE
.
getPass
()));
jgScrapCancel
.
setAuditStatus
(
String
.
valueOf
(
WorkFlowStatusEnum
.
CANCEL_
RECEIVE
.
getPass
()));
this
.
updateById
(
jgScrapCancel
);
this
.
updateById
(
jgScrapCancel
);
}
}
}
else
{
}
else
{
JgScrapCancel
bean
=
new
JgScrapCancel
();
JgScrapCancel
bean
=
new
JgScrapCancel
();
BeanUtils
.
copyProperties
(
jgScrapCancelDto
,
bean
);
BeanUtils
.
copyProperties
(
jgScrapCancelDto
,
bean
);
this
.
updateById
(
bean
);
this
.
updateById
(
bean
);
LambdaUpdateWrapper
<
JgScrapCancelEq
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
JgScrapCancelEq:
:
getEquipTransferId
,
bean
.
getSequenceNbr
());
JgScrapCancelEq
jgScrapCancelEq
=
new
JgScrapCancelEq
();
jgScrapCancelEq
.
setEquId
(
jgScrapCancelDto
.
getRecord
());
jgScrapCancelEqMapper
.
update
(
jgScrapCancelEq
,
updateWrapper
);
}
}
return
jgScrapCancelDto
;
return
jgScrapCancelDto
;
}
}
...
@@ -346,6 +362,11 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -346,6 +362,11 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
}
}
}
}
}
}
@Autowired
IdxBizJgRegisterInfoMapper
idxBizJgRegisterInfoMapper
;
@Autowired
IIdxBizJgRegisterInfoService
idxBizJgRegisterInfoService
;
public
Map
<
String
,
Object
>
queryBySequenceNbr
(
Long
sequenceNbr
)
{
public
Map
<
String
,
Object
>
queryBySequenceNbr
(
Long
sequenceNbr
)
{
// 安装告知信息
// 安装告知信息
...
@@ -360,17 +381,26 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -360,17 +381,26 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
lambdaEq
.
eq
(
JgScrapCancelEq:
:
getEquipTransferId
,
sequenceNbr
);
lambdaEq
.
eq
(
JgScrapCancelEq:
:
getEquipTransferId
,
sequenceNbr
);
JgScrapCancelEq
jgScrapCancelEq
=
jgScrapCancelEqMapper
.
selectOne
(
lambdaEq
);
JgScrapCancelEq
jgScrapCancelEq
=
jgScrapCancelEqMapper
.
selectOne
(
lambdaEq
);
// 设备信息
// 设备信息
installationInfo
.
put
(
"SEQUENCE_NBR"
,
jgScrapCancelEq
.
getEquId
());
installationInfo
.
put
(
"record"
,
jgScrapCancelEq
.
getEquId
());
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
jgScrapCancelEq
.
getEquId
());
queryWrapper
.
last
(
"limit 1"
);
IdxBizJgRegisterInfo
one
=
idxBizJgRegisterInfoMapper
.
selectOne
(
queryWrapper
);
installationInfo
.
put
(
"equCode"
,
one
.
getEquCode
());
Map
<
String
,
Object
>
detailFieldCamelCaseByRecord
=
idxBizJgRegisterInfoService
.
getDetailFieldCamelCaseByRecord
(
jgScrapCancelEq
.
getEquId
());
// Map<String, Object> equipmentInfos = this.baseMapper.queryEquipInformation(sequenceNbr);
// Map<String, Object> equipmentInfos = this.baseMapper.queryEquipInformation(sequenceNbr);
BeanUtil
.
copyProperties
(
installationInfo
,
detailFieldCamelCaseByRecord
);
return
new
HashMap
<
String
,
Object
>()
{{
return
new
HashMap
<
String
,
Object
>()
{{
this
.
put
(
"jgScrapCancelAdd"
,
installationInfo
);
this
.
put
(
"jgScrapCancelAdd"
,
detailFieldCamelCaseByRecord
);
}};
}};
}
}
public
void
revocation
(
String
instanceId
)
{
public
void
revocation
(
String
instanceId
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
taskName
=
""
;
// String taskName = "";
String
taskCode
=
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
();
JgScrapCancel
jgScrapCancel
=
new
JgScrapCancel
();
JgScrapCancel
jgScrapCancel
=
new
JgScrapCancel
();
LambdaQueryWrapper
<
JgScrapCancel
>
lambda
=
new
QueryWrapper
<
JgScrapCancel
>().
lambda
();
LambdaQueryWrapper
<
JgScrapCancel
>
lambda
=
new
QueryWrapper
<
JgScrapCancel
>().
lambda
();
lambda
.
eq
(
JgScrapCancel:
:
getInstanceId
,
instanceId
);
lambda
.
eq
(
JgScrapCancel:
:
getInstanceId
,
instanceId
);
...
@@ -379,9 +409,13 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -379,9 +409,13 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
workFlowFeginService
.
rollBack
(
instanceId
);
workFlowFeginService
.
rollBack
(
instanceId
);
JSONObject
taskNoAuth
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
JSONObject
taskNoAuth
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
JSONObject
nextTask
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskNoAuth
.
get
(
"data"
)));
JSONObject
nextTask
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskNoAuth
.
get
(
"data"
)));
taskName
=
nextTask
.
getString
(
"name"
);
//
taskName = nextTask.getString("name");
if
(!
ObjectUtils
.
isEmpty
(
taskNoAuth
.
get
(
"data"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
taskNoAuth
.
get
(
"data"
)))
{
String
nextTaskId
=
nextTask
.
getString
(
"id"
);
String
nextTaskId
=
nextTask
.
getString
(
"id"
);
FeignClientResult
<
JSONObject
>
nodeInfo
=
workFlowFeginService
.
getNodeInfo
(
nextTaskId
);
JSONObject
result
=
nodeInfo
.
getResult
();
Map
<
String
,
Object
>
taskInfo
=
(
Map
<
String
,
Object
>)
result
.
get
(
"taskInfo"
);
taskCode
=
String
.
valueOf
(
taskInfo
.
get
(
"taskDefinitionKey"
));
AjaxResult
taskGroupName
=
Workflow
.
taskClient
.
getTaskGroupName
(
nextTaskId
);
AjaxResult
taskGroupName
=
Workflow
.
taskClient
.
getTaskGroupName
(
nextTaskId
);
JSONArray
data
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
JSONArray
data
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
for
(
Object
datum
:
data
)
{
for
(
Object
datum
:
data
)
{
...
@@ -393,8 +427,8 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -393,8 +427,8 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
if
(!
ObjectUtils
.
isEmpty
(
taskNam
e
))
{
if
(!
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
().
equals
(
taskCod
e
))
{
jgScrapCancel
.
setAuditStatus
(
CancelWorkFlowStatusEnum
.
getMessage
(
taskNam
e
).
getRollBack
());
jgScrapCancel
.
setAuditStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCod
e
).
getRollBack
());
}
}
String
join
=
String
.
join
(
","
,
roleList
);
String
join
=
String
.
join
(
","
,
roleList
);
jgScrapCancel
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
jgScrapCancel
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
...
@@ -430,7 +464,8 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -430,7 +464,8 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
public
void
updateExecuteIds
(
String
instanceId
,
Long
sequenceNbr
,
String
operate
)
{
public
void
updateExecuteIds
(
String
instanceId
,
Long
sequenceNbr
,
String
operate
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
role
=
""
;
String
role
=
""
;
String
taskName
=
"流程结束"
;
// String taskName = "流程结束";
String
taskCode
=
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
();
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
JgScrapCancel
jgScrapCancel
=
this
.
getBaseMapper
().
selectById
(
sequenceNbr
);
JgScrapCancel
jgScrapCancel
=
this
.
getBaseMapper
().
selectById
(
sequenceNbr
);
try
{
try
{
...
@@ -439,7 +474,10 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -439,7 +474,10 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
if
(!
ObjectUtils
.
isEmpty
(
taskNoAuth
.
get
(
"data"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
taskNoAuth
.
get
(
"data"
)))
{
JSONObject
nextTask
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskNoAuth
.
get
(
"data"
)));
JSONObject
nextTask
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskNoAuth
.
get
(
"data"
)));
String
nextTaskId
=
nextTask
.
getString
(
"id"
);
String
nextTaskId
=
nextTask
.
getString
(
"id"
);
taskName
=
nextTask
.
getString
(
"name"
);
FeignClientResult
<
JSONObject
>
nodeInfo
=
workFlowFeginService
.
getNodeInfo
(
nextTaskId
);
JSONObject
result
=
nodeInfo
.
getResult
();
Map
<
String
,
Object
>
taskInfo
=
(
Map
<
String
,
Object
>)
result
.
get
(
"taskInfo"
);
taskCode
=
String
.
valueOf
(
taskInfo
.
get
(
"taskDefinitionKey"
));
AjaxResult
taskGroupName
=
Workflow
.
taskClient
.
getTaskGroupName
(
nextTaskId
);
AjaxResult
taskGroupName
=
Workflow
.
taskClient
.
getTaskGroupName
(
nextTaskId
);
JSONArray
data
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
JSONArray
data
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
for
(
Object
datum
:
data
)
{
for
(
Object
datum
:
data
)
{
...
@@ -451,7 +489,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -451,7 +489,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
if
(!
"流程结束"
.
equals
(
taskNam
e
))
{
if
(!
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
().
equals
(
taskCod
e
))
{
role
=
String
.
join
(
","
,
roleList
);
role
=
String
.
join
(
","
,
roleList
);
jgScrapCancel
.
setNextExecuteIds
(
role
);
jgScrapCancel
.
setNextExecuteIds
(
role
);
jgScrapCancel
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
jgScrapCancel
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
...
@@ -463,10 +501,10 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -463,10 +501,10 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
}
}
if
(
"0"
.
equals
(
operate
))
{
if
(
"0"
.
equals
(
operate
))
{
// 通过操作
// 通过操作
jgScrapCancel
.
setAuditStatus
(
CancelWorkFlowStatusEnum
.
getMessage
(
taskNam
e
).
getPass
());
jgScrapCancel
.
setAuditStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCod
e
).
getPass
());
}
else
{
}
else
{
// 驳回操作
// 驳回操作
jgScrapCancel
.
setAuditStatus
(
CancelWorkFlowStatusEnum
.
getMessage
(
taskNam
e
).
getReject
());
jgScrapCancel
.
setAuditStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCod
e
).
getReject
());
jgScrapCancel
.
setPromoter
(
null
);
jgScrapCancel
.
setPromoter
(
null
);
}
}
}
else
{
}
else
{
...
@@ -500,7 +538,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -500,7 +538,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
}
}
resultMap
.
put
(
jgScrapCancelEq
.
getEquId
(),
map1
);
resultMap
.
put
(
jgScrapCancelEq
.
getEquId
(),
map1
);
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
resultMap
);
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
resultMap
);
jgScrapCancel
.
setAuditStatus
(
CancelWorkFlowStatusEnum
.
COMPLETE
.
getName
());
jgScrapCancel
.
setAuditStatus
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
jgScrapCancel
.
setAuditPassDate
(
new
Date
());
jgScrapCancel
.
setAuditPassDate
(
new
Date
());
}
}
this
.
getBaseMapper
().
updateById
(
jgScrapCancel
);
this
.
getBaseMapper
().
updateById
(
jgScrapCancel
);
...
...
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