学生关联应用,用于排序
parent
b82a9d3fe5
commit
a8500f95a7
@ -0,0 +1,26 @@
|
||||
package com.ibeetl.jlw.dao;
|
||||
|
||||
import com.ibeetl.jlw.entity.StudentMergeApplication;
|
||||
import com.ibeetl.jlw.web.query.StudentMergeApplicationQuery;
|
||||
import org.beetl.sql.core.engine.PageQuery;
|
||||
import org.beetl.sql.mapper.BaseMapper;
|
||||
import org.beetl.sql.mapper.annotation.SqlResource;
|
||||
import org.beetl.sql.mapper.annotation.Update;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 学生关联应用-排序 Dao
|
||||
*/
|
||||
@SqlResource("jlw.studentMergeApplication")
|
||||
public interface StudentMergeApplicationDao extends BaseMapper<StudentMergeApplication>{
|
||||
PageQuery<StudentMergeApplication> queryByCondition(PageQuery query);
|
||||
PageQuery<StudentMergeApplication> queryByConditionQuery(PageQuery query);
|
||||
@Update
|
||||
void deleteStudentMergeApplicationByIds(String ids);
|
||||
@Update
|
||||
int updateGivenByIds(StudentMergeApplicationQuery studentMergeApplicationQuery);
|
||||
List<StudentMergeApplication> getByIds(String ids);
|
||||
List<StudentMergeApplication> getValuesByQuery(StudentMergeApplicationQuery studentMergeApplicationQuery);
|
||||
List<StudentMergeApplication> getValuesByQueryNotWithPermission(StudentMergeApplicationQuery studentMergeApplicationQuery);
|
||||
}
|
@ -0,0 +1,145 @@
|
||||
package com.ibeetl.jlw.entity;
|
||||
|
||||
import com.ibeetl.admin.core.annotation.Dict;
|
||||
import com.ibeetl.admin.core.entity.BaseEntity;
|
||||
import com.ibeetl.admin.core.util.ValidateConfig;
|
||||
import org.beetl.sql.annotation.entity.AssignID;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
/*
|
||||
* 学生-关联-应用-排序
|
||||
* gen by Spring Boot2 Admin 2022-10-31
|
||||
*/
|
||||
public class StudentMergeApplication extends BaseEntity{
|
||||
|
||||
//教师-应用关联ID
|
||||
@NotNull(message = "ID不能为空", groups =ValidateConfig.UPDATE.class)
|
||||
// @SeqID(name = ORACLE_CORE_SEQ_NAME)
|
||||
@AssignID(value = "maskAutoID",param = "com.ibeetl.jlw.entity.StudentMergeApplication")
|
||||
|
||||
private Long studentMergeApplicationId ;
|
||||
|
||||
//学生ID
|
||||
@Dict(type="student.student_name.student_status=1")
|
||||
|
||||
private Long studentId ;
|
||||
|
||||
//应用ID
|
||||
@Dict(type="resources_application.application_name.1=1")
|
||||
|
||||
private Long resourcesApplicationId ;
|
||||
|
||||
//排序
|
||||
|
||||
private Integer studentMergeApplicationOrderIndex ;
|
||||
|
||||
//创建时间
|
||||
|
||||
private Date studentMergeApplicationAddTime ;
|
||||
|
||||
//组织ID
|
||||
|
||||
private Long orgId ;
|
||||
|
||||
//用户ID
|
||||
|
||||
private Long userId ;
|
||||
|
||||
public StudentMergeApplication(){
|
||||
}
|
||||
|
||||
/**教师-应用关联ID
|
||||
*@return
|
||||
*/
|
||||
public Long getStudentMergeApplicationId(){
|
||||
return studentMergeApplicationId;
|
||||
}
|
||||
/**教师-应用关联ID
|
||||
*@param studentMergeApplicationId
|
||||
*/
|
||||
public void setStudentMergeApplicationId(Long studentMergeApplicationId){
|
||||
this.studentMergeApplicationId = studentMergeApplicationId;
|
||||
}
|
||||
|
||||
/**学生ID
|
||||
*@return
|
||||
*/
|
||||
public Long getStudentId(){
|
||||
return studentId;
|
||||
}
|
||||
/**学生ID
|
||||
*@param studentId
|
||||
*/
|
||||
public void setStudentId(Long studentId){
|
||||
this.studentId = studentId;
|
||||
}
|
||||
|
||||
/**应用ID
|
||||
*@return
|
||||
*/
|
||||
public Long getResourcesApplicationId(){
|
||||
return resourcesApplicationId;
|
||||
}
|
||||
/**应用ID
|
||||
*@param resourcesApplicationId
|
||||
*/
|
||||
public void setResourcesApplicationId(Long resourcesApplicationId){
|
||||
this.resourcesApplicationId = resourcesApplicationId;
|
||||
}
|
||||
|
||||
/**排序
|
||||
*@return
|
||||
*/
|
||||
public Integer getStudentMergeApplicationOrderIndex(){
|
||||
return studentMergeApplicationOrderIndex;
|
||||
}
|
||||
/**排序
|
||||
*@param studentMergeApplicationOrderIndex
|
||||
*/
|
||||
public void setStudentMergeApplicationOrderIndex(Integer studentMergeApplicationOrderIndex){
|
||||
this.studentMergeApplicationOrderIndex = studentMergeApplicationOrderIndex;
|
||||
}
|
||||
|
||||
/**创建时间
|
||||
*@return
|
||||
*/
|
||||
public Date getStudentMergeApplicationAddTime(){
|
||||
return studentMergeApplicationAddTime;
|
||||
}
|
||||
/**创建时间
|
||||
*@param studentMergeApplicationAddTime
|
||||
*/
|
||||
public void setStudentMergeApplicationAddTime(Date studentMergeApplicationAddTime){
|
||||
this.studentMergeApplicationAddTime = studentMergeApplicationAddTime;
|
||||
}
|
||||
|
||||
/**组织ID
|
||||
*@return
|
||||
*/
|
||||
public Long getOrgId(){
|
||||
return orgId;
|
||||
}
|
||||
/**组织ID
|
||||
*@param orgId
|
||||
*/
|
||||
public void setOrgId(Long orgId){
|
||||
this.orgId = orgId;
|
||||
}
|
||||
|
||||
/**用户ID
|
||||
*@return
|
||||
*/
|
||||
public Long getUserId(){
|
||||
return userId;
|
||||
}
|
||||
/**用户ID
|
||||
*@param userId
|
||||
*/
|
||||
public void setUserId(Long userId){
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,153 @@
|
||||
package com.ibeetl.jlw.service;
|
||||
|
||||
import cn.jlw.util.ToolUtils;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ibeetl.admin.core.service.CoreBaseService;
|
||||
import com.ibeetl.admin.core.util.PlatformException;
|
||||
import com.ibeetl.admin.core.web.JsonResult;
|
||||
import com.ibeetl.admin.core.web.JsonReturnCode;
|
||||
import com.ibeetl.jlw.dao.StudentMergeApplicationDao;
|
||||
import com.ibeetl.jlw.entity.StudentMergeApplication;
|
||||
import com.ibeetl.jlw.web.query.StudentMergeApplicationQuery;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.beetl.sql.core.SqlId;
|
||||
import org.beetl.sql.core.engine.PageQuery;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 学生关联应用-排序 Service
|
||||
* 当分布式ID开启后请勿使用insert(*,true)
|
||||
*/
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
@Validated
|
||||
public class StudentMergeApplicationService extends CoreBaseService<StudentMergeApplication>{
|
||||
|
||||
@Autowired private StudentMergeApplicationDao studentMergeApplicationDao;
|
||||
|
||||
public PageQuery<StudentMergeApplication>queryByCondition(PageQuery query){
|
||||
PageQuery ret = studentMergeApplicationDao.queryByCondition(query);
|
||||
queryListAfter(ret.getList());
|
||||
return ret;
|
||||
}
|
||||
|
||||
public PageQuery<StudentMergeApplication>queryByConditionQuery(PageQuery query){
|
||||
PageQuery ret = studentMergeApplicationDao.queryByConditionQuery(query);
|
||||
queryListAfter(ret.getList());
|
||||
return ret;
|
||||
}
|
||||
|
||||
public void deleteByList(List list){
|
||||
String ids = "";
|
||||
ToolUtils.deleteNullList(list);
|
||||
for(int i=0;null != list && i<list.size();i++){
|
||||
ids += list.get(i).toString()+(i==list.size()-1?"":",");
|
||||
}
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
studentMergeApplicationDao.deleteStudentMergeApplicationByIds(ids);
|
||||
}
|
||||
}
|
||||
|
||||
public void deleteStudentMergeApplication(String ids){
|
||||
try {
|
||||
studentMergeApplicationDao.deleteStudentMergeApplicationByIds(ids);
|
||||
} catch (Exception e) {
|
||||
throw new PlatformException("批量删除学生关联应用-排序失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
public String addAll(StudentMergeApplicationQuery studentMergeApplicationQuery){
|
||||
String msg = "";
|
||||
List<StudentMergeApplication> studentMergeApplicationList = new ArrayList<>();
|
||||
try {
|
||||
studentMergeApplicationList = JSON.parseArray(studentMergeApplicationQuery.getStudentMergeApplicationJsonStr(), StudentMergeApplication.class);
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
studentMergeApplicationList.add(JSONObject.parseObject(studentMergeApplicationQuery.getStudentMergeApplicationJsonStr(), StudentMergeApplication.class));
|
||||
} catch (Exception e1) {}
|
||||
}
|
||||
ToolUtils.deleteNullList(studentMergeApplicationList);
|
||||
if(null != studentMergeApplicationList && studentMergeApplicationList.size()>0){
|
||||
for(int i=0;i<studentMergeApplicationList.size();i++){
|
||||
StudentMergeApplication studentMergeApplication = studentMergeApplicationList.get(i);
|
||||
studentMergeApplication.setUserId(studentMergeApplicationQuery.getUserId());
|
||||
studentMergeApplication.setOrgId(studentMergeApplicationQuery.getOrgId());
|
||||
}
|
||||
insertBatch(studentMergeApplicationList);
|
||||
}
|
||||
return msg;
|
||||
}
|
||||
|
||||
public JsonResult add(StudentMergeApplicationQuery studentMergeApplicationQuery){
|
||||
String msg = "";
|
||||
StudentMergeApplication studentMergeApplication = studentMergeApplicationQuery.pojo();
|
||||
studentMergeApplicationDao.insert(studentMergeApplication);
|
||||
studentMergeApplicationQuery.setStudentMergeApplicationId(studentMergeApplication.getStudentMergeApplicationId());
|
||||
JsonResult jsonResult = new JsonResult();
|
||||
jsonResult.setData(studentMergeApplication.getStudentMergeApplicationId());//自增的ID丢进去
|
||||
jsonResult.setCode(JsonReturnCode.SUCCESS.getCode());
|
||||
jsonResult.setMsg(msg);
|
||||
return jsonResult;
|
||||
}
|
||||
|
||||
public String edit(StudentMergeApplicationQuery studentMergeApplicationQuery){
|
||||
String msg = "";
|
||||
StudentMergeApplication studentMergeApplication = studentMergeApplicationQuery.pojo();
|
||||
studentMergeApplicationDao.updateTemplateById(studentMergeApplication);
|
||||
return msg;
|
||||
}
|
||||
|
||||
public String updateGivenByIds(StudentMergeApplicationQuery studentMergeApplicationQuery){
|
||||
String msg = "";
|
||||
if(StringUtils.isNotBlank(studentMergeApplicationQuery.get_given())){
|
||||
boolean flag = studentMergeApplicationDao.updateGivenByIds(studentMergeApplicationQuery) > 0;
|
||||
if(!flag){
|
||||
msg = "更新指定参数失败";
|
||||
}
|
||||
}else{
|
||||
msg = "指定参数为空";
|
||||
}
|
||||
return msg;
|
||||
}
|
||||
|
||||
public List<StudentMergeApplication> getValues (Object paras){
|
||||
return sqlManager.select(SqlId.of("jlw.studentMergeApplication.getStudentMergeApplicationValues"), StudentMergeApplication.class, paras);
|
||||
}
|
||||
|
||||
public List<StudentMergeApplication> getValuesByQuery (StudentMergeApplicationQuery studentMergeApplicationQuery){
|
||||
return studentMergeApplicationDao.getValuesByQuery(studentMergeApplicationQuery);
|
||||
}
|
||||
|
||||
public List<StudentMergeApplication> getValuesByQueryNotWithPermission (StudentMergeApplicationQuery studentMergeApplicationQuery){
|
||||
return studentMergeApplicationDao.getValuesByQueryNotWithPermission(studentMergeApplicationQuery);
|
||||
}
|
||||
|
||||
public StudentMergeApplication getInfo (Long studentMergeApplicationId){
|
||||
StudentMergeApplicationQuery studentMergeApplicationQuery = new StudentMergeApplicationQuery();
|
||||
studentMergeApplicationQuery.setStudentMergeApplicationId(studentMergeApplicationId);
|
||||
List<StudentMergeApplication> list = studentMergeApplicationDao.getValuesByQuery(studentMergeApplicationQuery);
|
||||
if(null != list && list.size()>0){
|
||||
return list.get(0);
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public StudentMergeApplication getInfo (StudentMergeApplicationQuery studentMergeApplicationQuery){
|
||||
List<StudentMergeApplication> list = studentMergeApplicationDao.getValuesByQuery(studentMergeApplicationQuery);
|
||||
if(null != list && list.size()>0){
|
||||
return list.get(0);
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,194 @@
|
||||
package com.ibeetl.jlw.web;
|
||||
|
||||
import cn.jlw.Interceptor.SCoreUser;
|
||||
import cn.jlw.validate.ValidateConfig;
|
||||
import com.ibeetl.admin.core.annotation.Function;
|
||||
import com.ibeetl.admin.core.entity.CoreUser;
|
||||
import com.ibeetl.admin.core.file.FileService;
|
||||
import com.ibeetl.admin.core.web.JsonResult;
|
||||
import com.ibeetl.jlw.entity.StudentMergeApplication;
|
||||
import com.ibeetl.jlw.service.StudentMergeApplicationService;
|
||||
import com.ibeetl.jlw.web.query.StudentMergeApplicationQuery;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.beetl.sql.core.engine.PageQuery;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 学生关联应用-排序 学生-关联-应用-排序 接口
|
||||
* 切记不要对非线程安全的静态变量进行写操作
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@Validated
|
||||
public class StudentMergeApplicationController{
|
||||
|
||||
private final Log log = LogFactory.getLog(this.getClass());
|
||||
private static final String MODEL = "/jlw/studentMergeApplication";
|
||||
private static final String API = "/api/studentMergeApplication";
|
||||
|
||||
|
||||
@Autowired private StudentMergeApplicationService studentMergeApplicationService;
|
||||
|
||||
@Autowired FileService fileService;
|
||||
|
||||
/* 前端接口 */
|
||||
|
||||
@PostMapping(API + "/getPageList.do")
|
||||
public JsonResult<PageQuery> getPageList(StudentMergeApplicationQuery condition,@SCoreUser CoreUser coreUser){
|
||||
if(null == coreUser){
|
||||
return JsonResult.failMessage("请登录后再操作");
|
||||
}else{
|
||||
PageQuery page = condition.getPageQuery();
|
||||
studentMergeApplicationService.queryByConditionQuery(page);
|
||||
return JsonResult.success(page);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@GetMapping(API + "/getInfo.do")
|
||||
public JsonResult<StudentMergeApplication>getInfo(StudentMergeApplicationQuery param,@SCoreUser CoreUser coreUser) {
|
||||
if(null == coreUser){
|
||||
return JsonResult.failMessage("请登录后再操作");
|
||||
}else{
|
||||
StudentMergeApplication studentMergeApplication = studentMergeApplicationService.getInfo(param);
|
||||
return JsonResult.success(studentMergeApplication);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@GetMapping(API + "/getList.do")
|
||||
public JsonResult<List<StudentMergeApplication>>getList(StudentMergeApplicationQuery param,@SCoreUser CoreUser coreUser) {
|
||||
if(null == coreUser){
|
||||
return JsonResult.failMessage("请登录后再操作");
|
||||
}else{
|
||||
List<StudentMergeApplication>list = studentMergeApplicationService.getValuesByQuery(param);
|
||||
return JsonResult.success(list);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* 后台页面 */
|
||||
|
||||
@GetMapping(MODEL + "/index.do")
|
||||
@Function("studentMergeApplication.query")
|
||||
public ModelAndView index() {
|
||||
ModelAndView view = new ModelAndView("/jlw/studentMergeApplication/index.html") ;
|
||||
view.addObject("search", StudentMergeApplicationQuery.class.getName());
|
||||
return view;
|
||||
}
|
||||
|
||||
@GetMapping(MODEL + "/edit.do")
|
||||
@Function("studentMergeApplication.edit")
|
||||
public ModelAndView edit(Long studentMergeApplicationId) {
|
||||
ModelAndView view = new ModelAndView("/jlw/studentMergeApplication/edit.html");
|
||||
StudentMergeApplication studentMergeApplication = studentMergeApplicationService.queryById(studentMergeApplicationId);
|
||||
view.addObject("studentMergeApplication", studentMergeApplication);
|
||||
return view;
|
||||
}
|
||||
|
||||
@GetMapping(MODEL + "/add.do")
|
||||
@Function("studentMergeApplication.add")
|
||||
public ModelAndView add(Long studentMergeApplicationId) {
|
||||
ModelAndView view = new ModelAndView("/jlw/studentMergeApplication/add.html");
|
||||
if(null != studentMergeApplicationId){
|
||||
StudentMergeApplication studentMergeApplication = studentMergeApplicationService.queryById(studentMergeApplicationId);
|
||||
view.addObject("studentMergeApplication", studentMergeApplication);
|
||||
}else {
|
||||
view.addObject("studentMergeApplication", new StudentMergeApplication());
|
||||
}
|
||||
return view;
|
||||
}
|
||||
|
||||
/* 后台接口 */
|
||||
|
||||
@PostMapping(MODEL + "/list.json")
|
||||
@Function("studentMergeApplication.query")
|
||||
public JsonResult<PageQuery> list(StudentMergeApplicationQuery condition){
|
||||
PageQuery page = condition.getPageQuery();
|
||||
studentMergeApplicationService.queryByCondition(page);
|
||||
return JsonResult.success(page);
|
||||
}
|
||||
|
||||
@PostMapping(MODEL + "/addAll.json")
|
||||
@Function("studentMergeApplication.add")
|
||||
public JsonResult addAll(StudentMergeApplicationQuery studentMergeApplicationQuery,@SCoreUser CoreUser coreUser){
|
||||
if(null == coreUser){
|
||||
return JsonResult.failMessage("请登录后再操作");
|
||||
}else{
|
||||
studentMergeApplicationQuery.setUserId(coreUser.getId());
|
||||
studentMergeApplicationQuery.setOrgId(coreUser.getOrgId());
|
||||
String msg = studentMergeApplicationService.addAll(studentMergeApplicationQuery);
|
||||
if (StringUtils.isBlank(msg)) {
|
||||
return JsonResult.success();
|
||||
} else {
|
||||
return JsonResult.failMessage("新增失败,"+msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(MODEL + "/add.json")
|
||||
@Function("studentMergeApplication.add")
|
||||
public JsonResult add(@Validated(ValidateConfig.ADD.class) StudentMergeApplicationQuery studentMergeApplicationQuery, BindingResult result,@SCoreUser CoreUser coreUser){
|
||||
if(result.hasErrors()){
|
||||
return JsonResult.failMessage(result);
|
||||
}else{
|
||||
studentMergeApplicationQuery.setUserId(coreUser.getId());
|
||||
studentMergeApplicationQuery.setOrgId(coreUser.getOrgId());
|
||||
return studentMergeApplicationService.add(studentMergeApplicationQuery);
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(MODEL + "/edit.json")
|
||||
@Function("studentMergeApplication.edit")
|
||||
public JsonResult<String> update(@Validated(ValidateConfig.UPDATE.class) StudentMergeApplicationQuery studentMergeApplicationQuery, BindingResult result) {
|
||||
if(result.hasErrors()){
|
||||
return JsonResult.failMessage(result);
|
||||
}else {
|
||||
studentMergeApplicationQuery.setUserId(null);
|
||||
studentMergeApplicationQuery.setOrgId(null);
|
||||
String msg = studentMergeApplicationService.edit(studentMergeApplicationQuery);
|
||||
if (StringUtils.isBlank(msg)) {
|
||||
return JsonResult.success();
|
||||
} else {
|
||||
return JsonResult.failMessage("更新失败,"+msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@GetMapping(MODEL + "/view.json")
|
||||
@Function("studentMergeApplication.query")
|
||||
public JsonResult<StudentMergeApplication>queryInfo(Long studentMergeApplicationId) {
|
||||
StudentMergeApplication studentMergeApplication = studentMergeApplicationService.queryById( studentMergeApplicationId);
|
||||
return JsonResult.success(studentMergeApplication);
|
||||
}
|
||||
|
||||
@GetMapping(MODEL + "/getValues.json")
|
||||
@Function("studentMergeApplication.query")
|
||||
public JsonResult<List<StudentMergeApplication>>getValues(StudentMergeApplicationQuery param) {
|
||||
List<StudentMergeApplication>list = studentMergeApplicationService.getValuesByQuery(param);
|
||||
return JsonResult.success(list);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping(MODEL + "/delete.json")
|
||||
@Function("studentMergeApplication.delete")
|
||||
@ResponseBody
|
||||
public JsonResult delete(String ids) {
|
||||
studentMergeApplicationService.deleteStudentMergeApplication(ids);
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,138 @@
|
||||
package com.ibeetl.jlw.web.query;
|
||||
|
||||
import cn.jlw.validate.ValidateConfig;
|
||||
import com.ibeetl.admin.core.annotation.Query;
|
||||
import com.ibeetl.admin.core.web.query.PageParam;
|
||||
import com.ibeetl.jlw.entity.StudentMergeApplication;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*学生关联应用-排序查询
|
||||
*/
|
||||
public class StudentMergeApplicationQuery extends PageParam {
|
||||
@NotNull(message = "ID不能为空", groups =ValidateConfig.UPDATE.class)
|
||||
@Query(name = "教师-应用关联ID", display = false)
|
||||
private Long studentMergeApplicationId;
|
||||
@Query(name = "学生ID", display = true,type=Query.TYPE_DICT,dict="student.student_name.student_status=1")
|
||||
private Long studentId;
|
||||
@Query(name = "应用ID", display = true,type=Query.TYPE_DICT,dict="resources_application.application_name.1=1")
|
||||
private Long resourcesApplicationId;
|
||||
@Query(name = "排序", display = false)
|
||||
private Integer studentMergeApplicationOrderIndex;
|
||||
@Query(name = "创建时间", display = false)
|
||||
private Date studentMergeApplicationAddTime;
|
||||
@Query(name = "组织ID", display = false)
|
||||
private Long orgId;
|
||||
@Query(name = "用户ID", display = false)
|
||||
private Long userId;
|
||||
|
||||
private String studentMergeApplicationIdPlural;
|
||||
private String studentIdPlural;
|
||||
private String resourcesApplicationIdPlural;
|
||||
private String orgIdPlural;
|
||||
private String userIdPlural;
|
||||
|
||||
private String studentMergeApplicationJsonStr;//json格式
|
||||
|
||||
private String _given;//指定更新的特定字段,多个逗号隔开
|
||||
|
||||
public Long getStudentMergeApplicationId(){
|
||||
return studentMergeApplicationId;
|
||||
}
|
||||
public void setStudentMergeApplicationId(Long studentMergeApplicationId ){
|
||||
this.studentMergeApplicationId = studentMergeApplicationId;
|
||||
}
|
||||
public Long getStudentId(){
|
||||
return studentId;
|
||||
}
|
||||
public void setStudentId(Long studentId ){
|
||||
this.studentId = studentId;
|
||||
}
|
||||
public Long getResourcesApplicationId(){
|
||||
return resourcesApplicationId;
|
||||
}
|
||||
public void setResourcesApplicationId(Long resourcesApplicationId ){
|
||||
this.resourcesApplicationId = resourcesApplicationId;
|
||||
}
|
||||
public Integer getStudentMergeApplicationOrderIndex(){
|
||||
return studentMergeApplicationOrderIndex;
|
||||
}
|
||||
public void setStudentMergeApplicationOrderIndex(Integer studentMergeApplicationOrderIndex ){
|
||||
this.studentMergeApplicationOrderIndex = studentMergeApplicationOrderIndex;
|
||||
}
|
||||
public Date getStudentMergeApplicationAddTime(){
|
||||
return studentMergeApplicationAddTime;
|
||||
}
|
||||
public void setStudentMergeApplicationAddTime(Date studentMergeApplicationAddTime ){
|
||||
this.studentMergeApplicationAddTime = studentMergeApplicationAddTime;
|
||||
}
|
||||
public Long getOrgId(){
|
||||
return orgId;
|
||||
}
|
||||
public void setOrgId(Long orgId ){
|
||||
this.orgId = orgId;
|
||||
}
|
||||
public Long getUserId(){
|
||||
return userId;
|
||||
}
|
||||
public void setUserId(Long userId ){
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public StudentMergeApplication pojo(){
|
||||
StudentMergeApplication pojo = new StudentMergeApplication();
|
||||
pojo.setStudentMergeApplicationId(this.getStudentMergeApplicationId());
|
||||
pojo.setStudentId(this.getStudentId());
|
||||
pojo.setResourcesApplicationId(this.getResourcesApplicationId());
|
||||
pojo.setStudentMergeApplicationOrderIndex(this.getStudentMergeApplicationOrderIndex());
|
||||
pojo.setStudentMergeApplicationAddTime(this.getStudentMergeApplicationAddTime());
|
||||
pojo.setOrgId(this.getOrgId());
|
||||
pojo.setUserId(this.getUserId());
|
||||
return pojo;
|
||||
}
|
||||
|
||||
public String getStudentMergeApplicationIdPlural(){
|
||||
return studentMergeApplicationIdPlural;
|
||||
}
|
||||
public void setStudentMergeApplicationIdPlural(String studentMergeApplicationIdPlural){
|
||||
this.studentMergeApplicationIdPlural = studentMergeApplicationIdPlural;
|
||||
}
|
||||
public String getStudentIdPlural(){
|
||||
return studentIdPlural;
|
||||
}
|
||||
public void setStudentIdPlural(String studentIdPlural){
|
||||
this.studentIdPlural = studentIdPlural;
|
||||
}
|
||||
public String getResourcesApplicationIdPlural(){
|
||||
return resourcesApplicationIdPlural;
|
||||
}
|
||||
public void setResourcesApplicationIdPlural(String resourcesApplicationIdPlural){
|
||||
this.resourcesApplicationIdPlural = resourcesApplicationIdPlural;
|
||||
}
|
||||
public String getOrgIdPlural(){
|
||||
return orgIdPlural;
|
||||
}
|
||||
public void setOrgIdPlural(String orgIdPlural){
|
||||
this.orgIdPlural = orgIdPlural;
|
||||
}
|
||||
public String getUserIdPlural(){
|
||||
return userIdPlural;
|
||||
}
|
||||
public void setUserIdPlural(String userIdPlural){
|
||||
this.userIdPlural = userIdPlural;
|
||||
}
|
||||
public String getStudentMergeApplicationJsonStr(){
|
||||
return studentMergeApplicationJsonStr;
|
||||
}
|
||||
public void setStudentMergeApplicationJsonStr(String studentMergeApplicationJsonStr ){
|
||||
this.studentMergeApplicationJsonStr = studentMergeApplicationJsonStr;
|
||||
}
|
||||
public String get_given() {
|
||||
return _given;
|
||||
}
|
||||
public void set_given(String _given) {
|
||||
this._given = _given;
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
layui.define([ 'form', 'laydate', 'table','studentMergeApplicationApi'], function(exports) {
|
||||
var form = layui.form;
|
||||
var studentMergeApplicationApi = layui.studentMergeApplicationApi;
|
||||
var index = layui.index;
|
||||
var view = {
|
||||
init:function(){
|
||||
Lib.initGenrealForm($("#addForm"),form);
|
||||
this.initSubmit();
|
||||
},
|
||||
initSubmit:function(){
|
||||
$("#addButton").click(function(){
|
||||
form.on('submit(form)', function(){
|
||||
var studentMergeApplicationId = $("#addForm input[name='studentMergeApplicationId']").val();
|
||||
if(!$.isEmpty(studentMergeApplicationId)){
|
||||
studentMergeApplicationApi.updateStudentMergeApplication($('#addForm'),function(){
|
||||
parent.window.dataReload();
|
||||
Common.info("更新成功");
|
||||
Lib.closeFrame();
|
||||
});
|
||||
}else{
|
||||
studentMergeApplicationApi.addStudentMergeApplication($('#addForm'),function(){
|
||||
parent.window.dataReload();
|
||||
Common.info("添加成功");
|
||||
Lib.closeFrame();
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
$("#addButton-cancel").click(function(){
|
||||
Lib.closeFrame();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
exports('add',view);
|
||||
});
|
@ -0,0 +1,23 @@
|
||||
layui.define(['table', 'studentMergeApplicationApi'], function(exports) {
|
||||
var studentMergeApplicationApi = layui.studentMergeApplicationApi;
|
||||
var table=layui.table;
|
||||
var view = {
|
||||
init:function(){
|
||||
},
|
||||
delBatch:function(){
|
||||
var data = Common.getMoreDataFromTable(table,"studentMergeApplicationTable");
|
||||
if(data==null){
|
||||
return ;
|
||||
}
|
||||
Common.openConfirm("确认要删除这些学生关联应用-排序?",function(){
|
||||
var ids =Common.concatBatchId(data,"studentMergeApplicationId");
|
||||
studentMergeApplicationApi.del(ids,function(){
|
||||
Common.info("删除成功");
|
||||
dataReload();
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
exports('del',view);
|
||||
|
||||
});
|
@ -0,0 +1,28 @@
|
||||
layui.define([ 'form', 'laydate', 'table','studentMergeApplicationApi'], function(exports) {
|
||||
var form = layui.form;
|
||||
var studentMergeApplicationApi = layui.studentMergeApplicationApi;
|
||||
var index = layui.index;
|
||||
var view = {
|
||||
init:function(){
|
||||
Lib.initGenrealForm($("#updateForm"),form);
|
||||
this.initSubmit();
|
||||
},
|
||||
initSubmit:function(){
|
||||
$("#updateButton").click(function(){
|
||||
form.on('submit(form)', function(){
|
||||
studentMergeApplicationApi.updateStudentMergeApplication($('#updateForm'),function(){
|
||||
parent.window.dataReload();
|
||||
Common.info("更新成功");
|
||||
Lib.closeFrame();
|
||||
});
|
||||
});
|
||||
});
|
||||
$("#updateButton-cancel").click(function(){
|
||||
Lib.closeFrame();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
exports('edit',view);
|
||||
|
||||
});
|
@ -0,0 +1,18 @@
|
||||
/*访问后台的代码*/
|
||||
layui.define([], function(exports) {
|
||||
var api={
|
||||
updateStudentMergeApplication:function(form,callback){
|
||||
Lib.submitForm("/jlw/studentMergeApplication/edit.json",form,{},callback)
|
||||
},
|
||||
addStudentMergeApplication:function(form,callback){
|
||||
Lib.submitForm("/jlw/studentMergeApplication/add.json",form,{},callback)
|
||||
},
|
||||
del:function(ids,callback){
|
||||
Common.post("/jlw/studentMergeApplication/delete.json",{"ids":ids},function(){
|
||||
callback();
|
||||
})
|
||||
}
|
||||
|
||||
};
|
||||
exports('studentMergeApplicationApi',api);
|
||||
});
|
@ -0,0 +1,29 @@
|
||||
<!--#layout("/common/layout.html",{"jsBase":"/js/jlw/studentMergeApplication/"}){ -->
|
||||
<layui:searchForm formId="searchForm" searchList="" condition="${search}">
|
||||
</layui:searchForm>
|
||||
<table id="studentMergeApplicationTable" lay-filter="studentMergeApplicationTable"></table>
|
||||
<!--#} -->
|
||||
|
||||
<script type="text/html" id="toolbar_studentMergeApplication">
|
||||
<div class="layui-btn-container">
|
||||
<div class="layui-btn-group" >
|
||||
<!--# if(core.searchIsShow(search)) {-->
|
||||
<layui:accessButton function="studentMergeApplication.query" id="searchFormSearch" action="search"><i class="layui-icon"></i>搜索</layui:accessButton>
|
||||
<!--# }-->
|
||||
<layui:accessButton function="studentMergeApplication.add" action="add">添加</layui:accessButton>
|
||||
<layui:accessButton function="studentMergeApplication.edit" action="edit">修改</layui:accessButton>
|
||||
<layui:accessButton function="studentMergeApplication.del" action="del">删除</layui:accessButton>
|
||||
<!--# if(!isEmpty(search)) {-->
|
||||
<layui:accessButton function="studentMergeApplication.query" action="refresh"><i class="layui-icon"></i>刷新</layui:accessButton>
|
||||
<!--# }-->
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
<script>
|
||||
|
||||
layui.use(['index'], function(){
|
||||
var index = layui.index;
|
||||
index.init();
|
||||
});
|
||||
|
||||
</script>
|
Loading…
Reference in New Issue