|
@ -6,9 +6,7 @@ import com.yihu.ehr.framework.common.dao.SQLGeneralDAO;
|
|
import com.yihu.ehr.framework.constrant.Constants;
|
|
import com.yihu.ehr.framework.constrant.Constants;
|
|
import com.yihu.ehr.framework.constrant.ErrorCode;
|
|
import com.yihu.ehr.framework.constrant.ErrorCode;
|
|
import com.yihu.ehr.framework.exception.ApiException;
|
|
import com.yihu.ehr.framework.exception.ApiException;
|
|
import com.yihu.ehr.framework.model.DictItem;
|
|
|
|
import com.yihu.ehr.framework.model.DictionaryResult;
|
|
|
|
import com.yihu.ehr.framework.model.Result;
|
|
|
|
|
|
import com.yihu.ehr.framework.model.*;
|
|
import com.yihu.ehr.framework.util.operator.CollectionUtil;
|
|
import com.yihu.ehr.framework.util.operator.CollectionUtil;
|
|
import com.yihu.ehr.framework.util.operator.StringUtil;
|
|
import com.yihu.ehr.framework.util.operator.StringUtil;
|
|
import com.yihu.ehr.framework.util.sql.SqlCreator;
|
|
import com.yihu.ehr.framework.util.sql.SqlCreator;
|
|
@ -448,5 +446,35 @@ public class AdapterSchemeVersionService extends SQLGeneralDAO {
|
|
|
|
|
|
return adapterSchemeModel;
|
|
return adapterSchemeModel;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public DataGridResult getVersion() throws Exception {
|
|
|
|
String SchemeSql = "from AdapterSchemeModel";
|
|
|
|
|
|
|
|
List<AdapterSchemeModel>std=(List<AdapterSchemeModel>)super.hibernateTemplate.find(SchemeSql);
|
|
|
|
DataGridResult data=new DataGridResult();
|
|
|
|
List<TreeResult>results=new ArrayList<>();
|
|
|
|
for(int i=0;i<std.size();i++){
|
|
|
|
TreeResult re=new TreeResult();
|
|
|
|
//re.setPid("0");
|
|
|
|
re.setText(std.get(i).getName());
|
|
|
|
re.setId(String.valueOf(std.get(i).getId()));
|
|
|
|
results.add(re);
|
|
|
|
String sql = "from AdapterSchemeVersionModel ";
|
|
|
|
sql+="where schemeId="+std.get(i).getId();
|
|
|
|
List<AdapterSchemeVersionModel>stdModel=(List<AdapterSchemeVersionModel>)super.hibernateTemplate.find(sql);
|
|
|
|
for(int j=0;j<stdModel.size();j++)
|
|
|
|
{
|
|
|
|
TreeResult tmpTree=new TreeResult();
|
|
|
|
tmpTree.setId(String.valueOf(stdModel.get(j).getId()));
|
|
|
|
tmpTree.setText(stdModel.get(j).getName());
|
|
|
|
tmpTree.setPid(String.valueOf(std.get(i).getId()));
|
|
|
|
results.add(tmpTree);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
data.setTotalCount(results.size());
|
|
|
|
data.setDetailModelList(results);
|
|
|
|
return data;
|
|
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|