Commit 39cc0f08 by zhaopanyu

Merge branch 'master' of 49.232.152.146:qangqi/dd_school

parents 663c2738 154c6ae3
......@@ -89,13 +89,13 @@ public class StudentScoreController extends BaseController {
}
/**
* 根据身份证号查询学生信息
* @param idCard
* 根据号查询学生信息
* @param schoolNo
* @return
*/
@GetMapping("/selectStudent")
public AjaxResult selectStudent(@RequestParam("idCard") String idCard){
return AjaxResult.success(studentScoreService.selectStudent(idCard));
public AjaxResult selectStudent(@RequestParam("schoolNo") String schoolNo){
return AjaxResult.success(studentScoreService.selectStudent(schoolNo));
}
/**
......
......@@ -100,7 +100,8 @@ public class SchoolPurchaseController extends BaseController {
if (getDeptId() == null){
throw new ServiceException("未查询到当前部门id");
}
schoolPurchase.setDeptId(getDeptId());
// schoolPurchase.setDeptId(getDeptId());
schoolPurchase.setApplyId(getUserId());
startPage();
List<SchoolPurchaseVo> list = schoolPurchaseService.queryList(submitState,schoolPurchase);
return getDataTable(list);
......
......@@ -137,7 +137,7 @@ public class LogisticsRepairsController extends BaseController
*/
@GetMapping("/listAll")
public TableDataInfo listAll(LogisticsRepairs logisticsRepairs){
startPage();
// startPage();
return getDataTable(logisticsRepairsService.selectListAll(logisticsRepairs));
}
}
......@@ -63,7 +63,7 @@ public class SchoolExperimentPlanController extends BaseController
//如果是管理员,查询全部列表
if (user.isAdmin()){
startPage();
List<SchoolExperimentPlanVo> list = schoolExperimentPlanService.selectSchoolExperimentPlanList(schoolExperimentPlanVo);
List<SchoolExperimentPlanVo> list = schoolExperimentPlanService.selectExperimentPlanListAdmin(schoolExperimentPlanVo);
list.forEach(list1 -> {
String semester = "";
if (list1.getSemester().equals("1")){
......@@ -93,40 +93,12 @@ public class SchoolExperimentPlanController extends BaseController
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(user.getUserId());
startPage();
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 -> {
String semester = "";
if (list1.getSemester().equals("1")){
......@@ -322,7 +294,7 @@ public class SchoolExperimentPlanController extends BaseController
//管理员角色返回全部数据
if (user.isAdmin()){
startPage();
List<Map<String, Object>> list = schoolExperimentPlanService.gradeCountExperiment(schoolExperimentPlanVo);
List<Map<String, Object>> list = schoolExperimentPlanService.countExperimentListAdmin(schoolExperimentPlanVo);
list.forEach(list1 -> {
//总班级数
int totalClass = Integer.parseInt(list1.get("totalClass").toString());
......@@ -368,39 +340,11 @@ public class SchoolExperimentPlanController extends BaseController
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(user.getUserId());
startPage();
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 -> {
//总班级数
int totalClass = Integer.parseInt(list1.get("totalClass").toString());
......@@ -440,7 +384,7 @@ public class SchoolExperimentPlanController extends BaseController
//管理员角色返回全部数据
if (user.isAdmin()){
startPage();
List<Map<String, Object>> list = schoolTeacherLabApplyService.gradeCountClass(schoolTeacherLabApplyVo);
List<Map<String, Object>> list = schoolTeacherLabApplyService.gradeCountClassListAdmin(schoolTeacherLabApplyVo);
list.forEach(list1 -> {
//计划实验数
int jhsys = Integer.parseInt(list1.get("jhsys").toString());
......@@ -484,13 +428,8 @@ public class SchoolExperimentPlanController extends BaseController
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.setTeacherId(user.getUserId());
startPage();
List<Map<String, Object>> list = schoolTeacherLabApplyService.gradeCountClass(schoolTeacherLabApplyVo);
list.forEach(list1 -> {
......
......@@ -63,8 +63,6 @@ public class SchoolLabClassYearController extends BaseController
@Autowired
private ISchoolGradeService gradeService;
@Autowired
private ISchoolGradeMentorService mentorService;
@Autowired
private ISchoolClassMentorService classMentorService;
/**
......@@ -78,7 +76,7 @@ public class SchoolLabClassYearController extends BaseController
//如果是管理员返回全部数据
if (user.isAdmin()){
startPage();
List<SchoolLabClassYearVo> list = schoolLabClassYearService.selectSchoolLabClassYearList(schoolLabClassYearVo);
List<SchoolLabClassYearVo> list = schoolLabClassYearService.selectLabClassYearListAdmin(schoolLabClassYearVo);
list.forEach(list1 -> {
String semester = "";
if (list1.getSemester().equals("1")){
......@@ -111,38 +109,11 @@ public class SchoolLabClassYearController extends BaseController
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.setUserId(user.getUserId());
startPage();
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 -> {
String semester = "";
if (list1.getSemester().equals("1")){
......@@ -235,7 +206,86 @@ public class SchoolLabClassYearController extends BaseController
@GetMapping("/getLab")
public AjaxResult getLab(SchoolExperimentPlanVo schoolExperimentPlanVo){
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
// 查询该教师属于哪个班级,教哪门课
LambdaQueryWrapper<SchoolClassMentor> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolClassMentor::getTeacherId,user.getUserId())
.in(SchoolClassMentor::getCourseId,6,8,9);
.in(SchoolClassMentor::getCourseName,"物理","化学","生物");
List<SchoolClassMentor> schoolClassMentors = classMentorService.list(wrapper);
if (StringUtils.isNotNull(schoolClassMentors)){
for (SchoolClassMentor schoolClassMentor : schoolClassMentors) {
......@@ -318,7 +368,9 @@ public class SchoolLabClassYearController extends BaseController
}
}
schoolLabClassYearVo.setApplyId(user.getUserId());
schoolLabClassYearVo.setSubs(subs);
if(subs.size() > 0){
schoolLabClassYearVo.setSubs(subs);
}
startPage();
List<SchoolLabClassYearVo> list = schoolLabClassYearService.getTeacherLabList(schoolLabClassYearVo);
list.forEach(list1 -> {
......
......@@ -396,7 +396,7 @@ public class SchoolStudentController extends BaseController {
* @return
*/
@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();
......@@ -404,10 +404,13 @@ public class SchoolStudentController extends BaseController {
parent.setRelationship(relationship);
List<SchoolStudentParent> parentList = parentService.queryList(parent);*/
//SchoolStudentParent schoolStudentParent = new SchoolStudentParent();
if (StringUtils.isEmpty(id) || id.equals("undefined")){
throw new ServiceException("请先选择学生!");
}
Long StudentId = Long.valueOf(id);
LambdaQueryWrapper<SchoolStudentParent> lqw = new LambdaQueryWrapper<>();
lqw
.eq(SchoolStudentParent::getStudentId,id)
.eq(SchoolStudentParent::getStudentId,StudentId)
.eq(SchoolStudentParent::getRelationship,relationship);
List<SchoolStudentParent> list = parentService.list(lqw);
//对应关系的家长不存在,抛异常
......
......@@ -44,19 +44,19 @@ public class SchoolEquipmentLedger extends OurBaseEntity
private String unit;
/** 归属类型(1公共区域,2信息中心,3个人) */
@Excel(name = "归属类型", readConverterExp = "1=公共区域,2=信息中心,3=个人")
@Excel(name = "归属类型", readConverterExp = "1=公共区域,2=信息中心,3=个人", combo = {"公共区域","信息中心","个人"})
private String affiliationType;
/** 设备状态(1完好,2损坏,3报废) */
@Excel(name = "设备状态", readConverterExp = "1=完好,2=损坏,3=报废")
@Excel(name = "设备状态", readConverterExp = "1=完好,2=损坏,3=报废", combo = {"完好","损坏","报废"})
private String equipmentState;
/** 是否允许借出(1是,0否) */
@Excel(name = "是否允许借出", readConverterExp = "1=是,0=否")
@Excel(name = "是否允许借出", readConverterExp = "1=是,0=否", combo = {"是","否"})
private String isAllowLend;
/** 是否已借出(1是,0否) */
@Excel(name = "是否已借出", readConverterExp = "1=是,0=否")
@Excel(name = "是否已借出", readConverterExp = "1=是,0=否", combo = {"是","否"})
private String isLend;
/** 投产日期 */
......
......@@ -29,6 +29,9 @@ public class SchoolGradeMentor extends OurBaseEntity {
@JsonFormat(pattern = "yyyy-MM-dd")
private Date endTime;
/** 类型(1年级部,2学科组长) */
private String type;
/** 职务 */
@NotBlank(message = "职务不能为空")
private String teacherPost;
......
......@@ -17,11 +17,11 @@ public interface StudentScoreMapper extends BaseMapper<SchoolStudentScore> {
List<SchoolStudentScoreVo> selectStudentScoreList(SchoolStudentScoreVo schoolStudentScoreVo);
/**
* 根据身份证号获取学生信息
* @param idCard
* 根据号获取学生信息
* @param schoolNo
* @return
*/
SchoolStudentScoreVo selectStudent(@Param("idCard") String idCard);
SchoolStudentScoreVo selectStudent(@Param("schoolNo") String schoolNo);
/**
* 查询学生成绩详细信息
......
......@@ -91,4 +91,18 @@ public interface SchoolDcwjRyMapper extends BaseMapper<SchoolDcwjRy>
public List<DcwjRyExportVo> getHeaderExportData(@Param("dcwjId") Long dcwjId,
@Param("entity") SchoolDcwjAnVo vo,
@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
*/
public List<SchoolExperimentPlanVo> selectSchoolExperimentPlanList(SchoolExperimentPlanVo schoolExperimentPlanVo);
/**
* 查询实验计划列表(管理员)
*
* @param schoolExperimentPlanVo 实验计划
* @return 实验计划集合
*/
public List<SchoolExperimentPlanVo> selectExperimentPlanListAdmin(SchoolExperimentPlanVo schoolExperimentPlanVo);
public List<Map<String, String>> selectNameByVo(SchoolExperimentPlanVo schoolExperimentPlanVo);
/**
* 新增实验计划
......@@ -119,4 +127,11 @@ public interface SchoolExperimentPlanMapper extends BaseMapper<SchoolExperimentP
* @return
*/
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>
public List<SchoolLabClassYearVo> selectSchoolLabClassYearList(SchoolLabClassYearVo schoolLabClassYearVo);
/**
* 查询年级实验室预约列表(管理员)
*
* @param schoolLabClassYearVo 年级实验室预约
* @return 年级实验室预约集合
*/
public List<SchoolLabClassYearVo> selectLabClassYearListAdmin(SchoolLabClassYearVo schoolLabClassYearVo);
/**
* 新增年级实验室预约
*
* @param schoolLabClassYear 年级实验室预约
......
......@@ -122,6 +122,13 @@ public interface SchoolTeacherLabApplyMapper extends BaseMapper<SchoolTeacherLab
List<Map<String, Object>> gradeCountClass(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo);
/**
* 班级完成情况明细(管理员)
* @param schoolTeacherLabApplyVo
* @return
*/
List<Map<String, Object>> gradeCountClassListAdmin(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo);
/**
* 级部-班级完成情况明细-查看班级完成情况详情
* @param schoolTeacherLabApplyVo
* @return
......
......@@ -40,11 +40,11 @@ public interface IStudentScoreService extends IService<SchoolStudentScore> {
void checkImport(List<SchoolStudentScoreVo> list);
/**
* 根据身份证号获取学生信息
* @param idCard
* 根据号获取学生信息
* @param schoolNo
* @return
*/
SchoolStudentScoreVo selectStudent(String idCard);
SchoolStudentScoreVo selectStudent(String schoolNo);
/**
* 新增学生成绩
......
......@@ -145,10 +145,12 @@ public class StudentScoreServiceImpl extends ServiceImpl<StudentScoreMapper, Sch
if (StringUtils.isNull(schoolStudentScoreVo.getStudentName())) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、学生姓名为空,请你重新输入!");
} else if (StringUtils.isNull(schoolStudentScoreVo.getIdCard())) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、身份证号为空,请你重新输入!");
} else if (StringUtils.isEmpty(schoolStudentScoreVo.getStudentNumber())) {
}
// else if (StringUtils.isNull(schoolStudentScoreVo.getIdCard())) {
// failureNum++;
// failureMsg.append("<br/>" + failureNum + "、身份证号为空,请你重新输入!");
// }
else if (StringUtils.isEmpty(schoolStudentScoreVo.getStudentNumber())) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、学号为空,请您重新输入!");
} else if (StringUtils.isNull(schoolStudentScoreVo.getExamType())) {
......@@ -157,7 +159,7 @@ public class StudentScoreServiceImpl extends ServiceImpl<StudentScoreMapper, Sch
} else {
LambdaQueryWrapper<SchoolStudent> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolStudent::getStudentName,schoolStudentScoreVo.getStudentName())
.eq(SchoolStudent::getIdCard,schoolStudentScoreVo.getIdCard());
.eq(SchoolStudent::getSchoolNo,schoolStudentScoreVo.getStudentNumber());
List<SchoolStudent> schoolStudents = schoolStudentMapper.selectList(wrapper);
if (StringUtils.isNull(schoolStudents) || schoolStudents.size() == 0){
failureNum++;
......@@ -175,15 +177,15 @@ public class StudentScoreServiceImpl extends ServiceImpl<StudentScoreMapper, Sch
}
/**
* 根据身份证号获取学生信息
* @param idCard
* 根据号获取学生信息
* @param schoolNo
* @return
*/
@Override
public SchoolStudentScoreVo selectStudent(String idCard) {
SchoolStudentScoreVo schoolStudentScoreVo = studentScoreMapper.selectStudent(idCard);
public SchoolStudentScoreVo selectStudent(String schoolNo) {
SchoolStudentScoreVo schoolStudentScoreVo = studentScoreMapper.selectStudent(schoolNo);
if (StringUtils.isNull(schoolStudentScoreVo)){
throw new ServiceException("未查询到该学生信息,请仔细核对身份证号码");
throw new ServiceException("未查询到该学生信息,请仔细核对学号");
}
return schoolStudentScoreVo;
}
......
......@@ -37,6 +37,8 @@ import static com.core.constant.ProcessCommon.PENDING;
import static com.core.constant.ProcessCommon.SUSPENDSTATE_PENDING;
import static com.core.constant.ProcessVariables.HANDUSERID1;
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.substring;
import static yangtz.cs.liu.campus.constant.ProcessState.APPROVAL;
......@@ -84,8 +86,8 @@ public class SchoolPurchaseServiceImpl extends ServiceImpl<SchoolPurchaseMapper,
SchoolPurchase schoolPurchase = new SchoolPurchase();
BeanUtils.copyProperties(purchase,schoolPurchase);
schoolPurchase.setState(SAVE);
//schoolPurchase.setApplyId(getUserId());
//schoolPurchase.setApplyUser(getUsername());
schoolPurchase.setApplyId(getUserId());
schoolPurchase.setApplyUser(getUsername());
schoolPurchase.insert();
int flag = schoolPurchaseMapper.insert(schoolPurchase);
if(flag > 0){
......
package yangtz.cs.liu.campus.service.impl.schoolDcwj;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.TreeSet;
import java.util.stream.Collectors;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
......@@ -9,9 +11,11 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.annotation.DataScope;
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.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.mapper.SysDeptMapper;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -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.teacher.SchoolTeacherMapper;
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.DcwjSenateVo;
import yangtz.cs.liu.campus.vo.teacher.SchoolTeacherVO;
import yangtz.cs.liu.wechat.vo.schoolDcwj.SchoolDcwjVo;
import yangtz.cs.liu.wechat.vo.schoolDcwj.Vo_SchoolDcwj;
......@@ -72,6 +78,12 @@ public class SchoolDcwjServiceImpl extends ServiceImpl<SchoolDcwjMapper, SchoolD
@Autowired
private SchoolStudentMapper studentMapper;
@Autowired
private ISchoolGradeService gradeService;
@Autowired
private SysDeptMapper deptMapper;
/**
* 查询调查问卷列表
*
......@@ -338,22 +350,51 @@ public class SchoolDcwjServiceImpl extends ServiceImpl<SchoolDcwjMapper, SchoolD
for (SchoolDcwjPush push : pushes) {
if (PUSHT.equals(push.getPubType())) {
//推送给全体教工类型的教师
SchoolTeacher t = new SchoolTeacher();
//设置用户类型为教工
t.setEmployeeType(EmployeeType.TEACH);
List<SchoolTeacher> teacherList = teacherMapper.getAllTeachers(t);
if (StringUtils.isNull(teacherList) || teacherList.size() == 0){
//获取最新学年
int schoolYear = gradeService.isNewSchoolYear();
//获取最新三个级部
List<SysDept> deptGrades = new ArrayList<>();
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("系统中暂无教职工类型为教工的教师,无法发布");
}
//去重
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.insert();
schoolDcwjRy.setDcwjId(id);
schoolDcwjRy.setTeacherId(teacher.getId());
schoolDcwjRy.setRyZdzt(DcwjType.FILLINON);
schoolDcwjRyMapper.insert(schoolDcwjRy);
schoolDcwjRyList.add(schoolDcwjRy);
// schoolDcwjRyMapper.insert(schoolDcwjRy);
}
//批量新增接收人
schoolDcwjRyMapper.batchInsertDcwjRyTeacher(schoolDcwjRyList);
break;
}else {
//推送给级部家长
......@@ -361,6 +402,10 @@ public class SchoolDcwjServiceImpl extends ServiceImpl<SchoolDcwjMapper, SchoolD
//查出学生所在的班级
lqwClass.eq(SchoolClass::getGradeId, push.getGradeId());
List<SchoolClass> schoolClassList = classMapper.selectList(lqwClass);
//接收人集合
List<SchoolDcwjRy> schoolDcwjRyList = new ArrayList<>();
for (SchoolClass schoolClass : schoolClassList) {
//查出班级所有下所有学生
LambdaQueryWrapper<SchoolStudent> lqwStudent = new LambdaQueryWrapper<>();
......@@ -373,9 +418,13 @@ public class SchoolDcwjServiceImpl extends ServiceImpl<SchoolDcwjMapper, SchoolD
schoolDcwjRy.setDcwjId(id);
schoolDcwjRy.setStudentId(schoolStudent.getId());
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
String userName = sysUserMapper.selectUserById(schoolReceive.getReceivedById()).getUserName();
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.setCreateTime(DateUtils.getNowDate());
return receiveMapper.insert(schoolReceive);
......
......@@ -175,6 +175,8 @@ public class SchoolTeacherBorrowServiceImpl extends ServiceImpl<SchoolTeacherBor
*/
@Override
public int returnInstrument(SchoolTeacherBorrowVo schoolTeacherBorrowVo) {
//设置状态为已归还
schoolTeacherBorrowVo.setBorrowState("1");
schoolTeacherBorrowVo.setReturnTime(DateUtils.getNowDate());
SchoolTeacherBorrow schoolTeacherBorrow = new SchoolTeacherBorrow();
BeanUtils.copyProperties(schoolTeacherBorrowVo,schoolTeacherBorrow);
......
......@@ -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
* @return
......@@ -356,7 +368,7 @@ public class SchoolExperimentPlanServiceImpl extends ServiceImpl<SchoolExperimen
*/
@Override
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 -> {
//总班级数
int totalClass = Integer.parseInt(list1.get("totalClass").toString());
......@@ -516,4 +528,14 @@ public class SchoolExperimentPlanServiceImpl extends ServiceImpl<SchoolExperimen
public List<Map<String, Object>> gradeCountExperiment(SchoolExperimentPlanVo schoolExperimentPlanVo) {
return schoolExperimentPlanMapper.countExperiment(schoolExperimentPlanVo);
}
/**
* 实验室完成情况明细(管理员)
* @param schoolExperimentPlanVo
* @return
*/
@Override
public List<Map<String, Object>> countExperimentListAdmin(SchoolExperimentPlanVo schoolExperimentPlanVo) {
return schoolExperimentPlanMapper.countExperimentListAdmin(schoolExperimentPlanVo);
}
}
......@@ -3,6 +3,7 @@ package yangtz.cs.liu.campus.service.impl.schoolLab;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
......@@ -15,12 +16,15 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
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.mapper.schoolLab.SchoolTeacherExperimentApplyMapper;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApply;
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.ISchoollTeacherExperimentApplyLabsService;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolLabClassYearVo;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolTeacherExperimentApplyVo;
/**
......@@ -36,6 +40,8 @@ public class SchoolTeacherExperimentApplyServiceImpl extends ServiceImpl<SchoolT
private SchoolTeacherExperimentApplyMapper schoolTeacherExperimentApplyMapper;
@Autowired
private ISchoollTeacherExperimentApplyLabsService schoollTeacherExperimentApplyLabsService;
@Autowired
private ISchoolLabClassYearService schoolLabClassYearService;
/**
* 查询教师个人实验申请
*
......@@ -154,6 +160,22 @@ public class SchoolTeacherExperimentApplyServiceImpl extends ServiceImpl<SchoolT
}
if (list.size() > 0){
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);
}
return schoolTeacherExperimentApplyMapper.updateSchoolTeacherExperimentApply(schoolTeacherExperimentApplyVo);
......
......@@ -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
* @return
......
......@@ -143,10 +143,12 @@ public class SchoolTeacherWagesServiceImpl extends ServiceImpl<SchoolTeacherWage
if (StringUtils.isEmpty(schoolTeacherWages.getTeacherName())) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、教师姓名为空,请您重新输入! ");
} else if (StringUtils.isEmpty(schoolTeacherWages.getIdCard())) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、身份证号为空,请您重新输入! ");
} else if (StringUtils.isNull(schoolTeacherWages.getWagesTime())) {
}
// else if (StringUtils.isEmpty(schoolTeacherWages.getIdCard())) {
// failureNum++;
// failureMsg.append("<br/>" + failureNum + "、身份证号为空,请您重新输入! ");
// }
else if (StringUtils.isNull(schoolTeacherWages.getWagesTime())) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、工资日期为空,请您重新输入!");
} else if (isNotNull(schoolTeacherWages.getWagesTime())) {
......
......@@ -34,6 +34,14 @@ public interface ISchoolExperimentPlanService extends IService<SchoolExperimentP
public List<Map<String,String>> selectNameByVo(SchoolExperimentPlanVo schoolExperimentPlanVo);
/**
* 查询实验计划列表(管理员)
*
* @param schoolExperimentPlanVo 实验计划
* @return 实验计划集合
*/
public List<SchoolExperimentPlanVo> selectExperimentPlanListAdmin(SchoolExperimentPlanVo schoolExperimentPlanVo);
/**
* 新增实验计划
*
* @param schoolExperimentPlanVo 实验计划
......@@ -115,4 +123,11 @@ public interface ISchoolExperimentPlanService extends IService<SchoolExperimentP
* @return
*/
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>
public List<SchoolLabClassYearVo> selectSchoolLabClassYearList(SchoolLabClassYearVo schoolLabClassYearVo);
/**
* 查询年级实验室预约列表(管理员)
*
* @param schoolLabClassYearVo 年级实验室预约
* @return 年级实验室预约集合
*/
public List<SchoolLabClassYearVo> selectLabClassYearListAdmin(SchoolLabClassYearVo schoolLabClassYearVo);
/**
* 新增年级实验室预约
*
* @param schoolLabClassYear 年级实验室预约
......
......@@ -123,6 +123,13 @@ public interface ISchoolTeacherLabApplyService extends IService<SchoolTeacherLab
List<Map<String,Object>> gradeCountClass(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo);
/**
* 班级完成情况明细(管理员)
* @param schoolTeacherLabApplyVo
* @return
*/
List<Map<String,Object>> gradeCountClassListAdmin(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo);
/**
* 级部-班级完成情况明细-查看班级完成情况详情
* @param schoolTeacherLabApplyVo
* @return
......
......@@ -20,7 +20,6 @@ public class StudentScoreVo {
@Excel(name = "学号")
private String studentNumber;
/** 身份证号 */
@Excel(name = "身份证号")
private String idCard;
/** 班级 */
@Excel(name = "班级")
......
......@@ -79,6 +79,8 @@ public class SchoolExperimentPlanVo extends BaseEntity
@Excel(name = "实验用品")
private String experimentUseGoods;
private Long teacherId;
/** 实验计划与班级关系信息 */
private List<SchoolExperimentPlanClass> schoolExperimentPlanClassList;
}
......@@ -58,4 +58,12 @@ public class SchoolGradeMentorVo extends OurBaseEntity {
private String sex;
private String education;
/** 类型(1年级部,2学科组长) */
private String type;
/** 学科组(1物理学科组,2化学学科组,3生物学科组) */
private String subGroup;
}
......@@ -25,7 +25,6 @@ public class SchoolStudentScoreVo extends OurBaseEntity {
@Excel(name = "*学号")
private String studentNumber;
/** 身份证号 */
@Excel(name = "*身份证号")
private String idCard;
/** 班级 */
@Excel(name = "班级")
......
......@@ -77,7 +77,7 @@
FROM curricula_student cs
LEFT JOIN school_student xs ON cs.student_id = xs.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 id="selectStudentScoreById" parameterType="Long" resultMap="SchoolStudentScoreVoResult">
......@@ -256,4 +256,4 @@
</foreach>
</insert>
</mapper>
\ No newline at end of file
</mapper>
......@@ -12,6 +12,8 @@
</if>
<if test="entity.deptId != null and entity.deptId != ''">and dept_id like concat('%', #{entity.deptId}, '%')
</if>
<if test="entity.applyId != null">and apply_id = #{entity.applyId}
</if>
<if test="submitState == 0">
and instance_id is null
</if>
......
......@@ -218,4 +218,22 @@
#{id}
</foreach>
</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>
......@@ -70,8 +70,7 @@
insert into school_instrument
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="instrumentName != null">instrument_name,</if>
<if test="instrumentTypeId != null">instrument_type_id,</if>
<if test="instrumentTypeName != null">instrument_type_name,</if>
<if test="instrumentTypeId != null">instrument_type_id,instrument_type_name,</if>
<if test="instrumentModel != null">instrument_model,</if>
<if test="instrumentNum != null">instrument_num,</if>
<if test="remark != null">remark,</if>
......@@ -83,8 +82,7 @@
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="instrumentName != null">#{instrumentName},</if>
<if test="instrumentTypeId != null">#{instrumentTypeId},</if>
<if test="instrumentTypeName != null">#{instrumentTypeName},</if>
<if test="instrumentTypeId != null">#{instrumentTypeId},(select instrument_type_name from school_instrument_classify where id = #{instrumentTypeId}),</if>
<if test="instrumentModel != null">#{instrumentModel},</if>
<if test="instrumentNum != null">#{instrumentNum},</if>
<if test="remark != null">#{remark},</if>
......@@ -100,8 +98,7 @@
update school_instrument
<trim prefix="SET" suffixOverrides=",">
<if test="instrumentName != null">instrument_name = #{instrumentName},</if>
<if test="instrumentTypeId != null">instrument_type_id = #{instrumentTypeId},</if>
<if test="instrumentTypeName != null">instrument_type_name = #{instrumentTypeName},</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="instrumentModel != null">instrument_model = #{instrumentModel},</if>
<if test="instrumentNum != null">instrument_num = #{instrumentNum},</if>
<if test="remark != null">remark = #{remark},</if>
......@@ -124,4 +121,4 @@
#{id}
</foreach>
</update>
</mapper>
\ No newline at end of file
</mapper>
......@@ -41,6 +41,38 @@
</sql>
<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"/>
<where>
del_flag = '0'
......@@ -61,7 +93,7 @@
<foreach item="gradeId" collection="gradeIds" open="(" separator="," close=")">
#{gradeId}
</foreach>
</if>
</if>
</where>
order by create_time DESC
</select>
......@@ -255,8 +287,10 @@
FROM
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_grade_mentor gm ON gm.grade_id = ep.grade_id AND gm.sub_group = ep.sub
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="gradeId != null "> and ep.grade_id = #{gradeId}</if>
<if test="grade != null and grade != ''"> and ep.grade like concat('%', #{grade}, '%')</if>
......@@ -277,4 +311,35 @@
</if>
GROUP BY ep.id,ep.grade_id,ep.grade,ep.school_year,ep.semester,ep.experiment_name,ep.sub
</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 @@
</sql>
<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"/>
<where>
del_flag = '0'
......@@ -262,7 +308,7 @@
(SELECT DISTINCT experiment_plan_id FROM school_experiment_plan_class
WHERE del_flag = '0' and class_id in
(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="semester != null and semester != ''"> and semester = #{semester}</if>
<if test="experimentClassify != null and experimentClassify != ''"> and experiment_classify = #{experimentClassify}</if>
......@@ -272,7 +318,7 @@
#{sub}
</foreach>
</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 id="classSituation" parameterType="ClassSituationVo" resultType="ClassSituationVo">
......@@ -295,4 +341,4 @@
<if test="querText != null "> and concat(ep.experiment_name,ep.grade ) like concat('%', #{querText}, '%') </if>
GROUP BY ep.id
</select>
</mapper>
\ No newline at end of file
</mapper>
......@@ -282,8 +282,10 @@
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
LEFT JOIN school_grade_mentor gm ON gm.grade_id = ep.grade_id AND gm.sub_group = ep.sub
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="schoolYear != null and schoolYear != ''">and ep.school_year = #{schoolYear}</if>
<if test="gradeId != null">and ep.grade_id = #{gradeId}</if>
......@@ -298,6 +300,36 @@
GROUP BY ep.grade_id, ep.grade, ep.school_year, ep.semester, epc.class_id, c.class_name
</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">
<include refid="selectSchoolTeacherLabApplyVo"/>
WHERE del_flag = '0'
......@@ -328,4 +360,4 @@
</if>
GROUP BY apply_name
</select>
</mapper>
\ No newline at end of file
</mapper>
......@@ -35,6 +35,7 @@
<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>
</where>
order by apply_time DESC
</select>
<select id="selectSchoolStudioAppointmentById" parameterType="Long" resultMap="SchoolStudioAppointmentResult">
......@@ -93,4 +94,4 @@
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
</mapper>
......@@ -9,6 +9,8 @@
sgm.teacher_id,
sgm.grade_id,
sgm.teacher_post,
sgm.type,
sgm.sub_group,
st.teacher_name,
st.pic_url,
st.teacher_code,
......@@ -38,6 +40,8 @@
sgm.teacher_id,
sgm.grade_id,
sgm.teacher_post,
sgm.type,
sgm.sub_group,
st.teacher_name
from school_grade_mentor sgm
left join school_teacher st on sgm.teacher_id = st.id
......
......@@ -354,7 +354,6 @@
left join sys_user u on u.user_id = t.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'
<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>
<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