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
5ea66033
Commit
5ea66033
authored
Sep 10, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.历史登记作废功能开发及自测bug修改
parent
a91a6d46
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
30 deletions
+75
-30
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+72
-29
JgVehicleInformationServiceImpl.java
.../jg/biz/service/impl/JgVehicleInformationServiceImpl.java
+3
-1
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/JgUseRegistrationServiceImpl.java
View file @
5ea66033
...
...
@@ -141,6 +141,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
EventPublisher
eventPublisher
;
@Autowired
IdxBizJgMaintenanceRecordInfoMapper
maintenanceRecordInfoMapper
;
@Autowired
DataDictionaryServiceImpl
iDataDictionaryService
;
String
[]
jsonFields
=
{
"productPhoto"
,
"factoryStandard"
,
"productQualityYieldProve"
,
"insUseMaintainExplain"
,
"inspectReport"
,
"designStandard"
,
"designDoc"
,
"longitudeLatitude"
,
"otherAccessoriesDes"
,
"otherAccessoriesFact"
,
...
...
@@ -1028,7 +1031,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
changeRecord
.
setReceiveCompanyCode
(
jgUseRegistration
.
getReceiveCompanyOrgCode
());
//接收机构公司代码
// 流水表不需要再次生成唯一编号,使用证管理表对应值
if
(!
ObjectUtils
.
isEmpty
(
jgUseRegistration
.
getUseRegistrationCode
())){
JgUseRegistrationManage
manage
=
jgUseRegistrationManageService
.
lambdaQuery
().
eq
(
JgUseRegistrationManage:
:
getUseRegistrationCode
,
jgUseRegistration
.
getUseRegistrationCode
()).
one
();
JgUseRegistrationManage
manage
=
jgUseRegistrationManageService
.
lambdaQuery
()
.
eq
(
JgUseRegistrationManage:
:
getUseRegistrationCode
,
jgUseRegistration
.
getUseRegistrationCode
())
.
eq
(
JgUseRegistrationManage:
:
getCertificateStatus
,
CertificateStatusEnum
.
YIDENGJI
.
getName
()).
one
();
changeRecord
.
setCertificateNo
(
manage
.
getCertificateNo
());
//登记证书唯一码
}
changeRecord
.
setUseUnitCreditCode
(
jgUseRegistration
.
getUseUnitCreditCode
());
//使用单位统一信用代码
...
...
@@ -2334,6 +2339,32 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
otherInfoMapper
.
updateById
(
otherInfo
);
}
private
void
processElseDataByStatus
(
String
flowStatus
,
JgUseRegistration
jgUseRegistration
)
{
switch
(
flowStatus
)
{
case
"使用单位待提交"
:
// 1.删除暂存时生成的待办
commonServiceImpl
.
deleteTasksByRelationId
(
jgUseRegistration
.
getSequenceNbr
()
+
""
);
break
;
case
"已完成"
:
// 1.删除与设备的关系,设备可再次发起使用登记
this
.
clearUseInfoOfEquip
(
jgUseRegistration
);
// 2.清空redis(缓存的流程中及已完成使用登记的设备)
this
.
clearDataForCheckEquipRepeatUsed
(
jgUseRegistration
);
// 3.作废对应的使用登记证
this
.
invalidUseRegistrationCertificate
(
jgUseRegistration
);
break
;
default
:
// 流程中
// 1.待办任务更新为已完成
this
.
finishedTask
(
jgUseRegistration
);
// 2.终止流程-工作流报错暂时注释掉
cmWorkflowService
.
stopProcess
(
jgUseRegistration
.
getInstanceId
(),
jgUseRegistration
.
getCancelReason
());
// 3.清空redis(缓存的流程中及已完成使用登记的设备)
this
.
clearDataForCheckEquipRepeatUsed
(
jgUseRegistration
);
}
}
/**
* 使用登记单条作废
*
...
...
@@ -2366,32 +2397,6 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
return
jgUseRegistration
;
}
private
void
processElseDataByStatus
(
String
flowStatus
,
JgUseRegistration
jgUseRegistration
)
{
switch
(
flowStatus
)
{
case
"使用单位待提交"
:
// 1.删除暂存时生成的待办
commonServiceImpl
.
deleteTasksByRelationId
(
jgUseRegistration
.
getSequenceNbr
()
+
""
);
break
;
case
"已完成"
:
// 1.删除与设备的关系,设备可再次发起使用登记
this
.
clearUseInfoOfEquip
(
jgUseRegistration
);
// 2.清空redis(缓存的流程中及已完成使用登记的设备)
this
.
clearDataForCheckEquipRepeatUsed
(
jgUseRegistration
);
// 3.作废对应的使用登记证
this
.
invalidUseRegistrationCertificate
(
jgUseRegistration
);
break
;
default
:
// 流程中
// 1.待办任务更新为已完成
this
.
finishedTask
(
jgUseRegistration
);
// 2.终止流程-工作流报错暂时注释掉
cmWorkflowService
.
stopProcess
(
jgUseRegistration
.
getInstanceId
(),
jgUseRegistration
.
getCancelReason
());
// 3.清空redis(缓存的流程中及已完成使用登记的设备)
this
.
clearDataForCheckEquipRepeatUsed
(
jgUseRegistration
);
}
}
private
void
clearUseInfoOfEquip
(
JgUseRegistration
jgUseRegistration
)
{
List
<
JgUseRegistrationEq
>
eqList
=
getJgUseRegistrationEqs
(
jgUseRegistration
);
eqList
.
forEach
(
e
->
{
...
...
@@ -2415,11 +2420,49 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
this
.
rollBackSupervisionInfo
(
record
);
// 4.es的EQU_STATE, USE_ORG_CODE、ORG_BRANCH_CODE、ORG_BRANCH_NAME、STATUS
this
.
rollBackForEquipEsInfo
(
record
,
flag
);
// 5.检验检测流水表-找不到关系暂不更新(删除)
// 6.idx_biz_jg_other_info表监管码、96333、claimStatus,监管码、96333、claimStatus
// 5.历史设备处理
this
.
dealHisRegEquipData
(
jgUseRegistration
,
record
);
});
}
private
void
dealHisRegEquipData
(
JgUseRegistration
jgUseRegistration
,
String
record
)
{
// 历史登记时处理
if
(
"1"
.
equals
(
jgUseRegistration
.
getRegType
())){
// 删除安装信息
this
.
clearConstructionInfo
(
record
);;
// 删除维保信息
this
.
clearMainInfo
(
record
);
// 删除检验检测信息
this
.
clearInspectionInfo
(
record
);
}
}
private
void
clearInspectionInfo
(
String
record
)
{
inspectionDetectionInfoMapper
.
delete
(
new
LambdaQueryWrapper
<
InspectionDetectionInfo
>().
eq
(
AbstractEquipBaseEntity:
:
getRecord
,
record
));
InspectionDetectionInfo
inspectionDetectionInfo
=
new
InspectionDetectionInfo
();
inspectionDetectionInfo
.
setRecord
(
record
);
inspectionDetectionInfo
.
setRecDate
(
new
Date
());
inspectionDetectionInfo
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
inspectionDetectionInfoMapper
.
insert
(
inspectionDetectionInfo
);
}
private
void
clearMainInfo
(
String
record
)
{
maintenanceRecordInfoMapper
.
delete
(
new
LambdaQueryWrapper
<
IdxBizJgMaintenanceRecordInfo
>().
eq
(
IdxBizJgMaintenanceRecordInfo:
:
getRecord
,
record
));
IdxBizJgMaintenanceRecordInfo
maintenanceRecordInfo
=
new
IdxBizJgMaintenanceRecordInfo
();
maintenanceRecordInfo
.
setRecord
(
record
);
maintenanceRecordInfo
.
setRecDate
(
new
Date
());
maintenanceRecordInfoMapper
.
insert
(
maintenanceRecordInfo
);
}
private
void
clearConstructionInfo
(
String
record
)
{
constructionInfoMapper
.
delete
(
new
LambdaQueryWrapper
<
IdxBizJgConstructionInfo
>().
eq
(
IdxBizJgConstructionInfo:
:
getRecord
,
record
));
IdxBizJgConstructionInfo
jgConstructionInfo
=
new
IdxBizJgConstructionInfo
();
jgConstructionInfo
.
setRecord
(
record
);
jgConstructionInfo
.
setRecDate
(
new
Date
());
constructionInfoMapper
.
insert
(
jgConstructionInfo
);
}
private
List
<
JgUseRegistrationEq
>
getJgUseRegistrationEqs
(
JgUseRegistration
jgUseRegistration
)
{
LambdaQueryWrapper
<
JgUseRegistrationEq
>
eqLambdaQueryWrapper
=
new
LambdaQueryWrapper
<
JgUseRegistrationEq
>().
eq
(
JgUseRegistrationEq:
:
getEquipTransferId
,
jgUseRegistration
.
getSequenceNbr
());
return
jgRelationEquipMapper
.
selectList
(
eqLambdaQueryWrapper
);
...
...
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 @
5ea66033
...
...
@@ -1570,7 +1570,9 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
// changeRecord.setCertificateNo(commonService.generateCertificateNo(equType, new Date(), jgVehicleInformation.getReceiveCompanyCode()));//登记证书唯一码
// 流水表不需要再次生成唯一编号,使用证管理表对应值
if
(!
ObjectUtils
.
isEmpty
(
jgVehicleInformation
.
getUseRegistrationCode
())){
JgUseRegistrationManage
manage
=
jgUseRegistrationManageService
.
lambdaQuery
().
eq
(
JgUseRegistrationManage:
:
getUseRegistrationCode
,
jgVehicleInformation
.
getUseRegistrationCode
()).
one
();
JgUseRegistrationManage
manage
=
jgUseRegistrationManageService
.
lambdaQuery
()
.
eq
(
JgUseRegistrationManage:
:
getUseRegistrationCode
,
jgVehicleInformation
.
getUseRegistrationCode
())
.
eq
(
JgUseRegistrationManage:
:
getCertificateStatus
,
CertificateStatusEnum
.
YIDENGJI
.
getName
()).
one
();
changeRecord
.
setCertificateNo
(
manage
.
getCertificateNo
());
//登记证书唯一码
}
changeRecord
.
setUseUnitCreditCode
(
jgVehicleInformation
.
getUseUnitCreditCode
());
//使用单位统一信用代码
...
...
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