Commit 4ff09037 authored by 麻笑宇's avatar 麻笑宇

Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into…

Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into develop_tzs_register_to_0715
parents 70a58503 a28dbe5f
...@@ -152,7 +152,8 @@ public class MyBatisPlusCodeGeneratorJyjc { ...@@ -152,7 +152,8 @@ public class MyBatisPlusCodeGeneratorJyjc {
String service = "/template2/service.java.ftl"; String service = "/template2/service.java.ftl";
String serviceImpl = "/template2/serviceImpl.java.ftl"; String serviceImpl = "/template2/serviceImpl.java.ftl";
String mapperXml = "/template2/mapper.xml.ftl"; String mapperXml = "/template2/mapper.xml.ftl";
String model = "/template2/model.java.ftl"; //String model = "/template2/model.java.ftl";
String dto = "/template2/dto.java.ftl";
String vo = "/template2/vo.java.ftl"; String vo = "/template2/vo.java.ftl";
...@@ -179,16 +180,27 @@ public class MyBatisPlusCodeGeneratorJyjc { ...@@ -179,16 +180,27 @@ public class MyBatisPlusCodeGeneratorJyjc {
}); });
focList.add(new FileOutConfig(model) { focList.add(new FileOutConfig(dto) {
@Override @Override
public String outputFile(TableInfo tableInfo) { public String outputFile(TableInfo tableInfo) {
String filePath = interfaceCodeOutPath String filePath = interfaceCodeOutPath
+ "/model/" + tableInfo.getEntityName() + "Model" + StringPool.DOT_JAVA; + "/dto/" + tableInfo.getEntityName() + "Dto" + StringPool.DOT_JAVA;
System.out.println("model:"+filePath); System.out.println("dto:"+filePath);
return filePath; return filePath;
} }
}); });
//focList.add(new FileOutConfig(model) {
// @Override
// public String outputFile(TableInfo tableInfo) {
// String filePath = interfaceCodeOutPath
// + "/model/" + tableInfo.getEntityName() + "Model" + StringPool.DOT_JAVA;
// System.out.println("model:"+filePath);
// return filePath;
// }
//});
// focList.add(new FileOutConfig(vo) { // focList.add(new FileOutConfig(vo) {
// @Override // @Override
// public String outputFile(TableInfo tableInfo) { // public String outputFile(TableInfo tableInfo) {
......
...@@ -82,6 +82,9 @@ public class JgUseRegistrationManageDto extends BaseDto { ...@@ -82,6 +82,9 @@ public class JgUseRegistrationManageDto extends BaseDto {
@ApiModelProperty(value = "数据类型:监管/行政审批局,企业") @ApiModelProperty(value = "数据类型:监管/行政审批局,企业")
private String dataType; private String dataType;
@ApiModelProperty(value = "车牌号")
private String carNumber;
@ApiModelProperty(value = "设备使用地址") @ApiModelProperty(value = "设备使用地址")
private String equUseAddress; private String equUseAddress;
......
...@@ -131,7 +131,7 @@ public class PressureVesselListener extends AnalysisEventListener<EquipInfoCylin ...@@ -131,7 +131,7 @@ public class PressureVesselListener extends AnalysisEventListener<EquipInfoCylin
result.append("出厂编号/产品编码不能重复;"); result.append("出厂编号/产品编码不能重复;");
checkFactoryNumUniqueness(data.getFactoryNum(), null); checkFactoryNumUniqueness(data.getFactoryNum(), null);
checkNotBlank(data.getProduceDate(), "制造日期不能为空"); checkNotBlank(data.getProduceDate(), "制造日期不能为空");
checkDateFormatCorrect(data.getProduceDate(), "制造日期格式不正确"); Optional.ofNullable(data.getProduceDate()).ifPresent(v -> checkDateFormatCorrect(v, "制造日期格式不正确"));
checkNotBlank(data.getInspectOrgName(), "检测机构名称不能为空"); checkNotBlank(data.getInspectOrgName(), "检测机构名称不能为空");
checkNotBlank(data.getInspectOrgCode(), "检测机构代码不能为空"); checkNotBlank(data.getInspectOrgCode(), "检测机构代码不能为空");
checkInspectOrg(data.getInspectOrgCode()); checkInspectOrg(data.getInspectOrgCode());
...@@ -204,6 +204,7 @@ public class PressureVesselListener extends AnalysisEventListener<EquipInfoCylin ...@@ -204,6 +204,7 @@ public class PressureVesselListener extends AnalysisEventListener<EquipInfoCylin
String equListCode = (String) paramMap.get("EQU_LIST"); String equListCode = (String) paramMap.get("EQU_LIST");
String equCategoryCode = (String) paramMap.get("EQU_CATEGORY"); String equCategoryCode = (String) paramMap.get("EQU_CATEGORY");
String equDefineCode = (String) paramMap.get("EQU_DEFINE"); String equDefineCode = (String) paramMap.get("EQU_DEFINE");
String equipSource = (String) paramMap.get("EQUIP_SOURCE");
Date date = new Date(); Date date = new Date();
String record = UUID.randomUUID().toString(); String record = UUID.randomUUID().toString();
...@@ -214,8 +215,9 @@ public class PressureVesselListener extends AnalysisEventListener<EquipInfoCylin ...@@ -214,8 +215,9 @@ public class PressureVesselListener extends AnalysisEventListener<EquipInfoCylin
BeanUtils.copyProperties(data, useInfo); BeanUtils.copyProperties(data, useInfo);
useInfo.setRecord(record); useInfo.setRecord(record);
useInfo.setRecDate(date); useInfo.setRecDate(date);
useInfo.setDataSource("jg"); useInfo.setDataSource(equipSource != null ? equipSource : "jg");//区分历史设备和新增设备
useInfo.setEquState(null); useInfo.setEquState(null);
useInfo.setIsIntoManagement(equipSource != null);//历史气瓶导入为已纳管设备
// 使用单位信息 // 使用单位信息
if("个人主体".equals(company.getCompanyType())){ if("个人主体".equals(company.getCompanyType())){
useInfo.setUseUnitCreditCode(company.getCompanyCode().split("_")[1]); useInfo.setUseUnitCreditCode(company.getCompanyCode().split("_")[1]);
......
...@@ -34,6 +34,7 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest; ...@@ -34,6 +34,7 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -200,7 +201,30 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr ...@@ -200,7 +201,30 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr
JgUseRegistrationManageDto dto, JgUseRegistrationManageDto dto,
String sort) { String sort) {
SortVo sortMap = commonServiceImpl.sortFieldConversion(sort); SortVo sortMap = commonServiceImpl.sortFieldConversion(sort);
return jgUseRegistrationManageMapper.queryForPage(page, dto, sortMap); 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;
} }
/** /**
......
...@@ -915,6 +915,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform ...@@ -915,6 +915,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
jgVehicleInformation.setIsXixian(isXiXian); jgVehicleInformation.setIsXixian(isXiXian);
useInfo.setIsNotXiXian(isXiXian); useInfo.setIsNotXiXian(isXiXian);
useInfo.setProvince("610000"); useInfo.setProvince("610000");
useInfo.setIsIntoManagement(Boolean.TRUE);
useInfo.setAddress(jgVehicleInformation.getUseUnitAddress()); useInfo.setAddress(jgVehicleInformation.getUseUnitAddress());
LambdaQueryWrapper<IdxBizJgUseInfo> lambda = new QueryWrapper<IdxBizJgUseInfo>().lambda(); LambdaQueryWrapper<IdxBizJgUseInfo> lambda = new QueryWrapper<IdxBizJgUseInfo>().lambda();
lambda.eq(IdxBizJgUseInfo::getRecord, map.get("record")); lambda.eq(IdxBizJgUseInfo::getRecord, map.get("record"));
......
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