人才培养方案新增下拉框

This commit is contained in:
2026-09-16 09:28:16 +08:00
parent b05c4d33db
commit bbf54c26a3
6 changed files with 84 additions and 9 deletions
@@ -0,0 +1,22 @@
package com.roomroot.jwgl.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.roomroot.jwgl.entity.JXGLJG;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* 教学管理机构 Mapper
*/
@Mapper
public interface JXGLJGMapper extends BaseMapper<JXGLJG> {
/**
* 查询未停用的教学管理机构,供下拉选项使用。
*/
@Select("SELECT \"编号\" AS bh, \"名称\" AS mc FROM \"教学管理机构\" "
+ "WHERE (\"停用\" = 0 OR \"停用\" IS NULL) ORDER BY \"名称\"")
List<JXGLJG> selectEnabledOptions();
}
@@ -1,10 +1,13 @@
package com.roomroot.jwgl.service;
import com.roomroot.jwgl.entity.JXGLJG;
import com.roomroot.jwgl.entity.ZYB;
import com.roomroot.jwgl.unit.PageQuery;
import com.roomroot.jwgl.unit.PageResult;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 培养方案管理服务接口
* <p>
@@ -59,4 +62,9 @@ public interface TrainingProgramService {
/** 导出培养方案(专业)到 Excel(.xlsx) */
void exportZYBExcel(jakarta.servlet.http.HttpServletResponse response) throws Exception;
/**
* 查询未停用的教学管理机构下拉选项。
*/
List<JXGLJG> listTeachingOrganizations();
}
@@ -2,7 +2,9 @@ package com.roomroot.jwgl.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.roomroot.jwgl.entity.JXGLJG;
import com.roomroot.jwgl.entity.ZYB;
import com.roomroot.jwgl.mapper.JXGLJGMapper;
import com.roomroot.jwgl.mapper.ZYBMapper;
import com.roomroot.jwgl.service.TrainingProgramService;
import com.roomroot.jwgl.unit.PageQuery;
@@ -28,6 +30,9 @@ public class TrainingProgramServiceImpl implements TrainingProgramService {
@Resource
private ZYBMapper zybMapper;
@Resource
private JXGLJGMapper jxgljgMapper;
@Override
@Transactional
public void add(ZYB entity) {
@@ -114,4 +119,10 @@ public class TrainingProgramServiceImpl implements TrainingProgramService {
response.getOutputStream().write(bytes);
response.getOutputStream().flush();
}
@Override
public java.util.List<JXGLJG> listTeachingOrganizations() {
java.util.List<JXGLJG> list = jxgljgMapper.selectEnabledOptions();
return list == null ? java.util.Collections.emptyList() : list;
}
}