Commit 15d4fb3f authored by 韩桐桐's avatar 韩桐桐

feat(jg):使用登记证管理表添加车牌号

parent 50d161f6
......@@ -82,7 +82,7 @@ public class JgUseRegistrationManageDto extends BaseDto {
@ApiModelProperty(value = "数据类型:监管/行政审批局,企业")
private String dataType;
@ApiModelProperty(value = "车牌号")
@ApiModelProperty(value = "车牌号-车用气瓶登记")
private String carNumber;
@ApiModelProperty(value = "设备使用地址")
......
......@@ -162,4 +162,11 @@ public class JgUseRegistrationManage extends BaseEntity {
@TableField("manage_type")
private String manageType;
/**
* 车牌号-车用气瓶登记
*/
@TableField("car_number")
private String carNumber;
}
......@@ -30,7 +30,8 @@
tjurm.equ_category_code AS equCategoryCode,
tjurm.equ_use_address AS equUseAddress,
tjurm.use_unit_address AS useUnitAddress,
tjurm.manage_type AS manageType
tjurm.manage_type AS manageType,
tjurm.car_number AS carNumber
</sql>
......
......@@ -183,6 +183,7 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr
jgUseRegistrationManage.setCreateDate(vehicleInformation.getRecDate());
jgUseRegistrationManage.setEquUseAddress("");
jgUseRegistrationManage.setManageType("unit");
jgUseRegistrationManage.setCarNumber(vehicleInformation.getCarNumber());
jgUseRegistrationManage.setUseUnitAddress(!ValidationUtil.isEmpty(enterpriseInfo) ? (String) enterpriseInfo.get("address") : "");
jgUseRegistrationManage.setUseRegistrationCode(vehicleInformation.getUseRegistrationCode());
jgUseRegistrationManage.setUseUnitCreditCode(vehicleInformation.getUseUnitCreditCode());
......@@ -201,29 +202,7 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr
JgUseRegistrationManageDto dto,
String sort) {
SortVo sortMap = commonServiceImpl.sortFieldConversion(sort);
Page<JgUseRegistrationManageDto> manageDtoPage = jgUseRegistrationManageMapper.queryForPage(page, dto, sortMap);
// 为车用气瓶登记添加车牌号
List<String> useRegistrationCodes = manageDtoPage.getRecords().stream()
.filter(x -> BusinessTypeEnum.JG_VEHICLE_GAS_APPLICATION.getName().equals(x.getRegType()))
.map(JgUseRegistrationManageDto::getUseRegistrationCode)
.collect(Collectors.toList());
if (!useRegistrationCodes.isEmpty()) {
Map<String, JgVehicleInformation> vehicleInfoMap = jgVehicleInformationMapper.selectList(
new LambdaQueryWrapper<JgVehicleInformation>().in(JgVehicleInformation::getUseRegistrationCode, useRegistrationCodes)
).stream().collect(Collectors.toMap(JgVehicleInformation::getUseRegistrationCode, Function.identity()));
manageDtoPage.getRecords().forEach(x -> {
if (BusinessTypeEnum.JG_VEHICLE_GAS_APPLICATION.getName().equals(x.getRegType())) {
JgVehicleInformation vehicleInformation = vehicleInfoMap.get(x.getUseRegistrationCode());
if (vehicleInformation != null) {
x.setCarNumber(vehicleInformation.getCarNumber());
}
}
});
}
return manageDtoPage;
return jgUseRegistrationManageMapper.queryForPage(page, dto, sortMap);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment