Commit 154c6ae3 by xuwenhao

11.1测试修改

parent f7bc0052
...@@ -89,13 +89,13 @@ public class StudentScoreController extends BaseController { ...@@ -89,13 +89,13 @@ public class StudentScoreController extends BaseController {
} }
/** /**
* 根据身份证号查询学生信息 * 根据号查询学生信息
* @param idCard * @param schoolNo
* @return * @return
*/ */
@GetMapping("/selectStudent") @GetMapping("/selectStudent")
public AjaxResult selectStudent(@RequestParam("idCard") String idCard){ public AjaxResult selectStudent(@RequestParam("schoolNo") String schoolNo){
return AjaxResult.success(studentScoreService.selectStudent(idCard)); return AjaxResult.success(studentScoreService.selectStudent(schoolNo));
} }
/** /**
......
...@@ -100,7 +100,8 @@ public class SchoolPurchaseController extends BaseController { ...@@ -100,7 +100,8 @@ public class SchoolPurchaseController extends BaseController {
if (getDeptId() == null){ if (getDeptId() == null){
throw new ServiceException("未查询到当前部门id"); throw new ServiceException("未查询到当前部门id");
} }
schoolPurchase.setDeptId(getDeptId()); // schoolPurchase.setDeptId(getDeptId());
schoolPurchase.setApplyId(getUserId());
startPage(); startPage();
List<SchoolPurchaseVo> list = schoolPurchaseService.queryList(submitState,schoolPurchase); List<SchoolPurchaseVo> list = schoolPurchaseService.queryList(submitState,schoolPurchase);
return getDataTable(list); return getDataTable(list);
......
...@@ -137,7 +137,7 @@ public class LogisticsRepairsController extends BaseController ...@@ -137,7 +137,7 @@ public class LogisticsRepairsController extends BaseController
*/ */
@GetMapping("/listAll") @GetMapping("/listAll")
public TableDataInfo listAll(LogisticsRepairs logisticsRepairs){ public TableDataInfo listAll(LogisticsRepairs logisticsRepairs){
startPage(); // startPage();
return getDataTable(logisticsRepairsService.selectListAll(logisticsRepairs)); return getDataTable(logisticsRepairsService.selectListAll(logisticsRepairs));
} }
} }
...@@ -63,7 +63,7 @@ public class SchoolExperimentPlanController extends BaseController ...@@ -63,7 +63,7 @@ public class SchoolExperimentPlanController extends BaseController
//如果是管理员,查询全部列表 //如果是管理员,查询全部列表
if (user.isAdmin()){ if (user.isAdmin()){
startPage(); startPage();
List<SchoolExperimentPlanVo> list = schoolExperimentPlanService.selectSchoolExperimentPlanList(schoolExperimentPlanVo); List<SchoolExperimentPlanVo> list = schoolExperimentPlanService.selectExperimentPlanListAdmin(schoolExperimentPlanVo);
list.forEach(list1 -> { list.forEach(list1 -> {
String semester = ""; String semester = "";
if (list1.getSemester().equals("1")){ if (list1.getSemester().equals("1")){
...@@ -93,40 +93,12 @@ public class SchoolExperimentPlanController extends BaseController ...@@ -93,40 +93,12 @@ public class SchoolExperimentPlanController extends BaseController
gradeIds.add(gradeId); gradeIds.add(gradeId);
}); });
//查询级部成员信息
LambdaQueryWrapper<SchoolGradeMentor> wrapper = new LambdaQueryWrapper<>();
wrapper.in(SchoolGradeMentor::getGradeId,gradeIds)
.eq(SchoolGradeMentor::getTeacherId,user.getUserId());
List<SchoolGradeMentor> schoolGradeMentors = schoolGradeMentorService.list(wrapper);
schoolExperimentPlanVo.setGradeIds(gradeIds); schoolExperimentPlanVo.setGradeIds(gradeIds);
schoolExperimentPlanVo.setTeacherId(user.getUserId());
startPage(); startPage();
List<SchoolExperimentPlanVo> list = schoolExperimentPlanService.selectSchoolExperimentPlanList(schoolExperimentPlanVo); List<SchoolExperimentPlanVo> list = schoolExperimentPlanService.selectSchoolExperimentPlanList(schoolExperimentPlanVo);
List<SchoolExperimentPlanVo> listNew = new ArrayList<>();
//去除用户所在级部和所在学科组不匹配的数据
if (StringUtils.isNotNull(schoolGradeMentors)){
for (SchoolExperimentPlanVo experimentPlanVo : list) {
for (SchoolGradeMentor schoolGradeMentor : schoolGradeMentors) {
if (schoolGradeMentor.getGradeId().equals(experimentPlanVo.getGradeId())){
if (StringUtils.isNotBlank(schoolGradeMentor.getSubGroup())){
if (!(schoolGradeMentor.getSubGroup().equals(experimentPlanVo.getSub()))){
listNew.add(experimentPlanVo);
}
}
}
}
}
}
if (listNew.size() > 0){
for (SchoolExperimentPlanVo experimentPlanVo : listNew) {
list.remove(experimentPlanVo);
}
}
list.forEach(list1 -> { list.forEach(list1 -> {
String semester = ""; String semester = "";
if (list1.getSemester().equals("1")){ if (list1.getSemester().equals("1")){
...@@ -322,7 +294,7 @@ public class SchoolExperimentPlanController extends BaseController ...@@ -322,7 +294,7 @@ public class SchoolExperimentPlanController extends BaseController
//管理员角色返回全部数据 //管理员角色返回全部数据
if (user.isAdmin()){ if (user.isAdmin()){
startPage(); startPage();
List<Map<String, Object>> list = schoolExperimentPlanService.gradeCountExperiment(schoolExperimentPlanVo); List<Map<String, Object>> list = schoolExperimentPlanService.countExperimentListAdmin(schoolExperimentPlanVo);
list.forEach(list1 -> { list.forEach(list1 -> {
//总班级数 //总班级数
int totalClass = Integer.parseInt(list1.get("totalClass").toString()); int totalClass = Integer.parseInt(list1.get("totalClass").toString());
...@@ -368,39 +340,11 @@ public class SchoolExperimentPlanController extends BaseController ...@@ -368,39 +340,11 @@ public class SchoolExperimentPlanController extends BaseController
gradeIds.add(gradeId); gradeIds.add(gradeId);
}); });
//查询级部成员信息
LambdaQueryWrapper<SchoolGradeMentor> wrapper = new LambdaQueryWrapper<>();
wrapper.in(SchoolGradeMentor::getGradeId,gradeIds)
.eq(SchoolGradeMentor::getTeacherId,user.getUserId());
List<SchoolGradeMentor> schoolGradeMentors = schoolGradeMentorService.list(wrapper);
schoolExperimentPlanVo.setGradeIds(gradeIds); schoolExperimentPlanVo.setGradeIds(gradeIds);
schoolExperimentPlanVo.setTeacherId(user.getUserId());
startPage(); startPage();
List<Map<String, Object>> list = schoolExperimentPlanService.gradeCountExperiment(schoolExperimentPlanVo); List<Map<String, Object>> list = schoolExperimentPlanService.gradeCountExperiment(schoolExperimentPlanVo);
List<Map<String, Object>> listNew = new ArrayList<>();
//去除用户所在级部和所在学科组不匹配的数据
if (StringUtils.isNotNull(schoolGradeMentors)){
for (Map<String, Object> map : list) {
for (SchoolGradeMentor schoolGradeMentor : schoolGradeMentors) {
if (schoolGradeMentor.getGradeId().equals(map.get("gradeId"))){
if (StringUtils.isNotBlank(schoolGradeMentor.getSubGroup())){
if (!(schoolGradeMentor.getSubGroup().equals(map.get("sub")))){
listNew.add(map);
}
}
}
}
}
}
if (listNew.size() > 0){
for (Map<String, Object> map : listNew) {
list.remove(map);
}
}
list.forEach(list1 -> { list.forEach(list1 -> {
//总班级数 //总班级数
int totalClass = Integer.parseInt(list1.get("totalClass").toString()); int totalClass = Integer.parseInt(list1.get("totalClass").toString());
...@@ -440,7 +384,7 @@ public class SchoolExperimentPlanController extends BaseController ...@@ -440,7 +384,7 @@ public class SchoolExperimentPlanController extends BaseController
//管理员角色返回全部数据 //管理员角色返回全部数据
if (user.isAdmin()){ if (user.isAdmin()){
startPage(); startPage();
List<Map<String, Object>> list = schoolTeacherLabApplyService.gradeCountClass(schoolTeacherLabApplyVo); List<Map<String, Object>> list = schoolTeacherLabApplyService.gradeCountClassListAdmin(schoolTeacherLabApplyVo);
list.forEach(list1 -> { list.forEach(list1 -> {
//计划实验数 //计划实验数
int jhsys = Integer.parseInt(list1.get("jhsys").toString()); int jhsys = Integer.parseInt(list1.get("jhsys").toString());
...@@ -484,13 +428,8 @@ public class SchoolExperimentPlanController extends BaseController ...@@ -484,13 +428,8 @@ public class SchoolExperimentPlanController extends BaseController
gradeIds.add(gradeId); gradeIds.add(gradeId);
}); });
//查询级部成员信息
LambdaQueryWrapper<SchoolGradeMentor> wrapper = new LambdaQueryWrapper<>();
wrapper.in(SchoolGradeMentor::getGradeId,gradeIds)
.eq(SchoolGradeMentor::getTeacherId,user.getUserId());
List<SchoolGradeMentor> schoolGradeMentors = schoolGradeMentorService.list(wrapper);
schoolTeacherLabApplyVo.setGradeIds(gradeIds); schoolTeacherLabApplyVo.setGradeIds(gradeIds);
schoolTeacherLabApplyVo.setTeacherId(user.getUserId());
startPage(); startPage();
List<Map<String, Object>> list = schoolTeacherLabApplyService.gradeCountClass(schoolTeacherLabApplyVo); List<Map<String, Object>> list = schoolTeacherLabApplyService.gradeCountClass(schoolTeacherLabApplyVo);
list.forEach(list1 -> { list.forEach(list1 -> {
......
...@@ -63,8 +63,6 @@ public class SchoolLabClassYearController extends BaseController ...@@ -63,8 +63,6 @@ public class SchoolLabClassYearController extends BaseController
@Autowired @Autowired
private ISchoolGradeService gradeService; private ISchoolGradeService gradeService;
@Autowired @Autowired
private ISchoolGradeMentorService mentorService;
@Autowired
private ISchoolClassMentorService classMentorService; private ISchoolClassMentorService classMentorService;
/** /**
...@@ -78,7 +76,7 @@ public class SchoolLabClassYearController extends BaseController ...@@ -78,7 +76,7 @@ public class SchoolLabClassYearController extends BaseController
//如果是管理员返回全部数据 //如果是管理员返回全部数据
if (user.isAdmin()){ if (user.isAdmin()){
startPage(); startPage();
List<SchoolLabClassYearVo> list = schoolLabClassYearService.selectSchoolLabClassYearList(schoolLabClassYearVo); List<SchoolLabClassYearVo> list = schoolLabClassYearService.selectLabClassYearListAdmin(schoolLabClassYearVo);
list.forEach(list1 -> { list.forEach(list1 -> {
String semester = ""; String semester = "";
if (list1.getSemester().equals("1")){ if (list1.getSemester().equals("1")){
...@@ -111,38 +109,11 @@ public class SchoolLabClassYearController extends BaseController ...@@ -111,38 +109,11 @@ public class SchoolLabClassYearController extends BaseController
gradeIds.add(gradeId); gradeIds.add(gradeId);
}); });
//查询级部成员信息
LambdaQueryWrapper<SchoolGradeMentor> wrapper = new LambdaQueryWrapper<>();
wrapper.in(SchoolGradeMentor::getGradeId,gradeIds)
.eq(SchoolGradeMentor::getTeacherId,user.getUserId());
List<SchoolGradeMentor> schoolGradeMentors = mentorService.list(wrapper);
schoolLabClassYearVo.setGradeIds(gradeIds); schoolLabClassYearVo.setGradeIds(gradeIds);
schoolLabClassYearVo.setUserId(user.getUserId());
startPage(); startPage();
List<SchoolLabClassYearVo> list = schoolLabClassYearService.selectSchoolLabClassYearList(schoolLabClassYearVo); List<SchoolLabClassYearVo> list = schoolLabClassYearService.selectSchoolLabClassYearList(schoolLabClassYearVo);
List<SchoolLabClassYearVo> listNew = new ArrayList<>();
//去除用户所在级部和所在学科组不匹配的数据
if (StringUtils.isNotNull(schoolGradeMentors)){
for (SchoolLabClassYearVo labClassYearVo : list) {
for (SchoolGradeMentor schoolGradeMentor : schoolGradeMentors) {
if (schoolGradeMentor.getGradeId().equals(labClassYearVo.getGradeId())){
if (StringUtils.isNotBlank(schoolGradeMentor.getSubGroup())){
if (!(schoolGradeMentor.getSubGroup().equals(labClassYearVo.getSub()))){
listNew.add(labClassYearVo);
}
}
}
}
}
}
if (listNew.size() > 0){
for (SchoolLabClassYearVo labClassYearVo : listNew) {
list.remove(labClassYearVo);
}
}
list.forEach(list1 -> { list.forEach(list1 -> {
String semester = ""; String semester = "";
if (list1.getSemester().equals("1")){ if (list1.getSemester().equals("1")){
...@@ -235,7 +206,86 @@ public class SchoolLabClassYearController extends BaseController ...@@ -235,7 +206,86 @@ public class SchoolLabClassYearController extends BaseController
@GetMapping("/getLab") @GetMapping("/getLab")
public AjaxResult getLab(SchoolExperimentPlanVo schoolExperimentPlanVo){ public AjaxResult getLab(SchoolExperimentPlanVo schoolExperimentPlanVo){
schoolExperimentPlanVo.setIsAppointment("0"); schoolExperimentPlanVo.setIsAppointment("0");
return AjaxResult.success(schoolExperimentPlanService.selectSchoolExperimentPlanList(schoolExperimentPlanVo)); SysUser user = SecurityUtils.getLoginUser().getUser();
//如果是管理员,查询全部列表
if (user.isAdmin()){
startPage();
List<SchoolExperimentPlanVo> list = schoolExperimentPlanService.selectSchoolExperimentPlanList(schoolExperimentPlanVo);
list.forEach(list1 -> {
String semester = "";
if (list1.getSemester().equals("1")){
semester = "上学期";
}else {
semester = "下学期";
}
list1.setSchoolYearSemester(list1.getSchoolYear() + semester);
list1.setPlannedTime(list1.getPlannedStartTime() + "至" + list1.getPlannedEndTime());
});
return AjaxResult.success(list);
}
//获取最新学年
int schoolYear = gradeService.isNewSchoolYear();
//教师级部
List<Map<String, Object>> gradeList = schoolExperimentPlanService.getGrade(schoolYear,user.getUserId());
if (StringUtils.isNull(gradeList) || gradeList.size() == 0) {
throw new ServiceException("没有您所在的级部信息");
}
//级部id集合
List<Long> gradeIds = new ArrayList<>();
gradeList.forEach(gradeList1 -> {
Object id = gradeList1.get("id");
Long gradeId = Long.valueOf(String.valueOf(id));
gradeIds.add(gradeId);
});
// //查询级部成员信息
// LambdaQueryWrapper<SchoolGradeMentor> wrapper = new LambdaQueryWrapper<>();
// wrapper.in(SchoolGradeMentor::getGradeId,gradeIds)
// .eq(SchoolGradeMentor::getTeacherId,user.getUserId());
// List<SchoolGradeMentor> schoolGradeMentors = schoolGradeMentorService.list(wrapper);
schoolExperimentPlanVo.setGradeIds(gradeIds);
schoolExperimentPlanVo.setTeacherId(getUserId());
List<SchoolExperimentPlanVo> list = schoolExperimentPlanService.selectSchoolExperimentPlanList(schoolExperimentPlanVo);
// List<SchoolExperimentPlanVo> listNew = new ArrayList<>();
//
// //去除用户所在级部和所在学科组不匹配的数据
// if (StringUtils.isNotNull(schoolGradeMentors)){
// for (SchoolExperimentPlanVo experimentPlanVo : list) {
// for (SchoolGradeMentor schoolGradeMentor : schoolGradeMentors) {
// if (schoolGradeMentor.getGradeId().equals(experimentPlanVo.getGradeId())){
// if (StringUtils.isNotBlank(schoolGradeMentor.getSubGroup())){
// if (!(schoolGradeMentor.getSubGroup().equals(experimentPlanVo.getSub()))){
// listNew.add(experimentPlanVo);
// }
// }else {
// listNew.add(experimentPlanVo);
// }
// }
// }
// }
// }
//
// if (listNew.size() > 0){
// for (SchoolExperimentPlanVo experimentPlanVo : listNew) {
// list.remove(experimentPlanVo);
// }
// }
list.forEach(list1 -> {
String semester = "";
if (list1.getSemester().equals("1")){
semester = "上学期";
}else {
semester = "下学期";
}
list1.setSchoolYearSemester(list1.getSchoolYear() + semester);
list1.setPlannedTime(list1.getPlannedStartTime() + "至" + list1.getPlannedEndTime());
});
return AjaxResult.success(list);
} }
/** /**
...@@ -305,7 +355,7 @@ public class SchoolLabClassYearController extends BaseController ...@@ -305,7 +355,7 @@ public class SchoolLabClassYearController extends BaseController
// 查询该教师属于哪个班级,教哪门课 // 查询该教师属于哪个班级,教哪门课
LambdaQueryWrapper<SchoolClassMentor> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SchoolClassMentor> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolClassMentor::getTeacherId,user.getUserId()) wrapper.eq(SchoolClassMentor::getTeacherId,user.getUserId())
.in(SchoolClassMentor::getCourseId,6,8,9); .in(SchoolClassMentor::getCourseName,"物理","化学","生物");
List<SchoolClassMentor> schoolClassMentors = classMentorService.list(wrapper); List<SchoolClassMentor> schoolClassMentors = classMentorService.list(wrapper);
if (StringUtils.isNotNull(schoolClassMentors)){ if (StringUtils.isNotNull(schoolClassMentors)){
for (SchoolClassMentor schoolClassMentor : schoolClassMentors) { for (SchoolClassMentor schoolClassMentor : schoolClassMentors) {
...@@ -318,7 +368,9 @@ public class SchoolLabClassYearController extends BaseController ...@@ -318,7 +368,9 @@ public class SchoolLabClassYearController extends BaseController
} }
} }
schoolLabClassYearVo.setApplyId(user.getUserId()); schoolLabClassYearVo.setApplyId(user.getUserId());
schoolLabClassYearVo.setSubs(subs); if(subs.size() > 0){
schoolLabClassYearVo.setSubs(subs);
}
startPage(); startPage();
List<SchoolLabClassYearVo> list = schoolLabClassYearService.getTeacherLabList(schoolLabClassYearVo); List<SchoolLabClassYearVo> list = schoolLabClassYearService.getTeacherLabList(schoolLabClassYearVo);
list.forEach(list1 -> { list.forEach(list1 -> {
......
...@@ -396,7 +396,7 @@ public class SchoolStudentController extends BaseController { ...@@ -396,7 +396,7 @@ public class SchoolStudentController extends BaseController {
* @return * @return
*/ */
@GetMapping("/queryByrelationship/{id}/{relationship}") @GetMapping("/queryByrelationship/{id}/{relationship}")
public AjaxResult queryAllInfoByrelationship1(@PathVariable("id") Long id,@PathVariable("relationship") String relationship) { public AjaxResult queryAllInfoByrelationship1(@PathVariable("id") String id,@PathVariable("relationship") String relationship) {
//学生家长信息列表??? //学生家长信息列表???
/*SchoolStudentParent parent = new SchoolStudentParent(); /*SchoolStudentParent parent = new SchoolStudentParent();
...@@ -404,10 +404,13 @@ public class SchoolStudentController extends BaseController { ...@@ -404,10 +404,13 @@ public class SchoolStudentController extends BaseController {
parent.setRelationship(relationship); parent.setRelationship(relationship);
List<SchoolStudentParent> parentList = parentService.queryList(parent);*/ List<SchoolStudentParent> parentList = parentService.queryList(parent);*/
//SchoolStudentParent schoolStudentParent = new SchoolStudentParent(); //SchoolStudentParent schoolStudentParent = new SchoolStudentParent();
if (StringUtils.isEmpty(id) || id.equals("undefined")){
throw new ServiceException("请先选择学生!");
}
Long StudentId = Long.valueOf(id);
LambdaQueryWrapper<SchoolStudentParent> lqw = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SchoolStudentParent> lqw = new LambdaQueryWrapper<>();
lqw lqw
.eq(SchoolStudentParent::getStudentId,id) .eq(SchoolStudentParent::getStudentId,StudentId)
.eq(SchoolStudentParent::getRelationship,relationship); .eq(SchoolStudentParent::getRelationship,relationship);
List<SchoolStudentParent> list = parentService.list(lqw); List<SchoolStudentParent> list = parentService.list(lqw);
//对应关系的家长不存在,抛异常 //对应关系的家长不存在,抛异常
......
...@@ -44,19 +44,19 @@ public class SchoolEquipmentLedger extends OurBaseEntity ...@@ -44,19 +44,19 @@ public class SchoolEquipmentLedger extends OurBaseEntity
private String unit; private String unit;
/** 归属类型(1公共区域,2信息中心,3个人) */ /** 归属类型(1公共区域,2信息中心,3个人) */
@Excel(name = "归属类型", readConverterExp = "1=公共区域,2=信息中心,3=个人") @Excel(name = "归属类型", readConverterExp = "1=公共区域,2=信息中心,3=个人", combo = {"公共区域","信息中心","个人"})
private String affiliationType; private String affiliationType;
/** 设备状态(1完好,2损坏,3报废) */ /** 设备状态(1完好,2损坏,3报废) */
@Excel(name = "设备状态", readConverterExp = "1=完好,2=损坏,3=报废") @Excel(name = "设备状态", readConverterExp = "1=完好,2=损坏,3=报废", combo = {"完好","损坏","报废"})
private String equipmentState; private String equipmentState;
/** 是否允许借出(1是,0否) */ /** 是否允许借出(1是,0否) */
@Excel(name = "是否允许借出", readConverterExp = "1=是,0=否") @Excel(name = "是否允许借出", readConverterExp = "1=是,0=否", combo = {"是","否"})
private String isAllowLend; private String isAllowLend;
/** 是否已借出(1是,0否) */ /** 是否已借出(1是,0否) */
@Excel(name = "是否已借出", readConverterExp = "1=是,0=否") @Excel(name = "是否已借出", readConverterExp = "1=是,0=否", combo = {"是","否"})
private String isLend; private String isLend;
/** 投产日期 */ /** 投产日期 */
......
...@@ -29,6 +29,9 @@ public class SchoolGradeMentor extends OurBaseEntity { ...@@ -29,6 +29,9 @@ public class SchoolGradeMentor extends OurBaseEntity {
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
private Date endTime; private Date endTime;
/** 类型(1年级部,2学科组长) */
private String type;
/** 职务 */ /** 职务 */
@NotBlank(message = "职务不能为空") @NotBlank(message = "职务不能为空")
private String teacherPost; private String teacherPost;
......
...@@ -17,11 +17,11 @@ public interface StudentScoreMapper extends BaseMapper<SchoolStudentScore> { ...@@ -17,11 +17,11 @@ public interface StudentScoreMapper extends BaseMapper<SchoolStudentScore> {
List<SchoolStudentScoreVo> selectStudentScoreList(SchoolStudentScoreVo schoolStudentScoreVo); List<SchoolStudentScoreVo> selectStudentScoreList(SchoolStudentScoreVo schoolStudentScoreVo);
/** /**
* 根据身份证号获取学生信息 * 根据号获取学生信息
* @param idCard * @param schoolNo
* @return * @return
*/ */
SchoolStudentScoreVo selectStudent(@Param("idCard") String idCard); SchoolStudentScoreVo selectStudent(@Param("schoolNo") String schoolNo);
/** /**
* 查询学生成绩详细信息 * 查询学生成绩详细信息
......
...@@ -91,4 +91,18 @@ public interface SchoolDcwjRyMapper extends BaseMapper<SchoolDcwjRy> ...@@ -91,4 +91,18 @@ public interface SchoolDcwjRyMapper extends BaseMapper<SchoolDcwjRy>
public List<DcwjRyExportVo> getHeaderExportData(@Param("dcwjId") Long dcwjId, public List<DcwjRyExportVo> getHeaderExportData(@Param("dcwjId") Long dcwjId,
@Param("entity") SchoolDcwjAnVo vo, @Param("entity") SchoolDcwjAnVo vo,
@Param("studentIds")List<Long> studentIds); @Param("studentIds")List<Long> studentIds);
/**
* 批量新增调查问卷接收人(教师)
* @param schoolDcwjRyList
* @return
*/
int batchInsertDcwjRyTeacher(List<SchoolDcwjRy> schoolDcwjRyList);
/**
* 批量新增调查问卷接收人(家长)
* @param schoolDcwjRyList
* @return
*/
int batchInsertDcwjRyStudent(List<SchoolDcwjRy> schoolDcwjRyList);
} }
...@@ -34,6 +34,14 @@ public interface SchoolExperimentPlanMapper extends BaseMapper<SchoolExperimentP ...@@ -34,6 +34,14 @@ public interface SchoolExperimentPlanMapper extends BaseMapper<SchoolExperimentP
*/ */
public List<SchoolExperimentPlanVo> selectSchoolExperimentPlanList(SchoolExperimentPlanVo schoolExperimentPlanVo); public List<SchoolExperimentPlanVo> selectSchoolExperimentPlanList(SchoolExperimentPlanVo schoolExperimentPlanVo);
/**
* 查询实验计划列表(管理员)
*
* @param schoolExperimentPlanVo 实验计划
* @return 实验计划集合
*/
public List<SchoolExperimentPlanVo> selectExperimentPlanListAdmin(SchoolExperimentPlanVo schoolExperimentPlanVo);
public List<Map<String, String>> selectNameByVo(SchoolExperimentPlanVo schoolExperimentPlanVo); public List<Map<String, String>> selectNameByVo(SchoolExperimentPlanVo schoolExperimentPlanVo);
/** /**
* 新增实验计划 * 新增实验计划
...@@ -119,4 +127,11 @@ public interface SchoolExperimentPlanMapper extends BaseMapper<SchoolExperimentP ...@@ -119,4 +127,11 @@ public interface SchoolExperimentPlanMapper extends BaseMapper<SchoolExperimentP
* @return * @return
*/ */
List<Map<String, Object>> countExperiment(SchoolExperimentPlanVo schoolExperimentPlanVo); List<Map<String, Object>> countExperiment(SchoolExperimentPlanVo schoolExperimentPlanVo);
/**
* 查看实验室完成情况列表(管理员)
* @param schoolExperimentPlanVo
* @return
*/
List<Map<String, Object>> countExperimentListAdmin(SchoolExperimentPlanVo schoolExperimentPlanVo);
} }
...@@ -35,6 +35,14 @@ public interface SchoolLabClassYearMapper extends BaseMapper<SchoolLabClassYear> ...@@ -35,6 +35,14 @@ public interface SchoolLabClassYearMapper extends BaseMapper<SchoolLabClassYear>
public List<SchoolLabClassYearVo> selectSchoolLabClassYearList(SchoolLabClassYearVo schoolLabClassYearVo); public List<SchoolLabClassYearVo> selectSchoolLabClassYearList(SchoolLabClassYearVo schoolLabClassYearVo);
/** /**
* 查询年级实验室预约列表(管理员)
*
* @param schoolLabClassYearVo 年级实验室预约
* @return 年级实验室预约集合
*/
public List<SchoolLabClassYearVo> selectLabClassYearListAdmin(SchoolLabClassYearVo schoolLabClassYearVo);
/**
* 新增年级实验室预约 * 新增年级实验室预约
* *
* @param schoolLabClassYear 年级实验室预约 * @param schoolLabClassYear 年级实验室预约
......
...@@ -122,6 +122,13 @@ public interface SchoolTeacherLabApplyMapper extends BaseMapper<SchoolTeacherLab ...@@ -122,6 +122,13 @@ public interface SchoolTeacherLabApplyMapper extends BaseMapper<SchoolTeacherLab
List<Map<String, Object>> gradeCountClass(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo); List<Map<String, Object>> gradeCountClass(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo);
/** /**
* 班级完成情况明细(管理员)
* @param schoolTeacherLabApplyVo
* @return
*/
List<Map<String, Object>> gradeCountClassListAdmin(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo);
/**
* 级部-班级完成情况明细-查看班级完成情况详情 * 级部-班级完成情况明细-查看班级完成情况详情
* @param schoolTeacherLabApplyVo * @param schoolTeacherLabApplyVo
* @return * @return
......
...@@ -40,11 +40,11 @@ public interface IStudentScoreService extends IService<SchoolStudentScore> { ...@@ -40,11 +40,11 @@ public interface IStudentScoreService extends IService<SchoolStudentScore> {
void checkImport(List<SchoolStudentScoreVo> list); void checkImport(List<SchoolStudentScoreVo> list);
/** /**
* 根据身份证号获取学生信息 * 根据号获取学生信息
* @param idCard * @param schoolNo
* @return * @return
*/ */
SchoolStudentScoreVo selectStudent(String idCard); SchoolStudentScoreVo selectStudent(String schoolNo);
/** /**
* 新增学生成绩 * 新增学生成绩
......
...@@ -145,10 +145,12 @@ public class StudentScoreServiceImpl extends ServiceImpl<StudentScoreMapper, Sch ...@@ -145,10 +145,12 @@ public class StudentScoreServiceImpl extends ServiceImpl<StudentScoreMapper, Sch
if (StringUtils.isNull(schoolStudentScoreVo.getStudentName())) { if (StringUtils.isNull(schoolStudentScoreVo.getStudentName())) {
failureNum++; failureNum++;
failureMsg.append("<br/>" + failureNum + "、学生姓名为空,请你重新输入!"); failureMsg.append("<br/>" + failureNum + "、学生姓名为空,请你重新输入!");
} else if (StringUtils.isNull(schoolStudentScoreVo.getIdCard())) { }
failureNum++; // else if (StringUtils.isNull(schoolStudentScoreVo.getIdCard())) {
failureMsg.append("<br/>" + failureNum + "、身份证号为空,请你重新输入!"); // failureNum++;
} else if (StringUtils.isEmpty(schoolStudentScoreVo.getStudentNumber())) { // failureMsg.append("<br/>" + failureNum + "、身份证号为空,请你重新输入!");
// }
else if (StringUtils.isEmpty(schoolStudentScoreVo.getStudentNumber())) {
failureNum++; failureNum++;
failureMsg.append("<br/>" + failureNum + "、学号为空,请您重新输入!"); failureMsg.append("<br/>" + failureNum + "、学号为空,请您重新输入!");
} else if (StringUtils.isNull(schoolStudentScoreVo.getExamType())) { } else if (StringUtils.isNull(schoolStudentScoreVo.getExamType())) {
...@@ -157,7 +159,7 @@ public class StudentScoreServiceImpl extends ServiceImpl<StudentScoreMapper, Sch ...@@ -157,7 +159,7 @@ public class StudentScoreServiceImpl extends ServiceImpl<StudentScoreMapper, Sch
} else { } else {
LambdaQueryWrapper<SchoolStudent> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SchoolStudent> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolStudent::getStudentName,schoolStudentScoreVo.getStudentName()) wrapper.eq(SchoolStudent::getStudentName,schoolStudentScoreVo.getStudentName())
.eq(SchoolStudent::getIdCard,schoolStudentScoreVo.getIdCard()); .eq(SchoolStudent::getSchoolNo,schoolStudentScoreVo.getStudentNumber());
List<SchoolStudent> schoolStudents = schoolStudentMapper.selectList(wrapper); List<SchoolStudent> schoolStudents = schoolStudentMapper.selectList(wrapper);
if (StringUtils.isNull(schoolStudents) || schoolStudents.size() == 0){ if (StringUtils.isNull(schoolStudents) || schoolStudents.size() == 0){
failureNum++; failureNum++;
...@@ -175,15 +177,15 @@ public class StudentScoreServiceImpl extends ServiceImpl<StudentScoreMapper, Sch ...@@ -175,15 +177,15 @@ public class StudentScoreServiceImpl extends ServiceImpl<StudentScoreMapper, Sch
} }
/** /**
* 根据身份证号获取学生信息 * 根据号获取学生信息
* @param idCard * @param schoolNo
* @return * @return
*/ */
@Override @Override
public SchoolStudentScoreVo selectStudent(String idCard) { public SchoolStudentScoreVo selectStudent(String schoolNo) {
SchoolStudentScoreVo schoolStudentScoreVo = studentScoreMapper.selectStudent(idCard); SchoolStudentScoreVo schoolStudentScoreVo = studentScoreMapper.selectStudent(schoolNo);
if (StringUtils.isNull(schoolStudentScoreVo)){ if (StringUtils.isNull(schoolStudentScoreVo)){
throw new ServiceException("未查询到该学生信息,请仔细核对身份证号码"); throw new ServiceException("未查询到该学生信息,请仔细核对学号");
} }
return schoolStudentScoreVo; return schoolStudentScoreVo;
} }
......
...@@ -37,6 +37,8 @@ import static com.core.constant.ProcessCommon.PENDING; ...@@ -37,6 +37,8 @@ import static com.core.constant.ProcessCommon.PENDING;
import static com.core.constant.ProcessCommon.SUSPENDSTATE_PENDING; import static com.core.constant.ProcessCommon.SUSPENDSTATE_PENDING;
import static com.core.constant.ProcessVariables.HANDUSERID1; import static com.core.constant.ProcessVariables.HANDUSERID1;
import static com.core.constant.ProcessVariables.HANDUSERID2; import static com.core.constant.ProcessVariables.HANDUSERID2;
import static com.ruoyi.common.utils.SecurityUtils.getUserId;
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
import static com.ruoyi.common.utils.StringUtils.isNotNull; import static com.ruoyi.common.utils.StringUtils.isNotNull;
import static com.ruoyi.common.utils.StringUtils.substring; import static com.ruoyi.common.utils.StringUtils.substring;
import static yangtz.cs.liu.campus.constant.ProcessState.APPROVAL; import static yangtz.cs.liu.campus.constant.ProcessState.APPROVAL;
...@@ -84,8 +86,8 @@ public class SchoolPurchaseServiceImpl extends ServiceImpl<SchoolPurchaseMapper, ...@@ -84,8 +86,8 @@ public class SchoolPurchaseServiceImpl extends ServiceImpl<SchoolPurchaseMapper,
SchoolPurchase schoolPurchase = new SchoolPurchase(); SchoolPurchase schoolPurchase = new SchoolPurchase();
BeanUtils.copyProperties(purchase,schoolPurchase); BeanUtils.copyProperties(purchase,schoolPurchase);
schoolPurchase.setState(SAVE); schoolPurchase.setState(SAVE);
//schoolPurchase.setApplyId(getUserId()); schoolPurchase.setApplyId(getUserId());
//schoolPurchase.setApplyUser(getUsername()); schoolPurchase.setApplyUser(getUsername());
schoolPurchase.insert(); schoolPurchase.insert();
int flag = schoolPurchaseMapper.insert(schoolPurchase); int flag = schoolPurchaseMapper.insert(schoolPurchase);
if(flag > 0){ if(flag > 0){
......
package yangtz.cs.liu.campus.service.impl.schoolDcwj; package yangtz.cs.liu.campus.service.impl.schoolDcwj;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.TreeSet;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
...@@ -9,9 +11,11 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; ...@@ -9,9 +11,11 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.annotation.DataScope; import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.core.domain.entity.SchoolTeacher; import com.ruoyi.common.core.domain.entity.SchoolTeacher;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.mapper.SysDeptMapper;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -28,8 +32,10 @@ import yangtz.cs.liu.campus.mapper.schoolgrade.SchoolGradeMapper; ...@@ -28,8 +32,10 @@ import yangtz.cs.liu.campus.mapper.schoolgrade.SchoolGradeMapper;
import yangtz.cs.liu.campus.mapper.student.SchoolStudentMapper; import yangtz.cs.liu.campus.mapper.student.SchoolStudentMapper;
import yangtz.cs.liu.campus.mapper.teacher.SchoolTeacherMapper; import yangtz.cs.liu.campus.mapper.teacher.SchoolTeacherMapper;
import yangtz.cs.liu.campus.service.schoolDcwj.ISchoolDcwjService; import yangtz.cs.liu.campus.service.schoolDcwj.ISchoolDcwjService;
import yangtz.cs.liu.campus.service.schoolgrade.ISchoolGradeService;
import yangtz.cs.liu.campus.vo.schoolDcwj.DawjVo; import yangtz.cs.liu.campus.vo.schoolDcwj.DawjVo;
import yangtz.cs.liu.campus.vo.schoolDcwj.DcwjSenateVo; import yangtz.cs.liu.campus.vo.schoolDcwj.DcwjSenateVo;
import yangtz.cs.liu.campus.vo.teacher.SchoolTeacherVO;
import yangtz.cs.liu.wechat.vo.schoolDcwj.SchoolDcwjVo; import yangtz.cs.liu.wechat.vo.schoolDcwj.SchoolDcwjVo;
import yangtz.cs.liu.wechat.vo.schoolDcwj.Vo_SchoolDcwj; import yangtz.cs.liu.wechat.vo.schoolDcwj.Vo_SchoolDcwj;
...@@ -72,6 +78,12 @@ public class SchoolDcwjServiceImpl extends ServiceImpl<SchoolDcwjMapper, SchoolD ...@@ -72,6 +78,12 @@ public class SchoolDcwjServiceImpl extends ServiceImpl<SchoolDcwjMapper, SchoolD
@Autowired @Autowired
private SchoolStudentMapper studentMapper; private SchoolStudentMapper studentMapper;
@Autowired
private ISchoolGradeService gradeService;
@Autowired
private SysDeptMapper deptMapper;
/** /**
* 查询调查问卷列表 * 查询调查问卷列表
* *
...@@ -338,22 +350,51 @@ public class SchoolDcwjServiceImpl extends ServiceImpl<SchoolDcwjMapper, SchoolD ...@@ -338,22 +350,51 @@ public class SchoolDcwjServiceImpl extends ServiceImpl<SchoolDcwjMapper, SchoolD
for (SchoolDcwjPush push : pushes) { for (SchoolDcwjPush push : pushes) {
if (PUSHT.equals(push.getPubType())) { if (PUSHT.equals(push.getPubType())) {
//推送给全体教工类型的教师 //推送给全体教工类型的教师
SchoolTeacher t = new SchoolTeacher(); //获取最新学年
//设置用户类型为教工 int schoolYear = gradeService.isNewSchoolYear();
t.setEmployeeType(EmployeeType.TEACH); //获取最新三个级部
List<SchoolTeacher> teacherList = teacherMapper.getAllTeachers(t); List<SysDept> deptGrades = new ArrayList<>();
if (StringUtils.isNull(teacherList) || teacherList.size() == 0){ for (int i = 0; i< 3; i++){
SysDept sysDept = deptMapper.selectDeptGrade(String.valueOf(schoolYear - i));
if (StringUtils.isNotNull(sysDept)){
deptGrades.add(sysDept);
}
}
//推送全体教师的集合
List<SchoolTeacher> teacherList = new ArrayList<>();
//根据级部查询所有教师
for (SysDept deptGrade : deptGrades) {
SchoolTeacherVO t = new SchoolTeacherVO();
t.setDeptId(deptGrade.getDeptId());
List<SchoolTeacher> schoolTeachers = teacherMapper.teacherList(t);
teacherList.addAll(schoolTeachers);
}
if (teacherList.size() == 0){
throw new ServiceException("系统中暂无教职工类型为教工的教师,无法发布"); throw new ServiceException("系统中暂无教职工类型为教工的教师,无法发布");
} }
//去重
ArrayList<SchoolTeacher> schoolTeachers = teacherList.stream().collect(Collectors
.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator
.comparing(SchoolTeacher::getId))), ArrayList::new));
// SchoolTeacher t = new SchoolTeacher();
// //设置用户类型为教工
// t.setEmployeeType(EmployeeType.TEACH);
// List<SchoolTeacher> teacherList = teacherMapper.getAllTeachers(t);
//把教工存到调查问卷的接收人 //把教工存到调查问卷的接收人
for (SchoolTeacher teacher : teacherList){ List<SchoolDcwjRy> schoolDcwjRyList = new ArrayList<>();
for (SchoolTeacher teacher : schoolTeachers){
SchoolDcwjRy schoolDcwjRy = new SchoolDcwjRy(); SchoolDcwjRy schoolDcwjRy = new SchoolDcwjRy();
schoolDcwjRy.insert(); schoolDcwjRy.insert();
schoolDcwjRy.setDcwjId(id); schoolDcwjRy.setDcwjId(id);
schoolDcwjRy.setTeacherId(teacher.getId()); schoolDcwjRy.setTeacherId(teacher.getId());
schoolDcwjRy.setRyZdzt(DcwjType.FILLINON); schoolDcwjRy.setRyZdzt(DcwjType.FILLINON);
schoolDcwjRyMapper.insert(schoolDcwjRy); schoolDcwjRyList.add(schoolDcwjRy);
// schoolDcwjRyMapper.insert(schoolDcwjRy);
} }
//批量新增接收人
schoolDcwjRyMapper.batchInsertDcwjRyTeacher(schoolDcwjRyList);
break; break;
}else { }else {
//推送给级部家长 //推送给级部家长
...@@ -361,6 +402,10 @@ public class SchoolDcwjServiceImpl extends ServiceImpl<SchoolDcwjMapper, SchoolD ...@@ -361,6 +402,10 @@ public class SchoolDcwjServiceImpl extends ServiceImpl<SchoolDcwjMapper, SchoolD
//查出学生所在的班级 //查出学生所在的班级
lqwClass.eq(SchoolClass::getGradeId, push.getGradeId()); lqwClass.eq(SchoolClass::getGradeId, push.getGradeId());
List<SchoolClass> schoolClassList = classMapper.selectList(lqwClass); List<SchoolClass> schoolClassList = classMapper.selectList(lqwClass);
//接收人集合
List<SchoolDcwjRy> schoolDcwjRyList = new ArrayList<>();
for (SchoolClass schoolClass : schoolClassList) { for (SchoolClass schoolClass : schoolClassList) {
//查出班级所有下所有学生 //查出班级所有下所有学生
LambdaQueryWrapper<SchoolStudent> lqwStudent = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SchoolStudent> lqwStudent = new LambdaQueryWrapper<>();
...@@ -373,9 +418,13 @@ public class SchoolDcwjServiceImpl extends ServiceImpl<SchoolDcwjMapper, SchoolD ...@@ -373,9 +418,13 @@ public class SchoolDcwjServiceImpl extends ServiceImpl<SchoolDcwjMapper, SchoolD
schoolDcwjRy.setDcwjId(id); schoolDcwjRy.setDcwjId(id);
schoolDcwjRy.setStudentId(schoolStudent.getId()); schoolDcwjRy.setStudentId(schoolStudent.getId());
schoolDcwjRy.setRyZdzt(DcwjType.FILLINON); schoolDcwjRy.setRyZdzt(DcwjType.FILLINON);
schoolDcwjRyMapper.insert(schoolDcwjRy); schoolDcwjRyList.add(schoolDcwjRy);
// schoolDcwjRyMapper.insert(schoolDcwjRy);
} }
} }
//批量新增接收人
schoolDcwjRyMapper.batchInsertDcwjRyStudent(schoolDcwjRyList);
} }
} }
......
...@@ -85,6 +85,15 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, SchoolReceive ...@@ -85,6 +85,15 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, SchoolReceive
String userName = sysUserMapper.selectUserById(schoolReceive.getReceivedById()).getUserName(); String userName = sysUserMapper.selectUserById(schoolReceive.getReceivedById()).getUserName();
schoolReceive.setReceivedBy(userName); schoolReceive.setReceivedBy(userName);
} }
if (StringUtils.isNotNull(schoolReceive.getReturnTime())){
schoolReceive.setReturnState("1");
SchoolEquipmentLedger schoolEquipmentLedger = new SchoolEquipmentLedger();
schoolEquipmentLedger.setId(schoolReceive.getEquipmentId());
schoolEquipmentLedger.setAffiliationType("2");
schoolEquipmentLedger.setUseId(null);
schoolEquipmentLedger.setUseName(null);
equipmentLedgerMapper.updateById(schoolEquipmentLedger);
}
schoolReceive.setCreateBy(SecurityUtils.getLoginUser().getUser().getUserName()); schoolReceive.setCreateBy(SecurityUtils.getLoginUser().getUser().getUserName());
schoolReceive.setCreateTime(DateUtils.getNowDate()); schoolReceive.setCreateTime(DateUtils.getNowDate());
return receiveMapper.insert(schoolReceive); return receiveMapper.insert(schoolReceive);
......
...@@ -175,6 +175,8 @@ public class SchoolTeacherBorrowServiceImpl extends ServiceImpl<SchoolTeacherBor ...@@ -175,6 +175,8 @@ public class SchoolTeacherBorrowServiceImpl extends ServiceImpl<SchoolTeacherBor
*/ */
@Override @Override
public int returnInstrument(SchoolTeacherBorrowVo schoolTeacherBorrowVo) { public int returnInstrument(SchoolTeacherBorrowVo schoolTeacherBorrowVo) {
//设置状态为已归还
schoolTeacherBorrowVo.setBorrowState("1");
schoolTeacherBorrowVo.setReturnTime(DateUtils.getNowDate()); schoolTeacherBorrowVo.setReturnTime(DateUtils.getNowDate());
SchoolTeacherBorrow schoolTeacherBorrow = new SchoolTeacherBorrow(); SchoolTeacherBorrow schoolTeacherBorrow = new SchoolTeacherBorrow();
BeanUtils.copyProperties(schoolTeacherBorrowVo,schoolTeacherBorrow); BeanUtils.copyProperties(schoolTeacherBorrowVo,schoolTeacherBorrow);
......
...@@ -78,6 +78,18 @@ public class SchoolExperimentPlanServiceImpl extends ServiceImpl<SchoolExperimen ...@@ -78,6 +78,18 @@ public class SchoolExperimentPlanServiceImpl extends ServiceImpl<SchoolExperimen
} }
/** /**
* 查询实验计划列表(管理员)
*
* @param schoolExperimentPlanVo 实验计划
* @return 实验计划
*/
@Override
public List<SchoolExperimentPlanVo> selectExperimentPlanListAdmin(SchoolExperimentPlanVo schoolExperimentPlanVo)
{
return schoolExperimentPlanMapper.selectExperimentPlanListAdmin(schoolExperimentPlanVo);
}
/**
* 获取计划下拉列表 * 获取计划下拉列表
* @param schoolExperimentPlanVo * @param schoolExperimentPlanVo
* @return * @return
...@@ -356,7 +368,7 @@ public class SchoolExperimentPlanServiceImpl extends ServiceImpl<SchoolExperimen ...@@ -356,7 +368,7 @@ public class SchoolExperimentPlanServiceImpl extends ServiceImpl<SchoolExperimen
*/ */
@Override @Override
public List<Map<String, Object>> countExperiment(SchoolExperimentPlanVo schoolExperimentPlanVo) { public List<Map<String, Object>> countExperiment(SchoolExperimentPlanVo schoolExperimentPlanVo) {
List<Map<String, Object>> list = schoolExperimentPlanMapper.countExperiment(schoolExperimentPlanVo); List<Map<String, Object>> list = schoolExperimentPlanMapper.countExperimentListAdmin(schoolExperimentPlanVo);
list.forEach(list1 -> { list.forEach(list1 -> {
//总班级数 //总班级数
int totalClass = Integer.parseInt(list1.get("totalClass").toString()); int totalClass = Integer.parseInt(list1.get("totalClass").toString());
...@@ -516,4 +528,14 @@ public class SchoolExperimentPlanServiceImpl extends ServiceImpl<SchoolExperimen ...@@ -516,4 +528,14 @@ public class SchoolExperimentPlanServiceImpl extends ServiceImpl<SchoolExperimen
public List<Map<String, Object>> gradeCountExperiment(SchoolExperimentPlanVo schoolExperimentPlanVo) { public List<Map<String, Object>> gradeCountExperiment(SchoolExperimentPlanVo schoolExperimentPlanVo) {
return schoolExperimentPlanMapper.countExperiment(schoolExperimentPlanVo); return schoolExperimentPlanMapper.countExperiment(schoolExperimentPlanVo);
} }
/**
* 实验室完成情况明细(管理员)
* @param schoolExperimentPlanVo
* @return
*/
@Override
public List<Map<String, Object>> countExperimentListAdmin(SchoolExperimentPlanVo schoolExperimentPlanVo) {
return schoolExperimentPlanMapper.countExperimentListAdmin(schoolExperimentPlanVo);
}
} }
...@@ -139,6 +139,18 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea ...@@ -139,6 +139,18 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea
} }
/** /**
* 查询年级实验室预约列表(管理员)
*
* @param schoolLabClassYearVo 年级实验室预约
* @return 年级实验室预约
*/
@Override
public List<SchoolLabClassYearVo> selectLabClassYearListAdmin(SchoolLabClassYearVo schoolLabClassYearVo)
{
return schoolLabClassYearMapper.selectLabClassYearListAdmin(schoolLabClassYearVo);
}
/**
* 新增年级实验室预约 * 新增年级实验室预约
* *
* @param schoolLabClassYear 年级实验室预约 * @param schoolLabClassYear 年级实验室预约
...@@ -341,15 +353,37 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea ...@@ -341,15 +353,37 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea
for (SchoolLabClassYearRelation schoolLabClassYearRelation : schoolLabClassYearRelationList) for (SchoolLabClassYearRelation schoolLabClassYearRelation : schoolLabClassYearRelationList)
{ {
schoolLabClassYearRelation.setLabClassYearId(id); schoolLabClassYearRelation.setLabClassYearId(id);
//跟进实验是id 查询实验室名称 //判断是否选择教室
SchoolLabVo schoolLabVo = schoolLabMapper.selectSchoolLabById( if (schoolLabClassYearRelation.getLabId() == -1L){
schoolLabClassYearRelation.getLabId()); schoolLabClassYearRelation.setLabName("教室");
schoolLabClassYearRelation.setLabName(schoolLabVo.getLabName()); }else {
//根据实验是id 查询实验室名称
SchoolLabVo schoolLabVo = schoolLabMapper.selectSchoolLabById(
schoolLabClassYearRelation.getLabId());
schoolLabClassYearRelation.setLabName(schoolLabVo.getLabName());
}
list.add(schoolLabClassYearRelation); list.add(schoolLabClassYearRelation);
} }
if (list.size() > 0) if (list.size() > 0)
{ {
schoolLabClassYearMapper.deleteSchoolLabClassYearRelationByLabClassYearId(id); schoolLabClassYearMapper.deleteSchoolLabClassYearRelationByLabClassYearId(id);
SchoolLabClassYearVo schoolLabClassYearVo2 = schoolLabClassYearMapper.selectSchoolLabClassYearById(id);
//判断用户选择的实验室是否正在使用
SchoolLabClassYearVo schoolLabClassYearVo1 = new SchoolLabClassYearVo();
schoolLabClassYearVo1.setPlannedStartTime(schoolLabClassYearVo.getPlannedStartTime());
schoolLabClassYearVo1.setPlannedEndTime(schoolLabClassYearVo.getPlannedEndTime());
schoolLabClassYearVo1.setSub(schoolLabClassYearVo2.getSub());
List<Map<String, Object>> labList = getLabList(schoolLabClassYearVo1);
for (SchoolLabClassYearRelation relation : list) {
for (Map<String, Object> map : labList) {
if (relation.getLabId().equals(Long.parseLong(String.valueOf(map.get("labId"))))){
if ("使用中".equals(String.valueOf(map.get("useState")))){
throw new ServiceException("您选择的" + map.get("labName") + "实验室正在使用,请重新选择!");
}
}
}
}
schoolLabClassYearMapper.batchSchoolLabClassYearRelation(list); schoolLabClassYearMapper.batchSchoolLabClassYearRelation(list);
} }
SchoolLabClassYear schoolLabClassYear = new SchoolLabClassYear(); SchoolLabClassYear schoolLabClassYear = new SchoolLabClassYear();
...@@ -369,8 +403,8 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea ...@@ -369,8 +403,8 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea
Date plannedEndTime = schoolLabClassYearVo.getPlannedEndTime(); Date plannedEndTime = schoolLabClassYearVo.getPlannedEndTime();
List<Map<String, Object>> list = new ArrayList<>(); List<Map<String, Object>> list = new ArrayList<>();
//查询所有实验室
LambdaQueryWrapper<SchoolLab> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SchoolLab> wrapper = new LambdaQueryWrapper<>();
wrapper.in(SchoolLab::getLabSub,schoolLabClassYearVo.getSub());
List<SchoolLab> schoolLabs = schoolLabMapper.selectList(wrapper); List<SchoolLab> schoolLabs = schoolLabMapper.selectList(wrapper);
List<String> declareStates = new ArrayList<>(); List<String> declareStates = new ArrayList<>();
...@@ -396,10 +430,11 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea ...@@ -396,10 +430,11 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea
//筛选在计划时间范围内的年级实验室预约 //筛选在计划时间范围内的年级实验室预约
for (SchoolLabClassYearVo schoolLabClassYear : schoolLabClassYears) { for (SchoolLabClassYearVo schoolLabClassYear : schoolLabClassYears) {
//开始时间 //开始时间
Date startTime = schoolLabClassYear.getPlannedStartTime(); Date startTime = schoolLabClassYear.getPlannedStartTime(); //2024-01-01 2023-10-01
//结束时间 //结束时间
Date endTime = schoolLabClassYear.getPlannedEndTime(); Date endTime = schoolLabClassYear.getPlannedEndTime();//2024-01-31 2023-10-31
if ((startTime.after(plannedStartTime) && startTime.before(plannedEndTime)) || (endTime.after(plannedStartTime) && endTime.before(plannedEndTime))){ if ((startTime.after(plannedStartTime) && startTime.before(plannedEndTime)) || (endTime.after(plannedStartTime) && endTime.before(plannedEndTime))
|| (plannedStartTime.after(startTime) && plannedStartTime.before(endTime)) || (plannedEndTime.after(startTime) && plannedEndTime.before(endTime)) ){
labClassYearIds.add(schoolLabClassYear.getId()); labClassYearIds.add(schoolLabClassYear.getId());
} }
if (startTime.equals(plannedStartTime) && endTime.equals(plannedEndTime)){ if (startTime.equals(plannedStartTime) && endTime.equals(plannedEndTime)){
...@@ -453,6 +488,11 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea ...@@ -453,6 +488,11 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea
} }
list.add(map); list.add(map);
} }
Map<String, Object> map = new HashMap<>();
map.put("labId",-1);
map.put("labName","教室");
map.put("useState","空闲");
list.add(map);
return list; return list;
} }
for (SchoolLab schoolLab : schoolLabs) { for (SchoolLab schoolLab : schoolLabs) {
...@@ -462,6 +502,11 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea ...@@ -462,6 +502,11 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea
map.put("useState","空闲"); map.put("useState","空闲");
list.add(map); list.add(map);
} }
Map<String, Object> map = new HashMap<>();
map.put("labId",-1);
map.put("labName","教室");
map.put("useState","空闲");
list.add(map);
return list; return list;
} }
...@@ -496,33 +541,42 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea ...@@ -496,33 +541,42 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea
int rows = 0; int rows = 0;
//判断计划时间在不在选择的实验计划的时间范围内 //判断计划时间在不在选择的实验计划的时间范围内
Long experimentPlanId = schoolLabClassYear.getExperimentPlanId(); Long experimentPlanId = schoolLabClassYear.getExperimentPlanId();
SchoolExperimentPlanVo schoolExperimentPlanVo = schoolExperimentPlanService.selectSchoolExperimentPlanById(experimentPlanId);
//实验计划开始时间 SysUser user = SecurityUtils.getLoginUser().getUser();
String plannedStartTime = schoolExperimentPlanVo.getPlannedStartTime(); schoolLabClassYear.setApplyId(user.getUserId());
//实验计划结束时间 schoolLabClassYear.setApplyName(user.getUserName());
String plannedEndTime = schoolExperimentPlanVo.getPlannedEndTime(); schoolLabClassYear.setApplyTime(DateUtils.getNowDate());
//年级实验室预约计划开始时间 schoolLabClassYear.setCreateBy(user.getUserName());
String startTime = DateUtils.formatDate(schoolLabClassYear.getPlannedStartTime()); schoolLabClassYear.setCreateTime(DateUtils.getNowDate());
//年级实验室预约计划结束时间 rows = schoolLabClassYearMapper.insertSchoolLabClassYear(schoolLabClassYear);
String endTime = DateUtils.formatDate(schoolLabClassYear.getPlannedEndTime());
// SchoolExperimentPlanVo schoolExperimentPlanVo = schoolExperimentPlanService.selectSchoolExperimentPlanById(experimentPlanId);
int plannedStartMonth = Integer.parseInt(plannedStartTime.substring(5)); // //实验计划开始时间
int plannedEndMonth = Integer.parseInt(plannedEndTime.substring(5)); // String plannedStartTime = schoolExperimentPlanVo.getPlannedStartTime();
// //实验计划结束时间
int startMonth = Integer.parseInt(startTime.substring(5,7)); // String plannedEndTime = schoolExperimentPlanVo.getPlannedEndTime();
int endMonth = Integer.parseInt(endTime.substring(5,7)); // //年级实验室预约计划开始时间
// String startTime = DateUtils.formatDate(schoolLabClassYear.getPlannedStartTime());
if ((startMonth >= plannedStartMonth && startMonth <= plannedEndMonth) && (endMonth >= plannedStartMonth && endMonth <= plannedEndMonth)){ // //年级实验室预约计划结束时间
SysUser user = SecurityUtils.getLoginUser().getUser(); // String endTime = DateUtils.formatDate(schoolLabClassYear.getPlannedEndTime());
schoolLabClassYear.setApplyId(user.getUserId());
schoolLabClassYear.setApplyName(user.getUserName()); // int plannedStartMonth = Integer.parseInt(plannedStartTime.substring(5));
schoolLabClassYear.setApplyTime(DateUtils.getNowDate()); // int plannedEndMonth = Integer.parseInt(plannedEndTime.substring(5));
schoolLabClassYear.setCreateBy(user.getUserName()); //
schoolLabClassYear.setCreateTime(DateUtils.getNowDate()); // int startMonth = Integer.parseInt(startTime.substring(5,7));
rows = schoolLabClassYearMapper.insertSchoolLabClassYear(schoolLabClassYear); // int endMonth = Integer.parseInt(endTime.substring(5,7));
}else { //
throw new ServiceException("请选择实验计划范围内的时间"); // if ((startMonth >= plannedStartMonth && startMonth <= plannedEndMonth) && (endMonth >= plannedStartMonth && endMonth <= plannedEndMonth)){
} // SysUser user = SecurityUtils.getLoginUser().getUser();
// schoolLabClassYear.setApplyId(user.getUserId());
// schoolLabClassYear.setApplyName(user.getUserName());
// schoolLabClassYear.setApplyTime(DateUtils.getNowDate());
// schoolLabClassYear.setCreateBy(user.getUserName());
// schoolLabClassYear.setCreateTime(DateUtils.getNowDate());
// rows = schoolLabClassYearMapper.insertSchoolLabClassYear(schoolLabClassYear);
// }else {
// throw new ServiceException("请选择实验计划范围内的时间");
// }
//修改对应实验计划,预约状态改为已预约 //修改对应实验计划,预约状态改为已预约
SchoolExperimentPlan schoolExperimentPlan = new SchoolExperimentPlan(); SchoolExperimentPlan schoolExperimentPlan = new SchoolExperimentPlan();
...@@ -541,31 +595,36 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea ...@@ -541,31 +595,36 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea
@Transactional @Transactional
public int updateSchoolLabClassYearVo(SchoolLabClassYear schoolLabClassYear) { public int updateSchoolLabClassYearVo(SchoolLabClassYear schoolLabClassYear) {
int rows = 0; int rows = 0;
//判断计划时间在不在选择的实验计划的时间范围内
Long experimentPlanId = schoolLabClassYear.getExperimentPlanId(); schoolLabClassYear.setUpdateBy(SecurityUtils.getLoginUser().getUser().getUserName());
SchoolExperimentPlanVo schoolExperimentPlanVo = schoolExperimentPlanService.selectSchoolExperimentPlanById(experimentPlanId); schoolLabClassYear.setUpdateTime(DateUtils.getNowDate());
//实验计划开始时间 rows = schoolLabClassYearMapper.updateSchoolLabClassYear(schoolLabClassYear);
String plannedStartTime = schoolExperimentPlanVo.getPlannedStartTime();
//实验计划结束时间 // //判断计划时间在不在选择的实验计划的时间范围内
String plannedEndTime = schoolExperimentPlanVo.getPlannedEndTime(); // Long experimentPlanId = schoolLabClassYear.getExperimentPlanId();
//年级实验室预约计划开始时间 // SchoolExperimentPlanVo schoolExperimentPlanVo = schoolExperimentPlanService.selectSchoolExperimentPlanById(experimentPlanId);
String startTime = DateUtils.formatDate(schoolLabClassYear.getPlannedStartTime()); // //实验计划开始时间
//年级实验室预约计划结束时间 // String plannedStartTime = schoolExperimentPlanVo.getPlannedStartTime();
String endTime = DateUtils.formatDate(schoolLabClassYear.getPlannedEndTime()); // //实验计划结束时间
// String plannedEndTime = schoolExperimentPlanVo.getPlannedEndTime();
int plannedStartMonth = Integer.parseInt(plannedStartTime.substring(5)); // //年级实验室预约计划开始时间
int plannedEndMonth = Integer.parseInt(plannedEndTime.substring(5)); // String startTime = DateUtils.formatDate(schoolLabClassYear.getPlannedStartTime());
// //年级实验室预约计划结束时间
int startMonth = Integer.parseInt(startTime.substring(5,7)); // String endTime = DateUtils.formatDate(schoolLabClassYear.getPlannedEndTime());
int endMonth = Integer.parseInt(endTime.substring(5,7)); //
// int plannedStartMonth = Integer.parseInt(plannedStartTime.substring(5));
if ((startMonth >= plannedStartMonth && startMonth <= plannedEndMonth) && (endMonth >= plannedStartMonth && endMonth <= plannedEndMonth)){ // int plannedEndMonth = Integer.parseInt(plannedEndTime.substring(5));
schoolLabClassYear.setUpdateBy(SecurityUtils.getLoginUser().getUser().getUserName()); //
schoolLabClassYear.setUpdateTime(DateUtils.getNowDate()); // int startMonth = Integer.parseInt(startTime.substring(5,7));
rows = schoolLabClassYearMapper.updateSchoolLabClassYear(schoolLabClassYear); // int endMonth = Integer.parseInt(endTime.substring(5,7));
}else { //
throw new ServiceException("请选择实验计划范围内的时间"); // if ((startMonth >= plannedStartMonth && startMonth <= plannedEndMonth) && (endMonth >= plannedStartMonth && endMonth <= plannedEndMonth)){
} // schoolLabClassYear.setUpdateBy(SecurityUtils.getLoginUser().getUser().getUserName());
// schoolLabClassYear.setUpdateTime(DateUtils.getNowDate());
// rows = schoolLabClassYearMapper.updateSchoolLabClassYear(schoolLabClassYear);
// }else {
// throw new ServiceException("请选择实验计划范围内的时间");
// }
return rows; return rows;
} }
......
...@@ -3,6 +3,7 @@ package yangtz.cs.liu.campus.service.impl.schoolLab; ...@@ -3,6 +3,7 @@ package yangtz.cs.liu.campus.service.impl.schoolLab;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
...@@ -15,12 +16,15 @@ import org.springframework.beans.BeanUtils; ...@@ -15,12 +16,15 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory; import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabClassYearRelation;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApplyLabs; import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApplyLabs;
import yangtz.cs.liu.campus.mapper.schoolLab.SchoolTeacherExperimentApplyMapper; import yangtz.cs.liu.campus.mapper.schoolLab.SchoolTeacherExperimentApplyMapper;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApply; import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApply;
import yangtz.cs.liu.campus.mapper.schoolLab.SchoollTeacherExperimentApplyLabsMapper; import yangtz.cs.liu.campus.mapper.schoolLab.SchoollTeacherExperimentApplyLabsMapper;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolLabClassYearService;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherExperimentApplyService; import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherExperimentApplyService;
import yangtz.cs.liu.campus.service.schoolLab.ISchoollTeacherExperimentApplyLabsService; import yangtz.cs.liu.campus.service.schoolLab.ISchoollTeacherExperimentApplyLabsService;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolLabClassYearVo;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolTeacherExperimentApplyVo; import yangtz.cs.liu.campus.vo.schoolLab.SchoolTeacherExperimentApplyVo;
/** /**
...@@ -36,6 +40,8 @@ public class SchoolTeacherExperimentApplyServiceImpl extends ServiceImpl<SchoolT ...@@ -36,6 +40,8 @@ public class SchoolTeacherExperimentApplyServiceImpl extends ServiceImpl<SchoolT
private SchoolTeacherExperimentApplyMapper schoolTeacherExperimentApplyMapper; private SchoolTeacherExperimentApplyMapper schoolTeacherExperimentApplyMapper;
@Autowired @Autowired
private ISchoollTeacherExperimentApplyLabsService schoollTeacherExperimentApplyLabsService; private ISchoollTeacherExperimentApplyLabsService schoollTeacherExperimentApplyLabsService;
@Autowired
private ISchoolLabClassYearService schoolLabClassYearService;
/** /**
* 查询教师个人实验申请 * 查询教师个人实验申请
* *
...@@ -154,6 +160,22 @@ public class SchoolTeacherExperimentApplyServiceImpl extends ServiceImpl<SchoolT ...@@ -154,6 +160,22 @@ public class SchoolTeacherExperimentApplyServiceImpl extends ServiceImpl<SchoolT
} }
if (list.size() > 0){ if (list.size() > 0){
schoolTeacherExperimentApplyMapper.deleteSchoolTeacherExperimentApplyLabsId(id); schoolTeacherExperimentApplyMapper.deleteSchoolTeacherExperimentApplyLabsId(id);
SchoolTeacherExperimentApplyVo schoolTeacherExperimentApplyVo1 = schoolTeacherExperimentApplyMapper.selectSchoolTeacherExperimentApplyById(id);
//判断用户选择的实验室是否正在使用
SchoolLabClassYearVo schoolLabClassYearVo1 = new SchoolLabClassYearVo();
schoolLabClassYearVo1.setPlannedStartTime(schoolTeacherExperimentApplyVo1.getPlannedStartTime());
schoolLabClassYearVo1.setPlannedEndTime(schoolTeacherExperimentApplyVo1.getPlannedEndTime());
schoolLabClassYearVo1.setSub(schoolTeacherExperimentApplyVo1.getSub());
List<Map<String, Object>> labList = schoolLabClassYearService.getLabList(schoolLabClassYearVo1);
for (SchoolTeacherExperimentApplyLabs experimentApplyLabs : list) {
for (Map<String, Object> map : labList) {
if (experimentApplyLabs.getLabId().equals(Long.parseLong(String.valueOf(map.get("labId"))))){
if ("使用中".equals(String.valueOf(map.get("useState")))){
throw new ServiceException("您选择的" + map.get("labName") + "实验室正在使用,请重新选择!");
}
}
}
}
schoolTeacherExperimentApplyMapper.batchSchoolTeacherExperimentApplyLabs(list); schoolTeacherExperimentApplyMapper.batchSchoolTeacherExperimentApplyLabs(list);
} }
return schoolTeacherExperimentApplyMapper.updateSchoolTeacherExperimentApply(schoolTeacherExperimentApplyVo); return schoolTeacherExperimentApplyMapper.updateSchoolTeacherExperimentApply(schoolTeacherExperimentApplyVo);
......
...@@ -392,6 +392,16 @@ public class SchoolTeacherLabApplyServiceImpl extends ServiceImpl<SchoolTeacherL ...@@ -392,6 +392,16 @@ public class SchoolTeacherLabApplyServiceImpl extends ServiceImpl<SchoolTeacherL
} }
/** /**
* 班级完成情况明细(管理员)
* @param schoolTeacherLabApplyVo
* @return
*/
@Override
public List<Map<String, Object>> gradeCountClassListAdmin(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo) {
return schoolTeacherLabApplyMapper.gradeCountClassListAdmin(schoolTeacherLabApplyVo);
}
/**
* 级部-班级完成情况明细-查看班级完成情况详情 * 级部-班级完成情况明细-查看班级完成情况详情
* @param schoolTeacherLabApplyVo * @param schoolTeacherLabApplyVo
* @return * @return
......
...@@ -143,10 +143,12 @@ public class SchoolTeacherWagesServiceImpl extends ServiceImpl<SchoolTeacherWage ...@@ -143,10 +143,12 @@ public class SchoolTeacherWagesServiceImpl extends ServiceImpl<SchoolTeacherWage
if (StringUtils.isEmpty(schoolTeacherWages.getTeacherName())) { if (StringUtils.isEmpty(schoolTeacherWages.getTeacherName())) {
failureNum++; failureNum++;
failureMsg.append("<br/>" + failureNum + "、教师姓名为空,请您重新输入! "); failureMsg.append("<br/>" + failureNum + "、教师姓名为空,请您重新输入! ");
} else if (StringUtils.isEmpty(schoolTeacherWages.getIdCard())) { }
failureNum++; // else if (StringUtils.isEmpty(schoolTeacherWages.getIdCard())) {
failureMsg.append("<br/>" + failureNum + "、身份证号为空,请您重新输入! "); // failureNum++;
} else if (StringUtils.isNull(schoolTeacherWages.getWagesTime())) { // failureMsg.append("<br/>" + failureNum + "、身份证号为空,请您重新输入! ");
// }
else if (StringUtils.isNull(schoolTeacherWages.getWagesTime())) {
failureNum++; failureNum++;
failureMsg.append("<br/>" + failureNum + "、工资日期为空,请您重新输入!"); failureMsg.append("<br/>" + failureNum + "、工资日期为空,请您重新输入!");
} else if (isNotNull(schoolTeacherWages.getWagesTime())) { } else if (isNotNull(schoolTeacherWages.getWagesTime())) {
......
...@@ -34,6 +34,14 @@ public interface ISchoolExperimentPlanService extends IService<SchoolExperimentP ...@@ -34,6 +34,14 @@ public interface ISchoolExperimentPlanService extends IService<SchoolExperimentP
public List<Map<String,String>> selectNameByVo(SchoolExperimentPlanVo schoolExperimentPlanVo); public List<Map<String,String>> selectNameByVo(SchoolExperimentPlanVo schoolExperimentPlanVo);
/** /**
* 查询实验计划列表(管理员)
*
* @param schoolExperimentPlanVo 实验计划
* @return 实验计划集合
*/
public List<SchoolExperimentPlanVo> selectExperimentPlanListAdmin(SchoolExperimentPlanVo schoolExperimentPlanVo);
/**
* 新增实验计划 * 新增实验计划
* *
* @param schoolExperimentPlanVo 实验计划 * @param schoolExperimentPlanVo 实验计划
...@@ -115,4 +123,11 @@ public interface ISchoolExperimentPlanService extends IService<SchoolExperimentP ...@@ -115,4 +123,11 @@ public interface ISchoolExperimentPlanService extends IService<SchoolExperimentP
* @return * @return
*/ */
List<Map<String, Object>> gradeCountExperiment(SchoolExperimentPlanVo schoolExperimentPlanVo); List<Map<String, Object>> gradeCountExperiment(SchoolExperimentPlanVo schoolExperimentPlanVo);
/**
* 实验室完成情况明细(管理员)
* @param schoolExperimentPlanVo
* @return
*/
List<Map<String, Object>> countExperimentListAdmin(SchoolExperimentPlanVo schoolExperimentPlanVo);
} }
...@@ -35,6 +35,14 @@ public interface ISchoolLabClassYearService extends IService<SchoolLabClassYear> ...@@ -35,6 +35,14 @@ public interface ISchoolLabClassYearService extends IService<SchoolLabClassYear>
public List<SchoolLabClassYearVo> selectSchoolLabClassYearList(SchoolLabClassYearVo schoolLabClassYearVo); public List<SchoolLabClassYearVo> selectSchoolLabClassYearList(SchoolLabClassYearVo schoolLabClassYearVo);
/** /**
* 查询年级实验室预约列表(管理员)
*
* @param schoolLabClassYearVo 年级实验室预约
* @return 年级实验室预约集合
*/
public List<SchoolLabClassYearVo> selectLabClassYearListAdmin(SchoolLabClassYearVo schoolLabClassYearVo);
/**
* 新增年级实验室预约 * 新增年级实验室预约
* *
* @param schoolLabClassYear 年级实验室预约 * @param schoolLabClassYear 年级实验室预约
......
...@@ -123,6 +123,13 @@ public interface ISchoolTeacherLabApplyService extends IService<SchoolTeacherLab ...@@ -123,6 +123,13 @@ public interface ISchoolTeacherLabApplyService extends IService<SchoolTeacherLab
List<Map<String,Object>> gradeCountClass(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo); List<Map<String,Object>> gradeCountClass(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo);
/** /**
* 班级完成情况明细(管理员)
* @param schoolTeacherLabApplyVo
* @return
*/
List<Map<String,Object>> gradeCountClassListAdmin(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo);
/**
* 级部-班级完成情况明细-查看班级完成情况详情 * 级部-班级完成情况明细-查看班级完成情况详情
* @param schoolTeacherLabApplyVo * @param schoolTeacherLabApplyVo
* @return * @return
......
...@@ -20,7 +20,6 @@ public class StudentScoreVo { ...@@ -20,7 +20,6 @@ public class StudentScoreVo {
@Excel(name = "学号") @Excel(name = "学号")
private String studentNumber; private String studentNumber;
/** 身份证号 */ /** 身份证号 */
@Excel(name = "身份证号")
private String idCard; private String idCard;
/** 班级 */ /** 班级 */
@Excel(name = "班级") @Excel(name = "班级")
......
...@@ -79,6 +79,8 @@ public class SchoolExperimentPlanVo extends BaseEntity ...@@ -79,6 +79,8 @@ public class SchoolExperimentPlanVo extends BaseEntity
@Excel(name = "实验用品") @Excel(name = "实验用品")
private String experimentUseGoods; private String experimentUseGoods;
private Long teacherId;
/** 实验计划与班级关系信息 */ /** 实验计划与班级关系信息 */
private List<SchoolExperimentPlanClass> schoolExperimentPlanClassList; private List<SchoolExperimentPlanClass> schoolExperimentPlanClassList;
} }
...@@ -58,4 +58,12 @@ public class SchoolGradeMentorVo extends OurBaseEntity { ...@@ -58,4 +58,12 @@ public class SchoolGradeMentorVo extends OurBaseEntity {
private String sex; private String sex;
private String education; private String education;
/** 类型(1年级部,2学科组长) */
private String type;
/** 学科组(1物理学科组,2化学学科组,3生物学科组) */
private String subGroup;
} }
...@@ -25,7 +25,6 @@ public class SchoolStudentScoreVo extends OurBaseEntity { ...@@ -25,7 +25,6 @@ public class SchoolStudentScoreVo extends OurBaseEntity {
@Excel(name = "*学号") @Excel(name = "*学号")
private String studentNumber; private String studentNumber;
/** 身份证号 */ /** 身份证号 */
@Excel(name = "*身份证号")
private String idCard; private String idCard;
/** 班级 */ /** 班级 */
@Excel(name = "班级") @Excel(name = "班级")
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
FROM curricula_student cs FROM curricula_student cs
LEFT JOIN school_student xs ON cs.student_id = xs.id LEFT JOIN school_student xs ON cs.student_id = xs.id
LEFT JOIN school_class bj ON xs.class_id = bj.id LEFT JOIN school_class bj ON xs.class_id = bj.id
WHERE xs.id_card = #{idCard} AND xs.del_flag = '0' WHERE xs.school_no = #{schoolNo} AND xs.del_flag = '0'
</select> </select>
<select id="selectStudentScoreById" parameterType="Long" resultMap="SchoolStudentScoreVoResult"> <select id="selectStudentScoreById" parameterType="Long" resultMap="SchoolStudentScoreVoResult">
...@@ -256,4 +256,4 @@ ...@@ -256,4 +256,4 @@
</foreach> </foreach>
</insert> </insert>
</mapper> </mapper>
\ No newline at end of file
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
</if> </if>
<if test="entity.deptId != null and entity.deptId != ''">and dept_id like concat('%', #{entity.deptId}, '%') <if test="entity.deptId != null and entity.deptId != ''">and dept_id like concat('%', #{entity.deptId}, '%')
</if> </if>
<if test="entity.applyId != null">and apply_id = #{entity.applyId}
</if>
<if test="submitState == 0"> <if test="submitState == 0">
and instance_id is null and instance_id is null
</if> </if>
......
...@@ -218,4 +218,22 @@ ...@@ -218,4 +218,22 @@
#{id} #{id}
</foreach> </foreach>
</delete> </delete>
<!--批量新增调查问卷接收人(教师)-->
<insert id="batchInsertDcwjRyTeacher">
insert into school_dcwj_ry(dcwj_id, ry_zdzt, teacher_id)
values
<foreach collection="list" item="item" separator=",">
(#{item.dcwjId}, #{item.ryZdzt}, #{item.teacherId})
</foreach>
</insert>
<!--批量新增调查问卷接收人(家长)-->
<insert id="batchInsertDcwjRyStudent">
insert into school_dcwj_ry(student_id, dcwj_id, ry_zdzt)
values
<foreach collection="list" item="item" separator=",">
( #{item.studentId}, #{item.dcwjId}, #{item.ryZdzt})
</foreach>
</insert>
</mapper> </mapper>
...@@ -70,8 +70,7 @@ ...@@ -70,8 +70,7 @@
insert into school_instrument insert into school_instrument
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="instrumentName != null">instrument_name,</if> <if test="instrumentName != null">instrument_name,</if>
<if test="instrumentTypeId != null">instrument_type_id,</if> <if test="instrumentTypeId != null">instrument_type_id,instrument_type_name,</if>
<if test="instrumentTypeName != null">instrument_type_name,</if>
<if test="instrumentModel != null">instrument_model,</if> <if test="instrumentModel != null">instrument_model,</if>
<if test="instrumentNum != null">instrument_num,</if> <if test="instrumentNum != null">instrument_num,</if>
<if test="remark != null">remark,</if> <if test="remark != null">remark,</if>
...@@ -83,8 +82,7 @@ ...@@ -83,8 +82,7 @@
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="instrumentName != null">#{instrumentName},</if> <if test="instrumentName != null">#{instrumentName},</if>
<if test="instrumentTypeId != null">#{instrumentTypeId},</if> <if test="instrumentTypeId != null">#{instrumentTypeId},(select instrument_type_name from school_instrument_classify where id = #{instrumentTypeId}),</if>
<if test="instrumentTypeName != null">#{instrumentTypeName},</if>
<if test="instrumentModel != null">#{instrumentModel},</if> <if test="instrumentModel != null">#{instrumentModel},</if>
<if test="instrumentNum != null">#{instrumentNum},</if> <if test="instrumentNum != null">#{instrumentNum},</if>
<if test="remark != null">#{remark},</if> <if test="remark != null">#{remark},</if>
...@@ -100,8 +98,7 @@ ...@@ -100,8 +98,7 @@
update school_instrument update school_instrument
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="instrumentName != null">instrument_name = #{instrumentName},</if> <if test="instrumentName != null">instrument_name = #{instrumentName},</if>
<if test="instrumentTypeId != null">instrument_type_id = #{instrumentTypeId},</if> <if test="instrumentTypeId != null">instrument_type_id = #{instrumentTypeId},instrument_type_name = (select instrument_type_name from school_instrument_classify where id = #{instrumentTypeId}),</if>
<if test="instrumentTypeName != null">instrument_type_name = #{instrumentTypeName},</if>
<if test="instrumentModel != null">instrument_model = #{instrumentModel},</if> <if test="instrumentModel != null">instrument_model = #{instrumentModel},</if>
<if test="instrumentNum != null">instrument_num = #{instrumentNum},</if> <if test="instrumentNum != null">instrument_num = #{instrumentNum},</if>
<if test="remark != null">remark = #{remark},</if> <if test="remark != null">remark = #{remark},</if>
...@@ -124,4 +121,4 @@ ...@@ -124,4 +121,4 @@
#{id} #{id}
</foreach> </foreach>
</update> </update>
</mapper> </mapper>
\ No newline at end of file
...@@ -41,6 +41,38 @@ ...@@ -41,6 +41,38 @@
</sql> </sql>
<select id="selectSchoolExperimentPlanList" parameterType="SchoolExperimentPlanVo" resultMap="SchoolExperimentPlanVoResult"> <select id="selectSchoolExperimentPlanList" parameterType="SchoolExperimentPlanVo" resultMap="SchoolExperimentPlanVoResult">
select ep.id, ep.sub, ep.grade_id, ep.grade, ep.school_year, ep.semester, ep.experiment_classify, ep.experiment_name,
ep.chapter_content, ep.is_appointment, ep.planned_start_time, ep.planned_end_time, ep.experiment_use_goods, ep.create_by, ep.create_time,
ep.update_by, ep.update_time, ep.del_flag from school_experiment_plan ep
LEFT JOIN school_grade_mentor gm ON ep.grade_id = gm.grade_id AND ep.sub = gm.sub_group
<where>
ep.del_flag = '0' AND gm.del_flag = '0'
<if test="sub != null and sub != ''"> and ep.sub = #{sub}</if>
<if test="gradeId != null "> and ep.grade_id = #{gradeId}</if>
<if test="grade != null and grade != ''"> and ep.grade like concat('%', #{grade}, '%')</if>
<if test="schoolYear != null and schoolYear != ''"> and ep.school_year = #{schoolYear}</if>
<if test="semester != null and semester != ''"> and ep.semester = #{semester}</if>
<if test="experimentClassify != null and experimentClassify != ''"> and ep.experiment_classify = #{experimentClassify}</if>
<if test="experimentName != null and experimentName != ''"> and ep.experiment_name like concat('%', #{experimentName}, '%')</if>
<if test="chapterContent != null and chapterContent != ''"> and ep.chapter_content = #{chapterContent}</if>
<if test="isAppointment != null and isAppointment != ''"> and ep.is_appointment = #{isAppointment}</if>
<if test="plannedStartTime != null and plannedStartTime != ''"> and ep.planned_start_time = #{plannedStartTime}</if>
<if test="plannedEndTime != null and plannedEndTime != ''"> and ep.planned_end_time = #{plannedEndTime}</if>
<if test="experimentUseGoods != null and experimentUseGoods != ''"> and ep.experiment_use_goods = #{experimentUseGoods}</if>
<if test="gradeIds != null">
and ep.grade_id in
<foreach item="gradeId" collection="gradeIds" open="(" separator="," close=")">
#{gradeId}
</foreach>
</if>
<if test="teacherId != null">
AND gm.teacher_id = #{teacherId}
</if>
</where>
order by create_time DESC
</select>
<select id="selectExperimentPlanListAdmin" parameterType="SchoolExperimentPlanVo" resultMap="SchoolExperimentPlanVoResult">
<include refid="selectSchoolExperimentPlanVo"/> <include refid="selectSchoolExperimentPlanVo"/>
<where> <where>
del_flag = '0' del_flag = '0'
...@@ -61,7 +93,7 @@ ...@@ -61,7 +93,7 @@
<foreach item="gradeId" collection="gradeIds" open="(" separator="," close=")"> <foreach item="gradeId" collection="gradeIds" open="(" separator="," close=")">
#{gradeId} #{gradeId}
</foreach> </foreach>
</if> </if>
</where> </where>
order by create_time DESC order by create_time DESC
</select> </select>
...@@ -255,8 +287,10 @@ ...@@ -255,8 +287,10 @@
FROM FROM
school_experiment_plan ep school_experiment_plan ep
LEFT JOIN school_experiment_plan_class epc ON ep.id = epc.experiment_plan_id AND epc.del_flag = '0' LEFT JOIN school_experiment_plan_class epc ON ep.id = epc.experiment_plan_id AND epc.del_flag = '0'
LEFT JOIN school_grade_mentor gm ON gm.grade_id = ep.grade_id AND gm.sub_group = ep.sub
WHERE WHERE
ep.del_flag = '0' ep.del_flag = '0' AND gm.del_flag = '0'
<if test="teacherId != null">AND gm.teacher_id = #{teacherId}</if>
<if test="sub != null and sub != ''"> and ep.sub = #{sub}</if> <if test="sub != null and sub != ''"> and ep.sub = #{sub}</if>
<if test="gradeId != null "> and ep.grade_id = #{gradeId}</if> <if test="gradeId != null "> and ep.grade_id = #{gradeId}</if>
<if test="grade != null and grade != ''"> and ep.grade like concat('%', #{grade}, '%')</if> <if test="grade != null and grade != ''"> and ep.grade like concat('%', #{grade}, '%')</if>
...@@ -277,4 +311,35 @@ ...@@ -277,4 +311,35 @@
</if> </if>
GROUP BY ep.id,ep.grade_id,ep.grade,ep.school_year,ep.semester,ep.experiment_name,ep.sub GROUP BY ep.id,ep.grade_id,ep.grade,ep.school_year,ep.semester,ep.experiment_name,ep.sub
</select> </select>
</mapper>
\ No newline at end of file <select id="countExperimentListAdmin" parameterType="SchoolExperimentPlanVo" resultType="Map">
SELECT
ep.id as id, ep.grade_id as gradeId, ep.grade as grade, ep.school_year as schoolYear, ep.semester as semester, ep.experiment_name as experimentName, ep.sub as sub,
COUNT(epc.id) as totalClass,
(SELECT COUNT(tla.id) FROM school_teacher_lab_apply tla WHERE tla.del_flag = '0' AND tla.state = '1' AND tla.lab_class_year_id in (SELECT id FROM school_lab_class_year lcy WHERE lcy.del_flag = '0' AND lcy.experiment_plan_id = ep.id)) as completeClass
FROM
school_experiment_plan ep
LEFT JOIN school_experiment_plan_class epc ON ep.id = epc.experiment_plan_id AND epc.del_flag = '0'
WHERE
ep.del_flag = '0'
<if test="sub != null and sub != ''"> and ep.sub = #{sub}</if>
<if test="gradeId != null "> and ep.grade_id = #{gradeId}</if>
<if test="grade != null and grade != ''"> and ep.grade like concat('%', #{grade}, '%')</if>
<if test="experimentName != null and experimentName != ''"> and ep.experiment_name like concat('%', #{experimentName}, '%')</if>
<if test="schoolYear != null and schoolYear != ''"> and ep.school_year = #{schoolYear}</if>
<if test="semester != null and semester != ''"> and ep.semester = #{semester}</if>
<if test="subs != null ">
and ep.sub in
<foreach item="sub" collection="subs" open="(" separator="," close=")">
#{sub}
</foreach>
</if>
<if test="gradeIds != null">
and ep.grade_id in
<foreach item="gradeId" collection="gradeIds" open="(" separator="," close=")">
#{gradeId}
</foreach>
</if>
GROUP BY ep.id,ep.grade_id,ep.grade,ep.school_year,ep.semester,ep.experiment_name,ep.sub
</select>
</mapper>
...@@ -45,6 +45,52 @@ ...@@ -45,6 +45,52 @@
</sql> </sql>
<select id="selectSchoolLabClassYearList" parameterType="SchoolLabClassYearVo" resultMap="SchoolLabClassYearVoResult"> <select id="selectSchoolLabClassYearList" parameterType="SchoolLabClassYearVo" resultMap="SchoolLabClassYearVoResult">
select lcy.id, lcy.experiment_plan_id, lcy.experiment_name, lcy.grade_id, lcy.grade,
lcy.school_year, lcy.semester, lcy.sub, lcy.experiment_classify, lcy.planned_start_time,
lcy.planned_end_time, lcy.chapter_content, lcy.experiment_use_goods, lcy.declare_state, lcy.apply_id,
lcy.apply_name, lcy.apply_time, lcy.create_by, lcy.create_time, lcy.update_by, lcy.update_time, lcy.del_flag
from school_lab_class_year lcy
LEFT JOIN school_grade_mentor gm ON gm.grade_id = lcy.grade_id AND lcy.sub = gm.sub_group
<where>
lcy.del_flag = '0' AND gm.del_flag = '0'
<if test="experimentPlanId != null "> and lcy.experiment_plan_id = #{experimentPlanId}</if>
<if test="experimentName != null and experimentName != ''"> and lcy.experiment_name like concat('%', #{experimentName}, '%')</if>
<if test="grade != null and grade != ''"> and lcy.grade like concat('%', #{grade}, '%')</if>
<if test="gradeId != null "> and lcy.grade_id = #{gradeId}</if>
<if test="schoolYear != null and schoolYear != ''"> and lcy.school_year = #{schoolYear}</if>
<if test="semester != null and semester != ''"> and lcy.semester = #{semester}</if>
<if test="sub != null and sub != ''"> and lcy.sub = #{sub}</if>
<if test="experimentClassify != null and experimentClassify != ''"> and lcy.experiment_classify = #{experimentClassify}</if>
<if test="plannedStartTime != null and plannedEndTime != null">
and lcy.planned_start_time between #{plannedStartTime} and #{plannedEndTime}
and lcy.planned_end_time between #{plannedStartTime} and #{plannedEndTime}
</if>
<if test="chapterContent != null and chapterContent != ''"> and lcy.chapter_content = #{chapterContent}</if>
<if test="experimentUseGoods != null and experimentUseGoods != ''"> and lcy.experiment_use_goods = #{experimentUseGoods}</if>
<if test="declareState != null and declareState != ''"> and lcy.declare_state = #{declareState}</if>
<if test="applyId != null "> and lcy.apply_id = #{applyId}</if>
<if test="applyName != null and applyName != ''"> and lcy.apply_name like concat('%', #{applyName}, '%')</if>
<if test="applyTime != null "> and lcy.apply_time = #{applyTime}</if>
<if test="userId != null">
AND gm.teacher_id = #{userId}
</if>
<if test="gradeIds != null ">
and lcy.grade_id in
<foreach item="gradeId" collection="gradeIds" open="(" separator="," close=")">
#{gradeId}
</foreach>
</if>
<if test="declareStates != null">
and lcy.declare_state in
<foreach item="declareState" collection="declareStates" open="(" separator="," close=")">
#{declareState}
</foreach>
</if>
</where>
order by create_time DESC
</select>
<select id="selectLabClassYearListAdmin" parameterType="SchoolLabClassYearVo" resultMap="SchoolLabClassYearVoResult">
<include refid="selectSchoolLabClassYearVo"/> <include refid="selectSchoolLabClassYearVo"/>
<where> <where>
del_flag = '0' del_flag = '0'
...@@ -262,7 +308,7 @@ ...@@ -262,7 +308,7 @@
(SELECT DISTINCT experiment_plan_id FROM school_experiment_plan_class (SELECT DISTINCT experiment_plan_id FROM school_experiment_plan_class
WHERE del_flag = '0' and class_id in WHERE del_flag = '0' and class_id in
(SELECT class_id FROM school_class_mentor (SELECT class_id FROM school_class_mentor
WHERE del_flag = '0' and course_id in (6,8,9) and teacher_id = #{applyId})) WHERE del_flag = '0' and course_name in ("物理","化学","生物") and teacher_id = #{applyId}))
<if test="schoolYear != null and schoolYear != ''"> and school_year = #{schoolYear}</if> <if test="schoolYear != null and schoolYear != ''"> and school_year = #{schoolYear}</if>
<if test="semester != null and semester != ''"> and semester = #{semester}</if> <if test="semester != null and semester != ''"> and semester = #{semester}</if>
<if test="experimentClassify != null and experimentClassify != ''"> and experiment_classify = #{experimentClassify}</if> <if test="experimentClassify != null and experimentClassify != ''"> and experiment_classify = #{experimentClassify}</if>
...@@ -272,7 +318,7 @@ ...@@ -272,7 +318,7 @@
#{sub} #{sub}
</foreach> </foreach>
</if> </if>
<if test="declareState != null and declareState != ''"> and declare_state = #{declareState}</if> <if test="declareState != null and declareState != ''"> and declare_state = #{declareState}</if>
</select> </select>
<select id="classSituation" parameterType="ClassSituationVo" resultType="ClassSituationVo"> <select id="classSituation" parameterType="ClassSituationVo" resultType="ClassSituationVo">
...@@ -295,4 +341,4 @@ ...@@ -295,4 +341,4 @@
<if test="querText != null "> and concat(ep.experiment_name,ep.grade ) like concat('%', #{querText}, '%') </if> <if test="querText != null "> and concat(ep.experiment_name,ep.grade ) like concat('%', #{querText}, '%') </if>
GROUP BY ep.id GROUP BY ep.id
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -282,8 +282,10 @@ ...@@ -282,8 +282,10 @@
school_experiment_plan ep school_experiment_plan ep
LEFT JOIN school_experiment_plan_class epc ON ep.id = epc.experiment_plan_id LEFT JOIN school_experiment_plan_class epc ON ep.id = epc.experiment_plan_id
LEFT JOIN school_class c ON epc.class_id = c.id LEFT JOIN school_class c ON epc.class_id = c.id
LEFT JOIN school_grade_mentor gm ON gm.grade_id = ep.grade_id AND gm.sub_group = ep.sub
WHERE WHERE
ep.del_flag = '0' and epc.del_flag = '0' ep.del_flag = '0' and epc.del_flag = '0' and gm.del_flag = '0'
<if test="teacherId != null">AND gm.teacher_id = #{teacherId}</if>
<if test="semester != null and semester != ''">and ep.semester = #{semester}</if> <if test="semester != null and semester != ''">and ep.semester = #{semester}</if>
<if test="schoolYear != null and schoolYear != ''">and ep.school_year = #{schoolYear}</if> <if test="schoolYear != null and schoolYear != ''">and ep.school_year = #{schoolYear}</if>
<if test="gradeId != null">and ep.grade_id = #{gradeId}</if> <if test="gradeId != null">and ep.grade_id = #{gradeId}</if>
...@@ -298,6 +300,36 @@ ...@@ -298,6 +300,36 @@
GROUP BY ep.grade_id, ep.grade, ep.school_year, ep.semester, epc.class_id, c.class_name GROUP BY ep.grade_id, ep.grade, ep.school_year, ep.semester, epc.class_id, c.class_name
</select> </select>
<select id="gradeCountClassListAdmin" parameterType="SchoolTeacherLabApplyVo" resultType="Map">
SELECT
ep.grade_id as gradeId,
ep.grade as grade,
ep.school_year as schoolYear,
ep.semester as semester,
epc.class_id as classId,
c.class_name as className,
COUNT( epc.class_id ) as jhsys,
( SELECT COUNT( CASE WHEN state = 1 THEN state END ) FROM school_teacher_lab_apply WHERE del_flag = '0' AND class_id = epc.class_id and grade_id = ep.grade_id ) as ywcsys
FROM
school_experiment_plan ep
LEFT JOIN school_experiment_plan_class epc ON ep.id = epc.experiment_plan_id
LEFT JOIN school_class c ON epc.class_id = c.id
WHERE
ep.del_flag = '0' and epc.del_flag = '0'
<if test="semester != null and semester != ''">and ep.semester = #{semester}</if>
<if test="schoolYear != null and schoolYear != ''">and ep.school_year = #{schoolYear}</if>
<if test="gradeId != null">and ep.grade_id = #{gradeId}</if>
<if test="classId != null and classId != ''"> and epc.class_id = #{classId}</if>
<if test="className != null and className != ''"> and c.class_name like concat('%', #{className}, '%')</if>
<if test="gradeIds != null">
and ep.grade_id in
<foreach item="gradeId" collection="gradeIds" open="(" separator="," close=")">
#{gradeId}
</foreach>
</if>
GROUP BY ep.grade_id, ep.grade, ep.school_year, ep.semester, epc.class_id, c.class_name
</select>
<select id="getGradeClassDetails" parameterType="SchoolTeacherLabApplyVo" resultMap="SchoolTeacherLabApplyVoResult"> <select id="getGradeClassDetails" parameterType="SchoolTeacherLabApplyVo" resultMap="SchoolTeacherLabApplyVoResult">
<include refid="selectSchoolTeacherLabApplyVo"/> <include refid="selectSchoolTeacherLabApplyVo"/>
WHERE del_flag = '0' WHERE del_flag = '0'
...@@ -328,4 +360,4 @@ ...@@ -328,4 +360,4 @@
</if> </if>
GROUP BY apply_name GROUP BY apply_name
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
<if test="statu != null and statu != ''"> and statu = #{statu}</if> <if test="statu != null and statu != ''"> and statu = #{statu}</if>
<if test="startTime != null and endTime != null and startTime != '' and endTime != ''">and DATE_FORMAT(appointment_time,'%Y-%m-%d') between #{startTime} and #{endTime}</if> <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">and DATE_FORMAT(appointment_time,'%Y-%m-%d') between #{startTime} and #{endTime}</if>
</where> </where>
order by apply_time DESC
</select> </select>
<select id="selectSchoolStudioAppointmentById" parameterType="Long" resultMap="SchoolStudioAppointmentResult"> <select id="selectSchoolStudioAppointmentById" parameterType="Long" resultMap="SchoolStudioAppointmentResult">
...@@ -93,4 +94,4 @@ ...@@ -93,4 +94,4 @@
#{id} #{id}
</foreach> </foreach>
</delete> </delete>
</mapper> </mapper>
\ No newline at end of file
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
sgm.teacher_id, sgm.teacher_id,
sgm.grade_id, sgm.grade_id,
sgm.teacher_post, sgm.teacher_post,
sgm.type,
sgm.sub_group,
st.teacher_name, st.teacher_name,
st.pic_url, st.pic_url,
st.teacher_code, st.teacher_code,
...@@ -38,6 +40,8 @@ ...@@ -38,6 +40,8 @@
sgm.teacher_id, sgm.teacher_id,
sgm.grade_id, sgm.grade_id,
sgm.teacher_post, sgm.teacher_post,
sgm.type,
sgm.sub_group,
st.teacher_name st.teacher_name
from school_grade_mentor sgm from school_grade_mentor sgm
left join school_teacher st on sgm.teacher_id = st.id left join school_teacher st on sgm.teacher_id = st.id
......
...@@ -354,7 +354,6 @@ ...@@ -354,7 +354,6 @@
left join sys_user u on u.user_id = t.id left join sys_user u on u.user_id = t.id
left join sys_dept d on d.dept_id = u.dept_id left join sys_dept d on d.dept_id = u.dept_id
where t.del_flag = '0' and u.del_flag = '0' and d.del_flag = '0' where t.del_flag = '0' and u.del_flag = '0' and d.del_flag = '0'
<if test="employeeType != null and employeeType != ''">and u.employee_type = #{employeeType}</if>
<if test="teacherName != null and teacherName != ''">and u.user_name like concat('%', #{teacherName}, <if test="teacherName != null and teacherName != ''">and u.user_name like concat('%', #{teacherName},
'%')</if> '%')</if>
<if test="teacherTel != null and teacherTel != ''">and u.phonenumber like concat('%', #{teacherTel}, <if test="teacherTel != null and teacherTel != ''">and u.phonenumber like concat('%', #{teacherTel},
......
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