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
2fc3dae0
Commit
2fc3dae0
authored
Jul 23, 2024
by
王果
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修改
parent
0e11a734
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
24 deletions
+14
-24
JgTransferNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgTransferNoticeServiceImpl.java
+14
-24
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/service/impl/JgTransferNoticeServiceImpl.java
View file @
2fc3dae0
...
@@ -206,8 +206,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -206,8 +206,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
}
}
private
void
checkRepeatUsed
(
List
<
Map
<
String
,
Object
>>
deviceList
,
JgTransferNotice
notice
)
{
private
void
checkRepeatUsed
(
List
<
Map
<
String
,
Object
>>
deviceList
,
JgTransferNotice
notice
)
{
deviceList
.
forEach
(
obj
->
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
PROCESS_DEFINITION_KEY
)
deviceList
.
forEach
(
obj
->
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
PROCESS_DEFINITION_KEY
).
equipRepeatUsedCheck
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)),
notice
.
getInstallUnitCreditCode
()));
.
equipRepeatUsedCheck
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)),
notice
.
getInstallUnitCreditCode
()));
}
}
private
void
repeatUsedEquipCheck
(
List
<
Map
<
String
,
Object
>>
equipList
,
String
companyCode
)
{
private
void
repeatUsedEquipCheck
(
List
<
Map
<
String
,
Object
>>
equipList
,
String
companyCode
)
{
...
@@ -221,16 +220,17 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -221,16 +220,17 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
if
(
NOT_FLOWING_STATE
.
contains
(
notice
.
getNoticeStatus
()))
{
if
(
NOT_FLOWING_STATE
.
contains
(
notice
.
getNoticeStatus
()))
{
LambdaQueryWrapper
<
JgTransferNoticeEq
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
JgTransferNoticeEq
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
JgTransferNoticeEq:
:
getEquipTransferId
,
notice
.
getSequenceNbr
());
queryWrapper
.
eq
(
JgTransferNoticeEq:
:
getEquipTransferId
,
notice
.
getSequenceNbr
());
JgTransferNoticeEq
noticeEq
=
jgTransferNoticeEqMapper
.
selectOne
(
queryWrapper
);
List
<
JgTransferNoticeEq
>
jgTransferNoticeEqs
=
jgTransferNoticeEqMapper
.
selectList
(
queryWrapper
);
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
PROCESS_DEFINITION_KEY
)
for
(
JgTransferNoticeEq
noticeEq
:
jgTransferNoticeEqs
)
{
.
delDataForCheckEquipRepeatUsed
(
Collections
.
singletonList
(
noticeEq
.
getEquId
()),
notice
.
getInstallUnitCreditCode
());
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
PROCESS_DEFINITION_KEY
)
.
delDataForCheckEquipRepeatUsed
(
Collections
.
singletonList
(
noticeEq
.
getEquId
()),
notice
.
getInstallUnitCreditCode
());
}
}
}
}
}
private
void
rollBackForDelRedisData
()
{
private
void
rollBackForDelRedisData
()
{
FlowingEquipRedisContext
.
getContext
().
forEach
(
e
->
{
FlowingEquipRedisContext
.
getContext
().
forEach
(
e
->
{
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
PROCESS_DEFINITION_KEY
)
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
PROCESS_DEFINITION_KEY
).
delDataForCheckWithKey
(
e
.
getData
(),
e
.
getRedisKey
());
.
delDataForCheckWithKey
(
e
.
getData
(),
e
.
getRedisKey
());
});
});
}
}
...
@@ -266,11 +266,9 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -266,11 +266,9 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
// 删除业务单
// 删除业务单
this
.
getBaseMapper
().
deleteById
(
sequenceNbr
);
this
.
getBaseMapper
().
deleteById
(
sequenceNbr
);
// 删除对应eq
// 删除对应eq
jgTransferNoticeEqMapper
.
delete
(
new
LambdaQueryWrapper
<
JgTransferNoticeEq
>()
jgTransferNoticeEqMapper
.
delete
(
new
LambdaQueryWrapper
<
JgTransferNoticeEq
>().
eq
(
JgTransferNoticeEq:
:
getEquipTransferId
,
sequenceNbr
));
.
eq
(
JgTransferNoticeEq:
:
getEquipTransferId
,
sequenceNbr
));
// 删除单子对应历史表数据
// 删除单子对应历史表数据
jgRegistrationHistoryMapper
.
delete
(
new
LambdaQueryWrapper
<
JgRegistrationHistory
>()
jgRegistrationHistoryMapper
.
delete
(
new
LambdaQueryWrapper
<
JgRegistrationHistory
>().
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
jgTransferNotice
.
getSequenceNbr
()));
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
jgTransferNotice
.
getSequenceNbr
()));
}
}
return
Boolean
.
TRUE
;
return
Boolean
.
TRUE
;
}
}
...
@@ -560,10 +558,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -560,10 +558,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
/**
/**
* 组装业务数据
* 组装业务数据
*/
*/
private
void
businessData
(
String
submitType
,
ReginParams
reginParams
,
JgTransferNoticeDto
model
,
private
void
businessData
(
String
submitType
,
ReginParams
reginParams
,
JgTransferNoticeDto
model
,
List
<
Map
<
String
,
Object
>>
deviceList
,
ResponseModel
<
List
<
String
>>
responseModel
,
List
<
WorkflowResultDto
>
workflowResultList
,
List
<
JgTransferNotice
>
list
,
List
<
JgTransferNoticeEq
>
equipList
)
{
List
<
Map
<
String
,
Object
>>
deviceList
,
ResponseModel
<
List
<
String
>>
responseModel
,
List
<
WorkflowResultDto
>
workflowResultList
,
List
<
JgTransferNotice
>
list
,
List
<
JgTransferNoticeEq
>
equipList
)
{
CompanyBo
companyBo
=
commonService
.
getOneCompany
(
model
.
getReceiveCompanyCode
());
CompanyBo
companyBo
=
commonService
.
getOneCompany
(
model
.
getReceiveCompanyCode
());
JgTransferNotice
dto
=
new
JgTransferNotice
();
JgTransferNotice
dto
=
new
JgTransferNotice
();
BeanUtils
.
copyProperties
(
model
,
dto
);
BeanUtils
.
copyProperties
(
model
,
dto
);
...
@@ -757,6 +752,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -757,6 +752,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@GlobalTransactional
(
rollbackFor
=
Exception
.
class
)
public
void
cancel
(
JgTransferNoticeDto
noticeDto
)
{
public
void
cancel
(
JgTransferNoticeDto
noticeDto
)
{
String
instanceId
=
noticeDto
.
getInstanceId
();
String
instanceId
=
noticeDto
.
getInstanceId
();
String
nextTaskId
=
noticeDto
.
getNextTaskId
();
String
nextTaskId
=
noticeDto
.
getNextTaskId
();
...
@@ -803,11 +799,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -803,11 +799,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
public
InstanceRuntimeData
buildInstanceRuntimeData
(
JgTransferNotice
jgTransferNotice
)
{
public
InstanceRuntimeData
buildInstanceRuntimeData
(
JgTransferNotice
jgTransferNotice
)
{
return
InstanceRuntimeData
.
builder
()
return
InstanceRuntimeData
.
builder
().
nextExecuteUserIds
(
jgTransferNotice
.
getNextExecuteUserIds
()).
promoter
(
jgTransferNotice
.
getPromoter
()).
nextTaskId
(
jgTransferNotice
.
getNextTaskId
()).
build
();
.
nextExecuteUserIds
(
jgTransferNotice
.
getNextExecuteUserIds
())
.
promoter
(
jgTransferNotice
.
getPromoter
())
.
nextTaskId
(
jgTransferNotice
.
getNextTaskId
())
.
build
();
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
@@ -853,8 +845,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -853,8 +845,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
LambdaQueryWrapper
<
RegistrationInfo
>
queryWrapper2
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
RegistrationInfo
>
queryWrapper2
=
new
LambdaQueryWrapper
<>();
queryWrapper2
.
eq
(
RegistrationInfo:
:
getRecord
,
jgTransferNoticeEq
.
getEquId
());
queryWrapper2
.
eq
(
RegistrationInfo:
:
getRecord
,
jgTransferNoticeEq
.
getEquId
());
RegistrationInfo
tzsJgRegistrationInfo
=
tzsJgRegistrationInfoMapper
.
selectOne
(
queryWrapper2
);
RegistrationInfo
tzsJgRegistrationInfo
=
tzsJgRegistrationInfoMapper
.
selectOne
(
queryWrapper2
);
String
equCode
=
Optional
.
ofNullable
(
tzsJgRegistrationInfo
.
getEquDefine
())
String
equCode
=
Optional
.
ofNullable
(
tzsJgRegistrationInfo
.
getEquDefine
()).
orElse
(
tzsJgRegistrationInfo
.
getEquCategory
());
.
orElse
(
tzsJgRegistrationInfo
.
getEquCategory
());
String
registrationCode
=
equCode
+
jgTransferNotice
.
getReceiveCompanyCode
()
+
ym
;
String
registrationCode
=
equCode
+
jgTransferNotice
.
getReceiveCompanyCode
()
+
ym
;
ResponseModel
<
String
>
responseModel
=
tzsServiceFeignClient
.
deviceRegistrationCode
(
registrationCode
);
ResponseModel
<
String
>
responseModel
=
tzsServiceFeignClient
.
deviceRegistrationCode
(
registrationCode
);
String
deviceRegistrationCode
=
responseModel
.
getResult
();
String
deviceRegistrationCode
=
responseModel
.
getResult
();
...
@@ -988,8 +979,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -988,8 +979,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
Iterable
<
ESEquipmentCategoryDto
>
allById
=
esEquipmentCategory
.
findAllById
(
ids
);
Iterable
<
ESEquipmentCategoryDto
>
allById
=
esEquipmentCategory
.
findAllById
(
ids
);
List
<
Map
<
String
,
Object
>>
equipListMaps
=
getEquipListMaps
(
allById
);
List
<
Map
<
String
,
Object
>>
equipListMaps
=
getEquipListMaps
(
allById
);
json
.
put
(
"deviceList"
,
equipListMaps
);
json
.
put
(
"deviceList"
,
equipListMaps
);
commonService
.
saveOrUpdateHistory
(
BusinessTypeEnum
.
JG_ADVICE_REMOVAL
.
getName
(),
commonService
.
saveOrUpdateHistory
(
BusinessTypeEnum
.
JG_ADVICE_REMOVAL
.
getName
(),
json
,
equId
,
jgTransferNotice
.
getSequenceNbr
().
toString
());
json
,
equId
,
jgTransferNotice
.
getSequenceNbr
().
toString
());
}
}
...
...
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