Commit 07b43e4a by xuwenhao

1.17修改

parent 6eebec73
......@@ -117,6 +117,9 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
.antMatchers( "/common/**").permitAll()
.antMatchers( "/dd/school/**").permitAll()
//上传文件至钉盘接口放行
.antMatchers( "/wx/jsapi/**").permitAll()
.antMatchers( "/teacher/basiclnformation/**","/aworkload/**","/wx/course/**","/assessment/**","/achievement/**","/school/award/**").permitAll()
//打印下载接口放行
......
......@@ -14,14 +14,18 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.campus.domain.fudao.FudaoStudent;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolGkAchievementVo;
import yangtz.cs.liu.campus.service.fudao.FudaoStudentService;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.ISchoolXteachingAchievementsService;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.SchoolTeacherBasichlnformationService;
import yangtz.cs.liu.campus.vo.fudao.FudaoStudentVo;
import yangtz.cs.liu.campus.vo.fudao.FudaoTeacherVo;
import yangtz.cs.liu.campus.vo.schoolNewTeacherDzdn.SchoolXteacherAwardsVo;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
@RestController
......@@ -34,6 +38,8 @@ public class FudaoStudentController extends BaseController {
private ISchoolXteachingAchievementsService schoolXteachingAchievementsService;
@Autowired
private ISysDeptService sysDeptService;
@Autowired
private SchoolTeacherBasichlnformationService basichlnformationService;
//查询辅导学生获奖列表
......@@ -55,30 +61,51 @@ public class FudaoStudentController extends BaseController {
});
return getDataTable(list);
}
for (SysRole role : roles) {
if (role.getRoleKey().equals("jsdzdncj_admin") || role.getRoleKey().equals("fdxshj_admin")){
startPage();
List<FudaoStudentVo> list = fudaoStudentService.querylist(fudaoStudentVo);
list.forEach(list1 -> {
list1.setGrowthType("学生获奖");
});
return getDataTable(list);
}else if (role.getRoleKey().equals("jsdnzj_admin")){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
//根据用户部门id查询用户部门信息
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//查询本部门下所有教师的id
List<Long> deptUserIds = schoolXteachingAchievementsService.getUserIdsByDeptId(sysDept.getDeptId());
if (deptUserIds.size() > 0){
fudaoStudentVo.setUserids(deptUserIds);
}
startPage();
List<FudaoStudentVo> list = fudaoStudentService.querylist(fudaoStudentVo);
list.forEach(list1 -> {
list1.setGrowthType("学生获奖");
});
return getDataTable(list);
//全部权限
List<SysRole> roleList = roles.stream().filter(role -> role.getRoleKey().equals("jsdzdncj_admin") || role.getRoleKey().equals("fdxshj_admin")).collect(Collectors.toList());
if (roleList.size() > 0){
startPage();
List<FudaoStudentVo> list = fudaoStudentService.querylist(fudaoStudentVo);
list.forEach(list1 -> {
list1.setGrowthType("学生获奖");
});
return getDataTable(list);
}
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
//查询是否包含学科组长角色
List<SysRole> roleList2 = roles.stream().filter(role -> role.getRoleKey().equals("sub_leader")).collect(Collectors.toList());
if (roleList1.size() > 0){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
//根据用户部门id查询用户部门信息
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//查询本部门下所有教师的id
List<Long> deptUserIds = schoolXteachingAchievementsService.getUserIdsByDeptId(sysDept.getDeptId());
if (deptUserIds.size() > 0){
fudaoStudentVo.setUserids(deptUserIds);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
fudaoStudentVo.setSub1(sub);
}
startPage();
List<FudaoStudentVo> list = fudaoStudentService.querylist(fudaoStudentVo);
list.forEach(list1 -> {
list1.setGrowthType("学生获奖");
});
return getDataTable(list);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
fudaoStudentVo.setSub1(sub);
startPage();
List<FudaoStudentVo> list = fudaoStudentService.querylist(fudaoStudentVo);
list.forEach(list1 -> {
list1.setGrowthType("学生获奖");
});
return getDataTable(list);
}
return getDataTable(new ArrayList<>());
}
......@@ -156,9 +183,10 @@ public class FudaoStudentController extends BaseController {
}
ExcelUtil<FudaoStudentVo> util = new ExcelUtil<FudaoStudentVo>(FudaoStudentVo.class);
util.exportExcel(response, list, "辅导学生获奖");
}
for (SysRole role : roles) {
if (role.getRoleKey().equals("jsdzdncj_admin") || role.getRoleKey().equals("fdxshj_admin")){
}else {
//全部权限
List<SysRole> roleList = roles.stream().filter(role -> role.getRoleKey().equals("jsdzdncj_admin") || role.getRoleKey().equals("fdxshj_admin")).collect(Collectors.toList());
if (roleList.size() > 0){
List<FudaoStudentVo> list = fudaoStudentService.querylist(fudaoStudentVo);
for (FudaoStudentVo studentVo : list) {
i++;
......@@ -167,27 +195,53 @@ public class FudaoStudentController extends BaseController {
}
ExcelUtil<FudaoStudentVo> util = new ExcelUtil<FudaoStudentVo>(FudaoStudentVo.class);
util.exportExcel(response, list, "辅导学生获奖");
}else if (role.getRoleKey().equals("jsdnzj_admin")){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
//根据用户部门id查询用户部门信息
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//查询本部门下所有教师的id
List<Long> deptUserIds = schoolXteachingAchievementsService.getUserIdsByDeptId(sysDept.getDeptId());
if (deptUserIds.size() > 0){
fudaoStudentVo.setUserids(deptUserIds);
}else {
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
//查询是否包含学科组长角色
List<SysRole> roleList2 = roles.stream().filter(role -> role.getRoleKey().equals("sub_leader")).collect(Collectors.toList());
if (roleList1.size() > 0){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
//根据用户部门id查询用户部门信息
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//查询本部门下所有教师的id
List<Long> deptUserIds = schoolXteachingAchievementsService.getUserIdsByDeptId(sysDept.getDeptId());
if (deptUserIds.size() > 0){
fudaoStudentVo.setUserids(deptUserIds);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
fudaoStudentVo.setSub1(sub);
}
List<FudaoStudentVo> list = fudaoStudentService.querylist(fudaoStudentVo);
for (FudaoStudentVo studentVo : list) {
i++;
studentVo.setXh(i);
studentVo.setGrowthType("学生获奖");
}
ExcelUtil<FudaoStudentVo> util = new ExcelUtil<FudaoStudentVo>(FudaoStudentVo.class);
util.exportExcel(response, list, "辅导学生获奖");
}else {
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
fudaoStudentVo.setSub1(sub);
List<FudaoStudentVo> list = fudaoStudentService.querylist(fudaoStudentVo);
for (FudaoStudentVo studentVo : list) {
i++;
studentVo.setXh(i);
studentVo.setGrowthType("学生获奖");
}
ExcelUtil<FudaoStudentVo> util = new ExcelUtil<FudaoStudentVo>(FudaoStudentVo.class);
util.exportExcel(response, list, "辅导学生获奖");
}else {
ExcelUtil<FudaoStudentVo> util = new ExcelUtil<FudaoStudentVo>(FudaoStudentVo.class);
util.exportExcel(response, new ArrayList<>(), "辅导学生获奖");
}
}
List<FudaoStudentVo> list = fudaoStudentService.querylist(fudaoStudentVo);
for (FudaoStudentVo studentVo : list) {
i++;
studentVo.setXh(i);
studentVo.setGrowthType("学生获奖");
}
ExcelUtil<FudaoStudentVo> util = new ExcelUtil<FudaoStudentVo>(FudaoStudentVo.class);
util.exportExcel(response, list, "辅导学生获奖");
}
}
ExcelUtil<FudaoStudentVo> util = new ExcelUtil<FudaoStudentVo>(FudaoStudentVo.class);
util.exportExcel(response, new ArrayList<>(), "辅导学生获奖");
}
//导出(个人)
......
......@@ -16,12 +16,14 @@ import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.campus.domain.fudao.FudaoTeacher;
import yangtz.cs.liu.campus.service.fudao.FudaoTeacherService;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.ISchoolXteachingAchievementsService;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.SchoolTeacherBasichlnformationService;
import yangtz.cs.liu.campus.vo.fudao.FudaoStudentVo;
import yangtz.cs.liu.campus.vo.fudao.FudaoTeacherVo;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
@RestController
@RequestMapping("/school/fudaot")
......@@ -33,6 +35,8 @@ public class FudaoTeacherController extends BaseController {
private ISchoolXteachingAchievementsService schoolXteachingAchievementsService;
@Autowired
private ISysDeptService sysDeptService;
@Autowired
private SchoolTeacherBasichlnformationService basichlnformationService;
//查询辅导教师获奖列表
......@@ -53,30 +57,53 @@ public class FudaoTeacherController extends BaseController {
});
return getDataTable(list);
}
for (SysRole role : roles) {
if (role.getRoleKey().equals("jsdzdncj_admin") || role.getRoleKey().equals("fdjshj_admin")){
startPage();
List<FudaoTeacherVo> list = fudaoTeacherService.querylist(fudaoTeacherVo);
list.forEach(list1 -> {
list1.setGrowthType("教师获奖");
});
return getDataTable(list);
} else if (role.getRoleKey().equals("jsdnzj_admin")){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
//根据用户部门id查询用户部门信息
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//查询本部门下所有教师的id
List<Long> deptUserIds = schoolXteachingAchievementsService.getUserIdsByDeptId(sysDept.getDeptId());
if (deptUserIds.size() > 0){
fudaoTeacherVo.setUserids(deptUserIds);
}
startPage();
List<FudaoTeacherVo> list = fudaoTeacherService.querylist(fudaoTeacherVo);
list.forEach(list1 -> {
list1.setGrowthType("教师获奖");
});
return getDataTable(list);
//全部权限
List<SysRole> roleList = roles.stream().filter(role -> role.getRoleKey().equals("jsdzdncj_admin") || role.getRoleKey().equals("fdjshj_admin")).collect(Collectors.toList());
if (roleList.size() > 0){
startPage();
List<FudaoTeacherVo> list = fudaoTeacherService.querylist(fudaoTeacherVo);
list.forEach(list1 -> {
list1.setGrowthType("教师获奖");
});
return getDataTable(list);
}
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
//查询是否包含学科组长角色
List<SysRole> roleList2 = roles.stream().filter(role -> role.getRoleKey().equals("sub_leader")).collect(Collectors.toList());
if (roleList1.size() > 0){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
//根据用户部门id查询用户部门信息
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//查询本部门下所有教师的id
List<Long> deptUserIds = schoolXteachingAchievementsService.getUserIdsByDeptId(sysDept.getDeptId());
if (deptUserIds.size() > 0){
fudaoTeacherVo.setUserids(deptUserIds);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
fudaoTeacherVo.setSub1(sub);
}
startPage();
List<FudaoTeacherVo> list = fudaoTeacherService.querylist(fudaoTeacherVo);
list.forEach(list1 -> {
list1.setGrowthType("教师获奖");
});
return getDataTable(list);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
fudaoTeacherVo.setSub1(sub);
startPage();
List<FudaoTeacherVo> list = fudaoTeacherService.querylist(fudaoTeacherVo);
list.forEach(list1 -> {
list1.setGrowthType("教师获奖");
});
return getDataTable(list);
}
return getDataTable(new ArrayList<>());
}
......@@ -154,9 +181,10 @@ public class FudaoTeacherController extends BaseController {
}
ExcelUtil<FudaoTeacherVo> util = new ExcelUtil<FudaoTeacherVo>(FudaoTeacherVo.class);
util.exportExcel(response, list, "辅导教师获奖");
}
for (SysRole role : roles) {
if (role.getRoleKey().equals("jsdzdncj_admin") || role.getRoleKey().equals("fdjshj_admin")){
}else {
//全部权限
List<SysRole> roleList = roles.stream().filter(role -> role.getRoleKey().equals("jsdzdncj_admin") || role.getRoleKey().equals("fdjshj_admin")).collect(Collectors.toList());
if (roleList.size() > 0){
List<FudaoTeacherVo> list = fudaoTeacherService.querylist(fudaoTeacherVo);
for (FudaoTeacherVo teacherVo : list) {
i ++;
......@@ -165,27 +193,53 @@ public class FudaoTeacherController extends BaseController {
}
ExcelUtil<FudaoTeacherVo> util = new ExcelUtil<FudaoTeacherVo>(FudaoTeacherVo.class);
util.exportExcel(response, list, "辅导教师获奖");
}else if (role.getRoleKey().equals("jsdnzj_admin")){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
//根据用户部门id查询用户部门信息
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//查询本部门下所有教师的id
List<Long> deptUserIds = schoolXteachingAchievementsService.getUserIdsByDeptId(sysDept.getDeptId());
if (deptUserIds.size() > 0){
fudaoTeacherVo.setUserids(deptUserIds);
}else {
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
//查询是否包含学科组长角色
List<SysRole> roleList2 = roles.stream().filter(role -> role.getRoleKey().equals("sub_leader")).collect(Collectors.toList());
if (roleList1.size() > 0){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
//根据用户部门id查询用户部门信息
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//查询本部门下所有教师的id
List<Long> deptUserIds = schoolXteachingAchievementsService.getUserIdsByDeptId(sysDept.getDeptId());
if (deptUserIds.size() > 0){
fudaoTeacherVo.setUserids(deptUserIds);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
fudaoTeacherVo.setSub1(sub);
}
List<FudaoTeacherVo> list = fudaoTeacherService.querylist(fudaoTeacherVo);
for (FudaoTeacherVo teacherVo : list) {
i ++;
teacherVo.setXh(i);
teacherVo.setGrowthType("辅导教师获奖");
}
ExcelUtil<FudaoTeacherVo> util = new ExcelUtil<FudaoTeacherVo>(FudaoTeacherVo.class);
util.exportExcel(response, list, "辅导教师获奖");
}else {
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
fudaoTeacherVo.setSub1(sub);
List<FudaoTeacherVo> list = fudaoTeacherService.querylist(fudaoTeacherVo);
for (FudaoTeacherVo teacherVo : list) {
i ++;
teacherVo.setXh(i);
teacherVo.setGrowthType("辅导教师获奖");
}
ExcelUtil<FudaoTeacherVo> util = new ExcelUtil<FudaoTeacherVo>(FudaoTeacherVo.class);
util.exportExcel(response, list, "辅导教师获奖");
}else {
ExcelUtil<FudaoTeacherVo> util = new ExcelUtil<FudaoTeacherVo>(FudaoTeacherVo.class);
util.exportExcel(response, new ArrayList<>(), "辅导教师获奖");
}
}
List<FudaoTeacherVo> list = fudaoTeacherService.querylist(fudaoTeacherVo);
for (FudaoTeacherVo teacherVo : list) {
i ++;
teacherVo.setXh(i);
teacherVo.setGrowthType("辅导教师获奖");
}
ExcelUtil<FudaoTeacherVo> util = new ExcelUtil<FudaoTeacherVo>(FudaoTeacherVo.class);
util.exportExcel(response, list, "辅导教师获奖");
}
}
ExcelUtil<FudaoTeacherVo> util = new ExcelUtil<FudaoTeacherVo>(FudaoTeacherVo.class);
util.exportExcel(response, new ArrayList<>(), "辅导教师获奖");
}
//导出(个人)
......
......@@ -165,9 +165,10 @@ public class SchoolAnnualAssessmentController extends BaseController {
}
ExcelUtil<SchoolAnnualAssessmentVo> util = new ExcelUtil<SchoolAnnualAssessmentVo>(SchoolAnnualAssessmentVo.class);
util.exportExcel(response, exportList, "年度考核数据");
}else{
ExcelUtil<SchoolAnnualAssessmentVo> util = new ExcelUtil<SchoolAnnualAssessmentVo>(SchoolAnnualAssessmentVo.class);
util.exportExcel(response, new ArrayList<>(), "年度考核数据");
}
ExcelUtil<SchoolAnnualAssessmentVo> util = new ExcelUtil<SchoolAnnualAssessmentVo>(SchoolAnnualAssessmentVo.class);
util.exportExcel(response, new ArrayList<>(), "年度考核数据");
}
/*
......
......@@ -81,6 +81,8 @@ public class SchoolAclassTeacherAssessmentController extends BaseController
}
//本部门权限
List<SysRole> rolesList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
//查询是否包含学科组长角色
List<SysRole> roleList2 = roles.stream().filter(role -> role.getRoleKey().equals("sub_leader")).collect(Collectors.toList());
if (rolesList1.size() > 0){
//教师电子档案中级管理员只能看本部门及以下的数据
//获取当前登陆人的部门信息
......@@ -92,6 +94,19 @@ public class SchoolAclassTeacherAssessmentController extends BaseController
if (userIdCards.size() > 0){
req.setIdCards(userIdCards);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
req.setSub1(sub);
}
startPage();
List<SchoolAclassTeacherAssessmentVo> list = schoolAclassTeacherAssessmentService.selectSchoolAclassTeacherAssessmentList(req);
return getDataTable(list);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
req.setSub1(sub);
startPage();
List<SchoolAclassTeacherAssessmentVo> list = schoolAclassTeacherAssessmentService.selectSchoolAclassTeacherAssessmentList(req);
return getDataTable(list);
......@@ -220,32 +235,55 @@ public class SchoolAclassTeacherAssessmentController extends BaseController
}
ExcelUtil<SchoolAclassTeacherAssessmentExport> util = new ExcelUtil<>(SchoolAclassTeacherAssessmentExport.class);
util.exportExcel(response, list, "老师考核");
}
//本部门权限
List<SysRole> rolesList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
if (rolesList1.size() > 0){
//教师电子档案中级管理员只能看本部门及以下的数据
//获取当前登陆人的部门信息
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//获取当前登陆人部门下所有人的手机号
List<String> userPhones = schoolXteachingAchievementsService.getUserPhonesByDeptId(sysDept.getDeptId());
//根据用户手机号查询用户身份证信息
List<String> userIdCards = basichlnformationService.selectIdCardsByDdPhone(userPhones);
if (userIdCards.size() > 0){
req.setIdCards(userIdCards);
}
List<SchoolAclassTeacherAssessment> schoolAclassTeacherAssessmentVos = schoolAclassTeacherAssessmentService.selectSchoolList(req);
List<SchoolAclassTeacherAssessmentExport> list = new ArrayList<>();
for (SchoolAclassTeacherAssessment schoolAclassTeacherAssessmentVo : schoolAclassTeacherAssessmentVos) {
SchoolAclassTeacherAssessmentExport schoolAclassTeacherAssessmentExport = new SchoolAclassTeacherAssessmentExport();
BeanUtils.copyProperties(schoolAclassTeacherAssessmentVo,schoolAclassTeacherAssessmentExport);
list.add(schoolAclassTeacherAssessmentExport);
}
ExcelUtil<SchoolAclassTeacherAssessmentExport> util = new ExcelUtil<>(SchoolAclassTeacherAssessmentExport.class);
util.exportExcel(response, list, "老师考核");
}else {
ExcelUtil<SchoolAclassTeacherAssessmentExport> util = new ExcelUtil<>(SchoolAclassTeacherAssessmentExport.class);
util.exportExcel(response, new ArrayList<>(), "老师考核");
//本部门权限
List<SysRole> rolesList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
//查询是否包含学科组长角色
List<SysRole> roleList2 = roles.stream().filter(role -> role.getRoleKey().equals("sub_leader")).collect(Collectors.toList());
if (rolesList1.size() > 0){
//教师电子档案中级管理员只能看本部门及以下的数据
//获取当前登陆人的部门信息
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//获取当前登陆人部门下所有人的手机号
List<String> userPhones = schoolXteachingAchievementsService.getUserPhonesByDeptId(sysDept.getDeptId());
//根据用户手机号查询用户身份证信息
List<String> userIdCards = basichlnformationService.selectIdCardsByDdPhone(userPhones);
if (userIdCards.size() > 0){
req.setIdCards(userIdCards);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
req.setSub1(sub);
}
List<SchoolAclassTeacherAssessment> schoolAclassTeacherAssessmentVos = schoolAclassTeacherAssessmentService.selectSchoolList(req);
List<SchoolAclassTeacherAssessmentExport> list = new ArrayList<>();
for (SchoolAclassTeacherAssessment schoolAclassTeacherAssessmentVo : schoolAclassTeacherAssessmentVos) {
SchoolAclassTeacherAssessmentExport schoolAclassTeacherAssessmentExport = new SchoolAclassTeacherAssessmentExport();
BeanUtils.copyProperties(schoolAclassTeacherAssessmentVo,schoolAclassTeacherAssessmentExport);
list.add(schoolAclassTeacherAssessmentExport);
}
ExcelUtil<SchoolAclassTeacherAssessmentExport> util = new ExcelUtil<>(SchoolAclassTeacherAssessmentExport.class);
util.exportExcel(response, list, "老师考核");
}else{
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
req.setSub1(sub);
List<SchoolAclassTeacherAssessment> schoolAclassTeacherAssessmentVos = schoolAclassTeacherAssessmentService.selectSchoolList(req);
List<SchoolAclassTeacherAssessmentExport> list = new ArrayList<>();
for (SchoolAclassTeacherAssessment schoolAclassTeacherAssessmentVo : schoolAclassTeacherAssessmentVos) {
SchoolAclassTeacherAssessmentExport schoolAclassTeacherAssessmentExport = new SchoolAclassTeacherAssessmentExport();
BeanUtils.copyProperties(schoolAclassTeacherAssessmentVo,schoolAclassTeacherAssessmentExport);
list.add(schoolAclassTeacherAssessmentExport);
}
ExcelUtil<SchoolAclassTeacherAssessmentExport> util = new ExcelUtil<>(SchoolAclassTeacherAssessmentExport.class);
util.exportExcel(response, list, "老师考核");
}else {
ExcelUtil<SchoolAclassTeacherAssessmentExport> util = new ExcelUtil<>(SchoolAclassTeacherAssessmentExport.class);
util.exportExcel(response, new ArrayList<>(), "老师考核");
}
}
}
}
}
......
......@@ -80,6 +80,8 @@ public class SchoolAworkloadController extends BaseController
}
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
//查询是否包含学科组长角色
List<SysRole> roleList2 = roles.stream().filter(role -> role.getRoleKey().equals("sub_leader")).collect(Collectors.toList());
if (roleList1.size() > 0){
//教师电子档案中级管理员只能看本部门及以下的数据
//获取当前登陆人的部门信息
......@@ -91,6 +93,11 @@ public class SchoolAworkloadController extends BaseController
if (userIdCards.size() > 0){
schoolAworkloadVo.setIdCards(userIdCards);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolAworkloadVo.setSub1(sub);
}
startPage();
List<SchoolAworkloadVo> list = schoolAworkloadService.selectSchoolAworkloadList(schoolAworkloadVo);
return getDataTable(list);
......@@ -220,32 +227,55 @@ public class SchoolAworkloadController extends BaseController
}
ExcelUtil<SchoolAworkloadDc> util = new ExcelUtil<>(SchoolAworkloadDc.class);
util.exportExcel(response, list, "工作量内容");
}
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
if (roleList1.size() > 0){
//教师电子档案中级管理员只能看本部门及以下的数据
//获取当前登陆人的部门信息
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//获取当前登陆人部门下所有人的手机号
List<String> userPhones = schoolXteachingAchievementsService.getUserPhonesByDeptId(sysDept.getDeptId());
//根据用户手机号查询用户身份证信息
List<String> userIdCards = basichlnformationService.selectIdCardsByDdPhone(userPhones);
if (userIdCards.size() > 0){
schoolAworkloadVo.setIdCards(userIdCards);
}
List<SchoolAworkloadExport> schoolAworkloadVos = schoolAworkloadService.selectAworkloadList(schoolAworkloadVo);
List<SchoolAworkloadDc> list = new ArrayList<>();
for (SchoolAworkloadExport aworkloadVo : schoolAworkloadVos) {
SchoolAworkloadDc schoolAworkloadDc = new SchoolAworkloadDc();
BeanUtils.copyProperties(aworkloadVo,schoolAworkloadDc);
list.add(schoolAworkloadDc);
}
ExcelUtil<SchoolAworkloadDc> util = new ExcelUtil<>(SchoolAworkloadDc.class);
util.exportExcel(response, list, "工作量内容");
}else {
ExcelUtil<SchoolAworkloadDc> util = new ExcelUtil<>(SchoolAworkloadDc.class);
util.exportExcel(response, new ArrayList<>(), "工作量内容");
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
//查询是否包含学科组长角色
List<SysRole> roleList2 = roles.stream().filter(role -> role.getRoleKey().equals("sub_leader")).collect(Collectors.toList());
if (roleList1.size() > 0){
//教师电子档案中级管理员只能看本部门及以下的数据
//获取当前登陆人的部门信息
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//获取当前登陆人部门下所有人的手机号
List<String> userPhones = schoolXteachingAchievementsService.getUserPhonesByDeptId(sysDept.getDeptId());
//根据用户手机号查询用户身份证信息
List<String> userIdCards = basichlnformationService.selectIdCardsByDdPhone(userPhones);
if (userIdCards.size() > 0){
schoolAworkloadVo.setIdCards(userIdCards);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolAworkloadVo.setSub1(sub);
}
List<SchoolAworkloadExport> schoolAworkloadVos = schoolAworkloadService.selectAworkloadList(schoolAworkloadVo);
List<SchoolAworkloadDc> list = new ArrayList<>();
for (SchoolAworkloadExport aworkloadVo : schoolAworkloadVos) {
SchoolAworkloadDc schoolAworkloadDc = new SchoolAworkloadDc();
BeanUtils.copyProperties(aworkloadVo,schoolAworkloadDc);
list.add(schoolAworkloadDc);
}
ExcelUtil<SchoolAworkloadDc> util = new ExcelUtil<>(SchoolAworkloadDc.class);
util.exportExcel(response, list, "工作量内容");
}else {
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolAworkloadVo.setSub1(sub);
List<SchoolAworkloadExport> schoolAworkloadVos = schoolAworkloadService.selectAworkloadList(schoolAworkloadVo);
List<SchoolAworkloadDc> list = new ArrayList<>();
for (SchoolAworkloadExport aworkloadVo : schoolAworkloadVos) {
SchoolAworkloadDc schoolAworkloadDc = new SchoolAworkloadDc();
BeanUtils.copyProperties(aworkloadVo,schoolAworkloadDc);
list.add(schoolAworkloadDc);
}
ExcelUtil<SchoolAworkloadDc> util = new ExcelUtil<>(SchoolAworkloadDc.class);
util.exportExcel(response, list, "工作量内容");
}else {
ExcelUtil<SchoolAworkloadDc> util = new ExcelUtil<>(SchoolAworkloadDc.class);
util.exportExcel(response, new ArrayList<>(), "工作量内容");
}
}
}
}
}
......
......@@ -31,6 +31,7 @@ import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolGkAchievement;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolGkAchievementVo;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.ISchoolGkAchievementService;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.ISchoolXteachingAchievementsService;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.SchoolTeacherBasichlnformationService;
import yangtz.cs.liu.campus.vo.schoolNewTeacherDzdn.SchoolXcomprehensiveHonorsVo;
/**
......@@ -49,6 +50,8 @@ public class SchoolGkAchievementController extends BaseController
private ISchoolXteachingAchievementsService schoolXteachingAchievementsService;
@Autowired
private ISysDeptService sysDeptService;
@Autowired
private SchoolTeacherBasichlnformationService basichlnformationService;
/**
* 查询高考成绩列表
......@@ -75,6 +78,8 @@ public class SchoolGkAchievementController extends BaseController
}
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
//查询是否包含学科组长角色
List<SysRole> roleList2 = roles.stream().filter(role -> role.getRoleKey().equals("sub_leader")).collect(Collectors.toList());
if (roleList1.size() > 0){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
//根据用户部门id查询用户部门信息
......@@ -84,6 +89,19 @@ public class SchoolGkAchievementController extends BaseController
if (deptUserIds.size() > 0){
schoolGkAchievementVo.setUserIds(deptUserIds);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolGkAchievementVo.setSub1(sub);
}
startPage();
List<SchoolGkAchievementVo> list = schoolGkAchievementService.selectSchoolGkAchievementVoList(schoolGkAchievementVo);
return getDataTable(list);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolGkAchievementVo.setSub1(sub);
startPage();
List<SchoolGkAchievementVo> list = schoolGkAchievementService.selectSchoolGkAchievementVoList(schoolGkAchievementVo);
return getDataTable(list);
......@@ -167,24 +185,41 @@ public class SchoolGkAchievementController extends BaseController
List<SchoolGkAchievement> list = schoolGkAchievementService.selectSchoolGkAchievementList(schoolGkAchievementVo);
ExcelUtil<SchoolGkAchievement> util = new ExcelUtil<SchoolGkAchievement>(SchoolGkAchievement.class);
util.exportExcel(response, list, "高考成绩数据");
}
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
if (roleList1.size() > 0){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
//根据用户部门id查询用户部门信息
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//查询本部门下所有教师的id
List<Long> deptUserIds = schoolXteachingAchievementsService.getUserIdsByDeptId(sysDept.getDeptId());
if (deptUserIds.size() > 0){
schoolGkAchievementVo.setUserIds(deptUserIds);
}
List<SchoolGkAchievement> list = schoolGkAchievementService.selectSchoolGkAchievementList(schoolGkAchievementVo);
ExcelUtil<SchoolGkAchievement> util = new ExcelUtil<SchoolGkAchievement>(SchoolGkAchievement.class);
util.exportExcel(response, list, "高考成绩数据");
}else {
ExcelUtil<SchoolGkAchievement> util = new ExcelUtil<SchoolGkAchievement>(SchoolGkAchievement.class);
util.exportExcel(response, new ArrayList<>(), "高考成绩数据");
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
//查询是否包含学科组长角色
List<SysRole> roleList2 = roles.stream().filter(role -> role.getRoleKey().equals("sub_leader")).collect(Collectors.toList());
if (roleList1.size() > 0){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
//根据用户部门id查询用户部门信息
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//查询本部门下所有教师的id
List<Long> deptUserIds = schoolXteachingAchievementsService.getUserIdsByDeptId(sysDept.getDeptId());
if (deptUserIds.size() > 0){
schoolGkAchievementVo.setUserIds(deptUserIds);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolGkAchievementVo.setSub1(sub);
}
List<SchoolGkAchievement> list = schoolGkAchievementService.selectSchoolGkAchievementList(schoolGkAchievementVo);
ExcelUtil<SchoolGkAchievement> util = new ExcelUtil<SchoolGkAchievement>(SchoolGkAchievement.class);
util.exportExcel(response, list, "高考成绩数据");
} else {
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolGkAchievementVo.setSub1(sub);
List<SchoolGkAchievement> list = schoolGkAchievementService.selectSchoolGkAchievementList(schoolGkAchievementVo);
ExcelUtil<SchoolGkAchievement> util = new ExcelUtil<SchoolGkAchievement>(SchoolGkAchievement.class);
util.exportExcel(response, list, "高考成绩数据");
}else {
ExcelUtil<SchoolGkAchievement> util = new ExcelUtil<SchoolGkAchievement>(SchoolGkAchievement.class);
util.exportExcel(response, new ArrayList<>(), "高考成绩数据");
}
}
}
}
}
......
......@@ -84,6 +84,8 @@ public class SchoolTeacherBasiclnformationController extends BaseController {
}
//部分权限
List<SysRole> sysRoles2 = roles.stream().filter(item -> item.getRoleKey().equals("jsdnzj_admin") ).collect(Collectors.toList());
//查询是否包含学科组长角色
List<SysRole> roleList2 = roles.stream().filter(role -> role.getRoleKey().equals("sub_leader")).collect(Collectors.toList());
if(sysRoles2.size()>0){
//教师电子档案中级管理员只能看本部门及以下的数据
//获取当前登陆人的部门信息
......@@ -93,6 +95,19 @@ public class SchoolTeacherBasiclnformationController extends BaseController {
if (userPhones.size() > 0){
information.setUserPhones(userPhones);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
information.setTeachingSubject1(sub);
}
startPage();
List<SchoolTeacherBasicInformationVo> list = basichlnformationService.list(information);
return getDataTable(list);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
information.setTeachingSubject1(sub);
startPage();
List<SchoolTeacherBasicInformationVo> list = basichlnformationService.list(information);
return getDataTable(list);
......@@ -226,21 +241,41 @@ public class SchoolTeacherBasiclnformationController extends BaseController {
List<SchoolTeacherBasicInformationVo> list1 = basichlnformationService.list(export);
ExcelUtil<SchoolTeacherBasicInformationVo> util = new ExcelUtil<>(SchoolTeacherBasicInformationVo.class);
util.exportExcel(response, list1, "教师基本信息");
}
//部分权限
List<SysRole> sysRoles2 = roles.stream().filter(item -> item.getRoleKey().equals("jsdnzj_admin") ).collect(Collectors.toList());
if(sysRoles2.size()>0){
//教师电子档案中级管理员只能看本部门及以下的数据
//获取当前登陆人的部门信息
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//获取当前登陆人部门下所有人的身份证号
List<String> userPhones = schoolXteachingAchievementsService.getUserPhonesByDeptId(sysDept.getDeptId());
if (userPhones.size() > 0){
export.setUserPhones(userPhones);
}else {
//部分权限
List<SysRole> sysRoles2 = roles.stream().filter(item -> item.getRoleKey().equals("jsdnzj_admin") ).collect(Collectors.toList());
//查询是否包含学科组长角色
List<SysRole> roleList2 = roles.stream().filter(role -> role.getRoleKey().equals("sub_leader")).collect(Collectors.toList());
if(sysRoles2.size()>0){
//教师电子档案中级管理员只能看本部门及以下的数据
//获取当前登陆人的部门信息
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//获取当前登陆人部门下所有人的身份证号
List<String> userPhones = schoolXteachingAchievementsService.getUserPhonesByDeptId(sysDept.getDeptId());
if (userPhones.size() > 0){
export.setUserPhones(userPhones);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
export.setTeachingSubject1(sub);
}
List<SchoolTeacherBasicInformationVo> list1 = basichlnformationService.list(export);
ExcelUtil<SchoolTeacherBasicInformationVo> util = new ExcelUtil<>(SchoolTeacherBasicInformationVo.class);
util.exportExcel(response, list1, "教师基本信息");
}else {
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
export.setTeachingSubject1(sub);
List<SchoolTeacherBasicInformationVo> list1 = basichlnformationService.list(export);
ExcelUtil<SchoolTeacherBasicInformationVo> util = new ExcelUtil<>(SchoolTeacherBasicInformationVo.class);
util.exportExcel(response, list1, "教师基本信息");
} else {
ExcelUtil<SchoolTeacherBasicInformationVo> util = new ExcelUtil<>(SchoolTeacherBasicInformationVo.class);
util.exportExcel(response, new ArrayList<>(), "教师基本信息");
}
}
List<SchoolTeacherBasicInformationVo> list1 = basichlnformationService.list(export);
ExcelUtil<SchoolTeacherBasicInformationVo> util = new ExcelUtil<>(SchoolTeacherBasicInformationVo.class);
util.exportExcel(response, list1, "教师基本信息");
}
}
}
......
......@@ -30,6 +30,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolXacademicWorks;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.ISchoolXacademicWorksService;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.ISchoolXteachingAchievementsService;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.SchoolTeacherBasichlnformationService;
import yangtz.cs.liu.campus.vo.schoolNewTeacherDzdn.SchoolXacademicWorksVo;
import yangtz.cs.liu.campus.vo.schoolNewTeacherDzdn.SchoolXlectureAwardsVo;
......@@ -49,6 +50,8 @@ public class SchoolXacademicWorksController extends BaseController
private ISchoolXteachingAchievementsService schoolXteachingAchievementsService;
@Autowired
private ISysDeptService sysDeptService;
@Autowired
private SchoolTeacherBasichlnformationService basichlnformationService;
/**
* 查询论文著作列表
......@@ -78,6 +81,8 @@ public class SchoolXacademicWorksController extends BaseController
}
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
//查询是否包含学科组长角色
List<SysRole> roleList2 = roles.stream().filter(role -> role.getRoleKey().equals("sub_leader")).collect(Collectors.toList());
if (roleList1.size() > 0){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
//根据用户部门id查询用户部门信息
......@@ -86,6 +91,19 @@ public class SchoolXacademicWorksController extends BaseController
if (deptUserIds.size() > 0){
schoolXacademicWorksVo.setUserIds(deptUserIds);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolXacademicWorksVo.setSub1(sub);
}
startPage();
List<SchoolXacademicWorksVo> list = schoolXacademicWorksService.selectSchoolXacademicWorksList(schoolXacademicWorksVo);
return getDataTable(list);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolXacademicWorksVo.setSub1(sub);
startPage();
List<SchoolXacademicWorksVo> list = schoolXacademicWorksService.selectSchoolXacademicWorksList(schoolXacademicWorksVo);
return getDataTable(list);
......@@ -164,29 +182,51 @@ public class SchoolXacademicWorksController extends BaseController
}
ExcelUtil<SchoolXacademicWorksVo> util = new ExcelUtil<SchoolXacademicWorksVo>(SchoolXacademicWorksVo.class);
util.exportExcel(response, list, "论文著作数据");
}
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
if (roleList1.size() > 0){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
//根据用户部门id查询用户部门信息
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//查询本部门下所有教师的id
List<Long> deptUserIds = schoolXteachingAchievementsService.getUserIdsByDeptId(sysDept.getDeptId());
if (deptUserIds.size() > 0){
schoolXacademicWorksVo.setUserIds(deptUserIds);
}
List<SchoolXacademicWorksVo> list = schoolXacademicWorksService.selectSchoolXacademicWorksList(schoolXacademicWorksVo);
for (SchoolXacademicWorksVo xacademicWorksVo : list) {
i ++;
xacademicWorksVo.setXh(i);
xacademicWorksVo.setGrowthType("论文论著");
}
ExcelUtil<SchoolXacademicWorksVo> util = new ExcelUtil<SchoolXacademicWorksVo>(SchoolXacademicWorksVo.class);
util.exportExcel(response, list, "论文著作数据");
}else {
ExcelUtil<SchoolXacademicWorksVo> util = new ExcelUtil<SchoolXacademicWorksVo>(SchoolXacademicWorksVo.class);
util.exportExcel(response, new ArrayList<>(), "论文著作数据");
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
//查询是否包含学科组长角色
List<SysRole> roleList2 = roles.stream().filter(role -> role.getRoleKey().equals("sub_leader")).collect(Collectors.toList());
if (roleList1.size() > 0){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
//根据用户部门id查询用户部门信息
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//查询本部门下所有教师的id
List<Long> deptUserIds = schoolXteachingAchievementsService.getUserIdsByDeptId(sysDept.getDeptId());
if (deptUserIds.size() > 0){
schoolXacademicWorksVo.setUserIds(deptUserIds);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolXacademicWorksVo.setSub1(sub);
}
List<SchoolXacademicWorksVo> list = schoolXacademicWorksService.selectSchoolXacademicWorksList(schoolXacademicWorksVo);
for (SchoolXacademicWorksVo xacademicWorksVo : list) {
i ++;
xacademicWorksVo.setXh(i);
xacademicWorksVo.setGrowthType("论文论著");
}
ExcelUtil<SchoolXacademicWorksVo> util = new ExcelUtil<SchoolXacademicWorksVo>(SchoolXacademicWorksVo.class);
util.exportExcel(response, list, "论文著作数据");
}else {
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolXacademicWorksVo.setSub1(sub);
List<SchoolXacademicWorksVo> list = schoolXacademicWorksService.selectSchoolXacademicWorksList(schoolXacademicWorksVo);
for (SchoolXacademicWorksVo xacademicWorksVo : list) {
i ++;
xacademicWorksVo.setXh(i);
xacademicWorksVo.setGrowthType("论文论著");
}
ExcelUtil<SchoolXacademicWorksVo> util = new ExcelUtil<SchoolXacademicWorksVo>(SchoolXacademicWorksVo.class);
util.exportExcel(response, list, "论文著作数据");
}else {
ExcelUtil<SchoolXacademicWorksVo> util = new ExcelUtil<SchoolXacademicWorksVo>(SchoolXacademicWorksVo.class);
util.exportExcel(response, new ArrayList<>(), "论文著作数据");
}
}
}
}
}
......
......@@ -29,6 +29,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolXcomprehensiveHonors;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.ISchoolXcomprehensiveHonorsService;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.ISchoolXteachingAchievementsService;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.SchoolTeacherBasichlnformationService;
import yangtz.cs.liu.campus.vo.fudao.FudaoTeacherVo;
import yangtz.cs.liu.campus.vo.schoolNewTeacherDzdn.SchoolXcomprehensiveHonorsVo;
......@@ -48,6 +49,8 @@ public class SchoolXcomprehensiveHonorsController extends BaseController
private ISchoolXteachingAchievementsService schoolXteachingAchievementsService;
@Autowired
private ISysDeptService sysDeptService;
@Autowired
private SchoolTeacherBasichlnformationService basichlnformationService;
/**
* 查询综合荣誉列表
......@@ -76,6 +79,8 @@ public class SchoolXcomprehensiveHonorsController extends BaseController
}
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
//查询是否包含学科组长角色
List<SysRole> roleList2 = roles.stream().filter(role -> role.getRoleKey().equals("sub_leader")).collect(Collectors.toList());
if (roleList1.size() > 0){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
//根据用户部门id查询用户部门信息
......@@ -85,6 +90,19 @@ public class SchoolXcomprehensiveHonorsController extends BaseController
if (deptUserIds.size() > 0){
schoolXcomprehensiveHonorsVo.setUserIds(deptUserIds);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolXcomprehensiveHonorsVo.setSub1(sub);
}
startPage();
List<SchoolXcomprehensiveHonorsVo> list = schoolXcomprehensiveHonorsService.selectSchoolXcomprehensiveHonorsList(schoolXcomprehensiveHonorsVo);
return getDataTable(list);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolXcomprehensiveHonorsVo.setSub1(sub);
startPage();
List<SchoolXcomprehensiveHonorsVo> list = schoolXcomprehensiveHonorsService.selectSchoolXcomprehensiveHonorsList(schoolXcomprehensiveHonorsVo);
return getDataTable(list);
......@@ -163,30 +181,54 @@ public class SchoolXcomprehensiveHonorsController extends BaseController
}
ExcelUtil<SchoolXcomprehensiveHonorsVo> util = new ExcelUtil<SchoolXcomprehensiveHonorsVo>(SchoolXcomprehensiveHonorsVo.class);
util.exportExcel(response, list, "综合荣誉数据");
}
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
if (roleList1.size() > 0){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
//根据用户部门id查询用户部门信息
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//查询本部门下所有教师的id
List<Long> deptUserIds = schoolXteachingAchievementsService.getUserIdsByDeptId(sysDept.getDeptId());
if (deptUserIds.size() > 0){
schoolXcomprehensiveHonorsVo.setUserIds(deptUserIds);
}
List<SchoolXcomprehensiveHonorsVo> list = schoolXcomprehensiveHonorsService.selectSchoolXcomprehensiveHonorsList(schoolXcomprehensiveHonorsVo);
for (SchoolXcomprehensiveHonorsVo xcomprehensiveHonorsVo : list) {
i ++;
xcomprehensiveHonorsVo.setXh(i);
xcomprehensiveHonorsVo.setGrowthType("综合荣誉");
}
ExcelUtil<SchoolXcomprehensiveHonorsVo> util = new ExcelUtil<SchoolXcomprehensiveHonorsVo>(SchoolXcomprehensiveHonorsVo.class);
util.exportExcel(response, list, "综合荣誉数据");
}else {
ExcelUtil<SchoolXcomprehensiveHonorsVo> util = new ExcelUtil<SchoolXcomprehensiveHonorsVo>(SchoolXcomprehensiveHonorsVo.class);
util.exportExcel(response, new ArrayList<>(), "综合荣誉数据");
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
//查询是否包含学科组长角色
List<SysRole> roleList2 = roles.stream().filter(role -> role.getRoleKey().equals("sub_leader")).collect(Collectors.toList());
if (roleList1.size() > 0){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
//根据用户部门id查询用户部门信息
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//查询本部门下所有教师的id
List<Long> deptUserIds = schoolXteachingAchievementsService.getUserIdsByDeptId(sysDept.getDeptId());
if (deptUserIds.size() > 0){
schoolXcomprehensiveHonorsVo.setUserIds(deptUserIds);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolXcomprehensiveHonorsVo.setSub1(sub);
}
List<SchoolXcomprehensiveHonorsVo> list = schoolXcomprehensiveHonorsService.selectSchoolXcomprehensiveHonorsList(schoolXcomprehensiveHonorsVo);
for (SchoolXcomprehensiveHonorsVo xcomprehensiveHonorsVo : list) {
i ++;
xcomprehensiveHonorsVo.setXh(i);
xcomprehensiveHonorsVo.setGrowthType("综合荣誉");
}
ExcelUtil<SchoolXcomprehensiveHonorsVo> util = new ExcelUtil<SchoolXcomprehensiveHonorsVo>(SchoolXcomprehensiveHonorsVo.class);
util.exportExcel(response, list, "综合荣誉数据");
}else {
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolXcomprehensiveHonorsVo.setSub1(sub);
List<SchoolXcomprehensiveHonorsVo> list = schoolXcomprehensiveHonorsService.selectSchoolXcomprehensiveHonorsList(schoolXcomprehensiveHonorsVo);
for (SchoolXcomprehensiveHonorsVo xcomprehensiveHonorsVo : list) {
i ++;
xcomprehensiveHonorsVo.setXh(i);
xcomprehensiveHonorsVo.setGrowthType("综合荣誉");
}
ExcelUtil<SchoolXcomprehensiveHonorsVo> util = new ExcelUtil<SchoolXcomprehensiveHonorsVo>(SchoolXcomprehensiveHonorsVo.class);
util.exportExcel(response, list, "综合荣誉数据");
}else {
ExcelUtil<SchoolXcomprehensiveHonorsVo> util = new ExcelUtil<SchoolXcomprehensiveHonorsVo>(SchoolXcomprehensiveHonorsVo.class);
util.exportExcel(response, new ArrayList<>(), "综合荣誉数据");
}
}
}
}
}
......
......@@ -29,6 +29,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolXlectureAwards;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.ISchoolXlectureAwardsService;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.ISchoolXteachingAchievementsService;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.SchoolTeacherBasichlnformationService;
import yangtz.cs.liu.campus.vo.schoolNewTeacherDzdn.SchoolXlectureAwardsVo;
import yangtz.cs.liu.campus.vo.schoolNewTeacherDzdn.SchoolXteacherAwardsVo;
......@@ -48,6 +49,8 @@ public class SchoolXlectureAwardsController extends BaseController
private ISchoolXteachingAchievementsService schoolXteachingAchievementsService;
@Autowired
private ISysDeptService sysDeptService;
@Autowired
private SchoolTeacherBasichlnformationService basichlnformationService;
/**
* 查询讲课获奖列表
......@@ -77,6 +80,8 @@ public class SchoolXlectureAwardsController extends BaseController
}
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
//查询是否包含学科组长角色
List<SysRole> roleList2 = roles.stream().filter(role -> role.getRoleKey().equals("sub_leader")).collect(Collectors.toList());
if (roleList1.size() > 0){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
//根据用户部门id查询用户部门信息
......@@ -86,6 +91,19 @@ public class SchoolXlectureAwardsController extends BaseController
if (deptUserIds.size() > 0){
schoolXlectureAwardsVo.setUserIds(deptUserIds);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolXlectureAwardsVo.setSub1(sub);
}
startPage();
List<SchoolXlectureAwardsVo> list = schoolXlectureAwardsService.selectSchoolXlectureAwardsList(schoolXlectureAwardsVo);
return getDataTable(list);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolXlectureAwardsVo.setSub1(sub);
startPage();
List<SchoolXlectureAwardsVo> list = schoolXlectureAwardsService.selectSchoolXlectureAwardsList(schoolXlectureAwardsVo);
return getDataTable(list);
......@@ -164,29 +182,51 @@ public class SchoolXlectureAwardsController extends BaseController
}
ExcelUtil<SchoolXlectureAwardsVo> util = new ExcelUtil<SchoolXlectureAwardsVo>(SchoolXlectureAwardsVo.class);
util.exportExcel(response, list, "讲课获奖数据");
}
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
if (roleList1.size() > 0){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
//根据用户部门id查询用户部门信息
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//查询本部门下所有教师的id
List<Long> deptUserIds = schoolXteachingAchievementsService.getUserIdsByDeptId(sysDept.getDeptId());
if (deptUserIds.size() > 0){
schoolXlectureAwardsVo.setUserIds(deptUserIds);
}
List<SchoolXlectureAwardsVo> list = schoolXlectureAwardsService.selectSchoolXlectureAwardsList(schoolXlectureAwardsVo);
for (SchoolXlectureAwardsVo xlectureAwardsVo : list) {
i ++;
xlectureAwardsVo.setXh(i);
xlectureAwardsVo.setGrowthType("讲课获奖");
}
ExcelUtil<SchoolXlectureAwardsVo> util = new ExcelUtil<SchoolXlectureAwardsVo>(SchoolXlectureAwardsVo.class);
util.exportExcel(response, list, "讲课获奖数据");
}else {
ExcelUtil<SchoolXlectureAwardsVo> util = new ExcelUtil<SchoolXlectureAwardsVo>(SchoolXlectureAwardsVo.class);
util.exportExcel(response, new ArrayList<>(), "讲课获奖数据");
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
//查询是否包含学科组长角色
List<SysRole> roleList2 = roles.stream().filter(role -> role.getRoleKey().equals("sub_leader")).collect(Collectors.toList());
if (roleList1.size() > 0){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
//根据用户部门id查询用户部门信息
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//查询本部门下所有教师的id
List<Long> deptUserIds = schoolXteachingAchievementsService.getUserIdsByDeptId(sysDept.getDeptId());
if (deptUserIds.size() > 0){
schoolXlectureAwardsVo.setUserIds(deptUserIds);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolXlectureAwardsVo.setSub1(sub);
}
List<SchoolXlectureAwardsVo> list = schoolXlectureAwardsService.selectSchoolXlectureAwardsList(schoolXlectureAwardsVo);
for (SchoolXlectureAwardsVo xlectureAwardsVo : list) {
i ++;
xlectureAwardsVo.setXh(i);
xlectureAwardsVo.setGrowthType("讲课获奖");
}
ExcelUtil<SchoolXlectureAwardsVo> util = new ExcelUtil<SchoolXlectureAwardsVo>(SchoolXlectureAwardsVo.class);
util.exportExcel(response, list, "讲课获奖数据");
}else {
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolXlectureAwardsVo.setSub1(sub);
List<SchoolXlectureAwardsVo> list = schoolXlectureAwardsService.selectSchoolXlectureAwardsList(schoolXlectureAwardsVo);
for (SchoolXlectureAwardsVo xlectureAwardsVo : list) {
i ++;
xlectureAwardsVo.setXh(i);
xlectureAwardsVo.setGrowthType("讲课获奖");
}
ExcelUtil<SchoolXlectureAwardsVo> util = new ExcelUtil<SchoolXlectureAwardsVo>(SchoolXlectureAwardsVo.class);
util.exportExcel(response, list, "讲课获奖数据");
}else {
ExcelUtil<SchoolXlectureAwardsVo> util = new ExcelUtil<SchoolXlectureAwardsVo>(SchoolXlectureAwardsVo.class);
util.exportExcel(response, new ArrayList<>(), "讲课获奖数据");
}
}
}
}
......
......@@ -19,6 +19,7 @@ import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolXprojectResearch;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolXteacherAwards;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.ISchoolXprojectResearchService;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.ISchoolXteachingAchievementsService;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.SchoolTeacherBasichlnformationService;
import yangtz.cs.liu.campus.vo.schoolNewTeacherDzdn.SchoolXacademicWorksVo;
import yangtz.cs.liu.campus.vo.schoolNewTeacherDzdn.SchoolXprojectResearchVo;
......@@ -43,6 +44,8 @@ public class SchoolXprojectResearchController extends BaseController {
private ISchoolXteachingAchievementsService schoolXteachingAchievementsService;
@Autowired
private ISysDeptService sysDeptService;
@Autowired
private SchoolTeacherBasichlnformationService basichlnformationService;
/**
* 查询课题研究列表
......@@ -73,6 +76,8 @@ public class SchoolXprojectResearchController extends BaseController {
}
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
//查询是否包含学科组长角色
List<SysRole> roleList2 = roles.stream().filter(role -> role.getRoleKey().equals("sub_leader")).collect(Collectors.toList());
if (roleList1.size() > 0){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
//根据用户部门id查询用户部门信息
......@@ -82,6 +87,19 @@ public class SchoolXprojectResearchController extends BaseController {
if (deptUserIds.size() > 0){
schoolXprojectResearchVo.setUserIds(deptUserIds);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolXprojectResearchVo.setSub1(sub);
}
startPage();
List<SchoolXprojectResearchVo> list = schoolXprojectResearchService.selectSchoolXprojectResearchList(schoolXprojectResearchVo);
return getDataTable(list);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolXprojectResearchVo.setSub1(sub);
startPage();
List<SchoolXprojectResearchVo> list = schoolXprojectResearchService.selectSchoolXprojectResearchList(schoolXprojectResearchVo);
return getDataTable(list);
......@@ -160,29 +178,51 @@ public class SchoolXprojectResearchController extends BaseController {
}
ExcelUtil<SchoolXprojectResearchVo> util = new ExcelUtil<SchoolXprojectResearchVo>(SchoolXprojectResearchVo.class);
util.exportExcel(response, list, "课题研究数据");
}
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
if (roleList1.size() > 0){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
//根据用户部门id查询用户部门信息
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//查询本部门下所有教师的id
List<Long> deptUserIds = schoolXteachingAchievementsService.getUserIdsByDeptId(sysDept.getDeptId());
if (deptUserIds.size() > 0){
schoolXprojectResearchVo.setUserIds(deptUserIds);
}
List<SchoolXprojectResearchVo> list = schoolXprojectResearchService.selectSchoolXprojectResearchList(schoolXprojectResearchVo);
for (SchoolXprojectResearchVo xprojectResearchVo : list) {
i ++;
xprojectResearchVo.setXh(i);
xprojectResearchVo.setGrowthType("课题研究");
}
ExcelUtil<SchoolXprojectResearchVo> util = new ExcelUtil<SchoolXprojectResearchVo>(SchoolXprojectResearchVo.class);
util.exportExcel(response, list, "课题研究数据");
}else {
ExcelUtil<SchoolXprojectResearchVo> util = new ExcelUtil<SchoolXprojectResearchVo>(SchoolXprojectResearchVo.class);
util.exportExcel(response, new ArrayList<>(), "课题研究数据");
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
//查询是否包含学科组长角色
List<SysRole> roleList2 = roles.stream().filter(role -> role.getRoleKey().equals("sub_leader")).collect(Collectors.toList());
if (roleList1.size() > 0){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
//根据用户部门id查询用户部门信息
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//查询本部门下所有教师的id
List<Long> deptUserIds = schoolXteachingAchievementsService.getUserIdsByDeptId(sysDept.getDeptId());
if (deptUserIds.size() > 0){
schoolXprojectResearchVo.setUserIds(deptUserIds);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolXprojectResearchVo.setSub1(sub);
}
List<SchoolXprojectResearchVo> list = schoolXprojectResearchService.selectSchoolXprojectResearchList(schoolXprojectResearchVo);
for (SchoolXprojectResearchVo xprojectResearchVo : list) {
i ++;
xprojectResearchVo.setXh(i);
xprojectResearchVo.setGrowthType("课题研究");
}
ExcelUtil<SchoolXprojectResearchVo> util = new ExcelUtil<SchoolXprojectResearchVo>(SchoolXprojectResearchVo.class);
util.exportExcel(response, list, "课题研究数据");
}else {
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolXprojectResearchVo.setSub1(sub);
List<SchoolXprojectResearchVo> list = schoolXprojectResearchService.selectSchoolXprojectResearchList(schoolXprojectResearchVo);
for (SchoolXprojectResearchVo xprojectResearchVo : list) {
i ++;
xprojectResearchVo.setXh(i);
xprojectResearchVo.setGrowthType("课题研究");
}
ExcelUtil<SchoolXprojectResearchVo> util = new ExcelUtil<SchoolXprojectResearchVo>(SchoolXprojectResearchVo.class);
util.exportExcel(response, list, "课题研究数据");
}else {
ExcelUtil<SchoolXprojectResearchVo> util = new ExcelUtil<SchoolXprojectResearchVo>(SchoolXprojectResearchVo.class);
util.exportExcel(response, new ArrayList<>(), "课题研究数据");
}
}
}
}
......
......@@ -29,6 +29,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolXteacherAwards;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.ISchoolXteacherAwardsService;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.ISchoolXteachingAchievementsService;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.SchoolTeacherBasichlnformationService;
import yangtz.cs.liu.campus.vo.schoolNewTeacherDzdn.SchoolXcomprehensiveHonorsVo;
import yangtz.cs.liu.campus.vo.schoolNewTeacherDzdn.SchoolXteacherAwardsVo;
......@@ -48,6 +49,8 @@ public class SchoolXteacherAwardsController extends BaseController
private ISchoolXteachingAchievementsService schoolXteachingAchievementsService;
@Autowired
private ISysDeptService sysDeptService;
@Autowired
private SchoolTeacherBasichlnformationService basichlnformationService;
/**
* 查询教师获奖列表
......@@ -77,6 +80,8 @@ public class SchoolXteacherAwardsController extends BaseController
}
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
//查询是否包含学科组长角色
List<SysRole> roleList2 = roles.stream().filter(role -> role.getRoleKey().equals("sub_leader")).collect(Collectors.toList());
if (roleList1.size() > 0){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
//根据用户部门id查询用户部门信息
......@@ -86,6 +91,19 @@ public class SchoolXteacherAwardsController extends BaseController
if (deptUserIds.size() > 0){
schoolXteacherAwardsVo.setUserIds(deptUserIds);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolXteacherAwardsVo.setSub1(sub);
}
startPage();
List<SchoolXteacherAwardsVo> list = schoolXteacherAwardsService.selectSchoolXteacherAwardsList(schoolXteacherAwardsVo);
return getDataTable(list);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolXteacherAwardsVo.setSub1(sub);
startPage();
List<SchoolXteacherAwardsVo> list = schoolXteacherAwardsService.selectSchoolXteacherAwardsList(schoolXteacherAwardsVo);
return getDataTable(list);
......@@ -164,29 +182,51 @@ public class SchoolXteacherAwardsController extends BaseController
}
ExcelUtil<SchoolXteacherAwardsVo> util = new ExcelUtil<SchoolXteacherAwardsVo>(SchoolXteacherAwardsVo.class);
util.exportExcel(response, list, "教师获奖数据");
}
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
if (roleList1.size() > 0){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
//根据用户部门id查询用户部门信息
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//查询本部门下所有教师的id
List<Long> deptUserIds = schoolXteachingAchievementsService.getUserIdsByDeptId(sysDept.getDeptId());
if (deptUserIds.size() > 0){
schoolXteacherAwardsVo.setUserIds(deptUserIds);
}
List<SchoolXteacherAwardsVo> list = schoolXteacherAwardsService.selectSchoolXteacherAwardsList(schoolXteacherAwardsVo);
for (SchoolXteacherAwardsVo xteacherAwardsVo : list) {
i ++;
xteacherAwardsVo.setXh(i);
xteacherAwardsVo.setGrowthType("教学获奖");
}
ExcelUtil<SchoolXteacherAwardsVo> util = new ExcelUtil<SchoolXteacherAwardsVo>(SchoolXteacherAwardsVo.class);
util.exportExcel(response, list, "教师获奖数据");
}else {
ExcelUtil<SchoolXteacherAwardsVo> util = new ExcelUtil<SchoolXteacherAwardsVo>(SchoolXteacherAwardsVo.class);
util.exportExcel(response, new ArrayList<>(), "教师获奖数据");
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
//查询是否包含学科组长角色
List<SysRole> roleList2 = roles.stream().filter(role -> role.getRoleKey().equals("sub_leader")).collect(Collectors.toList());
if (roleList1.size() > 0){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
//根据用户部门id查询用户部门信息
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//查询本部门下所有教师的id
List<Long> deptUserIds = schoolXteachingAchievementsService.getUserIdsByDeptId(sysDept.getDeptId());
if (deptUserIds.size() > 0){
schoolXteacherAwardsVo.setUserIds(deptUserIds);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolXteacherAwardsVo.setSub1(sub);
}
List<SchoolXteacherAwardsVo> list = schoolXteacherAwardsService.selectSchoolXteacherAwardsList(schoolXteacherAwardsVo);
for (SchoolXteacherAwardsVo xteacherAwardsVo : list) {
i ++;
xteacherAwardsVo.setXh(i);
xteacherAwardsVo.setGrowthType("教学获奖");
}
ExcelUtil<SchoolXteacherAwardsVo> util = new ExcelUtil<SchoolXteacherAwardsVo>(SchoolXteacherAwardsVo.class);
util.exportExcel(response, list, "教师获奖数据");
}else {
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolXteacherAwardsVo.setSub1(sub);
List<SchoolXteacherAwardsVo> list = schoolXteacherAwardsService.selectSchoolXteacherAwardsList(schoolXteacherAwardsVo);
for (SchoolXteacherAwardsVo xteacherAwardsVo : list) {
i ++;
xteacherAwardsVo.setXh(i);
xteacherAwardsVo.setGrowthType("教学获奖");
}
ExcelUtil<SchoolXteacherAwardsVo> util = new ExcelUtil<SchoolXteacherAwardsVo>(SchoolXteacherAwardsVo.class);
util.exportExcel(response, list, "教师获奖数据");
}else {
ExcelUtil<SchoolXteacherAwardsVo> util = new ExcelUtil<SchoolXteacherAwardsVo>(SchoolXteacherAwardsVo.class);
util.exportExcel(response, new ArrayList<>(), "教师获奖数据");
}
}
}
}
}
......
......@@ -32,6 +32,7 @@ import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.web.multipart.MultipartFile;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolGkAchievementVo;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolXteachingAchievements;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.ISchoolXteachingAchievementsService;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.SchoolTeacherBasichlnformationService;
......@@ -82,6 +83,8 @@ public class SchoolXteachingAchievementsController extends BaseController
}
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
//查询是否包含学科组长角色
List<SysRole> roleList2 = roles.stream().filter(role -> role.getRoleKey().equals("sub_leader")).collect(Collectors.toList());
if (roleList1.size() > 0 ){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
// Long deptId = null;
......@@ -121,6 +124,19 @@ public class SchoolXteachingAchievementsController extends BaseController
if (userIdCards.size() > 0){
schoolXteachingAchievementsVo.setIdCards(userIdCards);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolXteachingAchievementsVo.setSub1(sub);
}
startPage();
List<SchoolXteachingAchievementsVo> list = schoolXteachingAchievementsService.selectSchoolXteachingAchievementsList(schoolXteachingAchievementsVo);
return getDataTable(list);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolXteachingAchievementsVo.setSub1(sub);
startPage();
List<SchoolXteachingAchievementsVo> list = schoolXteachingAchievementsService.selectSchoolXteachingAchievementsList(schoolXteachingAchievementsVo);
return getDataTable(list);
......@@ -162,59 +178,51 @@ public class SchoolXteachingAchievementsController extends BaseController
}
ExcelUtil<SchoolXteachingAchievementsVo> util = new ExcelUtil<SchoolXteachingAchievementsVo>(SchoolXteachingAchievementsVo.class);
util.exportExcel(response, list, "教学成绩数据");
}
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
if (roleList1.size() > 0 ){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
// Long deptId = null;
//根据用户部门id查询用户部门信息
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//判断用户部门属于科室还是级部
// //查询所有级部id
// List<Long> jbDeptIds = schoolXteachingAchievementsService.getJbDeptId();
// //查询所有科室id
// List<Long> ksDeptIds = schoolXteachingAchievementsService.getKsDeptId();
// for (Long jbDeptId : jbDeptIds) {
// if (sysDept.getAncestors().contains(jbDeptId.toString())){
// deptId = jbDeptId;
// }else {
// String[] split = sysDept.getAncestors().split(",");
// if (split.length == 2){
// deptId = sysDept.getDeptId();
// }
// }
// }
// if (StringUtils.isNull(deptId)){
// for (Long ksDeptId : ksDeptIds) {
// if (sysDept.getAncestors().contains(ksDeptId.toString())){
// deptId = ksDeptId;
// }else {
// String[] split = sysDept.getAncestors().split(",");
// if (split.length == 3){
// deptId = sysDept.getDeptId();
// }
// }
// }
// }
//获取当前登陆人部门下所有人的手机号
List<String> userPhones = schoolXteachingAchievementsService.getUserPhonesByDeptId(sysDept.getDeptId());
//根据用户手机号查询用户身份证信息
List<String> userIdCards = basichlnformationService.selectIdCardsByDdPhone(userPhones);
if (userIdCards.size() > 0){
schoolXteachingAchievementsVo.setIdCards(userIdCards);
}
List<SchoolXteachingAchievementsVo> list = schoolXteachingAchievementsService.selectSchoolXteachingAchievementsList(schoolXteachingAchievementsVo);
for (SchoolXteachingAchievementsVo schoolXteachingAchievementsVo1 : list) {
i ++;
schoolXteachingAchievementsVo1.setXh(i);
}else{
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
//查询是否包含学科组长角色
List<SysRole> roleList2 = roles.stream().filter(role -> role.getRoleKey().equals("sub_leader")).collect(Collectors.toList());
if (roleList1.size() > 0 ){
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//获取当前登陆人部门下所有人的手机号
List<String> userPhones = schoolXteachingAchievementsService.getUserPhonesByDeptId(sysDept.getDeptId());
//根据用户手机号查询用户身份证信息
List<String> userIdCards = basichlnformationService.selectIdCardsByDdPhone(userPhones);
if (userIdCards.size() > 0){
schoolXteachingAchievementsVo.setIdCards(userIdCards);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolXteachingAchievementsVo.setSub1(sub);
}
List<SchoolXteachingAchievementsVo> list = schoolXteachingAchievementsService.selectSchoolXteachingAchievementsList(schoolXteachingAchievementsVo);
for (SchoolXteachingAchievementsVo schoolXteachingAchievementsVo1 : list) {
i ++;
schoolXteachingAchievementsVo1.setXh(i);
}
ExcelUtil<SchoolXteachingAchievementsVo> util = new ExcelUtil<SchoolXteachingAchievementsVo>(SchoolXteachingAchievementsVo.class);
util.exportExcel(response, list, "教学成绩数据");
}else {
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolXteachingAchievementsVo.setSub1(sub);
List<SchoolXteachingAchievementsVo> list = schoolXteachingAchievementsService.selectSchoolXteachingAchievementsList(schoolXteachingAchievementsVo);
for (SchoolXteachingAchievementsVo schoolXteachingAchievementsVo1 : list) {
i ++;
schoolXteachingAchievementsVo1.setXh(i);
}
ExcelUtil<SchoolXteachingAchievementsVo> util = new ExcelUtil<SchoolXteachingAchievementsVo>(SchoolXteachingAchievementsVo.class);
util.exportExcel(response, list, "教学成绩数据");
} else {
ExcelUtil<SchoolXteachingAchievementsVo> util = new ExcelUtil<SchoolXteachingAchievementsVo>(SchoolXteachingAchievementsVo.class);
util.exportExcel(response, new ArrayList<>(), "教学成绩数据");
}
}
ExcelUtil<SchoolXteachingAchievementsVo> util = new ExcelUtil<SchoolXteachingAchievementsVo>(SchoolXteachingAchievementsVo.class);
util.exportExcel(response, list, "教学成绩数据");
}else {
ExcelUtil<SchoolXteachingAchievementsVo> util = new ExcelUtil<SchoolXteachingAchievementsVo>(SchoolXteachingAchievementsVo.class);
util.exportExcel(response, new ArrayList<>(), "教学成绩数据");
}
}
}
......
......@@ -30,6 +30,7 @@ import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolXteamAward;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolXteamAwardVo;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.ISchoolXteachingAchievementsService;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.ISchoolXteamAwardService;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.SchoolTeacherBasichlnformationService;
/**
* 团队获奖Controller
......@@ -47,6 +48,8 @@ public class SchoolXteamAwardController extends BaseController
private ISchoolXteachingAchievementsService schoolXteachingAchievementsService;
@Autowired
private ISysDeptService sysDeptService;
@Autowired
private SchoolTeacherBasichlnformationService basichlnformationService;
/**
* 查询团队获奖列表
......@@ -75,6 +78,8 @@ public class SchoolXteamAwardController extends BaseController
}
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
//查询是否包含学科组长角色
List<SysRole> roleList2 = roles.stream().filter(role -> role.getRoleKey().equals("sub_leader")).collect(Collectors.toList());
if (roleList1.size() > 0){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
//根据用户部门id查询用户部门信息
......@@ -84,6 +89,19 @@ public class SchoolXteamAwardController extends BaseController
if (deptUserIds.size() > 0){
schoolXteamAwardVo.setUserIds(deptUserIds);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolXteamAwardVo.setSub1(sub);
}
startPage();
List<SchoolXteamAwardVo> list = schoolXteamAwardService.selectSchoolXteamAwardVoList(schoolXteamAwardVo);
return getDataTable(list);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolXteamAwardVo.setSub1(sub);
startPage();
List<SchoolXteamAwardVo> list = schoolXteamAwardService.selectSchoolXteamAwardVoList(schoolXteamAwardVo);
return getDataTable(list);
......@@ -129,24 +147,41 @@ public class SchoolXteamAwardController extends BaseController
List<SchoolXteamAward> list = schoolXteamAwardService.selectSchoolXteamAwardList(schoolXteamAwardVo);
ExcelUtil<SchoolXteamAward> util = new ExcelUtil<SchoolXteamAward>(SchoolXteamAward.class);
util.exportExcel(response, list, "团队获奖数据");
}
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
if (roleList1.size() > 0){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
//根据用户部门id查询用户部门信息
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//查询本部门下所有教师的id
List<Long> deptUserIds = schoolXteachingAchievementsService.getUserIdsByDeptId(sysDept.getDeptId());
if (deptUserIds.size() > 0){
schoolXteamAwardVo.setUserIds(deptUserIds);
}
List<SchoolXteamAward> list = schoolXteamAwardService.selectSchoolXteamAwardList(schoolXteamAwardVo);
ExcelUtil<SchoolXteamAward> util = new ExcelUtil<SchoolXteamAward>(SchoolXteamAward.class);
util.exportExcel(response, list, "团队获奖数据");
}else {
ExcelUtil<SchoolXteamAward> util = new ExcelUtil<SchoolXteamAward>(SchoolXteamAward.class);
util.exportExcel(response, new ArrayList<>(), "团队获奖数据");
//部分权限
List<SysRole> roleList1 = roles.stream().filter(role -> role.getRoleKey().equals("jsdnzj_admin")).collect(Collectors.toList());
//查询是否包含学科组长角色
List<SysRole> roleList2 = roles.stream().filter(role -> role.getRoleKey().equals("sub_leader")).collect(Collectors.toList());
if (roleList1.size() > 0){
//教师电子档案中级管理员只能查看本部门及部门以下的数据
//根据用户部门id查询用户部门信息
SysDept sysDept = sysDeptService.selectDeptById(user.getDeptId());
//查询本部门下所有教师的id
List<Long> deptUserIds = schoolXteachingAchievementsService.getUserIdsByDeptId(sysDept.getDeptId());
if (deptUserIds.size() > 0){
schoolXteamAwardVo.setUserIds(deptUserIds);
}
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolXteamAwardVo.setSub1(sub);
}
List<SchoolXteamAward> list = schoolXteamAwardService.selectSchoolXteamAwardList(schoolXteamAwardVo);
ExcelUtil<SchoolXteamAward> util = new ExcelUtil<SchoolXteamAward>(SchoolXteamAward.class);
util.exportExcel(response, list, "团队获奖数据");
}else {
if (roleList2.size() > 0){
//根据当前登陆人手机号查询任教学科
String sub = basichlnformationService.selectSubByDdPhone(user.getPhonenumber());
schoolXteamAwardVo.setSub1(sub);
List<SchoolXteamAward> list = schoolXteamAwardService.selectSchoolXteamAwardList(schoolXteamAwardVo);
ExcelUtil<SchoolXteamAward> util = new ExcelUtil<SchoolXteamAward>(SchoolXteamAward.class);
util.exportExcel(response, list, "团队获奖数据");
}else {
ExcelUtil<SchoolXteamAward> util = new ExcelUtil<SchoolXteamAward>(SchoolXteamAward.class);
util.exportExcel(response, new ArrayList<>(), "团队获奖数据");
}
}
}
}
}
......
......@@ -82,12 +82,48 @@ public class SchoolScAwardsController extends BaseController
}
/**
* 导出学校获奖列表
* 导出学校获奖列表(个人)
*/
@Log(title = "学校获奖", businessType = BusinessType.EXPORT)
@PostMapping("/exportGr")
public void exportGr(HttpServletResponse response, SchoolScAwardsVo schoolScAwardsVo)
{
SysUser user = SecurityUtils.getLoginUser().getUser();
//管理员查询全部
if (user.isAdmin()) {
List<SchoolScAwardsVo> list = schoolScAwardsService.selectSchoolScAwardsList(schoolScAwardsVo);
ExcelUtil<SchoolScAwardsVo> util = new ExcelUtil<SchoolScAwardsVo>(SchoolScAwardsVo.class);
util.exportExcel(response, list, "学校获奖数据");
}else {
//用户查看个人列表
schoolScAwardsVo.setApplyId(user.getUserId());
List<SchoolScAwardsVo> list = schoolScAwardsService.selectSchoolScAwardsList(schoolScAwardsVo);
ExcelUtil<SchoolScAwardsVo> util = new ExcelUtil<SchoolScAwardsVo>(SchoolScAwardsVo.class);
util.exportExcel(response, list, "学校获奖数据");
}
}
/**
* 导出学校获奖列表(导出已通过)
*/
@Log(title = "学校获奖", businessType = BusinessType.EXPORT)
@PostMapping("/exportYtg")
public void exportYtg(HttpServletResponse response, SchoolScAwardsVo schoolScAwardsVo)
{
schoolScAwardsVo.setAuditState("2");
List<SchoolScAwardsVo> list = schoolScAwardsService.selectSchoolScAwardsListTg(schoolScAwardsVo);
ExcelUtil<SchoolScAwardsVo> util = new ExcelUtil<SchoolScAwardsVo>(SchoolScAwardsVo.class);
util.exportExcel(response, list, "学校获奖数据");
}
/**
* 导出学校获奖列表(管理员)
*/
@Log(title = "学校获奖", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SchoolScAwardsVo schoolScAwardsVo)
{
schoolScAwardsVo.setAuditState("0");
List<SchoolScAwardsVo> list = schoolScAwardsService.selectSchoolScAwardsList(schoolScAwardsVo);
ExcelUtil<SchoolScAwardsVo> util = new ExcelUtil<SchoolScAwardsVo>(SchoolScAwardsVo.class);
util.exportExcel(response, list, "学校获奖数据");
......
package yangtz.cs.liu.campus.controller.schoolRewardsPunishments;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.github.pagehelper.PageInfo;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
......@@ -20,8 +26,14 @@ import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.web.multipart.MultipartFile;
import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolXteachingAchievements;
import yangtz.cs.liu.campus.domain.schoolRewardsPunishments.SchoolScDiscipline;
import yangtz.cs.liu.campus.service.accessory.IAccessoryService;
import yangtz.cs.liu.campus.service.schoolRewardsPunishments.ISchoolScDisciplineService;
import yangtz.cs.liu.campus.vo.schoolRewardsPunishments.SchoolScDisciplineExport;
import yangtz.cs.liu.campus.vo.schoolRewardsPunishments.SchoolScDisciplineVo;
/**
* 学生违纪Controller
......@@ -35,6 +47,8 @@ public class SchoolScDisciplineController extends BaseController
{
@Autowired
private ISchoolScDisciplineService schoolScDisciplineService;
@Autowired
private IAccessoryService accessoryService;
/**
* 查询学生违纪列表(管理员)
......@@ -45,7 +59,30 @@ public class SchoolScDisciplineController extends BaseController
schoolScDiscipline.setAuditState("0");
startPage();
List<SchoolScDiscipline> list = schoolScDisciplineService.selectSchoolScDisciplineList(schoolScDiscipline);
return getDataTable(list);
List<SchoolScDisciplineVo> schoolScDisciplineVoList = new ArrayList<>();
//查询所有学生违纪附件
LambdaQueryWrapper<SchoolAccessory> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolAccessory::getAccessoryType,"学生违纪附件");
List<SchoolAccessory> list1 = accessoryService.list(wrapper);
for (SchoolScDiscipline scDiscipline : list) {
//转vo
SchoolScDisciplineVo schoolScDisciplineVo = new SchoolScDisciplineVo();
BeanUtils.copyProperties(scDiscipline,schoolScDisciplineVo);
List<SchoolAccessory> schoolAccessoryList = new ArrayList<>();
for (SchoolAccessory schoolAccessory : list1) {
if (scDiscipline.getId().equals(schoolAccessory.getBusinessId())){
schoolAccessoryList.add(schoolAccessory);
}
}
if (schoolAccessoryList.size() > 0){
schoolScDisciplineVo.setSchoolAccessoryList(schoolAccessoryList);
}
schoolScDisciplineVoList.add(schoolScDisciplineVo);
}
TableDataInfo tableDataInfo = getDataTable(schoolScDisciplineVoList);
tableDataInfo.setTotal(new PageInfo(list).getTotal());
return tableDataInfo;
}
/**
......@@ -57,7 +94,30 @@ public class SchoolScDisciplineController extends BaseController
schoolScDiscipline.setAuditState("2");
startPage();
List<SchoolScDiscipline> list = schoolScDisciplineService.selectSchoolScDisciplineListTg(schoolScDiscipline);
return getDataTable(list);
List<SchoolScDisciplineVo> schoolScDisciplineVoList = new ArrayList<>();
//查询所有学生违纪附件
LambdaQueryWrapper<SchoolAccessory> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolAccessory::getAccessoryType,"学生违纪附件");
List<SchoolAccessory> list1 = accessoryService.list(wrapper);
for (SchoolScDiscipline scDiscipline : list) {
//转vo
SchoolScDisciplineVo schoolScDisciplineVo = new SchoolScDisciplineVo();
BeanUtils.copyProperties(scDiscipline,schoolScDisciplineVo);
List<SchoolAccessory> schoolAccessoryList = new ArrayList<>();
for (SchoolAccessory schoolAccessory : list1) {
if (scDiscipline.getId().equals(schoolAccessory.getBusinessId())){
schoolAccessoryList.add(schoolAccessory);
}
}
if (schoolAccessoryList.size() > 0){
schoolScDisciplineVo.setSchoolAccessoryList(schoolAccessoryList);
}
schoolScDisciplineVoList.add(schoolScDisciplineVo);
}
TableDataInfo tableDataInfo = getDataTable(schoolScDisciplineVoList);
tableDataInfo.setTotal(new PageInfo(list).getTotal());
return tableDataInfo;
}
/**
......@@ -76,22 +136,165 @@ public class SchoolScDisciplineController extends BaseController
schoolScDiscipline.setApplyId(SecurityUtils.getUserId());
startPage();
List<SchoolScDiscipline> list = schoolScDisciplineService.selectSchoolScDisciplineList(schoolScDiscipline);
return getDataTable(list);
List<SchoolScDisciplineVo> schoolScDisciplineVoList = new ArrayList<>();
//查询所有学生违纪附件
LambdaQueryWrapper<SchoolAccessory> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolAccessory::getAccessoryType,"学生违纪附件");
List<SchoolAccessory> list1 = accessoryService.list(wrapper);
for (SchoolScDiscipline scDiscipline : list) {
//转vo
SchoolScDisciplineVo schoolScDisciplineVo = new SchoolScDisciplineVo();
BeanUtils.copyProperties(scDiscipline,schoolScDisciplineVo);
List<SchoolAccessory> schoolAccessoryList = new ArrayList<>();
for (SchoolAccessory schoolAccessory : list1) {
if (scDiscipline.getId().equals(schoolAccessory.getBusinessId())){
schoolAccessoryList.add(schoolAccessory);
}
}
if (schoolAccessoryList.size() > 0){
schoolScDisciplineVo.setSchoolAccessoryList(schoolAccessoryList);
}
schoolScDisciplineVoList.add(schoolScDisciplineVo);
}
TableDataInfo tableDataInfo = getDataTable(schoolScDisciplineVoList);
tableDataInfo.setTotal(new PageInfo(list).getTotal());
return tableDataInfo;
}
/**
* 导出学生违纪列表(个人)
*/
@Log(title = "学生违纪", businessType = BusinessType.EXPORT)
@PostMapping("/exportGr")
public void exportGr(HttpServletResponse response, SchoolScDiscipline schoolScDiscipline)
{
SysUser user = SecurityUtils.getLoginUser().getUser();
//管理员导出全部
if (user.isAdmin()) {
List<SchoolScDiscipline> list = schoolScDisciplineService.selectSchoolScDisciplineList(schoolScDiscipline);
List<SchoolScDisciplineExport> exportList = new ArrayList<>();
for (SchoolScDiscipline scDiscipline : list) {
//转导出对象
SchoolScDisciplineExport schoolScDisciplineExport = new SchoolScDisciplineExport();
BeanUtils.copyProperties(scDiscipline,schoolScDisciplineExport);
exportList.add(schoolScDisciplineExport);
}
ExcelUtil<SchoolScDisciplineExport> util = new ExcelUtil<SchoolScDisciplineExport>(SchoolScDisciplineExport.class);
util.exportExcel(response, exportList, "学生违纪数据");
}else{
schoolScDiscipline.setApplyId(SecurityUtils.getUserId());
List<SchoolScDiscipline> list = schoolScDisciplineService.selectSchoolScDisciplineList(schoolScDiscipline);
List<SchoolScDisciplineExport> exportList = new ArrayList<>();
for (SchoolScDiscipline scDiscipline : list) {
//转导出对象
SchoolScDisciplineExport schoolScDisciplineExport = new SchoolScDisciplineExport();
BeanUtils.copyProperties(scDiscipline,schoolScDisciplineExport);
exportList.add(schoolScDisciplineExport);
}
ExcelUtil<SchoolScDisciplineExport> util = new ExcelUtil<SchoolScDisciplineExport>(SchoolScDisciplineExport.class);
util.exportExcel(response, exportList, "学生违纪数据");
}
}
/**
* 导出学生违纪列表(已通过)
*/
@Log(title = "学生违纪", businessType = BusinessType.EXPORT)
@PostMapping("/exportYtg")
public void exportYtg(HttpServletResponse response, SchoolScDiscipline schoolScDiscipline)
{
schoolScDiscipline.setAuditState("2");
List<SchoolScDiscipline> list = schoolScDisciplineService.selectSchoolScDisciplineListTg(schoolScDiscipline);
List<SchoolScDisciplineExport> exportList = new ArrayList<>();
for (SchoolScDiscipline scDiscipline : list) {
//转导出对象
SchoolScDisciplineExport schoolScDisciplineExport = new SchoolScDisciplineExport();
BeanUtils.copyProperties(scDiscipline,schoolScDisciplineExport);
exportList.add(schoolScDisciplineExport);
}
ExcelUtil<SchoolScDisciplineExport> util = new ExcelUtil<SchoolScDisciplineExport>(SchoolScDisciplineExport.class);
util.exportExcel(response, exportList, "学生违纪数据");
}
/**
* 导出学生违纪列表
* 导出学生违纪列表(管理员)
*/
@Log(title = "学生违纪", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SchoolScDiscipline schoolScDiscipline)
@PostMapping("/exportGl")
public void exportGl(HttpServletResponse response, SchoolScDiscipline schoolScDiscipline)
{
schoolScDiscipline.setAuditState("0");
List<SchoolScDiscipline> list = schoolScDisciplineService.selectSchoolScDisciplineList(schoolScDiscipline);
ExcelUtil<SchoolScDiscipline> util = new ExcelUtil<SchoolScDiscipline>(SchoolScDiscipline.class);
util.exportExcel(response, list, "学生违纪数据");
List<SchoolScDisciplineExport> exportList = new ArrayList<>();
for (SchoolScDiscipline scDiscipline : list) {
//转导出对象
SchoolScDisciplineExport schoolScDisciplineExport = new SchoolScDisciplineExport();
BeanUtils.copyProperties(scDiscipline,schoolScDisciplineExport);
exportList.add(schoolScDisciplineExport);
}
ExcelUtil<SchoolScDisciplineExport> util = new ExcelUtil<SchoolScDisciplineExport>(SchoolScDisciplineExport.class);
util.exportExcel(response, exportList, "学生违纪数据");
}
/*
* 下载模板
* */
@PostMapping("/importTemplate")
public void importTemplate (HttpServletResponse response) {
schoolScDisciplineService.importTemplate(response);
}
/**
* 导入学生违纪(个人)
*/
// @PreAuthorize("@ss.hasPermi('system:achievements:importData')")
@PostMapping("/importDataGr")
@Transactional(rollbackFor = Exception.class)
public AjaxResult importDataGr(MultipartFile file) throws Exception {
ExcelUtil<SchoolScDisciplineVo> util = new ExcelUtil<SchoolScDisciplineVo>(SchoolScDisciplineVo.class);
List<SchoolScDisciplineVo> list = util.importExcel(file.getInputStream());
//先校验
schoolScDisciplineService.checkImport(list);
//数据导入
list.forEach(list1 -> {
list1.setApplyId(SecurityUtils.getUserId());
list1.setApplyName(SecurityUtils.getUsername());
list1.setApplyTime(DateUtils.getNowDate());
list1.setCreateBy(SecurityUtils.getUsername());
list1.setCreateTime(DateUtils.getNowDate());
});
String message = schoolScDisciplineService.importData(list);
return AjaxResult.success(message);
}
/**
* 导入学生违纪(管理员)
*/
// @PreAuthorize("@ss.hasPermi('system:achievements:importData')")
@PostMapping("/importData")
@Transactional(rollbackFor = Exception.class)
public AjaxResult importData(MultipartFile file) throws Exception {
ExcelUtil<SchoolScDisciplineVo> util = new ExcelUtil<SchoolScDisciplineVo>(SchoolScDisciplineVo.class);
List<SchoolScDisciplineVo> list = util.importExcel(file.getInputStream());
//先校验
schoolScDisciplineService.checkImport(list);
//数据导入
list.forEach(list1 -> {
list1.setAuditState("1");
list1.setApplyId(SecurityUtils.getUserId());
list1.setApplyName(SecurityUtils.getUsername());
list1.setApplyTime(DateUtils.getNowDate());
list1.setCreateBy(SecurityUtils.getUsername());
list1.setCreateTime(DateUtils.getNowDate());
});
String message = schoolScDisciplineService.importData(list);
return AjaxResult.success(message);
}
/**
* 获取学生违纪详细信息
*/
@GetMapping(value = "/{id}")
......@@ -105,10 +308,10 @@ public class SchoolScDisciplineController extends BaseController
*/
@Log(title = "学生违纪", businessType = BusinessType.INSERT)
@PostMapping("/add")
public AjaxResult add(@RequestBody SchoolScDiscipline schoolScDiscipline)
public AjaxResult add(@RequestBody SchoolScDisciplineVo schoolScDisciplineVo)
{
schoolScDiscipline.setAuditState("1");
return toAjax(schoolScDisciplineService.insertSchoolScDiscipline(schoolScDiscipline));
schoolScDisciplineVo.setAuditState("1");
return toAjax(schoolScDisciplineService.insertSchoolScDiscipline(schoolScDisciplineVo));
}
/**
......@@ -116,9 +319,9 @@ public class SchoolScDisciplineController extends BaseController
*/
@Log(title = "学生违纪", businessType = BusinessType.INSERT)
@PostMapping("/addGr")
public AjaxResult addGr(@RequestBody SchoolScDiscipline schoolScDiscipline)
public AjaxResult addGr(@RequestBody SchoolScDisciplineVo schoolScDisciplineVo)
{
return toAjax(schoolScDisciplineService.insertSchoolScDiscipline(schoolScDiscipline));
return toAjax(schoolScDisciplineService.insertSchoolScDiscipline(schoolScDisciplineVo));
}
/**
......@@ -126,9 +329,9 @@ public class SchoolScDisciplineController extends BaseController
*/
@Log(title = "学生违纪", businessType = BusinessType.UPDATE)
@PutMapping("/edit")
public AjaxResult edit(@RequestBody SchoolScDiscipline schoolScDiscipline)
public AjaxResult edit(@RequestBody SchoolScDisciplineVo schoolScDisciplineVo)
{
return toAjax(schoolScDisciplineService.updateSchoolScDiscipline(schoolScDiscipline));
return toAjax(schoolScDisciplineService.updateSchoolScDiscipline(schoolScDisciplineVo));
}
/**
......@@ -165,4 +368,38 @@ public class SchoolScDisciplineController extends BaseController
public AjaxResult getClassList(Long gradeId){
return AjaxResult.success(schoolScDisciplineService.getClassList(gradeId));
}
/**
* 根据身份证号查询学生违纪列表
*/
@GetMapping("/getDisciplineList")
public TableDataInfo getDisciplineList(SchoolScDiscipline schoolScDiscipline){
schoolScDiscipline.setAuditState("2");
startPage();
List<SchoolScDiscipline> list = schoolScDisciplineService.selectSchoolScDisciplineListTg(schoolScDiscipline);
List<SchoolScDisciplineVo> schoolScDisciplineVoList = new ArrayList<>();
//查询所有学生违纪附件
LambdaQueryWrapper<SchoolAccessory> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolAccessory::getAccessoryType,"学生违纪附件");
List<SchoolAccessory> list1 = accessoryService.list(wrapper);
for (SchoolScDiscipline scDiscipline : list) {
//转vo
SchoolScDisciplineVo schoolScDisciplineVo = new SchoolScDisciplineVo();
BeanUtils.copyProperties(scDiscipline,schoolScDisciplineVo);
List<SchoolAccessory> schoolAccessoryList = new ArrayList<>();
for (SchoolAccessory schoolAccessory : list1) {
if (scDiscipline.getId().equals(schoolAccessory.getBusinessId())){
schoolAccessoryList.add(schoolAccessory);
}
}
if (schoolAccessoryList.size() > 0){
schoolScDisciplineVo.setSchoolAccessoryList(schoolAccessoryList);
}
schoolScDisciplineVoList.add(schoolScDisciplineVo);
}
TableDataInfo tableDataInfo = getDataTable(schoolScDisciplineVoList);
tableDataInfo.setTotal(new PageInfo(list).getTotal());
return tableDataInfo;
}
}
......@@ -3,6 +3,7 @@ package yangtz.cs.liu.campus.controller.schooloffical;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.core.utils.HolidayDateUtil;
import com.dingtalk.api.request.OapiMessageCorpconversationAsyncsendV2Request;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
......@@ -20,6 +21,7 @@ import io.swagger.annotations.ApiOperation;
import org.aspectj.apache.bcel.classfile.Module;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.MediaType;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
......@@ -37,15 +39,14 @@ import yangtz.cs.liu.campus.util.VxTemlateSendApi;
import yangtz.cs.liu.campus.vo.schoolOfficial.SchoolOfficialFlowVo;
import yangtz.cs.liu.campus.vo.schoolOfficial.SchoolOfficialVo;
import yangtz.cs.liu.campus.vo.schooloffical.SchoolOfficalVO;
import yangtz.cs.liu.dingding.utils.DingMessageUtils;
import yangtz.cs.liu.dingding.vo.DingMessageVo;
import yangtz.cs.liu.wechat.service.api.IWxApiService;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import static yangtz.cs.liu.campus.constant.OfficalConstant.*;
......@@ -70,6 +71,15 @@ public class SchoolOfficalController extends BaseController {
@Autowired
private ISchoolTeacherService teacherService;
@Autowired
private DingMessageUtils dingMessageUtils;
@Value("${dd.message-uri}")
private String messageUrl;
@Value("${dd.pc-message-uri}")
private String pcMessageUrl;
/**
* 查看
*
......@@ -173,16 +183,37 @@ public class SchoolOfficalController extends BaseController {
String applyTime1 = HolidayDateUtil.format1.format(vo.getDeadline());
//获取openid
String openId = teacherService.getOpenIdByUserId(vo.getReceiveUser());
Map<String,Object> map = new HashMap<>();
map.put("toUserOpenId",openId);
map.put("applyTime",applyTime);
map.put("remark","请您于" + applyTime1 + "前前往电脑端进行处理。");
map.put("applyUser","");
map.put("content",vo.getIssuedName());
map.put("first","您好,您有一个新的公文需要批阅");
VxTemlateSendApi.sendVxTemlate(map);
//获取钉钉用户id
String ddUserId = teacherService.getDdUserIdByUserId(vo.getReceiveUser());
OapiMessageCorpconversationAsyncsendV2Request.Msg msg = new OapiMessageCorpconversationAsyncsendV2Request.Msg();
msg.setOa(new OapiMessageCorpconversationAsyncsendV2Request.OA());
msg.getOa().setHead(new OapiMessageCorpconversationAsyncsendV2Request.Head());
msg.getOa().getHead().setText("text");
msg.getOa().getHead().setBgcolor("FF4BB3F9");
msg.getOa().setBody(new OapiMessageCorpconversationAsyncsendV2Request.Body());
msg.getOa().getBody().setAuthor("");
msg.getOa().getBody().setContent("请您于" + applyTime1 + "前批阅");
msg.getOa().getBody().setTitle("您好,您有一个新的公文需要批阅");
msg.getOa().setPcMessageUrl(pcMessageUrl);
msg.getOa().setMessageUrl(messageUrl);
msg.setMsgtype("oa");
DingMessageVo messageVo = new DingMessageVo();
messageVo.setMsg(msg);
messageVo.setToAllUser(false);
messageVo.setUseridList(ddUserId);
dingMessageUtils.sendMessage(messageVo);
// //获取openid
// String openId = teacherService.getOpenIdByUserId(vo.getReceiveUser());
// Map<String,Object> map = new HashMap<>();
// map.put("toUserOpenId",openId);
// map.put("applyTime",applyTime);
// map.put("remark","请您于" + applyTime1 + "前前往电脑端进行处理。");
// map.put("applyUser","");
// map.put("content",vo.getIssuedName());
// map.put("first","您好,您有一个新的公文需要批阅");
// VxTemlateSendApi.sendVxTemlate(map);
// OfficalTemplate template = new OfficalTemplate();
// template.setFirst("您好,您有一个新的公文需要批阅");
......
package yangtz.cs.liu.campus.controller.student;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import org.springframework.web.multipart.MultipartFile;
import yangtz.cs.liu.campus.domain.student.SchoolStudentAchievement;
import yangtz.cs.liu.campus.service.student.ISchoolStudentAchievementService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import yangtz.cs.liu.campus.vo.student.SchoolStudentAchievementVo;
import yangtz.cs.liu.campus.vo.student.SchoolStudentAwardVo;
/**
* 学生成绩Controller
*
* @author ruoyi
* @date 2024-01-08
*/
@RestController
@RequestMapping("/school/studentAchievement")
public class SchoolStudentAchievementController extends BaseController
{
@Autowired
private ISchoolStudentAchievementService schoolStudentAchievementService;
/**
* 查询学生成绩列表
*/
@GetMapping("/list")
public TableDataInfo list(SchoolStudentAchievement schoolStudentAchievement)
{
startPage();
List<SchoolStudentAchievement> list = schoolStudentAchievementService.selectSchoolStudentAchievementList(schoolStudentAchievement);
return getDataTable(list);
}
/**
* 查询学生成绩列表(个人)
*/
@GetMapping("/listGr")
public TableDataInfo listGr(SchoolStudentAchievement schoolStudentAchievement)
{
schoolStudentAchievement.setCreateById(SecurityUtils.getUserId());
startPage();
List<SchoolStudentAchievement> list = schoolStudentAchievementService.selectSchoolStudentAchievementList(schoolStudentAchievement);
return getDataTable(list);
}
/**
* 导出学生成绩列表
*/
@Log(title = "学生成绩", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SchoolStudentAchievement schoolStudentAchievement)
{
List<SchoolStudentAchievement> list = schoolStudentAchievementService.selectSchoolStudentAchievementList(schoolStudentAchievement);
ExcelUtil<SchoolStudentAchievement> util = new ExcelUtil<SchoolStudentAchievement>(SchoolStudentAchievement.class);
util.exportExcel(response, list, "学生成绩数据");
}
/**
* 导出学生成绩列表(个人)
*/
@Log(title = "学生成绩", businessType = BusinessType.EXPORT)
@PostMapping("/exportGr")
public void exportGr(HttpServletResponse response, SchoolStudentAchievement schoolStudentAchievement)
{
schoolStudentAchievement.setCreateById(SecurityUtils.getUserId());
List<SchoolStudentAchievement> list = schoolStudentAchievementService.selectSchoolStudentAchievementList(schoolStudentAchievement);
ExcelUtil<SchoolStudentAchievement> util = new ExcelUtil<SchoolStudentAchievement>(SchoolStudentAchievement.class);
util.exportExcel(response, list, "学生成绩数据");
}
/**
* 下载模板
*
* @return
*/
@PostMapping("/importTemplate")
public void importTemplate(HttpServletResponse response) {
ExcelUtil<SchoolStudentAchievementVo> util = new ExcelUtil<>(SchoolStudentAchievementVo.class);
util.importTemplateExcel(response, "学生嘉奖");
}
/**
* 导入
*
* @param file
* @return
* @throws Exception
*/
@PostMapping("/importData")
public AjaxResult importData(MultipartFile file) throws Exception {
ExcelUtil<SchoolStudentAchievementVo> util = new ExcelUtil<SchoolStudentAchievementVo>(SchoolStudentAchievementVo.class);
List<SchoolStudentAchievementVo> list = util.importExcel(file.getInputStream());
//校验
schoolStudentAchievementService.checkImport(list);
//导入
list.forEach(list1 -> {
list1.setCreateById(SecurityUtils.getUserId());
list1.setCreateBy(SecurityUtils.getUsername());
list1.setCreateTime(DateUtils.getNowDate());
});
String message = schoolStudentAchievementService.importExamDetail(list);
return AjaxResult.success(message);
}
/**
* 获取学生成绩详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolStudentAchievementService.selectSchoolStudentAchievementById(id));
}
/**
* 新增学生成绩
*/
@Log(title = "学生成绩", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SchoolStudentAchievement schoolStudentAchievement)
{
return toAjax(schoolStudentAchievementService.insertSchoolStudentAchievement(schoolStudentAchievement));
}
/**
* 修改学生成绩
*/
@Log(title = "学生成绩", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SchoolStudentAchievement schoolStudentAchievement)
{
return toAjax(schoolStudentAchievementService.updateSchoolStudentAchievement(schoolStudentAchievement));
}
/**
* 删除学生成绩
*/
@Log(title = "学生成绩", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(schoolStudentAchievementService.deleteSchoolStudentAchievementByIds(ids));
}
}
package yangtz.cs.liu.campus.controller.student;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.annotation.RepeatSubmit;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import org.springframework.web.multipart.MultipartFile;
import yangtz.cs.liu.campus.domain.student.SchoolStudentAward;
import yangtz.cs.liu.campus.service.student.ISchoolStudentAwardService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import yangtz.cs.liu.campus.vo.student.SchoolStudentAwardVo;
/**
* 学生嘉奖Controller
*
* @author ruoyi
* @date 2024-01-08
*/
@RestController
@RequestMapping("/school/studentAward")
public class SchoolStudentAwardController extends BaseController
{
@Autowired
private ISchoolStudentAwardService schoolStudentAwardService;
/**
* 查询学生嘉奖列表(全部)
*/
@GetMapping("/list")
public TableDataInfo list(SchoolStudentAward schoolStudentAward)
{
//过滤未提交的数据
schoolStudentAward.setAuditState("0");
startPage();
List<SchoolStudentAward> list = schoolStudentAwardService.selectSchoolStudentAwardList(schoolStudentAward);
return getDataTable(list);
}
/**
* 查询学生嘉奖列表(个人)
*/
@GetMapping("/listGr")
public TableDataInfo listGr(SchoolStudentAward schoolStudentAward)
{
//获取当前登陆人id
schoolStudentAward.setCreateById(SecurityUtils.getUserId());
startPage();
List<SchoolStudentAward> list = schoolStudentAwardService.selectSchoolStudentAwardList(schoolStudentAward);
return getDataTable(list);
}
/**
* 查询学生嘉奖列表(已通过)
*/
@GetMapping("/listYtg")
public TableDataInfo listYtg(SchoolStudentAward schoolStudentAward)
{
//查询已通过的数据
schoolStudentAward.setAuditState("2");
startPage();
List<SchoolStudentAward> list = schoolStudentAwardService.selectSchoolStudentAwardListTg(schoolStudentAward);
return getDataTable(list);
}
/**
* 导出学生嘉奖列表(管理员)
*/
@Log(title = "学生嘉奖", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SchoolStudentAward schoolStudentAward)
{
//过滤未提交的数据
schoolStudentAward.setAuditState("0");
List<SchoolStudentAward> list = schoolStudentAwardService.selectSchoolStudentAwardList(schoolStudentAward);
ExcelUtil<SchoolStudentAward> util = new ExcelUtil<SchoolStudentAward>(SchoolStudentAward.class);
util.exportExcel(response, list, "学生嘉奖数据");
}
/**
* 导出学生嘉奖列表(个人)
*/
@Log(title = "学生嘉奖", businessType = BusinessType.EXPORT)
@PostMapping("/exportGr")
public void exportGr(HttpServletResponse response, SchoolStudentAward schoolStudentAward)
{
//获取当前登陆人id
schoolStudentAward.setCreateById(SecurityUtils.getUserId());
List<SchoolStudentAward> list = schoolStudentAwardService.selectSchoolStudentAwardList(schoolStudentAward);
ExcelUtil<SchoolStudentAward> util = new ExcelUtil<SchoolStudentAward>(SchoolStudentAward.class);
util.exportExcel(response, list, "学生嘉奖数据");
}
/**
* 导出学生嘉奖列表(已通过)
*/
@Log(title = "学生嘉奖", businessType = BusinessType.EXPORT)
@PostMapping("/exportYtg")
public void exportYtg(HttpServletResponse response, SchoolStudentAward schoolStudentAward)
{
schoolStudentAward.setAuditState("2");
List<SchoolStudentAward> list = schoolStudentAwardService.selectSchoolStudentAwardList(schoolStudentAward);
ExcelUtil<SchoolStudentAward> util = new ExcelUtil<SchoolStudentAward>(SchoolStudentAward.class);
util.exportExcel(response, list, "学生嘉奖数据");
}
/**
* 下载模板
*
* @return
*/
@PostMapping("/importTemplate")
public void importTemplate(HttpServletResponse response) {
ExcelUtil<SchoolStudentAwardVo> util = new ExcelUtil<>(SchoolStudentAwardVo.class);
util.importTemplateExcel(response, "学生嘉奖");
}
/**
* 导入(个人)
*
* @param file
* @return
* @throws Exception
*/
@PostMapping("/importDataGr")
public AjaxResult importDataGr(MultipartFile file) throws Exception {
ExcelUtil<SchoolStudentAwardVo> util = new ExcelUtil<SchoolStudentAwardVo>(SchoolStudentAwardVo.class);
List<SchoolStudentAwardVo> list = util.importExcel(file.getInputStream());
//校验
schoolStudentAwardService.checkImport(list);
//导入
list.forEach(list1 -> {
list1.setCreateById(SecurityUtils.getUserId());
list1.setCreateBy(SecurityUtils.getUsername());
list1.setCreateTime(DateUtils.getNowDate());
});
String message = schoolStudentAwardService.importExamDetail(list);
return AjaxResult.success(message);
}
/**
* 导入(管理员)
*
* @param file
* @return
* @throws Exception
*/
@PostMapping("/importData")
public AjaxResult importData(MultipartFile file) throws Exception {
ExcelUtil<SchoolStudentAwardVo> util = new ExcelUtil<SchoolStudentAwardVo>(SchoolStudentAwardVo.class);
List<SchoolStudentAwardVo> list = util.importExcel(file.getInputStream());
//校验
schoolStudentAwardService.checkImport(list);
//导入
list.forEach(list1 -> {
list1.setAuditState("2");
list1.setCreateById(SecurityUtils.getUserId());
list1.setCreateBy(SecurityUtils.getUsername());
list1.setCreateTime(DateUtils.getNowDate());
});
String message = schoolStudentAwardService.importExamDetail(list);
return AjaxResult.success(message);
}
/**
* 获取学生嘉奖详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolStudentAwardService.selectSchoolStudentAwardById(id));
}
/**
* 新增学生嘉奖(个人)
*/
@Log(title = "学生嘉奖", businessType = BusinessType.INSERT)
@PostMapping("/addGr")
public AjaxResult addGr(@RequestBody SchoolStudentAward schoolStudentAward)
{
return toAjax(schoolStudentAwardService.insertSchoolStudentAward(schoolStudentAward));
}
/**
* 新增学生嘉奖(管理员)
*/
@Log(title = "学生嘉奖", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SchoolStudentAward schoolStudentAward)
{
schoolStudentAward.setAuditState("2");
return toAjax(schoolStudentAwardService.insertSchoolStudentAward(schoolStudentAward));
}
/**
* 修改学生嘉奖
*/
@Log(title = "学生嘉奖", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SchoolStudentAward schoolStudentAward)
{
return toAjax(schoolStudentAwardService.updateSchoolStudentAward(schoolStudentAward));
}
/**
* 删除学生嘉奖
*/
@Log(title = "学生嘉奖", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(schoolStudentAwardService.deleteSchoolStudentAwardByIds(ids));
}
/**
* 提交审核
*/
@PostMapping("/submit")
@RepeatSubmit
public AjaxResult submit(@RequestBody SchoolStudentAward schoolStudentAward){
return toAjax(schoolStudentAwardService.submit(schoolStudentAward));
}
/**
* 根据学生身份证号查询学生嘉奖信息
*/
@GetMapping("/getStudentAwardList")
public TableDataInfo getStudentAwardList(SchoolStudentAward schoolStudentAward){
//查询已通过的数据
schoolStudentAward.setAuditState("2");
startPage();
List<SchoolStudentAward> list = schoolStudentAwardService.selectSchoolStudentAwardListTg(schoolStudentAward);
return getDataTable(list);
}
}
......@@ -16,9 +16,11 @@ import org.springframework.web.bind.annotation.RestController;
import yangtz.cs.liu.campus.controller.patrol.SchoolPatrolController;
import yangtz.cs.liu.campus.domain.SchoolStudentIntegral.SchoolStudentIntegral;
import yangtz.cs.liu.campus.domain.schoolClass.SchoolClass;
import yangtz.cs.liu.campus.domain.schoolRewardsPunishments.SchoolScDiscipline;
import yangtz.cs.liu.campus.domain.schoolgrade.SchoolGrade;
import yangtz.cs.liu.campus.service.ISchoolStudentIntegra.ISchoolStudentIntegralService;
import yangtz.cs.liu.campus.service.schoolClass.ISchoolClassService;
import yangtz.cs.liu.campus.service.schoolRewardsPunishments.ISchoolScDisciplineService;
import yangtz.cs.liu.campus.service.schoolgrade.ISchoolGradeService;
import yangtz.cs.liu.campus.service.student.ISchoolStudentService;
import yangtz.cs.liu.campus.service.teacher.ISchoolHeadMasterService;
......@@ -53,6 +55,10 @@ public class SchoolHeadMasterController extends BaseController {
@Autowired
private ISchoolStudentIntegralService integralService;
//学生违纪
@Autowired
private ISchoolScDisciplineService schoolScDisciplineService;
/**
* 查询班级列表 班主任
*
......@@ -143,4 +149,13 @@ public class SchoolHeadMasterController extends BaseController {
return term;
}
/**
*班主任-学生管理-学生违纪
*/
@GetMapping("/getStudentDiscipline")
public TableDataInfo getStudentDiscipline(SchoolScDiscipline schoolScDiscipline){
startPage();
List<SchoolScDiscipline> schoolScDisciplineList = schoolScDisciplineService.selectSchoolScDisciplineList(schoolScDiscipline);
return getDataTable(schoolScDisciplineList);
}
}
......@@ -19,22 +19,18 @@ import java.util.Date;
public class SchoolAccessory extends OurBaseEntity
{
/** 业务id */
@Excel(name = "业务id")
private Long businessId;
/** 模块名称 */
@Excel(name = "模块名称")
private String moduleName;
/** 附件类型 */
@Excel(name = "附件类型")
private String accessoryType;
/** 附件路径 */
@Excel(name = "附件路径")
@Excel(name = "证书图片")
private String accessoryUrl;
/** 附件名称 */
@Excel(name = "附件名称")
private String accessoryName;
}
......@@ -23,4 +23,10 @@ public class PubFile extends OurBaseEntity {
/** 附件类型 */
private String fjlx;
private String fileId;
private String fileName;
private String fileSize;
private String fileType;
private String spaceId;
}
......@@ -34,7 +34,7 @@ public class SchoolAnnualAssessment {
@Excel(name = "身份证")
private String idCard;
/** 考核结果(1优秀、2合格、3不定等次、4不予考核、5不合格) */
/** 考核结果(1优秀、2合格、3不定等次、4不予考核、5不合格、6记功、7嘉奖) */
@Excel(name = "考核结果")
private String checkResult;
......
......@@ -48,6 +48,9 @@ public class SchoolAclassTeacherAssessmentReq extends BaseEntity
/** 学科(下拉框) */
private String sub;
/** 学科过滤 */
private String sub1;
/** 班级(下拉框) */
private String className;
......
......@@ -38,6 +38,8 @@ public class SchoolAworkloadVo extends BaseEntity
/** 学科(下拉框) */
private String sub;
/** 学科过滤 */
private String sub1;
/** 身份证号集合 */
private List<String> idCards;
......
......@@ -28,6 +28,9 @@ public class SchoolGkAchievementVo extends BaseEntity
/** 学科(下拉框) */
private String sub;
/** 学科过滤 */
private String sub1;
/** 教师姓名 */
private String teacherName;
......
......@@ -102,6 +102,11 @@ public class SchoolTeacherBasicInformationVo extends BaseEntity {
private String teachingSubject;
/**
* 任教学科(1语文、2数学、3英语、4物理、5化学、6生物、7政治、8历史、9地理、10音乐、11体育、12美术、13技术、14心理、15书法)
*/
private String teachingSubject1;
/**
* 现职称(1无、2初级、3中级、4副高、5正高)
*/
@Excel(name = "现职称" ,dictType= "current_professional")
......
......@@ -36,6 +36,9 @@ public class SchoolXteamAwardVo extends BaseEntity
/** 学科 */
private String sub;
/** 学科过滤 */
private String sub1;
/** 获奖情况 */
private String awardSituation;
......
package yangtz.cs.liu.campus.domain.student;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 学生成绩对象 school_student_achievement
*
* @author ruoyi
* @date 2024-01-08
*/
@Data
public class SchoolStudentAchievement
{
private static final long serialVersionUID = 1L;
/** 主键id */
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/** 学年 */
@Excel(name = "学年")
private String schoolYear;
/** 学期 */
@Excel(name = "学期",dictType = "semester_jsdzda")
private String semester;
/** 届别 */
@Excel(name = "届别")
private String year;
/** 年级 */
@Excel(name = "年级",dictType = "grade_da")
private String grade;
/** 班级 */
@Excel(name = "班级")
private String className;
/** 班级类型 */
@Excel(name = "班级类型")
private String classType;
/** 姓名 */
@Excel(name = "姓名")
private String name;
/** 身份证号 */
@Excel(name = "身份证号")
private String idCard;
/** 语文成绩 */
@Excel(name = "语文成绩")
private BigDecimal languageScore;
/** 数学成绩 */
@Excel(name = "数学成绩")
private BigDecimal mathScore;
/** 英语成绩 */
@Excel(name = "英语成绩")
private BigDecimal englishScore;
/** 物理成绩 */
@Excel(name = "物理成绩")
private BigDecimal physicsScore;
/** 化学成绩 */
@Excel(name = "化学成绩")
private BigDecimal chemistryScore;
/** 生物成绩 */
@Excel(name = "生物成绩")
private BigDecimal biologyScore;
/** 政治成绩 */
@Excel(name = "政治成绩")
private BigDecimal politicsScore;
/** 历史成绩 */
@Excel(name = "历史成绩")
private BigDecimal historyScore;
/** 地理成绩 */
@Excel(name = "地理成绩")
private BigDecimal geographyScore;
/** 专业课名称 */
@Excel(name = "专业课名称")
private String specialityName;
/** 专业课成绩 */
@Excel(name = "专业课成绩")
private BigDecimal specialityScore;
/** 艺体课名称 */
@Excel(name = "艺体课名称")
private String eurhythmicsName;
/** 艺体课成绩 */
@Excel(name = "艺体课成绩")
private BigDecimal eurhythmicsScore;
/** 考试类型 */
@Excel(name = "考试类型",dictType = "exam_typeda")
private String examType;
/** 考试时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "考试时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date examTime;
/** 班主任id */
private Long classTeacherId;
/** 班主任 */
@Excel(name = "班主任")
private String classTeacher;
/** 创建人id */
private Long createById;
/** 创建者 */
private String createBy;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/** 修改人id */
private Long updateById;
/** 更新者 */
private String updateBy;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/** 删除状态 */
private String delFlag;
}
package yangtz.cs.liu.campus.domain.student;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 学生嘉奖对象 school_student_award
*
* @author ruoyi
* @date 2024-01-08
*/
@Data
public class SchoolStudentAward
{
private static final long serialVersionUID = 1L;
/** 主键id */
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/** 学年 */
@Excel(name = "学年")
private String schoolYear;
/** 学期 */
@Excel(name = "学期",dictType = "semester_jsdzda")
private String semester;
/** 届别 */
@Excel(name = "届别")
private String year;
/** 年级 */
@Excel(name = "年级",dictType = "grade_da")
private String grade;
/** 班级 */
@Excel(name = "班级")
private String className;
/** 班级类型 */
@Excel(name = "班级类型")
private String classType;
/** 姓名 */
@Excel(name = "姓名")
private String name;
/** 身份证号 */
@Excel(name = "身份证号")
private String idCard;
/** 性别 */
@Excel(name = "性别",dictType = "sys_user_sex")
private String sex;
/** 班主任id */
private Long classTeacherId;
/** 班主任 */
@Excel(name = "班主任")
private String classTeacher;
/** 级部主任id */
private Long departmentDirectorId;
/** 级部主任 */
@Excel(name = "级部主任")
private String departmentDirector;
/** 嘉奖类别 */
@Excel(name = "嘉奖类别")
private String awardType;
/** 嘉奖级别 */
@Excel(name = "嘉奖级别",dictType = "student_award_rank")
private String awardRank;
/** 嘉奖时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "嘉奖时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date awardTime;
/** 备注 */
@Excel(name = "备注")
private String remark;
/** 审核状态 */
@Excel(name = "审核状态", dictType = "audit_state")
private String auditState;
/** 创建人id */
private Long createById;
/** 创建者 */
private String createBy;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/** 修改人id */
private Long updateById;
/** 更新者 */
private String updateBy;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/** 删除状态 */
private String delFlag;
}
......@@ -26,4 +26,10 @@ public interface SchoolTeacherBasichlnformationMapper extends BaseMapper<SchoolT
*/
List<String> selectIdCardsByDdPhone(@Param("userPhones") List<String> userPhones);
/**
* 根据手机号查询学科
* @return
*/
String selectSubByDdPhone(@Param("ddPhone") String ddPhone);
}
package yangtz.cs.liu.campus.mapper.schoolRewardsPunishments;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory;
import yangtz.cs.liu.campus.domain.schoolRewardsPunishments.SchoolScDiscipline;
import yangtz.cs.liu.campus.vo.schoolRewardsPunishments.SchoolScDisciplineVo;
import java.util.List;
import java.util.Map;
......@@ -41,18 +43,18 @@ public interface SchoolScDisciplineMapper extends BaseMapper<SchoolScDiscipline>
/**
* 新增学生违纪
*
* @param schoolScDiscipline 学生违纪
* @param schoolScDisciplineVo 学生违纪
* @return 结果
*/
public int insertSchoolScDiscipline(SchoolScDiscipline schoolScDiscipline);
public int insertSchoolScDiscipline(SchoolScDisciplineVo schoolScDisciplineVo);
/**
* 修改学生违纪
*
* @param schoolScDiscipline 学生违纪
* @param schoolScDisciplineVo 学生违纪
* @return 结果
*/
public int updateSchoolScDiscipline(SchoolScDiscipline schoolScDiscipline);
public int updateSchoolScDiscipline(SchoolScDisciplineVo schoolScDisciplineVo);
/**
* 删除学生违纪
......@@ -83,5 +85,21 @@ public interface SchoolScDisciplineMapper extends BaseMapper<SchoolScDiscipline>
*/
List<Map<String, Object>> getClassList(Long gradeId);
/**
* 新增学生违纪附件
* @param list
*/
int batchSchoolAccessory(List<SchoolAccessory> list);
/**
* 批量删除学生违纪附件
* @param ids
*/
void deleteSchoolAccessoryByBusinessIds(Long[] ids);
/**
* 删除学生违纪附件
* @param id
*/
void deleteSchoolAccessoryByBusinessId(Long id);
}
package yangtz.cs.liu.campus.mapper.student;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import yangtz.cs.liu.campus.domain.student.SchoolStudentAchievement;
/**
* 学生成绩Mapper接口
*
* @author ruoyi
* @date 2024-01-08
*/
public interface SchoolStudentAchievementMapper extends BaseMapper<SchoolStudentAchievement>
{
/**
* 查询学生成绩
*
* @param id 学生成绩主键
* @return 学生成绩
*/
public SchoolStudentAchievement selectSchoolStudentAchievementById(Long id);
/**
* 查询学生成绩列表
*
* @param schoolStudentAchievement 学生成绩
* @return 学生成绩集合
*/
public List<SchoolStudentAchievement> selectSchoolStudentAchievementList(SchoolStudentAchievement schoolStudentAchievement);
/**
* 新增学生成绩
*
* @param schoolStudentAchievement 学生成绩
* @return 结果
*/
public int insertSchoolStudentAchievement(SchoolStudentAchievement schoolStudentAchievement);
/**
* 修改学生成绩
*
* @param schoolStudentAchievement 学生成绩
* @return 结果
*/
public int updateSchoolStudentAchievement(SchoolStudentAchievement schoolStudentAchievement);
/**
* 删除学生成绩
*
* @param id 学生成绩主键
* @return 结果
*/
public int deleteSchoolStudentAchievementById(Long id);
/**
* 批量删除学生成绩
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolStudentAchievementByIds(Long[] ids);
}
package yangtz.cs.liu.campus.mapper.student;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import yangtz.cs.liu.campus.domain.student.SchoolStudentAward;
/**
* 学生嘉奖Mapper接口
*
* @author ruoyi
* @date 2024-01-08
*/
public interface SchoolStudentAwardMapper extends BaseMapper<SchoolStudentAward>
{
/**
* 查询学生嘉奖
*
* @param id 学生嘉奖主键
* @return 学生嘉奖
*/
public SchoolStudentAward selectSchoolStudentAwardById(Long id);
/**
* 查询学生嘉奖列表
*
* @param schoolStudentAward 学生嘉奖
* @return 学生嘉奖集合
*/
public List<SchoolStudentAward> selectSchoolStudentAwardList(SchoolStudentAward schoolStudentAward);
/**
* 新增学生嘉奖
*
* @param schoolStudentAward 学生嘉奖
* @return 结果
*/
public int insertSchoolStudentAward(SchoolStudentAward schoolStudentAward);
/**
* 修改学生嘉奖
*
* @param schoolStudentAward 学生嘉奖
* @return 结果
*/
public int updateSchoolStudentAward(SchoolStudentAward schoolStudentAward);
/**
* 删除学生嘉奖
*
* @param id 学生嘉奖主键
* @return 结果
*/
public int deleteSchoolStudentAwardById(Long id);
/**
* 批量删除学生嘉奖
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolStudentAwardByIds(Long[] ids);
/**
* 查询已通过的学生嘉奖列表
* @param schoolStudentAward
* @return
*/
List<SchoolStudentAward> selectSchoolStudentAwardListTg(SchoolStudentAward schoolStudentAward);
}
......@@ -813,6 +813,16 @@ public class SchoolTeacherBasichlnformationServicelmpl extends ServiceImpl<Schoo
return teacherBasichlnformationMapper.selectIdCardsByDdPhone(userPhones);
}
/**
* 根据手机号查询学科
* @param ddPhone
* @return
*/
@Override
public String selectSubByDdPhone(String ddPhone) {
return teacherBasichlnformationMapper.selectSubByDdPhone(ddPhone);
}
@Override
public String importTeacherPicture(MultipartFile uploadFile) {
......
......@@ -291,7 +291,7 @@ public class SchoolXteachingAchievementsServiceImpl extends ServiceImpl<SchoolXt
failureMsg.append("<br/>" + failureNum + "、学年输入格式错误,请您重新输入! ");
}else {
String[] split = schoolYear.split("-");
if (split.length > 2){
if (split.length != 2){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、学年输入格式错误,请您重新输入! ");
} else if (!(split[0].matches("\\d+") && split[1].matches("\\d+"))){
......
......@@ -184,7 +184,7 @@ public class SchoolScAwardsServiceImpl extends ServiceImpl<SchoolScAwardsMapper,
for (SchoolAccessory schoolAccessory : schoolAccessoryList)
{
schoolAccessory.setBusinessId(id);
schoolAccessory.setModuleName("获奖与违纪-学校获奖");
schoolAccessory.setModuleName("学校获奖");
schoolAccessory.setAccessoryType("学校获奖附件");
schoolAccessory.setCreateBy(SecurityUtils.getUsername());
schoolAccessory.setCreateTime(DateUtils.getNowDate());
......
package yangtz.cs.liu.campus.service.impl.schoolRewardsPunishments;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.mapper.SysDictDataMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory;
import yangtz.cs.liu.campus.domain.schoolRewardsPunishments.SchoolScDiscipline;
import yangtz.cs.liu.campus.mapper.accessory.AccessoryMapper;
import yangtz.cs.liu.campus.mapper.schoolRewardsPunishments.SchoolScDisciplineMapper;
import yangtz.cs.liu.campus.service.impl.schoolNewTeacherDzdn.SchoolXteachingAchievementsServiceImpl;
import yangtz.cs.liu.campus.service.schoolRewardsPunishments.ISchoolScDisciplineService;
import yangtz.cs.liu.campus.vo.schoolRewardsPunishments.SchoolScDisciplineVo;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
......@@ -24,6 +40,12 @@ public class SchoolScDisciplineServiceImpl extends ServiceImpl<SchoolScDisciplin
{
@Autowired
private SchoolScDisciplineMapper schoolScDisciplineMapper;
@Autowired
private SysDictDataMapper sysDictDataMapper;
@Autowired
private AccessoryMapper accessoryMapper;
private Logger log = LoggerFactory.getLogger(SchoolScDisciplineServiceImpl.class);
/**
* 查询学生违纪
......@@ -32,9 +54,18 @@ public class SchoolScDisciplineServiceImpl extends ServiceImpl<SchoolScDisciplin
* @return 学生违纪
*/
@Override
public SchoolScDiscipline selectSchoolScDisciplineById(Long id)
public SchoolScDisciplineVo selectSchoolScDisciplineById(Long id)
{
return schoolScDisciplineMapper.selectSchoolScDisciplineById(id);
SchoolScDiscipline schoolScDiscipline = schoolScDisciplineMapper.selectSchoolScDisciplineById(id);
LambdaQueryWrapper<SchoolAccessory> wrapper = new LambdaQueryWrapper<SchoolAccessory>();
wrapper.eq(SchoolAccessory::getAccessoryType,"学生违纪附件");
wrapper.eq(SchoolAccessory::getBusinessId,id);
List<SchoolAccessory> list = accessoryMapper.selectList(wrapper);
//转vo
SchoolScDisciplineVo schoolScDisciplineVo = new SchoolScDisciplineVo();
BeanUtils.copyProperties(schoolScDiscipline,schoolScDisciplineVo);
schoolScDisciplineVo.setSchoolAccessoryList(list);
return schoolScDisciplineVo;
}
/**
......@@ -64,33 +95,66 @@ public class SchoolScDisciplineServiceImpl extends ServiceImpl<SchoolScDisciplin
/**
* 新增学生违纪
*
* @param schoolScDiscipline 学生违纪
* @param schoolScDisciplineVo 学生违纪
* @return 结果
*/
@Override
public int insertSchoolScDiscipline(SchoolScDiscipline schoolScDiscipline)
@Transactional
public int insertSchoolScDiscipline(SchoolScDisciplineVo schoolScDisciplineVo)
{
SysUser user = SecurityUtils.getLoginUser().getUser();
schoolScDiscipline.setApplyId(user.getUserId());
schoolScDiscipline.setApplyName(user.getUserName());
schoolScDiscipline.setApplyTime(DateUtils.getNowDate());
schoolScDiscipline.setCreateBy(user.getUserName());
schoolScDiscipline.setCreateTime(DateUtils.getNowDate());
return schoolScDisciplineMapper.insertSchoolScDiscipline(schoolScDiscipline);
schoolScDisciplineVo.setApplyId(user.getUserId());
schoolScDisciplineVo.setApplyName(user.getUserName());
schoolScDisciplineVo.setApplyTime(DateUtils.getNowDate());
schoolScDisciplineVo.setCreateBy(user.getUserName());
schoolScDisciplineVo.setCreateTime(DateUtils.getNowDate());
int i = schoolScDisciplineMapper.insertSchoolScDiscipline(schoolScDisciplineVo);
insertSchoolAccessory(schoolScDisciplineVo);
return i;
}
/**
* 新增学生违纪附件
* @param schoolScDisciplineVo
*/
private void insertSchoolAccessory(SchoolScDisciplineVo schoolScDisciplineVo) {
List<SchoolAccessory> schoolAccessoryList = schoolScDisciplineVo.getSchoolAccessoryList();
Long id = schoolScDisciplineVo.getId();
if (StringUtils.isNotNull(schoolAccessoryList))
{
List<SchoolAccessory> list = new ArrayList<SchoolAccessory>();
for (SchoolAccessory schoolAccessory : schoolAccessoryList)
{
schoolAccessory.setBusinessId(id);
schoolAccessory.setModuleName("学生违纪");
schoolAccessory.setAccessoryType("学生违纪附件");
schoolAccessory.setCreateBy(SecurityUtils.getUsername());
schoolAccessory.setCreateTime(DateUtils.getNowDate());
list.add(schoolAccessory);
}
if (list.size() > 0)
{
schoolScDisciplineMapper.batchSchoolAccessory(list);
}
}
}
/**
* 修改学生违纪
*
* @param schoolScDiscipline 学生违纪
* @param schoolScDisciplineVo 学生违纪
* @return 结果
*/
@Override
public int updateSchoolScDiscipline(SchoolScDiscipline schoolScDiscipline)
public int updateSchoolScDiscipline(SchoolScDisciplineVo schoolScDisciplineVo)
{
schoolScDiscipline.setUpdateBy(SecurityUtils.getUsername());
schoolScDiscipline.setUpdateTime(DateUtils.getNowDate());
return schoolScDisciplineMapper.updateSchoolScDiscipline(schoolScDiscipline);
schoolScDisciplineVo.setUpdateBy(SecurityUtils.getUsername());
schoolScDisciplineVo.setUpdateTime(DateUtils.getNowDate());
//删除学生违纪附件
schoolScDisciplineMapper.deleteSchoolAccessoryByBusinessId(schoolScDisciplineVo.getId());
//新增学生违纪附件
insertSchoolAccessory(schoolScDisciplineVo);
return schoolScDisciplineMapper.updateSchoolScDiscipline(schoolScDisciplineVo);
}
/**
......@@ -102,6 +166,8 @@ public class SchoolScDisciplineServiceImpl extends ServiceImpl<SchoolScDisciplin
@Override
public int deleteSchoolScDisciplineByIds(Long[] ids)
{
//删除学生违纪附件
schoolScDisciplineMapper.deleteSchoolAccessoryByBusinessIds(ids);
return schoolScDisciplineMapper.deleteSchoolScDisciplineByIds(ids);
}
......@@ -114,6 +180,8 @@ public class SchoolScDisciplineServiceImpl extends ServiceImpl<SchoolScDisciplin
@Override
public int deleteSchoolScDisciplineById(Long id)
{
//删除学生违纪附件
schoolScDisciplineMapper.deleteSchoolAccessoryByBusinessId(id);
return schoolScDisciplineMapper.deleteSchoolScDisciplineById(id);
}
......@@ -135,4 +203,241 @@ public class SchoolScDisciplineServiceImpl extends ServiceImpl<SchoolScDisciplin
public List<Map<String, Object>> getClassList(Long gradeId) {
return schoolScDisciplineMapper.getClassList(gradeId);
}
/**
* 下载模板
* @param response
*/
@Override
public void importTemplate(HttpServletResponse response) {
// 以流的形式下载文件。
try {
//读取文件
InputStream resourceAsStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("file/学生违纪导入模板.xlsx");
InputStream fis = new BufferedInputStream(resourceAsStream);
byte[] buffer = new byte[fis.available()];
fis.read(buffer);
fis.close();
// 清空response
response.reset();
// 设置response的Header
response.setHeader("Content-Disposition", "attachment;filename="+java.net.URLEncoder.encode("学生违纪导入模板.xlsx", "utf-8"));
//response.addHeader("Content-Disposition", "attachment;filename=" + new String(filename.getBytes()));
response.addHeader("Content-Length", "" + buffer.length);
OutputStream toClient = new BufferedOutputStream(response.getOutputStream());
response.setContentType("application/octet-stream");
toClient.write(buffer);
toClient.flush();
toClient.close();
} catch (IOException e) {
log.info(e.getMessage());
}
}
/**
* 校验数据
* @param list
*/
@Override
public void checkImport(List<SchoolScDisciplineVo> list) {
//检验是否为空
if (StringUtils.isNull(list) || list.size() == 0) {
throw new ServiceException("导入数据不能为空");
}
//查询学期字典键值
List<SysDictData> semester = sysDictDataMapper.selectDictDataByType("semester_jsdzda");
//查询班级类型字典键值
List<SysDictData> classType = sysDictDataMapper.selectDictDataByType("class_type");
//查询违纪类别字典键值
List<SysDictData> wjlb = sysDictDataMapper.selectDictDataByType("violate_type");
//查询违纪次数字典键值
List<SysDictData> wjcs = sysDictDataMapper.selectDictDataByType("violate_num");
//查询处分结果字典键值
List<SysDictData> cfjg = sysDictDataMapper.selectDictDataByType("punish_result");
// 准备记录日志数据
int failureNum = 0;
StringBuilder failureMsg = new StringBuilder();
for (SchoolScDisciplineVo schoolScDisciplineVo : list) {
if (StringUtils.isEmpty(schoolScDisciplineVo.getSchoolYear())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、学年为空,请您重新输入! ");
}else if (StringUtils.isEmpty(schoolScDisciplineVo.getSemester())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、学期为空,请您重新输入! ");
}else if (StringUtils.isEmpty(schoolScDisciplineVo.getGradeYear())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、届别为空,请您重新输入! ");
}else if (StringUtils.isEmpty(schoolScDisciplineVo.getGradeName())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、年级为空,请您重新输入! ");
}else if (StringUtils.isEmpty(schoolScDisciplineVo.getClassName())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、班级为空,请您重新输入! ");
}else if (StringUtils.isEmpty(schoolScDisciplineVo.getClassType())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、班级类型为空,请您重新输入! ");
}else if (StringUtils.isEmpty(schoolScDisciplineVo.getName())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、姓名为空,请您重新输入! ");
}else if (StringUtils.isEmpty(schoolScDisciplineVo.getIdCard())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、身份证号为空,请您重新输入! ");
}else if (StringUtils.isEmpty(schoolScDisciplineVo.getViolateType())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、违纪类别为空,请您重新输入! ");
}else if (StringUtils.isEmpty(schoolScDisciplineVo.getViolateNum())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、违纪次数为空,请您重新输入! ");
}else if (StringUtils.isEmpty(schoolScDisciplineVo.getPunishResult())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、处分结果为空,请您重新输入! ");
}else if (StringUtils.isNull(schoolScDisciplineVo.getPunishTime())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、处分时间为空或输入错误,请您重新输入! ");
}else if (schoolScDisciplineVo.getIdCard().length() != 18 && schoolScDisciplineVo.getIdCard().length() != 15){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、身份证号输入错误,请您重新输入! ");
}else {
//判断学年输入是否正确
String schoolYear = schoolScDisciplineVo.getSchoolYear();
if (!schoolYear.contains("-")){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、学年输入格式错误,请您重新输入! ");
}else {
String[] split = schoolYear.split("-");
if (split.length != 2) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、学年输入格式错误,请您重新输入! ");
} else if (!(split[0].matches("\\d+") && split[1].matches("\\d+"))) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、学年输入格式错误,请您重新输入! ");
}else {
//判断学期输入是否正确
String semester1 = "";
for (SysDictData sysDictData : semester) {
if (schoolScDisciplineVo.getSemester().equals(sysDictData.getDictLabel())){
semester1 = sysDictData.getDictValue();
}
}
if (StringUtils.isEmpty(semester1)){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、学期输入错误,请您重新输入! ");
}else {
schoolScDisciplineVo.setSemester(semester1);
//判断届别输入是否正确
if (!schoolScDisciplineVo.getGradeYear().matches("\\d+")){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、届别输入错误,请您重新输入! ");
}else {
//判断班级类别输入是否正确
String classType1 = "";
for (SysDictData sysDictData : classType) {
if (schoolScDisciplineVo.getClassType().equals(sysDictData.getDictLabel())){
classType1 = sysDictData.getDictValue();
}
}
String sex = "";
if (StringUtils.isNotEmpty(schoolScDisciplineVo.getSex())){
if (schoolScDisciplineVo.getSex().equals("男") || schoolScDisciplineVo.getSex().equals("女")){
sex = schoolScDisciplineVo.getSex();
}
}
if (StringUtils.isEmpty(classType1)){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、班级类型输入错误,请您重新输入! ");
}else if (StringUtils.isEmpty(sex) && StringUtils.isNotEmpty(schoolScDisciplineVo.getSex())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、性别输入错误,请您重新输入! ");
}else {
schoolScDisciplineVo.setClassType(classType1);
schoolScDisciplineVo.setSex(sex);
//判断身份证号输入是否正确
String idCard = "";
if(schoolScDisciplineVo.getIdCard().length() == 18){
//校验前十七位是否为数字
for (int i = 0; i < 17; i++) {
if (!Character.isDigit(schoolScDisciplineVo.getIdCard().charAt(i))){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、身份证号输入错误,请您重新输入! ");
idCard += i;
break;
}
}
}
if (StringUtils.isEmpty(idCard)){
//判断违纪类别输入是否正确
String wjlb1 = "";
for (SysDictData sysDictData : wjlb) {
if (schoolScDisciplineVo.getViolateType().equals(sysDictData.getDictLabel())){
wjlb1 = sysDictData.getDictValue();
}
}
//判断违纪次数输入是否正确
String wjcs1 = "";
for (SysDictData sysDictData : wjcs) {
if (schoolScDisciplineVo.getViolateNum().equals(sysDictData.getDictLabel())){
wjcs1 = sysDictData.getDictValue();
}
}
//判断处分结果输入是否正确
String cfjg1 = "";
for (SysDictData sysDictData : cfjg) {
if (schoolScDisciplineVo.getPunishResult().equals(sysDictData.getDictLabel())){
cfjg1 = sysDictData.getDictValue();
}
}
if (StringUtils.isEmpty(wjlb1)){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、违纪类别输入错误,请您重新输入! ");
}else if (StringUtils.isEmpty(wjcs1)){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、违纪次数输入错误,请您重新输入! ");
}else if (StringUtils.isEmpty(cfjg1)){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、处分结果输入错误,请您重新输入! ");
}
}
}
}
}
}
}
}
schoolScDisciplineVo.setAuditState("2");
}
if (failureNum > 0) {
failureMsg.insert(0, "很抱歉,导入失败!共" + failureNum + "条数据格式不正确,错误如下:");
throw new ServiceException(failureMsg.toString());
}
}
/**
* 导入数据
* @param list
* @return
*/
@Override
public String importData(List<SchoolScDisciplineVo> list) {
StringBuilder successMsg = new StringBuilder();
List<SchoolScDiscipline> schoolScDisciplineList = new ArrayList<>();
for (SchoolScDisciplineVo schoolScDisciplineVo : list) {
//转实体对象
SchoolScDiscipline schoolScDiscipline = new SchoolScDiscipline();
BeanUtils.copyProperties(schoolScDisciplineVo,schoolScDiscipline);
schoolScDisciplineList.add(schoolScDiscipline);
}
boolean b = saveBatch(schoolScDisciplineList);
if (!b){
throw new ServiceException("导入失败");
}
successMsg.insert(0, "恭喜您,数据已导入成功!");
return successMsg.toString();
}
}
......@@ -2,20 +2,26 @@ package yangtz.cs.liu.campus.service.impl.schooloffical;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dingtalk.api.request.OapiMessageCorpconversationAsyncsendV2Request;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.file.PubFile;
import yangtz.cs.liu.campus.domain.schooloffical.SchoolOfficial;
import yangtz.cs.liu.campus.domain.schooloffical.SchoolOfficialFlow;
import yangtz.cs.liu.campus.domain.temp.OfficalTemplate;
import yangtz.cs.liu.campus.mapper.pubFile.PubFileMapper;
import yangtz.cs.liu.campus.mapper.schooloffical.SchoolOfficialFlowMapper;
import yangtz.cs.liu.campus.mapper.schooloffical.SchoolOfficialMapper;
import yangtz.cs.liu.campus.mapper.teacher.SchoolTeacherMapper;
import yangtz.cs.liu.campus.service.schooloffical.ISchoolOfficalService;
import yangtz.cs.liu.campus.service.schooloffical.ISchoolOfficialFlowService;
import yangtz.cs.liu.campus.vo.schoolOfficial.SchoolOfficialFlowVo;
import yangtz.cs.liu.dingding.utils.DingMessageUtils;
import yangtz.cs.liu.dingding.vo.DingMessageVo;
import yangtz.cs.liu.wechat.service.api.IWxApiService;
import java.util.ArrayList;
......@@ -42,6 +48,18 @@ public class ISchoolOfficialFlowImpl extends ServiceImpl<SchoolOfficialFlowMappe
@Autowired
private SchoolTeacherMapper teacherMapper;
@Autowired
private DingMessageUtils dingMessageUtils;
@Value("${dd.message-uri}")
private String messageUrl;
@Value("${dd.pc-message-uri}")
private String pcMessageUrl;
@Autowired
private PubFileMapper pubFileMapper;
@Override
public boolean flow(SchoolOfficialFlow schoolOfficialFlow) {
......@@ -91,18 +109,40 @@ public class ISchoolOfficialFlowImpl extends ServiceImpl<SchoolOfficialFlowMappe
int num = schoolOfficialFlowMapper.updateById(initiator);
/******* 需要发送模板消息到 发起人 ******/
OfficalTemplate template = new OfficalTemplate();
template.setFirst("您好,您有一个新的公文需要处理");
//String openId = userService.getOpenIdByUserId(initiator.getReceiveUser());
String openId = teacherMapper.getOpenIdByUserId(initiator.getReceiveUser());
template.setToUserOpenId(openId);
//公文信息
SchoolOfficial schoolOffical = officialMapper.selectById(flow.getOfficialId());
template.setTitle(schoolOffical.getIssuedName());
template.setFinishTime(schoolOffical.getDeadline());
template.setContent("请选择批阅人或传阅人");
template.setRemark("请您前往电脑端进行处理");
String s = wxApiService.sendOfficalTemplate(template);
//获取钉钉用户id
String ddUserId = teacherMapper.getDdUserIdByUserId(initiator.getReceiveUser());
OapiMessageCorpconversationAsyncsendV2Request.Msg msg = new OapiMessageCorpconversationAsyncsendV2Request.Msg();
msg.setOa(new OapiMessageCorpconversationAsyncsendV2Request.OA());
msg.getOa().setHead(new OapiMessageCorpconversationAsyncsendV2Request.Head());
msg.getOa().getHead().setText("text");
msg.getOa().getHead().setBgcolor("FF4BB3F9");
msg.getOa().setBody(new OapiMessageCorpconversationAsyncsendV2Request.Body());
msg.getOa().getBody().setAuthor("");
msg.getOa().getBody().setContent("请您及时处理");
msg.getOa().getBody().setTitle("您好,您有一个新的公文需要处理");
msg.getOa().setPcMessageUrl(pcMessageUrl);
msg.getOa().setMessageUrl(messageUrl);
msg.setMsgtype("oa");
DingMessageVo messageVo = new DingMessageVo();
messageVo.setMsg(msg);
messageVo.setToAllUser(false);
messageVo.setUseridList(ddUserId);
dingMessageUtils.sendMessage(messageVo);
// OfficalTemplate template = new OfficalTemplate();
// template.setFirst("您好,您有一个新的公文需要处理");
// //String openId = userService.getOpenIdByUserId(initiator.getReceiveUser());
// String openId = teacherMapper.getOpenIdByUserId(initiator.getReceiveUser());
// template.setToUserOpenId(openId);
// //公文信息
// SchoolOfficial schoolOffical = officialMapper.selectById(flow.getOfficialId());
// template.setTitle(schoolOffical.getIssuedName());
// template.setFinishTime(schoolOffical.getDeadline());
// template.setContent("请选择批阅人或传阅人");
// template.setRemark("请您前往电脑端进行处理");
// String s = wxApiService.sendOfficalTemplate(template);
return num;
}
return 0;
......@@ -133,17 +173,39 @@ public class ISchoolOfficialFlowImpl extends ServiceImpl<SchoolOfficialFlowMappe
flow.setState(UNDONE);
if(schoolOfficialFlowMapper.insert(flow) > 0){
/******* 需要发送模板消息到 批阅人 ******/
OfficalTemplate template = new OfficalTemplate();
template.setFirst("您好,您有一个新的公文需要批阅");
//String openId = userService.getOpenIdByUserId(userId);
String openId = teacherMapper.getOpenIdByUserId(userId);
template.setToUserOpenId(openId);
//公文信息
template.setTitle(schoolOffical.getIssuedName());
template.setFinishTime(schoolOffical.getDeadline());
template.setContent("请领导批阅");
template.setRemark("请您前往电脑端进行处理");
String s = wxApiService.sendOfficalTemplate(template);
//获取钉钉用户id
String ddUserId = teacherMapper.getDdUserIdByUserId(userId);
OapiMessageCorpconversationAsyncsendV2Request.Msg msg = new OapiMessageCorpconversationAsyncsendV2Request.Msg();
msg.setOa(new OapiMessageCorpconversationAsyncsendV2Request.OA());
msg.getOa().setHead(new OapiMessageCorpconversationAsyncsendV2Request.Head());
msg.getOa().getHead().setText("text");
msg.getOa().getHead().setBgcolor("FF4BB3F9");
msg.getOa().setBody(new OapiMessageCorpconversationAsyncsendV2Request.Body());
msg.getOa().getBody().setAuthor("");
msg.getOa().getBody().setContent("请您及时批阅");
msg.getOa().getBody().setTitle("您好,您有一个新的公文需要批阅");
msg.getOa().setPcMessageUrl(pcMessageUrl);
msg.getOa().setMessageUrl(messageUrl);
msg.setMsgtype("oa");
DingMessageVo messageVo = new DingMessageVo();
messageVo.setMsg(msg);
messageVo.setToAllUser(false);
messageVo.setUseridList(ddUserId);
dingMessageUtils.sendMessage(messageVo);
// OfficalTemplate template = new OfficalTemplate();
// template.setFirst("您好,您有一个新的公文需要批阅");
// //String openId = userService.getOpenIdByUserId(userId);
// String openId = teacherMapper.getOpenIdByUserId(userId);
// template.setToUserOpenId(openId);
// //公文信息
// template.setTitle(schoolOffical.getIssuedName());
// template.setFinishTime(schoolOffical.getDeadline());
// template.setContent("请领导批阅");
// template.setRemark("请您前往电脑端进行处理");
// String s = wxApiService.sendOfficalTemplate(template);
return editInitiator(id);
}
}
......@@ -160,17 +222,39 @@ public class ISchoolOfficialFlowImpl extends ServiceImpl<SchoolOfficialFlowMappe
if(schoolOfficialFlowMapper.insert(circulator) > 0){
num++;
/******* 需要发送模板消息到 传阅人 ******/
OfficalTemplate template = new OfficalTemplate();
template.setFirst("您好,您有一个新的公文需要查看");
//String openId = userService.getOpenIdByUserId(user);
String openId = teacherMapper.getOpenIdByUserId(user);
template.setToUserOpenId(openId);
//公文信息
template.setTitle(schoolOffical.getIssuedName());
template.setFinishTime(schoolOffical.getDeadline());
template.setContent("请查看");
template.setRemark("请您前往电脑端进行查看");
String s = wxApiService.sendOfficalTemplate(template);
//获取钉钉用户id
String ddUserId = teacherMapper.getDdUserIdByUserId(user);
OapiMessageCorpconversationAsyncsendV2Request.Msg msg = new OapiMessageCorpconversationAsyncsendV2Request.Msg();
msg.setOa(new OapiMessageCorpconversationAsyncsendV2Request.OA());
msg.getOa().setHead(new OapiMessageCorpconversationAsyncsendV2Request.Head());
msg.getOa().getHead().setText("text");
msg.getOa().getHead().setBgcolor("FF4BB3F9");
msg.getOa().setBody(new OapiMessageCorpconversationAsyncsendV2Request.Body());
msg.getOa().getBody().setAuthor("");
msg.getOa().getBody().setContent("请您及时查看");
msg.getOa().getBody().setTitle("您好,您有一个新的公文需要查看");
msg.getOa().setPcMessageUrl(pcMessageUrl);
msg.getOa().setMessageUrl(messageUrl);
msg.setMsgtype("oa");
DingMessageVo messageVo = new DingMessageVo();
messageVo.setMsg(msg);
messageVo.setToAllUser(false);
messageVo.setUseridList(ddUserId);
dingMessageUtils.sendMessage(messageVo);
// OfficalTemplate template = new OfficalTemplate();
// template.setFirst("您好,您有一个新的公文需要查看");
// //String openId = userService.getOpenIdByUserId(user);
// String openId = teacherMapper.getOpenIdByUserId(user);
// template.setToUserOpenId(openId);
// //公文信息
// template.setTitle(schoolOffical.getIssuedName());
// template.setFinishTime(schoolOffical.getDeadline());
// template.setContent("请查看");
// template.setRemark("请您前往电脑端进行查看");
// String s = wxApiService.sendOfficalTemplate(template);
}
}
if(userIds.length == num){
......@@ -196,6 +280,16 @@ public class ISchoolOfficialFlowImpl extends ServiceImpl<SchoolOfficialFlowMappe
return schoolOfficialFlowMapper.updateById(flow);
}
/**
* 修改附件
* @param pubFile
* @return
*/
@Override
public int updateFile(PubFile pubFile) {
return pubFileMapper.updateById(pubFile);
}
//发起人操作后,修改发起人那条数据状态
public int editInitiator(Long id){
//修改发起人状态
......
package yangtz.cs.liu.campus.service.impl.student;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.mapper.SysDictDataMapper;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.mapper.student.SchoolStudentAchievementMapper;
import yangtz.cs.liu.campus.domain.student.SchoolStudentAchievement;
import yangtz.cs.liu.campus.service.student.ISchoolStudentAchievementService;
import yangtz.cs.liu.campus.vo.student.SchoolStudentAchievementVo;
/**
* 学生成绩Service业务层处理
*
* @author ruoyi
* @date 2024-01-08
*/
@Service
public class SchoolStudentAchievementServiceImpl extends ServiceImpl<SchoolStudentAchievementMapper,SchoolStudentAchievement> implements ISchoolStudentAchievementService
{
@Autowired
private SchoolStudentAchievementMapper schoolStudentAchievementMapper;
@Autowired
private SysDictDataMapper sysDictDataMapper;
/**
* 查询学生成绩
*
* @param id 学生成绩主键
* @return 学生成绩
*/
@Override
public SchoolStudentAchievement selectSchoolStudentAchievementById(Long id)
{
return schoolStudentAchievementMapper.selectSchoolStudentAchievementById(id);
}
/**
* 查询学生成绩列表
*
* @param schoolStudentAchievement 学生成绩
* @return 学生成绩
*/
@Override
public List<SchoolStudentAchievement> selectSchoolStudentAchievementList(SchoolStudentAchievement schoolStudentAchievement)
{
return schoolStudentAchievementMapper.selectSchoolStudentAchievementList(schoolStudentAchievement);
}
/**
* 新增学生成绩
*
* @param schoolStudentAchievement 学生成绩
* @return 结果
*/
@Override
public int insertSchoolStudentAchievement(SchoolStudentAchievement schoolStudentAchievement)
{
schoolStudentAchievement.setCreateById(SecurityUtils.getUserId());
schoolStudentAchievement.setCreateBy(SecurityUtils.getUsername());
schoolStudentAchievement.setCreateTime(DateUtils.getNowDate());
return schoolStudentAchievementMapper.insertSchoolStudentAchievement(schoolStudentAchievement);
}
/**
* 修改学生成绩
*
* @param schoolStudentAchievement 学生成绩
* @return 结果
*/
@Override
public int updateSchoolStudentAchievement(SchoolStudentAchievement schoolStudentAchievement)
{
schoolStudentAchievement.setUpdateById(SecurityUtils.getUserId());
schoolStudentAchievement.setUpdateBy(SecurityUtils.getUsername());
schoolStudentAchievement.setUpdateTime(DateUtils.getNowDate());
return schoolStudentAchievementMapper.updateSchoolStudentAchievement(schoolStudentAchievement);
}
/**
* 批量删除学生成绩
*
* @param ids 需要删除的学生成绩主键
* @return 结果
*/
@Override
public int deleteSchoolStudentAchievementByIds(Long[] ids)
{
return schoolStudentAchievementMapper.deleteSchoolStudentAchievementByIds(ids);
}
/**
* 删除学生成绩信息
*
* @param id 学生成绩主键
* @return 结果
*/
@Override
public int deleteSchoolStudentAchievementById(Long id)
{
return schoolStudentAchievementMapper.deleteSchoolStudentAchievementById(id);
}
/**
* 校验数据
* @param list
*/
@Override
public void checkImport(List<SchoolStudentAchievementVo> list) {
//检验是否为空
if (StringUtils.isNull(list) || list.size() == 0) {
throw new ServiceException("导入数据不能为空");
}
// 准备记录日志数据
int failureNum = 0;
StringBuilder failureMsg = new StringBuilder();
//查询学期字典键值
List<SysDictData> semester = sysDictDataMapper.selectDictDataByType("semester_jsdzda");
//查询年级字典键值
List<SysDictData> grade = sysDictDataMapper.selectDictDataByType("grade_da");
//查询班级类型字典键值
List<SysDictData> type = sysDictDataMapper.selectDictDataByType("class_type");
List<SysDictData> examType = sysDictDataMapper.selectDictDataByType("exam_typeda");
for (SchoolStudentAchievementVo schoolStudentAchievementVo : list) {
if (StringUtils.isNull(schoolStudentAchievementVo.getSchoolYear())) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、学年为空,请您重新输入! ");
} else if (StringUtils.isEmpty(schoolStudentAchievementVo.getSemester())) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、学期为空,请您重新输入! ");
} else if (StringUtils.isEmpty(schoolStudentAchievementVo.getYear())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、届别为空,请您重新输入! ");
} else if (StringUtils.isEmpty(schoolStudentAchievementVo.getGrade())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、年级为空,请您重新输入! ");
} else if (StringUtils.isEmpty(schoolStudentAchievementVo.getClassName())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、班级为空,请您重新输入! ");
} else if (StringUtils.isEmpty(schoolStudentAchievementVo.getClassType())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、班级类型为空,请您重新输入! ");
} else if (StringUtils.isEmpty(schoolStudentAchievementVo.getName())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、姓名为空,请您重新输入! ");
} else if (StringUtils.isEmpty(schoolStudentAchievementVo.getIdCard())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、身份证号为空,请您重新输入! ");
} else if (StringUtils.isEmpty(schoolStudentAchievementVo.getExamType())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、考试类型为空,请您重新输入! ");
} else if (StringUtils.isEmpty(schoolStudentAchievementVo.getClassTeacher())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、班主任为空,请您重新输入! ");
} else {
//判断学年输入是否正确
String schoolYear = schoolStudentAchievementVo.getSchoolYear();
if (!schoolYear.contains("-")){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、学年输入格式错误,请您重新输入! ");
}else {
String[] split = schoolYear.split("-");
if (split.length != 2) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、学年输入格式错误,请您重新输入! ");
} else if (!(split[0].matches("\\d+") && split[1].matches("\\d+"))) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、学年输入格式错误,请您重新输入! ");
} else {
//判断学期是否正确
String semester1 = "";
for (SysDictData sysDictData : semester) {
if (schoolStudentAchievementVo.getSemester().equals(sysDictData.getDictLabel())) {
semester1 = sysDictData.getDictValue();
}
}
if (StringUtils.isEmpty(semester1)) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、学期输入错误,请您重新输入! ");
} else {
schoolStudentAchievementVo.setSemester(semester1);
//判断届别是否正确
if (!schoolStudentAchievementVo.getYear().matches("\\d+")) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、届别输入错误,请您重新输入! ");
} else {
//判断年级是否正确
String grade1 = "";
for (SysDictData sysDictData : grade) {
if (schoolStudentAchievementVo.getGrade().equals(sysDictData.getDictLabel())) {
grade1 = sysDictData.getDictValue();
}
}
if (StringUtils.isEmpty(grade1)) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、年级输入错误,请您重新输入! ");
} else {
//判断班级是否正确
String className = schoolStudentAchievementVo.getClassName();
//将所有中文逗号替换成英文逗号
String newClassName = className.replaceAll(",", ",");
String[] spl = newClassName.split(",");
for (int i = 0; i < spl.length; i++) {
if (!spl[i].matches("\\d+")) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、班级输入错误,请您重新输入! ");
break;
}
}
schoolStudentAchievementVo.setClassName(newClassName);
//判断班级类型是否正确
String classType1 = "";
String classType = schoolStudentAchievementVo.getClassType();
//将所有中文逗号换成英文逗号
String newClassType = classType.replaceAll(",", ",");
String[] split1 = newClassType.split(",");
for (String ctype : split1) {
for (SysDictData sysDictData : type) {
if (ctype.equals(sysDictData.getDictLabel())) {
classType1 += ctype;
}
}
}
if (StringUtils.isEmpty(classType1)) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、班级类型输入错误,请您重新输入! ");
} else {
String idCard = "";
if (schoolStudentAchievementVo.getIdCard().length() == 18) {
//校验前十七位是否为数字
for (int i = 0; i < 17; i++) {
if (!Character.isDigit(schoolStudentAchievementVo.getIdCard().charAt(i))) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、身份证号输入错误,请您重新输入! ");
idCard += i;
break;
}
}
}
if (StringUtils.isEmpty(idCard)){
//判断考试类型输入是否正确
String examType1 = schoolStudentAchievementVo.getExamType();
String examType2 = "";
for (SysDictData sysDictData : examType) {
if (examType1.equals(sysDictData.getDictLabel())){
examType2 = sysDictData.getDictValue();
}
}
if (StringUtils.isEmpty(examType2)){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、考试类型输入错误,请您重新输入! ");
}else {
schoolStudentAchievementVo.setExamType(examType2);
//判断考试时间输入是否正确
String examTime1 = schoolStudentAchievementVo.getExamTime1();
try {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
format.setLenient(false);
Date parse = format.parse(examTime1);
schoolStudentAchievementVo.setExamTime(parse);
} catch (ParseException e) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、考试时间输入错误,请您重新输入! ");
}
}
}
}
}
}
}
}
}
}
}
if (failureNum > 0) {
failureMsg.insert(0, "很抱歉,导入失败!共" + failureNum + "条数据格式不正确,错误如下:");
throw new ServiceException(failureMsg.toString());
}
}
/**
* 新增数据
* @param list
* @return
*/
@Override
public String importExamDetail(List<SchoolStudentAchievementVo> list) {
StringBuilder successMsg = new StringBuilder();
List<SchoolStudentAchievement> schoolStudentAchievements = new ArrayList<>();
for (SchoolStudentAchievementVo schoolStudentAchievementVo : list) {
//转实体对象
SchoolStudentAchievement schoolStudentAchievement = new SchoolStudentAchievement();
BeanUtils.copyProperties(schoolStudentAchievementVo,schoolStudentAchievement);
schoolStudentAchievements.add(schoolStudentAchievement);
}
if (schoolStudentAchievements.size() > 0){
boolean b = saveBatch(schoolStudentAchievements);
if (!b){
throw new ServiceException("导入失败");
}
}
successMsg.insert(0, "恭喜您,数据已导入成功!");
return successMsg.toString();
}
}
package yangtz.cs.liu.campus.service.impl.student;
import java.util.ArrayList;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.mapper.SysDictDataMapper;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolXteachingAchievements;
import yangtz.cs.liu.campus.mapper.student.SchoolStudentAwardMapper;
import yangtz.cs.liu.campus.domain.student.SchoolStudentAward;
import yangtz.cs.liu.campus.service.student.ISchoolStudentAwardService;
import yangtz.cs.liu.campus.vo.student.SchoolStudentAwardVo;
/**
* 学生嘉奖Service业务层处理
*
* @author ruoyi
* @date 2024-01-08
*/
@Service
public class SchoolStudentAwardServiceImpl extends ServiceImpl<SchoolStudentAwardMapper,SchoolStudentAward> implements ISchoolStudentAwardService
{
@Autowired
private SchoolStudentAwardMapper schoolStudentAwardMapper;
@Autowired
private SysDictDataMapper sysDictDataMapper;
/**
* 查询学生嘉奖
*
* @param id 学生嘉奖主键
* @return 学生嘉奖
*/
@Override
public SchoolStudentAward selectSchoolStudentAwardById(Long id)
{
return schoolStudentAwardMapper.selectSchoolStudentAwardById(id);
}
/**
* 查询学生嘉奖列表
*
* @param schoolStudentAward 学生嘉奖
* @return 学生嘉奖
*/
@Override
public List<SchoolStudentAward> selectSchoolStudentAwardList(SchoolStudentAward schoolStudentAward)
{
return schoolStudentAwardMapper.selectSchoolStudentAwardList(schoolStudentAward);
}
/**
* 新增学生嘉奖
*
* @param schoolStudentAward 学生嘉奖
* @return 结果
*/
@Override
public int insertSchoolStudentAward(SchoolStudentAward schoolStudentAward)
{
schoolStudentAward.setCreateById(SecurityUtils.getUserId());
schoolStudentAward.setCreateBy(SecurityUtils.getUsername());
schoolStudentAward.setCreateTime(DateUtils.getNowDate());
return schoolStudentAwardMapper.insertSchoolStudentAward(schoolStudentAward);
}
/**
* 修改学生嘉奖
*
* @param schoolStudentAward 学生嘉奖
* @return 结果
*/
@Override
public int updateSchoolStudentAward(SchoolStudentAward schoolStudentAward)
{
schoolStudentAward.setUpdateById(SecurityUtils.getUserId());
schoolStudentAward.setUpdateBy(SecurityUtils.getUsername());
schoolStudentAward.setUpdateTime(DateUtils.getNowDate());
return schoolStudentAwardMapper.updateSchoolStudentAward(schoolStudentAward);
}
/**
* 批量删除学生嘉奖
*
* @param ids 需要删除的学生嘉奖主键
* @return 结果
*/
@Override
public int deleteSchoolStudentAwardByIds(Long[] ids)
{
return schoolStudentAwardMapper.deleteSchoolStudentAwardByIds(ids);
}
/**
* 删除学生嘉奖信息
*
* @param id 学生嘉奖主键
* @return 结果
*/
@Override
public int deleteSchoolStudentAwardById(Long id)
{
return schoolStudentAwardMapper.deleteSchoolStudentAwardById(id);
}
/**
* 提交审核
* @param schoolStudentAward
* @return
*/
@Override
public int submit(SchoolStudentAward schoolStudentAward) {
return schoolStudentAwardMapper.updateSchoolStudentAward(schoolStudentAward);
}
/**
* 校验数据
* @param list
*/
@Override
public void checkImport(List<SchoolStudentAwardVo> list) {
//检验是否为空
if (StringUtils.isNull(list) || list.size() == 0) {
throw new ServiceException("导入数据不能为空");
}
// 准备记录日志数据
int failureNum = 0;
StringBuilder failureMsg = new StringBuilder();
//查询学期字典键值
List<SysDictData> semester = sysDictDataMapper.selectDictDataByType("semester_jsdzda");
//查询年级字典键值
List<SysDictData> grade = sysDictDataMapper.selectDictDataByType("grade_da");
//查询班级类型字典键值
List<SysDictData> type = sysDictDataMapper.selectDictDataByType("class_type");
//查询性别字典键值
List<SysDictData> sex = sysDictDataMapper.selectDictDataByType("sys_user_sex");
//查询嘉奖级别字典键值
List<SysDictData> studentAwardRank = sysDictDataMapper.selectDictDataByType("student_award_rank");
for (SchoolStudentAwardVo schoolStudentAwardVo : list) {
if (StringUtils.isNull(schoolStudentAwardVo.getSchoolYear())) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、学年为空,请您重新输入! ");
} else if (StringUtils.isEmpty(schoolStudentAwardVo.getSemester())) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、学期为空,请您重新输入! ");
} else if (StringUtils.isEmpty(schoolStudentAwardVo.getYear())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、届别为空,请您重新输入! ");
} else if (StringUtils.isEmpty(schoolStudentAwardVo.getGrade())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、年级为空,请您重新输入! ");
} else if (StringUtils.isEmpty(schoolStudentAwardVo.getClassName())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、班级为空,请您重新输入! ");
} else if (StringUtils.isEmpty(schoolStudentAwardVo.getClassType())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、班级类型为空,请您重新输入! ");
} else if (StringUtils.isEmpty(schoolStudentAwardVo.getName())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、姓名为空,请您重新输入! ");
} else if (StringUtils.isEmpty(schoolStudentAwardVo.getIdCard())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、身份证号为空,请您重新输入! ");
} else if (StringUtils.isEmpty(schoolStudentAwardVo.getSex())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、性别为空,请您重新输入! ");
} else if (StringUtils.isEmpty(schoolStudentAwardVo.getClassTeacher())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、班主任为空,请您重新输入! ");
} else if (StringUtils.isEmpty(schoolStudentAwardVo.getDepartmentDirector())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、级部主任为空,请您重新输入! ");
} else if (StringUtils.isEmpty(schoolStudentAwardVo.getAwardType())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、嘉奖类别为空,请您重新输入! ");
} else if (StringUtils.isEmpty(schoolStudentAwardVo.getAwardRank())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、嘉奖级别为空,请您重新输入! ");
} else if (StringUtils.isNull(schoolStudentAwardVo.getAwardTime())){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、嘉奖时间为空或输入错误,请您重新输入! ");
} else if (schoolStudentAwardVo.getIdCard().length() != 18 && schoolStudentAwardVo.getIdCard().length() != 15){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、身份证号输入错误,请您重新输入! ");
}else {
//判断学年输入是否正确
String schoolYear = schoolStudentAwardVo.getSchoolYear();
if (!schoolYear.contains("-")){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、学年输入格式错误,请您重新输入! ");
}else {
String[] split = schoolYear.split("-");
if (split.length != 2) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、学年输入格式错误,请您重新输入! ");
} else if (!(split[0].matches("\\d+") && split[1].matches("\\d+"))) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、学年输入格式错误,请您重新输入! ");
} else {
//判断学期是否正确
String semester1 = "";
for (SysDictData sysDictData : semester) {
if (schoolStudentAwardVo.getSemester().equals(sysDictData.getDictLabel())) {
semester1 = sysDictData.getDictValue();
}
}
if (StringUtils.isEmpty(semester1)) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、学期输入错误,请您重新输入! ");
} else {
schoolStudentAwardVo.setSemester(semester1);
//判断届别是否正确
if (!schoolStudentAwardVo.getYear().matches("\\d+")) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、届别输入错误,请您重新输入! ");
} else {
//判断年级是否正确
String grade1 = "";
for (SysDictData sysDictData : grade) {
if (schoolStudentAwardVo.getGrade().equals(sysDictData.getDictLabel())) {
grade1 = sysDictData.getDictValue();
}
}
if (StringUtils.isEmpty(grade1)) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、年级输入错误,请您重新输入! ");
}else {
schoolStudentAwardVo.setGrade(grade1);
//判断班级是否正确
String className = schoolStudentAwardVo.getClassName();
//将所有中文逗号替换成英文逗号
String newClassName = className.replaceAll(",", ",");
String[] spl = newClassName.split(",");
for (int i = 0; i < spl.length; i++) {
if (!spl[i].matches("\\d+")){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、班级输入错误,请您重新输入! ");
break;
}
}
schoolStudentAwardVo.setClassName(newClassName);
//判断班级类型是否正确
String classType1 = "";
String classType = schoolStudentAwardVo.getClassType();
//将所有中文逗号换成英文逗号
String newClassType = classType.replaceAll(",", ",");
String[] split1 = newClassType.split(",");
for (String ctype : split1) {
for (SysDictData sysDictData : type) {
if (ctype.equals(sysDictData.getDictLabel())){
classType1 += ctype;
}
}
}
if (StringUtils.isEmpty(classType1)){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、班级类型输入错误,请您重新输入! ");
}else {
String idCard = "";
if(schoolStudentAwardVo.getIdCard().length() == 18) {
//校验前十七位是否为数字
for (int i = 0; i < 17; i++) {
if (!Character.isDigit(schoolStudentAwardVo.getIdCard().charAt(i))) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、身份证号输入错误,请您重新输入! ");
idCard += i;
break;
}
}
}
if (StringUtils.isEmpty(idCard)){
//判断性别输入是否正确
String sex1 = schoolStudentAwardVo.getSex();
String sex2 = "";
for (SysDictData sysDictData : sex) {
if (sex1.equals(sysDictData.getDictLabel())){
sex2 = sysDictData.getDictValue();
}
}
//判断嘉奖级别输入是否正确
String awardRank = schoolStudentAwardVo.getAwardRank();
String awardRank1 = "";
for (SysDictData sysDictData : studentAwardRank) {
if (awardRank.equals(sysDictData.getDictLabel())){
awardRank1 = sysDictData.getDictValue();
}
}
if (StringUtils.isEmpty(sex2)){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、性别输入错误,请您重新输入! ");
}else if (StringUtils.isEmpty(awardRank1)){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、嘉奖级别输入错误,请您重新输入! ");
}else {
schoolStudentAwardVo.setSex(sex2);
schoolStudentAwardVo.setAwardRank(awardRank1);
}
}
}
}
}
}
}
}
}
}
if (failureNum > 0) {
failureMsg.insert(0, "很抱歉,导入失败!共" + failureNum + "条数据格式不正确,错误如下:");
throw new ServiceException(failureMsg.toString());
}
}
/**
* 导入数据
* @param list
* @return
*/
@Override
public String importExamDetail(List<SchoolStudentAwardVo> list) {
StringBuilder successMsg = new StringBuilder();
List<SchoolStudentAward> schoolStudentAwardList = new ArrayList<>();
list.forEach(list1 ->{
//转实体对象
SchoolStudentAward schoolStudentAward = new SchoolStudentAward();
BeanUtils.copyProperties(list1,schoolStudentAward);
schoolStudentAwardList.add(schoolStudentAward);
});
if (schoolStudentAwardList.size() > 0){
boolean b = saveBatch(schoolStudentAwardList);
if (!b){
throw new ServiceException("导入失败");
}
}
successMsg.insert(0, "恭喜您,数据已导入成功!");
return successMsg.toString();
}
/**
* 查询已通过的学生嘉奖列表
* @param schoolStudentAward
* @return
*/
@Override
public List<SchoolStudentAward> selectSchoolStudentAwardListTg(SchoolStudentAward schoolStudentAward) {
return schoolStudentAwardMapper.selectSchoolStudentAwardListTg(schoolStudentAward);
}
}
......@@ -46,4 +46,10 @@ public interface SchoolTeacherBasichlnformationService extends IService<SchoolT
* @return
*/
List<String> selectIdCardsByDdPhone(List<String> userPhones);
/**
* 根据手机号查询学科
* @return
*/
String selectSubByDdPhone(String ddPhone);
}
package yangtz.cs.liu.campus.service.schoolRewardsPunishments;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolXteachingAchievements;
import yangtz.cs.liu.campus.domain.schoolRewardsPunishments.SchoolScDiscipline;
import yangtz.cs.liu.campus.vo.schoolRewardsPunishments.SchoolScDisciplineVo;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
......@@ -20,7 +23,7 @@ public interface ISchoolScDisciplineService extends IService<SchoolScDiscipline>
* @param id 学生违纪主键
* @return 学生违纪
*/
public SchoolScDiscipline selectSchoolScDisciplineById(Long id);
public SchoolScDisciplineVo selectSchoolScDisciplineById(Long id);
/**
* 查询学生违纪列表
......@@ -41,18 +44,18 @@ public interface ISchoolScDisciplineService extends IService<SchoolScDiscipline>
/**
* 新增学生违纪
*
* @param schoolScDiscipline 学生违纪
* @param schoolScDisciplineVo 学生违纪
* @return 结果
*/
public int insertSchoolScDiscipline(SchoolScDiscipline schoolScDiscipline);
public int insertSchoolScDiscipline(SchoolScDisciplineVo schoolScDisciplineVo);
/**
* 修改学生违纪
*
* @param schoolScDiscipline 学生违纪
* @param schoolScDisciplineVo 学生违纪
* @return 结果
*/
public int updateSchoolScDiscipline(SchoolScDiscipline schoolScDiscipline);
public int updateSchoolScDiscipline(SchoolScDisciplineVo schoolScDisciplineVo);
/**
* 批量删除学生违纪
......@@ -82,4 +85,23 @@ public interface ISchoolScDisciplineService extends IService<SchoolScDiscipline>
* @return
*/
List<Map<String,Object>> getClassList(Long gradeId);
/**
* 下载模板
* @param response
*/
void importTemplate(HttpServletResponse response);
/**
* 校验数据
* @param list
*/
void checkImport(List<SchoolScDisciplineVo> list);
/**
* 导入数据
* @param list
* @return
*/
String importData(List<SchoolScDisciplineVo> list);
}
package yangtz.cs.liu.campus.service.schooloffical;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.file.PubFile;
import yangtz.cs.liu.campus.domain.schooloffical.SchoolOfficialFlow;
import yangtz.cs.liu.campus.vo.schoolOfficial.SchoolOfficialFlowVo;
......@@ -25,4 +26,11 @@ public interface ISchoolOfficialFlowService extends IService<SchoolOfficialFlow>
//根据主表id,用户id,接收人类型,查询状态,并修改
int editState(Long id, Long userId, String receiveType);
/**
* 修改附件
* @param pubFile
* @return
*/
int updateFile(PubFile pubFile);
}
package yangtz.cs.liu.campus.service.student;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.student.SchoolStudentAchievement;
import yangtz.cs.liu.campus.vo.student.SchoolStudentAchievementVo;
/**
* 学生成绩Service接口
*
* @author ruoyi
* @date 2024-01-08
*/
public interface ISchoolStudentAchievementService extends IService<SchoolStudentAchievement>
{
/**
* 查询学生成绩
*
* @param id 学生成绩主键
* @return 学生成绩
*/
public SchoolStudentAchievement selectSchoolStudentAchievementById(Long id);
/**
* 查询学生成绩列表
*
* @param schoolStudentAchievement 学生成绩
* @return 学生成绩集合
*/
public List<SchoolStudentAchievement> selectSchoolStudentAchievementList(SchoolStudentAchievement schoolStudentAchievement);
/**
* 新增学生成绩
*
* @param schoolStudentAchievement 学生成绩
* @return 结果
*/
public int insertSchoolStudentAchievement(SchoolStudentAchievement schoolStudentAchievement);
/**
* 修改学生成绩
*
* @param schoolStudentAchievement 学生成绩
* @return 结果
*/
public int updateSchoolStudentAchievement(SchoolStudentAchievement schoolStudentAchievement);
/**
* 批量删除学生成绩
*
* @param ids 需要删除的学生成绩主键集合
* @return 结果
*/
public int deleteSchoolStudentAchievementByIds(Long[] ids);
/**
* 删除学生成绩信息
*
* @param id 学生成绩主键
* @return 结果
*/
public int deleteSchoolStudentAchievementById(Long id);
/**
* 校验数据
* @param list
*/
void checkImport(List<SchoolStudentAchievementVo> list);
/**
* 新增数据
* @param list
* @return
*/
String importExamDetail(List<SchoolStudentAchievementVo> list);
}
package yangtz.cs.liu.campus.service.student;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.student.SchoolStudentAward;
import yangtz.cs.liu.campus.vo.student.SchoolStudentAwardVo;
/**
* 学生嘉奖Service接口
*
* @author ruoyi
* @date 2024-01-08
*/
public interface ISchoolStudentAwardService extends IService<SchoolStudentAward>
{
/**
* 查询学生嘉奖
*
* @param id 学生嘉奖主键
* @return 学生嘉奖
*/
public SchoolStudentAward selectSchoolStudentAwardById(Long id);
/**
* 查询学生嘉奖列表
*
* @param schoolStudentAward 学生嘉奖
* @return 学生嘉奖集合
*/
public List<SchoolStudentAward> selectSchoolStudentAwardList(SchoolStudentAward schoolStudentAward);
/**
* 新增学生嘉奖
*
* @param schoolStudentAward 学生嘉奖
* @return 结果
*/
public int insertSchoolStudentAward(SchoolStudentAward schoolStudentAward);
/**
* 修改学生嘉奖
*
* @param schoolStudentAward 学生嘉奖
* @return 结果
*/
public int updateSchoolStudentAward(SchoolStudentAward schoolStudentAward);
/**
* 批量删除学生嘉奖
*
* @param ids 需要删除的学生嘉奖主键集合
* @return 结果
*/
public int deleteSchoolStudentAwardByIds(Long[] ids);
/**
* 删除学生嘉奖信息
*
* @param id 学生嘉奖主键
* @return 结果
*/
public int deleteSchoolStudentAwardById(Long id);
/**
* 提交审核
* @param schoolStudentAward
* @return
*/
int submit(SchoolStudentAward schoolStudentAward);
/**
* 校验数据
* @param list
*/
void checkImport(List<SchoolStudentAwardVo> list);
/**
* 导入数据
* @param list
* @return
*/
String importExamDetail(List<SchoolStudentAwardVo> list);
/**
* 查询已通过学生嘉奖列表
* @param schoolStudentAward
* @return
*/
List<SchoolStudentAward> selectSchoolStudentAwardListTg(SchoolStudentAward schoolStudentAward);
}
......@@ -28,6 +28,9 @@ public class FudaoStudentVo {
readConverterExp = "1=语文,2=数学,3=英语,4=物理,5=化学,6=生物,7=政治,8=历史,9=地理,10=音乐,11=体育,12=美术,13=技术,14=心理,15=书法")
private String sub;
//学科过滤
private String sub1;
//获奖类别
@Excel(name = "获奖类别",combo = {"奥赛类","作文类","科创类","演讲类","体育类","表演类","绘画类","其他类"},
readConverterExp = "1=奥赛类,2=作文类,3=科创类,4=演讲类,5=体育类,6=表演类,7=绘画类,8=其他类")
......
......@@ -28,6 +28,9 @@ public class FudaoTeacherVo {
readConverterExp = "1=语文,2=数学,3=英语,4=物理,5=化学,6=生物,7=政治,8=历史,9=地理,10=音乐,11=体育,12=美术,13=技术,14=心理,15=书法")
private String sub;
//学科过滤
private String sub1;
//获奖类别
@Excel(name = "获奖类别",combo = {"学科带头人评选","教学能手评选","优质课比赛","公开课比赛","其他讲课比赛"},
readConverterExp = "1=学科带头人评选,2=教学能手评选,3=优质课比赛,4=公开课比赛,5=其他讲课比赛")
......
......@@ -31,7 +31,7 @@ public class SchoolAnnualAssessmentVo {
private String idCard;
/** 考核结果(1优秀、2合格、3不定等次、4不予考核、5不合格) */
@Excel(name = "考核结果", readConverterExp = "1=优秀,2=合格,3=不定等次,4=不予考核,5=不合格", combo = {"优秀","合格","不定等次","不予考核","不合格"})
@Excel(name = "考核结果", readConverterExp = "1=优秀,2=合格,3=不定等次,4=不予考核,5=不合格,6=记功,7=嘉奖", combo = {"记功","嘉奖","优秀","合格","不定等次","不予考核","不合格"})
private String checkResult;
/** 备注 */
......
......@@ -29,6 +29,9 @@ public class SchoolXacademicWorksVo
readConverterExp = "1=语文,2=数学,3=英语,4=物理,5=化学,6=生物,7=政治,8=历史,9=地理,10=音乐,11=体育,12=美术,13=技术,14=心理,15=书法")
private String sub;
/** 学科过滤 */
private String sub1;
/** 获奖类别 */
@Excel(name = "获奖类别",combo = {"论著-独著","论文-公开发表","论著-合著(编者)","论文-核心期刊","论著-合著(主编)","论著-合著(副主编)","其他"},
readConverterExp = "1=论著-独著,2=论文-公开发表,3=论著-合著(编者),4=论文-核心期刊,5=论著-合著(主编),6=论著-合著(副主编),7=其他")
......
......@@ -28,6 +28,9 @@ public class SchoolXcomprehensiveHonorsVo
readConverterExp = "1=语文,2=数学,3=英语,4=物理,5=化学,6=生物,7=政治,8=历史,9=地理,10=音乐,11=体育,12=美术,13=技术,14=心理,15=书法")
private String sub;
/** 学科过滤 */
private String sub1;
/** 获奖类别(手动输入) */
@Excel(name = "获奖类别")
private String awardType;
......
......@@ -30,6 +30,9 @@ public class SchoolXlectureAwardsVo
readConverterExp = "1=语文,2=数学,3=英语,4=物理,5=化学,6=生物,7=政治,8=历史,9=地理,10=音乐,11=体育,12=美术,13=技术,14=心理,15=书法")
private String sub;
/** 学科过滤 */
private String sub1;
/** 获奖类别 */
@Excel(name = "获奖类别",combo = {"优质课","公开课","优课","其他","说课","经验介绍","示范课"},readConverterExp = "1=优质课,2=公开课,3=优课,4=其他,5=说课,6=经验介绍,7=示范课")
private String awardType;
......
......@@ -29,6 +29,9 @@ public class SchoolXprojectResearchVo {
readConverterExp = "1=语文,2=数学,3=英语,4=物理,5=化学,6=生物,7=政治,8=历史,9=地理,10=音乐,11=体育,12=美术,13=技术,14=心理,15=书法")
private String sub;
/** 学科过滤 */
private String sub1;
/** 获奖类别 */
@Excel(name = "获奖类别",combo = {"规划办课题","教科院课题","社科联课题","学会等非官方课题","其他"},
readConverterExp = "1=规划办课题,2=教科院课题,3=社科联课题,4=学会等非官方课题,5=其他")
......
......@@ -30,6 +30,9 @@ public class SchoolXteacherAwardsVo
readConverterExp = "1=语文,2=数学,3=英语,4=物理,5=化学,6=生物,7=政治,8=历史,9=地理,10=音乐,11=体育,12=美术,13=技术,14=心理,15=书法")
private String sub;
/** 学科过滤 */
private String sub1;
/** 获奖类别 */
@Excel(name = "获奖类别",combo = {"学科带头人","教学能手","教学科研专家","教学科研成果","增量优秀班主任","高考功勋班主任","教学资源","其他","高考功勋教师",
"增量优秀教师","市高考评奖"},readConverterExp = "1=学科带头人,2=教学能手,3=教学科研专家,4=教学科研成果,5=增量优秀班主任,6=高考功勋班主任,7=教学资源," +
......
......@@ -64,6 +64,9 @@ public class SchoolXteachingAchievementsVo {
@Excel(name = "学科", dictType = "sub_dzdn")
private String sub;
/** 学科过滤 */
private String sub1;
/** 班级 */
@Excel(name = "班级")
private String className;
......
......@@ -20,50 +20,51 @@ public class SchoolScAwardsVo
private Long id;
/** 比赛名称 */
@Excel(name = "比赛名称")
@Excel(name = "比赛名称", needMerge = true)
private String competitionName;
/** 主办单位 */
@Excel(name = "主办单位")
@Excel(name = "主办单位", needMerge = true)
private String organizer;
/** 获奖名称 */
@Excel(name = "获奖名称")
@Excel(name = "获奖名称", needMerge = true)
private String awardsName;
/** 主管部门id */
private Long competentDeptId;
/** 主管部门 */
@Excel(name = "主管部门")
@Excel(name = "主管部门", needMerge = true)
private String competentDept;
/** 获奖级别(字典) */
@Excel(name = "获奖级别")
@Excel(name = "获奖级别", combo = {"国家级","省部级","市级","县区级","校级","其他"}, readConverterExp = "1=国家级,2=省部级,3=市级,4=县区级,5=校级,6=其他", needMerge = true)
private String awardsLevel;
/** 部门主任id */
private Long deptDirectorId;
/** 部门主任 */
@Excel(name = "部门主任")
@Excel(name = "部门主任", needMerge = true)
private String deptDirector;
/** 获奖时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "获奖时间", width = 30, dateFormat = "yyyy-MM-dd")
@Excel(name = "获奖时间", width = 30, dateFormat = "yyyy-MM-dd", needMerge = true)
private Date awardsTime;
/** 获奖类型(字典) */
@Excel(name = "获奖类型")
@Excel(name = "获奖类型", combo = {"综合类","党建类","师德类","学科类","奥赛类","艺术类","体育类","科创类","作文类","演讲类","绘画类","生源基地类","其他类"},
readConverterExp = "1=综合类,2=党建类,3=师德类,4=学科类,5=奥赛类,6=艺术类,7=体育类,8=科创类,9=作文类,10=演讲类,11=绘画类,12=生源基地类,13=其他类", needMerge = true)
private String awardsType;
/** 备注 */
@Excel(name = "备注")
@Excel(name = "备注", needMerge = true)
private String remark;
/** 审核状态(0未提交,1审核中,2通过,3驳回) */
@Excel(name = "审核状态")
/** 审核状态(0未提交,1审核中,2通过,3驳回)*/
@Excel(name = "审核状态",combo = {"未提交","审核中","通过","驳回"},readConverterExp = "1=未提交,2=审核中,3=通过,4=驳回", needMerge = true)
private String auditState;
/** 申请人id */
......
package yangtz.cs.liu.campus.vo.schoolRewardsPunishments;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 学生违纪导出对象 school_sc_discipline
*
* @author ruoyi
* @date 2023-11-06
*/
@Data
public class SchoolScDisciplineExport {
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/** 学年 */
@Excel(name = "学年", combo = {"2018-2019","2019-2020","2020-2021","2021-2022","2022-2023",
"2023-2024","2024-2025","2025-2026","2026-2027","2027-2028","2028-2029","2029-2030","2030-2031","2031-2032","2032-2033"})
private String schoolYear;
/** 学期 */
@Excel(name = "学期", dictType = "semester_jsdzda")
private String semester;
/** 届别 */
@Excel(name = "届别")
private String gradeYear;
/** 年级id */
private Long gradeId;
/** 年级 */
@Excel(name = "年级",dictType = "grade_da")
private String gradeName;
/** 班级id */
private Long classId;
/** 班级 */
@Excel(name = "班级")
private String className;
/** 班级类型 */
@Excel(name = "班级类型",dictType = "class_type")
private String classType;
/** 姓名 */
@Excel(name = "姓名")
private String name;
/** 性别 */
@Excel(name = "性别",dictType = "sys_user_sex")
private String sex;
/** 身份证号 */
@Excel(name = "身份证号")
private String idCard;
/** 班主任id */
private Long classTeacherId;
/** 班主任 */
@Excel(name = "班主任")
private String classTeacher;
/** 级部主任id */
private Long gradeDirectorId;
/** 级部主任 */
@Excel(name = "级部主任")
private String gradeDirector;
/** 违纪类别(字典) */
// @Excel(name = "违纪类别", combo = {"旷课","擅离学校","夜不归宿","扰乱秩序","骂人打架","携带管制刀具","破坏公物","偷盗","抽烟","喝酒","带手机","考试作弊","谈恋爱","其他"},
// readConverterExp = "1=旷课,2=擅离学校,3=夜不归宿,4=扰乱秩序,5=骂人打架,6=携带管制刀具,7=破坏公物,8=偷盗,9=抽烟,10=喝酒,11=带手机,12=考试作弊,13=谈恋爱,14=其他")
@Excel(name = "违纪类别",dictType = "violate_type")
private String violateType;
/** 违纪次数(字典) */
// @Excel(name = "违纪次数", combo = {"首次违纪","第2次违纪","第3次违纪"}, readConverterExp = "1=首次违纪,2=第2次违纪,3=第3次违纪")
@Excel(name = "违纪次数", dictType = "violate_num")
private String violateNum;
/** 处分结果(字典) */
// @Excel(name = "处分结果", combo = {"警告","严重警告","记过","留校察看","勒令退学","开除学籍","其他"},
// readConverterExp = "1=警告,2=严重警告,3=记过,4=留校察看,5=勒令退学,6=开除学籍,7=其他")
@Excel(name = "处分结果",dictType = "punish_result")
private String punishResult;
/** 处分时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "处分时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date punishTime;
/** 备注 */
@Excel(name = "备注")
private String remark;
/** 审核状态(0未提交,1审核中,2通过,3驳回) */
@Excel(name = "审核状态", dictType = "audit_state")
private String auditState;
/** 申请人id */
private Long applyId;
/** 申请人 */
private String applyName;
/** 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date applyTime;
/** 创建者 */
@TableField(fill = FieldFill.INSERT)
private String createBy;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@TableField(fill = FieldFill.INSERT)
private Date createTime;
/** 更新者 */
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updateBy;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateTime;
}
package yangtz.cs.liu.campus.vo.schoolRewardsPunishments;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory;
import java.util.Date;
import java.util.List;
/**
* 学生违纪导入对象 school_sc_discipline
*
* @author ruoyi
* @date 2023-11-06
*/
@Data
public class SchoolScDisciplineVo {
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/** 学年 */
@Excel(name = "学年")
private String schoolYear;
/** 学期 */
@Excel(name = "学期")
private String semester;
/** 届别 */
@Excel(name = "届别")
private String gradeYear;
/** 年级id */
private Long gradeId;
/** 年级 */
@Excel(name = "年级")
private String gradeName;
/** 班级id */
private Long classId;
/** 班级 */
@Excel(name = "班级")
private String className;
/** 班级类型 */
@Excel(name = "班级类型")
private String classType;
/** 姓名 */
@Excel(name = "姓名")
private String name;
/** 性别 */
@Excel(name = "性别")
private String sex;
/** 身份证号 */
@Excel(name = "身份证号")
private String idCard;
/** 班主任id */
private Long classTeacherId;
/** 班主任 */
@Excel(name = "班主任")
private String classTeacher;
/** 级部主任id */
private Long gradeDirectorId;
/** 级部主任 */
@Excel(name = "级部主任")
private String gradeDirector;
/** 违纪类别(字典) */
@Excel(name = "违纪类别")
private String violateType;
/** 违纪次数(字典) */
@Excel(name = "违纪次数")
private String violateNum;
/** 处分结果(字典) */
@Excel(name = "处分结果")
private String punishResult;
/** 处分时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "处分时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date punishTime;
/** 备注 */
@Excel(name = "备注")
private String remark;
/** 审核状态(0未提交,1审核中,2通过,3驳回) */
private String auditState;
/** 申请人id */
private Long applyId;
/** 申请人 */
private String applyName;
/** 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date applyTime;
/** 创建者 */
@TableField(fill = FieldFill.INSERT)
private String createBy;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
@TableField(fill = FieldFill.INSERT)
private Date createTime;
/** 更新者 */
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updateBy;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateTime;
/** 是否 删除 */
@TableField(fill = FieldFill.INSERT)
private String delFlag;
/** 附件集合 */
private List<SchoolAccessory> schoolAccessoryList;
}
package yangtz.cs.liu.campus.vo.student;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
* 学生成绩对象 school_student_achievement
*
* @author ruoyi
* @date 2024-01-08
*/
@Data
public class SchoolStudentAchievementVo
{
/** 主键id */
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/** 学年 */
@Excel(name = "学年",combo = {"2018-2019","2019-2020","2020-2021","2021-2022","2022-2023","2023-2024","2024-2025",
"2025-2026","2026-2027","2027-2028","2028-2029","2029-2030","2030-2031","2031-2032","2032-2033"})
private String schoolYear;
/** 学期 */
@Excel(name = "学期",combo = {"第一学期","第二学期"})
private String semester;
/** 届别 */
@Excel(name = "届别",combo = {"2018","2019","2020","2021","2022","2023","2024","2025","2026","2027","2028","2029","2030","2031","2032","2033"})
private String year;
/** 年级 */
@Excel(name = "年级",combo = {"高一","高二","高三"})
private String grade;
/** 班级 */
@Excel(name = "班级",combo = {"1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16",
"17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40"})
private String className;
/** 班级类型 */
@Excel(name = "班级类型",combo = {"提高班","普通班","音乐班","美术班","体育班","特优班"})
private String classType;
/** 姓名 */
@Excel(name = "姓名")
private String name;
/** 身份证号 */
@Excel(name = "身份证号")
private String idCard;
/** 语文成绩 */
@Excel(name = "语文成绩")
private BigDecimal languageScore;
/** 数学成绩 */
@Excel(name = "数学成绩")
private BigDecimal mathScore;
/** 英语成绩 */
@Excel(name = "英语成绩")
private BigDecimal englishScore;
/** 物理成绩 */
@Excel(name = "物理成绩")
private BigDecimal physicsScore;
/** 化学成绩 */
@Excel(name = "化学成绩")
private BigDecimal chemistryScore;
/** 生物成绩 */
@Excel(name = "生物成绩")
private BigDecimal biologyScore;
/** 政治成绩 */
@Excel(name = "政治成绩")
private BigDecimal politicsScore;
/** 历史成绩 */
@Excel(name = "历史成绩")
private BigDecimal historyScore;
/** 地理成绩 */
@Excel(name = "地理成绩")
private BigDecimal geographyScore;
/** 专业课名称 */
@Excel(name = "专业课名称")
private String specialityName;
/** 专业课成绩 */
@Excel(name = "专业课成绩")
private BigDecimal specialityScore;
/** 艺体课名称 */
@Excel(name = "艺体课名称")
private String eurhythmicsName;
/** 艺体课成绩 */
@Excel(name = "艺体课成绩")
private BigDecimal eurhythmicsScore;
/** 考试类型 */
@Excel(name = "考试类型",combo = {"月考","期中","期末","一模","二模","三模","高考"})
private String examType;
/** 考试时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "考试时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date examTime;
/** 考试时间 */
private String examTime1;
/** 班主任id */
private Long classTeacherId;
/** 班主任 */
@Excel(name = "班主任")
private String classTeacher;
/** 创建人id */
private Long createById;
/** 创建者 */
private String createBy;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/** 修改人id */
private Long updateById;
/** 更新者 */
private String updateBy;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/** 删除状态 */
private String delFlag;
}
package yangtz.cs.liu.campus.vo.student;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 学生嘉奖对象 school_student_award
*
* @author ruoyi
* @date 2024-01-08
*/
@Data
public class SchoolStudentAwardVo {
/** 主键id */
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/** 学年 */
@Excel(name = "学年",combo = {"2018-2019","2019-2020","2020-2021","2021-2022","2022-2023","2023-2024","2024-2025",
"2025-2026","2026-2027","2027-2028","2028-2029","2029-2030","2030-2031","2031-2032","2032-2033"})
private String schoolYear;
/** 学期 */
@Excel(name = "学期",combo = {"第一学期","第二学期"})
private String semester;
/** 届别 */
@Excel(name = "届别",combo = {"2018","2019","2020","2021","2022","2023","2024","2025","2026","2027","2028","2029","2030","2031","2032","2033"})
private String year;
/** 年级 */
@Excel(name = "年级",combo = {"高一","高二","高三"})
private String grade;
/** 班级 */
@Excel(name = "班级",combo = {"1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16",
"17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40"})
private String className;
/** 班级类型 */
@Excel(name = "班级类型",combo = {"提高班","普通班","音乐班","美术班","体育班","特优班"})
private String classType;
/** 姓名 */
@Excel(name = "姓名")
private String name;
/** 身份证号 */
@Excel(name = "身份证号")
private String idCard;
/** 性别 */
@Excel(name = "性别",combo = {"男","女"})
private String sex;
/** 班主任id */
private Long classTeacherId;
/** 班主任 */
@Excel(name = "班主任")
private String classTeacher;
/** 级部主任id */
private Long departmentDirectorId;
/** 级部主任 */
@Excel(name = "级部主任")
private String departmentDirector;
/** 嘉奖类别 */
@Excel(name = "嘉奖类别")
private String awardType;
/** 嘉奖级别 */
@Excel(name = "嘉奖级别",combo = {"国家级","省级","市级","校级","级部"})
private String awardRank;
/** 嘉奖时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "嘉奖时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date awardTime;
/** 备注 */
@Excel(name = "备注")
private String remark;
/** 审核状态 */
private String auditState;
/** 创建人id */
private Long createById;
/** 创建者 */
private String createBy;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/** 修改人id */
private Long updateById;
/** 更新者 */
private String updateBy;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/** 删除状态 */
private String delFlag;
}
......@@ -70,19 +70,25 @@ public class DingClockServiceImpl implements IDingClockService {
}
}
//获取本周周一日期
Calendar c = Calendar.getInstance();
//设置周一为一周的第一天
c.setFirstDayOfWeek(Calendar.MONDAY);
c.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);
Date time = c.getTime();
// //获取本周周一日期
// Calendar c = Calendar.getInstance();
// //设置周一为一周的第一天
// c.setFirstDayOfWeek(Calendar.MONDAY);
// c.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);
// Date time = c.getTime();
//获取本月第一天
Calendar cal = Calendar.getInstance();
cal.set(Calendar.DAY_OF_MONTH, 1);
Date time = cal.getTime();
//查询用户打卡详情需要的时间格式
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
//查询考勤打卡记录的起始工作日
String checkDateFrom = sdf.format(time) + " 00:00:00";
// String checkDateFrom = sdf.format(time) + " 00:00:00";
String checkDateFrom = "2023-12-22" + " 00:00:00";
//查询考勤打卡记录的结束工作日
String checkDateTo = sdf.format(new Date()) + " 23:59:59";
// String checkDateTo = sdf.format(new Date()) + " 23:59:59";
String checkDateTo = "2023-12-26" + " 23:59:59";
//用户打卡时间转换
SimpleDateFormat sdf1 = new SimpleDateFormat("HH:mm:ss");
......@@ -96,7 +102,7 @@ public class DingClockServiceImpl implements IDingClockService {
for (int i = 0; 50 * i < ddUserIds.size(); i++) {
userIdListResult = ddUserIds.subList(50 * i, Math.min(ddUserIds.size(), 50 * (i + 1)));
List<OapiAttendanceListRecordResponse.Recordresult> recordresults = dingClockUtils.listRecord(userIdListResult, checkDateFrom, checkDateTo, false);
if (recordresults.size() > 0){
if (StringUtils.isNotNull(recordresults) && recordresults.size() > 0){
for (OapiAttendanceListRecordResponse.Recordresult recordresult : recordresults) {
SchoolAtt schoolAtt = new SchoolAtt();
for (SchoolTeacher schoolTeacher : schoolTeachers) {
......@@ -114,7 +120,6 @@ public class DingClockServiceImpl implements IDingClockService {
schoolAtt.setOrgname(sysDept.getDeptName());
}
}
}
}
//打卡日期
......
package yangtz.cs.liu.dingding.utils;
import org.springframework.context.annotation.Configuration;
import java.net.URL;
import java.net.URLDecoder;
import java.security.MessageDigest;
import java.util.Formatter;
import java.util.Random;
/**
* 计算dd.config的签名参数
**/
@Configuration
public class DdConfigSign {
/**
* 计算dd.config的签名参数
*
* @param jsticket 通过微应用appKey获取的jsticket
* @param nonceStr 自定义固定字符串
* @param timeStamp 当前时间戳
* @param url 调用dd.config的当前页面URL
* @return
* @throws Exception
*/
public static String sign(String jsticket, String nonceStr, long timeStamp, String url) throws Exception {
String plain = "jsapi_ticket=" + jsticket + "&noncestr=" + nonceStr + "&timestamp=" + String.valueOf(timeStamp)
+ "&url=" + decodeUrl(url);
try {
MessageDigest sha1 = MessageDigest.getInstance("SHA-256");
sha1.reset();
sha1.update(plain.getBytes("UTF-8"));
return byteToHex(sha1.digest());
} catch (Exception e) {
throw new Exception(e.getMessage());
}
}
// 字节数组转化成十六进制字符串
private static String byteToHex(final byte[] hash) {
Formatter formatter = new Formatter();
for (byte b : hash) {
formatter.format("%02x", b);
}
String result = formatter.toString();
formatter.close();
return result;
}
/**
* 因为ios端上传递的url是encode过的,android是原始的url。开发者使用的也是原始url,
* 所以需要把参数进行一般urlDecode
*
* @param url
* @return
* @throws Exception
*/
private static String decodeUrl(String url) throws Exception {
URL urler = new URL(url);
StringBuilder urlBuffer = new StringBuilder();
urlBuffer.append(urler.getProtocol());
urlBuffer.append(":");
if (urler.getAuthority() != null && urler.getAuthority().length() > 0) {
urlBuffer.append("//");
urlBuffer.append(urler.getAuthority());
}
if (urler.getPath() != null) {
urlBuffer.append(urler.getPath());
}
if (urler.getQuery() != null) {
urlBuffer.append('?');
urlBuffer.append(URLDecoder.decode(urler.getQuery(), "utf-8"));
}
return urlBuffer.toString();
}
public static String getRandomStr(int count) {
String base = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
Random random = new Random();
StringBuffer sb = new StringBuffer();
for (int i = 0; i < count; i++) {
int number = random.nextInt(base.length());
sb.append(base.charAt(number));
}
return sb.toString();
}
}
package yangtz.cs.liu.dingding.utils;
import com.aliyun.dingtalkstorage_1_0.models.AddPermissionResponse;
import com.aliyun.tea.TeaException;
import com.aliyun.teautil.models.RuntimeOptions;
import com.dingtalk.api.DefaultDingTalkClient;
import com.dingtalk.api.DingTalkClient;
import com.dingtalk.api.request.*;
import com.dingtalk.api.response.*;
import com.ruoyi.common.utils.StringUtils;
import com.taobao.api.ApiException;
import com.taobao.api.FileItem;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import yangtz.cs.liu.dingding.vo.DingSchoolUserVo;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
......@@ -24,6 +34,28 @@ public class DingUserUtils {
@Autowired
private AccessTokenUtils accessTokenUtils;
private static final String UPLOAD_FILE_URL = "https://oapi.dingtalk.com/media/upload?access_token=ACCESS_TOKEN&media=FILE_PATH";
/**
* 上传文件到钉盘
* @param filePath
*/
public String uploadFileToDingTalk(String filePath) {
String accessToken = accessTokenUtils.getToken();
try {
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/media/upload");
OapiMediaUploadRequest req = new OapiMediaUploadRequest();
req.setType("file");
req.setMedia(new FileItem(filePath));
req.setTopContentType("multipart/form-data");
OapiMediaUploadResponse rsp = client.execute(req, accessToken);
return rsp.getBody();
} catch (ApiException e) {
e.printStackTrace();
return "下载失败";
}
}
/**
* 创建用户
*/
......
package yangtz.cs.liu.dingding.utils;
import com.dingtalk.api.DefaultDingTalkClient;
import com.dingtalk.api.DingTalkClient;
import com.dingtalk.api.request.OapiGetJsapiTicketRequest;
import com.dingtalk.api.response.OapiGetJsapiTicketResponse;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.StringUtils;
import com.taobao.api.ApiException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.concurrent.TimeUnit;
/**
* 鉴权
*/
@Component
public class JSAPIUtils {
@Autowired
private AccessTokenUtils accessTokenUtils;
@Autowired
public RedisCache redisCache;
/**
* 获取jsapi_ticket
* @return
*/
public String getJsapiTicket(){
String jsapiTicket = redisCache.getCacheObject("dd_jsapi_ticket");
if (StringUtils.isEmpty(jsapiTicket)){
String accesstoken = accessTokenUtils.getToken();
try {
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/get_jsapi_ticket");
OapiGetJsapiTicketRequest req = new OapiGetJsapiTicketRequest();
req.setHttpMethod("GET");
OapiGetJsapiTicketResponse rsp = client.execute(req, accesstoken);
String rspTicket = rsp.getTicket();
if (!StringUtils.isEmpty(rspTicket)) {
jsapiTicket = rspTicket;
// 将access_token存入redis
redisCache.setCacheObject("dd_jsapi_ticket", jsapiTicket, 2, TimeUnit.HOURS);
}
} catch (ApiException e) {
e.printStackTrace();
return "获取失败";
}
}
return jsapiTicket;
}
}
package yangtz.cs.liu.wechat.controller.api;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import yangtz.cs.liu.dingding.utils.DdConfigSign;
import yangtz.cs.liu.dingding.utils.DingUserUtils;
import yangtz.cs.liu.dingding.utils.JSAPIUtils;
/**
* 鉴权
*/
@RestController
@RequestMapping("/wx/jsapi")
public class WxJsapiController {
@Autowired
private JSAPIUtils jsapiUtils;
@Value("${dd.message-uri}")
private String messageUri;
@Value("${dd.agentId}")
private String agentId;
@Value("${dd.corpId}")
private String corpId;
/**
* 鉴权
* @return
*/
@GetMapping("/jq")
public AjaxResult jq(){
AjaxResult ajaxResult = AjaxResult.success();
//获取jsapi_ticket
String jsapiTicket = jsapiUtils.getJsapiTicket();
//自定义固定字符串
String randomStr = DdConfigSign.getRandomStr(5);
//时间戳
long timestamp = System.currentTimeMillis();
String sign = "";
try {
sign = DdConfigSign.sign(jsapiTicket, randomStr, timestamp, messageUri);
} catch (Exception e) {
e.printStackTrace();
}
ajaxResult.put("agentId",agentId);
ajaxResult.put("corpId",corpId);
ajaxResult.put("timeStamp",timestamp);
ajaxResult.put("nonceStr",randomStr);
ajaxResult.put("signature",sign);
return ajaxResult;
}
}
package yangtz.cs.liu.wechat.controller.schoolOffcial;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SchoolTeacher;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.campus.domain.file.PubFile;
import yangtz.cs.liu.campus.domain.schooloffical.SchoolOfficial;
import yangtz.cs.liu.campus.domain.schooloffical.SchoolOfficialFlow;
import yangtz.cs.liu.campus.service.schooloffical.ISchoolOfficalService;
import yangtz.cs.liu.campus.service.schooloffical.ISchoolOfficialFlowService;
import yangtz.cs.liu.campus.service.teacher.ISchoolTeacherService;
import yangtz.cs.liu.campus.vo.schoolOfficial.SchoolOfficialFlowVo;
import yangtz.cs.liu.campus.vo.schoolOfficial.SchoolOfficialVo;
import yangtz.cs.liu.campus.vo.schooloffical.UserIdVo;
import yangtz.cs.liu.campus.vo.teacher.SchoolTeacherVO;
import java.util.List;
import static yangtz.cs.liu.campus.constant.GradeConstant.SCHOOLLEADER;
import static yangtz.cs.liu.campus.constant.OfficalConstant.*;
@RestController
@RequestMapping("/wx/officialflow")
public class WxOfficialFlowController extends BaseController {
@Autowired
private ISchoolOfficalService schoolOfficalService;
@Autowired
private ISchoolOfficialFlowService flowService;
@Autowired
private ISchoolTeacherService schoolTeacherService;
/**
* 查询我的任务
*/
@GetMapping("/taskList/{userId}")
public AjaxResult myTaskList(@PathVariable Long userId, String state, SchoolOfficial schoolOffical) {
List<SchoolOfficialVo> list = schoolOfficalService.myTaskList(userId, state, schoolOffical);
// List<SchoolOfficialVo> schoolOfficialVoList = new ArrayList<>();
// for (SchoolOfficialVo schoolOfficialVo : list) {
// if (schoolOfficialVo.getReceiveType().equals("1") || schoolOfficialVo.getReceiveType().equals("2")){
// schoolOfficialVoList.add(schoolOfficialVo);
// }
// }
AjaxResult ajaxResult = AjaxResult.success(list);
ajaxResult.put("total",list.size());
return ajaxResult;
}
/**
* 详情页
* 分为两块,一块是公文详情,一块是该公文已被哪些人办理,
*/
@GetMapping("/review/getInfo/{id}")
public AjaxResult reviewGetInfo(@PathVariable Long id) {
AjaxResult ajax = AjaxResult.success();
SchoolOfficialVo offical = schoolOfficalService.getInfo(id);
List<SchoolOfficialFlowVo> list = flowService.getReviewList(id);
ajax.put("offical", offical);
ajax.put("review", list);
return ajax;
}
/**
* 批阅人操作
* 需传个批阅意见
*
* @return
*/
@PutMapping("/review/{id}")
public AjaxResult review(@PathVariable Long id, @RequestBody SchoolOfficialFlow schoolOfficialFlow) {
if (StringUtils.isEmpty(schoolOfficialFlow.getOpinion())) {
return AjaxResult.error("请输入批阅意见");
}
//设置查询条件
SchoolOfficialFlow flow = new SchoolOfficialFlow();
//主表id
flow.setOfficialId(id);
//当前批阅人id
flow.setReceiveUser(schoolOfficialFlow.getReceiveUser());
//批阅人类型
flow.setReceiveType(REVIEWER);
//状态(未完成)
flow.setState(UNDONE);
//意见
flow.setOpinion(schoolOfficialFlow.getOpinion());
return toAjax(flowService.review(flow));
}
/**
* 发起人操作
* id主键id
* 批阅人单选传userId
* 传阅接收人,多选传userIds
* 二者只传一个
*
* @return
*/
@PutMapping("/initiator/{id}")
public AjaxResult initiator(@PathVariable Long id, @RequestBody UserIdVo vo) {
if (StringUtils.isNotNull(vo.getUserId()) && StringUtils.isNotNull(vo.getUserIds()) && vo.getUserIds().length != 0) {
return AjaxResult.error("批阅人和传阅人两者只能传一个");
}
if (StringUtils.isNull(vo.getUserId()) && StringUtils.isNull(vo.getUserIds())) {
return AjaxResult.error("批阅人和传阅人两者必须传一个");
}
if (StringUtils.isNull(vo.getUserId()) && vo.getUserIds().length == 0){
return AjaxResult.error("批阅人和传阅人两者必须传一个");
}
return toAjax(flowService.chooseReview(id, vo.getUserId(), vo.getUserIds()));
}
/**
* 传阅人操作
* id主键id
* 在传阅人第一次查看公文,点进去页面,或者关闭页面时发送请求,将当前传阅人状态改为已完成
* 并判断该公文对应的所有传阅人状态是否都是已完成,若都已完成,则将该公文状态改为已完结
*
* @return
*/
@PutMapping("/circulator/{id}")
public AjaxResult circulator(@PathVariable Long id, @RequestBody UserIdVo vo) {
//修改当前传阅人状态
int num = flowService.editState(id, vo.getUserId(), CIRCULATOR);
//判断所有传阅人状态是否,都已完成
schoolOfficalService.judgeState(id);
return toAjax(num);
}
/**
* 获取校领导
* */
@GetMapping("/getSchoolLeader")
public AjaxResult getSchoolLeader(SchoolTeacherVO teacher) {
return AjaxResult.success(schoolTeacherService.getSectionLeader(null,SCHOOLLEADER,teacher));
}
/**
* 查询教师list(全部或者按职工类型是带班的)
*/
@GetMapping("/getTeacherList")
public AjaxResult getTeacherList(SchoolTeacher teacher) {
List<SchoolTeacher> list = schoolTeacherService.getAllTeachers(teacher);
return AjaxResult.success(list);
}
/**
* 修改附件
*/
@PutMapping("/updateFile")
public AjaxResult updateFile(@RequestBody PubFile pubFile){
return toAjax(flowService.updateFile(pubFile));
}
}
......@@ -51,6 +51,7 @@
</foreach>
</if>
<if test="startTime != null and endTime != null "> and award_time BETWEEN #{startTime} AND #{endTime}</if>
<if test="sub1 != null and sub1 != ''"> or sub = #{sub1}</if>
</where>
order by create_time DESC
</select>
......
......@@ -50,6 +50,7 @@
</foreach>
</if>
<if test="startTime != null and endTime != null "> and award_time BETWEEN #{startTime} AND #{endTime}</if>
<if test="sub1 != null and sub1 != ''"> or sub = #{sub1}</if>
</where>
order by create_time DESC
</select>
......
......@@ -62,6 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{idCard}
</foreach>
</if>
<if test="sub1 != null and sub1 != ''"> or sub = #{sub1}</if>
</select>
......
......@@ -65,6 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{idCard}
</foreach>
</if>
<if test="sub1 != null and sub1 != ''"> or sub = #{sub1}</if>
</select>
......
......@@ -45,6 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</if>
<if test="noAuditState != null and noAuditState != ''"> and audit_state != #{noAuditState}</if>
<if test="sub1 != null and sub1 != ''"> or sub = #{sub1}</if>
</select>
<select id="selectSchoolGkAchievementList" parameterType="yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolGkAchievementVo" resultMap="SchoolGkAchievementResult">
......
......@@ -44,6 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{userPhone}
</foreach>
</if>
<if test="teachingSubject1 != null and teachingSubject1 != ''"> or teaching_subject = #{teachingSubject1}</if>
</select>
......@@ -122,4 +123,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</if>
</select>
<select id="selectSubByDdPhone" parameterType="String" resultType="String">
SELECT DISTINCT
teaching_subject
FROM
school_teacher_basic_information
WHERE
del_flag = '0' AND dd_phone = #{ddPhone}
</select>
</mapper>
......@@ -54,6 +54,7 @@
#{userId}
</foreach>
</if>
<if test="sub1 != null and sub1 != ''"> or sub = #{sub1}</if>
</where>
order by create_time DESC
</select>
......
......@@ -54,6 +54,7 @@
#{userId}
</foreach>
</if>
<if test="sub1 != null and sub1 != ''"> or sub = #{sub1}</if>
</where>
order by create_time DESC
</select>
......
......@@ -54,6 +54,7 @@
#{userId}
</foreach>
</if>
<if test="sub1 != null and sub1 != ''"> or sub = #{sub1}</if>
</where>
order by create_time DESC
</select>
......
......@@ -53,6 +53,7 @@
#{userId}
</foreach>
</if>
<if test="sub1 != null and sub1 != ''"> or sub = #{sub1}</if>
</where>
order by create_time DESC
</select>
......
......@@ -54,6 +54,7 @@
#{userId}
</foreach>
</if>
<if test="sub1 != null and sub1 != ''"> or sub = #{sub1}</if>
</where>
order by create_time DESC
</select>
......
......@@ -55,6 +55,7 @@
#{idCard}
</foreach>
</if>
<if test="sub1 != null and sub1 != ''"> or sub = #{sub1}</if>
</where>
order by create_time DESC
</select>
......
......@@ -66,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{userId}
</foreach>
</if>
<if test="sub1 != null and sub1 != ''"> or sub = #{sub1}</if>
</where>
</select>
......
......@@ -184,7 +184,7 @@
<insert id="batchSchoolAccessory">
insert into school_accessory( id, business_id, module_name, accessory_type, accessory_url, accessory_name, create_by, create_time) values
<foreach item="item" index="index" collection="list" separator=",">
( #{item.id}, #{item.businessId}, #{item.moduleName}, #{item.accessoryType}, #{item.accessoryUrl}, #{item.accessoryName}, #{item.createBy}, #{item.createTime})
( 0, #{item.businessId}, #{item.moduleName}, #{item.accessoryType}, #{item.accessoryUrl}, #{item.accessoryName}, #{item.createBy}, #{item.createTime})
</foreach>
</insert>
......
......@@ -107,14 +107,16 @@
where id = #{id}
</select>
<insert id="insertSchoolScDiscipline" parameterType="SchoolScDiscipline" useGeneratedKeys="true" keyProperty="id">
<insert id="insertSchoolScDiscipline" parameterType="yangtz.cs.liu.campus.vo.schoolRewardsPunishments.SchoolScDisciplineVo" useGeneratedKeys="true" keyProperty="id">
insert into school_sc_discipline
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="schoolYear != null">school_year,</if>
<if test="semester != null">semester,</if>
<if test="gradeYear != null">grade_year,</if>
<if test="gradeId != null">grade_id,grade_name,</if>
<if test="classId != null">class_id,class_name,</if>
<if test="gradeId != null">grade_id,</if>
<if test="gradeName != null">grade_name,</if>
<if test="classId != null">class_id,</if>
<if test="className != null">class_name,</if>
<if test="classType != null">class_type,</if>
<if test="name != null">name,</if>
<if test="sex != null">sex,</if>
......@@ -134,14 +136,15 @@
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="delFlag != null">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="schoolYear != null">#{schoolYear},</if>
<if test="semester != null">#{semester},</if>
<if test="gradeYear != null">#{gradeYear},</if>
<if test="gradeId != null">#{gradeId},(select grade_name from school_grade where id = #{gradeId}),</if>
<if test="classId != null">#{classId},(select class_value from school_class where id = #{classId}),</if>
<if test="gradeId != null">#{gradeId},</if>
<if test="gradeName != null">#{gradeName},</if>
<if test="classId != null">#{classId},</if>
<if test="className != null">#{className},</if>
<if test="classType != null">#{classType},</if>
<if test="name != null">#{name},</if>
<if test="sex != null">#{sex},</if>
......@@ -161,18 +164,19 @@
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="delFlag != null">#{delFlag},</if>
</trim>
</insert>
<update id="updateSchoolScDiscipline" parameterType="SchoolScDiscipline">
<update id="updateSchoolScDiscipline" parameterType="yangtz.cs.liu.campus.vo.schoolRewardsPunishments.SchoolScDisciplineVo">
update school_sc_discipline
<trim prefix="SET" suffixOverrides=",">
<if test="schoolYear != null">school_year = #{schoolYear},</if>
<if test="semester != null">semester = #{semester},</if>
<if test="gradeYear != null">grade_year = #{gradeYear},</if>
<if test="gradeId != null">grade_id = #{gradeId},grade_name = (select grade_name from school_grade where id = #{gradeId}),</if>
<if test="classId != null">class_id = #{classId},class_name = (select class_value from school_class where id = #{classId}),</if>
<if test="gradeId != null">grade_id = #{gradeId},</if>
<if test="gradeName != null">grade_name = #{gradeName},</if>
<if test="classId != null">class_id = #{classId},</if>
<if test="className != null">class_name = #{className},</if>
<if test="classType != null">class_type = #{classType},</if>
<if test="name != null">name = #{name},</if>
<if test="sex != null">sex = #{sex},</if>
......@@ -192,7 +196,6 @@
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
......@@ -218,4 +221,22 @@
select id as classId, class_type as classType, class_value as classValue, class_name as className, class_alias as classAlias
from school_class where del_flag = '0' and grade_id = #{gradeId} order by class_value ASC
</select>
<insert id="batchSchoolAccessory">
insert into school_accessory(id, business_id, module_name, accessory_type, accessory_url, accessory_name, create_by, create_time) values
<foreach item="item" index="index" collection="list" separator=",">
(0,#{item.businessId}, #{item.moduleName}, #{item.accessoryType}, #{item.accessoryUrl}, #{item.accessoryName}, #{item.createBy}, #{item.createTime})
</foreach>
</insert>
<update id="deleteSchoolAccessoryByBusinessId" parameterType="Long">
update school_accessory set del_flag = '1' where accessory_type = "学生违纪附件" and business_id = #{id}
</update>
<update id="deleteSchoolAccessoryByBusinessIds" parameterType="String">
update school_accessory set del_flag = '1' where accessory_type = "学生违纪附件" and business_id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="yangtz.cs.liu.campus.mapper.student.SchoolStudentAchievementMapper">
<resultMap type="SchoolStudentAchievement" id="SchoolStudentAchievementResult">
<result property="id" column="id" />
<result property="schoolYear" column="school_year" />
<result property="semester" column="semester" />
<result property="year" column="year" />
<result property="grade" column="grade" />
<result property="className" column="class_name" />
<result property="classType" column="class_type" />
<result property="name" column="name" />
<result property="idCard" column="id_card" />
<result property="languageScore" column="language_score" />
<result property="mathScore" column="math_score" />
<result property="englishScore" column="english_score" />
<result property="physicsScore" column="physics_score" />
<result property="chemistryScore" column="chemistry_score" />
<result property="biologyScore" column="biology_score" />
<result property="politicsScore" column="politics_score" />
<result property="historyScore" column="history_score" />
<result property="geographyScore" column="geography_score" />
<result property="specialityName" column="speciality_name" />
<result property="specialityScore" column="speciality_score" />
<result property="eurhythmicsName" column="eurhythmics_name" />
<result property="eurhythmicsScore" column="eurhythmics_score" />
<result property="examType" column="exam_type" />
<result property="examTime" column="exam_time" />
<result property="classTeacherId" column="class_teacher_id" />
<result property="classTeacher" column="class_teacher" />
<result property="createById" column="create_by_id" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateById" column="update_by_id" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectSchoolStudentAchievementVo">
select id, school_year, semester, year, grade, class_name, class_type, name, id_card, language_score, math_score, english_score, physics_score, chemistry_score, biology_score, politics_score, history_score, geography_score, speciality_name, speciality_score, eurhythmics_name, eurhythmics_score, exam_type, exam_time, class_teacher_id, class_teacher, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag from school_student_achievement
</sql>
<select id="selectSchoolStudentAchievementList" parameterType="SchoolStudentAchievement" resultMap="SchoolStudentAchievementResult">
<include refid="selectSchoolStudentAchievementVo"/>
<where>
del_flag = '0'
<if test="schoolYear != null and schoolYear != ''"> and school_year = #{schoolYear}</if>
<if test="semester != null and semester != ''"> and semester = #{semester}</if>
<if test="year != null and year != ''"> and year = #{year}</if>
<if test="grade != null and grade != ''"> and grade = #{grade}</if>
<if test="className != null and className != ''"> and class_name = #{className}</if>
<if test="classType != null and classType != ''"> and class_type = #{classType}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if>
<if test="languageScore != null "> and language_score = #{languageScore}</if>
<if test="mathScore != null "> and math_score = #{mathScore}</if>
<if test="englishScore != null "> and english_score = #{englishScore}</if>
<if test="physicsScore != null "> and physics_score = #{physicsScore}</if>
<if test="chemistryScore != null "> and chemistry_score = #{chemistryScore}</if>
<if test="biologyScore != null "> and biology_score = #{biologyScore}</if>
<if test="politicsScore != null "> and politics_score = #{politicsScore}</if>
<if test="historyScore != null "> and history_score = #{historyScore}</if>
<if test="geographyScore != null "> and geography_score = #{geographyScore}</if>
<if test="specialityName != null and specialityName != ''"> and speciality_name like concat('%', #{specialityName}, '%')</if>
<if test="specialityScore != null "> and speciality_score = #{specialityScore}</if>
<if test="eurhythmicsName != null and eurhythmicsName != ''"> and eurhythmics_name like concat('%', #{eurhythmicsName}, '%')</if>
<if test="eurhythmicsScore != null "> and eurhythmics_score = #{eurhythmicsScore}</if>
<if test="examType != null and examType != ''"> and exam_type = #{examType}</if>
<if test="examTime != null "> and exam_time = #{examTime}</if>
<if test="classTeacherId != null "> and class_teacher_id = #{classTeacherId}</if>
<if test="classTeacher != null and classTeacher != ''"> and class_teacher = #{classTeacher}</if>
<if test="createById != null "> and create_by_id = #{createById}</if>
<if test="updateById != null "> and update_by_id = #{updateById}</if>
</where>
order by create_time DESC
</select>
<select id="selectSchoolStudentAchievementById" parameterType="Long" resultMap="SchoolStudentAchievementResult">
<include refid="selectSchoolStudentAchievementVo"/>
where id = #{id}
</select>
<insert id="insertSchoolStudentAchievement" parameterType="SchoolStudentAchievement" useGeneratedKeys="true" keyProperty="id">
insert into school_student_achievement
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="schoolYear != null">school_year,</if>
<if test="semester != null">semester,</if>
<if test="year != null">year,</if>
<if test="grade != null">grade,</if>
<if test="className != null">class_name,</if>
<if test="classType != null">class_type,</if>
<if test="name != null">name,</if>
<if test="idCard != null">id_card,</if>
<if test="languageScore != null">language_score,</if>
<if test="mathScore != null">math_score,</if>
<if test="englishScore != null">english_score,</if>
<if test="physicsScore != null">physics_score,</if>
<if test="chemistryScore != null">chemistry_score,</if>
<if test="biologyScore != null">biology_score,</if>
<if test="politicsScore != null">politics_score,</if>
<if test="historyScore != null">history_score,</if>
<if test="geographyScore != null">geography_score,</if>
<if test="specialityName != null">speciality_name,</if>
<if test="specialityScore != null">speciality_score,</if>
<if test="eurhythmicsName != null">eurhythmics_name,</if>
<if test="eurhythmicsScore != null">eurhythmics_score,</if>
<if test="examType != null">exam_type,</if>
<if test="examTime != null">exam_time,</if>
<if test="classTeacherId != null">class_teacher_id,</if>
<if test="classTeacher != null">class_teacher,</if>
<if test="createById != null">create_by_id,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateById != null">update_by_id,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="schoolYear != null">#{schoolYear},</if>
<if test="semester != null">#{semester},</if>
<if test="year != null">#{year},</if>
<if test="grade != null">#{grade},</if>
<if test="className != null">#{className},</if>
<if test="classType != null">#{classType},</if>
<if test="name != null">#{name},</if>
<if test="idCard != null">#{idCard},</if>
<if test="languageScore != null">#{languageScore},</if>
<if test="mathScore != null">#{mathScore},</if>
<if test="englishScore != null">#{englishScore},</if>
<if test="physicsScore != null">#{physicsScore},</if>
<if test="chemistryScore != null">#{chemistryScore},</if>
<if test="biologyScore != null">#{biologyScore},</if>
<if test="politicsScore != null">#{politicsScore},</if>
<if test="historyScore != null">#{historyScore},</if>
<if test="geographyScore != null">#{geographyScore},</if>
<if test="specialityName != null">#{specialityName},</if>
<if test="specialityScore != null">#{specialityScore},</if>
<if test="eurhythmicsName != null">#{eurhythmicsName},</if>
<if test="eurhythmicsScore != null">#{eurhythmicsScore},</if>
<if test="examType != null">#{examType},</if>
<if test="examTime != null">#{examTime},</if>
<if test="classTeacherId != null">#{classTeacherId},</if>
<if test="classTeacher != null">#{classTeacher},</if>
<if test="createById != null">#{createById},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateById != null">#{updateById},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateSchoolStudentAchievement" parameterType="SchoolStudentAchievement">
update school_student_achievement
<trim prefix="SET" suffixOverrides=",">
<if test="schoolYear != null">school_year = #{schoolYear},</if>
<if test="semester != null">semester = #{semester},</if>
<if test="year != null">year = #{year},</if>
<if test="grade != null">grade = #{grade},</if>
<if test="className != null">class_name = #{className},</if>
<if test="classType != null">class_type = #{classType},</if>
<if test="name != null">name = #{name},</if>
<if test="idCard != null">id_card = #{idCard},</if>
<if test="languageScore != null">language_score = #{languageScore},</if>
<if test="mathScore != null">math_score = #{mathScore},</if>
<if test="englishScore != null">english_score = #{englishScore},</if>
<if test="physicsScore != null">physics_score = #{physicsScore},</if>
<if test="chemistryScore != null">chemistry_score = #{chemistryScore},</if>
<if test="biologyScore != null">biology_score = #{biologyScore},</if>
<if test="politicsScore != null">politics_score = #{politicsScore},</if>
<if test="historyScore != null">history_score = #{historyScore},</if>
<if test="geographyScore != null">geography_score = #{geographyScore},</if>
<if test="specialityName != null">speciality_name = #{specialityName},</if>
<if test="specialityScore != null">speciality_score = #{specialityScore},</if>
<if test="eurhythmicsName != null">eurhythmics_name = #{eurhythmicsName},</if>
<if test="eurhythmicsScore != null">eurhythmics_score = #{eurhythmicsScore},</if>
<if test="examType != null">exam_type = #{examType},</if>
<if test="examTime != null">exam_time = #{examTime},</if>
<if test="classTeacherId != null">class_teacher_id = #{classTeacherId},</if>
<if test="classTeacher != null">class_teacher = #{classTeacher},</if>
<if test="createById != null">create_by_id = #{createById},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateById != null">update_by_id = #{updateById},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<update id="deleteSchoolStudentAchievementById" parameterType="Long">
update school_student_achievement set del_flag = '1' where id = #{id}
</update>
<update id="deleteSchoolStudentAchievementByIds" parameterType="String">
update school_student_achievement set del_flag = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="yangtz.cs.liu.campus.mapper.student.SchoolStudentAwardMapper">
<resultMap type="SchoolStudentAward" id="SchoolStudentAwardResult">
<result property="id" column="id" />
<result property="schoolYear" column="school_year" />
<result property="semester" column="semester" />
<result property="year" column="year" />
<result property="grade" column="grade" />
<result property="className" column="class_name" />
<result property="classType" column="class_type" />
<result property="name" column="name" />
<result property="idCard" column="id_card" />
<result property="sex" column="sex" />
<result property="classTeacherId" column="class_teacher_id" />
<result property="classTeacher" column="class_teacher" />
<result property="departmentDirectorId" column="department_director_id" />
<result property="departmentDirector" column="department_director" />
<result property="awardType" column="award_type" />
<result property="awardRank" column="award_rank" />
<result property="awardTime" column="award_time" />
<result property="remark" column="remark" />
<result property="auditState" column="audit_state" />
<result property="createById" column="create_by_id" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateById" column="update_by_id" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectSchoolStudentAwardVo">
select id, school_year, semester, year, grade, class_name, class_type, name, id_card, sex, class_teacher_id, class_teacher, department_director_id, department_director, award_type, award_rank, award_time, remark, audit_state, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag from school_student_award
</sql>
<select id="selectSchoolStudentAwardList" parameterType="SchoolStudentAward" resultMap="SchoolStudentAwardResult">
<include refid="selectSchoolStudentAwardVo"/>
<where>
del_flag = '0'
<if test="schoolYear != null and schoolYear != ''"> and school_year = #{schoolYear}</if>
<if test="semester != null and semester != ''"> and semester = #{semester}</if>
<if test="year != null and year != ''"> and year = #{year}</if>
<if test="grade != null and grade != ''"> and grade = #{grade}</if>
<if test="className != null and className != ''"> and class_name = #{className}</if>
<if test="classType != null and classType != ''"> and class_type = #{classType}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if>
<if test="sex != null and sex != ''"> and sex = #{sex}</if>
<if test="classTeacherId != null "> and class_teacher_id = #{classTeacherId}</if>
<if test="classTeacher != null and classTeacher != ''"> and class_teacher = #{classTeacher}</if>
<if test="departmentDirectorId != null "> and department_director_id = #{departmentDirectorId}</if>
<if test="departmentDirector != null and departmentDirector != ''"> and department_director = #{departmentDirector}</if>
<if test="awardType != null and awardType != ''"> and award_type = #{awardType}</if>
<if test="awardRank != null and awardRank != ''"> and award_rank = #{awardRank}</if>
<if test="awardTime != null "> and award_time = #{awardTime}</if>
<if test="auditState != null and auditState != ''"> and audit_state != #{auditState}</if>
<if test="createById != null "> and create_by_id = #{createById}</if>
<if test="updateById != null "> and update_by_id = #{updateById}</if>
</where>
order by create_time DESC
</select>
<select id="selectSchoolStudentAwardListTg" parameterType="SchoolStudentAward" resultMap="SchoolStudentAwardResult">
<include refid="selectSchoolStudentAwardVo"/>
<where>
del_flag = '0'
<if test="schoolYear != null and schoolYear != ''"> and school_year = #{schoolYear}</if>
<if test="semester != null and semester != ''"> and semester = #{semester}</if>
<if test="year != null and year != ''"> and year = #{year}</if>
<if test="grade != null and grade != ''"> and grade = #{grade}</if>
<if test="className != null and className != ''"> and class_name = #{className}</if>
<if test="classType != null and classType != ''"> and class_type = #{classType}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if>
<if test="sex != null and sex != ''"> and sex = #{sex}</if>
<if test="classTeacherId != null "> and class_teacher_id = #{classTeacherId}</if>
<if test="classTeacher != null and classTeacher != ''"> and class_teacher = #{classTeacher}</if>
<if test="departmentDirectorId != null "> and department_director_id = #{departmentDirectorId}</if>
<if test="departmentDirector != null and departmentDirector != ''"> and department_director = #{departmentDirector}</if>
<if test="awardType != null and awardType != ''"> and award_type = #{awardType}</if>
<if test="awardRank != null and awardRank != ''"> and award_rank = #{awardRank}</if>
<if test="awardTime != null "> and award_time = #{awardTime}</if>
<if test="auditState != null and auditState != ''"> and audit_state = #{auditState}</if>
<if test="createById != null "> and create_by_id = #{createById}</if>
<if test="updateById != null "> and update_by_id = #{updateById}</if>
</where>
order by create_time DESC
</select>
<select id="selectSchoolStudentAwardById" parameterType="Long" resultMap="SchoolStudentAwardResult">
<include refid="selectSchoolStudentAwardVo"/>
where id = #{id}
</select>
<insert id="insertSchoolStudentAward" parameterType="SchoolStudentAward" useGeneratedKeys="true" keyProperty="id">
insert into school_student_award
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="schoolYear != null">school_year,</if>
<if test="semester != null">semester,</if>
<if test="year != null">year,</if>
<if test="grade != null">grade,</if>
<if test="className != null">class_name,</if>
<if test="classType != null">class_type,</if>
<if test="name != null">name,</if>
<if test="idCard != null">id_card,</if>
<if test="sex != null">sex,</if>
<if test="classTeacherId != null">class_teacher_id,</if>
<if test="classTeacher != null">class_teacher,</if>
<if test="departmentDirectorId != null">department_director_id,</if>
<if test="departmentDirector != null">department_director,</if>
<if test="awardType != null">award_type,</if>
<if test="awardRank != null">award_rank,</if>
<if test="awardTime != null">award_time,</if>
<if test="remark != null">remark,</if>
<if test="auditState != null">audit_state,</if>
<if test="createById != null">create_by_id,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateById != null">update_by_id,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="schoolYear != null">#{schoolYear},</if>
<if test="semester != null">#{semester},</if>
<if test="year != null">#{year},</if>
<if test="grade != null">#{grade},</if>
<if test="className != null">#{className},</if>
<if test="classType != null">#{classType},</if>
<if test="name != null">#{name},</if>
<if test="idCard != null">#{idCard},</if>
<if test="sex != null">#{sex},</if>
<if test="classTeacherId != null">#{classTeacherId},</if>
<if test="classTeacher != null">#{classTeacher},</if>
<if test="departmentDirectorId != null">#{departmentDirectorId},</if>
<if test="departmentDirector != null">#{departmentDirector},</if>
<if test="awardType != null">#{awardType},</if>
<if test="awardRank != null">#{awardRank},</if>
<if test="awardTime != null">#{awardTime},</if>
<if test="remark != null">#{remark},</if>
<if test="auditState != null">#{auditState},</if>
<if test="createById != null">#{createById},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateById != null">#{updateById},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateSchoolStudentAward" parameterType="SchoolStudentAward">
update school_student_award
<trim prefix="SET" suffixOverrides=",">
<if test="schoolYear != null">school_year = #{schoolYear},</if>
<if test="semester != null">semester = #{semester},</if>
<if test="year != null">year = #{year},</if>
<if test="grade != null">grade = #{grade},</if>
<if test="className != null">class_name = #{className},</if>
<if test="classType != null">class_type = #{classType},</if>
<if test="name != null">name = #{name},</if>
<if test="idCard != null">id_card = #{idCard},</if>
<if test="sex != null">sex = #{sex},</if>
<if test="classTeacherId != null">class_teacher_id = #{classTeacherId},</if>
<if test="classTeacher != null">class_teacher = #{classTeacher},</if>
<if test="departmentDirectorId != null">department_director_id = #{departmentDirectorId},</if>
<if test="departmentDirector != null">department_director = #{departmentDirector},</if>
<if test="awardType != null">award_type = #{awardType},</if>
<if test="awardRank != null">award_rank = #{awardRank},</if>
<if test="awardTime != null">award_time = #{awardTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="auditState != null">audit_state = #{auditState},</if>
<if test="createById != null">create_by_id = #{createById},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateById != null">update_by_id = #{updateById},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<update id="deleteSchoolStudentAwardById" parameterType="Long">
update school_student_award set del_flag = '1' where id = #{id}
</update>
<update id="deleteSchoolStudentAwardByIds" parameterType="String">
update school_student_award set del_flag = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment