Commit a28dbe5f authored by 刘林's avatar 刘林

fix(jg):气瓶批量导入接口修改

parent 984e359d
......@@ -152,7 +152,8 @@ public class MyBatisPlusCodeGeneratorJyjc {
String service = "/template2/service.java.ftl";
String serviceImpl = "/template2/serviceImpl.java.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";
......@@ -179,16 +180,27 @@ public class MyBatisPlusCodeGeneratorJyjc {
});
focList.add(new FileOutConfig(model) {
focList.add(new FileOutConfig(dto) {
@Override
public String outputFile(TableInfo tableInfo) {
String filePath = interfaceCodeOutPath
+ "/model/" + tableInfo.getEntityName() + "Model" + StringPool.DOT_JAVA;
System.out.println("model:"+filePath);
+ "/dto/" + tableInfo.getEntityName() + "Dto" + StringPool.DOT_JAVA;
System.out.println("dto:"+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) {
// @Override
// public String outputFile(TableInfo tableInfo) {
......
......@@ -131,7 +131,7 @@ public class PressureVesselListener extends AnalysisEventListener<EquipInfoCylin
result.append("出厂编号/产品编码不能重复;");
checkFactoryNumUniqueness(data.getFactoryNum(), null);
checkNotBlank(data.getProduceDate(), "制造日期不能为空");
checkDateFormatCorrect(data.getProduceDate(), "制造日期格式不正确");
Optional.ofNullable(data.getProduceDate()).ifPresent(v -> checkDateFormatCorrect(v, "制造日期格式不正确"));
checkNotBlank(data.getInspectOrgName(), "检测机构名称不能为空");
checkNotBlank(data.getInspectOrgCode(), "检测机构代码不能为空");
checkInspectOrg(data.getInspectOrgCode());
......@@ -204,6 +204,7 @@ public class PressureVesselListener extends AnalysisEventListener<EquipInfoCylin
String equListCode = (String) paramMap.get("EQU_LIST");
String equCategoryCode = (String) paramMap.get("EQU_CATEGORY");
String equDefineCode = (String) paramMap.get("EQU_DEFINE");
String equipSource = (String) paramMap.get("EQUIP_SOURCE");
Date date = new Date();
String record = UUID.randomUUID().toString();
......@@ -214,8 +215,9 @@ public class PressureVesselListener extends AnalysisEventListener<EquipInfoCylin
BeanUtils.copyProperties(data, useInfo);
useInfo.setRecord(record);
useInfo.setRecDate(date);
useInfo.setDataSource("jg");
useInfo.setDataSource(equipSource != null ? equipSource : "jg");//区分历史设备和新增设备
useInfo.setEquState(null);
useInfo.setIsIntoManagement(equipSource != null);//历史气瓶导入为已纳管设备
// 使用单位信息
if("个人主体".equals(company.getCompanyType())){
useInfo.setUseUnitCreditCode(company.getCompanyCode().split("_")[1]);
......
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