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
35901d21
Commit
35901d21
authored
Nov 24, 2025
by
刘林
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'refs/heads/develop_tzs_main' into develop_tzs_test
parents
2dabb51d
d3b4de0f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
247 additions
and
13 deletions
+247
-13
JgUseRegistrationMapper.xml
...api/src/main/resources/mapper/JgUseRegistrationMapper.xml
+2
-2
JgChangeRegistrationUnitController.java
...jg/biz/controller/JgChangeRegistrationUnitController.java
+13
-0
IdxBizJgProjectContraptionServiceImplService.java
...ce/impl/IdxBizJgProjectContraptionServiceImplService.java
+3
-4
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+5
-4
JgChangeRegistrationUnitServiceImpl.java
...biz/service/impl/JgChangeRegistrationUnitServiceImpl.java
+222
-1
IdxBizJgProjectContraptionMapper.xml
...ain/resources/mapper/IdxBizJgProjectContraptionMapper.xml
+2
-2
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationMapper.xml
View file @
35901d21
...
...
@@ -1329,7 +1329,7 @@
</if>
</otherwise>
</choose>
ORDER BY ui.REC_DATE DESC
ORDER BY
factoryNum ASC,
ui.REC_DATE DESC
) aa
<where>
<if
test=
"jsonObject.equDefineName != null and jsonObject.equDefineName != ''"
>
...
...
@@ -1450,7 +1450,7 @@
<foreach
collection=
"records"
item=
"record"
open=
"("
close=
")"
separator=
","
>
#{record}
</foreach>
ORDER BY ui.REC_DATE DESC
ORDER BY
factoryNum ASC,
ui.REC_DATE DESC
</select>
<select
id=
"queryForFlowingEquipList"
resultType=
"com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto"
>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgChangeRegistrationUnitController.java
View file @
35901d21
...
...
@@ -232,4 +232,17 @@ public class JgChangeRegistrationUnitController extends BaseController {
return
ResponseHelper
.
buildResponse
(
businessType
.
equals
(
"1"
)
?
"单位变更"
:
"注销"
+
"业务,"
+
"申请单号:"
+
applyNos
+
"数据修改成功"
);
}
/**
* 处理单位变更流程结束,业务未结束单子问题
* @param applyNo 申请单号
* @return s
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/handleChangeRegistrationUnitWrongData"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"处理单位变更流程结束,业务未结束单子问题"
,
notes
=
"处理单位变更流程结束,业务未结束单子问题"
)
public
ResponseModel
<
Object
>
handleChangeRegistrationUnitWrongData
(
@RequestParam
(
"applyNo"
)
String
applyNo
)
{
jgChangeRegistrationUnitServiceImpl
.
handleChangeRegistrationUnitWrongData
(
applyNo
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
}
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/IdxBizJgProjectContraptionServiceImplService.java
View file @
35901d21
...
...
@@ -523,14 +523,13 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
return
getCheckResultMap
(
projectContraptionIdList
,
resultMap
,
inUseTimeMap
);
}
private
Map
<
String
,
Boolean
>
getCheckResultMap
(
List
<
Long
>
projectContraptionIdList
,
Map
<
String
,
Boolean
>
resultMap
,
List
<
Map
<
String
,
Integer
>>
inUseTimeMap
)
{
private
Map
<
String
,
Boolean
>
getCheckResultMap
(
List
<
Long
>
projectContraptionIdList
,
Map
<
String
,
Boolean
>
resultMap
,
List
<
Map
<
String
,
Integer
>>
inUseTimeMap
)
{
for
(
Long
projectContraptionId
:
projectContraptionIdList
)
{
Optional
<
Integer
>
inUseCountOpt
=
inUseTimeMap
.
stream
()
.
filter
(
map
->
projectContraptionId
.
toString
().
equals
(
map
.
get
(
"project_contraption_id"
)))
.
filter
(
map
->
String
.
valueOf
(
projectContraptionId
)
.
equals
(
String
.
valueOf
(
map
.
get
(
"project_contraption_id"
))))
.
map
(
map
->
map
.
get
(
"inUseNumber"
))
.
filter
(
Objects:
:
nonNull
)
.
findFirst
();
Integer
inUseCount
=
inUseCountOpt
.
orElse
(
0
);
resultMap
.
put
(
String
.
valueOf
(
projectContraptionId
),
inUseCount
<=
0
);
}
...
...
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/IdxBizJgRegisterInfoServiceImpl.java
View file @
35901d21
...
...
@@ -1231,10 +1231,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
esEquipmentCategoryDto
.
setSEQUENCE_NBR
(
recordList
.
toString
());
list
.
add
(
esEquipmentCategoryDto
);
}
// 删除校验,被引用时不可删除。管道不做是否引用校验,直接删除已有管道
if
(!
PipelineEnum
.
PRESSURE_PIPELINE
.
getCode
().
equals
(
map
.
get
(
"equList"
)))
{
this
.
checkForDelete
(
records
);
}
// 删除校验,被引用时不可删除。管道不做是否引用校验,直接删除已有管道(20251121注释,管道引用不能删除)
//if(!PipelineEnum.PRESSURE_PIPELINE.getCode().equals(map.get("equList"))) {
//this.checkForDelete(records);
//}
this
.
checkForDelete
(
records
);
if
(
CollUtil
.
isNotEmpty
(
records
))
{
// 删除涉及的19张表的数据
superviseInfoMapper
.
deleteDataAll
(
records
);
...
...
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 @
35901d21
...
...
@@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollUtil;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.TypeReference
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
...
...
@@ -2010,7 +2011,6 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
newList
.
add
(
newManage
);
}
else
{
registrationManage
.
setCertificateStatus
(
"已登记"
);
registrationManage
.
setEquUseAddress
(
registration
.
getEquAddress
());
if
(
EQU_CODE_CC
.
equals
(
registrationManage
.
getEquListCode
()))
{
String
targetCode
=
registrationManage
.
getUseRegistrationCode
();
dto
.
getRegistrationList
().
stream
()
...
...
@@ -2019,6 +2019,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
.
filter
(
carNumber
->
carNumber
!=
null
&&
!
"null"
.
equalsIgnoreCase
(
carNumber
.
trim
()))
.
findFirst
()
.
ifPresent
(
registrationManage:
:
setCarNumber
);
registrationManage
.
setEquUseAddress
(
registration
.
getEquAddress
());
}
registrationManage
.
setChangeReason
(
BusinessTypeEnum
.
JG_COMPANY_CHANGE_REGISTRATION
.
getName
());
if
(!
ObjectUtils
.
isEmpty
(
registration
.
getNewUseUnitCreditCode
()))
{
...
...
@@ -3419,4 +3420,223 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
resultMap
.
put
(
"equipInfo"
,
projectContraptionMap
);
return
resultMap
;
}
public
void
handleChangeRegistrationUnitWrongData
(
String
applyNo
)
{
String
[]
taskName
=
new
String
[]{
"已完成"
};
JgChangeRegistrationUnit
registration
=
this
.
baseMapper
.
selectOne
(
new
LambdaQueryWrapper
<
JgChangeRegistrationUnit
>()
.
eq
(
JgChangeRegistrationUnit:
:
getApplyNo
,
applyNo
)
.
eq
(
JgChangeRegistrationUnit:
:
getIsDelete
,
0
));
WorkflowResultDto
workflowResultDto
=
new
WorkflowResultDto
();
workflowResultDto
.
setNextTaskCode
(
"已完成"
);
workflowResultDto
.
setNextTaskId
(
registration
.
getNextTaskId
());
workflowResultDto
.
setNextExecutorUserIds
(
registration
.
getNextExecuteUserIds
());
registration
.
setStatus
(
taskName
[
0
]);
registration
.
setAuditPassDate
(
new
Date
());
JgChangeRegistrationUnitDto
dto
=
new
JgChangeRegistrationUnitDto
();
BeanUtils
.
copyProperties
(
registration
,
dto
);
JgRegistrationHistory
history
=
registrationHistoryService
.
lambdaQuery
()
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
registration
.
getApplyNo
())
.
eq
(
JgRegistrationHistory:
:
getIsDelete
,
false
).
one
();
//如果是工业管道 如果工程装置对应一个证就直接变更给新单位;如果工程装置对应证下还有其他装置就变更后直接给新单位再重新生成一个登记证号;如果两个工程装置对应同一个使用登记证变更后生成两个新的登记证
if
(
PipelineEnum
.
PRESSURE_PIPELINE
.
getCode
().
equals
(
registration
.
getEquListCode
()))
{
dto
.
setProjectContraptionList
(
JSON
.
parseObject
(
history
.
getChangeData
(),
new
TypeReference
<
List
<
Map
<
String
,
Object
>>>(){}));
this
.
dealProjectContraption
(
dto
,
registration
.
getNextTaskId
(),
registration
,
"0"
);
}
//气瓶单位变更,如果新单位没有证,则生成新的使用登记证,如果新单位有证且是系统生成的证,则选择增补到已有的证下面同时,更新设备其他信息
else
if
(
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
registration
.
getEquCategoryCode
()))
{
dto
.
setDeviceList
(
JSON
.
parseObject
(
history
.
getChangeData
(),
new
TypeReference
<
List
<
Map
<
String
,
Object
>>>(){}));
this
.
dealCylinderAuditPassData
(
dto
,
registration
.
getNextTaskId
(),
registration
,
"0"
);
}
else
{
dto
.
setRegistrationList
(
JSON
.
parseObject
(
history
.
getChangeData
(),
new
TypeReference
<
List
<
Map
<
String
,
Object
>>>(){}));
// 生成新的使用登记编号,使用登记证修改设备的使用登记信息表,使用单位名称,使用单位统一信用代码,使用登记证编号,更新ES
LambdaQueryWrapper
<
JgChangeRegistrationUnitEq
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
JgChangeRegistrationUnitEq:
:
getUnitChangeRegistrationId
,
registration
.
getSequenceNbr
());
List
<
JgChangeRegistrationUnitEq
>
jgChangeRegistrationUnitEqs
=
JgChangeRegistrationUnitEqMapper
.
selectList
(
queryWrapper
);
//修改ES中使用单位信息和使用单位代码
Map
<
String
,
Map
<
String
,
Object
>>
resultMap
=
new
HashMap
<>();
//更新产权信息
dto
.
getRegistrationList
().
forEach
(
v
->
{
String
useCode
=
String
.
valueOf
(
v
.
get
(
"useRegistrationCode"
));
String
newCarNumber
=
String
.
valueOf
(
v
.
get
(
"newCarNumber"
));
String
estateUnitSeq
=
String
.
valueOf
(
v
.
get
(
"estateUnitName"
));
TzBaseEnterpriseInfo
enterpriseInfo
=
(
estateUnitSeq
!=
null
&&
!
estateUnitSeq
.
isEmpty
())
?
tzBaseEnterpriseInfoMapper
.
selectById
(
estateUnitSeq
)
:
null
;
List
<
String
>
records
=
idxBizJgRegisterInfoService
.
getBaseMapper
()
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>()
.
eq
(
IdxBizJgRegisterInfo:
:
getUseOrgCode
,
useCode
))
.
stream
()
.
map
(
IdxBizJgRegisterInfo:
:
getRecord
)
.
collect
(
Collectors
.
toList
());
if
(!
records
.
isEmpty
()
&&
enterpriseInfo
!=
null
)
{
idxBizJgUseInfoService
.
update
(
new
IdxBizJgUseInfo
()
.
setEstateUnitCreditCode
(
enterpriseInfo
.
getUseUnitCode
())
.
setEquState
(
EquimentEnum
.
ZAIYONG
.
getCode
().
toString
())
.
setEstateUnitName
(
enterpriseInfo
.
getUseUnit
()),
new
LambdaQueryWrapper
<
IdxBizJgUseInfo
>()
.
in
(
IdxBizJgUseInfo:
:
getRecord
,
records
)
);
}
//场车更新车牌号
if
(
EQU_CODE_CC
.
equals
(
dto
.
getEquListCode
())
&&
newCarNumber
!=
null
&&
!
"null"
.
equals
(
newCarNumber
)
&&
useCode
!=
null
)
{
idxBizJgRegisterInfoService
.
update
(
new
IdxBizJgRegisterInfo
().
setCarNumber
(
newCarNumber
),
new
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>().
in
(
IdxBizJgRegisterInfo:
:
getUseOrgCode
,
useCode
)
);
}
});
Map
<
String
,
String
>
seqToEquId
=
new
HashMap
<>();
for
(
JgChangeRegistrationUnitEq
jgChangeRegistrationUnitEq
:
jgChangeRegistrationUnitEqs
)
{
String
equipId
=
jgChangeRegistrationUnitEq
.
getEquId
();
LambdaQueryWrapper
<
IdxBizJgUseInfo
>
useInfoLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
useInfoLambdaQueryWrapper
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
equipId
);
IdxBizJgUseInfo
useInfo
=
useInfoMapper
.
selectOne
(
useInfoLambdaQueryWrapper
);
if
(
ObjectUtils
.
isNotEmpty
(
useInfo
))
{
useInfo
.
setUseUnitName
(
registration
.
getNewUseUnitName
());
useInfo
.
setUseUnitCreditCode
(
registration
.
getNewUseUnitCreditCode
());
// 只有变更类型为场车时,更新地址相关字段
if
(
EQU_CODE_CC
.
equals
(
registration
.
getEquListCode
()))
{
this
.
updateUseInfoAddress
(
useInfo
,
registration
);
IdxBizJgSupervisionInfo
supervisionInfo
=
new
IdxBizJgSupervisionInfo
();
supervisionInfo
.
setOrgBranchCode
(
registration
.
getOrgBranchCode
());
supervisionInfo
.
setOrgBranchName
(
registration
.
getOrgBranchName
());
idxBizJgSupervisionInfoMapper
.
update
(
supervisionInfo
,
Wrappers
.<
IdxBizJgSupervisionInfo
>
lambdaQuery
()
.
eq
(
IdxBizJgSupervisionInfo:
:
getRecord
,
equipId
));
}
useInfoMapper
.
updateById
(
useInfo
);
}
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>
registerInfoLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
registerInfoLambdaQueryWrapper
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
equipId
);
IdxBizJgRegisterInfo
registerInfo
=
registerInfoMapper
.
selectOne
(
registerInfoLambdaQueryWrapper
);
Map
<
String
,
Object
>
esUpdateParams
=
new
HashMap
<>();
String
[]
companyCode
=
registration
.
getNewUseUnitCreditCode
().
split
(
"_"
);
esUpdateParams
.
put
(
"USE_UNIT_CREDIT_CODE"
,
companyCode
.
length
>
1
?
companyCode
[
1
]
:
registration
.
getNewUseUnitCreditCode
());
esUpdateParams
.
put
(
"USE_UNIT_NAME"
,
registration
.
getNewUseUnitName
());
esUpdateParams
.
put
(
"REC_DATE"
,
new
Date
());
// 更新时间,设备筛选时排在前面 bug-21476
esUpdateParams
.
put
(
"EQU_STATE"
,
"1"
);
if
(
EQU_CODE_CC
.
equals
(
registration
.
getEquListCode
()))
{
esUpdateParams
.
put
(
"USE_PLACE"
,
joinWithSeparator
(
"/"
,
useInfo
.
getProvinceName
(),
useInfo
.
getCityName
(),
useInfo
.
getCountyName
(),
useInfo
.
getStreetName
()));
esUpdateParams
.
put
(
"USE_PLACE_CODE"
,
joinWithSeparator
(
"#"
,
useInfo
.
getProvince
(),
useInfo
.
getCity
(),
useInfo
.
getCounty
(),
useInfo
.
getFactoryUseSiteStreet
()));
esUpdateParams
.
put
(
"ORG_BRANCH_CODE"
,
registration
.
getOrgBranchCode
());
esUpdateParams
.
put
(
"ORG_BRANCH_NAME"
,
registration
.
getOrgBranchName
());
}
// 如果是变更类型=1,还需要更新证号到 ES
if
(
"1"
.
equals
(
registration
.
getChangeType
())
&&
EQU_CODE_CC
.
equals
(
registration
.
getEquListCode
()))
{
// 新证号生成逻辑
String
newCode
=
commonServiceImpl
.
generateRegistrationCode
(
equipId
,
registration
.
getReceiveCompanyCode
(),
false
);
esUpdateParams
.
put
(
"USE_ORG_CODE"
,
newCode
);
seqToEquId
.
put
(
registerInfo
.
getUseOrgCode
(),
newCode
);
registerInfo
.
setUseOrgCode
(
newCode
);
registerInfoMapper
.
updateById
(
registerInfo
);
}
if
(
ObjectUtils
.
isNotEmpty
(
registerInfo
)
&&
ObjectUtils
.
isNotEmpty
(
registerInfo
.
getCarNumber
()))
{
esUpdateParams
.
put
(
"CAR_NUMBER"
,
registerInfo
.
getCarNumber
());
}
resultMap
.
put
(
equipId
,
esUpdateParams
);
//修改各类告知列表,置为废弃
this
.
updataInvalidStatusByHistory
(
equipId
,
registration
.
getApplyNo
());
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
resultMap
);
}
registration
.
setNextTaskId
(
registration
.
getNextTaskId
());
TaskV2Model
taskV2Model
=
updateTaskModel
(
registration
,
"0"
);
JSONArray
historyJson
=
JSON
.
parseArray
(
history
.
getChangeData
());
// 更新历史表中一二级审批车牌号
history
.
setChangeData
(
JSONObject
.
toJSONString
(
dto
.
getRegistrationList
()));
registrationHistoryService
.
updateById
(
history
);
List
<
String
>
ids
=
historyJson
.
stream
().
map
(
v
->
JSON
.
parseObject
(
v
.
toString
()).
getString
(
SEQUENCE_NBR
)).
collect
(
Collectors
.
toList
());
List
<
JgUseRegistrationManage
>
list
=
useRegistrationManageService
.
lambdaQuery
().
in
(
BaseEntity:
:
getSequenceNbr
,
ids
).
list
();
// 用来存放新生成的登记证
List
<
JgUseRegistrationManage
>
newList
=
new
ArrayList
<>();
for
(
JgUseRegistrationManage
registrationManage
:
list
)
{
// 修改使用登记证管理使用单位信息
registrationManage
.
setUseUnitName
(
registration
.
getNewUseUnitName
());
registrationManage
.
setUseUnitCreditCode
(
registration
.
getNewUseUnitCreditCode
());
registrationManage
.
setReceiveOrgName
(
registration
.
getReceiveOrgName
());
registrationManage
.
setReceiveCompanyCode
(
registration
.
getReceiveOrgCode
());
registrationManage
.
setAuditPassDate
(
registration
.
getAuditPassDate
());
registrationManage
.
setVersion
(
registrationManage
.
getVersion
()
+
1
);
if
(
"1"
.
equals
(
registration
.
getChangeType
())
&&
EQU_CODE_CC
.
equals
(
dto
.
getEquListCode
()))
{
// -------------------- 旧证处理 --------------------
registrationManage
.
setCertificateStatus
(
"已注销"
);
registrationManage
.
setChangeReason
(
BusinessTypeEnum
.
JG_COMPANY_CHANGE_REGISTRATION
.
getName
());
// -------------------- 新证处理 --------------------
JgUseRegistrationManage
newManage
=
new
JgUseRegistrationManage
();
BeanUtils
.
copyProperties
(
registrationManage
,
newManage
);
String
newCode
=
seqToEquId
.
get
(
registrationManage
.
getUseRegistrationCode
());
newManage
.
setUseRegistrationCode
(
newCode
);
registration
.
setUseRegistCode
(
newCode
);
// 新证属性重置
newManage
.
setCertificateStatus
(
"已登记"
);
newManage
.
setVersion
(
1
);
newManage
.
setRegistrationType
(
"0"
);
newManage
.
setEquUseAddress
(
registration
.
getEquAddress
());
// 如果 equListCode = 5000,则设置车牌号
if
(
EQU_CODE_CC
.
equals
(
registrationManage
.
getEquListCode
()))
{
String
targetCode
=
registrationManage
.
getUseRegistrationCode
();
dto
.
getRegistrationList
().
stream
()
.
filter
(
item
->
targetCode
.
equals
(
item
.
get
(
"useRegistrationCode"
)))
.
map
(
item
->
String
.
valueOf
(
item
.
get
(
"newCarNumber"
)))
.
filter
(
carNumber
->
carNumber
!=
null
&&
!
"null"
.
equalsIgnoreCase
(
carNumber
.
trim
()))
.
findFirst
()
.
ifPresent
(
newManage:
:
setCarNumber
);
}
newManage
.
setChangeReason
(
BusinessTypeEnum
.
JG_COMPANY_CHANGE_REGISTRATION
.
getName
());
// 回填新单位地址
if
(!
ObjectUtils
.
isEmpty
(
registration
.
getNewUseUnitCreditCode
()))
{
TzBaseEnterpriseInfo
useCodeResult
=
tzBaseEnterpriseInfoMapper
.
selectOne
(
new
QueryWrapper
<
TzBaseEnterpriseInfo
>()
.
eq
(
"use_unit_code"
,
registration
.
getNewUseUnitCreditCode
())
);
if
(
useCodeResult
!=
null
)
{
newManage
.
setUseUnitAddress
(
useCodeResult
.
getAddress
());
}
}
newManage
.
setSequenceNbr
(
null
);
newList
.
add
(
newManage
);
}
else
{
registrationManage
.
setCertificateStatus
(
"已登记"
);
registrationManage
.
setEquUseAddress
(
registration
.
getEquAddress
());
if
(
EQU_CODE_CC
.
equals
(
registrationManage
.
getEquListCode
()))
{
String
targetCode
=
registrationManage
.
getUseRegistrationCode
();
dto
.
getRegistrationList
().
stream
()
.
filter
(
item
->
targetCode
.
equals
(
item
.
get
(
"useRegistrationCode"
)))
.
map
(
item
->
String
.
valueOf
(
item
.
get
(
"newCarNumber"
)))
.
filter
(
carNumber
->
carNumber
!=
null
&&
!
"null"
.
equalsIgnoreCase
(
carNumber
.
trim
()))
.
findFirst
()
.
ifPresent
(
registrationManage:
:
setCarNumber
);
}
registrationManage
.
setChangeReason
(
BusinessTypeEnum
.
JG_COMPANY_CHANGE_REGISTRATION
.
getName
());
if
(!
ObjectUtils
.
isEmpty
(
registration
.
getNewUseUnitCreditCode
()))
{
TzBaseEnterpriseInfo
useCodeResult
=
tzBaseEnterpriseInfoMapper
.
selectOne
(
new
QueryWrapper
<
TzBaseEnterpriseInfo
>()
.
eq
(
"use_unit_code"
,
registration
.
getNewUseUnitCreditCode
())
);
if
(
useCodeResult
!=
null
)
{
registrationManage
.
setUseUnitAddress
(
useCodeResult
.
getAddress
());
}
}
}
}
if
(
CollUtil
.
isNotEmpty
(
newList
))
{
list
.
addAll
(
newList
);
}
useRegistrationManageService
.
saveOrUpdateBatch
(
list
);
this
.
createResume
(
registration
,
jgChangeRegistrationUnitEqs
,
taskV2Model
.
getRoutePath
());
}
//新增使用登记证和设备变更记录
this
.
saveRecord
(
registration
);
// 发送数据变更消息
this
.
sendDataRefreshMsg
(
registration
);
JgChangeRegistrationUnitMapper
.
updateById
(
registration
);
// redis流程实时数据更新
commonServiceImpl
.
saveExecuteFlowData2Redis
(
dto
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
registration
));
this
.
delRepeatUseEquipData
(
registration
.
getApplyNo
(),
registration
.
getStatus
(),
registration
.
getNewUseUnitCreditCode
());
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/resources/mapper/IdxBizJgProjectContraptionMapper.xml
View file @
35901d21
...
...
@@ -105,7 +105,7 @@
LEFT JOIN tzs_jg_use_registration ur
ON ur.project_contraption_id = pl.project_contraption_id
AND ur.is_delete = 0
AND ur.project_contraption_id
!= null
AND ur.project_contraption_id
IS NOT NULL
AND ur.status NOT IN ('使用单位待提交','一级受理已驳回','使用单位已撤回','已作废')
LEFT JOIN tzs_jg_installation_notice ins
ON ins.project_contraption_id = pl.project_contraption_id
...
...
@@ -382,7 +382,7 @@
WITH target_use AS MATERIALIZED (
SELECT "RECORD", project_contraption_id
FROM idx_biz_jg_use_info
WHERE project_contraption_id
!=
null and
WHERE project_contraption_id
is not
null and
project_contraption_id IN
<foreach
collection=
"projectContraptionIdList"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id}
...
...
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