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
b828b72b
Commit
b828b72b
authored
Sep 25, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.redis缓存的流程数据在事务回滚后可能和数据库数据不一致问题处理,增加补偿机制
parent
443323dc
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
205 additions
and
18 deletions
+205
-18
JgChangeRegistrationNameServiceImpl.java
...biz/service/impl/JgChangeRegistrationNameServiceImpl.java
+14
-1
JgChangeRegistrationReformServiceImpl.java
...z/service/impl/JgChangeRegistrationReformServiceImpl.java
+13
-1
JgChangeRegistrationTransferServiceImpl.java
...service/impl/JgChangeRegistrationTransferServiceImpl.java
+14
-5
JgChangeRegistrationUnitServiceImpl.java
...biz/service/impl/JgChangeRegistrationUnitServiceImpl.java
+15
-1
JgChangeVehicleRegistrationUnitServiceImpl.java
...vice/impl/JgChangeVehicleRegistrationUnitServiceImpl.java
+14
-1
JgEnableDisableServiceImpl.java
...odule/jg/biz/service/impl/JgEnableDisableServiceImpl.java
+14
-1
JgEquipTransferServiceImpl.java
...odule/jg/biz/service/impl/JgEquipTransferServiceImpl.java
+15
-1
JgMaintainNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgMaintainNoticeServiceImpl.java
+15
-1
JgMaintenanceContractServiceImpl.java
...jg/biz/service/impl/JgMaintenanceContractServiceImpl.java
+24
-1
JgReformNoticeServiceImpl.java
...module/jg/biz/service/impl/JgReformNoticeServiceImpl.java
+15
-1
JgScrapCancelServiceImpl.java
.../module/jg/biz/service/impl/JgScrapCancelServiceImpl.java
+15
-1
JgTransferNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgTransferNoticeServiceImpl.java
+14
-1
JgVehicleInformationServiceImpl.java
.../jg/biz/service/impl/JgVehicleInformationServiceImpl.java
+23
-2
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/JgChangeRegistrationNameServiceImpl.java
View file @
b828b72b
...
@@ -25,6 +25,7 @@ import com.yeejoin.amos.boot.module.jg.biz.context.FlowingEquipRedisContext;
...
@@ -25,6 +25,7 @@ import com.yeejoin.amos.boot.module.jg.biz.context.FlowingEquipRedisContext;
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.ICmWorkflowService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.WorkFlowFeignService
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.WorkFlowFeignService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICompensateFlowDataOfRedis
;
import
com.yeejoin.amos.boot.module.ymt.api.common.StringUtil
;
import
com.yeejoin.amos.boot.module.ymt.api.common.StringUtil
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.UseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.UseInfo
;
...
@@ -71,7 +72,7 @@ import java.util.stream.Collectors;
...
@@ -71,7 +72,7 @@ import java.util.stream.Collectors;
* @date 2023-12-25
* @date 2023-12-25
*/
*/
@Service
@Service
public
class
JgChangeRegistrationNameServiceImpl
extends
BaseService
<
JgChangeRegistrationNameDto
,
JgChangeRegistrationName
,
JgChangeRegistrationNameMapper
>
implements
IJgChangeRegistrationNameService
{
public
class
JgChangeRegistrationNameServiceImpl
extends
BaseService
<
JgChangeRegistrationNameDto
,
JgChangeRegistrationName
,
JgChangeRegistrationNameMapper
>
implements
IJgChangeRegistrationNameService
,
ICompensateFlowDataOfRedis
<
JgChangeRegistrationName
>
{
@Autowired
@Autowired
private
JgChangeRegistrationNameEqServiceImpl
jgChangeRegistrationNameEqService
;
private
JgChangeRegistrationNameEqServiceImpl
jgChangeRegistrationNameEqService
;
...
@@ -1007,6 +1008,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
...
@@ -1007,6 +1008,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(!
Objects
.
isNull
(
sequenceNbr
))
{
if
(!
Objects
.
isNull
(
sequenceNbr
))
{
jgChangeRegistrationName
=
this
.
baseMapper
.
selectById
(
sequenceNbr
);
jgChangeRegistrationName
=
this
.
baseMapper
.
selectById
(
sequenceNbr
);
this
.
doCompensate
(
jgChangeRegistrationName
);
jgChangeRegistrationName
.
setReceiveOrgCode
(
jgChangeRegistrationName
.
getReceiveCompanyCode
()
+
"_"
+
jgChangeRegistrationName
.
getReceiveOrgName
());
jgChangeRegistrationName
.
setReceiveOrgCode
(
jgChangeRegistrationName
.
getReceiveCompanyCode
()
+
"_"
+
jgChangeRegistrationName
.
getReceiveOrgName
());
// 页面可编辑(当前登录人是发起人)且符合这个 监管机构 false
// 页面可编辑(当前登录人是发起人)且符合这个 监管机构 false
if
(!
JG_COMAPNY_TYPE
.
equals
(
reginParams
.
getCompany
().
getCompanyType
()))
{
if
(!
JG_COMAPNY_TYPE
.
equals
(
reginParams
.
getCompany
().
getCompanyType
()))
{
...
@@ -1061,4 +1063,15 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
...
@@ -1061,4 +1063,15 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
SortVo
sortMap
=
commonService
.
sortFieldConversion
(
sort
);
SortVo
sortMap
=
commonService
.
sortFieldConversion
(
sort
);
return
this
.
baseMapper
.
getListPage
(
page
,
sortMap
,
dto
,
roleIds
,
companyCode
,
RequestContext
.
getExeUserId
());
return
this
.
baseMapper
.
getListPage
(
page
,
sortMap
,
dto
,
roleIds
,
companyCode
,
RequestContext
.
getExeUserId
());
}
}
@Override
public
boolean
beforeCheck
(
JgChangeRegistrationName
jgChangeRegistrationName
)
{
return
jgChangeRegistrationName
.
getInstanceId
()
!=
null
&&
!
jgChangeRegistrationName
.
getAuditStatus
().
equals
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
())
&&!
jgChangeRegistrationName
.
getAuditStatus
().
equals
(
FlowStatusEnum
.
TO_BE_DISCARD
.
getName
());
}
@Override
public
void
compensate
(
JgChangeRegistrationName
jgChangeRegistrationName
)
{
commonService
.
saveExecuteFlowData2Redis
(
jgChangeRegistrationName
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgChangeRegistrationName
));
}
}
}
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 @
b828b72b
...
@@ -72,7 +72,7 @@ import static java.util.stream.Collectors.toList;
...
@@ -72,7 +72,7 @@ import static java.util.stream.Collectors.toList;
*/
*/
@Service
@Service
@Slf4j
@Slf4j
public
class
JgChangeRegistrationReformServiceImpl
extends
BaseService
<
JgChangeRegistrationReformDto
,
JgChangeRegistrationReform
,
JgChangeRegistrationReformMapper
>
implements
IJgChangeRegistrationReformService
{
public
class
JgChangeRegistrationReformServiceImpl
extends
BaseService
<
JgChangeRegistrationReformDto
,
JgChangeRegistrationReform
,
JgChangeRegistrationReformMapper
>
implements
IJgChangeRegistrationReformService
,
ICompensateFlowDataOfRedis
<
JgChangeRegistrationReform
>
{
private
final
List
<
String
>
NOT_FLOWING_STATE
=
Arrays
.
asList
(
"使用单位待提交"
,
"一级受理已驳回"
,
"使用单位已撤回"
,
"已作废"
,
"已完成"
);
private
final
List
<
String
>
NOT_FLOWING_STATE
=
Arrays
.
asList
(
"使用单位待提交"
,
"一级受理已驳回"
,
"使用单位已撤回"
,
"已作废"
,
"已完成"
);
...
@@ -637,6 +637,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -637,6 +637,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
if
(
ObjectUtils
.
isEmpty
(
equipId
))
{
if
(
ObjectUtils
.
isEmpty
(
equipId
))
{
equipId
=
jgChangeRegistrationReformEqMapper
.
selectEquipId
(
currentDocumentId
);
equipId
=
jgChangeRegistrationReformEqMapper
.
selectEquipId
(
currentDocumentId
);
}
}
this
.
doCompensate
(
jgChangeRegistrationReform
);
Map
<
String
,
Object
>
detail
=
new
HashMap
<>();
Map
<
String
,
Object
>
detail
=
new
HashMap
<>();
Map
<
String
,
Object
>
originalData
=
new
HashMap
<>();
Map
<
String
,
Object
>
originalData
=
new
HashMap
<>();
Map
<
String
,
Object
>
originalDataOther
=
new
HashMap
<>();
Map
<
String
,
Object
>
originalDataOther
=
new
HashMap
<>();
...
@@ -1339,4 +1340,14 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -1339,4 +1340,14 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
return
idxBizJgRegisterInfo
.
getEquList
();
return
idxBizJgRegisterInfo
.
getEquList
();
}
}
@Override
public
boolean
beforeCheck
(
JgChangeRegistrationReform
jgChangeRegistrationReform
)
{
return
jgChangeRegistrationReform
.
getInstanceId
()
!=
null
&&
!
jgChangeRegistrationReform
.
getStatus
().
equals
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
())
&&!
jgChangeRegistrationReform
.
getStatus
().
equals
(
FlowStatusEnum
.
TO_BE_DISCARD
.
getName
());
}
@Override
public
void
compensate
(
JgChangeRegistrationReform
jgChangeRegistrationReform
)
{
commonServiceImpl
.
saveExecuteFlowData2Redis
(
jgChangeRegistrationReform
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgChangeRegistrationReform
));
}
}
}
\ No newline at end of file
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 @
b828b72b
...
@@ -30,10 +30,7 @@ import com.yeejoin.amos.boot.module.jg.biz.config.LocalBadRequest;
...
@@ -30,10 +30,7 @@ import com.yeejoin.amos.boot.module.jg.biz.config.LocalBadRequest;
import
com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext
;
import
com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext
;
import
com.yeejoin.amos.boot.module.jg.biz.context.FlowingEquipRedisContext
;
import
com.yeejoin.amos.boot.module.jg.biz.context.FlowingEquipRedisContext
;
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.ICmWorkflowService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.*
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICommonService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgOtherInfoService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgUseInfoService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
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.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
...
@@ -79,7 +76,7 @@ import static com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistration
...
@@ -79,7 +76,7 @@ import static com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistration
* @date 2023-12-20
* @date 2023-12-20
*/
*/
@Service
@Service
public
class
JgChangeRegistrationTransferServiceImpl
extends
BaseService
<
JgChangeRegistrationTransferDto
,
JgChangeRegistrationTransfer
,
JgChangeRegistrationTransferMapper
>
implements
IJgChangeRegistrationTransferService
{
public
class
JgChangeRegistrationTransferServiceImpl
extends
BaseService
<
JgChangeRegistrationTransferDto
,
JgChangeRegistrationTransfer
,
JgChangeRegistrationTransferMapper
>
implements
IJgChangeRegistrationTransferService
,
ICompensateFlowDataOfRedis
<
JgChangeRegistrationTransfer
>
{
private
static
final
String
PROCESS_DEFINITION_KEY
=
"changeRegistrationTransfer"
;
private
static
final
String
PROCESS_DEFINITION_KEY
=
"changeRegistrationTransfer"
;
private
static
final
String
TABLE_PAGE_ID
=
"changeRegistrationTransfer"
;
private
static
final
String
TABLE_PAGE_ID
=
"changeRegistrationTransfer"
;
private
final
List
<
String
>
NOT_FLOWING_STATE
=
Arrays
.
asList
(
"使用单位待提交"
,
"一级受理已驳回"
,
"使用单位已撤回"
,
"已作废"
,
"已完成"
);
private
final
List
<
String
>
NOT_FLOWING_STATE
=
Arrays
.
asList
(
"使用单位待提交"
,
"一级受理已驳回"
,
"使用单位已撤回"
,
"已作废"
,
"已完成"
);
...
@@ -605,6 +602,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
...
@@ -605,6 +602,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
Map
<
String
,
Object
>
resultDataMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
resultDataMap
=
new
HashMap
<>();
//移装变更详情
//移装变更详情
JgChangeRegistrationTransfer
transfer
=
this
.
getById
(
sequenceNbr
);
JgChangeRegistrationTransfer
transfer
=
this
.
getById
(
sequenceNbr
);
this
.
doCompensate
(
transfer
);
//查询设备详情
//查询设备详情
JgRegistrationHistory
historyData
=
jgRegistrationHistoryMapper
.
selectOne
(
new
LambdaQueryWrapper
<
JgRegistrationHistory
>()
JgRegistrationHistory
historyData
=
jgRegistrationHistoryMapper
.
selectOne
(
new
LambdaQueryWrapper
<
JgRegistrationHistory
>()
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
transfer
.
getApplyNo
()));
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
transfer
.
getApplyNo
()));
...
@@ -1554,4 +1552,14 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
...
@@ -1554,4 +1552,14 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
result
.
put
(
"transferUseInfo"
,
result
.
get
(
"estateUnitCreditCode"
)
+
"_"
+
result
.
get
(
"estateUnitName"
));
result
.
put
(
"transferUseInfo"
,
result
.
get
(
"estateUnitCreditCode"
)
+
"_"
+
result
.
get
(
"estateUnitName"
));
return
result
;
return
result
;
}
}
@Override
public
boolean
beforeCheck
(
JgChangeRegistrationTransfer
jgChangeRegistrationTransfer
)
{
return
jgChangeRegistrationTransfer
.
getInstanceId
()
!=
null
&&
!
jgChangeRegistrationTransfer
.
getStatus
().
equals
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
())
&&!
jgChangeRegistrationTransfer
.
getStatus
().
equals
(
FlowStatusEnum
.
TO_BE_DISCARD
.
getName
());
}
@Override
public
void
compensate
(
JgChangeRegistrationTransfer
jgChangeRegistrationTransfer
)
{
commonService
.
saveExecuteFlowData2Redis
(
jgChangeRegistrationTransfer
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgChangeRegistrationTransfer
));
}
}
}
\ No newline at end of file
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 @
b828b72b
...
@@ -26,6 +26,7 @@ import com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext
...
@@ -26,6 +26,7 @@ import com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext
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.ICommonService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICommonService
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.WorkFlowFeignService
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.WorkFlowFeignService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICompensateFlowDataOfRedis
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
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.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
...
@@ -64,7 +65,7 @@ import static com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistration
...
@@ -64,7 +65,7 @@ import static com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistration
* @date 2023-12-22
* @date 2023-12-22
*/
*/
@Service
@Service
public
class
JgChangeRegistrationUnitServiceImpl
extends
BaseService
<
JgChangeRegistrationUnitDto
,
JgChangeRegistrationUnit
,
JgChangeRegistrationUnitMapper
>
implements
IJgChangeRegistrationUnitService
{
public
class
JgChangeRegistrationUnitServiceImpl
extends
BaseService
<
JgChangeRegistrationUnitDto
,
JgChangeRegistrationUnit
,
JgChangeRegistrationUnitMapper
>
implements
IJgChangeRegistrationUnitService
,
ICompensateFlowDataOfRedis
<
JgChangeRegistrationUnit
>
{
private
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
private
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
private
static
final
String
PROCESS_DEFINITION_KEY
=
"unitChange"
;
private
static
final
String
PROCESS_DEFINITION_KEY
=
"unitChange"
;
private
static
final
String
TABLE_PAGE_ID
=
"1734141426742095873"
;
private
static
final
String
TABLE_PAGE_ID
=
"1734141426742095873"
;
...
@@ -171,6 +172,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -171,6 +172,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
if
(
Objects
.
isNull
(
notice
))
{
if
(
Objects
.
isNull
(
notice
))
{
return
null
;
return
null
;
}
}
this
.
doCompensate
(
notice
);
Map
<
String
,
Object
>
changeInfo
=
BeanUtil
.
beanToMap
(
notice
,
false
,
true
);
Map
<
String
,
Object
>
changeInfo
=
BeanUtil
.
beanToMap
(
notice
,
false
,
true
);
//组装下拉数据
//组装下拉数据
...
@@ -1318,4 +1320,15 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -1318,4 +1320,15 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
private
Integer
getTaskStatusByName
(
String
auditStatus
)
{
private
Integer
getTaskStatusByName
(
String
auditStatus
)
{
return
commonServiceImpl
.
getDictionaryCodeByName
(
auditStatus
);
return
commonServiceImpl
.
getDictionaryCodeByName
(
auditStatus
);
}
}
@Override
public
boolean
beforeCheck
(
JgChangeRegistrationUnit
jgChangeRegistrationUnit
)
{
return
jgChangeRegistrationUnit
.
getInstanceId
()
!=
null
&&
!
jgChangeRegistrationUnit
.
getStatus
().
equals
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
())
&&!
jgChangeRegistrationUnit
.
getStatus
().
equals
(
FlowStatusEnum
.
TO_BE_DISCARD
.
getName
());
}
@Override
public
void
compensate
(
JgChangeRegistrationUnit
jgChangeRegistrationUnit
)
{
commonServiceImpl
.
saveExecuteFlowData2Redis
(
jgChangeRegistrationUnit
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgChangeRegistrationUnit
));
}
}
}
\ No newline at end of file
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/JgChangeVehicleRegistrationUnitServiceImpl.java
View file @
b828b72b
...
@@ -24,6 +24,7 @@ import com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext
...
@@ -24,6 +24,7 @@ import com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext
import
com.yeejoin.amos.boot.module.jg.biz.context.FlowingEquipRedisContext
;
import
com.yeejoin.amos.boot.module.jg.biz.context.FlowingEquipRedisContext
;
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.ICommonService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICommonService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICompensateFlowDataOfRedis
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgOtherInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgOtherInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgRegisterInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgRegisterInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
...
@@ -67,7 +68,7 @@ import static com.yeejoin.amos.boot.module.jg.api.enums.VehicleApanageEnum.XI_XI
...
@@ -67,7 +68,7 @@ import static com.yeejoin.amos.boot.module.jg.api.enums.VehicleApanageEnum.XI_XI
* @date 2024-07-10
* @date 2024-07-10
*/
*/
@Service
@Service
public
class
JgChangeVehicleRegistrationUnitServiceImpl
extends
BaseService
<
JgChangeVehicleRegistrationUnitDto
,
JgChangeVehicleRegistrationUnit
,
JgChangeVehicleRegistrationUnitMapper
>
implements
IJgChangeVehicleRegistrationUnitService
{
public
class
JgChangeVehicleRegistrationUnitServiceImpl
extends
BaseService
<
JgChangeVehicleRegistrationUnitDto
,
JgChangeVehicleRegistrationUnit
,
JgChangeVehicleRegistrationUnitMapper
>
implements
IJgChangeVehicleRegistrationUnitService
,
ICompensateFlowDataOfRedis
<
JgChangeVehicleRegistrationUnit
>
{
private
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
private
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
private
static
final
String
PROCESS_DEFINITION_KEY
=
"vehicleGasCylinderChange"
;
private
static
final
String
PROCESS_DEFINITION_KEY
=
"vehicleGasCylinderChange"
;
private
final
List
<
String
>
NOT_FLOWING_STATE
=
Arrays
.
asList
(
"使用单位待提交"
,
"一级受理已驳回"
,
"使用单位已撤回"
,
"已作废"
,
"已完成"
);
private
final
List
<
String
>
NOT_FLOWING_STATE
=
Arrays
.
asList
(
"使用单位待提交"
,
"一级受理已驳回"
,
"使用单位已撤回"
,
"已作废"
,
"已完成"
);
...
@@ -768,6 +769,7 @@ public class JgChangeVehicleRegistrationUnitServiceImpl extends BaseService<JgCh
...
@@ -768,6 +769,7 @@ public class JgChangeVehicleRegistrationUnitServiceImpl extends BaseService<JgCh
public
Map
<
String
,
Object
>
getDetails
(
String
sequenceNbr
)
{
public
Map
<
String
,
Object
>
getDetails
(
String
sequenceNbr
)
{
JgChangeVehicleRegistrationUnit
registrationUnit
=
this
.
getById
(
sequenceNbr
);
JgChangeVehicleRegistrationUnit
registrationUnit
=
this
.
getById
(
sequenceNbr
);
this
.
doCompensate
(
registrationUnit
);
JgRegistrationHistory
history
=
jgRegistrationHistoryService
.
lambdaQuery
().
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
sequenceNbr
).
eq
(
JgRegistrationHistory:
:
getRegistrationClass
,
BUSINESS_NAME
).
one
();
JgRegistrationHistory
history
=
jgRegistrationHistoryService
.
lambdaQuery
().
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
sequenceNbr
).
eq
(
JgRegistrationHistory:
:
getRegistrationClass
,
BUSINESS_NAME
).
one
();
if
(!
ObjectUtils
.
isEmpty
(
history
)
&&
!
ObjectUtils
.
isEmpty
(
history
.
getChangeData
()))
{
if
(!
ObjectUtils
.
isEmpty
(
history
)
&&
!
ObjectUtils
.
isEmpty
(
history
.
getChangeData
()))
{
JSONObject
object
=
JSONObject
.
parseObject
(
history
.
getChangeData
());
JSONObject
object
=
JSONObject
.
parseObject
(
history
.
getChangeData
());
...
@@ -850,4 +852,14 @@ public class JgChangeVehicleRegistrationUnitServiceImpl extends BaseService<JgCh
...
@@ -850,4 +852,14 @@ public class JgChangeVehicleRegistrationUnitServiceImpl extends BaseService<JgCh
}
}
}
}
}
}
@Override
public
boolean
beforeCheck
(
JgChangeVehicleRegistrationUnit
jgChangeVehicleRegistrationUnit
)
{
return
jgChangeVehicleRegistrationUnit
.
getInstanceId
()
!=
null
&&
!
jgChangeVehicleRegistrationUnit
.
getStatus
().
equals
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
())
&&!
jgChangeVehicleRegistrationUnit
.
getStatus
().
equals
(
FlowStatusEnum
.
TO_BE_DISCARD
.
getName
());
}
@Override
public
void
compensate
(
JgChangeVehicleRegistrationUnit
jgChangeVehicleRegistrationUnit
)
{
commonService
.
saveExecuteFlowData2Redis
(
jgChangeVehicleRegistrationUnit
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgChangeVehicleRegistrationUnit
));
}
}
}
\ No newline at end of file
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 @
b828b72b
...
@@ -24,6 +24,7 @@ import com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext
...
@@ -24,6 +24,7 @@ import com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext
import
com.yeejoin.amos.boot.module.jg.biz.context.FlowingEquipRedisContext
;
import
com.yeejoin.amos.boot.module.jg.biz.context.FlowingEquipRedisContext
;
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.ICmWorkflowService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICompensateFlowDataOfRedis
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgRegisterInfoService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgRegisterInfoService
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.WorkFlowFeignService
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.WorkFlowFeignService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgInspectionDetectionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgInspectionDetectionInfo
;
...
@@ -62,7 +63,7 @@ import java.util.stream.Collectors;
...
@@ -62,7 +63,7 @@ import java.util.stream.Collectors;
* @date 2023-12-25
* @date 2023-12-25
*/
*/
@Service
@Service
public
class
JgEnableDisableServiceImpl
extends
BaseService
<
JgEnableDisableDto
,
JgEnableDisable
,
JgEnableDisableMapper
>
implements
IJgEnableDisableService
{
public
class
JgEnableDisableServiceImpl
extends
BaseService
<
JgEnableDisableDto
,
JgEnableDisable
,
JgEnableDisableMapper
>
implements
IJgEnableDisableService
,
ICompensateFlowDataOfRedis
<
JgEnableDisable
>
{
@Autowired
@Autowired
WorkFlowFeignService
workFlowFeginService
;
WorkFlowFeignService
workFlowFeginService
;
...
@@ -781,6 +782,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
...
@@ -781,6 +782,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
public
Map
<
String
,
Object
>
getDetail
(
Long
sequenceNbr
)
{
public
Map
<
String
,
Object
>
getDetail
(
Long
sequenceNbr
)
{
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
JgEnableDisable
enableDisable
=
this
.
getById
(
sequenceNbr
);
JgEnableDisable
enableDisable
=
this
.
getById
(
sequenceNbr
);
this
.
doCompensate
(
enableDisable
);
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryMapper
.
selectOne
(
new
LambdaQueryWrapper
<
JgRegistrationHistory
>().
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
sequenceNbr
));
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryMapper
.
selectOne
(
new
LambdaQueryWrapper
<
JgRegistrationHistory
>().
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
sequenceNbr
));
if
(
jgRegistrationHistory
!=
null
)
{
if
(
jgRegistrationHistory
!=
null
)
{
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
jgRegistrationHistory
.
getChangeData
());
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
jgRegistrationHistory
.
getChangeData
());
...
@@ -793,4 +795,14 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
...
@@ -793,4 +795,14 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
return
resultMap
;
return
resultMap
;
}
}
@Override
public
boolean
beforeCheck
(
JgEnableDisable
jgEnableDisable
)
{
return
jgEnableDisable
.
getInstanceId
()
!=
null
&&
!
jgEnableDisable
.
getAuditStatus
().
equals
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
())
&&!
jgEnableDisable
.
getAuditStatus
().
equals
(
FlowStatusEnum
.
TO_BE_DISCARD
.
getName
());
}
@Override
public
void
compensate
(
JgEnableDisable
jgEnableDisable
)
{
commonService
.
saveExecuteFlowData2Redis
(
jgEnableDisable
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgEnableDisable
));
}
}
}
\ No newline at end of file
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 @
b828b72b
...
@@ -27,6 +27,7 @@ import com.yeejoin.amos.boot.module.jg.api.vo.SortVo;
...
@@ -27,6 +27,7 @@ import com.yeejoin.amos.boot.module.jg.api.vo.SortVo;
import
com.yeejoin.amos.boot.module.jg.api.vo.tableDataExportVo.EquipTransferVo
;
import
com.yeejoin.amos.boot.module.jg.api.vo.tableDataExportVo.EquipTransferVo
;
import
com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext
;
import
com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext
;
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.ICompensateFlowDataOfRedis
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgRegisterInfoService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgRegisterInfoService
;
import
com.yeejoin.amos.boot.module.ymt.api.common.BaseException
;
import
com.yeejoin.amos.boot.module.ymt.api.common.BaseException
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
...
@@ -69,7 +70,7 @@ import java.util.stream.Stream;
...
@@ -69,7 +70,7 @@ import java.util.stream.Stream;
@Slf4j
@Slf4j
@Service
@Service
@RequiredArgsConstructor
(
onConstructor_
=
@Autowired
)
@RequiredArgsConstructor
(
onConstructor_
=
@Autowired
)
public
class
JgEquipTransferServiceImpl
extends
BaseService
<
JgEquipTransferDto
,
JgEquipTransfer
,
JgEquipTransferMapper
>
implements
IJgEquipTransferService
{
public
class
JgEquipTransferServiceImpl
extends
BaseService
<
JgEquipTransferDto
,
JgEquipTransfer
,
JgEquipTransferMapper
>
implements
IJgEquipTransferService
,
ICompensateFlowDataOfRedis
<
JgEquipTransfer
>
{
private
static
final
String
EQUIP_TRANSFER_PROCESS_KEY
=
"equipmentHandover"
;
private
static
final
String
EQUIP_TRANSFER_PROCESS_KEY
=
"equipmentHandover"
;
private
final
List
<
String
>
NOT_FLOWING_STATE
=
Arrays
.
asList
(
"6610"
,
"6614"
,
"6615"
,
"6617"
,
"6616"
);
private
final
List
<
String
>
NOT_FLOWING_STATE
=
Arrays
.
asList
(
"6610"
,
"6614"
,
"6615"
,
"6617"
,
"6616"
);
...
@@ -628,6 +629,7 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
...
@@ -628,6 +629,7 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
if
(
Objects
.
isNull
(
equipTransfer
))
{
if
(
Objects
.
isNull
(
equipTransfer
))
{
return
null
;
return
null
;
}
}
this
.
doCompensate
(
equipTransfer
);
Map
<
String
,
Object
>
equipTransferInfo
=
createEquipTransferInfo
(
equipTransfer
);
Map
<
String
,
Object
>
equipTransferInfo
=
createEquipTransferInfo
(
equipTransfer
);
if
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()
==
Integer
.
parseInt
(
equipTransfer
.
getApplyStatus
()))
{
if
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()
==
Integer
.
parseInt
(
equipTransfer
.
getApplyStatus
()))
{
// 已完成状态显示历史数据
// 已完成状态显示历史数据
...
@@ -817,4 +819,15 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
...
@@ -817,4 +819,15 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
}
}
return
Boolean
.
TRUE
;
return
Boolean
.
TRUE
;
}
}
@Override
public
boolean
beforeCheck
(
JgEquipTransfer
jgEquipTransfer
)
{
return
jgEquipTransfer
.
getInstanceId
()
!=
null
&&
!
jgEquipTransfer
.
getApplyStatus
().
equals
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()))
&&!
jgEquipTransfer
.
getApplyStatus
().
equals
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_DISCARD
.
getCode
()));
}
@Override
public
void
compensate
(
JgEquipTransfer
jgEquipTransfer
)
{
commonService
.
saveExecuteFlowData2Redis
(
jgEquipTransfer
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgEquipTransfer
));
}
}
}
\ No newline at end of file
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 @
b828b72b
...
@@ -34,6 +34,7 @@ import com.yeejoin.amos.boot.module.jg.biz.event.CancellationEvent;
...
@@ -34,6 +34,7 @@ import com.yeejoin.amos.boot.module.jg.biz.event.CancellationEvent;
import
com.yeejoin.amos.boot.module.jg.biz.event.publisher.EventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.event.publisher.EventPublisher
;
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.ICmWorkflowService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICompensateFlowDataOfRedis
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgRegisterInfoService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgRegisterInfoService
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo
;
...
@@ -75,7 +76,7 @@ import java.util.stream.Collectors;
...
@@ -75,7 +76,7 @@ import java.util.stream.Collectors;
* @date 2023-12-12
* @date 2023-12-12
*/
*/
@Service
@Service
public
class
JgMaintainNoticeServiceImpl
extends
BaseService
<
JgMaintainNoticeDto
,
JgMaintainNotice
,
JgMaintainNoticeMapper
>
implements
IJgMaintainNoticeService
{
public
class
JgMaintainNoticeServiceImpl
extends
BaseService
<
JgMaintainNoticeDto
,
JgMaintainNotice
,
JgMaintainNoticeMapper
>
implements
IJgMaintainNoticeService
,
ICompensateFlowDataOfRedis
<
JgMaintainNotice
>
{
private
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
private
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
private
static
final
String
PROCESS_DEFINITION_KEY
=
"maintainNotice"
;
private
static
final
String
PROCESS_DEFINITION_KEY
=
"maintainNotice"
;
...
@@ -164,6 +165,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -164,6 +165,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
if
(
Objects
.
isNull
(
notice
))
{
if
(
Objects
.
isNull
(
notice
))
{
return
null
;
return
null
;
}
}
this
.
doCompensate
(
notice
);
Map
<
String
,
Object
>
maintainInfo
=
BeanUtil
.
beanToMap
(
notice
,
false
,
true
);
Map
<
String
,
Object
>
maintainInfo
=
BeanUtil
.
beanToMap
(
notice
,
false
,
true
);
maintainInfo
.
put
(
"powerOfAttorneyList"
,
JSON
.
parse
(
notice
.
getPowerOfAttorney
()));
maintainInfo
.
put
(
"powerOfAttorneyList"
,
JSON
.
parse
(
notice
.
getPowerOfAttorney
()));
maintainInfo
.
put
(
"constructionContractList"
,
JSON
.
parse
(
notice
.
getConstructionContract
()));
maintainInfo
.
put
(
"constructionContractList"
,
JSON
.
parse
(
notice
.
getConstructionContract
()));
...
@@ -1180,4 +1182,15 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -1180,4 +1182,15 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
taskMap
.
put
(
"model"
,
taskMessageDto
);
taskMap
.
put
(
"model"
,
taskMessageDto
);
commonService
.
updateTaskModel
(
taskMap
);
commonService
.
updateTaskModel
(
taskMap
);
}
}
@Override
public
boolean
beforeCheck
(
JgMaintainNotice
jgMaintainNotice
)
{
return
jgMaintainNotice
.
getInstanceId
()
!=
null
&&
!
jgMaintainNotice
.
getNoticeStatus
().
equals
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()))
&&!
jgMaintainNotice
.
getNoticeStatus
().
equals
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_DISCARD
.
getCode
()));
}
@Override
public
void
compensate
(
JgMaintainNotice
jgMaintainNotice
)
{
commonService
.
saveExecuteFlowData2Redis
(
jgMaintainNotice
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgMaintainNotice
));
}
}
}
\ No newline at end of file
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 @
b828b72b
...
@@ -31,6 +31,7 @@ import com.yeejoin.amos.boot.module.jg.biz.event.CancellationEvent;
...
@@ -31,6 +31,7 @@ import com.yeejoin.amos.boot.module.jg.biz.event.CancellationEvent;
import
com.yeejoin.amos.boot.module.jg.biz.event.publisher.EventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.event.publisher.EventPublisher
;
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.ICmWorkflowService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICompensateFlowDataOfRedis
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgUseInfoService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgUseInfoService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgMaintenanceRecordInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgMaintenanceRecordInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
...
@@ -73,7 +74,7 @@ import java.util.stream.Collectors;
...
@@ -73,7 +74,7 @@ import java.util.stream.Collectors;
* @date 2023-12-12
* @date 2023-12-12
*/
*/
@Service
@Service
public
class
JgMaintenanceContractServiceImpl
extends
BaseService
<
JgMaintenanceContractDto
,
JgMaintenanceContract
,
JgMaintenanceContractMapper
>
implements
IJgMaintenanceContractService
{
public
class
JgMaintenanceContractServiceImpl
extends
BaseService
<
JgMaintenanceContractDto
,
JgMaintenanceContract
,
JgMaintenanceContractMapper
>
implements
IJgMaintenanceContractService
,
ICompensateFlowDataOfRedis
<
JgMaintenanceContractDto
>
{
public
static
final
String
SUBMIT_DATA
=
"0"
;
public
static
final
String
SUBMIT_DATA
=
"0"
;
public
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
public
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
...
@@ -164,6 +165,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -164,6 +165,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
JgMaintenanceContractDto
dto
=
maintenanceContractMapper
.
queryBySequenceNbr
(
sequenceNbr
);
JgMaintenanceContractDto
dto
=
maintenanceContractMapper
.
queryBySequenceNbr
(
sequenceNbr
);
JgMaintenanceContractVo
vo
=
new
JgMaintenanceContractVo
();
JgMaintenanceContractVo
vo
=
new
JgMaintenanceContractVo
();
BeanUtils
.
copyProperties
(
dto
,
vo
);
BeanUtils
.
copyProperties
(
dto
,
vo
);
this
.
doCompensate
(
dto
);
vo
.
setMaintenanceContract
(
ObjectUtils
.
isEmpty
(
dto
.
getMaintenanceContract
())
?
null
:
JSON
.
parseArray
(
dto
.
getMaintenanceContract
()));
vo
.
setMaintenanceContract
(
ObjectUtils
.
isEmpty
(
dto
.
getMaintenanceContract
())
?
null
:
JSON
.
parseArray
(
dto
.
getMaintenanceContract
()));
vo
.
setOtherAccessories
(
ObjectUtils
.
isEmpty
(
dto
.
getOtherAccessories
())
?
null
:
JSON
.
parseArray
(
dto
.
getOtherAccessories
()));
vo
.
setOtherAccessories
(
ObjectUtils
.
isEmpty
(
dto
.
getOtherAccessories
())
?
null
:
JSON
.
parseArray
(
dto
.
getOtherAccessories
()));
// 非已完成状态数据显示最新的设备信息
// 非已完成状态数据显示最新的设备信息
...
@@ -270,6 +272,14 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -270,6 +272,14 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
.
build
();
.
build
();
}
}
public
InstanceRuntimeData
buildInstanceRuntimeData
(
JgMaintenanceContractDto
jgMaintenanceContract
)
{
return
InstanceRuntimeData
.
builder
()
.
nextExecuteUserIds
(
jgMaintenanceContract
.
getNextExecuteUserIds
())
.
promoter
(
jgMaintenanceContract
.
getPromoter
())
.
nextTaskId
(
jgMaintenanceContract
.
getNextTaskId
())
.
build
();
}
public
String
getNextUserOrgCode
(
String
operate
,
JgMaintenanceContract
contract
)
{
public
String
getNextUserOrgCode
(
String
operate
,
JgMaintenanceContract
contract
)
{
String
code
=
null
;
String
code
=
null
;
if
(
"0"
.
equals
(
operate
))
{
if
(
"0"
.
equals
(
operate
))
{
...
@@ -892,4 +902,16 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -892,4 +902,16 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
List
<
JgMaintenanceContractEq
>
equipmentLists
=
maintenanceContractEqMapper
.
selectList
(
queryWrapper
);
List
<
JgMaintenanceContractEq
>
equipmentLists
=
maintenanceContractEqMapper
.
selectList
(
queryWrapper
);
commonService
.
saveOrUpdateHistory
(
BusinessTypeEnum
.
JG_MAINTENANCE_RECORD
.
getName
(),
JSON
.
parseArray
(
JSON
.
toJSONString
(
equipmentLists
)),
null
,
maintenanceContract
.
getSequenceNbr
().
toString
());
commonService
.
saveOrUpdateHistory
(
BusinessTypeEnum
.
JG_MAINTENANCE_RECORD
.
getName
(),
JSON
.
parseArray
(
JSON
.
toJSONString
(
equipmentLists
)),
null
,
maintenanceContract
.
getSequenceNbr
().
toString
());
}
}
@Override
public
boolean
beforeCheck
(
JgMaintenanceContractDto
jgMaintenanceContract
)
{
return
jgMaintenanceContract
.
getInstanceId
()
!=
null
&&
!
jgMaintenanceContract
.
getStatus
().
equals
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
())
&&!
jgMaintenanceContract
.
getStatus
().
equals
(
FlowStatusEnum
.
TO_BE_DISCARD
.
getName
());
}
@Override
public
void
compensate
(
JgMaintenanceContractDto
jgMaintenanceContract
)
{
commonService
.
saveExecuteFlowData2Redis
(
jgMaintenanceContract
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgMaintenanceContract
));
}
}
}
\ No newline at end of file
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 @
b828b72b
...
@@ -34,6 +34,7 @@ import com.yeejoin.amos.boot.module.jg.biz.event.CancellationEvent;
...
@@ -34,6 +34,7 @@ import com.yeejoin.amos.boot.module.jg.biz.event.CancellationEvent;
import
com.yeejoin.amos.boot.module.jg.biz.event.publisher.EventPublisher
;
import
com.yeejoin.amos.boot.module.jg.biz.event.publisher.EventPublisher
;
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.ICmWorkflowService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICompensateFlowDataOfRedis
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgRegisterInfoService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgRegisterInfoService
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory
;
...
@@ -82,7 +83,7 @@ import java.util.stream.Collectors;
...
@@ -82,7 +83,7 @@ import java.util.stream.Collectors;
*/
*/
@Service
@Service
@Slf4j
@Slf4j
public
class
JgReformNoticeServiceImpl
extends
BaseService
<
JgReformNoticeDto
,
JgReformNotice
,
JgReformNoticeMapper
>
implements
IJgReformNoticeService
{
public
class
JgReformNoticeServiceImpl
extends
BaseService
<
JgReformNoticeDto
,
JgReformNotice
,
JgReformNoticeMapper
>
implements
IJgReformNoticeService
,
ICompensateFlowDataOfRedis
<
JgReformNotice
>
{
private
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
private
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
private
static
final
String
PROCESS_DEFINITION_KEY
=
"renovationNoticeNew"
;
private
static
final
String
PROCESS_DEFINITION_KEY
=
"renovationNoticeNew"
;
...
@@ -143,6 +144,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -143,6 +144,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
public
Map
<
String
,
Object
>
queryBySequenceNbr
(
Long
sequenceNbr
)
{
public
Map
<
String
,
Object
>
queryBySequenceNbr
(
Long
sequenceNbr
)
{
// 改造告知信息
// 改造告知信息
JgReformNotice
notice
=
jgReformNoticeMapper
.
selectById
(
sequenceNbr
);
JgReformNotice
notice
=
jgReformNoticeMapper
.
selectById
(
sequenceNbr
);
this
.
doCompensate
(
notice
);
Map
<
String
,
Object
>
reformNoticeMap
=
BeanUtil
.
beanToMap
(
notice
,
false
,
true
);
Map
<
String
,
Object
>
reformNoticeMap
=
BeanUtil
.
beanToMap
(
notice
,
false
,
true
);
reformNoticeMap
.
put
(
"province"
,
notice
.
getProvince
()
+
"_"
+
notice
.
getProvinceName
());
reformNoticeMap
.
put
(
"province"
,
notice
.
getProvince
()
+
"_"
+
notice
.
getProvinceName
());
reformNoticeMap
.
put
(
"city"
,
notice
.
getCity
()
+
"_"
+
notice
.
getCityName
());
reformNoticeMap
.
put
(
"city"
,
notice
.
getCity
()
+
"_"
+
notice
.
getCityName
());
...
@@ -1008,4 +1010,15 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -1008,4 +1010,15 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
jsonObject
.
put
(
"deviceList"
,
deviceList
);
jsonObject
.
put
(
"deviceList"
,
deviceList
);
this
.
saveHisDataBeforeUpdate
(
String
.
valueOf
(
reformNotice
.
getSequenceNbr
()),
jsonObject
);
this
.
saveHisDataBeforeUpdate
(
String
.
valueOf
(
reformNotice
.
getSequenceNbr
()),
jsonObject
);
}
}
@Override
public
boolean
beforeCheck
(
JgReformNotice
jgReformNotice
)
{
return
jgReformNotice
.
getInstanceId
()
!=
null
&&
!
jgReformNotice
.
getNoticeStatus
().
equals
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()))
&&!
jgReformNotice
.
getNoticeStatus
().
equals
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_DISCARD
.
getCode
()));
}
@Override
public
void
compensate
(
JgReformNotice
jgReformNotice
)
{
commonService
.
saveExecuteFlowData2Redis
(
jgReformNotice
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgReformNotice
));
}
}
}
\ No newline at end of file
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 @
b828b72b
...
@@ -30,6 +30,7 @@ import com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext
...
@@ -30,6 +30,7 @@ import com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext
import
com.yeejoin.amos.boot.module.jg.biz.context.FlowingEquipRedisContext
;
import
com.yeejoin.amos.boot.module.jg.biz.context.FlowingEquipRedisContext
;
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.feign.WorkFlowFeignService
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.WorkFlowFeignService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICompensateFlowDataOfRedis
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgRegisterInfoService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgRegisterInfoService
;
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
;
...
@@ -70,7 +71,7 @@ import java.util.stream.Collectors;
...
@@ -70,7 +71,7 @@ import java.util.stream.Collectors;
* @date 2023-12-20
* @date 2023-12-20
*/
*/
@Service
@Service
public
class
JgScrapCancelServiceImpl
extends
BaseService
<
JgScrapCancelDto
,
JgScrapCancel
,
JgScrapCancelMapper
>
implements
IJgScrapCancelService
{
public
class
JgScrapCancelServiceImpl
extends
BaseService
<
JgScrapCancelDto
,
JgScrapCancel
,
JgScrapCancelMapper
>
implements
IJgScrapCancelService
,
ICompensateFlowDataOfRedis
<
JgScrapCancel
>
{
private
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
private
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
...
@@ -769,6 +770,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -769,6 +770,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
public
Map
<
String
,
Object
>
queryBySequenceNbr
(
Long
sequenceNbr
)
{
public
Map
<
String
,
Object
>
queryBySequenceNbr
(
Long
sequenceNbr
)
{
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
JgScrapCancel
scrapCancel
=
this
.
baseMapper
.
selectById
(
sequenceNbr
);
JgScrapCancel
scrapCancel
=
this
.
baseMapper
.
selectById
(
sequenceNbr
);
this
.
doCompensate
(
scrapCancel
);
Map
<
String
,
Object
>
beanMap
=
BeanUtil
.
beanToMap
(
scrapCancel
,
false
,
true
);
Map
<
String
,
Object
>
beanMap
=
BeanUtil
.
beanToMap
(
scrapCancel
,
false
,
true
);
beanMap
.
put
(
"cancelCertificateList"
,
JSON
.
parse
(
scrapCancel
.
getCancelCertificate
()));
beanMap
.
put
(
"cancelCertificateList"
,
JSON
.
parse
(
scrapCancel
.
getCancelCertificate
()));
beanMap
.
put
(
"otherAccessories"
,
JSON
.
parse
(
scrapCancel
.
getOtherAccessories
()));
beanMap
.
put
(
"otherAccessories"
,
JSON
.
parse
(
scrapCancel
.
getOtherAccessories
()));
...
@@ -1095,4 +1097,15 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -1095,4 +1097,15 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
jgCertificateChangeRecordEqServiceImpl
.
saveBatch
(
changeRecordEqList
);
jgCertificateChangeRecordEqServiceImpl
.
saveBatch
(
changeRecordEqList
);
}
}
}
}
@Override
public
boolean
beforeCheck
(
JgScrapCancel
jgScrapCancel
)
{
return
jgScrapCancel
.
getInstanceId
()
!=
null
&&
!
jgScrapCancel
.
getAuditStatus
().
equals
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
())
&&!
jgScrapCancel
.
getAuditStatus
().
equals
(
FlowStatusEnum
.
TO_BE_DISCARD
.
getName
());
}
@Override
public
void
compensate
(
JgScrapCancel
jgScrapCancel
)
{
commonService
.
saveExecuteFlowData2Redis
(
jgScrapCancel
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgScrapCancel
));
}
}
}
\ No newline at end of file
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 @
b828b72b
...
@@ -33,6 +33,7 @@ import com.yeejoin.amos.boot.module.jg.biz.context.FlowingEquipRedisContext;
...
@@ -33,6 +33,7 @@ import com.yeejoin.amos.boot.module.jg.biz.context.FlowingEquipRedisContext;
import
com.yeejoin.amos.boot.module.jg.biz.dao.ESElavtorRepository
;
import
com.yeejoin.amos.boot.module.jg.biz.dao.ESElavtorRepository
;
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.ICmWorkflowService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICompensateFlowDataOfRedis
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
...
@@ -72,7 +73,7 @@ import java.util.stream.Collectors;
...
@@ -72,7 +73,7 @@ import java.util.stream.Collectors;
* @date 2023-12-19
* @date 2023-12-19
*/
*/
@Service
@Service
public
class
JgTransferNoticeServiceImpl
extends
BaseService
<
JgTransferNoticeDto
,
JgTransferNotice
,
JgTransferNoticeMapper
>
implements
IJgTransferNoticeService
{
public
class
JgTransferNoticeServiceImpl
extends
BaseService
<
JgTransferNoticeDto
,
JgTransferNotice
,
JgTransferNoticeMapper
>
implements
IJgTransferNoticeService
,
ICompensateFlowDataOfRedis
<
JgTransferNotice
>
{
private
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
private
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
private
static
final
String
PROCESS_DEFINITION_KEY
=
"transferNotice"
;
private
static
final
String
PROCESS_DEFINITION_KEY
=
"transferNotice"
;
...
@@ -133,6 +134,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -133,6 +134,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
if
(
Objects
.
isNull
(
notice
))
{
if
(
Objects
.
isNull
(
notice
))
{
return
null
;
return
null
;
}
}
this
.
doCompensate
(
notice
);
Map
<
String
,
Object
>
transferNotice
=
BeanUtil
.
beanToMap
(
notice
,
false
,
true
);
Map
<
String
,
Object
>
transferNotice
=
BeanUtil
.
beanToMap
(
notice
,
false
,
true
);
transferNotice
.
put
(
"province"
,
notice
.
getProvince
()
+
"_"
+
notice
.
getProvinceName
());
transferNotice
.
put
(
"province"
,
notice
.
getProvince
()
+
"_"
+
notice
.
getProvinceName
());
transferNotice
.
put
(
"city"
,
notice
.
getCity
()
+
"_"
+
notice
.
getCityName
());
transferNotice
.
put
(
"city"
,
notice
.
getCity
()
+
"_"
+
notice
.
getCityName
());
...
@@ -1055,4 +1057,14 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -1055,4 +1057,14 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
return
workflowResultDto
;
return
workflowResultDto
;
}
}
@Override
public
boolean
beforeCheck
(
JgTransferNotice
jgTransferNotice
)
{
return
jgTransferNotice
.
getInstanceId
()
!=
null
&&
!
jgTransferNotice
.
getNoticeStatus
().
equals
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()))
&&!
jgTransferNotice
.
getNoticeStatus
().
equals
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_DISCARD
.
getCode
()));
}
@Override
public
void
compensate
(
JgTransferNotice
jgTransferNotice
)
{
commonService
.
saveExecuteFlowData2Redis
(
jgTransferNotice
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgTransferNotice
));
}
}
}
\ No newline at end of file
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 @
b828b72b
...
@@ -36,6 +36,7 @@ import com.yeejoin.amos.boot.module.jg.biz.event.publisher.EventPublisher;
...
@@ -36,6 +36,7 @@ import com.yeejoin.amos.boot.module.jg.biz.event.publisher.EventPublisher;
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.feign.WorkFlowFeignService
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.WorkFlowFeignService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICompensateFlowDataOfRedis
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.FileExporter
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.FileExporter
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.ImageUtils
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.ImageUtils
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
...
@@ -98,7 +99,7 @@ import static com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistration
...
@@ -98,7 +99,7 @@ import static com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistration
*/
*/
@Service
@Service
@Slf4j
@Slf4j
public
class
JgVehicleInformationServiceImpl
extends
BaseService
<
JgVehicleInformationDto
,
JgVehicleInformation
,
JgVehicleInformationMapper
>
implements
IJgVehicleInformationService
{
public
class
JgVehicleInformationServiceImpl
extends
BaseService
<
JgVehicleInformationDto
,
JgVehicleInformation
,
JgVehicleInformationMapper
>
implements
IJgVehicleInformationService
,
ICompensateFlowDataOfRedis
<
JgVehicleInformationDto
>
{
public
static
final
String
SUBMIT_DATA
=
"0"
;
public
static
final
String
SUBMIT_DATA
=
"0"
;
public
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
public
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
private
static
final
String
DEFINITION_KEY
=
"vehicleInformation"
;
private
static
final
String
DEFINITION_KEY
=
"vehicleInformation"
;
...
@@ -546,6 +547,14 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -546,6 +547,14 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
.
build
();
.
build
();
}
}
public
InstanceRuntimeData
buildInstanceRuntimeData
(
JgVehicleInformationDto
jgVehicleInformation
)
{
return
InstanceRuntimeData
.
builder
()
.
nextExecuteUserIds
(
jgVehicleInformation
.
getNextExecuteUserIds
())
.
promoter
(
jgVehicleInformation
.
getPromoter
())
.
nextTaskId
(
jgVehicleInformation
.
getNextTaskId
())
.
build
();
}
private
Integer
getTaskCodeByName
(
String
auditStatus
)
{
private
Integer
getTaskCodeByName
(
String
auditStatus
)
{
return
commonService
.
getDictionaryCodeByName
(
auditStatus
);
return
commonService
.
getDictionaryCodeByName
(
auditStatus
);
}
}
...
@@ -568,12 +577,12 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -568,12 +577,12 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
*/
*/
public
JgVehicleInformationVo
queryBySequenceNbr
(
Long
sequenceNbr
)
{
public
JgVehicleInformationVo
queryBySequenceNbr
(
Long
sequenceNbr
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
()))
+
""
,
ReginParams
.
class
);
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
()))
+
""
,
ReginParams
.
class
);
JgVehicleInformationVo
vo
=
new
JgVehicleInformationVo
();
JgVehicleInformationVo
vo
=
new
JgVehicleInformationVo
();
JgVehicleInformationDto
dto
=
this
.
baseMapper
.
queryBySequenceNbr
(
sequenceNbr
);
JgVehicleInformationDto
dto
=
this
.
baseMapper
.
queryBySequenceNbr
(
sequenceNbr
);
if
(
Objects
.
isNull
(
dto
))
{
if
(
Objects
.
isNull
(
dto
))
{
return
null
;
return
null
;
}
}
this
.
doCompensate
(
dto
);
BeanUtils
.
copyProperties
(
dto
,
vo
);
BeanUtils
.
copyProperties
(
dto
,
vo
);
//接收机构
//接收机构
if
(!
ValidationUtil
.
isEmpty
(
dto
.
getReceiveOrgCode
())
&&
!
ValidationUtil
.
isEmpty
(
dto
.
getReceiveOrgName
()))
{
if
(!
ValidationUtil
.
isEmpty
(
dto
.
getReceiveOrgCode
())
&&
!
ValidationUtil
.
isEmpty
(
dto
.
getReceiveOrgName
()))
{
...
@@ -2232,4 +2241,15 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -2232,4 +2241,15 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
objMap
.
put
(
equId
,
param
);
objMap
.
put
(
equId
,
param
);
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
objMap
);
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
objMap
);
}
}
@Override
public
boolean
beforeCheck
(
JgVehicleInformationDto
jgVehicleInformation
)
{
return
jgVehicleInformation
.
getInstanceId
()
!=
null
&&
!
jgVehicleInformation
.
getStatus
().
equals
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
())
&&!
jgVehicleInformation
.
getStatus
().
equals
(
FlowStatusEnum
.
TO_BE_DISCARD
.
getName
());
}
@Override
public
void
compensate
(
JgVehicleInformationDto
jgVehicleInformation
)
{
commonService
.
saveExecuteFlowData2Redis
(
jgVehicleInformation
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgVehicleInformation
));
}
}
}
\ No newline at end of file
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