Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -152,12 +152,21 @@ public class CphSqlServerDataController extends BaseController {
|
||||
return success(list);
|
||||
}
|
||||
|
||||
//同步辅导员
|
||||
// //同步辅导员
|
||||
// @RequestMapping("/synchronousEmployEEInfoList")
|
||||
// public AjaxResult synchronousEmployEEInfoList(){
|
||||
// //startPage();
|
||||
// List<Map> list=sqlServerDataService.getEmployEEInfoList();
|
||||
// iCphTeacherService.sqlserverSynchronousMYSQL(list);//同步辅导员
|
||||
// iCphTeacherService.Usertb();
|
||||
// return success();
|
||||
// }
|
||||
//同步教职工
|
||||
@RequestMapping("/synchronousEmployEEInfoList")
|
||||
public AjaxResult synchronousEmployEEInfoList(){
|
||||
//startPage();
|
||||
List<Map> list=sqlServerDataService.getEmployEEInfoList();
|
||||
iCphTeacherService.sqlserverSynchronousMYSQL(list);//同步辅导员
|
||||
iCphTeacherService.sqlserverSynchronousMYSQL(list);//同步教职工
|
||||
iCphTeacherService.Usertb();
|
||||
return success();
|
||||
}
|
||||
|
||||
@@ -47,11 +47,23 @@ public class TeacherEvaluationStatusController extends BaseController {
|
||||
/**
|
||||
* 导出辅导员综合评价状态列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('comprehensive:teacherEvaluationStatus:export')")
|
||||
// @PreAuthorize("@ss.hasPermi('comprehensive:teacherEvaluationStatus:export')")
|
||||
@Log(title = "辅导员综合评价状态", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, TeacherEvaluationStatus teacherEvaluationStatus) {
|
||||
List<TeacherEvaluationStatus> list = teacherEvaluationStatusService.selectTeacherEvaluationStatusList(teacherEvaluationStatus);
|
||||
for (TeacherEvaluationStatus entity : list){
|
||||
if(entity.getIsCompleted()){
|
||||
entity.setCompleted("是");
|
||||
}else{
|
||||
entity.setCompleted("否");
|
||||
}
|
||||
if(entity.getScoreImported()){
|
||||
entity.setIsScoreImported("是");
|
||||
}else{
|
||||
entity.setIsScoreImported("否");
|
||||
}
|
||||
}
|
||||
ExcelUtil<TeacherEvaluationStatus> util = new ExcelUtil<TeacherEvaluationStatus>(TeacherEvaluationStatus.class);
|
||||
util.exportExcel(response, list, "辅导员综合评价状态数据");
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import lombok.Data;
|
||||
|
||||
/**
|
||||
* 辅导员综合评价状态对象 teacher_evaluation_status
|
||||
*
|
||||
*
|
||||
* @author srs
|
||||
* @date 2024-01-20
|
||||
*/
|
||||
@@ -53,19 +53,26 @@ public class TeacherEvaluationStatus extends BaseEntity {
|
||||
private String stuYearName;
|
||||
|
||||
/** 是否完成综合测评 */
|
||||
@Excel(name = "是否完成综合测评")
|
||||
private Boolean isCompleted;
|
||||
|
||||
/** 是否完成综合测评 */
|
||||
@Excel(name = "是否完成综合测评")
|
||||
private String completed;
|
||||
|
||||
/** 待办事项数量 */
|
||||
@Excel(name = "待办事项数量")
|
||||
@TableField(exist = false)
|
||||
private Integer todoCount;
|
||||
|
||||
/** 成绩是否已导入 */
|
||||
@Excel(name = "成绩是否已导入")
|
||||
@TableField(exist = false)
|
||||
private Boolean scoreImported;
|
||||
|
||||
/** 成绩是否已导入 */
|
||||
@Excel(name = "成绩是否已导入")
|
||||
@TableField(exist = false)
|
||||
private String isScoreImported;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String remarks;
|
||||
@@ -177,4 +184,4 @@ public class TeacherEvaluationStatus extends BaseEntity {
|
||||
public void setLastUpdateTime(String lastUpdateTime) {
|
||||
this.lastUpdateTime = lastUpdateTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -464,106 +464,29 @@ public class CphTeacherServiceImpl implements ICphTeacherService
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void sqlserverSynchronousMYSQL(List<Map> list) {
|
||||
//教职工列表
|
||||
List<QgzxTeacher> qgzxTeachers = qgzxTeacherMapper.selectTeacherList();
|
||||
//查找重复值
|
||||
List<Map> updateMap = list.stream()
|
||||
.filter(obj1 -> qgzxTeachers
|
||||
.stream().anyMatch(obj2 -> {
|
||||
Object xhObj = obj1.get("zgh");
|
||||
if (xhObj != null) {
|
||||
String zgh = xhObj.toString();
|
||||
return obj2.getEmployeeId().equals(zgh);
|
||||
}
|
||||
return false;
|
||||
}))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
//添加需要
|
||||
List<String> kshList2 = qgzxTeachers.stream()
|
||||
.map(QgzxTeacher::getEmployeeId)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
List<Map> insertMap = list.stream()
|
||||
.filter(obj -> {
|
||||
Object xhObj = obj.get("zgh");
|
||||
return xhObj != null && !kshList2.contains(xhObj.toString());
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
//添加
|
||||
List<QgzxTeacher> insertStudentList = new ArrayList<>();
|
||||
for (Map map:insertMap){
|
||||
QgzxTeacher qgzxTeacher = new QgzxTeacher();
|
||||
Object xmObj = map.get("xm");
|
||||
if (xmObj != null) {
|
||||
qgzxTeacher.setName(xmObj.toString());
|
||||
for (Map<String, Object> map : list) {
|
||||
String zgh = (String) map.get("zgh");
|
||||
String xm=(String) map.get("xm");
|
||||
String xb=(String) map.get("xb");
|
||||
String ksh=(String) map.get("ksh");
|
||||
QgzxTeacher qgzxTeacher = qgzxTeacherMapper.selectQgzxTeacherByEmployeeId(zgh);
|
||||
Long deptId = qgzxTeacherMapper.selectDeptCode(ksh);
|
||||
QgzxTeacher entity=new QgzxTeacher();
|
||||
entity.setEmployeeId(zgh);
|
||||
entity.setName(xm);
|
||||
entity.setGender(xb);
|
||||
if(deptId!=null) {
|
||||
entity.setDeptId(deptId);
|
||||
}
|
||||
Object xbObj = map.get("xb");
|
||||
if (xbObj != null) {
|
||||
String s = xbObj.toString();
|
||||
if (!Objects.equals(s, "NULL") && !Objects.equals(s, "null")&&!Objects.equals(s," ")) {
|
||||
qgzxTeacher.setGender(xbObj.toString());
|
||||
}
|
||||
entity.setStatus("1");
|
||||
entity.setCreateTime(DateUtils.getNowDate());
|
||||
if(qgzxTeacher==null){
|
||||
qgzxTeacherMapper.insertQgzxTeacher(entity);
|
||||
}else{
|
||||
entity.setEmployeeId(zgh);
|
||||
qgzxTeacherMapper.updateQgzxTeacherNew(entity);
|
||||
}
|
||||
Object zghObj = map.get("zgh");
|
||||
if (zghObj != null) {
|
||||
qgzxTeacher.setEmployeeId(zghObj.toString());
|
||||
}
|
||||
//学院id
|
||||
Object yxdmObj = map.get("yxdm");
|
||||
if (yxdmObj!=null) {
|
||||
Long deptId = qgzxTeacherMapper.selectDeptCode(yxdmObj.toString());
|
||||
if (deptId != null) {
|
||||
qgzxTeacher.setDeptId(deptId);
|
||||
}
|
||||
}
|
||||
qgzxTeacher.setStatus("1");
|
||||
qgzxTeacher.setCreateTime(DateUtils.getNowDate());
|
||||
insertStudentList.add(qgzxTeacher);
|
||||
}
|
||||
if (insertStudentList.size()!=0) {
|
||||
qgzxTeacherMapper.insertBatchSomeColumn(insertStudentList);
|
||||
}
|
||||
//修改
|
||||
List<QgzxTeacher> updateSrsStudent = new ArrayList<>();
|
||||
for (Map map:updateMap){
|
||||
QgzxTeacher qgzxTeacher = new QgzxTeacher();
|
||||
Object xmObj = map.get("xm");
|
||||
if (xmObj != null) {
|
||||
qgzxTeacher.setName(xmObj.toString());
|
||||
}
|
||||
Object xbObj = map.get("xb");
|
||||
if (xbObj != null) {
|
||||
String s = xbObj.toString();
|
||||
if (!Objects.equals(s, "NULL") && !Objects.equals(s, "null")&&!Objects.equals(s," ")) {
|
||||
qgzxTeacher.setGender(xbObj.toString());
|
||||
}
|
||||
}
|
||||
Object zghObj = map.get("zgh");
|
||||
if (zghObj != null) {
|
||||
qgzxTeacher.setEmployeeId(zghObj.toString());
|
||||
}
|
||||
//学院id
|
||||
Object yxdmObj = map.get("yxdm");
|
||||
if (yxdmObj!=null) {
|
||||
Long ksh = qgzxTeacherMapper.selectDeptCode(yxdmObj.toString());
|
||||
if (ksh != null) {
|
||||
qgzxTeacher.setDeptId(ksh);
|
||||
}
|
||||
}
|
||||
qgzxTeacher.setUpdateTime(DateUtils.getNowDate());
|
||||
updateSrsStudent.add(qgzxTeacher);
|
||||
}
|
||||
/*if (updateSrsStudent.size()!=0) {
|
||||
List<List<CphTeacher>> lists = ListSliceUtil.updateSlice(updateSrsStudent);
|
||||
if (lists != null) {
|
||||
for (List<CphTeacher> studentList : lists) {
|
||||
cphTeacherMapper.updateSrsClassList(studentList);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -27,9 +27,9 @@ public class RegTask {
|
||||
srsStuCheck.setIsCheck(m.getIsCheck());
|
||||
srsStuCheck.setKsh(m.getKsh());
|
||||
srsStuCheck.setCheckTime(m.getCheckTime());
|
||||
UpdateWrapper<SrsStuCheck> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.eq("ksh",m.getKsh());
|
||||
checkService.update(srsStuCheck,updateWrapper);
|
||||
// UpdateWrapper<SrsStuCheck> updateWrapper = new UpdateWrapper<>();
|
||||
// updateWrapper.eq("ksh",m.getKsh());
|
||||
checkService.saveOrUpdate(srsStuCheck);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -77,11 +77,11 @@
|
||||
<if test="ZZMM != null and ZZMM != ''">and a.ZZMM = #{ZZMM}</if>
|
||||
<if test="MZ != null and MZ != ''">and a.MZ = #{MZ}</if>
|
||||
<if test="XH != null and XH != ''">and a.XH = #{XH}</if>
|
||||
<if test="XY != null and XY != ''">and a.XY = #{XY}</if>
|
||||
<if test="XY != null and XY != ''">and a.XY like concat('%', #{XY}, '%')</if>
|
||||
<if test="XYDM != null and XYDM != ''">and a.XYDM = #{XYDM}</if>
|
||||
<if test="ZY != null and ZY != ''">and a.ZY = #{ZY}</if>
|
||||
<if test="ZYDM != null and ZYDM != ''">and a.ZYDM = #{ZYDM}</if>
|
||||
<if test="BJ != null and BJ != ''">and a.BJ = #{BJ}</if>
|
||||
<if test="BJ != null and BJ != ''">and a.BJ like concat('%',#{BJ}, '%')</if>
|
||||
<if test="BJDM != null and BJDM != ''">and a.BJDM = #{BJDM}</if>
|
||||
<if test="lastSchool != null and lastSchool != ''">and a.last_school = #{lastSchool}</if>
|
||||
<if test="lastSchoolAddr != null and lastSchoolAddr != ''">and a.last_school_addr = #{lastSchoolAddr}</if>
|
||||
@@ -650,7 +650,7 @@
|
||||
select a.*,b.class_name,f.major_name,g.dept_name,
|
||||
case e.room_no is NULL
|
||||
when true then "无"
|
||||
else concat(e.park_name,' ',e.building_name,' ',e.room_no) end as dorm
|
||||
else concat(e.park_name,' ',e.building_name,' ',e.room_no) end as dorm,a.is_smoke,a.is_early,a.hobby
|
||||
from srs_stu_reg as a
|
||||
left join srs_class as b on a.BJDM = b.class_code
|
||||
left join cph_teacher as c on b.teacher_id = c.teacher_id
|
||||
|
||||
@@ -20,6 +20,7 @@ public interface QgzxTeacherMapper extends BaseMapper<QgzxTeacher> {
|
||||
* @return 教职工信息
|
||||
*/
|
||||
public QgzxTeacher selectQgzxTeacherByTeacherId(Long teacherId);
|
||||
public QgzxTeacher selectQgzxTeacherByEmployeeId(String employeeId);
|
||||
|
||||
/**
|
||||
* 查询教职工信息列表
|
||||
@@ -44,6 +45,7 @@ public interface QgzxTeacherMapper extends BaseMapper<QgzxTeacher> {
|
||||
* @return 结果
|
||||
*/
|
||||
int updateQgzxTeacher(QgzxTeacher qgzxTeacher);
|
||||
int updateQgzxTeacherNew(QgzxTeacher qgzxTeacher);
|
||||
|
||||
/**
|
||||
* 删除教职工信息
|
||||
|
||||
@@ -47,6 +47,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
from sys_dept as a
|
||||
where dept_code = #{ksh}
|
||||
</select>
|
||||
<select id="selectQgzxTeacherByEmployeeId" parameterType="String" resultMap="QgzxTeacherResult">
|
||||
<include refid="selectQgzxTeacherVo"/>
|
||||
where employee_id = #{employeeId}
|
||||
</select>
|
||||
<insert id="insertQgzxTeacher" parameterType="QgzxTeacher" useGeneratedKeys="true" keyProperty="teacherId">
|
||||
insert into qgzx_teacher
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
@@ -104,6 +108,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where teacher_id = #{teacherId}
|
||||
</update>
|
||||
|
||||
<update id="updateQgzxTeacherNew" parameterType="QgzxTeacher">
|
||||
update qgzx_teacher
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="gender != null and gender != ''">gender = #{gender},</if>
|
||||
age = #{age},
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
phone_number = #{phoneNumber},
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where employee_id = #{employeeId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteQgzxTeacherByTeacherId" parameterType="Long">
|
||||
delete from qgzx_teacher where teacher_id = #{teacherId}
|
||||
</delete>
|
||||
|
||||
Reference in New Issue
Block a user