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
2d2e4591
Commit
2d2e4591
authored
Aug 27, 2025
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):场车单位变更bug修改
parent
e93d56ab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
85 additions
and
30 deletions
+85
-30
JgChangeRegistrationUnitServiceImpl.java
...biz/service/impl/JgChangeRegistrationUnitServiceImpl.java
+85
-30
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/JgChangeRegistrationUnitServiceImpl.java
View file @
2d2e4591
...
@@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.annotation.ResultFieldMapping
;
import
com.yeejoin.amos.boot.biz.common.annotation.ResultFieldMapping
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
...
@@ -80,6 +81,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -80,6 +81,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
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"
;
private
static
final
String
EQU_CODE_CC
=
"5000"
;
private
final
List
<
String
>
NOT_FLOWING_STATE
=
Arrays
.
asList
(
"使用单位待提交"
,
"一级受理已驳回"
,
"使用单位已撤回"
,
"已作废"
,
"已完成"
);
private
final
List
<
String
>
NOT_FLOWING_STATE
=
Arrays
.
asList
(
"使用单位待提交"
,
"一级受理已驳回"
,
"使用单位已撤回"
,
"已作废"
,
"已完成"
);
...
@@ -105,7 +107,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -105,7 +107,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
@Autowired
@Autowired
OtherInfoMapper
tzsJgOtherInfoMapper
;
OtherInfoMapper
tzsJgOtherInfoMapper
;
@Autowired
@Autowired
UseInfoMapper
useInfoMapper
;
IdxBizJg
UseInfoMapper
useInfoMapper
;
@Autowired
@Autowired
IdxBizJgRegisterInfoMapper
registerInfoMapper
;
IdxBizJgRegisterInfoMapper
registerInfoMapper
;
@Autowired
@Autowired
...
@@ -192,6 +194,8 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -192,6 +194,8 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
@Autowired
@Autowired
private
JgResumeInfoServiceImpl
jgResumeInfoService
;
private
JgResumeInfoServiceImpl
jgResumeInfoService
;
@Autowired
private
IdxBizJgSupervisionInfoMapper
idxBizJgSupervisionInfoMapper
;
/**
/**
* 根据sequenceNbr查询:1、查询单位变更信息,2、查询使用登记证列表
* 根据sequenceNbr查询:1、查询单位变更信息,2、查询使用登记证列表
...
@@ -346,6 +350,12 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -346,6 +350,12 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
if
(
CollectionUtils
.
isEmpty
(
deviceList
))
{
if
(
CollectionUtils
.
isEmpty
(
deviceList
))
{
throw
new
BadRequest
(
"使用登记证下无设备"
);
throw
new
BadRequest
(
"使用登记证下无设备"
);
}
}
//场车区分区外还是区内
if
(
EQU_CODE_CC
.
equals
(
noticeDto
.
getEquListCode
()))
{
String
city
=
Objects
.
toString
(
noticeDto
.
getCity
(),
""
);
String
userCity
=
Optional
.
ofNullable
(
city
).
map
(
c
->
c
.
split
(
"_"
)[
0
]).
orElseThrow
(()
->
new
BadRequest
(
"请选择地市后暂存!"
));
this
.
validateDeviceCity
(
deviceList
,
userCity
,
"0"
.
equals
(
noticeDto
.
getChangeType
()));
}
ArrayList
<
String
>
roleListAll
=
new
ArrayList
<>();
ArrayList
<
String
>
roleListAll
=
new
ArrayList
<>();
ArrayList
<
String
>
roleListNext
=
new
ArrayList
<>();
ArrayList
<
String
>
roleListNext
=
new
ArrayList
<>();
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
...
@@ -821,10 +831,10 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -821,10 +831,10 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
throw
new
BadRequest
(
"使用登记证下无设备"
);
throw
new
BadRequest
(
"使用登记证下无设备"
);
}
}
//场车区分区外还是区内
//场车区分区外还是区内
if
(
"5000"
.
equals
(
model
.
getEquListCode
()))
{
if
(
EQU_CODE_CC
.
equals
(
model
.
getEquListCode
()))
{
String
city
=
Objects
.
toString
(
tableData
.
get
(
"city"
),
""
);
String
city
=
Objects
.
toString
(
tableData
.
get
(
"city"
),
""
);
String
userCity
=
Optional
.
ofNullable
(
city
).
map
(
c
->
c
.
split
(
"_"
)[
0
]).
orElseThrow
(()
->
new
BadRequest
(
"请选择地市后暂存!"
));
String
userCity
=
Optional
.
ofNullable
(
city
).
map
(
c
->
c
.
split
(
"_"
)[
0
]).
orElseThrow
(()
->
new
BadRequest
(
"请选择地市后暂存!"
));
this
.
validateDeviceCity
(
deviceList
,
userCity
,
"0"
.
equals
(
tableData
.
get
(
"changeType"
)));
this
.
validateDeviceCity
(
deviceList
,
userCity
,
"0"
.
equals
(
model
.
getChangeType
(
)));
}
}
// 获取单位变更单号
// 获取单位变更单号
...
@@ -898,7 +908,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -898,7 +908,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
model
.
setSequenceNbr
(
sequence
.
nextId
());
model
.
setSequenceNbr
(
sequence
.
nextId
());
model
.
setCreateDate
(
new
Date
());
model
.
setCreateDate
(
new
Date
());
model
.
setCreateUserName
(
reginParams
.
getUserModel
().
getRealName
());
model
.
setCreateUserName
(
reginParams
.
getUserModel
().
getRealName
());
model
.
setUseRegistCode
(
String
.
join
(
"
,
"
,
registrationNoList
));
model
.
setUseRegistCode
(
String
.
join
(
"
,
"
,
registrationNoList
));
model
.
setEquList
(
registrationList
.
get
(
0
).
get
(
"equList"
).
toString
());
model
.
setEquList
(
registrationList
.
get
(
0
).
get
(
"equList"
).
toString
());
this
.
setFullAddress
(
tableData
,
model
);
this
.
setFullAddress
(
tableData
,
model
);
JgChangeRegistrationUnit
registrationUnit
=
new
JgChangeRegistrationUnit
();
JgChangeRegistrationUnit
registrationUnit
=
new
JgChangeRegistrationUnit
();
...
@@ -1077,6 +1087,16 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -1077,6 +1087,16 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
}
}
}
}
// 分割单位
String
orgBranchCode
=
model
.
getOrgBranchCode
();
if
(!
ObjectUtils
.
isEmpty
(
orgBranchCode
))
{
String
[]
orgBranchCodeList
=
orgBranchCode
.
split
(
"_"
);
if
(
orgBranchCodeList
.
length
>
1
)
{
model
.
setOrgBranchCode
(
orgBranchCodeList
[
0
]);
model
.
setOrgBranchName
(
orgBranchCodeList
[
1
]);
}
}
String
receiveOrgCode
=
model
.
getReceiveOrgCode
();
String
receiveOrgCode
=
model
.
getReceiveOrgCode
();
if
(!
ObjectUtils
.
isEmpty
(
receiveOrgCode
))
{
if
(!
ObjectUtils
.
isEmpty
(
receiveOrgCode
))
{
String
[]
receiveOrgCodeList
=
receiveOrgCode
.
split
(
"_"
);
String
[]
receiveOrgCodeList
=
receiveOrgCode
.
split
(
"_"
);
...
@@ -1212,7 +1232,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -1212,7 +1232,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
registration
.
setProcessAdvice
(
dto
.
getProcessAdvice
());
registration
.
setProcessAdvice
(
dto
.
getProcessAdvice
());
List
<
String
>
roleListAll
=
new
ArrayList
<>();
List
<
String
>
roleListAll
=
new
ArrayList
<>();
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
if
(!
CollectionUtils
.
isEmpty
(
dto
.
getRegistrationList
())
&&
"5000"
.
equals
(
dto
.
getEquListCode
()))
{
if
(!
CollectionUtils
.
isEmpty
(
dto
.
getRegistrationList
())
&&
EQU_CODE_CC
.
equals
(
dto
.
getEquListCode
()))
{
dto
.
getRegistrationList
().
forEach
(
v
->
{
dto
.
getRegistrationList
().
forEach
(
v
->
{
String
newCarNumber
=
String
.
valueOf
(
v
.
get
(
"newCarNumber"
));
String
newCarNumber
=
String
.
valueOf
(
v
.
get
(
"newCarNumber"
));
String
useOrgCode
=
String
.
valueOf
(
v
.
get
(
"useRegistrationCode"
));
String
useOrgCode
=
String
.
valueOf
(
v
.
get
(
"useRegistrationCode"
));
...
@@ -1298,7 +1318,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -1298,7 +1318,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
);
);
}
}
//场车更新车牌号
//场车更新车牌号
if
(
"5000"
.
equals
(
dto
.
getEquListCode
())
&&
newCarNumber
!=
null
&&
!
"null"
.
equals
(
newCarNumber
)
&&
useCode
!=
null
)
{
if
(
EQU_CODE_CC
.
equals
(
dto
.
getEquListCode
())
&&
newCarNumber
!=
null
&&
!
"null"
.
equals
(
newCarNumber
)
&&
useCode
!=
null
)
{
idxBizJgRegisterInfoService
.
update
(
new
IdxBizJgRegisterInfo
().
setCarNumber
(
newCarNumber
),
idxBizJgRegisterInfoService
.
update
(
new
IdxBizJgRegisterInfo
().
setCarNumber
(
newCarNumber
),
new
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>().
in
(
IdxBizJgRegisterInfo:
:
getUseOrgCode
,
useCode
)
new
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>().
in
(
IdxBizJgRegisterInfo:
:
getUseOrgCode
,
useCode
)
);
);
...
@@ -1307,39 +1327,51 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -1307,39 +1327,51 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
Map
<
String
,
String
>
seqToEquId
=
new
HashMap
<>();
Map
<
String
,
String
>
seqToEquId
=
new
HashMap
<>();
for
(
JgChangeRegistrationUnitEq
jgChangeRegistrationUnitEq
:
jgChangeRegistrationUnitEqs
)
{
for
(
JgChangeRegistrationUnitEq
jgChangeRegistrationUnitEq
:
jgChangeRegistrationUnitEqs
)
{
String
equipId
=
jgChangeRegistrationUnitEq
.
getEquId
();
String
equipId
=
jgChangeRegistrationUnitEq
.
getEquId
();
LambdaQueryWrapper
<
UseInfo
>
queryWrapper2
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
IdxBizJgUseInfo
>
useInfoLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper2
.
eq
(
UseInfo:
:
getRecord
,
equipId
);
useInfoLambdaQueryWrapper
.
eq
(
IdxBizJg
UseInfo:
:
getRecord
,
equipId
);
UseInfo
useInfo
=
useInfoMapper
.
selectOne
(
queryWrapper2
);
IdxBizJgUseInfo
useInfo
=
useInfoMapper
.
selectOne
(
useInfoLambdaQueryWrapper
);
if
(
ObjectUtils
.
isNotEmpty
(
useInfo
))
{
if
(
ObjectUtils
.
isNotEmpty
(
useInfo
))
{
useInfo
.
setUseUnitName
(
registration
.
getNewUseUnitName
());
useInfo
.
setUseUnitName
(
registration
.
getNewUseUnitName
());
useInfo
.
setUseUnitCreditCode
(
registration
.
getNewUseUnitCreditCode
());
useInfo
.
setUseUnitCreditCode
(
registration
.
getNewUseUnitCreditCode
());
if
(
"1"
.
equals
(
registration
.
getChangeType
()))
{
// 只有变更类型为场车时,更新地址相关字段
useInfo
.
setFactoryUseSiteStreet
(
registration
.
getFullAddress
());
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
);
useInfoMapper
.
updateById
(
useInfo
);
}
}
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>
registerInfoLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>
registerInfoLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
registerInfoLambdaQueryWrapper
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
equipId
);
registerInfoLambdaQueryWrapper
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
equipId
);
IdxBizJgRegisterInfo
registerInfo
=
registerInfoMapper
.
selectOne
(
registerInfoLambdaQueryWrapper
);
IdxBizJgRegisterInfo
registerInfo
=
registerInfoMapper
.
selectOne
(
registerInfoLambdaQueryWrapper
);
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
Map
<
String
,
Object
>
esUpdateParams
=
new
HashMap
<>();
String
[]
companyCode
=
registration
.
getNewUseUnitCreditCode
().
split
(
"_"
);
String
[]
companyCode
=
registration
.
getNewUseUnitCreditCode
().
split
(
"_"
);
map1
.
put
(
"USE_UNIT_CREDIT_CODE"
,
companyCode
.
length
>
1
?
companyCode
[
1
]
:
registration
.
getNewUseUnitCreditCode
());
esUpdateParams
.
put
(
"USE_UNIT_CREDIT_CODE"
,
companyCode
.
length
>
1
?
companyCode
[
1
]
:
registration
.
getNewUseUnitCreditCode
());
map1
.
put
(
"USE_UNIT_NAME"
,
registration
.
getNewUseUnitName
());
esUpdateParams
.
put
(
"USE_UNIT_NAME"
,
registration
.
getNewUseUnitName
());
map1
.
put
(
"REC_DATE"
,
new
Date
());
// 更新时间,设备筛选时排在前面 bug-21476
esUpdateParams
.
put
(
"REC_DATE"
,
new
Date
());
// 更新时间,设备筛选时排在前面 bug-21476
map1
.
put
(
"EQU_STATE"
,
"1"
);
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
// 如果是变更类型=1,还需要更新证号到 ES
if
(
"1"
.
equals
(
registration
.
getChangeType
())
&&
"5000"
.
equals
(
dto
.
getEquListCode
()))
{
if
(
"1"
.
equals
(
registration
.
getChangeType
())
&&
EQU_CODE_CC
.
equals
(
dto
.
getEquListCode
()))
{
// 新证号生成逻辑
// 新证号生成逻辑
String
newCode
=
commonServiceImpl
.
generateRegistrationCode
(
equipId
,
registration
.
getReceiveCompanyCode
(),
false
);
String
newCode
=
commonServiceImpl
.
generateRegistrationCode
(
equipId
,
registration
.
getReceiveCompanyCode
(),
false
);
map1
.
put
(
"USE_ORG_CODE"
,
newCode
);
esUpdateParams
.
put
(
"USE_ORG_CODE"
,
newCode
);
seqToEquId
.
put
(
registerInfo
.
getUseOrgCode
(),
newCode
);
seqToEquId
.
put
(
registerInfo
.
getUseOrgCode
(),
newCode
);
registerInfo
.
setUseOrgCode
(
newCode
);
registerInfo
.
setUseOrgCode
(
newCode
);
registerInfoMapper
.
updateById
(
registerInfo
);
registerInfoMapper
.
updateById
(
registerInfo
);
}
}
if
(
ObjectUtils
.
isNotEmpty
(
registerInfo
)
&&
ObjectUtils
.
isNotEmpty
(
registerInfo
.
getCarNumber
()))
{
if
(
ObjectUtils
.
isNotEmpty
(
registerInfo
)
&&
ObjectUtils
.
isNotEmpty
(
registerInfo
.
getCarNumber
()))
{
map1
.
put
(
"CAR_NUMBER"
,
registerInfo
.
getCarNumber
());
esUpdateParams
.
put
(
"CAR_NUMBER"
,
registerInfo
.
getCarNumber
());
}
}
resultMap
.
put
(
equipId
,
map1
);
resultMap
.
put
(
equipId
,
esUpdateParams
);
//修改各类告知列表,置为废弃
//修改各类告知列表,置为废弃
this
.
updataInvalidStatusByHistory
(
equipId
,
registration
.
getApplyNo
());
this
.
updataInvalidStatusByHistory
(
equipId
,
registration
.
getApplyNo
());
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
resultMap
);
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
resultMap
);
...
@@ -1364,7 +1396,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -1364,7 +1396,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
registrationManage
.
setReceiveCompanyCode
(
registration
.
getReceiveOrgCode
());
registrationManage
.
setReceiveCompanyCode
(
registration
.
getReceiveOrgCode
());
registrationManage
.
setAuditPassDate
(
registration
.
getAuditPassDate
());
registrationManage
.
setAuditPassDate
(
registration
.
getAuditPassDate
());
registrationManage
.
setVersion
(
registrationManage
.
getVersion
()
+
1
);
registrationManage
.
setVersion
(
registrationManage
.
getVersion
()
+
1
);
if
(
"1"
.
equals
(
registration
.
getChangeType
())
&&
"5000"
.
equals
(
dto
.
getEquListCode
()))
{
if
(
"1"
.
equals
(
registration
.
getChangeType
())
&&
EQU_CODE_CC
.
equals
(
dto
.
getEquListCode
()))
{
// -------------------- 旧证处理 --------------------
// -------------------- 旧证处理 --------------------
registrationManage
.
setCertificateStatus
(
"已注销"
);
registrationManage
.
setCertificateStatus
(
"已注销"
);
registrationManage
.
setChangeReason
(
BusinessTypeEnum
.
JG_COMPANY_CHANGE_REGISTRATION
.
getName
());
registrationManage
.
setChangeReason
(
BusinessTypeEnum
.
JG_COMPANY_CHANGE_REGISTRATION
.
getName
());
...
@@ -1381,7 +1413,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -1381,7 +1413,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
newManage
.
setVersion
(
1
);
newManage
.
setVersion
(
1
);
// 如果 equListCode = 5000,则设置车牌号
// 如果 equListCode = 5000,则设置车牌号
if
(
"5000"
.
equals
(
registrationManage
.
getEquListCode
()))
{
if
(
EQU_CODE_CC
.
equals
(
registrationManage
.
getEquListCode
()))
{
String
targetCode
=
registrationManage
.
getUseRegistrationCode
();
String
targetCode
=
registrationManage
.
getUseRegistrationCode
();
dto
.
getRegistrationList
().
stream
()
dto
.
getRegistrationList
().
stream
()
.
filter
(
item
->
targetCode
.
equals
(
item
.
get
(
"useRegistrationCode"
)))
.
filter
(
item
->
targetCode
.
equals
(
item
.
get
(
"useRegistrationCode"
)))
...
@@ -1407,7 +1439,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -1407,7 +1439,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
newList
.
add
(
newManage
);
newList
.
add
(
newManage
);
}
else
{
}
else
{
registrationManage
.
setCertificateStatus
(
"已登记"
);
registrationManage
.
setCertificateStatus
(
"已登记"
);
if
(
"5000"
.
equals
(
registrationManage
.
getEquListCode
()))
{
if
(
EQU_CODE_CC
.
equals
(
registrationManage
.
getEquListCode
()))
{
String
targetCode
=
registrationManage
.
getUseRegistrationCode
();
String
targetCode
=
registrationManage
.
getUseRegistrationCode
();
dto
.
getRegistrationList
().
stream
()
dto
.
getRegistrationList
().
stream
()
.
filter
(
item
->
targetCode
.
equals
(
item
.
get
(
"useRegistrationCode"
)))
.
filter
(
item
->
targetCode
.
equals
(
item
.
get
(
"useRegistrationCode"
)))
...
@@ -1451,7 +1483,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -1451,7 +1483,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
registration
.
setNextTaskId
(
nextTaskId
);
registration
.
setNextTaskId
(
nextTaskId
);
registration
.
setStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCode
).
getPass
());
registration
.
setStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCode
).
getPass
());
executeOneStep
(
registration
,
taskName1
,
nextUserIds
,
op
);
executeOneStep
(
registration
,
taskName1
,
nextUserIds
,
op
);
if
(
"5000"
.
equals
(
dto
.
getEquListCode
()))
{
if
(
EQU_CODE_CC
.
equals
(
dto
.
getEquListCode
()))
{
history
.
setChangeData
(
JSONObject
.
toJSONString
(
dto
.
getRegistrationList
()));
history
.
setChangeData
(
JSONObject
.
toJSONString
(
dto
.
getRegistrationList
()));
registrationHistoryService
.
updateById
(
history
);
registrationHistoryService
.
updateById
(
history
);
}
}
...
@@ -1478,6 +1510,29 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -1478,6 +1510,29 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
}
}
}
}
private
void
updateUseInfoAddress
(
IdxBizJgUseInfo
useInfo
,
JgChangeRegistrationUnit
registration
)
{
useInfo
.
setProvince
(
registration
.
getProvince
());
useInfo
.
setCity
(
registration
.
getCity
());
useInfo
.
setCounty
(
registration
.
getCounty
());
useInfo
.
setFactoryUseSiteStreet
(
registration
.
getStreet
());
useInfo
.
setAddress
(
registration
.
getFullAddress
());
Map
<
String
,
Object
>
tableData
=
new
HashMap
<>();
tableData
.
put
(
"province"
,
registration
.
getProvince
());
tableData
.
put
(
"city"
,
registration
.
getCity
());
tableData
.
put
(
"region"
,
registration
.
getCounty
());
tableData
.
put
(
"street"
,
registration
.
getStreet
());
useInfo
.
setProvinceName
(
getRegionName
(
"province"
,
tableData
));
useInfo
.
setCityName
(
getRegionName
(
"city"
,
tableData
));
useInfo
.
setCountyName
(
getRegionName
(
"region"
,
tableData
));
useInfo
.
setStreetName
(
getRegionName
(
"street"
,
tableData
));
}
private
String
joinWithSeparator
(
String
separator
,
String
...
values
)
{
return
Arrays
.
stream
(
values
)
.
map
(
v
->
ObjectUtils
.
defaultIfNull
(
v
,
""
))
.
collect
(
Collectors
.
joining
(
separator
));
}
private
void
createResume
(
JgChangeRegistrationUnit
registration
,
List
<
JgChangeRegistrationUnitEq
>
jgChangeRegistrationUnitEqs
,
String
routePath
)
{
private
void
createResume
(
JgChangeRegistrationUnit
registration
,
List
<
JgChangeRegistrationUnitEq
>
jgChangeRegistrationUnitEqs
,
String
routePath
)
{
jgResumeInfoService
.
saveBatchResume
(
jgChangeRegistrationUnitEqs
.
stream
().
map
(
eq
->
JgResumeInfoDto
.
builder
().
applyNo
(
registration
.
getApplyNo
())
jgResumeInfoService
.
saveBatchResume
(
jgChangeRegistrationUnitEqs
.
stream
().
map
(
eq
->
JgResumeInfoDto
.
builder
().
applyNo
(
registration
.
getApplyNo
())
.
businessType
(
BusinessTypeEnum
.
JG_COMPANY_CHANGE_REGISTRATION
.
getName
())
.
businessType
(
BusinessTypeEnum
.
JG_COMPANY_CHANGE_REGISTRATION
.
getName
())
...
@@ -1667,9 +1722,9 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -1667,9 +1722,9 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
Map
<
String
,
Map
<
String
,
Object
>>
resultMap
=
new
HashMap
<>();
Map
<
String
,
Map
<
String
,
Object
>>
resultMap
=
new
HashMap
<>();
for
(
JgChangeRegistrationUnitEq
jgChangeRegistrationUnitEq
:
changeRegistrationUnitEqs
)
{
for
(
JgChangeRegistrationUnitEq
jgChangeRegistrationUnitEq
:
changeRegistrationUnitEqs
)
{
String
equipId
=
jgChangeRegistrationUnitEq
.
getEquId
();
String
equipId
=
jgChangeRegistrationUnitEq
.
getEquId
();
LambdaQueryWrapper
<
UseInfo
>
queryWrapper2
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
IdxBizJg
UseInfo
>
queryWrapper2
=
new
LambdaQueryWrapper
<>();
queryWrapper2
.
eq
(
UseInfo:
:
getRecord
,
equipId
);
queryWrapper2
.
eq
(
IdxBizJg
UseInfo:
:
getRecord
,
equipId
);
UseInfo
useInfo
=
useInfoMapper
.
selectOne
(
queryWrapper2
);
IdxBizJg
UseInfo
useInfo
=
useInfoMapper
.
selectOne
(
queryWrapper2
);
if
(
ObjectUtils
.
isNotEmpty
(
useInfo
))
{
if
(
ObjectUtils
.
isNotEmpty
(
useInfo
))
{
useInfo
.
setUseUnitName
(
registration
.
getNewUseUnitName
());
useInfo
.
setUseUnitName
(
registration
.
getNewUseUnitName
());
useInfo
.
setUseUnitCreditCode
(
registration
.
getNewUseUnitCreditCode
());
useInfo
.
setUseUnitCreditCode
(
registration
.
getNewUseUnitCreditCode
());
...
@@ -2263,9 +2318,9 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -2263,9 +2318,9 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
*/
*/
public
void
changeRegistrationUnitUpdateLackEquForUseInfo
(
List
<
JSONObject
>
deviceList
,
JgChangeRegistrationUnit
registration
)
{
public
void
changeRegistrationUnitUpdateLackEquForUseInfo
(
List
<
JSONObject
>
deviceList
,
JgChangeRegistrationUnit
registration
)
{
deviceList
.
forEach
(
device
->
{
deviceList
.
forEach
(
device
->
{
LambdaQueryWrapper
<
UseInfo
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
IdxBizJg
UseInfo
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
UseInfo:
:
getRecord
,
device
.
getString
(
"SEQUENCE_NBR"
));
queryWrapper
.
eq
(
IdxBizJg
UseInfo:
:
getRecord
,
device
.
getString
(
"SEQUENCE_NBR"
));
UseInfo
useInfo
=
useInfoMapper
.
selectOne
(
queryWrapper
);
IdxBizJg
UseInfo
useInfo
=
useInfoMapper
.
selectOne
(
queryWrapper
);
if
(
ObjectUtils
.
isNotEmpty
(
useInfo
))
{
if
(
ObjectUtils
.
isNotEmpty
(
useInfo
))
{
useInfo
.
setUseUnitName
(
registration
.
getNewUseUnitName
());
useInfo
.
setUseUnitName
(
registration
.
getNewUseUnitName
());
useInfo
.
setUseUnitCreditCode
(
registration
.
getNewUseUnitCreditCode
());
useInfo
.
setUseUnitCreditCode
(
registration
.
getNewUseUnitCreditCode
());
...
...
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