From 65a68e3ad532e9fd35452623d09ebc2ea0d7e448 Mon Sep 17 00:00:00 2001 From: wans <747101512@qq.com> Date: Mon, 17 May 2021 14:20:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9F=A5=E8=AF=A2=E8=AE=B2?= =?UTF-8?q?=E5=B8=88=E6=8E=88=E8=AF=BE=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/classplan/ClassPlanController.java | 11 + .../api/indexcount/IndexCountController.java | 3 +- .../api/teacher/TeacherController.java | 2 +- .../com/tenlion/dao/teacher/ITeacherDao.java | 8 + .../dtos/teacher/TeacherLessonsTimeDTO.java | 165 +++++++++++++++ .../service/classplan/IClassPlanService.java | 7 + .../classplan/impl/ClassPlanServiceImpl.java | 46 ++++- .../{service => teacher}/ITeacherService.java | 18 +- .../impl/TeacherServiceImpl.java | 53 ++++- .../mapper/classplan/class-plan-mapper.xml | 10 +- .../mybatis/mapper/teacher/teacher-mapper.xml | 28 ++- .../static/route/classplan/list-signup.html | 46 +++-- .../route/classplan/save-report-exam.html | 137 ------------ .../static/route/classplan/save.html | 5 +- .../route/classplan/show-report-exam.html | 195 ------------------ .../route/classplan/update-report-exam.html | 164 --------------- 16 files changed, 352 insertions(+), 546 deletions(-) create mode 100644 src/main/java/cn/com/tenlion/pojo/dtos/teacher/TeacherLessonsTimeDTO.java rename src/main/java/cn/com/tenlion/service/{service => teacher}/ITeacherService.java (86%) rename src/main/java/cn/com/tenlion/service/{service => teacher}/impl/TeacherServiceImpl.java (69%) delete mode 100644 src/main/resources/static/route/classplan/save-report-exam.html delete mode 100644 src/main/resources/static/route/classplan/show-report-exam.html delete mode 100644 src/main/resources/static/route/classplan/update-report-exam.html diff --git a/src/main/java/cn/com/tenlion/controller/api/classplan/ClassPlanController.java b/src/main/java/cn/com/tenlion/controller/api/classplan/ClassPlanController.java index 0d31751..92fe69c 100644 --- a/src/main/java/cn/com/tenlion/controller/api/classplan/ClassPlanController.java +++ b/src/main/java/cn/com/tenlion/controller/api/classplan/ClassPlanController.java @@ -196,4 +196,15 @@ public class ClassPlanController extends DefaultBaseController { Map params = requestParams(); return classPlanService.listOrgSignInfo(params); } + + @ApiOperation(value = "机构工种报名情况数量", notes = "机构工种报名情况接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "workerCatalog", value = "workerCatalog", paramType = "query") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("get-sign-user-counts") + public Map getSignUserCounts() { + Map params = requestParams(); + return classPlanService.getSignUserCounts(params); + } } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/controller/api/indexcount/IndexCountController.java b/src/main/java/cn/com/tenlion/controller/api/indexcount/IndexCountController.java index be6e0eb..c970d1d 100644 --- a/src/main/java/cn/com/tenlion/controller/api/indexcount/IndexCountController.java +++ b/src/main/java/cn/com/tenlion/controller/api/indexcount/IndexCountController.java @@ -3,7 +3,6 @@ package cn.com.tenlion.controller.api.indexcount; import cn.com.tenlion.institutionmanagement.pojo.dtos.institution.InstitutionDTO; import cn.com.tenlion.institutionmanagement.service.institution.IInstitutionService; -import cn.com.tenlion.pojo.dtos.apply.ApplyDTO; import cn.com.tenlion.pojo.dtos.classplan.ClassPlanDTO; import cn.com.tenlion.pojo.dtos.examapply.ExamApplyDTO; import cn.com.tenlion.service.apply.IApplyService; @@ -12,7 +11,7 @@ import cn.com.tenlion.service.examapply.IExamApplyService; import cn.com.tenlion.service.examcheck.IExamCheckService; import cn.com.tenlion.service.examinationuser.IExaminationService; import cn.com.tenlion.service.lessons.ILessonsService; -import cn.com.tenlion.service.service.ITeacherService; +import cn.com.tenlion.service.teacher.ITeacherService; import cn.com.tenlion.service.traininginstitutionuser.ITrainingInstitutionUserService; import ink.wgink.common.base.DefaultBaseController; import ink.wgink.common.component.SecurityComponent; diff --git a/src/main/java/cn/com/tenlion/controller/api/teacher/TeacherController.java b/src/main/java/cn/com/tenlion/controller/api/teacher/TeacherController.java index 23efd35..aaa625d 100644 --- a/src/main/java/cn/com/tenlion/controller/api/teacher/TeacherController.java +++ b/src/main/java/cn/com/tenlion/controller/api/teacher/TeacherController.java @@ -3,7 +3,7 @@ package cn.com.tenlion.controller.api.teacher; import cn.com.tenlion.institutionmanagement.pojo.dtos.institution.InstitutionDTO; import cn.com.tenlion.pojo.dtos.teacher.TeacherDTO; import cn.com.tenlion.pojo.vos.teacher.TeacherVO; -import cn.com.tenlion.service.service.ITeacherService; +import cn.com.tenlion.service.teacher.ITeacherService; import ink.wgink.common.base.DefaultBaseController; import ink.wgink.exceptions.RemoveException; import ink.wgink.exceptions.SearchException; diff --git a/src/main/java/cn/com/tenlion/dao/teacher/ITeacherDao.java b/src/main/java/cn/com/tenlion/dao/teacher/ITeacherDao.java index 7525d01..2a3847b 100644 --- a/src/main/java/cn/com/tenlion/dao/teacher/ITeacherDao.java +++ b/src/main/java/cn/com/tenlion/dao/teacher/ITeacherDao.java @@ -1,6 +1,7 @@ package cn.com.tenlion.dao.teacher; import cn.com.tenlion.pojo.dtos.teacher.TeacherDTO; +import cn.com.tenlion.pojo.dtos.teacher.TeacherLessonsTimeDTO; import org.springframework.stereotype.Repository; import java.util.List; @@ -73,4 +74,11 @@ public interface ITeacherDao { * @param params */ void saveTeacherLessonsTime(Map params); + + /** + * 查询讲师授课情况列表接口 + * @param params + * @return + */ + List listTeacherLessonsTimeDTO(Map params); } diff --git a/src/main/java/cn/com/tenlion/pojo/dtos/teacher/TeacherLessonsTimeDTO.java b/src/main/java/cn/com/tenlion/pojo/dtos/teacher/TeacherLessonsTimeDTO.java new file mode 100644 index 0000000..f3d72b3 --- /dev/null +++ b/src/main/java/cn/com/tenlion/pojo/dtos/teacher/TeacherLessonsTimeDTO.java @@ -0,0 +1,165 @@ +package cn.com.tenlion.pojo.dtos.teacher; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * 讲师DTO + * @author xwangs + * @create 2021-05-02 10:32 + * @description + */ +@ApiModel +public class TeacherLessonsTimeDTO { + + @ApiModelProperty(name = "classPlanId", value = "开班计划ID") + private String classPlanId; + @ApiModelProperty(name = "teacherId", value = "讲师ID") + private String teacherId; + @ApiModelProperty(name = "teacherIdCard", value = "讲师身份证号") + private String teacherIdCard; + @ApiModelProperty(name = "orgId", value = "机构主键") + private String orgId; + @ApiModelProperty(name = "projectCatalogId", value = "培训项目ID") + private String projectCatalogId; + @ApiModelProperty(name = "workerCatalog", value = "工种类别") + private String workerCatalog; + @ApiModelProperty(name = "lessonId", value = "课程ID") + private String lessonId; + @ApiModelProperty(name = "startTime", value = "上课开始时间") + private String startTime; + @ApiModelProperty(name = "startEnd", value = "上课结束时间") + private String startEnd; + @ApiModelProperty(name = "classPlanName", value = "开班计划名称") + private String classPlanName; + @ApiModelProperty(name = "teacherName", value = "讲师名称") + private String teacherName; + @ApiModelProperty(name = "orgName", value = "机构名称") + private String orgName; + @ApiModelProperty(name = "projectCatalogName", value = "培训项目名称") + private String projectCatalogName; + @ApiModelProperty(name = "workerCatalogName", value = "工种名称") + private String workerCatalogName; + @ApiModelProperty(name = "lessonName", value = "课程名称") + private String lessonName; + + public String getClassPlanId() { + return classPlanId == null ? "" : classPlanId; + } + + public void setClassPlanId(String classPlanId) { + this.classPlanId = classPlanId; + } + + public String getTeacherId() { + return teacherId == null ? "" : teacherId; + } + + public void setTeacherId(String teacherId) { + this.teacherId = teacherId; + } + + public String getTeacherIdCard() { + return teacherIdCard == null ? "" : teacherIdCard; + } + + public void setTeacherIdCard(String teacherIdCard) { + this.teacherIdCard = teacherIdCard; + } + + public String getOrgId() { + return orgId == null ? "" : orgId; + } + + public void setOrgId(String orgId) { + this.orgId = orgId; + } + + public String getProjectCatalogId() { + return projectCatalogId == null ? "" : projectCatalogId; + } + + public void setProjectCatalogId(String projectCatalogId) { + this.projectCatalogId = projectCatalogId; + } + + public String getWorkerCatalog() { + return workerCatalog == null ? "" : workerCatalog; + } + + public void setWorkerCatalog(String workerCatalog) { + this.workerCatalog = workerCatalog; + } + + public String getLessonId() { + return lessonId == null ? "" : lessonId; + } + + public void setLessonId(String lessonId) { + this.lessonId = lessonId; + } + + public String getStartTime() { + return startTime == null ? "" : startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getStartEnd() { + return startEnd == null ? "" : startEnd; + } + + public void setStartEnd(String startEnd) { + this.startEnd = startEnd; + } + + public String getClassPlanName() { + return classPlanName == null ? "" : classPlanName; + } + + public void setClassPlanName(String classPlanName) { + this.classPlanName = classPlanName; + } + + public String getTeacherName() { + return teacherName == null ? "" : teacherName; + } + + public void setTeacherName(String teacherName) { + this.teacherName = teacherName; + } + + public String getOrgName() { + return orgName == null ? "" : orgName; + } + + public void setOrgName(String orgName) { + this.orgName = orgName; + } + + public String getProjectCatalogName() { + return projectCatalogName == null ? "" : projectCatalogName; + } + + public void setProjectCatalogName(String projectCatalogName) { + this.projectCatalogName = projectCatalogName; + } + + public String getWorkerCatalogName() { + return workerCatalogName == null ? "" : workerCatalogName; + } + + public void setWorkerCatalogName(String workerCatalogName) { + this.workerCatalogName = workerCatalogName; + } + + public String getLessonName() { + return lessonName == null ? "" : lessonName; + } + + public void setLessonName(String lessonName) { + this.lessonName = lessonName; + } +} diff --git a/src/main/java/cn/com/tenlion/service/classplan/IClassPlanService.java b/src/main/java/cn/com/tenlion/service/classplan/IClassPlanService.java index 2ea89aa..4fa1df5 100644 --- a/src/main/java/cn/com/tenlion/service/classplan/IClassPlanService.java +++ b/src/main/java/cn/com/tenlion/service/classplan/IClassPlanService.java @@ -264,4 +264,11 @@ public interface IClassPlanService { * @return */ SuccessResultList>> listOrgSignInfo(Map params); + + /** + * 机构工种报名情况数量 + * @param params + * @return + */ + Map getSignUserCounts(Map params); } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/service/classplan/impl/ClassPlanServiceImpl.java b/src/main/java/cn/com/tenlion/service/classplan/impl/ClassPlanServiceImpl.java index b2cdb5f..e5c2ebb 100644 --- a/src/main/java/cn/com/tenlion/service/classplan/impl/ClassPlanServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/classplan/impl/ClassPlanServiceImpl.java @@ -13,6 +13,7 @@ import cn.com.tenlion.pojo.dtos.distributioncard.DistributionCardDTO; import cn.com.tenlion.pojo.dtos.examapply.ExamApplyDTO; import cn.com.tenlion.pojo.dtos.examcheck.ExamCheckDTO; import cn.com.tenlion.pojo.dtos.teacher.TeacherDTO; +import cn.com.tenlion.pojo.dtos.teacher.TeacherLessonsTimeDTO; import cn.com.tenlion.pojo.dtos.worktype.WorkTypeDTO; import cn.com.tenlion.pojo.pos.classplan.ClassPlanPO; import cn.com.tenlion.pojo.vos.classplan.ClassPlanVO; @@ -24,7 +25,7 @@ import cn.com.tenlion.service.classplan.IClassPlanService; import cn.com.tenlion.service.examapply.IExamApplyService; import cn.com.tenlion.service.examcheck.IExamCheckService; import cn.com.tenlion.service.examination.distributioncard.IDistributionCardService; -import cn.com.tenlion.service.service.ITeacherService; +import cn.com.tenlion.service.teacher.ITeacherService; import cn.com.tenlion.service.worktype.IWorkTypeService; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; @@ -114,7 +115,15 @@ public class ClassPlanServiceImpl extends DefaultBaseService implements IClassPl } @Override - public void saveJson(JSONObject obj) throws Exception{ + public synchronized void saveJson(JSONObject obj) throws Exception{ + //查询班号是否冲突 + Map query = getHashMap(8); + String planNumber = obj.getString("planNumber"); + query.put("planNumber", planNumber); + ClassPlanDTO byPlanNumberDTO = classPlanDao.get(query); + if(byPlanNumberDTO != null && !"".equals(byPlanNumberDTO.getClassPlanId())){ + throw new SaveException("班号: "+ planNumber + "已存在!"); + } // 校验教师是否存在授课冲突 String planStartTime = obj.getString("planStartTime"); String planEndTime = obj.getString("planEndTime"); @@ -164,14 +173,16 @@ public class ClassPlanServiceImpl extends DefaultBaseService implements IClassPl String lessonEndTime = item.getString("lessonEndTime") + ":00"; // 查询当前教师信息 TeacherDTO teacherDTO = teacher.getById(item.getString("teacherId")); - List> tlList = teacher.listTeacherLessonsTime(teacherDTO.getIdCardNumber()); + query.clear(); + query.put("teacherIdCard",teacherDTO.getIdCardNumber()); + List tlList = teacher.listTeacherLessonsTime(query); if(tlList != null && tlList.size() > 0){ for(String tempDate : dayList){ String sDateTime = tempDate + " " + lessonStartTime; String eDateTime = tempDate + " " + lessonEndTime; - for(Map tlMap : tlList){ - String ssDateTime = tlMap.get("start_time").toString(); - String eeDateTime = tlMap.get("end_time").toString(); + for(TeacherLessonsTimeDTO tlMap : tlList){ + String ssDateTime = tlMap.getStartTime(); + String eeDateTime = tlMap.getStartEnd(); SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); if(sd.parse(eDateTime).getTime() < sd.parse(ssDateTime).getTime() || sd.parse(sDateTime).getTime() > sd.parse(eeDateTime).getTime()){ @@ -621,4 +632,27 @@ public class ClassPlanServiceImpl extends DefaultBaseService implements IClassPl return classPlanDao.countPlanType(parmas); } + @Override + public Map getSignUserCounts(Map params) { + String orgId = params.get("orgId").toString(); + String workerCatalog = params.get("workerCatalog") == null ? "" : params.get("workerCatalog").toString(); + // 查询已报名数量 + Map query = new HashMap<>(8); + Map res = new HashMap<>(); + query.put("applyInstitutionId",orgId); + query.put("applyWorkTypeId",workerCatalog); + List applyAuditStates = new ArrayList<>(); + applyAuditStates.add("0"); + applyAuditStates.add("2"); + query.put("applyAuditStates",applyAuditStates); + List all = applyService.list(query); + res.put("signUpCounts",all.size()); + // 查询已审人员数量 + applyAuditStates.clear(); + applyAuditStates.add("2"); + query.put("applyAuditStates",applyAuditStates); + List pass = applyService.list(query); + res.put("signUpPassCounts",pass.size()); + return res; + } } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/service/service/ITeacherService.java b/src/main/java/cn/com/tenlion/service/teacher/ITeacherService.java similarity index 86% rename from src/main/java/cn/com/tenlion/service/service/ITeacherService.java rename to src/main/java/cn/com/tenlion/service/teacher/ITeacherService.java index dbf4978..c9334e6 100644 --- a/src/main/java/cn/com/tenlion/service/service/ITeacherService.java +++ b/src/main/java/cn/com/tenlion/service/teacher/ITeacherService.java @@ -1,7 +1,8 @@ -package cn.com.tenlion.service.service; +package cn.com.tenlion.service.teacher; import cn.com.tenlion.institutionmanagement.pojo.dtos.institution.InstitutionDTO; import cn.com.tenlion.pojo.dtos.teacher.TeacherDTO; +import cn.com.tenlion.pojo.dtos.teacher.TeacherLessonsTimeDTO; import cn.com.tenlion.pojo.vos.teacher.TeacherVO; import ink.wgink.exceptions.RemoveException; import ink.wgink.exceptions.SearchException; @@ -91,16 +92,17 @@ public interface ITeacherService { */ Map count(String orgId); - /** - * 根据身份证查询教师授课记录 - * @param idCardNumber - * @return - */ - List> listTeacherLessonsTime(String idCardNumber); - /** * 保存讲师授课时间记录 * @param params */ void saveTeacherLessonsTime(Map params); + + /** + * 查询讲师授课情况列表接口 + * @param params + * @classPlanId 查询参数:开班计划ID + * @return List + */ + List listTeacherLessonsTime(Map params); } diff --git a/src/main/java/cn/com/tenlion/service/service/impl/TeacherServiceImpl.java b/src/main/java/cn/com/tenlion/service/teacher/impl/TeacherServiceImpl.java similarity index 69% rename from src/main/java/cn/com/tenlion/service/service/impl/TeacherServiceImpl.java rename to src/main/java/cn/com/tenlion/service/teacher/impl/TeacherServiceImpl.java index 7b9a36c..75313d6 100644 --- a/src/main/java/cn/com/tenlion/service/service/impl/TeacherServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/teacher/impl/TeacherServiceImpl.java @@ -1,11 +1,19 @@ -package cn.com.tenlion.service.service.impl; +package cn.com.tenlion.service.teacher.impl; import cn.com.tenlion.dao.teacher.ITeacherDao; import cn.com.tenlion.institutionmanagement.pojo.dtos.institution.InstitutionDTO; +import cn.com.tenlion.institutionmanagement.service.institution.IInstitutionService; +import cn.com.tenlion.pojo.dtos.classplan.ClassPlanDTO; +import cn.com.tenlion.pojo.dtos.lessons.LessonsDTO; import cn.com.tenlion.pojo.dtos.teacher.TeacherDTO; +import cn.com.tenlion.pojo.dtos.teacher.TeacherLessonsTimeDTO; +import cn.com.tenlion.pojo.dtos.worktype.WorkTypeDTO; import cn.com.tenlion.pojo.vos.teacher.TeacherVO; -import cn.com.tenlion.service.service.ITeacherService; +import cn.com.tenlion.service.classplan.IClassPlanService; +import cn.com.tenlion.service.lessons.ILessonsService; +import cn.com.tenlion.service.teacher.ITeacherService; import cn.com.tenlion.service.traininginstitutionuser.ITrainingInstitutionUserService; +import cn.com.tenlion.service.worktype.IWorkTypeService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import ink.wgink.common.base.DefaultBaseService; @@ -44,6 +52,15 @@ public class TeacherServiceImpl extends DefaultBaseService implements ITeacherSe private ITrainingInstitutionUserService trainingInstitutionUserService; @Autowired private IDataService dataService; + @Autowired + private IInstitutionService iInstitutionService; + @Autowired + private IClassPlanService classPlanService; + @Autowired + private IWorkTypeService workTypeService; + @Autowired + private ILessonsService lessonsService; + @Override public SuccessResultList> listPage(ListPage page) throws SearchException { @@ -130,11 +147,6 @@ public class TeacherServiceImpl extends DefaultBaseService implements ITeacherSe return institutionDTO; } - @Override - public List> listTeacherLessonsTime(String idCardNumber) { - return teacherDao.listTeacherLessonsTime(idCardNumber); - } - @Override public void saveTeacherLessonsTime(Map params) { teacherDao.saveTeacherLessonsTime(params); @@ -145,4 +157,31 @@ public class TeacherServiceImpl extends DefaultBaseService implements ITeacherSe params.put("orgId",orgId); return teacherDao.count(params); } + + @Override + public List listTeacherLessonsTime(Map params) { + List list = teacherDao.listTeacherLessonsTimeDTO(params); + for(TeacherLessonsTimeDTO item : list){ + // 查询考试机构名称 + InstitutionDTO institutionDTO = iInstitutionService.get(item.getOrgId()); + item.setOrgName(institutionDTO.getInstitutionName()); + // 查询讲师名称 + TeacherDTO byId = getById(item.getTeacherId()); + item.setTeacherName(byId.getTeacherName()); + item.setTeacherIdCard(byId.getIdCardNumber()); + // 查询开班计划名称 + ClassPlanDTO classPlanDTO = classPlanService.get(item.getClassPlanId()); + item.setClassPlanName(classPlanDTO.getPlanName()); + // 查询培训项目 + DataDTO dataDTO = dataService.get(item.getProjectCatalogId()); + item.setProjectCatalogName(dataDTO.getDataName()); + // 查询课程 + LessonsDTO lessonsDTO = lessonsService.get(item.getLessonId()); + item.setLessonName(lessonsDTO.getLessonName()); + // 查询工种 + WorkTypeDTO workTypeDTO = workTypeService.get(item.getWorkerCatalog()); + item.setWorkerCatalogName(workTypeDTO.getWorkTypeName()); + } + return list; + } } diff --git a/src/main/resources/mybatis/mapper/classplan/class-plan-mapper.xml b/src/main/resources/mybatis/mapper/classplan/class-plan-mapper.xml index 06ee5e7..b114712 100644 --- a/src/main/resources/mybatis/mapper/classplan/class-plan-mapper.xml +++ b/src/main/resources/mybatis/mapper/classplan/class-plan-mapper.xml @@ -208,10 +208,12 @@ e_class_plan t1 WHERE 1 = 1 - - AND - t1.class_plan_id = #{classPlanId} - + + AND t1.class_plan_id = #{classPlanId} + + + AND t1.plan_number = #{planNumber} + diff --git a/src/main/resources/mybatis/mapper/teacher/teacher-mapper.xml b/src/main/resources/mybatis/mapper/teacher/teacher-mapper.xml index 82ecf34..92a1bce 100644 --- a/src/main/resources/mybatis/mapper/teacher/teacher-mapper.xml +++ b/src/main/resources/mybatis/mapper/teacher/teacher-mapper.xml @@ -212,12 +212,17 @@ WHERE is_delete = 0 AND org_id = #{orgId} - + + + + + + + + + + + INSERT INTO e_teach_lessons_time ( @@ -227,4 +232,15 @@ ) + \ No newline at end of file diff --git a/src/main/resources/static/route/classplan/list-signup.html b/src/main/resources/static/route/classplan/list-signup.html index 3b4d7ed..ff7ed9c 100644 --- a/src/main/resources/static/route/classplan/list-signup.html +++ b/src/main/resources/static/route/classplan/list-signup.html @@ -19,11 +19,11 @@
- +
@@ -71,7 +71,7 @@ -
@@ -99,14 +99,6 @@ var tableUrl = 'api/apply/listpage'; var orgId = ''; var workerCatalog = top.restAjax.params(window.location.href).workerCatalog; - if(typeof (workerCatalog) === 'undefined' || workerCatalog == ''){ - $('#totalSignUpUser').text('总计人数'); - $('#totalSignUpUserNumber').text('50 人'); - $('#class-plan-btn-event').hide(); - } else { - $('#totalSignUpUser').text('预计人数'); - $('#totalSignUpUserNumber').text('60 人'); - } function init(){ getOrgInfo(); @@ -114,6 +106,7 @@ } init(); + // 校验是否可以开班 function getExamCheckType(){ var loadIndex = layer.load(1); top.restAjax.get(top.restAjax.path('api/classplan/get-exam-check-type', []), @@ -129,6 +122,7 @@ }); } + // 查询机构信息 function getOrgInfo(){ top.restAjax.get(top.restAjax.path('api/teacher/getorginfo', []), {}, null, function (code, data) { orgId = data.institutionId; @@ -136,6 +130,30 @@ initTable(); $('#listContent').attr('src', top.restAjax.path('route/classplan/list-signup.html?orgId={arg1}&workerCatalog={arg2}', [orgId,''])); + if(typeof (orgId) != 'undefined' && orgId != ''){ + getSignUserCounts(); + } + }, function (code, data) { + top.dialog.msg(data.msg); + }); + } + + //查询人员数量 + function getSignUserCounts(){ + top.restAjax.get(top.restAjax.path('api/classplan/get-sign-user-counts', []), + {orgId : orgId,workerCatalog : workerCatalog}, null, function (code, data) { + var signUpCounts = data.signUpCounts; + var signUpPassCounts = data.signUpPassCounts; + $('#signUpCounts').html(signUpCounts + " 人"); + $('#signUpPassCounts').html(signUpPassCounts + " 人"); + if(typeof (workerCatalog) === 'undefined' || workerCatalog == ''){ + $('#totalSignUpUser').text('总计人数'); + $('#totalSignUpUserNumber').text(signUpCounts + signUpPassCounts + ' 人'); + } else { + $('#totalSignUpUser').text('预计人数'); + $('#totalSignUpUserNumber').text('50 人'); + $('#class-plan-btn-event').show(); + } }, function (code, data) { top.dialog.msg(data.msg); }); diff --git a/src/main/resources/static/route/classplan/save-report-exam.html b/src/main/resources/static/route/classplan/save-report-exam.html deleted file mode 100644 index cfd7f89..0000000 --- a/src/main/resources/static/route/classplan/save-report-exam.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - - - - - - - - - -
-
-
-
- -
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
- -
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/src/main/resources/static/route/classplan/save.html b/src/main/resources/static/route/classplan/save.html index 7e14324..e410ddc 100644 --- a/src/main/resources/static/route/classplan/save.html +++ b/src/main/resources/static/route/classplan/save.html @@ -333,15 +333,16 @@ //校验所有时间是否合法 var checkedList = $('input[name="lessonCheckBox"]:checked'); var checkPass = true; - if(checkedList.length -1 != 0){ + if((checkedList.length -1) != 0){ $.each(checkedList,function(i,e){ var tempLessonId = $(e).attr('data-lesson-id'); + var tempTeacherId = $('#select-' + tempLessonId).val(); var _tempStart = '1970-12-12 ' + $('#date-start-' + tempLessonId).val() + ':00'; var _tempEnd = '1970-12-12 ' + $('#date-end-' + tempLessonId).val() + ':00'; if((verifyDate(dateEndTime, _tempStart) == -1) || (verifyDate(dateStartTime, _tempEnd) == 1)){ checkPass = true; - } else if( tempLessonId != lessonId){ + } else if( tempLessonId != lessonId && tempTeacherId == teacherId){ data.elem.checked = false; layer.msg('课程时间存在冲突'); form.render(); diff --git a/src/main/resources/static/route/classplan/show-report-exam.html b/src/main/resources/static/route/classplan/show-report-exam.html deleted file mode 100644 index 1c05eca..0000000 --- a/src/main/resources/static/route/classplan/show-report-exam.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - - - - - - - -
-
-
-
- -
- -
- -
-
-
-
- -
- -
-
-
- -
- -
-
-
-
-
- -
- -
-
-
- -
- -
-
-
-
参考人员
-
-
- - - - - - - - - - - - -
姓名性别证件号码联系方式准考证
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/src/main/resources/static/route/classplan/update-report-exam.html b/src/main/resources/static/route/classplan/update-report-exam.html deleted file mode 100644 index 0598570..0000000 --- a/src/main/resources/static/route/classplan/update-report-exam.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - - - - - - - - -
-
-
-
- - -
- -
- -
-
-
- -
- -
-
-
- -
- -
-
- -
-
-
-
- - - - - \ No newline at end of file