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
d18ae757
Commit
d18ae757
authored
Jun 20, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):所有业务在删除业务单子时,中止流程,及删除暂存代办和流程代办
parent
410eff12
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
102 additions
and
58 deletions
+102
-58
JgChangeRegistrationUnitController.java
...jg/biz/controller/JgChangeRegistrationUnitController.java
+3
-3
JgInstallationNoticeController.java
...ule/jg/biz/controller/JgInstallationNoticeController.java
+3
-2
JgTransferNoticeController.java
.../module/jg/biz/controller/JgTransferNoticeController.java
+3
-2
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+29
-5
JgChangeRegistrationNameServiceImpl.java
...biz/service/impl/JgChangeRegistrationNameServiceImpl.java
+5
-2
JgChangeRegistrationReformServiceImpl.java
...z/service/impl/JgChangeRegistrationReformServiceImpl.java
+5
-2
JgChangeRegistrationTransferServiceImpl.java
...service/impl/JgChangeRegistrationTransferServiceImpl.java
+5
-2
JgChangeRegistrationUnitServiceImpl.java
...biz/service/impl/JgChangeRegistrationUnitServiceImpl.java
+1
-1
JgEnableDisableServiceImpl.java
...odule/jg/biz/service/impl/JgEnableDisableServiceImpl.java
+2
-2
JgEquipTransferServiceImpl.java
...odule/jg/biz/service/impl/JgEquipTransferServiceImpl.java
+2
-2
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+11
-9
JgMaintainNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgMaintainNoticeServiceImpl.java
+4
-3
JgMaintenanceContractServiceImpl.java
...jg/biz/service/impl/JgMaintenanceContractServiceImpl.java
+3
-3
JgReformNoticeServiceImpl.java
...module/jg/biz/service/impl/JgReformNoticeServiceImpl.java
+2
-2
JgScrapCancelServiceImpl.java
.../module/jg/biz/service/impl/JgScrapCancelServiceImpl.java
+2
-2
JgTransferNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgTransferNoticeServiceImpl.java
+9
-9
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+7
-4
JgVehicleInformationServiceImpl.java
.../jg/biz/service/impl/JgVehicleInformationServiceImpl.java
+6
-3
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgChangeRegistrationUnitController.java
View file @
d18ae757
...
...
@@ -97,12 +97,12 @@ public class JgChangeRegistrationUnitController extends BaseController {
@DeleteMapping
(
value
=
"/delete"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除单位变更"
,
notes
=
"根据sequenceNbr删除单位变更"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
@RequestParam
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
JgChangeRegistrationUnit
byId
=
jgChangeRegistrationUnitServiceImpl
.
getById
(
sequenceNbr
);
JgChangeRegistrationUnit
changeRegistrationUnit
=
jgChangeRegistrationUnitServiceImpl
.
getById
(
sequenceNbr
);
boolean
bool
=
jgChangeRegistrationUnitServiceImpl
.
removeById
(
sequenceNbr
);
if
(
bool
){
commonService
.
deleteTaskModel
(
sequenceNbr
+
""
);
commonService
.
deleteTaskModel
(
sequenceNbr
+
""
,
changeRegistrationUnit
.
getInstanceId
()
);
}
return
ResponseHelper
.
buildResponse
(
jgChangeRegistrationUnitServiceImpl
.
removeById
(
sequenceNbr
)
);
return
ResponseHelper
.
buildResponse
(
bool
);
}
/**
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgInstallationNoticeController.java
View file @
d18ae757
...
...
@@ -91,8 +91,9 @@ public class JgInstallationNoticeController extends BaseController {
@DeleteMapping
(
value
=
"/delete"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除安装告知"
,
notes
=
"根据sequenceNbr删除安装告知"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
@RequestParam
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
// 删除暂存的待办
commonService
.
deleteTaskModel
(
String
.
valueOf
(
sequenceNbr
));
// 删除待办 + 中止流程
JgInstallationNotice
jgInstallationNotice
=
iJgInstallationNoticeService
.
getBaseMapper
().
selectById
(
sequenceNbr
);
commonService
.
deleteTaskModel
(
String
.
valueOf
(
sequenceNbr
),
jgInstallationNotice
.
getInstanceId
());
return
ResponseHelper
.
buildResponse
(
iJgInstallationNoticeService
.
removeById
(
sequenceNbr
));
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgTransferNoticeController.java
View file @
d18ae757
...
...
@@ -101,8 +101,9 @@ public class JgTransferNoticeController extends BaseController {
@DeleteMapping
(
value
=
"/delete"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除移装造告知"
,
notes
=
"根据sequenceNbr删除移装造告知"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@RequestParam
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
// 删除暂存的待办
commonServiceImpl
.
deleteTaskModel
(
String
.
valueOf
(
sequenceNbr
));
// 删除待办 及 中止流程
JgTransferNotice
jgTransferNotice
=
jgTransferNoticeService
.
getBaseMapper
().
selectById
(
sequenceNbr
);
commonServiceImpl
.
deleteTaskModel
(
String
.
valueOf
(
sequenceNbr
),
jgTransferNotice
.
getInstanceId
());
return
ResponseHelper
.
buildResponse
(
jgTransferNoticeService
.
removeById
(
sequenceNbr
));
}
...
...
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/CommonServiceImpl.java
View file @
d18ae757
...
...
@@ -1285,15 +1285,39 @@ public class CommonServiceImpl implements ICommonService {
return
Boolean
.
FALSE
;
}
public
void
deleteTaskModel
(
String
id
)
{
List
<
TaskV2Model
>
result
=
taskV2FeignService
.
selectListByRelationId
(
id
).
getResult
();
if
(!
result
.
isEmpty
())
{
List
<
Long
>
idList
=
result
.
stream
().
map
(
TaskV2Model:
:
getSequenceNbr
).
collect
(
Collectors
.
toList
());
String
ids
=
idList
.
stream
().
map
(
Object:
:
toString
).
collect
(
Collectors
.
joining
(
","
));
/**
* 删除代办及中止流程
* @param businessId 业务seq
* @param instanceId 业务流程id
*/
public
void
deleteTaskModel
(
String
businessId
,
String
instanceId
)
{
// 删除暂存的代办
deleteTasksByRelationId
(
businessId
);
// 删除流程中的代办 及 中止流程
deleteTasksAndStopProcess
(
instanceId
,
"发起人主动删除业务单"
);
}
/**
* 删除代办 -根据任务关联
* @param relationId
*/
public
void
deleteTasksByRelationId
(
String
relationId
)
{
List
<
TaskV2Model
>
tasks
=
taskV2FeignService
.
selectListByRelationId
(
relationId
).
getResult
();
if
(!
tasks
.
isEmpty
())
{
String
ids
=
tasks
.
stream
()
.
map
(
TaskV2Model:
:
getSequenceNbr
)
.
map
(
Object:
:
toString
)
.
collect
(
Collectors
.
joining
(
","
));
taskV2FeignService
.
delete
(
ids
);
}
}
public
void
deleteTasksAndStopProcess
(
String
instanceId
,
String
reason
)
{
deleteTasksByRelationId
(
instanceId
);
// 中止流程
cmWorkflowService
.
stopProcess
(
instanceId
,
reason
);
}
/**
* 待办新增接口
**/
...
...
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/JgChangeRegistrationNameServiceImpl.java
View file @
d18ae757
...
...
@@ -227,7 +227,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
// 提交创建待办逻辑
if
(
"1"
.
equals
(
submitType
))
{
//提交时先删除之前的暂存待办数据
commonService
.
deleteTask
Model
(
dto
.
getSequenceNbr
()
+
""
);
commonService
.
deleteTask
sByRelationId
(
dto
.
getSequenceNbr
()
+
""
);
// 创建待办
TaskModelDto
taskModelDto
=
new
TaskModelDto
();
taskModelDto
.
setFlowCreateDate
(
dto
.
getApplyDate
());
...
...
@@ -457,7 +457,10 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
}
private
void
deleteTaskBatch
(
List
<
Long
>
ids
)
{
ids
.
forEach
(
id
->
commonService
.
deleteTaskModel
(
id
+
""
));
ids
.
forEach
(
id
->
{
JgChangeRegistrationName
jgChangeRegistrationName
=
this
.
baseMapper
.
selectById
(
id
);
commonService
.
deleteTaskModel
(
id
+
""
,
jgChangeRegistrationName
.
getInstanceId
());
});
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
...
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/JgChangeRegistrationReformServiceImpl.java
View file @
d18ae757
...
...
@@ -263,7 +263,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
updateExecuteIds
(
instanceId
,
jgChangeRegistrationReform
,
"startWorkfow"
,
processTaskDTO
);
List
<
TaskModelDto
>
taskModelDtoList
=
Arrays
.
asList
(
getTaskModelDtoList
(
jgChangeRegistrationReform
,
processTaskDTO
));
//启动之前删除暂存生成的待办
commonServiceImpl
.
deleteTask
Model
(
String
.
valueOf
(
jgChangeRegistrationReform
.
getSequenceNbr
()));
commonServiceImpl
.
deleteTask
sByRelationId
(
String
.
valueOf
(
jgChangeRegistrationReform
.
getSequenceNbr
()));
//重新生成新的待办数据
commonServiceImpl
.
buildTaskModel
(
taskModelDtoList
);
}
...
...
@@ -507,7 +507,10 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
jgChangeRegistrationReformEqMapper
.
delete
(
lambda1
);
jgRegistrationHistoryMapper
.
delete
(
new
QueryWrapper
<
JgRegistrationHistory
>().
in
(
"current_document_id"
,
applyNos
));
//删除暂存的待办
ids
.
forEach
(
id
->
commonServiceImpl
.
deleteTaskModel
(
String
.
valueOf
(
id
)));
ids
.
forEach
(
id
->
{
JgChangeRegistrationReform
registrationReform
=
this
.
baseMapper
.
selectById
(
id
);
commonServiceImpl
.
deleteTaskModel
(
String
.
valueOf
(
id
),
registrationReform
.
getInstanceId
());
});
}
@Override
...
...
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/JgChangeRegistrationTransferServiceImpl.java
View file @
d18ae757
...
...
@@ -351,7 +351,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
this
.
updateExecuteIds
(
instanceId
,
oldTransfer
,
"startWorkfow"
,
workflowResult
);
//删除旧的代办
commonService
.
deleteTask
Model
(
oldTransfer
.
getSequenceNbr
().
toString
());
commonService
.
deleteTask
sByRelationId
(
oldTransfer
.
getSequenceNbr
().
toString
());
//生成代办
this
.
createToDoTask
(
Arrays
.
asList
(
workflowResult
),
oldTransfer
,
submitType
);
}
...
...
@@ -560,7 +560,10 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
// 删除待办
private
void
deleteTaskBatch
(
List
<
Long
>
ids
)
{
ids
.
forEach
(
id
->
commonService
.
deleteTaskModel
(
id
+
""
));
ids
.
forEach
(
id
->
{
JgChangeRegistrationTransfer
jgChangeRegistrationTransfer
=
this
.
baseMapper
.
selectById
(
id
);
commonService
.
deleteTaskModel
(
id
+
""
,
jgChangeRegistrationTransfer
.
getInstanceId
());
});
}
/**
...
...
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/JgChangeRegistrationUnitServiceImpl.java
View file @
d18ae757
...
...
@@ -265,7 +265,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
notice
.
setStatus
(
WorkFlowStatusEnum
.
UNITCHANGE_RECEIVE
.
getPass
());
notice
.
setNextExecuteUserIds
(
nextUserIds
);
JgChangeRegistrationUnitMapper
.
updateById
(
notice
);
commonServiceImpl
.
deleteTask
Model
(
notice
.
getSequenceNbr
()+
""
);
commonServiceImpl
.
deleteTask
sByRelationId
(
notice
.
getSequenceNbr
()+
""
);
createTaskModel
(
notice
,
taskname
,
"1"
,
nextUserIds
);
commonServiceImpl
.
saveExecuteFlowData2Redis
(
notice
.
getInstanceId
(),
buildInstanceRuntimeData
(
notice
));
}
else
{
...
...
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/JgEnableDisableServiceImpl.java
View file @
d18ae757
...
...
@@ -354,7 +354,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
taskModelDtoList
.
add
(
taskModelDto
);
if
(
bool
)
{
// 删除暂存时生成的待办
commonService
.
deleteTask
Model
(
item
.
getSequenceNbr
()+
""
);
commonService
.
deleteTask
sByRelationId
(
item
.
getSequenceNbr
()+
""
);
}
});
if
(
bool
){
...
...
@@ -708,7 +708,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
lambda
.
eq
(
JgEnableDisableEq:
:
getEnableDisableApplyId
,
sequenceNbr
);
jgEnableDisableEqService
.
getBaseMapper
().
delete
(
lambda
);
// 删除暂存时生成的待办
commonService
.
deleteTask
Model
(
sequenceNbr
+
""
);
commonService
.
deleteTask
sByRelationId
(
sequenceNbr
+
""
);
}
public
Map
<
String
,
Object
>
getDetail
(
Long
sequenceNbr
)
{
...
...
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/JgEquipTransferServiceImpl.java
View file @
d18ae757
...
...
@@ -325,7 +325,7 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
updateById
(
transfer
);
//删除暂存
commonService
.
deleteTask
Model
(
transfer
.
getSequenceNbr
()
+
""
);
commonService
.
deleteTask
sByRelationId
(
transfer
.
getSequenceNbr
()
+
""
);
// 如果为保存并提交,则创建代办
this
.
buildTask
(
Collections
.
singletonList
(
transfer
),
Collections
.
singletonList
(
workflowResultDto
));
...
...
@@ -746,7 +746,7 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
Collection
<
JgEquipTransfer
>
jgEquipTransfers
=
this
.
listByIds
(
Arrays
.
asList
(
ids
));
for
(
JgEquipTransfer
notice
:
jgEquipTransfers
)
{
notice
.
setIsDelete
(
true
);
commonService
.
deleteTask
Model
(
String
.
valueOf
(
notice
.
getSequenceNbr
()));
commonService
.
deleteTask
sByRelationId
(
String
.
valueOf
(
notice
.
getSequenceNbr
()));
}
return
this
.
updateBatchById
(
jgEquipTransfers
);
}
...
...
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/JgInstallationNoticeServiceImpl.java
View file @
d18ae757
...
...
@@ -423,14 +423,16 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
return
false
;
}
Collection
<
JgInstallationNotice
>
jgInstallationNotices
=
this
.
listByIds
(
Arrays
.
asList
(
sequenceNbrs
));
jgInstallationNotices
.
forEach
(
notice
->
{
if
(
StringUtils
.
hasText
(
notice
.
getInspectUnitId
()))
{
throw
new
IllegalStateException
(
"所选数据已存在流程,不能删除!"
);
}
notice
.
setIsDelete
(
true
);
});
//
jgInstallationNotices.forEach(notice -> {
//
if (StringUtils.hasText(notice.getInspectUnitId())) {
//
throw new IllegalStateException("所选数据已存在流程,不能删除!");
//
}
//
notice.setIsDelete(true);
//
});
// 删除暂存的待办
jgInstallationNotices
.
forEach
(
id
->
commonService
.
deleteTaskModel
(
String
.
valueOf
(
id
.
getSequenceNbr
())));
jgInstallationNotices
.
forEach
(
installationNotice
->
{
commonService
.
deleteTaskModel
(
String
.
valueOf
(
installationNotice
.
getSequenceNbr
()),
installationNotice
.
getInstanceId
());
});
return
this
.
updateBatchById
(
jgInstallationNotices
);
}
...
...
@@ -655,7 +657,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
taskModelDtoList
.
add
(
taskModelDto
);
if
(
isDeleteDraft
)
{
// 删除暂存时生成的待办
commonService
.
deleteTask
Model
(
item
.
getSequenceNbr
()
+
""
);
commonService
.
deleteTask
sByRelationId
(
item
.
getSequenceNbr
()
+
""
);
}
});
commonService
.
buildTaskModel
(
taskModelDtoList
);
...
...
@@ -1298,7 +1300,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
// 1.写入历史表
this
.
saveHisDataBeforeUpdate
(
installationNotice
);
// 2.删除暂存时生成的待办
commonService
.
deleteTask
Model
(
installationNotice
.
getSequenceNbr
()
+
""
);
commonService
.
deleteTask
sByRelationId
(
installationNotice
.
getSequenceNbr
()
+
""
);
break
;
case
TO_BE_FINISHED:
// 已完成
// 1.删除之前完成时同步到一码通的施工信息
...
...
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/JgMaintainNoticeServiceImpl.java
View file @
d18ae757
...
...
@@ -391,8 +391,9 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
LambdaQueryWrapper
<
JgMaintainNoticeEq
>
lambda
=
new
QueryWrapper
<
JgMaintainNoticeEq
>().
lambda
();
lambda
.
eq
(
JgMaintainNoticeEq:
:
getEquipTransferId
,
sequenceNbr
);
jgMaintainNoticeEqMapper
.
delete
(
lambda
);
// 删除暂存时生成的待办
commonService
.
deleteTaskModel
(
sequenceNbr
+
""
);
// 删除待办 + 中止流程
JgMaintainNotice
jgMaintainNotice
=
this
.
baseMapper
.
selectById
(
sequenceNbr
);
commonService
.
deleteTaskModel
(
sequenceNbr
+
""
,
jgMaintainNotice
.
getInstanceId
());
return
true
;
}
...
...
@@ -548,7 +549,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
taskModelDtoList
.
add
(
taskModelDto
);
if
(
bool
)
{
// 删除暂存时生成的待办
commonService
.
deleteTask
Model
(
item
.
getSequenceNbr
()
+
""
);
commonService
.
deleteTask
sByRelationId
(
item
.
getSequenceNbr
()
+
""
);
}
});
commonService
.
buildTaskModel
(
taskModelDtoList
);
...
...
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/JgMaintenanceContractServiceImpl.java
View file @
d18ae757
...
...
@@ -260,7 +260,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
LambdaQueryWrapper
<
JgMaintenanceContractEq
>
queryWrapper
=
new
LambdaQueryWrapper
<
JgMaintenanceContractEq
>().
eq
(
JgMaintenanceContractEq:
:
getEquipTransferId
,
jgMaintenanceContract
.
getApplyNo
()).
eq
(
JgMaintenanceContractEq:
:
getIsDelete
,
false
);
List
<
Long
>
listSeq
=
jgMaintenanceContractEqService
.
list
(
queryWrapper
).
stream
().
map
(
JgMaintenanceContractEq:
:
getSequenceNbr
).
collect
(
Collectors
.
toList
());
commonService
.
deleteTaskModel
(
String
.
valueOf
(
jgMaintenanceContract
.
getSequenceNbr
()));
commonService
.
deleteTaskModel
(
String
.
valueOf
(
jgMaintenanceContract
.
getSequenceNbr
())
,
jgMaintenanceContract
.
getInstanceId
()
);
maintenanceContractEqMapper
.
deleteForBatch
(
listSeq
);
});
maintenanceContractMapper
.
deleteForBatch
(
list
);
...
...
@@ -482,7 +482,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
contract
.
setNextTaskId
(
nextTaskId
);
contract
.
setStatus
(
String
.
valueOf
(
WorkFlowStatusEnum
.
MAIN_RECEIVE
.
getPass
()));
contract
.
setNextExecuteUserIds
(
nextUserIds
);
commonService
.
deleteTask
Model
(
contract
.
getSequenceNbr
()
+
""
);
commonService
.
deleteTask
sByRelationId
(
contract
.
getSequenceNbr
()
+
""
);
// 创建待办
JgMaintenanceContract
bean
=
new
JgMaintenanceContract
();
BeanUtil
.
copyProperties
(
contract
,
bean
);
...
...
@@ -517,7 +517,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
contract
.
setStatus
(
String
.
valueOf
(
WorkFlowStatusEnum
.
MAIN_RECEIVE
.
getPass
()));
contract
.
setNextTaskId
(
nextTaskId
);
contract
.
setNextExecuteUserIds
(
nextUserIds
);
commonService
.
deleteTask
Model
(
contract
.
getSequenceNbr
()
+
""
);
commonService
.
deleteTask
sByRelationId
(
contract
.
getSequenceNbr
()
+
""
);
executeOneStep
(
contract
,
taskName
,
nextUserIds
,
"0"
);
// redis流程实时数据更新
...
...
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/JgReformNoticeServiceImpl.java
View file @
d18ae757
...
...
@@ -210,7 +210,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
jgReformNoticeMapper
.
updateById
(
notice
);
// 删除暂存
commonService
.
deleteTask
Model
(
notice
.
getSequenceNbr
()
+
""
);
commonService
.
deleteTask
sByRelationId
(
notice
.
getSequenceNbr
()
+
""
);
// 如果为保存并提交,则创建代办
this
.
buildTask
(
Collections
.
singletonList
(
notice
),
Collections
.
singletonList
(
workflowResultDto
));
}
else
{
...
...
@@ -309,7 +309,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
// throw new IllegalStateException("所选数据已存在流程,不能删除!");
// }
notice
.
setIsDelete
(
true
);
commonService
.
deleteTaskModel
(
String
.
valueOf
(
notice
.
getSequenceNbr
()));
commonService
.
deleteTaskModel
(
String
.
valueOf
(
notice
.
getSequenceNbr
())
,
notice
.
getInstanceId
()
);
});
return
this
.
updateBatchById
(
JgReformNotices
);
...
...
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 @
d18ae757
...
...
@@ -337,7 +337,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
lambda
.
eq
(
JgScrapCancel:
:
getSequenceNbr
,
id
);
JgScrapCancel
jgScrapCancel
=
this
.
baseMapper
.
selectOne
(
lambda
);
// 删除代办消息
commonService
.
deleteTaskModel
(
String
.
valueOf
(
jgScrapCancel
.
getSequenceNbr
()));
commonService
.
deleteTaskModel
(
String
.
valueOf
(
jgScrapCancel
.
getSequenceNbr
())
,
jgScrapCancel
.
getInstanceId
()
);
// 更新jgScrapCancel数据
jgScrapCancel
.
setIsDelete
(
true
);
this
.
updateById
(
jgScrapCancel
);
...
...
@@ -386,7 +386,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
// 创建待办
JgScrapCancel
bean
=
new
JgScrapCancel
();
BeanUtil
.
copyProperties
(
jgScrapCancelDto
,
bean
);
commonService
.
deleteTask
Model
(
String
.
valueOf
(
jgScrapCancelDto
.
getSequenceNbr
()));
commonService
.
deleteTask
sByRelationId
(
String
.
valueOf
(
jgScrapCancelDto
.
getSequenceNbr
()));
createTaskModel
(
bean
,
taskName
,
"1"
,
nextUserIds
);
}
else
{
// 已经在流程中,执行一步
...
...
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/JgTransferNoticeServiceImpl.java
View file @
d18ae757
...
...
@@ -195,14 +195,14 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
return
false
;
}
Collection
<
JgTransferNotice
>
jgTransferNotices
=
this
.
listByIds
(
Arrays
.
asList
(
sequenceNbrs
));
jgTransferNotices
.
forEach
(
notice
->
{
if
(
StringUtils
.
hasText
(
notice
.
getInspectionUnitCreditCode
()))
{
throw
new
IllegalStateException
(
"所选数据已存在流程,不能删除!"
);
}
notice
.
setIsDelete
(
true
);
});
// 删除
暂存的待办
jgTransferNotices
.
forEach
(
id
->
commonService
.
deleteTaskModel
(
String
.
valueOf
(
id
.
getSequenceNbr
()
)));
//
jgTransferNotices.forEach(notice -> {
//
if (StringUtils.hasText(notice.getInspectionUnitCreditCode())) {
//
throw new IllegalStateException("所选数据已存在流程,不能删除!");
//
}
//
notice.setIsDelete(true);
//
});
// 删除
待办及中止流程
jgTransferNotices
.
forEach
(
jgTransferNotice
->
commonService
.
deleteTaskModel
(
String
.
valueOf
(
jgTransferNotice
.
getSequenceNbr
()),
jgTransferNotice
.
getInstanceId
(
)));
return
this
.
updateBatchById
(
jgTransferNotices
);
}
...
...
@@ -531,7 +531,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
taskModelDtoList
.
add
(
taskModelDto
);
if
(
isDeleteDraft
)
{
// 删除暂存时生成的待办
commonService
.
deleteTask
Model
(
item
.
getSequenceNbr
()
+
""
);
commonService
.
deleteTask
sByRelationId
(
item
.
getSequenceNbr
()
+
""
);
}
});
commonService
.
buildTaskModel
(
taskModelDtoList
);
...
...
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/JgUseRegistrationServiceImpl.java
View file @
d18ae757
...
...
@@ -508,7 +508,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
updateHistory
(
map
,
map
.
get
(
"equipId"
).
toString
(),
String
.
valueOf
(
jgUseRegistration
.
getSequenceNbr
()),
jgUseRegistration
.
getSupervisoryCode
());
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"submit"
)))
{
// 删除暂存代办
commonServiceImpl
.
deleteTask
Model
(
String
.
valueOf
(
jgUseRegistration
.
getSequenceNbr
()));
commonServiceImpl
.
deleteTask
sByRelationId
(
String
.
valueOf
(
jgUseRegistration
.
getSequenceNbr
()));
String
instanceId
=
""
;
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"instanceId"
)))
{
instanceId
=
map
.
get
(
"instanceId"
).
toString
();
...
...
@@ -715,7 +715,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 启动流程
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"submit"
)))
{
// 删除暂存代办
commonServiceImpl
.
deleteTask
Model
(
String
.
valueOf
(
useRegistration
.
getSequenceNbr
()));
commonServiceImpl
.
deleteTask
sByRelationId
(
String
.
valueOf
(
useRegistration
.
getSequenceNbr
()));
// 新增提交,没有instanceId需要发起流程
if
(
StringUtils
.
isEmpty
(
useRegistration
.
getInstanceId
()))
{
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
...
...
@@ -1301,7 +1301,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
LambdaQueryWrapper
<
JgUseRegistration
>
lambda
=
new
QueryWrapper
<
JgUseRegistration
>().
lambda
();
lambda
.
in
(
JgUseRegistration:
:
getSequenceNbr
,
ids
);
// 删除暂存的待办
ids
.
forEach
(
id
->
commonServiceImpl
.
deleteTaskModel
(
String
.
valueOf
(
id
)));
ids
.
forEach
(
id
->
{
JgUseRegistration
useRegistration
=
this
.
baseMapper
.
selectById
(
id
);
commonServiceImpl
.
deleteTaskModel
(
String
.
valueOf
(
id
),
useRegistration
.
getInstanceId
());
});
this
.
update
(
jgUseRegistration
,
lambda
);
}
...
...
@@ -1933,7 +1936,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
switch
(
flowStatus
)
{
case
"使用单位待提交"
:
// 1.删除暂存时生成的待办
commonServiceImpl
.
deleteTask
Model
(
jgUseRegistration
.
getSequenceNbr
()
+
""
);
commonServiceImpl
.
deleteTask
sByRelationId
(
jgUseRegistration
.
getSequenceNbr
()
+
""
);
break
;
case
"已完成"
:
// 1.删除与设备的关系,设备可再次发起使用登记
...
...
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/JgVehicleInformationServiceImpl.java
View file @
d18ae757
...
...
@@ -648,7 +648,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
jgVehicleInformation
.
setNextTaskId
(
workflowResultDto
.
getNextTaskId
());
jgVehicleInformation
.
setNextExecuteUserIds
(
workflowResultDto
.
getNextExecutorUserIds
());
commonService
.
deleteTask
Model
(
sequenceNbr
+
""
);
commonService
.
deleteTask
sByRelationId
(
sequenceNbr
+
""
);
if
(
isFirst
)
{
jgVehicleInformation
.
setInstanceStatus
(
workflowResultDto
.
getExecutorRoleIds
());
jgVehicleInformation
.
setInstanceId
(
workflowResultDto
.
getInstanceId
());
...
...
@@ -836,7 +836,10 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
LambdaQueryWrapper
<
JgVehicleInformation
>
lambda
=
new
QueryWrapper
<
JgVehicleInformation
>().
lambda
();
lambda
.
in
(
JgVehicleInformation:
:
getSequenceNbr
,
ids
);
// 删除暂存的待办
ids
.
forEach
(
id
->
commonService
.
deleteTaskModel
(
String
.
valueOf
(
id
)));
ids
.
forEach
(
id
->
{
JgVehicleInformation
vehicleInformation
=
this
.
baseMapper
.
selectById
(
id
);
commonService
.
deleteTaskModel
(
String
.
valueOf
(
id
),
vehicleInformation
.
getInstanceId
());
});
this
.
update
(
jgVehicleInformation
,
lambda
);
}
...
...
@@ -1222,7 +1225,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
switch
(
flowStatus
)
{
case
"使用单位待提交"
:
// 1.删除暂存时生成的待办
commonService
.
deleteTask
Model
(
vehicleInformation
.
getSequenceNbr
()
+
""
);
commonService
.
deleteTask
sByRelationId
(
vehicleInformation
.
getSequenceNbr
()
+
""
);
break
;
case
"已完成"
:
// 1.删除与设备的关系,设备可再次发起使用登记
...
...
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