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
a573b87f
Commit
a573b87f
authored
Jul 31, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_tzs_register_to_0715' of…
Merge branch 'develop_tzs_register_to_0715' of
http://36.40.66.175:5000/moa/amos-boot-biz
into develop_tzs_register_to_0715
parents
d382d337
bf7243b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
66 deletions
+75
-66
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+75
-66
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 @
a573b87f
...
@@ -33,10 +33,10 @@ import com.yeejoin.amos.boot.module.jg.biz.config.LocalBadRequest;
...
@@ -33,10 +33,10 @@ 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.feign.WorkFlowFeignService
;
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.IIdxBizJgInspectionDetectionInfoService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgInspectionDetectionInfoService
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.CodeUtil
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.CodeUtil
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.WorkFlowFeignService
;
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.*
;
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
;
...
@@ -576,7 +576,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -576,7 +576,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
if
(!
ObjectUtils
.
isEmpty
(
instanceId
))
{
if
(!
ObjectUtils
.
isEmpty
(
instanceId
))
{
// 执行流程
// 执行流程
flowExecute
(
jgUseRegistration
.
getSequenceNbr
(),
instanceId
,
"0"
,
""
,
""
,
map
.
getString
(
"manageType"
),
String
.
valueOf
(
map
.
get
(
"nextTaskId"
)),
null
);
flowExecute
(
jgUseRegistration
.
getSequenceNbr
(),
instanceId
,
"0"
,
""
,
""
,
map
.
getString
(
"manageType"
),
String
.
valueOf
(
map
.
get
(
"nextTaskId"
)),
null
);
}
}
}
else
{
}
else
{
if
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"instanceId"
)))
{
if
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"instanceId"
)))
{
...
@@ -651,6 +651,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -651,6 +651,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
.
delDataForCheckEquipRepeatUsed
(
records
,
data
.
getUseUnitCreditCode
());
.
delDataForCheckEquipRepeatUsed
(
records
,
data
.
getUseUnitCreditCode
());
}
}
}
}
/**
/**
* 按单位办理
* 按单位办理
*
*
...
@@ -664,16 +665,15 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -664,16 +665,15 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
List
<
Map
<
String
,
Object
>>
equipmentLists
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"equipmentLists"
);
List
<
Map
<
String
,
Object
>>
equipmentLists
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"equipmentLists"
);
if
(
CollectionUtils
.
isEmpty
(
equipmentLists
))
{
if
(
CollectionUtils
.
isEmpty
(
equipmentLists
))
{
throw
new
BadRequest
(
"请选择设备信息!"
);
throw
new
BadRequest
(
"请选择设备信息!"
);
}
}
if
(
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
map
.
get
(
"EQU_CATEGORY_CODE"
)))
{
if
(
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
map
.
get
(
"EQU_CATEGORY_CODE"
)))
{
// 检验企业是否已存在瓶30的证
boolean
hasExistingCertificate
=
this
.
baseMapper
.
selectList
(
boolean
hasExistingCertificate
=
this
.
baseMapper
.
selectList
(
new
LambdaQueryWrapper
<
JgUseRegistration
>()
new
LambdaQueryWrapper
<
JgUseRegistration
>()
.
eq
(
JgUseRegistration:
:
getUseUnitCreditCode
,
company
.
getCompanyCode
())
.
eq
(
JgUseRegistration:
:
getUseUnitCreditCode
,
company
.
getCompanyCode
())
.
eq
(
JgUseRegistration:
:
getIsDelete
,
false
)
.
eq
(
JgUseRegistration:
:
getIsDelete
,
false
)
.
ne
(
JgUseRegistration:
:
getStatus
,
"已作废
"
)
.
eq
(
JgUseRegistration:
:
getStatus
,
"已完成
"
)
).
stream
().
anyMatch
(
v
->
v
.
getUseRegistrationCode
().
contains
(
"瓶30"
));
).
stream
().
anyMatch
(
v
->
v
.
getUseRegistrationCode
().
contains
(
"瓶30"
));
if
(
hasExistingCertificate
)
{
if
(
hasExistingCertificate
)
{
throw
new
BadRequest
(
"该企业已存在气瓶证书,请选择增补功能进行登记!"
);
throw
new
BadRequest
(
"该企业已存在气瓶证书,请选择增补功能进行登记!"
);
...
@@ -690,8 +690,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -690,8 +690,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
if
(!
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
map
.
get
(
"EQU_CATEGORY_CODE"
))
&&
if
(!
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
map
.
get
(
"EQU_CATEGORY_CODE"
))
&&
(
inspectionDetectionInfoList
.
isEmpty
()
||
inspectionDetectionInfoList
.
stream
().
anyMatch
(
info
->
(
inspectionDetectionInfoList
.
isEmpty
()
||
inspectionDetectionInfoList
.
stream
().
anyMatch
(
info
->
ObjectUtils
.
isEmpty
(
info
)
||
ObjectUtils
.
isEmpty
(
info
.
getInspectType
())
||
ObjectUtils
.
isEmpty
(
info
)
||
ObjectUtils
.
isEmpty
(
info
.
getInspectType
())
||
ObjectUtils
.
isEmpty
(
info
.
getInspectConclusion
())
||
ObjectUtils
.
isEmpty
(
info
.
getInspectOrgCode
())
||
ObjectUtils
.
isEmpty
(
info
.
getInspectConclusion
())
||
ObjectUtils
.
isEmpty
(
info
.
getInspectOrgCode
())
||
ObjectUtils
.
isEmpty
(
info
.
getInspectOrgName
()))))
{
ObjectUtils
.
isEmpty
(
info
.
getInspectOrgName
()))))
{
throw
new
BadRequest
(
"请补充设备检验检测信息后提交!"
);
throw
new
BadRequest
(
"请补充设备检验检测信息后提交!"
);
}
}
...
@@ -802,7 +802,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -802,7 +802,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
this
.
updateUseRegUnitData
(
useRegistration
.
getSequenceNbr
(),
"0"
,
workflowResultDto
,
true
,
null
));
this
.
updateUseRegUnitData
(
useRegistration
.
getSequenceNbr
(),
"0"
,
workflowResultDto
,
true
,
null
));
}
else
{
}
else
{
// 执行流程
// 执行流程
flowExecute
(
useRegistration
.
getSequenceNbr
(),
useRegistration
.
getInstanceId
(),
"0"
,
""
,
""
,
map
.
getString
(
"manageType"
),
String
.
valueOf
(
map
.
get
(
"nextTaskId"
)),
null
);
flowExecute
(
useRegistration
.
getSequenceNbr
(),
useRegistration
.
getInstanceId
(),
"0"
,
""
,
""
,
map
.
getString
(
"manageType"
),
String
.
valueOf
(
map
.
get
(
"nextTaskId"
)),
null
);
}
}
}
else
{
}
else
{
String
equType
=
this
.
baseMapper
.
getEquType
(
String
.
valueOf
(
map
.
get
(
"EQU_LIST_CODE"
)));
String
equType
=
this
.
baseMapper
.
getEquType
(
String
.
valueOf
(
map
.
get
(
"EQU_LIST_CODE"
)));
...
@@ -842,7 +842,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -842,7 +842,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
* @param workflowResultDto 工作流返回
* @param workflowResultDto 工作流返回
* @param isFirst 是否first
* @param isFirst 是否first
*/
*/
private
void
updateUseRegUnitData
(
Long
sequenceNbr
,
String
operate
,
WorkflowResultDto
workflowResultDto
,
Boolean
isFirst
,
JSONObject
jsonObject
)
{
private
void
updateUseRegUnitData
(
Long
sequenceNbr
,
String
operate
,
WorkflowResultDto
workflowResultDto
,
Boolean
isFirst
,
JSONObject
jsonObject
)
{
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
);
String
role
=
workflowResultDto
.
getNextExecutorRoleIds
();
String
role
=
workflowResultDto
.
getNextExecutorRoleIds
();
String
taskCode
=
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
();
String
taskCode
=
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
();
...
@@ -916,7 +916,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -916,7 +916,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryService
.
getOne
(
Wrappers
.<
JgRegistrationHistory
>
lambdaQuery
()
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryService
.
getOne
(
Wrappers
.<
JgRegistrationHistory
>
lambdaQuery
()
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
String
.
valueOf
(
sequenceNbr
)));
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
String
.
valueOf
(
sequenceNbr
)));
// 登记证记录主键
// 登记证记录主键
Long
changeRecordId
=
sequence
.
nextId
();
Long
changeRecordId
=
sequence
.
nextId
();
JSONObject
mapData
=
JSONObject
.
parseObject
(
jgRegistrationHistory
.
getChangeData
());
JSONObject
mapData
=
JSONObject
.
parseObject
(
jgRegistrationHistory
.
getChangeData
());
...
@@ -925,11 +925,11 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -925,11 +925,11 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
Boolean
flag
=
Boolean
.
FALSE
;
Boolean
flag
=
Boolean
.
FALSE
;
String
equCategoryCode
=
String
.
valueOf
(
mapData
.
get
(
"EQU_CATEGORY_CODE"
));
String
equCategoryCode
=
String
.
valueOf
(
mapData
.
get
(
"EQU_CATEGORY_CODE"
));
String
equDefineCode
=
String
.
valueOf
(
mapData
.
get
(
"EQU_DEFINE_CODE"
));
String
equDefineCode
=
String
.
valueOf
(
mapData
.
get
(
"EQU_DEFINE_CODE"
));
if
(
mapData
.
containsKey
(
"equipmentLists"
)
&&
!
ObjectUtils
.
isEmpty
(
mapData
.
get
(
"equipmentLists"
))){
if
(
mapData
.
containsKey
(
"equipmentLists"
)
&&
!
ObjectUtils
.
isEmpty
(
mapData
.
get
(
"equipmentLists"
)))
{
JSONArray
objects
=
JSONObject
.
parseArray
(
mapData
.
get
(
"equipmentLists"
).
toString
());
JSONArray
objects
=
JSONObject
.
parseArray
(
mapData
.
get
(
"equipmentLists"
).
toString
());
if
(!
ObjectUtils
.
isEmpty
(
objects
)){
if
(!
ObjectUtils
.
isEmpty
(
objects
))
{
JSONObject
object
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
objects
.
get
(
0
)));
JSONObject
object
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
objects
.
get
(
0
)));
if
(
object
.
containsKey
(
"equDefine"
)){
if
(
object
.
containsKey
(
"equDefine"
))
{
equDefineCode
=
String
.
valueOf
(
object
.
get
(
"equDefine"
));
equDefineCode
=
String
.
valueOf
(
object
.
get
(
"equDefine"
));
}
}
}
}
...
@@ -937,7 +937,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -937,7 +937,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
//如果是气瓶或工业管道判断之前是否已经做过使用登记
//如果是气瓶或工业管道判断之前是否已经做过使用登记
if
(
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
equCategoryCode
)
||
PipelineEnum
.
INDUSTRIAL_PIPELINE
.
getCode
().
equals
(
equCategoryCode
))
{
if
(
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
equCategoryCode
)
||
PipelineEnum
.
INDUSTRIAL_PIPELINE
.
getCode
().
equals
(
equCategoryCode
))
{
//如果是增补功能
//如果是增补功能
if
(
"1"
.
equals
(
jgUseRegistration
.
getIsAddEquip
())){
if
(
"1"
.
equals
(
jgUseRegistration
.
getIsAddEquip
()))
{
useRegistrationCode
=
jgUseRegistration
.
getUseRegistrationCode
();
useRegistrationCode
=
jgUseRegistration
.
getUseRegistrationCode
();
flag
=
Boolean
.
TRUE
;
flag
=
Boolean
.
TRUE
;
}
}
...
@@ -988,30 +988,31 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -988,30 +988,31 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
/**
/**
* 生成使用登记证变更记录
* 生成使用登记证变更记录
*
* @param jgUseRegistration
* @param jgUseRegistration
* @param registerInfo
* @param registerInfo
* @param changeRecordId
* @param changeRecordId
* @param taskV2Model
* @param taskV2Model
*/
*/
private
void
generateCertificateChangeRecord
(
JgUseRegistration
jgUseRegistration
,
IdxBizJgRegisterInfo
registerInfo
,
private
void
generateCertificateChangeRecord
(
JgUseRegistration
jgUseRegistration
,
IdxBizJgRegisterInfo
registerInfo
,
Long
changeRecordId
,
TaskV2Model
taskV2Model
,
Boolean
flag
)
{
Long
changeRecordId
,
TaskV2Model
taskV2Model
,
Boolean
flag
)
{
Map
<
String
,
String
>
equType
=
new
HashMap
<>();
Map
<
String
,
String
>
equType
=
new
HashMap
<>();
equType
.
put
(
"equList"
,
this
.
baseMapper
.
getEquCategoryNameByCode
(
registerInfo
.
getEquList
()));
equType
.
put
(
"equList"
,
this
.
baseMapper
.
getEquCategoryNameByCode
(
registerInfo
.
getEquList
()));
equType
.
put
(
"equListCode"
,
registerInfo
.
getEquList
());
equType
.
put
(
"equListCode"
,
registerInfo
.
getEquList
());
equType
.
put
(
"equCategory"
,
this
.
baseMapper
.
getEquCategoryNameByCode
(
registerInfo
.
getEquCategory
()));
equType
.
put
(
"equCategory"
,
this
.
baseMapper
.
getEquCategoryNameByCode
(
registerInfo
.
getEquCategory
()));
equType
.
put
(
"equCategoryCode"
,
registerInfo
.
getEquCategory
());
equType
.
put
(
"equCategoryCode"
,
registerInfo
.
getEquCategory
());
equType
.
put
(
"equDefine"
,
this
.
baseMapper
.
getEquCategoryNameByCode
(
registerInfo
.
getEquDefine
()));
equType
.
put
(
"equDefine"
,
this
.
baseMapper
.
getEquCategoryNameByCode
(
registerInfo
.
getEquDefine
()));
equType
.
put
(
"equDefineCode"
,
registerInfo
.
getEquDefine
());
equType
.
put
(
"equDefineCode"
,
registerInfo
.
getEquDefine
());
JgCertificateChangeRecord
changeRecord
=
new
JgCertificateChangeRecord
();
JgCertificateChangeRecord
changeRecord
=
new
JgCertificateChangeRecord
();
changeRecord
.
setApplyNo
(
jgUseRegistration
.
getApplyNo
());
changeRecord
.
setApplyNo
(
jgUseRegistration
.
getApplyNo
());
changeRecord
.
setReceiveOrgName
(
jgUseRegistration
.
getReceiveOrgName
());
changeRecord
.
setReceiveOrgName
(
jgUseRegistration
.
getReceiveOrgName
());
changeRecord
.
setAuditPassDate
(
new
Date
());
changeRecord
.
setAuditPassDate
(
new
Date
());
changeRecord
.
setRegType
(
BusinessTypeEnum
.
JG_USAGE_REGISTRATION
.
getName
());
changeRecord
.
setRegType
(
BusinessTypeEnum
.
JG_USAGE_REGISTRATION
.
getName
());
changeRecord
.
setRegDate
(
jgUseRegistration
.
getCreateDate
());
changeRecord
.
setRegDate
(
jgUseRegistration
.
getCreateDate
());
changeRecord
.
setChangeContent
(
this
.
buildRecordContent
(
jgUseRegistration
,
BusinessTypeEnum
.
JG_USAGE_REGISTRATION
.
getName
(),
flag
));
//变更内容
changeRecord
.
setChangeContent
(
this
.
buildRecordContent
(
jgUseRegistration
,
BusinessTypeEnum
.
JG_USAGE_REGISTRATION
.
getName
(),
flag
));
//变更内容
changeRecord
.
setUseRegistrationCode
(
jgUseRegistration
.
getUseRegistrationCode
());
//使用登记编号
changeRecord
.
setUseRegistrationCode
(
jgUseRegistration
.
getUseRegistrationCode
());
//使用登记编号
changeRecord
.
setReceiveCompanyCode
(
jgUseRegistration
.
getReceiveCompanyOrgCode
());
//接收机构公司代码
changeRecord
.
setReceiveCompanyCode
(
jgUseRegistration
.
getReceiveCompanyOrgCode
());
//接收机构公司代码
changeRecord
.
setCertificateNo
(
commonServiceImpl
.
generateCertificateNo
(
equType
,
new
Date
(),
jgUseRegistration
.
getReceiveCompanyCode
()));
//登记证书唯一码
changeRecord
.
setCertificateNo
(
commonServiceImpl
.
generateCertificateNo
(
equType
,
new
Date
(),
jgUseRegistration
.
getReceiveCompanyCode
()));
//登记证书唯一码
changeRecord
.
setUseUnitCreditCode
(
jgUseRegistration
.
getUseUnitCreditCode
());
//使用单位统一信用代码
changeRecord
.
setUseUnitCreditCode
(
jgUseRegistration
.
getUseUnitCreditCode
());
//使用单位统一信用代码
changeRecord
.
setUseUnitName
(
jgUseRegistration
.
getUseUnitName
());
//使用单位名称
changeRecord
.
setUseUnitName
(
jgUseRegistration
.
getUseUnitName
());
//使用单位名称
changeRecord
.
setEquCategory
(
registerInfo
.
getEquCategory
());
//设备类别编码
changeRecord
.
setEquCategory
(
registerInfo
.
getEquCategory
());
//设备类别编码
...
@@ -1023,16 +1024,17 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -1023,16 +1024,17 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
/**
/**
* 更新登记证管理表数据
* 更新登记证管理表数据
*
* @param sequenceNbr 使用登记业务表seq
* @param sequenceNbr 使用登记业务表seq
*/
*/
private
void
updateRegistrationManage
(
Long
sequenceNbr
){
private
void
updateRegistrationManage
(
Long
sequenceNbr
)
{
JgUseRegistration
jgUseRegistration
=
this
.
baseMapper
.
selectById
(
sequenceNbr
);
JgUseRegistration
jgUseRegistration
=
this
.
baseMapper
.
selectById
(
sequenceNbr
);
LambdaQueryWrapper
<
JgUseRegistrationManage
>
queryWrapper
=
new
LambdaQueryWrapper
<
JgUseRegistrationManage
>()
LambdaQueryWrapper
<
JgUseRegistrationManage
>
queryWrapper
=
new
LambdaQueryWrapper
<
JgUseRegistrationManage
>()
.
eq
(
JgUseRegistrationManage:
:
getUseRegistrationCode
,
jgUseRegistration
.
getUseRegistrationCode
());
.
eq
(
JgUseRegistrationManage:
:
getUseRegistrationCode
,
jgUseRegistration
.
getUseRegistrationCode
());
JgUseRegistrationManage
jgUseRegistrationManage
=
jgUseRegistrationManageService
.
getBaseMapper
().
selectOne
(
queryWrapper
);
JgUseRegistrationManage
jgUseRegistrationManage
=
jgUseRegistrationManageService
.
getBaseMapper
().
selectOne
(
queryWrapper
);
if
(!
ValidationUtil
.
isEmpty
(
jgUseRegistrationManage
)){
if
(!
ValidationUtil
.
isEmpty
(
jgUseRegistrationManage
))
{
jgUseRegistrationManage
.
setUseUnitName
(
jgUseRegistration
.
getUseUnitName
());
jgUseRegistrationManage
.
setUseUnitName
(
jgUseRegistration
.
getUseUnitName
());
jgUseRegistrationManage
.
setApplyNo
(
jgUseRegistration
.
getApplyNo
());
jgUseRegistrationManage
.
setApplyNo
(
jgUseRegistration
.
getApplyNo
());
jgUseRegistrationManage
.
setReceiveOrgName
(
jgUseRegistration
.
getReceiveOrgName
());
jgUseRegistrationManage
.
setReceiveOrgName
(
jgUseRegistration
.
getReceiveOrgName
());
...
@@ -1048,8 +1050,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -1048,8 +1050,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
/**
/**
* 生成登记证数据
* 生成登记证数据
*
* @param jgUseRegistration 使用登记单
* @param jgUseRegistration 使用登记单
* @param registerInfo 一码通设备注册信息表
* @param registerInfo
一码通设备注册信息表
*/
*/
private
void
generateRegistrationManage
(
JgUseRegistration
jgUseRegistration
,
IdxBizJgRegisterInfo
registerInfo
,
Boolean
flag
,
Long
useRegistrationManageSeq
)
{
private
void
generateRegistrationManage
(
JgUseRegistration
jgUseRegistration
,
IdxBizJgRegisterInfo
registerInfo
,
Boolean
flag
,
Long
useRegistrationManageSeq
)
{
...
@@ -1067,12 +1070,12 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -1067,12 +1070,12 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
Map
<
String
,
Object
>
enterpriseInfo
=
commonServiceImpl
.
getEnterpriseInfo
(
jgUseRegistration
.
getUseUnitCreditCode
());
Map
<
String
,
Object
>
enterpriseInfo
=
commonServiceImpl
.
getEnterpriseInfo
(
jgUseRegistration
.
getUseUnitCreditCode
());
//
//
Map
<
String
,
String
>
equType
=
new
HashMap
<>();
Map
<
String
,
String
>
equType
=
new
HashMap
<>();
equType
.
put
(
"equList"
,
this
.
baseMapper
.
getEquCategoryNameByCode
(
registerInfo
.
getEquList
()));
equType
.
put
(
"equList"
,
this
.
baseMapper
.
getEquCategoryNameByCode
(
registerInfo
.
getEquList
()));
equType
.
put
(
"equListCode"
,
registerInfo
.
getEquList
());
equType
.
put
(
"equListCode"
,
registerInfo
.
getEquList
());
equType
.
put
(
"equCategory"
,
this
.
baseMapper
.
getEquCategoryNameByCode
(
registerInfo
.
getEquCategory
()));
equType
.
put
(
"equCategory"
,
this
.
baseMapper
.
getEquCategoryNameByCode
(
registerInfo
.
getEquCategory
()));
equType
.
put
(
"equCategoryCode"
,
registerInfo
.
getEquCategory
());
equType
.
put
(
"equCategoryCode"
,
registerInfo
.
getEquCategory
());
equType
.
put
(
"equDefine"
,
this
.
baseMapper
.
getEquCategoryNameByCode
(
registerInfo
.
getEquDefine
()));
equType
.
put
(
"equDefine"
,
this
.
baseMapper
.
getEquCategoryNameByCode
(
registerInfo
.
getEquDefine
()));
equType
.
put
(
"equDefineCode"
,
registerInfo
.
getEquDefine
());
equType
.
put
(
"equDefineCode"
,
registerInfo
.
getEquDefine
());
JgUseRegistrationManage
jgUseRegistrationManage
=
new
JgUseRegistrationManage
();
JgUseRegistrationManage
jgUseRegistrationManage
=
new
JgUseRegistrationManage
();
jgUseRegistrationManage
.
setUseUnitName
(
jgUseRegistration
.
getUseUnitName
());
jgUseRegistrationManage
.
setUseUnitName
(
jgUseRegistration
.
getUseUnitName
());
jgUseRegistrationManage
.
setApplyNo
(
jgUseRegistration
.
getApplyNo
());
jgUseRegistrationManage
.
setApplyNo
(
jgUseRegistration
.
getApplyNo
());
...
@@ -1099,11 +1102,11 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -1099,11 +1102,11 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
jgUseRegistrationManage
.
setUseUnitCreditCode
(
jgUseRegistration
.
getUseUnitCreditCode
());
jgUseRegistrationManage
.
setUseUnitCreditCode
(
jgUseRegistration
.
getUseUnitCreditCode
());
jgUseRegistrationManage
.
setReceiveCompanyCode
(
jgUseRegistration
.
getReceiveCompanyCode
());
jgUseRegistrationManage
.
setReceiveCompanyCode
(
jgUseRegistration
.
getReceiveCompanyCode
());
jgUseRegistrationManage
.
setManageType
(
jgUseRegistration
.
getManageType
());
jgUseRegistrationManage
.
setManageType
(
jgUseRegistration
.
getManageType
());
jgUseRegistrationManage
.
setCertificateNo
(
commonServiceImpl
.
generateCertificateNo
(
equType
,
new
Date
(),
jgUseRegistration
.
getReceiveCompanyCode
()));
jgUseRegistrationManage
.
setCertificateNo
(
commonServiceImpl
.
generateCertificateNo
(
equType
,
new
Date
(),
jgUseRegistration
.
getReceiveCompanyCode
()));
jgUseRegistrationManageService
.
save
(
jgUseRegistrationManage
);
jgUseRegistrationManageService
.
save
(
jgUseRegistrationManage
);
}
}
public
JgUseRegistration
updateData
(
Long
sequenceNbr
,
String
operate
,
WorkflowResultDto
workflowResultDto
,
String
carNumber
,
Boolean
isFirst
,
JSONObject
jsonObject
)
{
public
JgUseRegistration
updateData
(
Long
sequenceNbr
,
String
operate
,
WorkflowResultDto
workflowResultDto
,
String
carNumber
,
Boolean
isFirst
,
JSONObject
jsonObject
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
role
=
workflowResultDto
.
getNextExecutorRoleIds
();
String
role
=
workflowResultDto
.
getNextExecutorRoleIds
();
String
taskCode
=
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
();
String
taskCode
=
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
();
...
@@ -1192,7 +1195,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -1192,7 +1195,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
String
equId
=
String
.
valueOf
(
mapData
.
get
(
"equipId"
));
String
equId
=
String
.
valueOf
(
mapData
.
get
(
"equipId"
));
// 登记证记录主键
// 登记证记录主键
Long
changeRecordId
=
sequence
.
nextId
();
Long
changeRecordId
=
sequence
.
nextId
();
// 注册信息
// 注册信息
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>
lambdaReg
=
new
QueryWrapper
<
IdxBizJgRegisterInfo
>().
lambda
();
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>
lambdaReg
=
new
QueryWrapper
<
IdxBizJgRegisterInfo
>().
lambda
();
...
@@ -1279,7 +1282,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -1279,7 +1282,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
LambdaQueryWrapper
<
IdxBizJgUseInfo
>
lambda
=
new
QueryWrapper
<
IdxBizJgUseInfo
>().
lambda
();
LambdaQueryWrapper
<
IdxBizJgUseInfo
>
lambda
=
new
QueryWrapper
<
IdxBizJgUseInfo
>().
lambda
();
lambda
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
String
.
valueOf
(
mapData
.
get
(
"equipId"
)));
lambda
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
String
.
valueOf
(
mapData
.
get
(
"equipId"
)));
IdxBizJgUseInfo
useInfo
=
useInfoMapper
.
selectOne
(
lambda
);
IdxBizJgUseInfo
useInfo
=
useInfoMapper
.
selectOne
(
lambda
);
String
usePlace
=
useInfo
.
getProvinceName
()
+
"/"
+
useInfo
.
getCityName
()
+
"/"
+
useInfo
.
getCountyName
()
+
"/"
+
useInfo
.
getStreetName
();
String
usePlace
=
useInfo
.
getProvinceName
()
+
"/"
+
useInfo
.
getCityName
()
+
"/"
+
useInfo
.
getCountyName
()
+
"/"
+
useInfo
.
getStreetName
();
useInfo
.
setIsIntoManagement
(
Boolean
.
TRUE
);
useInfo
.
setIsIntoManagement
(
Boolean
.
TRUE
);
useInfoMapper
.
updateById
(
useInfo
);
useInfoMapper
.
updateById
(
useInfo
);
// 更新es
// 更新es
...
@@ -1298,6 +1301,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -1298,6 +1301,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
/**
/**
* 流程结束更新代办
* 流程结束更新代办
*
* @param jgUseRegistration 登记单信息
* @param jgUseRegistration 登记单信息
*/
*/
private
TaskV2Model
updateAgency
(
JgUseRegistration
jgUseRegistration
)
{
private
TaskV2Model
updateAgency
(
JgUseRegistration
jgUseRegistration
)
{
...
@@ -1316,6 +1320,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -1316,6 +1320,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
/**
/**
* 作废的证变更内容
* 作废的证变更内容
*
* @param obj JgUseRegistration
* @param obj JgUseRegistration
* @return result
* @return result
*/
*/
...
@@ -1328,7 +1333,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -1328,7 +1333,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
"单号【"
+
obj
.
getApplyNo
()
+
"】,申请日期"
+
simpleDateFormat
.
format
(
obj
.
getRecDate
());
"单号【"
+
obj
.
getApplyNo
()
+
"】,申请日期"
+
simpleDateFormat
.
format
(
obj
.
getRecDate
());
}
}
private
String
buildRecordContent
(
JgUseRegistration
obj
,
String
businessName
,
Boolean
flag
)
{
private
String
buildRecordContent
(
JgUseRegistration
obj
,
String
businessName
,
Boolean
flag
)
{
//张三办理了【单位变更】 ,单号【DWBG202407050001】,办理日期2024-07-05
//张三办理了【单位变更】 ,单号【DWBG202407050001】,办理日期2024-07-05
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy年MM月dd日"
);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy年MM月dd日"
);
return
obj
.
getRecUserName
()
+
"办理了【"
+
businessName
+
(
flag
?
"设备增补"
:
""
)
+
"】,"
+
return
obj
.
getRecUserName
()
+
"办理了【"
+
businessName
+
(
flag
?
"设备增补"
:
""
)
+
"】,"
+
...
@@ -1367,7 +1372,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -1367,7 +1372,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
}
public
void
updateEsData
(
String
usePlace
,
JSONObject
dataMap
,
IdxBizJgOtherInfo
otherInfo
,
public
void
updateEsData
(
String
usePlace
,
JSONObject
dataMap
,
IdxBizJgOtherInfo
otherInfo
,
JgUseRegistration
jgUseRegistration
,
JSONObject
jsonObject
)
{
JgUseRegistration
jgUseRegistration
,
JSONObject
jsonObject
)
{
// 更新es
// 更新es
HashMap
<
String
,
Map
<
String
,
Object
>>
objMap
=
new
HashMap
<>();
HashMap
<
String
,
Map
<
String
,
Object
>>
objMap
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
param
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
param
=
new
HashMap
<>();
...
@@ -1964,7 +1969,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -1964,7 +1969,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
LambdaQueryWrapper
<
JgRegistrationHistory
>
lambda
=
new
QueryWrapper
<
JgRegistrationHistory
>().
lambda
();
LambdaQueryWrapper
<
JgRegistrationHistory
>
lambda
=
new
QueryWrapper
<
JgRegistrationHistory
>().
lambda
();
lambda
.
in
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
useRegistrationSeqs
);
lambda
.
in
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
useRegistrationSeqs
);
List
<
JgRegistrationHistory
>
registrationHistoryList
=
jgRegistrationHistoryService
.
getBaseMapper
().
selectList
(
lambda
);
List
<
JgRegistrationHistory
>
registrationHistoryList
=
jgRegistrationHistoryService
.
getBaseMapper
().
selectList
(
lambda
);
if
(
ValidationUtil
.
isEmpty
(
registrationHistoryList
))
{
if
(
ValidationUtil
.
isEmpty
(
registrationHistoryList
))
{
throw
new
BadRequest
(
"没有查询到汇总信息!"
);
throw
new
BadRequest
(
"没有查询到汇总信息!"
);
}
}
JSONArray
allEquipment
=
new
JSONArray
();
JSONArray
allEquipment
=
new
JSONArray
();
...
@@ -1986,7 +1991,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -1986,7 +1991,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
.
eq
(
JgUseRegistration:
:
getSequenceNbr
,
useRegistrationSeqs
.
get
(
0
)));
.
eq
(
JgUseRegistration:
:
getSequenceNbr
,
useRegistrationSeqs
.
get
(
0
)));
// 暂时拿第一条的 监管部门和安全管理人员
// 暂时拿第一条的 监管部门和安全管理人员
JSONObject
jsonObjectFirst
=
new
JSONObject
();
JSONObject
jsonObjectFirst
=
new
JSONObject
();
if
(!
ValidationUtil
.
isEmpty
(
registrationHistoryList
.
get
(
0
)))
{
if
(!
ValidationUtil
.
isEmpty
(
registrationHistoryList
.
get
(
0
)))
{
JgRegistrationHistory
jgRegistrationHistory
=
registrationHistoryList
.
get
(
0
);
JgRegistrationHistory
jgRegistrationHistory
=
registrationHistoryList
.
get
(
0
);
jsonObjectFirst
=
JSONObject
.
parseObject
(
jgRegistrationHistory
.
getChangeData
());
jsonObjectFirst
=
JSONObject
.
parseObject
(
jgRegistrationHistory
.
getChangeData
());
}
}
...
@@ -2185,13 +2190,13 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2185,13 +2190,13 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 安装信息
// 安装信息
Map
<
String
,
Object
>
installDetail
=
this
.
baseMapper
.
getiInstallDetail
(
record
);
Map
<
String
,
Object
>
installDetail
=
this
.
baseMapper
.
getiInstallDetail
(
record
);
// 历史设备登记来的数据没有安装业务信息 从一码通数据拿
// 历史设备登记来的数据没有安装业务信息 从一码通数据拿
if
(
ValidationUtil
.
isEmpty
(
installDetail
)){
if
(
ValidationUtil
.
isEmpty
(
installDetail
))
{
installDetail
=
this
.
baseMapper
.
getiInstallDetailByIdx
(
record
);
installDetail
=
this
.
baseMapper
.
getiInstallDetailByIdx
(
record
);
}
}
// 维保信息
// 维保信息
Map
<
String
,
Object
>
maintenanceDetail
=
this
.
baseMapper
.
getMaintenanceDetail
(
record
);
Map
<
String
,
Object
>
maintenanceDetail
=
this
.
baseMapper
.
getMaintenanceDetail
(
record
);
// 历史设备登记来的数据没有维保业务信息 从一码通数据拿
// 历史设备登记来的数据没有维保业务信息 从一码通数据拿
if
(
ValidationUtil
.
isEmpty
(
maintenanceDetail
)){
if
(
ValidationUtil
.
isEmpty
(
maintenanceDetail
))
{
maintenanceDetail
=
this
.
baseMapper
.
getMaintenanceDetailByIdx
(
record
);
maintenanceDetail
=
this
.
baseMapper
.
getMaintenanceDetailByIdx
(
record
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
maintenanceDetail
))
{
if
(!
ObjectUtils
.
isEmpty
(
maintenanceDetail
))
{
...
@@ -2271,7 +2276,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2271,7 +2276,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 更新使用登记业务表
// 更新使用登记业务表
jgUseRegistration
.
setSupervisoryCode
(
String
.
valueOf
(
result
.
get
(
"superviseCode"
)));
jgUseRegistration
.
setSupervisoryCode
(
String
.
valueOf
(
result
.
get
(
"superviseCode"
)));
}
}
}
else
{
}
else
{
jgUseRegistration
.
setSupervisoryCode
(
otherInfo
.
getSupervisoryCode
());
jgUseRegistration
.
setSupervisoryCode
(
otherInfo
.
getSupervisoryCode
());
}
}
otherInfo
.
setClaimStatus
(
"已认领"
);
otherInfo
.
setClaimStatus
(
"已认领"
);
...
@@ -2362,25 +2367,26 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2362,25 +2367,26 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
/**
/**
* 作废使用登记证 & 生成使用登记证的流水
* 作废使用登记证 & 生成使用登记证的流水
*
* @param jgUseRegistration
* @param jgUseRegistration
*/
*/
private
void
invalidUseRegistrationCertificate
(
JgUseRegistration
jgUseRegistration
){
private
void
invalidUseRegistrationCertificate
(
JgUseRegistration
jgUseRegistration
)
{
Integer
count
=
jgUseRegistrationMapper
.
selectCount
(
new
LambdaQueryWrapper
<
JgUseRegistration
>()
Integer
count
=
jgUseRegistrationMapper
.
selectCount
(
new
LambdaQueryWrapper
<
JgUseRegistration
>()
.
eq
(
JgUseRegistration:
:
getUseRegistrationCode
,
jgUseRegistration
.
getUseRegistrationCode
()));
.
eq
(
JgUseRegistration:
:
getUseRegistrationCode
,
jgUseRegistration
.
getUseRegistrationCode
()));
// 一证对应多条使用登记单时,不作废证
// 一证对应多条使用登记单时,不作废证
if
(
count
>
1
){
if
(
count
>
1
)
{
return
;
return
;
}
}
JgUseRegistrationManage
registrationManage
=
new
JgUseRegistrationManage
();
JgUseRegistrationManage
registrationManage
=
new
JgUseRegistrationManage
();
registrationManage
.
setCertificateStatus
(
CertificateStatusEnum
.
YIZHUXIAO
.
getName
());
registrationManage
.
setCertificateStatus
(
CertificateStatusEnum
.
YIZHUXIAO
.
getName
());
LambdaQueryWrapper
<
JgUseRegistrationManage
>
wrapper
=
new
LambdaQueryWrapper
<
JgUseRegistrationManage
>()
LambdaQueryWrapper
<
JgUseRegistrationManage
>
wrapper
=
new
LambdaQueryWrapper
<
JgUseRegistrationManage
>()
.
eq
(
JgUseRegistrationManage:
:
getUseRegistrationCode
,
jgUseRegistration
.
getUseRegistrationCode
());
.
eq
(
JgUseRegistrationManage:
:
getUseRegistrationCode
,
jgUseRegistration
.
getUseRegistrationCode
());
jgUseRegistrationManageMapper
.
update
(
registrationManage
,
wrapper
);
jgUseRegistrationManageMapper
.
update
(
registrationManage
,
wrapper
);
// 生成使用登记证的作废流水
// 生成使用登记证的作废流水
Optional
<
JgCertificateChangeRecord
>
firstRecord
=
certificateChangeRecordService
.
getBaseMapper
().
selectList
(
new
LambdaQueryWrapper
<
JgCertificateChangeRecord
>()
Optional
<
JgCertificateChangeRecord
>
firstRecord
=
certificateChangeRecordService
.
getBaseMapper
().
selectList
(
new
LambdaQueryWrapper
<
JgCertificateChangeRecord
>()
.
eq
(
JgCertificateChangeRecord:
:
getUseRegistrationCode
,
jgUseRegistration
.
getUseRegistrationCode
())
.
eq
(
JgCertificateChangeRecord:
:
getUseRegistrationCode
,
jgUseRegistration
.
getUseRegistrationCode
())
.
orderByAsc
(
JgCertificateChangeRecord:
:
getCreateDate
))
.
orderByAsc
(
JgCertificateChangeRecord:
:
getCreateDate
))
.
stream
()
.
stream
()
.
findFirst
();
.
findFirst
();
...
@@ -2476,6 +2482,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2476,6 +2482,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
/**
/**
* 处理历史错误单子
* 处理历史错误单子
*
* @param applyNo 申请单号
* @param applyNo 申请单号
*/
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
@@ -2485,7 +2492,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2485,7 +2492,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
queryWrapper
.
eq
(
JgUseRegistration:
:
getApplyNo
,
applyNo
);
queryWrapper
.
eq
(
JgUseRegistration:
:
getApplyNo
,
applyNo
);
JgUseRegistration
jgUseRegistration
=
this
.
baseMapper
.
selectOne
(
queryWrapper
);
JgUseRegistration
jgUseRegistration
=
this
.
baseMapper
.
selectOne
(
queryWrapper
);
if
(
jgUseRegistration
!=
null
)
{
if
(
jgUseRegistration
!=
null
)
{
String
lockKey
=
CommonServiceImpl
.
buildJgExecuteLockKey
(
jgUseRegistration
.
getInstanceId
());
String
lockKey
=
CommonServiceImpl
.
buildJgExecuteLockKey
(
jgUseRegistration
.
getInstanceId
());
RLock
lock
=
redissonClient
.
getLock
(
lockKey
);
RLock
lock
=
redissonClient
.
getLock
(
lockKey
);
try
{
try
{
...
@@ -2572,6 +2579,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2572,6 +2579,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
/**
/**
* 按单位新增历史设备
* 按单位新增历史设备
*
* @param jsonObject
* @param jsonObject
* @return
* @return
*/
*/
...
@@ -2581,6 +2589,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2581,6 +2589,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
/**
/**
* 按台套新增历史设备
* 按台套新增历史设备
*
* @param map
* @param map
* @return
* @return
*/
*/
...
@@ -2654,7 +2663,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2654,7 +2663,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
AtomicReference
<
String
>
atomicUseCounty
=
new
AtomicReference
<>(
useCountyName
);
AtomicReference
<
String
>
atomicUseCounty
=
new
AtomicReference
<>(
useCountyName
);
region
.
forEach
(
item
->
{
region
.
forEach
(
item
->
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
String
.
valueOf
(
finalMap1
.
get
(
"county"
))))
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
String
.
valueOf
(
finalMap1
.
get
(
"county"
))))
{
atomicUseCounty
.
set
(
""
+
item
.
get
(
"regionName"
));
atomicUseCounty
.
set
(
""
+
item
.
get
(
"regionName"
));
jgUseRegistration
.
setUseAddress
(
jgUseRegistration
.
getUseAddress
()
+
item
.
get
(
"regionName"
));
jgUseRegistration
.
setUseAddress
(
jgUseRegistration
.
getUseAddress
()
+
item
.
get
(
"regionName"
));
}
}
});
});
...
@@ -2666,7 +2675,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2666,7 +2675,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
AtomicReference
<
String
>
atomicUseStreet
=
new
AtomicReference
<>(
useStreetName
);
AtomicReference
<
String
>
atomicUseStreet
=
new
AtomicReference
<>(
useStreetName
);
street
.
forEach
(
item
->
{
street
.
forEach
(
item
->
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
String
.
valueOf
(
finalMap2
.
get
(
"factoryUseSiteStreet"
))))
{
if
(
String
.
valueOf
(
item
.
get
(
"regionCode"
)).
equals
(
String
.
valueOf
(
finalMap2
.
get
(
"factoryUseSiteStreet"
))))
{
atomicUseStreet
.
set
(
""
+
item
.
get
(
"regionName"
));
atomicUseStreet
.
set
(
""
+
item
.
get
(
"regionName"
));
jgUseRegistration
.
setUseAddress
(
jgUseRegistration
.
getUseAddress
()
+
item
.
get
(
"regionName"
));
jgUseRegistration
.
setUseAddress
(
jgUseRegistration
.
getUseAddress
()
+
item
.
get
(
"regionName"
));
}
}
});
});
...
@@ -2791,7 +2800,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2791,7 +2800,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
useInfo
.
setUsePlace
((
String
)
map
.
get
(
"usePlace"
));
useInfo
.
setUsePlace
((
String
)
map
.
get
(
"usePlace"
));
// 历史平台登记,将设备状态改为在用
// 历史平台登记,将设备状态改为在用
useInfo
.
setEquState
(
EquimentEnum
.
ZAIYONG
.
getCode
().
toString
());
useInfo
.
setEquState
(
EquimentEnum
.
ZAIYONG
.
getCode
().
toString
());
String
usePlace
=
useInfo
.
getProvinceName
()
+
"/"
+
useInfo
.
getCityName
()
+
"/"
+
useInfo
.
getCountyName
()
+
"/"
+
useInfo
.
getStreetName
();
String
usePlace
=
useInfo
.
getProvinceName
()
+
"/"
+
useInfo
.
getCityName
()
+
"/"
+
useInfo
.
getCountyName
()
+
"/"
+
useInfo
.
getStreetName
();
useInfoMapper
.
updateById
(
useInfo
);
useInfoMapper
.
updateById
(
useInfo
);
LambdaQueryWrapper
<
IdxBizJgOtherInfo
>
otherLambda
=
new
QueryWrapper
<
IdxBizJgOtherInfo
>().
lambda
();
LambdaQueryWrapper
<
IdxBizJgOtherInfo
>
otherLambda
=
new
QueryWrapper
<
IdxBizJgOtherInfo
>().
lambda
();
...
@@ -2827,7 +2836,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2827,7 +2836,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
this
.
historyEquUpdateMaintenanceInfo
(
map
);
this
.
historyEquUpdateMaintenanceInfo
(
map
);
// 历史设备 生成证书管理表记录 & 生成安装 维保等操作记录
// 历史设备 生成证书管理表记录 & 生成安装 维保等操作记录
this
.
historyEquGenManageRelated
(
map
,
jgUseRegistration
,
registerInfo
,
idxBizJgFactoryInfo
);
this
.
historyEquGenManageRelated
(
map
,
jgUseRegistration
,
registerInfo
,
idxBizJgFactoryInfo
);
}
}
return
this
.
baseMapper
.
getDetailById
(
jgUseRegistration
.
getSequenceNbr
());
return
this
.
baseMapper
.
getDetailById
(
jgUseRegistration
.
getSequenceNbr
());
...
@@ -2847,7 +2856,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2847,7 +2856,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
/**
/**
* 历史设备登记-》更新维保信息
* 历史设备登记-》更新维保信息
*/
*/
private
void
historyEquUpdateMaintenanceInfo
(
JSONObject
map
){
private
void
historyEquUpdateMaintenanceInfo
(
JSONObject
map
)
{
SimpleDateFormat
format
=
new
SimpleDateFormat
();
SimpleDateFormat
format
=
new
SimpleDateFormat
();
IdxBizJgMaintenanceRecordInfo
info
=
idxBizJgMaintenanceRecordInfoService
.
queryNewestDetailByRecord
(
String
.
valueOf
(
map
.
get
(
"equipId"
)));
IdxBizJgMaintenanceRecordInfo
info
=
idxBizJgMaintenanceRecordInfoService
.
queryNewestDetailByRecord
(
String
.
valueOf
(
map
.
get
(
"equipId"
)));
if
(!
ValidationUtil
.
isEmpty
(
info
.
getSequenceNbr
()))
{
if
(!
ValidationUtil
.
isEmpty
(
info
.
getSequenceNbr
()))
{
...
@@ -2862,7 +2871,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2862,7 +2871,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
try
{
try
{
info
.
setInformStart
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"informStart"
))
?
null
:
format
.
parse
(
String
.
valueOf
(
map
.
get
(
"informStart"
))));
info
.
setInformStart
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"informStart"
))
?
null
:
format
.
parse
(
String
.
valueOf
(
map
.
get
(
"informStart"
))));
info
.
setInformEnd
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"informEnd"
))
?
null
:
format
.
parse
(
String
.
valueOf
(
map
.
get
(
"informEnd"
))));
info
.
setInformEnd
(
ValidationUtil
.
isEmpty
(
map
.
get
(
"informEnd"
))
?
null
:
format
.
parse
(
String
.
valueOf
(
map
.
get
(
"informEnd"
))));
}
catch
(
Exception
exception
)
{
}
catch
(
Exception
exception
)
{
exception
.
printStackTrace
();
exception
.
printStackTrace
();
log
.
info
(
"date转化失败"
);
log
.
info
(
"date转化失败"
);
}
}
...
@@ -2874,7 +2883,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2874,7 +2883,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
/**
/**
* 历史设备登记-》更新安装信息
* 历史设备登记-》更新安装信息
*/
*/
private
void
historyEquUpdateInstallInfo
(
JSONObject
map
){
private
void
historyEquUpdateInstallInfo
(
JSONObject
map
)
{
IdxBizJgConstructionInfo
constructionInfo
=
idxBizJgConstructionInfoService
.
queryNewestDetailByRecord
(
String
.
valueOf
(
map
.
get
(
"equipId"
)));
IdxBizJgConstructionInfo
constructionInfo
=
idxBizJgConstructionInfoService
.
queryNewestDetailByRecord
(
String
.
valueOf
(
map
.
get
(
"equipId"
)));
if
(!
ValidationUtil
.
isEmpty
(
constructionInfo
.
getSequenceNbr
()))
{
if
(!
ValidationUtil
.
isEmpty
(
constructionInfo
.
getSequenceNbr
()))
{
...
@@ -2889,7 +2898,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2889,7 +2898,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
}
}
}
private
void
historyEquGenManageRelated
(
JSONObject
map
,
JgUseRegistration
jgUseRegistration
,
IdxBizJgRegisterInfo
registerInfo
,
IdxBizJgFactoryInfo
idxBizJgFactoryInfo
)
{
private
void
historyEquGenManageRelated
(
JSONObject
map
,
JgUseRegistration
jgUseRegistration
,
IdxBizJgRegisterInfo
registerInfo
,
IdxBizJgFactoryInfo
idxBizJgFactoryInfo
)
{
// 生成证书管理表记录
// 生成证书管理表记录
generateRegistrationManage
(
jgUseRegistration
,
registerInfo
,
Boolean
.
FALSE
,
null
);
generateRegistrationManage
(
jgUseRegistration
,
registerInfo
,
Boolean
.
FALSE
,
null
);
...
@@ -2906,10 +2915,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2906,10 +2915,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
certificateChangeRecordEqService
.
save
(
changeRecordEq
);
certificateChangeRecordEqService
.
save
(
changeRecordEq
);
// 使用登记证变更记录 -> 安装告知记录
// 使用登记证变更记录 -> 安装告知记录
if
(!
ValidationUtil
.
isEmpty
(
map
.
get
(
"uscUnitCodeAndName"
))){
if
(!
ValidationUtil
.
isEmpty
(
map
.
get
(
"uscUnitCodeAndName"
)))
{
long
jgInstallSeq
=
sequence
.
nextId
();
//登记证记录主键
long
jgInstallSeq
=
sequence
.
nextId
();
//登记证记录主键
String
useRegistrationCode
=
jgUseRegistration
.
getUseRegistrationCode
();
// 使用登记证编号
String
useRegistrationCode
=
jgUseRegistration
.
getUseRegistrationCode
();
// 使用登记证编号
genJgCertChangeRecordForInstall
(
jgInstallSeq
,
useRegistrationCode
,
map
,
jgUseRegistration
,
registerInfo
);
genJgCertChangeRecordForInstall
(
jgInstallSeq
,
useRegistrationCode
,
map
,
jgUseRegistration
,
registerInfo
);
// 使用登记证变更记录 -> 安装告知记录 ——> 生成tzs_jg_certificate_change_record_eq记录
// 使用登记证变更记录 -> 安装告知记录 ——> 生成tzs_jg_certificate_change_record_eq记录
JgCertificateChangeRecordEq
changeRecordEq1
=
new
JgCertificateChangeRecordEq
();
JgCertificateChangeRecordEq
changeRecordEq1
=
new
JgCertificateChangeRecordEq
();
changeRecordEq1
.
setChangeRecordId
(
String
.
valueOf
(
jgInstallSeq
));
changeRecordEq1
.
setChangeRecordId
(
String
.
valueOf
(
jgInstallSeq
));
...
@@ -2919,10 +2928,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2919,10 +2928,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
}
// 使用登记证变更记录 -> 维保备案记录
// 使用登记证变更记录 -> 维保备案记录
if
(!
ValidationUtil
.
isEmpty
(
map
.
get
(
"meUnitName"
))){
if
(!
ValidationUtil
.
isEmpty
(
map
.
get
(
"meUnitName"
)))
{
long
jgMaintenanceSeq
=
sequence
.
nextId
();
//登记证记录主键
long
jgMaintenanceSeq
=
sequence
.
nextId
();
//登记证记录主键
String
useRegistrationCode
=
jgUseRegistration
.
getUseRegistrationCode
();
// 使用登记证编号
String
useRegistrationCode
=
jgUseRegistration
.
getUseRegistrationCode
();
// 使用登记证编号
genJgCertChangeRecordForMaintenance
(
jgMaintenanceSeq
,
useRegistrationCode
,
map
,
jgUseRegistration
,
registerInfo
);
genJgCertChangeRecordForMaintenance
(
jgMaintenanceSeq
,
useRegistrationCode
,
map
,
jgUseRegistration
,
registerInfo
);
// 使用登记证变更记录 -> 维保备案记录 ——> 生成tzs_jg_certificate_change_record_eq记录
// 使用登记证变更记录 -> 维保备案记录 ——> 生成tzs_jg_certificate_change_record_eq记录
JgCertificateChangeRecordEq
changeRecordEq2
=
new
JgCertificateChangeRecordEq
();
JgCertificateChangeRecordEq
changeRecordEq2
=
new
JgCertificateChangeRecordEq
();
changeRecordEq2
.
setChangeRecordId
(
String
.
valueOf
(
jgMaintenanceSeq
));
changeRecordEq2
.
setChangeRecordId
(
String
.
valueOf
(
jgMaintenanceSeq
));
...
@@ -2932,7 +2941,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2932,7 +2941,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
}
}
}
public
void
genJgCertChangeRecordForInstall
(
Long
sequenceNbr
,
String
registrationCode
,
JSONObject
map
,
JgUseRegistration
jgUseRegistration
,
IdxBizJgRegisterInfo
idxBizJgRegisterInfo
)
{
public
void
genJgCertChangeRecordForInstall
(
Long
sequenceNbr
,
String
registrationCode
,
JSONObject
map
,
JgUseRegistration
jgUseRegistration
,
IdxBizJgRegisterInfo
idxBizJgRegisterInfo
)
{
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
String
changeContent
=
""
;
String
changeContent
=
""
;
// 生成一条tzs_jg_certificate_change_record记录
// 生成一条tzs_jg_certificate_change_record记录
...
@@ -2943,7 +2952,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2943,7 +2952,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
"办理日期"
+
map
.
get
(
"installStartDate"
);
"办理日期"
+
map
.
get
(
"installStartDate"
);
jgCertificateChangeRecord
.
setAuditPassDate
(
simpleDateFormat
.
parse
((
String
)
map
.
get
(
"installStartDate"
)));
jgCertificateChangeRecord
.
setAuditPassDate
(
simpleDateFormat
.
parse
((
String
)
map
.
get
(
"installStartDate"
)));
jgCertificateChangeRecord
.
setRegDate
(
simpleDateFormat
.
parse
((
String
)
map
.
get
(
"installStartDate"
)));
jgCertificateChangeRecord
.
setRegDate
(
simpleDateFormat
.
parse
((
String
)
map
.
get
(
"installStartDate"
)));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
log
.
info
(
"date转化错误"
);
log
.
info
(
"date转化错误"
);
}
}
...
@@ -2963,7 +2972,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2963,7 +2972,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
certificateChangeRecordService
.
save
(
jgCertificateChangeRecord
);
certificateChangeRecordService
.
save
(
jgCertificateChangeRecord
);
}
}
public
void
genJgCertChangeRecordForMaintenance
(
Long
sequenceNbr
,
String
registrationCode
,
JSONObject
map
,
JgUseRegistration
jgUseRegistration
,
IdxBizJgRegisterInfo
idxBizJgRegisterInfo
)
{
public
void
genJgCertChangeRecordForMaintenance
(
Long
sequenceNbr
,
String
registrationCode
,
JSONObject
map
,
JgUseRegistration
jgUseRegistration
,
IdxBizJgRegisterInfo
idxBizJgRegisterInfo
)
{
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
String
changeContent
=
""
;
String
changeContent
=
""
;
// 生成一条tzs_jg_certificate_change_record记录
// 生成一条tzs_jg_certificate_change_record记录
...
@@ -2974,7 +2983,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2974,7 +2983,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
"办理日期"
+
map
.
get
(
"installStartDate"
);
"办理日期"
+
map
.
get
(
"installStartDate"
);
jgCertificateChangeRecord
.
setAuditPassDate
(
simpleDateFormat
.
parse
((
String
)
map
.
get
(
"informEnd"
)));
jgCertificateChangeRecord
.
setAuditPassDate
(
simpleDateFormat
.
parse
((
String
)
map
.
get
(
"informEnd"
)));
jgCertificateChangeRecord
.
setRegDate
(
simpleDateFormat
.
parse
((
String
)
map
.
get
(
"informStart"
)));
jgCertificateChangeRecord
.
setRegDate
(
simpleDateFormat
.
parse
((
String
)
map
.
get
(
"informStart"
)));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
log
.
info
(
"date转化错误"
);
log
.
info
(
"date转化错误"
);
}
}
...
...
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