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
bd7c0b15
Commit
bd7c0b15
authored
Jul 22, 2024
by
王果
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
21052 车用气瓶登记校验设备是否在流程中
parent
281a0187
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
141 additions
and
31 deletions
+141
-31
JgVehicleInformationMapper.java
...boot/module/jg/api/mapper/JgVehicleInformationMapper.java
+3
-0
JgVehicleInformationMapper.xml
.../src/main/resources/mapper/JgVehicleInformationMapper.xml
+9
-1
JgVehicleInformationEquipUsedCheckImpl.java
.../service/impl/JgVehicleInformationEquipUsedCheckImpl.java
+55
-0
JgVehicleInformationServiceImpl.java
.../jg/biz/service/impl/JgVehicleInformationServiceImpl.java
+74
-30
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgVehicleInformationMapper.java
View file @
bd7c0b15
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.api.mapper;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.api.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgVehicleInformationDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgVehicleInformationDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgVehicleInformation
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgVehicleInformation
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
...
@@ -39,4 +40,6 @@ public interface JgVehicleInformationMapper extends BaseMapper<JgVehicleInformat
...
@@ -39,4 +40,6 @@ public interface JgVehicleInformationMapper extends BaseMapper<JgVehicleInformat
@Select
(
"select name from tz_equipment_category where code=#{code}"
)
@Select
(
"select name from tz_equipment_category where code=#{code}"
)
String
getEquCategoryNameByCode
(
String
code
);
String
getEquCategoryNameByCode
(
String
code
);
List
<
CompanyEquipCountDto
>
queryForFlowingEquipList
();
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgVehicleInformationMapper.xml
View file @
bd7c0b15
...
@@ -261,5 +261,13 @@
...
@@ -261,5 +261,13 @@
</foreach>
</foreach>
ORDER BY ui.REC_DATE DESC
ORDER BY ui.REC_DATE DESC
</select>
</select>
<select
id=
"queryForFlowingEquipList"
resultType=
"com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto"
>
select a.use_unit_credit_code as companyCode,
group_concat(b.equ_id) as records
from tzs_jg_vehicle_information a,
tzs_jg_vehicle_information_eq b
where a.sequence_nbr = b.vehicle_id
and a.status in ('三级待受理', '二级待受理', '一级待受理')
GROUP BY a.use_unit_credit_code
</select>
</mapper>
</mapper>
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/JgVehicleInformationEquipUsedCheckImpl.java
0 → 100644
View file @
bd7c0b15
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintainNoticeMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgVehicleInformationMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.redisson.api.RBucket
;
import
org.redisson.api.RedissonClient
;
import
org.springframework.stereotype.Component
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
/**
* @author Administrator
*/
@Component
@Slf4j
public
class
JgVehicleInformationEquipUsedCheckImpl
extends
BaseEquipUsedCheckService
{
private
RedissonClient
redissonClient
;
private
String
bizType
=
"vehicleInformation"
;
private
JgVehicleInformationMapper
mapper
;
public
JgVehicleInformationEquipUsedCheckImpl
(
RedissonClient
redissonClient
,
JgVehicleInformationMapper
mapper
)
{
this
.
redissonClient
=
redissonClient
;
this
.
mapper
=
mapper
;
}
@Override
public
RedissonClient
getRedisClient
()
{
return
redissonClient
;
}
@Override
public
String
getApplyBizType
()
{
return
bizType
;
}
@Override
public
void
init
()
{
// 初始化已经完成或者在流程中安装告知的设备数据
List
<
CompanyEquipCountDto
>
companyEquipCountDtos
=
mapper
.
queryForFlowingEquipList
();
companyEquipCountDtos
.
forEach
(
c
->
{
RBucket
<
Set
<
String
>>
rBucket
=
redissonClient
.
getBucket
(
getFlowingEquipRedisKey
(
c
.
getCompanyCode
(),
bizType
));
rBucket
.
set
(
Arrays
.
stream
(
c
.
getRecords
().
split
(
","
)).
collect
(
Collectors
.
toSet
()));
});
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgVehicleInformationServiceImpl.java
View file @
bd7c0b15
...
@@ -27,6 +27,8 @@ import com.yeejoin.amos.boot.module.jg.api.service.IJgVehicleInformationService;
...
@@ -27,6 +27,8 @@ import com.yeejoin.amos.boot.module.jg.api.service.IJgVehicleInformationService;
import
com.yeejoin.amos.boot.module.jg.api.vo.JgVehicleInformationVo
;
import
com.yeejoin.amos.boot.module.jg.api.vo.JgVehicleInformationVo
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
import
com.yeejoin.amos.boot.module.jg.biz.config.LocalBadRequest
;
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.FlowingEquipRedisContext
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.FileExporter
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.FileExporter
;
...
@@ -96,6 +98,8 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -96,6 +98,8 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
"equipCode"
,
"equipCategory"
,
"useInnerCode"
,
"factoryNum"
,
"giveOutYear"
,
"equipCode"
,
"equipCategory"
,
"useInnerCode"
,
"factoryNum"
,
"giveOutYear"
,
"giveOutMonth"
,
"giveOutDay"
"giveOutMonth"
,
"giveOutDay"
};
};
private
final
List
<
String
>
NOT_FLOWING_STATE
=
Arrays
.
asList
(
"使用单位待提交"
,
"一级受理已驳回"
,
"使用单位已撤回"
,
"已作废"
,
"已完成"
);
@Autowired
@Autowired
private
RedissonClient
redissonClient
;
private
RedissonClient
redissonClient
;
@Autowired
@Autowired
...
@@ -123,8 +127,6 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -123,8 +127,6 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
@Autowired
@Autowired
private
IdxBizJgSupervisionInfoMapper
idxBizJgSupervisionInfoMapper
;
private
IdxBizJgSupervisionInfoMapper
idxBizJgSupervisionInfoMapper
;
@Autowired
@Autowired
private
InspectionDetectionInfoMapper
inspectionDetectionInfoMapper
;
@Autowired
private
DataDictionaryServiceImpl
iDataDictionaryService
;
private
DataDictionaryServiceImpl
iDataDictionaryService
;
@Autowired
@Autowired
private
TzsServiceFeignClient
tzsServiceFeignClient
;
private
TzsServiceFeignClient
tzsServiceFeignClient
;
...
@@ -181,6 +183,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -181,6 +183,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@GlobalTransactional
(
rollbackFor
=
Exception
.
class
)
@GlobalTransactional
(
rollbackFor
=
Exception
.
class
)
public
List
<
JgVehicleInformation
>
save
(
String
submit
,
JSONObject
map
)
{
public
List
<
JgVehicleInformation
>
save
(
String
submit
,
JSONObject
map
)
{
try
{
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
);
JgVehicleInformationDto
vehicleInfoDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
map
),
JgVehicleInformationDto
.
class
);
JgVehicleInformationDto
vehicleInfoDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
map
),
JgVehicleInformationDto
.
class
);
...
@@ -189,7 +192,9 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -189,7 +192,9 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
equipmentLists
.
stream
().
map
(
v
->
(
String
)
v
.
get
(
"chargingMedium"
)).
distinct
().
count
()
!=
1
)
{
equipmentLists
.
stream
().
map
(
v
->
(
String
)
v
.
get
(
"chargingMedium"
)).
distinct
().
count
()
!=
1
)
{
throw
new
BadRequest
(
CollectionUtils
.
isEmpty
(
equipmentLists
)
?
"请选择设备信息!"
:
"请选择相同充装介质设备!"
);
throw
new
BadRequest
(
CollectionUtils
.
isEmpty
(
equipmentLists
)
?
"请选择设备信息!"
:
"请选择相同充装介质设备!"
);
}
}
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submit
))
{
this
.
repeatUsedEquipCheck
(
equipmentLists
,
reginParams
.
getCompany
().
getCompanyCode
());
}
List
<
IdxBizJgInspectionDetectionInfo
>
inspectionDetectionInfoList
=
idxBizJgInspectionDetectionInfoService
.
checkInspectionInfo
(
List
<
IdxBizJgInspectionDetectionInfo
>
inspectionDetectionInfoList
=
idxBizJgInspectionDetectionInfoService
.
checkInspectionInfo
(
equipmentLists
.
stream
()
equipmentLists
.
stream
()
.
map
(
v
->
(
String
)
v
.
get
(
"record"
))
.
map
(
v
->
(
String
)
v
.
get
(
"record"
))
...
@@ -394,6 +399,42 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -394,6 +399,42 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
// 设备数据存历史数据,在流程完成时使用
// 设备数据存历史数据,在流程完成时使用
commonService
.
saveOrUpdateHistory
(
BusinessTypeEnum
.
JG_VEHICLE_GAS_APPLICATION
.
getName
(),
JSON
.
parseArray
(
JSON
.
toJSONString
(
equipmentLists
)),
null
,
vehicleInformation
.
getSequenceNbr
()
+
""
);
commonService
.
saveOrUpdateHistory
(
BusinessTypeEnum
.
JG_VEHICLE_GAS_APPLICATION
.
getName
(),
JSON
.
parseArray
(
JSON
.
toJSONString
(
equipmentLists
)),
null
,
vehicleInformation
.
getSequenceNbr
()
+
""
);
return
Collections
.
singletonList
(
vehicleInformation
);
return
Collections
.
singletonList
(
vehicleInformation
);
}
catch
(
BadRequest
|
LocalBadRequest
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
this
.
rollBackForDelRedisData
();
throw
e
;
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
this
.
rollBackForDelRedisData
();
throw
new
BadRequest
(
"保存失败!"
);
}
finally
{
FlowingEquipRedisContext
.
clean
();
}
}
private
void
repeatUsedEquipCheck
(
List
<
Map
<
String
,
Object
>>
equipList
,
String
companyCode
)
{
equipList
.
forEach
(
equipMap
->
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
DEFINITION_KEY
)
.
equipRepeatUsedCheck
(
String
.
valueOf
(
equipMap
.
get
(
"record"
)),
companyCode
));
}
/**
* 删除 redis校验重复引用设备的数据
*/
private
void
delRepeatUseEquipData
(
JgVehicleInformation
notice
)
{
if
(
NOT_FLOWING_STATE
.
contains
(
notice
.
getStatus
()))
{
LambdaQueryWrapper
<
JgVehicleInformationEq
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
JgVehicleInformationEq:
:
getVehicleId
,
notice
.
getSequenceNbr
());
List
<
JgVehicleInformationEq
>
noticeEqList
=
jgVehicleInformationEqService
.
list
(
queryWrapper
);
noticeEqList
.
forEach
(
noticeEq
->
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
DEFINITION_KEY
)
.
delDataForCheckEquipRepeatUsed
(
Collections
.
singletonList
(
noticeEq
.
getEquId
()),
notice
.
getUseUnitCreditCode
()));
}
}
private
void
rollBackForDelRedisData
()
{
FlowingEquipRedisContext
.
getContext
().
forEach
(
e
->
{
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
DEFINITION_KEY
)
.
delDataForCheckWithKey
(
e
.
getData
(),
e
.
getRedisKey
());
});
}
}
/**
/**
...
@@ -451,6 +492,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -451,6 +492,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
// redis流程实时数据更新
// redis流程实时数据更新
commonService
.
saveExecuteFlowData2Redis
(
instanceId
,
this
.
buildInstanceRuntimeData
(
vehicleInfo
));
commonService
.
saveExecuteFlowData2Redis
(
instanceId
,
this
.
buildInstanceRuntimeData
(
vehicleInfo
));
this
.
delRepeatUseEquipData
(
vehicleInfo
);
}
catch
(
InterruptedException
e
)
{
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
finally
{
}
finally
{
...
@@ -535,7 +577,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -535,7 +577,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
if
(
useCodeResult
!=
null
)
{
if
(
useCodeResult
!=
null
)
{
String
result
=
dto
.
getEstateUnitCreditCode
()
+
"_"
+
dto
.
getEstateUnitName
()
+
(
"个人主体"
.
equals
(
useCodeResult
.
getUnitType
())
String
result
=
dto
.
getEstateUnitCreditCode
()
+
"_"
+
dto
.
getEstateUnitName
()
+
(
"个人主体"
.
equals
(
useCodeResult
.
getUnitType
())
?
"_"
+
dto
.
getEstateUnitCreditCode
().
substring
(
dto
.
getEstateUnitCreditCode
().
length
()
-
4
)
:
""
);
?
"_"
+
dto
.
getEstateUnitCreditCode
().
substring
(
dto
.
getEstateUnitCreditCode
().
length
()
-
4
)
:
""
);
vo
.
setEstateUnitName
(
result
);
vo
.
setEstateUnitName
(
result
);
}
}
vo
.
setIdCardFront
(
ObjectUtils
.
isEmpty
(
dto
.
getIdCardFront
())
?
null
:
JSON
.
parseArray
(
dto
.
getIdCardFront
()));
vo
.
setIdCardFront
(
ObjectUtils
.
isEmpty
(
dto
.
getIdCardFront
())
?
null
:
JSON
.
parseArray
(
dto
.
getIdCardFront
()));
...
@@ -642,6 +684,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -642,6 +684,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
WorkflowResultDto
workflowResultDto
=
resultDto
.
get
(
0
);
WorkflowResultDto
workflowResultDto
=
resultDto
.
get
(
0
);
this
.
updateData
(
jgVehicleInformation
.
getSequenceNbr
(),
operate
,
workflowResultDto
,
Boolean
.
FALSE
,
equDefineCode
);
this
.
updateData
(
jgVehicleInformation
.
getSequenceNbr
(),
operate
,
workflowResultDto
,
Boolean
.
FALSE
,
equDefineCode
);
}
}
this
.
delRepeatUseEquipData
(
jgVehicleInformation
);
}
catch
(
InterruptedException
e
)
{
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
finally
{
}
finally
{
...
@@ -749,7 +792,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -749,7 +792,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
JSONArray
jsonArray
=
JSONArray
.
parseArray
(
jsonData
);
JSONArray
jsonArray
=
JSONArray
.
parseArray
(
jsonData
);
// 登记证记录主键
// 登记证记录主键
Long
changeRecordId
=
sequence
.
nextId
();
Long
changeRecordId
=
sequence
.
nextId
();
for
(
int
i
=
0
;
i
<
jsonArray
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
jsonArray
.
size
();
i
++)
{
JSONObject
mapData
=
jsonArray
.
getJSONObject
(
i
);
JSONObject
mapData
=
jsonArray
.
getJSONObject
(
i
);
...
@@ -816,10 +859,10 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -816,10 +859,10 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
IdxBizJgRegisterInfo
registerInfo
=
idxBizJgRegisterInfoMapper
.
selectOne
(
lambdaReg
);
IdxBizJgRegisterInfo
registerInfo
=
idxBizJgRegisterInfoMapper
.
selectOne
(
lambdaReg
);
// 生成证书管理表记录
// 生成证书管理表记录
generateRegistrationManage
(
jgVehicleInformation
,
registerInfo
);
generateRegistrationManage
(
jgVehicleInformation
,
registerInfo
);
// 生成一条tzs_jg_certificate_change_record记录
// 生成一条tzs_jg_certificate_change_record记录
generateCertificateChangeRecord
(
jgVehicleInformation
,
registerInfo
,
changeRecordId
,
taskV2Model
);
generateCertificateChangeRecord
(
jgVehicleInformation
,
registerInfo
,
changeRecordId
,
taskV2Model
);
}
}
this
.
getBaseMapper
().
updateById
(
jgVehicleInformation
);
this
.
getBaseMapper
().
updateById
(
jgVehicleInformation
);
commonService
.
saveExecuteFlowData2Redis
(
jgVehicleInformation
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgVehicleInformation
));
commonService
.
saveExecuteFlowData2Redis
(
jgVehicleInformation
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgVehicleInformation
));
...
@@ -880,14 +923,13 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -880,14 +923,13 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
/**
/**
* 批量删除
* 批量删除
*
*/
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
deleteBatch
(
List
<
Long
>
ids
)
{
public
void
deleteBatch
(
List
<
Long
>
ids
)
{
ids
.
forEach
(
id
->
{
ids
.
forEach
(
id
->
{
JgVehicleInformation
vehicleInformation
=
this
.
baseMapper
.
selectById
(
id
);
JgVehicleInformation
vehicleInformation
=
this
.
baseMapper
.
selectById
(
id
);
// 删除代办 + 中止流程
// 删除代办 + 中止流程
commonService
.
deleteTaskModel
(
String
.
valueOf
(
id
),
vehicleInformation
.
getInstanceId
());
commonService
.
deleteTaskModel
(
String
.
valueOf
(
id
),
vehicleInformation
.
getInstanceId
());
// 删除单子
// 删除单子
this
.
deleteBySeq
(
id
);
this
.
deleteBySeq
(
id
);
// 删除单子对应设备
// 删除单子对应设备
...
@@ -901,7 +943,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -901,7 +943,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
public
Page
<
Map
<
String
,
Object
>>
getPageList
(
JgVehicleInformationDto
dto
,
String
sort
,
Page
<
Map
<
String
,
Object
>>
page
,
List
<
String
>
roleIds
)
{
public
Page
<
Map
<
String
,
Object
>>
getPageList
(
JgVehicleInformationDto
dto
,
String
sort
,
Page
<
Map
<
String
,
Object
>>
page
,
List
<
String
>
roleIds
)
{
SortVo
sortMap
=
commonService
.
sortFieldConversion
(
sort
);
SortVo
sortMap
=
commonService
.
sortFieldConversion
(
sort
);
return
this
.
baseMapper
.
getListPage
(
page
,
sortMap
,
dto
,
roleIds
);
return
this
.
baseMapper
.
getListPage
(
page
,
sortMap
,
dto
,
roleIds
);
}
}
private
void
updateEquipMessage
(
JgVehicleInformation
jgVehicleInformation
,
JSONObject
map
,
IdxBizJgRegisterInfo
registerInfo
,
IdxBizJgOtherInfo
otherInfo
)
{
private
void
updateEquipMessage
(
JgVehicleInformation
jgVehicleInformation
,
JSONObject
map
,
IdxBizJgRegisterInfo
registerInfo
,
IdxBizJgOtherInfo
otherInfo
)
{
...
@@ -1342,6 +1384,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -1342,6 +1384,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
/**
/**
* 作废的证变更内容
* 作废的证变更内容
*
* @param obj JgVehicleInformation
* @param obj JgVehicleInformation
* @return result
* @return result
*/
*/
...
@@ -1458,14 +1501,14 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -1458,14 +1501,14 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
}
}
private
void
generateCertificateChangeRecord
(
JgVehicleInformation
jgVehicleInformation
,
IdxBizJgRegisterInfo
registerInfo
,
Long
changeRecordId
,
TaskV2Model
taskV2Model
)
{
private
void
generateCertificateChangeRecord
(
JgVehicleInformation
jgVehicleInformation
,
IdxBizJgRegisterInfo
registerInfo
,
Long
changeRecordId
,
TaskV2Model
taskV2Model
)
{
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
(
jgVehicleInformation
.
getApplyNo
());
changeRecord
.
setApplyNo
(
jgVehicleInformation
.
getApplyNo
());
changeRecord
.
setReceiveOrgName
(
jgVehicleInformation
.
getReceiveOrgName
());
changeRecord
.
setReceiveOrgName
(
jgVehicleInformation
.
getReceiveOrgName
());
...
@@ -1475,7 +1518,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -1475,7 +1518,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
changeRecord
.
setChangeContent
(
this
.
buildRecordContent
(
jgVehicleInformation
));
//变更内容
changeRecord
.
setChangeContent
(
this
.
buildRecordContent
(
jgVehicleInformation
));
//变更内容
changeRecord
.
setUseRegistrationCode
(
jgVehicleInformation
.
getUseRegistrationCode
());
//使用登记编号
changeRecord
.
setUseRegistrationCode
(
jgVehicleInformation
.
getUseRegistrationCode
());
//使用登记编号
changeRecord
.
setReceiveCompanyCode
(
jgVehicleInformation
.
getReceiveCompanyCode
());
//接收机构公司代码
changeRecord
.
setReceiveCompanyCode
(
jgVehicleInformation
.
getReceiveCompanyCode
());
//接收机构公司代码
changeRecord
.
setCertificateNo
(
commonService
.
generateCertificateNo
(
equType
,
new
Date
(),
jgVehicleInformation
.
getReceiveCompanyCode
()));
//登记证书唯一码
changeRecord
.
setCertificateNo
(
commonService
.
generateCertificateNo
(
equType
,
new
Date
(),
jgVehicleInformation
.
getReceiveCompanyCode
()));
//登记证书唯一码
changeRecord
.
setUseUnitCreditCode
(
jgVehicleInformation
.
getUseUnitCreditCode
());
//使用单位统一信用代码
changeRecord
.
setUseUnitCreditCode
(
jgVehicleInformation
.
getUseUnitCreditCode
());
//使用单位统一信用代码
changeRecord
.
setUseUnitName
(
jgVehicleInformation
.
getUseUnitName
());
//使用单位名称
changeRecord
.
setUseUnitName
(
jgVehicleInformation
.
getUseUnitName
());
//使用单位名称
changeRecord
.
setEquCategory
(
registerInfo
.
getEquCategory
());
//设备类别编码
changeRecord
.
setEquCategory
(
registerInfo
.
getEquCategory
());
//设备类别编码
...
@@ -1485,17 +1528,17 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -1485,17 +1528,17 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
certificateChangeRecordService
.
save
(
changeRecord
);
certificateChangeRecordService
.
save
(
changeRecord
);
}
}
private
void
generateRegistrationManage
(
JgVehicleInformation
jgVehicleInformation
,
IdxBizJgRegisterInfo
registerInfo
)
{
private
void
generateRegistrationManage
(
JgVehicleInformation
jgVehicleInformation
,
IdxBizJgRegisterInfo
registerInfo
)
{
// 使用单位信息
// 使用单位信息
Map
<
String
,
Object
>
enterpriseInfo
=
commonService
.
getEnterpriseInfo
(
jgVehicleInformation
.
getUseUnitCreditCode
());
Map
<
String
,
Object
>
enterpriseInfo
=
commonService
.
getEnterpriseInfo
(
jgVehicleInformation
.
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
(
jgVehicleInformation
.
getUseUnitName
());
jgUseRegistrationManage
.
setUseUnitName
(
jgVehicleInformation
.
getUseUnitName
());
jgUseRegistrationManage
.
setApplyNo
(
jgVehicleInformation
.
getApplyNo
());
jgUseRegistrationManage
.
setApplyNo
(
jgVehicleInformation
.
getApplyNo
());
...
@@ -1523,14 +1566,14 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -1523,14 +1566,14 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
jgUseRegistrationManage
.
setUseUnitCreditCode
(
jgVehicleInformation
.
getUseUnitCreditCode
());
jgUseRegistrationManage
.
setUseUnitCreditCode
(
jgVehicleInformation
.
getUseUnitCreditCode
());
jgUseRegistrationManage
.
setReceiveCompanyCode
(
jgVehicleInformation
.
getReceiveCompanyCode
());
jgUseRegistrationManage
.
setReceiveCompanyCode
(
jgVehicleInformation
.
getReceiveCompanyCode
());
jgUseRegistrationManage
.
setCarNumber
(
jgVehicleInformation
.
getCarNumber
());
jgUseRegistrationManage
.
setCarNumber
(
jgVehicleInformation
.
getCarNumber
());
jgUseRegistrationManage
.
setCertificateNo
(
commonService
.
generateCertificateNo
(
equType
,
new
Date
(),
jgVehicleInformation
.
getReceiveCompanyCode
()));
jgUseRegistrationManage
.
setCertificateNo
(
commonService
.
generateCertificateNo
(
equType
,
new
Date
(),
jgVehicleInformation
.
getReceiveCompanyCode
()));
jgUseRegistrationManageService
.
save
(
jgUseRegistrationManage
);
jgUseRegistrationManageService
.
save
(
jgUseRegistrationManage
);
}
}
private
String
buildRecordContent
(
JgVehicleInformation
obj
)
{
private
String
buildRecordContent
(
JgVehicleInformation
obj
)
{
//张三办理了【单位变更】 ,单号【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
()
+
"办理了【"
+
BusinessTypeEnum
.
JG_VEHICLE_GAS_APPLICATION
.
getName
()+
"】,"
+
return
obj
.
getRecUserName
()
+
"办理了【"
+
BusinessTypeEnum
.
JG_VEHICLE_GAS_APPLICATION
.
getName
()
+
"】,"
+
"单号【"
+
obj
.
getApplyNo
()
+
"】,申请日期"
+
simpleDateFormat
.
format
(
obj
.
getRecDate
());
"单号【"
+
obj
.
getApplyNo
()
+
"】,申请日期"
+
simpleDateFormat
.
format
(
obj
.
getRecDate
());
}
}
...
@@ -1742,7 +1785,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -1742,7 +1785,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
vehicleInformation
.
setAuditPassDate
(
new
Date
());
vehicleInformation
.
setAuditPassDate
(
new
Date
());
// 登记证记录表主键
// 登记证记录表主键
Long
changeRecordId
=
sequence
.
nextId
();
Long
changeRecordId
=
sequence
.
nextId
();
//新增
//新增
if
(
StringUtils
.
isEmpty
(
vehicleInfoDto
.
getSequenceNbr
()))
{
if
(
StringUtils
.
isEmpty
(
vehicleInfoDto
.
getSequenceNbr
()))
{
ResponseModel
<
List
<
String
>>
listResponseModel
=
tzsServiceFeignClient
.
applicationFormCode
(
ApplicationFormTypeEnum
.
SYDJ
.
getCode
(),
1
);
ResponseModel
<
List
<
String
>>
listResponseModel
=
tzsServiceFeignClient
.
applicationFormCode
(
ApplicationFormTypeEnum
.
SYDJ
.
getCode
(),
1
);
...
@@ -1761,7 +1804,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -1761,7 +1804,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
lambdaReg
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
String
.
valueOf
(
equipmentLists
.
get
(
0
).
get
(
"record"
)));
lambdaReg
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
String
.
valueOf
(
equipmentLists
.
get
(
0
).
get
(
"record"
)));
IdxBizJgRegisterInfo
registerInfo
=
idxBizJgRegisterInfoMapper
.
selectOne
(
lambdaReg
);
IdxBizJgRegisterInfo
registerInfo
=
idxBizJgRegisterInfoMapper
.
selectOne
(
lambdaReg
);
// 生成证书管理表记录
// 生成证书管理表记录
generateRegistrationManage
(
vehicleInformation
,
registerInfo
);
generateRegistrationManage
(
vehicleInformation
,
registerInfo
);
// 生成一条tzs_jg_certificate_change_record记录
// 生成一条tzs_jg_certificate_change_record记录
generateCertificateChangeRecord
(
vehicleInformation
,
registerInfo
,
changeRecordId
,
null
);
generateCertificateChangeRecord
(
vehicleInformation
,
registerInfo
,
changeRecordId
,
null
);
}
else
{
}
else
{
...
@@ -1845,6 +1888,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -1845,6 +1888,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
/**
/**
* 系统类型的code 自动生成设备代码
* 系统类型的code 自动生成设备代码
*
* @param lambda lambda
* @param lambda lambda
* @param registerInfo 注册信息
* @param registerInfo 注册信息
* @param receiveCompanyCode 接收机构行政区划代码
* @param receiveCompanyCode 接收机构行政区划代码
...
@@ -1893,7 +1937,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -1893,7 +1937,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
this
.
createCode
(
jgVehicleInformation
,
registerInfo
,
otherInfo
);
this
.
createCode
(
jgVehicleInformation
,
registerInfo
,
otherInfo
);
}
}
private
void
updateEquipEsData
(
JgVehicleInformation
jgVehicleInformation
,
IdxBizJgOtherInfo
otherInfo
,
IdxBizJgRegisterInfo
registerInfo
,
String
equId
)
{
private
void
updateEquipEsData
(
JgVehicleInformation
jgVehicleInformation
,
IdxBizJgOtherInfo
otherInfo
,
IdxBizJgRegisterInfo
registerInfo
,
String
equId
)
{
// 更新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
<>();
...
...
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