专业 学院同步

This commit is contained in:
zhy
2025-09-10 17:28:37 +08:00
parent 653bb3b0f7
commit 0fa1bca0b5
3 changed files with 11 additions and 2 deletions

View File

@@ -81,4 +81,6 @@ public interface SrsMajorsMapper extends EasyBaseMapper<SrsMajors>
void updateSrsStudentList(@Param("studentList") List<SrsMajors> studentList);
Long selectXYID(String xydm);
Long selectOldDeptIdByDeptName(String deptName);
}

View File

@@ -208,9 +208,9 @@ public class SrsMajorsServiceImpl implements ISrsMajorsService
// srsMajors1.setCollegeId(0L);//学院id/科室号
// }
// }
if (map.get("yxdm")!=null) {
if (map.get("yxmc")!=null) {
//使用代码查询学院id
Long yxdm = srsMajorsMapper.selectXYID(map.get("yxdm").toString());
Long yxdm = srsMajorsMapper.selectOldDeptIdByDeptName(map.get("yxmc").toString());
if (yxdm!=null) {
srsMajors1.setCollegeId(yxdm);//学院id
}else {

View File

@@ -169,4 +169,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{majorId}
</foreach>
</delete>
<select id="selectOldDeptIdByDeptName" resultType="Long">
select b.dept_id
from sys_dept_map as a
left join sys_dept as b on a.old_dept_id = b.dept_id
where b.dept_name = #{deptName}
</select>
</mapper>