org.openurp.web.action.api.NormalclassAction Maven / Gradle / Ivy
/*
* OpenURP, Agile University Resource Planning Solution.
*
* Copyright © 2014, The OpenURP Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful.
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
package org.openurp.web.action.api;
import java.util.List;
import org.beangle.commons.dao.query.builder.OqlBuilder;
import org.openurp.edu.clazz.model.NormalClass;
import org.openurp.edu.web.action.BaseAction;
/**
* 课程web service api
* entry: api/normalclass
*/
public class NormalclassAction extends BaseAction {
/**
* Entry : api/normalclass!json.action
* Accept params:
*
* - term 代码或名称
* - pageNo 页数
* - pageSize 页长
* - normalclass.属性
*
* Return: json
*/
public String json() {
// String codeOrNames = get("term");
OqlBuilder query = OqlBuilder.from(NormalClass.class, "normalclass");
query.where("normalclass.project.id = :projectId", getIntId("project"));
query.orderBy("normalclass.code");
List list = entityDao.search(query);
// System.out.println("size="+list.size());
put("normalclasses", list);
return forward();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy