教师关联应用

beetlsql3-dev
Mlxa0324 2 years ago
parent 8a1d020267
commit ae062ccbc9

@ -6,22 +6,21 @@ import org.beetl.sql.core.engine.PageQuery;
import org.beetl.sql.mapper.BaseMapper; import org.beetl.sql.mapper.BaseMapper;
import org.beetl.sql.mapper.annotation.SqlResource; import org.beetl.sql.mapper.annotation.SqlResource;
import org.beetl.sql.mapper.annotation.Update; import org.beetl.sql.mapper.annotation.Update;
import org.springframework.stereotype.Repository;
import java.util.List; import java.util.List;
/** /**
* TeacherMergeApplication Dao * Dao
*/ */
@SqlResource("jlw.teacherMergeApplication") @SqlResource("jlw.teacherMergeApplication")
public interface TeacherMergeApplicationDao extends BaseMapper<TeacherMergeApplication>{ public interface TeacherMergeApplicationDao extends BaseMapper<TeacherMergeApplication>{
public PageQuery<TeacherMergeApplication> queryByCondition(PageQuery query); PageQuery<TeacherMergeApplication> queryByCondition(PageQuery query);
public PageQuery<TeacherMergeApplication> queryByConditionQuery(PageQuery query); PageQuery<TeacherMergeApplication> queryByConditionQuery(PageQuery query);
@Update @Update
public void deleteTeacherMergeApplicationByIds(String ids); void deleteTeacherMergeApplicationByIds(String ids);
@Update @Update
public int updateGivenByIds(TeacherMergeApplicationQuery teacherMergeApplicationQuery); int updateGivenByIds(TeacherMergeApplicationQuery teacherMergeApplicationQuery);
public List<TeacherMergeApplication> getByIds(String ids); List<TeacherMergeApplication> getByIds(String ids);
public List<TeacherMergeApplication> getValuesByQuery(TeacherMergeApplicationQuery teacherMergeApplicationQuery); List<TeacherMergeApplication> getValuesByQuery(TeacherMergeApplicationQuery teacherMergeApplicationQuery);
List<TeacherMergeApplication> getValuesByQueryNotWithPermission(TeacherMergeApplicationQuery teacherMergeApplicationQuery);
} }

@ -1,17 +1,20 @@
package com.ibeetl.jlw.entity; package com.ibeetl.jlw.entity;
import com.ibeetl.admin.core.annotation.Dict;
import com.ibeetl.admin.core.entity.BaseEntity; import com.ibeetl.admin.core.entity.BaseEntity;
import com.ibeetl.admin.core.util.ValidateConfig; import com.ibeetl.admin.core.util.ValidateConfig;
import org.beetl.sql.annotation.entity.AssignID; import org.beetl.sql.annotation.entity.AssignID;
import org.beetl.sql.annotation.entity.SeqID; import org.beetl.sql.fetch.annotation.Fetch;
import org.beetl.sql.fetch.annotation.FetchOne;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.util.Date; import java.util.Date;
/* /*
* -- * --
* gen by Spring Boot2 Admin 2022-09-04 * gen by Spring Boot2 Admin 2022-10-20
*/ */
@Fetch
public class TeacherMergeApplication extends BaseEntity{ public class TeacherMergeApplication extends BaseEntity{
//教师-应用关联ID //教师-应用关联ID
@ -22,13 +25,22 @@ public class TeacherMergeApplication extends BaseEntity{
private Long teacherMergeApplicationId ; private Long teacherMergeApplicationId ;
//教师ID //教师ID
@Dict(type="teacher.teacher_name.1=1")
private Long teacherId ; private Long teacherId ;
//应用ID //应用ID
@Dict(type="resources_application.resources_application_name.1=1")
private Long applicationId ; private Long applicationId ;
@FetchOne("applicationId")
private ResourcesApplication resourcesApplication;
//排序
private Integer orderIndex ;
//组织ID //组织ID
private Long orgId ; private Long orgId ;
@ -83,6 +95,19 @@ public class TeacherMergeApplication extends BaseEntity{
this.applicationId = applicationId; this.applicationId = applicationId;
} }
/**
*@return
*/
public Integer getOrderIndex(){
return orderIndex;
}
/**
*@param orderIndex
*/
public void setOrderIndex(Integer orderIndex){
this.orderIndex = orderIndex;
}
/**ID /**ID
*@return *@return
*/ */
@ -123,4 +148,11 @@ public class TeacherMergeApplication extends BaseEntity{
} }
public ResourcesApplication getResourcesApplication() {
return resourcesApplication;
}
public void setResourcesApplication(ResourcesApplication resourcesApplication) {
this.resourcesApplication = resourcesApplication;
}
} }

@ -42,14 +42,18 @@ public class TeacherOpenCourse extends BaseEntity{
private Integer teacherOpenCourseStatus ; private Integer teacherOpenCourseStatus ;
//教师ID外表可以直接使用。 //教师ID外表可以直接使用。
@Dict(type="teacher.teacher_name.teacher_status=1") @Dict(type="teacher.teacher_name.teacher_status=1")
@FetchSql("select teacher_id from teacher_open_course_merge_teacher t " + @FetchSql("select teacher_id from teacher_open_course_merge_teacher t " +
"where t.teacher_open_course_id = #teacherOpenCourseId# and t.teacher_open_course_merge_teacher_status = 1") "where t.teacher_open_course_id = #teacherOpenCourseId# and t.teacher_open_course_merge_teacher_status = 1 " +
"order by teacher_id limit 1 ")
private Long teacherId ; private Long teacherId ;
// 开课授权码(外表)可以直接使用。 // 开课授权码(外表)可以直接使用。
@FetchSql("select teacher_open_course_merge_teacher_auth_code from teacher_open_course_merge_teacher t " + @FetchSql("select teacher_open_course_merge_teacher_auth_code from teacher_open_course_merge_teacher t " +
"where t.teacher_open_course_id = #teacherOpenCourseId# and t.teacher_open_course_merge_teacher_status = 1") "where t.teacher_open_course_id = #teacherOpenCourseId# and t.teacher_open_course_merge_teacher_status = 1 " +
"order by teacher_id limit 1 ")
private String teacherOpenCourseMergeTeacherAuthCode ; private String teacherOpenCourseMergeTeacherAuthCode ;
//开课时间 //开课时间

@ -15,19 +15,20 @@ import org.beetl.sql.core.SqlId;
import org.beetl.sql.core.engine.PageQuery; import org.beetl.sql.core.engine.PageQuery;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
* TeacherMergeApplication Service * Service
* ID使insert(*,true) * ID使insert(*,true)
*/ */
@Service @Service
@Transactional @Transactional
@Validated
public class TeacherMergeApplicationService extends CoreBaseService<TeacherMergeApplication>{ public class TeacherMergeApplicationService extends CoreBaseService<TeacherMergeApplication>{
@Resource private TeacherMergeApplicationDao teacherMergeApplicationDao; @Resource private TeacherMergeApplicationDao teacherMergeApplicationDao;
@ -59,7 +60,7 @@ public class TeacherMergeApplicationService extends CoreBaseService<TeacherMerge
try { try {
teacherMergeApplicationDao.deleteTeacherMergeApplicationByIds(ids); teacherMergeApplicationDao.deleteTeacherMergeApplicationByIds(ids);
} catch (Exception e) { } catch (Exception e) {
throw new PlatformException("批量删除TeacherMergeApplication失败", e); throw new PlatformException("批量删除教师关联应用失败", e);
} }
} }
@ -125,6 +126,10 @@ public class TeacherMergeApplicationService extends CoreBaseService<TeacherMerge
return teacherMergeApplicationDao.getValuesByQuery(teacherMergeApplicationQuery); return teacherMergeApplicationDao.getValuesByQuery(teacherMergeApplicationQuery);
} }
public List<TeacherMergeApplication> getValuesByQueryNotWithPermission (TeacherMergeApplicationQuery teacherMergeApplicationQuery){
return teacherMergeApplicationDao.getValuesByQueryNotWithPermission(teacherMergeApplicationQuery);
}
public TeacherMergeApplication getInfo (Long teacherMergeApplicationId){ public TeacherMergeApplication getInfo (Long teacherMergeApplicationId){
TeacherMergeApplicationQuery teacherMergeApplicationQuery = new TeacherMergeApplicationQuery(); TeacherMergeApplicationQuery teacherMergeApplicationQuery = new TeacherMergeApplicationQuery();
teacherMergeApplicationQuery.setTeacherMergeApplicationId(teacherMergeApplicationId); teacherMergeApplicationQuery.setTeacherMergeApplicationId(teacherMergeApplicationId);

@ -13,23 +13,24 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.beetl.sql.core.engine.PageQuery; import org.beetl.sql.core.engine.PageQuery;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List; import java.util.List;
/** /**
* TeacherMergeApplication -- * --
* 线 * 线
*/ */
@Controller @RestController
@Validated
public class TeacherMergeApplicationController{ public class TeacherMergeApplicationController{
private final Log log = LogFactory.getLog(this.getClass()); private final Log log = LogFactory.getLog(this.getClass());
@ -39,13 +40,11 @@ public class TeacherMergeApplicationController{
@Resource private TeacherMergeApplicationService teacherMergeApplicationService; @Resource private TeacherMergeApplicationService teacherMergeApplicationService;
@Resource @Resource FileService fileService;
FileService fileService;
/* 前端接口 */ /* 前端接口 */
@PostMapping(API + "/getPageList.do") @PostMapping(API + "/getPageList.do")
@ResponseBody
public JsonResult<PageQuery> getPageList(TeacherMergeApplicationQuery condition,@SCoreUser CoreUser coreUser){ public JsonResult<PageQuery> getPageList(TeacherMergeApplicationQuery condition,@SCoreUser CoreUser coreUser){
if(null == coreUser){ if(null == coreUser){
return JsonResult.failMessage("请登录后再操作"); return JsonResult.failMessage("请登录后再操作");
@ -58,7 +57,6 @@ public class TeacherMergeApplicationController{
@GetMapping(API + "/getInfo.do") @GetMapping(API + "/getInfo.do")
@ResponseBody
public JsonResult<TeacherMergeApplication>getInfo(TeacherMergeApplicationQuery param,@SCoreUser CoreUser coreUser) { public JsonResult<TeacherMergeApplication>getInfo(TeacherMergeApplicationQuery param,@SCoreUser CoreUser coreUser) {
if(null == coreUser){ if(null == coreUser){
return JsonResult.failMessage("请登录后再操作"); return JsonResult.failMessage("请登录后再操作");
@ -70,7 +68,6 @@ public class TeacherMergeApplicationController{
@GetMapping(API + "/getList.do") @GetMapping(API + "/getList.do")
@ResponseBody
public JsonResult<List<TeacherMergeApplication>>getList(TeacherMergeApplicationQuery param,@SCoreUser CoreUser coreUser) { public JsonResult<List<TeacherMergeApplication>>getList(TeacherMergeApplicationQuery param,@SCoreUser CoreUser coreUser) {
if(null == coreUser){ if(null == coreUser){
return JsonResult.failMessage("请登录后再操作"); return JsonResult.failMessage("请登录后再操作");
@ -85,7 +82,6 @@ public class TeacherMergeApplicationController{
@GetMapping(MODEL + "/index.do") @GetMapping(MODEL + "/index.do")
@Function("teacherMergeApplication.query") @Function("teacherMergeApplication.query")
@ResponseBody
public ModelAndView index() { public ModelAndView index() {
ModelAndView view = new ModelAndView("/jlw/teacherMergeApplication/index.html") ; ModelAndView view = new ModelAndView("/jlw/teacherMergeApplication/index.html") ;
view.addObject("search", TeacherMergeApplicationQuery.class.getName()); view.addObject("search", TeacherMergeApplicationQuery.class.getName());
@ -94,7 +90,6 @@ public class TeacherMergeApplicationController{
@GetMapping(MODEL + "/edit.do") @GetMapping(MODEL + "/edit.do")
@Function("teacherMergeApplication.edit") @Function("teacherMergeApplication.edit")
@ResponseBody
public ModelAndView edit(Long teacherMergeApplicationId) { public ModelAndView edit(Long teacherMergeApplicationId) {
ModelAndView view = new ModelAndView("/jlw/teacherMergeApplication/edit.html"); ModelAndView view = new ModelAndView("/jlw/teacherMergeApplication/edit.html");
TeacherMergeApplication teacherMergeApplication = teacherMergeApplicationService.queryById(teacherMergeApplicationId); TeacherMergeApplication teacherMergeApplication = teacherMergeApplicationService.queryById(teacherMergeApplicationId);
@ -104,7 +99,6 @@ public class TeacherMergeApplicationController{
@GetMapping(MODEL + "/add.do") @GetMapping(MODEL + "/add.do")
@Function("teacherMergeApplication.add") @Function("teacherMergeApplication.add")
@ResponseBody
public ModelAndView add(Long teacherMergeApplicationId) { public ModelAndView add(Long teacherMergeApplicationId) {
ModelAndView view = new ModelAndView("/jlw/teacherMergeApplication/add.html"); ModelAndView view = new ModelAndView("/jlw/teacherMergeApplication/add.html");
if(null != teacherMergeApplicationId){ if(null != teacherMergeApplicationId){
@ -120,7 +114,6 @@ public class TeacherMergeApplicationController{
@PostMapping(MODEL + "/list.json") @PostMapping(MODEL + "/list.json")
@Function("teacherMergeApplication.query") @Function("teacherMergeApplication.query")
@ResponseBody
public JsonResult<PageQuery> list(TeacherMergeApplicationQuery condition){ public JsonResult<PageQuery> list(TeacherMergeApplicationQuery condition){
PageQuery page = condition.getPageQuery(); PageQuery page = condition.getPageQuery();
teacherMergeApplicationService.queryByCondition(page); teacherMergeApplicationService.queryByCondition(page);
@ -129,7 +122,6 @@ public class TeacherMergeApplicationController{
@PostMapping(MODEL + "/addAll.json") @PostMapping(MODEL + "/addAll.json")
@Function("teacherMergeApplication.add") @Function("teacherMergeApplication.add")
@ResponseBody
public JsonResult addAll(TeacherMergeApplicationQuery teacherMergeApplicationQuery,@SCoreUser CoreUser coreUser){ public JsonResult addAll(TeacherMergeApplicationQuery teacherMergeApplicationQuery,@SCoreUser CoreUser coreUser){
if(null == coreUser){ if(null == coreUser){
return JsonResult.failMessage("请登录后再操作"); return JsonResult.failMessage("请登录后再操作");
@ -147,7 +139,6 @@ public class TeacherMergeApplicationController{
@PostMapping(MODEL + "/add.json") @PostMapping(MODEL + "/add.json")
@Function("teacherMergeApplication.add") @Function("teacherMergeApplication.add")
@ResponseBody
public JsonResult add(@Validated(ValidateConfig.ADD.class) TeacherMergeApplicationQuery teacherMergeApplicationQuery, BindingResult result,@SCoreUser CoreUser coreUser){ public JsonResult add(@Validated(ValidateConfig.ADD.class) TeacherMergeApplicationQuery teacherMergeApplicationQuery, BindingResult result,@SCoreUser CoreUser coreUser){
if(result.hasErrors()){ if(result.hasErrors()){
return JsonResult.failMessage(result); return JsonResult.failMessage(result);
@ -160,7 +151,6 @@ public class TeacherMergeApplicationController{
@PostMapping(MODEL + "/edit.json") @PostMapping(MODEL + "/edit.json")
@Function("teacherMergeApplication.edit") @Function("teacherMergeApplication.edit")
@ResponseBody
public JsonResult<String> update(@Validated(ValidateConfig.UPDATE.class) TeacherMergeApplicationQuery teacherMergeApplicationQuery, BindingResult result) { public JsonResult<String> update(@Validated(ValidateConfig.UPDATE.class) TeacherMergeApplicationQuery teacherMergeApplicationQuery, BindingResult result) {
if(result.hasErrors()){ if(result.hasErrors()){
return JsonResult.failMessage(result); return JsonResult.failMessage(result);
@ -179,7 +169,6 @@ public class TeacherMergeApplicationController{
@GetMapping(MODEL + "/view.json") @GetMapping(MODEL + "/view.json")
@Function("teacherMergeApplication.query") @Function("teacherMergeApplication.query")
@ResponseBody
public JsonResult<TeacherMergeApplication>queryInfo(Long teacherMergeApplicationId) { public JsonResult<TeacherMergeApplication>queryInfo(Long teacherMergeApplicationId) {
TeacherMergeApplication teacherMergeApplication = teacherMergeApplicationService.queryById( teacherMergeApplicationId); TeacherMergeApplication teacherMergeApplication = teacherMergeApplicationService.queryById( teacherMergeApplicationId);
return JsonResult.success(teacherMergeApplication); return JsonResult.success(teacherMergeApplication);
@ -187,7 +176,6 @@ public class TeacherMergeApplicationController{
@GetMapping(MODEL + "/getValues.json") @GetMapping(MODEL + "/getValues.json")
@Function("teacherMergeApplication.query") @Function("teacherMergeApplication.query")
@ResponseBody
public JsonResult<List<TeacherMergeApplication>>getValues(TeacherMergeApplicationQuery param) { public JsonResult<List<TeacherMergeApplication>>getValues(TeacherMergeApplicationQuery param) {
List<TeacherMergeApplication>list = teacherMergeApplicationService.getValuesByQuery(param); List<TeacherMergeApplication>list = teacherMergeApplicationService.getValuesByQuery(param);
return JsonResult.success(list); return JsonResult.success(list);

@ -122,6 +122,13 @@ public class TeacherOpenCourseController{
/* 后台接口 */ /* 后台接口 */
/**
* -
*
*
* @param condition
* @return
*/
@PostMapping(MODEL + "/list.json") @PostMapping(MODEL + "/list.json")
@Function("teacherOpenCourse.query") @Function("teacherOpenCourse.query")
@ResponseBody @ResponseBody

@ -9,16 +9,18 @@ import javax.validation.constraints.NotNull;
import java.util.Date; import java.util.Date;
/** /**
*TeacherMergeApplication *
*/ */
public class TeacherMergeApplicationQuery extends PageParam { public class TeacherMergeApplicationQuery extends PageParam {
@NotNull(message = "ID不能为空", groups =ValidateConfig.UPDATE.class) @NotNull(message = "ID不能为空", groups =ValidateConfig.UPDATE.class)
@Query(name = "教师-应用关联ID", display = false) @Query(name = "教师-应用关联ID", display = false)
private Long teacherMergeApplicationId; private Long teacherMergeApplicationId;
@Query(name = "教师ID", display = true) @Query(name = "教师ID", display = true,type=Query.TYPE_DICT,dict="teacher.teacher_name.1=1")
private Long teacherId; private Long teacherId;
@Query(name = "应用ID", display = true) @Query(name = "应用ID", display = true,type=Query.TYPE_DICT,dict="resources_application.resources_application_name.1=1")
private Long applicationId; private Long applicationId;
@Query(name = "排序", display = false)
private Integer orderIndex;
@Query(name = "组织ID", display = false) @Query(name = "组织ID", display = false)
private Long orgId; private Long orgId;
@Query(name = "用户ID", display = false) @Query(name = "用户ID", display = false)
@ -54,6 +56,12 @@ public class TeacherMergeApplicationQuery extends PageParam {
public void setApplicationId(Long applicationId ){ public void setApplicationId(Long applicationId ){
this.applicationId = applicationId; this.applicationId = applicationId;
} }
public Integer getOrderIndex(){
return orderIndex;
}
public void setOrderIndex(Integer orderIndex ){
this.orderIndex = orderIndex;
}
public Long getOrgId(){ public Long getOrgId(){
return orgId; return orgId;
} }
@ -78,6 +86,7 @@ public class TeacherMergeApplicationQuery extends PageParam {
pojo.setTeacherMergeApplicationId(this.getTeacherMergeApplicationId()); pojo.setTeacherMergeApplicationId(this.getTeacherMergeApplicationId());
pojo.setTeacherId(this.getTeacherId()); pojo.setTeacherId(this.getTeacherId());
pojo.setApplicationId(this.getApplicationId()); pojo.setApplicationId(this.getApplicationId());
pojo.setOrderIndex(this.getOrderIndex());
pojo.setOrgId(this.getOrgId()); pojo.setOrgId(this.getOrgId());
pojo.setUserId(this.getUserId()); pojo.setUserId(this.getUserId());
pojo.setCreateTime(this.getCreateTime()); pojo.setCreateTime(this.getCreateTime());

@ -28,6 +28,9 @@ queryByCondition
@if(!isEmpty(applicationIdPlural)){ @if(!isEmpty(applicationIdPlural)){
and find_in_set(t.application_id,#applicationIdPlural#) and find_in_set(t.application_id,#applicationIdPlural#)
@} @}
@if(!isEmpty(orderIndex)){
and t.order_index =#orderIndex#
@}
@if(!isEmpty(orgId)){ @if(!isEmpty(orgId)){
and t.org_id =#orgId# and t.org_id =#orgId#
@} @}
@ -73,6 +76,9 @@ queryByConditionQuery
@if(!isEmpty(applicationIdPlural)){ @if(!isEmpty(applicationIdPlural)){
and find_in_set(t.application_id,#applicationIdPlural#) and find_in_set(t.application_id,#applicationIdPlural#)
@} @}
@if(!isEmpty(orderIndex)){
and t.order_index =#orderIndex#
@}
@if(!isEmpty(orgId)){ @if(!isEmpty(orgId)){
and t.org_id =#orgId# and t.org_id =#orgId#
@} @}
@ -128,6 +134,13 @@ updateGivenByIds
application_id = #applicationId# , application_id = #applicationId# ,
@} @}
@} @}
@if(contain("orderIndex",_given)){
@if(isEmpty(orderIndex)){
order_index = null ,
@}else{
order_index = #orderIndex# ,
@}
@}
@if(contain("orgId",_given)){ @if(contain("orgId",_given)){
@if(isEmpty(orgId)){ @if(isEmpty(orgId)){
org_id = null , org_id = null ,
@ -171,6 +184,9 @@ getTeacherMergeApplicationValues
@if(!isEmpty(applicationId)){ @if(!isEmpty(applicationId)){
and t.application_id =#applicationId# and t.application_id =#applicationId#
@} @}
@if(!isEmpty(orderIndex)){
and t.order_index =#orderIndex#
@}
@if(!isEmpty(orgId)){ @if(!isEmpty(orgId)){
and t.org_id =#orgId# and t.org_id =#orgId#
@} @}
@ -208,6 +224,55 @@ getValuesByQuery
@if(!isEmpty(applicationIdPlural)){ @if(!isEmpty(applicationIdPlural)){
and find_in_set(t.application_id,#applicationIdPlural#) and find_in_set(t.application_id,#applicationIdPlural#)
@} @}
@if(!isEmpty(orderIndex)){
and t.order_index =#orderIndex#
@}
@if(!isEmpty(orgId)){
and t.org_id =#orgId#
@}
@if(!isEmpty(orgIdPlural)){
and find_in_set(t.org_id,#orgIdPlural#)
@}
@if(!isEmpty(userId)){
and t.user_id =#userId#
@}
@if(!isEmpty(userIdPlural)){
and find_in_set(t.user_id,#userIdPlural#)
@}
@if(!isEmpty(createTime)){
and t.create_time =#createTime#
@}
getValuesByQueryNotWithPermission
===
* 根据不为空的参数进行查询(不包含权限)
select t.*
from teacher_merge_application t
where 1=1
@if(!isEmpty(teacherMergeApplicationId)){
and t.teacher_merge_application_id =#teacherMergeApplicationId#
@}
@if(!isEmpty(teacherMergeApplicationIdPlural)){
and find_in_set(t.teacher_merge_application_id,#teacherMergeApplicationIdPlural#)
@}
@if(!isEmpty(teacherId)){
and t.teacher_id =#teacherId#
@}
@if(!isEmpty(teacherIdPlural)){
and find_in_set(t.teacher_id,#teacherIdPlural#)
@}
@if(!isEmpty(applicationId)){
and t.application_id =#applicationId#
@}
@if(!isEmpty(applicationIdPlural)){
and find_in_set(t.application_id,#applicationIdPlural#)
@}
@if(!isEmpty(orderIndex)){
and t.order_index =#orderIndex#
@}
@if(!isEmpty(orgId)){ @if(!isEmpty(orgId)){
and t.org_id =#orgId# and t.org_id =#orgId#
@} @}

@ -9,7 +9,7 @@ layui.define(['table', 'teacherMergeApplicationApi'], function(exports) {
if(data==null){ if(data==null){
return ; return ;
} }
Common.openConfirm("确认要删除这些TeacherMergeApplication?",function(){ Common.openConfirm("确认要删除这些教师关联应用?",function(){
var ids =Common.concatBatchId(data,"teacherMergeApplicationId"); var ids =Common.concatBatchId(data,"teacherMergeApplicationId");
teacherMergeApplicationApi.del(ids,function(){ teacherMergeApplicationApi.del(ids,function(){
Common.info("删除成功"); Common.info("删除成功");

@ -5,11 +5,13 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
var teacherMergeApplicationTable = null; var teacherMergeApplicationTable = null;
var view ={ var view ={
init:function(){ init:function(){
var that = this
this.initTable(); this.initTable();
this.initSearchForm(); this.initSearchForm();
this.initToolBar(); this.initToolBar();
window.dataReload = function(){ window.dataReload = function(){
Lib.doSearchForm($("#searchForm"),teacherMergeApplicationTable) Lib.doSearchForm($("#searchForm"),teacherMergeApplicationTable)
that.initToolBar();
} }
}, },
initTable:function(){ initTable:function(){
@ -40,18 +42,25 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
width : 60, width : 60,
}, },
{ {
field : 'teacherId', field : 'teacherIdText', //数据字典类型为 teacher.teacher_name.1=1
title : '教师ID', title : '教师ID',
align:"center", align:"center",
hideField :false, hideField :false,
hide:$.isEmpty(sx_['teacherId'])?false:sx_['teacherId'], hide:$.isEmpty(sx_['teacherIdText'])?false:sx_['teacherIdText'],
}, },
{ {
field : 'applicationId', field : 'applicationIdText', //数据字典类型为 resources_application.resources_application_name.1=1
title : '应用ID', title : '应用ID',
align:"center", align:"center",
hideField :false, hideField :false,
hide:$.isEmpty(sx_['applicationId'])?false:sx_['applicationId'], hide:$.isEmpty(sx_['applicationIdText'])?false:sx_['applicationIdText'],
},
{
field : 'orderIndex',
title : '排序',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['orderIndex'])?false:sx_['orderIndex'],
}, },
{ {
field : 'orgId', field : 'orgId',
@ -104,7 +113,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
toolbar = { toolbar = {
add: function () { add: function () {
var url = "/jlw/teacherMergeApplication/add.do"; var url = "/jlw/teacherMergeApplication/add.do";
Common.openDlg(url,"TeacherMergeApplication管理>新增"); Common.openDlg(url,"教师关联应用管理>新增");
}, },
edit: function () { edit: function () {
var data = Common.getOneFromTable(table,"teacherMergeApplicationTable"); var data = Common.getOneFromTable(table,"teacherMergeApplicationTable");
@ -112,7 +121,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
return ; return ;
} }
var url = "/jlw/teacherMergeApplication/add.do?teacherMergeApplicationId="+data.teacherMergeApplicationId; var url = "/jlw/teacherMergeApplication/add.do?teacherMergeApplicationId="+data.teacherMergeApplicationId;
Common.openDlg(url,"TeacherMergeApplication管理>"+data.teacherMergeApplicationId+">编辑"); Common.openDlg(url,"教师关联应用管理>"+data.teacherMergeApplicationId+">编辑");
}, },
del: function () { del: function () {
layui.use(['del'], function(){ layui.use(['del'], function(){
@ -122,10 +131,12 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
}, },
search: function () { search: function () {
Lib.doSearchForm($("#searchForm"), teacherMergeApplicationTable, 1); Lib.doSearchForm($("#searchForm"), teacherMergeApplicationTable, 1);
view.initToolBar()
}, },
refresh: function () { refresh: function () {
searchForm.reset(); searchForm.reset();
Lib.doSearchForm($("#searchForm"), teacherMergeApplicationTable, 1); Lib.doSearchForm($("#searchForm"), teacherMergeApplicationTable, 1);
view.initToolBar()
}, },
} }
//触发事件 //触发事件
@ -133,11 +144,12 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
var type = $(this).data('type'); var type = $(this).data('type');
toolbar[type] ? toolbar[type].call(this) : ''; toolbar[type] ? toolbar[type].call(this) : '';
}); });
}, initTableTool: table.on('tool(teacherMergeApplicationTable)', function (obj) { }, initTableTool: table.on('tool(teacherMergeApplicationTable)', function (obj) {
var data = obj.data; var data = obj.data;
if (obj.event === 'edit') { if (obj.event === 'edit') {
var url = "/jlw/teacherMergeApplication/add.do?teacherMergeApplicationId="+data.teacherMergeApplicationId; var url = "/jlw/teacherMergeApplication/add.do?teacherMergeApplicationId="+data.teacherMergeApplicationId;
Common.openDlg(url,"TeacherMergeApplication管理>"+data.teacherMergeApplicationId+">编辑"); Common.openDlg(url,"教师关联应用管理>"+data.teacherMergeApplicationId+">编辑");
}else if(obj.event === "del"){ }else if(obj.event === "del"){
layer.confirm('是否确定删除该信息?', function (index) { layer.confirm('是否确定删除该信息?', function (index) {
var ret = Common.postAjax("/jlw/teacherMergeApplication/delete.json",{ids:data.teacherMergeApplicationId}); var ret = Common.postAjax("/jlw/teacherMergeApplication/delete.json",{ids:data.teacherMergeApplicationId});

@ -6,13 +6,15 @@
<div class="layui-inline"> <div class="layui-inline">
<label class="layui-form-label">教师ID</label> <label class="layui-form-label">教师ID</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input type="text" id="teacherId" name="teacherId" value="${teacherMergeApplication.teacherId}" class="layui-input" > <layui:simpleDictSelect style='layui-input-inline' type="teacher.teacher_name.1=1"
id="teacherId" name="teacherId" value="${teacherMergeApplication.teacherId}" layVerify="" />
</div> </div>
</div> </div>
<div class="layui-inline"> <div class="layui-inline">
<label class="layui-form-label">应用ID</label> <label class="layui-form-label">应用ID</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input type="text" id="applicationId" name="applicationId" value="${teacherMergeApplication.applicationId}" class="layui-input" > <layui:simpleDictSelect style='layui-input-inline' type="resources_application.resources_application_name.1=1"
id="applicationId" name="applicationId" value="${teacherMergeApplication.applicationId}" layVerify="" />
</div> </div>
</div> </div>
</div> </div>
@ -20,21 +22,27 @@
<div class="layui-row"> <div class="layui-row">
<div class="layui-form-item"> <div class="layui-form-item">
<div class="layui-inline"> <div class="layui-inline">
<label class="layui-form-label">组织ID</label> <label class="layui-form-label">排序</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input type="text" id="orgId" name="orgId" value="${teacherMergeApplication.orgId}" class="layui-input" > <input type="text" id="orderIndex" name="orderIndex" value="${teacherMergeApplication.orderIndex}" class="layui-input" >
</div> </div>
</div> </div>
<div class="layui-inline"> <div class="layui-inline">
<label class="layui-form-label">用户ID</label> <label class="layui-form-label">组织ID</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input type="text" id="userId" name="userId" value="${teacherMergeApplication.userId}" class="layui-input" > <input type="text" id="orgId" name="orgId" value="${teacherMergeApplication.orgId}" class="layui-input" >
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="layui-row"> <div class="layui-row">
<div class="layui-form-item"> <div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">用户ID</label>
<div class="layui-input-inline">
<input type="text" id="userId" name="userId" value="${teacherMergeApplication.userId}" class="layui-input" >
</div>
</div>
<div class="layui-inline"> <div class="layui-inline">
<label class="layui-form-label">创建时间</label> <label class="layui-form-label">创建时间</label>
<div class="layui-input-inline"> <div class="layui-input-inline">

@ -6,13 +6,15 @@
<div class="layui-inline"> <div class="layui-inline">
<label class="layui-form-label">教师ID</label> <label class="layui-form-label">教师ID</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input type="text" id="teacherId" name="teacherId" value="${teacherMergeApplication.teacherId}" class="layui-input" > <layui:simpleDictSelect style='layui-input-inline' type="teacher.teacher_name.1=1"
id="teacherId" name="teacherId" value="${teacherMergeApplication.teacherId}" layVerify="" />
</div> </div>
</div> </div>
<div class="layui-inline"> <div class="layui-inline">
<label class="layui-form-label">应用ID</label> <label class="layui-form-label">应用ID</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input type="text" id="applicationId" name="applicationId" value="${teacherMergeApplication.applicationId}" class="layui-input" > <layui:simpleDictSelect style='layui-input-inline' type="resources_application.resources_application_name.1=1"
id="applicationId" name="applicationId" value="${teacherMergeApplication.applicationId}" layVerify="" />
</div> </div>
</div> </div>
</div> </div>
@ -20,21 +22,27 @@
<div class="layui-row"> <div class="layui-row">
<div class="layui-form-item"> <div class="layui-form-item">
<div class="layui-inline"> <div class="layui-inline">
<label class="layui-form-label">组织ID</label> <label class="layui-form-label">排序</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input type="text" id="orgId" name="orgId" value="${teacherMergeApplication.orgId}" class="layui-input" > <input type="text" id="orderIndex" name="orderIndex" value="${teacherMergeApplication.orderIndex}" class="layui-input" >
</div> </div>
</div> </div>
<div class="layui-inline"> <div class="layui-inline">
<label class="layui-form-label">用户ID</label> <label class="layui-form-label">组织ID</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input type="text" id="userId" name="userId" value="${teacherMergeApplication.userId}" class="layui-input" > <input type="text" id="orgId" name="orgId" value="${teacherMergeApplication.orgId}" class="layui-input" >
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="layui-row"> <div class="layui-row">
<div class="layui-form-item"> <div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">用户ID</label>
<div class="layui-input-inline">
<input type="text" id="userId" name="userId" value="${teacherMergeApplication.userId}" class="layui-input" >
</div>
</div>
<div class="layui-inline"> <div class="layui-inline">
<label class="layui-form-label">创建时间</label> <label class="layui-form-label">创建时间</label>
<div class="layui-input-inline"> <div class="layui-input-inline">

@ -7,11 +7,15 @@
<script type="text/html" id="toolbar_teacherMergeApplication"> <script type="text/html" id="toolbar_teacherMergeApplication">
<div class="layui-btn-container"> <div class="layui-btn-container">
<div class="layui-btn-group" > <div class="layui-btn-group" >
<!-- <layui:accessButton function="teacherMergeApplication.query" id="searchFormSearch" action="search"><i class="layui-icon">&#xe615;</i>搜索</layui:accessButton>--> <!--# if(core.searchIsShow(search)) {-->
<layui:accessButton function="teacherMergeApplication.query" id="searchFormSearch" action="search"><i class="layui-icon">&#xe615;</i>搜索</layui:accessButton>
<!--# }-->
<layui:accessButton function="teacherMergeApplication.add" action="add">添加</layui:accessButton> <layui:accessButton function="teacherMergeApplication.add" action="add">添加</layui:accessButton>
<layui:accessButton function="teacherMergeApplication.edit" action="edit">修改</layui:accessButton> <layui:accessButton function="teacherMergeApplication.edit" action="edit">修改</layui:accessButton>
<layui:accessButton function="teacherMergeApplication.del" action="del">删除</layui:accessButton> <layui:accessButton function="teacherMergeApplication.del" action="del">删除</layui:accessButton>
<!-- <layui:accessButton function="teacherMergeApplication.query" action="refresh"><i class="layui-icon">&#xe669;</i>刷新</layui:accessButton>--> <!--# if(!isEmpty(search)) {-->
<layui:accessButton function="teacherMergeApplication.query" action="refresh"><i class="layui-icon">&#xe669;</i>刷新</layui:accessButton>
<!--# }-->
</div> </div>
</div> </div>
</script> </script>

Loading…
Cancel
Save