TC数据全部替换为数据库数据(补充机型版本)

This commit is contained in:
zjh 2026-04-29 14:52:11 +08:00
parent 1ae1dd83f0
commit e6a58a0633

View File

@ -99,7 +99,8 @@ public class TcDataQueryServiceImpl implements TcDataQueryService {
String partsName = subsystemType.split("-")[1]; String partsName = subsystemType.split("-")[1];
//开始查找系统数据 //开始查找系统数据
List<EngineParamDetailPojo> pojoList = bd.getBusinessDatabase() List<EngineParamDetailPojo> pojoList = bd.getBusinessDatabase()
.eq("engine_model_id", engineModelID) .eq("engine_model_id", dataEntryEngineModelPojo.getId())
.eq("major_version", dataEntryEngineModelPojo.getVersionNumber())
.eq("subsystem_name", subsystem) .eq("subsystem_name", subsystem)
.eq("parts_name", partsName) .eq("parts_name", partsName)
.doQuery(EngineParamDetailPojo.class); .doQuery(EngineParamDetailPojo.class);
@ -176,7 +177,8 @@ public class TcDataQueryServiceImpl implements TcDataQueryService {
List<EngineParamDetailPojo> systemDataList = new ArrayList<>(); List<EngineParamDetailPojo> systemDataList = new ArrayList<>();
for (Map.Entry<String, String> subsystemPartsPair : subsystemPartsPairs) { for (Map.Entry<String, String> subsystemPartsPair : subsystemPartsPairs) {
List<EngineParamDetailPojo> pojoList = bd.getBusinessDatabase() List<EngineParamDetailPojo> pojoList = bd.getBusinessDatabase()
.eq("engine_model_id", engineModelID) .eq("engine_model_id", dataEntryEngineModelPojo.getId())
.eq("major_version", dataEntryEngineModelPojo.getVersionNumber())
.eq("subsystem_name", subsystemPartsPair.getKey()) .eq("subsystem_name", subsystemPartsPair.getKey())
.eq("parts_name", subsystemPartsPair.getValue()) .eq("parts_name", subsystemPartsPair.getValue())
.doQuery(EngineParamDetailPojo.class); .doQuery(EngineParamDetailPojo.class);
@ -237,8 +239,7 @@ public class TcDataQueryServiceImpl implements TcDataQueryService {
try (ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).build()) { try (ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).build()) {
setupResponse(response, "参数值导入模板" + (new Date())); setupResponse(response, "参数值导入模板" + (new Date()));
ArrayList<EnginePartsCollectionPojo> enginePartsCollections = new ArrayList<>(); ArrayList<EnginePartsCollectionPojo> enginePartsCollections = new ArrayList<>();
List<EnginePartsCollectionPojo> lbjmcs = bd.getBusinessDatabase() List<EnginePartsCollectionPojo> lbjmcs = new ArrayList<>();
.doQuery(EnginePartsCollectionPojo.class);
for (EnginePartsCollectionPojo parameter : lbjmcs) { for (EnginePartsCollectionPojo parameter : lbjmcs) {
EnginePartsCollectionPojo engineParamDetailExcel = new EnginePartsCollectionPojo(); EnginePartsCollectionPojo engineParamDetailExcel = new EnginePartsCollectionPojo();
engineParamDetailExcel.setZtj(parameter.getZtj()); engineParamDetailExcel.setZtj(parameter.getZtj());
@ -264,8 +265,7 @@ public class TcDataQueryServiceImpl implements TcDataQueryService {
public void excelExportB(HttpServletResponse response) { public void excelExportB(HttpServletResponse response) {
try (ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).build()) { try (ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).build()) {
ArrayList<ClassificationAttributePojo> enginePartsCollections = new ArrayList<>(); ArrayList<ClassificationAttributePojo> enginePartsCollections = new ArrayList<>();
List<ClassificationAttributePojo> lbjmcs = bd.getBusinessDatabase() List<ClassificationAttributePojo> lbjmcs = new ArrayList<>();
.doQuery(ClassificationAttributePojo.class);
for (ClassificationAttributePojo parameter : lbjmcs) { for (ClassificationAttributePojo parameter : lbjmcs) {
ClassificationAttributePojo engineParamDetailExcel = new ClassificationAttributePojo(); ClassificationAttributePojo engineParamDetailExcel = new ClassificationAttributePojo();
engineParamDetailExcel.setFieldvalue(parameter.getFieldvalue()); engineParamDetailExcel.setFieldvalue(parameter.getFieldvalue());
@ -521,6 +521,7 @@ public class TcDataQueryServiceImpl implements TcDataQueryService {
return bd.getBusinessDatabase() return bd.getBusinessDatabase()
.eq("engine_model_id", model.getId()) .eq("engine_model_id", model.getId())
.eq("major_version", model.getVersionNumber())
.in("subsystem_name", subsystemSet) .in("subsystem_name", subsystemSet)
.in("parts_name", partsNameSet) .in("parts_name", partsNameSet)
.doQuery(EngineParamDetailPojo.class); .doQuery(EngineParamDetailPojo.class);