版本绑定调整

This commit is contained in:
ys.git 2025-12-04 15:10:32 +08:00
parent ea8502c2b9
commit 03de3bd77b

View File

@ -282,7 +282,7 @@ public class DataEntryEngineModelServiceImpl implements DataEntryEngineModelServ
modelPojo.setId(UUID.randomUUID().toString());
sw.buildFromDatasource("xdap_app_223770822127386625").doInsert(modelPojo);
saveDataParamDetail(modelPojo, parameters, xdapUsersPojo);
saveDataParamDetail(modelPojo, parameters,versionNumber, xdapUsersPojo);
return 0;
}
@ -307,12 +307,12 @@ public class DataEntryEngineModelServiceImpl implements DataEntryEngineModelServ
.rowid("id", entryEngineModelPojo.getId())
.doUpdate(EngineParamDetailPojo.class);
//绑定参数准备重新走分发
saveDataParamDetail(entryEngineModelPojo, parameters, null);
saveDataParamDetail(entryEngineModelPojo, parameters, newVersionNum,null);
}
}
//为每个机型绑定参数
public void saveDataParamDetail(DataEntryEngineModelPojo modelPojo, List<Parameter> parameters, XdapUsers xdapUsersPojo) {
public void saveDataParamDetail(DataEntryEngineModelPojo modelPojo, List<Parameter> parameters,Integer newVersionNum, XdapUsers xdapUsersPojo) {
/**
* 遍历机型
* 查找参数 将每个机型都把参数和参数所属的填写部门关联上
@ -328,7 +328,7 @@ public class DataEntryEngineModelServiceImpl implements DataEntryEngineModelServ
engineParamDetailPojo.setParameterType(parameter.getParameterType());
engineParamDetailPojo.setParameterName(parameter.getParameterName());
engineParamDetailPojo.setDepartment(parameter.getDepartment());
engineParamDetailPojo.setMajorVersion(versionNumber);
engineParamDetailPojo.setMajorVersion(newVersionNum);
engineParamDetailPojo.setVersionStatus(ParamValueVersionEnum.DRAFT.getCode());
engineParamDetailPojo.setCreatedBy(ObjectUtils.isNotEmpty(xdapUsersPojo) ? xdapUsersPojo.getId() : null);
engineParamDetailPojo.setLastUpdatedBy("");