添加查询讲师授课记录
This commit is contained in:
parent
fa77fe05b7
commit
65a68e3ad5
@ -196,4 +196,15 @@ public class ClassPlanController extends DefaultBaseController {
|
||||
Map<String, Object> 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<String, Object> getSignUserCounts() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return classPlanService.getSignUserCounts(params);
|
||||
}
|
||||
}
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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<String, Object> params);
|
||||
|
||||
/**
|
||||
* 查询讲师授课情况列表接口
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<TeacherLessonsTimeDTO> listTeacherLessonsTimeDTO(Map<String, Object> params);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
@ -264,4 +264,11 @@ public interface IClassPlanService {
|
||||
* @return
|
||||
*/
|
||||
SuccessResultList<List<Map<String, Object>>> listOrgSignInfo(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 机构工种报名情况数量
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> getSignUserCounts(Map<String, Object> params);
|
||||
}
|
@ -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<String, Object> 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<Map<String, Object>> tlList = teacher.listTeacherLessonsTime(teacherDTO.getIdCardNumber());
|
||||
query.clear();
|
||||
query.put("teacherIdCard",teacherDTO.getIdCardNumber());
|
||||
List<TeacherLessonsTimeDTO> tlList = teacher.listTeacherLessonsTime(query);
|
||||
if(tlList != null && tlList.size() > 0){
|
||||
for(String tempDate : dayList){
|
||||
String sDateTime = tempDate + " " + lessonStartTime;
|
||||
String eDateTime = tempDate + " " + lessonEndTime;
|
||||
for(Map<String,Object> 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<String, Object> getSignUserCounts(Map<String, Object> params) {
|
||||
String orgId = params.get("orgId").toString();
|
||||
String workerCatalog = params.get("workerCatalog") == null ? "" : params.get("workerCatalog").toString();
|
||||
// 查询已报名数量
|
||||
Map<String, Object> query = new HashMap<>(8);
|
||||
Map<String, Object> res = new HashMap<>();
|
||||
query.put("applyInstitutionId",orgId);
|
||||
query.put("applyWorkTypeId",workerCatalog);
|
||||
List<String> applyAuditStates = new ArrayList<>();
|
||||
applyAuditStates.add("0");
|
||||
applyAuditStates.add("2");
|
||||
query.put("applyAuditStates",applyAuditStates);
|
||||
List<ApplyDTO> all = applyService.list(query);
|
||||
res.put("signUpCounts",all.size());
|
||||
// 查询已审人员数量
|
||||
applyAuditStates.clear();
|
||||
applyAuditStates.add("2");
|
||||
query.put("applyAuditStates",applyAuditStates);
|
||||
List<ApplyDTO> pass = applyService.list(query);
|
||||
res.put("signUpPassCounts",pass.size());
|
||||
return res;
|
||||
}
|
||||
}
|
@ -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<String, Object> count(String orgId);
|
||||
|
||||
/**
|
||||
* 根据身份证查询教师授课记录
|
||||
* @param idCardNumber
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> listTeacherLessonsTime(String idCardNumber);
|
||||
|
||||
/**
|
||||
* 保存讲师授课时间记录
|
||||
* @param params
|
||||
*/
|
||||
void saveTeacherLessonsTime(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 查询讲师授课情况列表接口
|
||||
* @param params
|
||||
* @classPlanId 查询参数:开班计划ID
|
||||
* @return List<TeacherLessonsTimeDTO>
|
||||
*/
|
||||
List<TeacherLessonsTimeDTO> listTeacherLessonsTime(Map<String, Object> params);
|
||||
}
|
@ -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<List<TeacherDTO>> listPage(ListPage page) throws SearchException {
|
||||
@ -130,11 +147,6 @@ public class TeacherServiceImpl extends DefaultBaseService implements ITeacherSe
|
||||
return institutionDTO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> listTeacherLessonsTime(String idCardNumber) {
|
||||
return teacherDao.listTeacherLessonsTime(idCardNumber);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveTeacherLessonsTime(Map<String, Object> 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<TeacherLessonsTimeDTO> listTeacherLessonsTime(Map<String, Object> params) {
|
||||
List<TeacherLessonsTimeDTO> 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;
|
||||
}
|
||||
}
|
@ -208,10 +208,12 @@
|
||||
e_class_plan t1
|
||||
WHERE
|
||||
1 = 1
|
||||
<if test="classPlanId != null and classPlanId != ''">
|
||||
AND
|
||||
t1.class_plan_id = #{classPlanId}
|
||||
</if>
|
||||
<if test="classPlanId != null and classPlanId != ''">
|
||||
AND t1.class_plan_id = #{classPlanId}
|
||||
</if>
|
||||
<if test="planNumber != null and planNumber != ''">
|
||||
AND t1.plan_number = #{planNumber}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 详情 -->
|
||||
|
@ -212,12 +212,17 @@
|
||||
WHERE is_delete = 0 AND org_id = #{orgId}
|
||||
</select>
|
||||
|
||||
<select id="listTeacherLessonsTime" parameterType="string" resultType="map">
|
||||
select * from e_teach_lessons_time
|
||||
where
|
||||
teacher_id_card = #{string}
|
||||
AND is_delete = '0';
|
||||
</select>
|
||||
<resultMap id="teacherLessonsTimeDTO" type="cn.com.tenlion.pojo.dtos.teacher.TeacherLessonsTimeDTO">
|
||||
<result column="class_plan_id" property="classPlanId"/>
|
||||
<result column="teacher_id" property="teacherId"/>
|
||||
<result column="teacher_id_card" property="teacherIdCard"/>
|
||||
<result column="org_id" property="orgId"/>
|
||||
<result column="project_catalog_id" property="projectCatalogId"/>
|
||||
<result column="worker_catalog" property="workerCatalog"/>
|
||||
<result column="lesson_id" property="lessonId"/>
|
||||
<result column="start_time" property="startTime"/>
|
||||
<result column="end_time" property="startEnd"/>
|
||||
</resultMap>
|
||||
|
||||
<insert id="saveTeacherLessonsTime" parameterType="map">
|
||||
INSERT INTO e_teach_lessons_time (
|
||||
@ -227,4 +232,15 @@
|
||||
)
|
||||
</insert>
|
||||
|
||||
<select id="listTeacherLessonsTimeDTO" parameterType="map" resultMap="teacherLessonsTimeDTO">
|
||||
select * from e_teach_lessons_time
|
||||
where
|
||||
is_delete = '0'
|
||||
<if test="classPlanId != null and classPlanId != ''">
|
||||
AND class_plan_id = #{classPlanId}
|
||||
</if>
|
||||
<if test="teacherIdCard != null and teacherIdCard != ''">
|
||||
AND teacher_id_card = #{teacherIdCard}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
@ -19,11 +19,11 @@
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-row layui-col-space10">
|
||||
<!--<div class="layui-col-md4 layui-col-xs4">
|
||||
<div class="layui-col-md4 layui-col-xs4">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header" style="background-color: #d7dee2">
|
||||
已报人员数量
|
||||
<span class="layui-badge layui-bg-blue layuiadmin-badge">5 人</span>
|
||||
<span id="signUpCounts" class="layui-badge layui-bg-blue layuiadmin-badge">0 人</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -31,7 +31,7 @@
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header" style="background-color: #d7dee2">
|
||||
已审人员数量
|
||||
<span class="layui-badge layui-bg-green layuiadmin-badge">5 人</span>
|
||||
<span id="signUpPassCounts" class="layui-badge layui-bg-green layuiadmin-badge">0 人</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -39,10 +39,10 @@
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header" style="background-color: #d7dee2">
|
||||
<span id="totalSignUpUser">总计人数</span>
|
||||
<span id="totalSignUpUserNumber" class="layui-badge layui-bg-cyan layuiadmin-badge">50 人</span>
|
||||
<span id="totalSignUpUserNumber" class="layui-badge layui-bg-cyan layuiadmin-badge">- 人</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
|
||||
<div class="layui-inline">
|
||||
@ -71,7 +71,7 @@
|
||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-search"></i> 搜索
|
||||
</button>
|
||||
<button type="button" id="class-plan-btn-event" class="layui-btn layui-btn-sm layui-btn-normal">
|
||||
<button type="button" id="class-plan-btn-event" class="layui-btn layui-btn-sm layui-btn-normal" style="display: none;">
|
||||
<i class="layui-icon"></i>开班
|
||||
</button>
|
||||
</div>
|
||||
@ -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);
|
||||
});
|
||||
|
@ -1,137 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<base href="/signup/">
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-anim layui-anim-fadein">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<input type="hidden" id="orgId" name="orgId">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label" style="width: 160px;">选择考试类型</label>
|
||||
<div class="layui-input-block" style="margin-left: 160px;">
|
||||
<select id="examType" name="examType" lay-verify="required">
|
||||
<option value="1">理论考试</option>
|
||||
<option value="2">实操考试</option>
|
||||
<option value="3">理论与实操</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label" style="width: 160px;"><span style="color: red">*</span>预计考试时间始</label>
|
||||
<div class="layui-input-block" style="margin-left: 160px;">
|
||||
<input type="text" id="estimateStart" name="estimateStart" class="layui-input" value="" placeholder="请选择预计考试开始时间" readonly style="cursor: pointer;" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label" style="width: 160px;"><span style="color: red">*</span>预计考试时间止</label>
|
||||
<div class="layui-input-block" style="margin-left: 160px;">
|
||||
<input type="text" id="estimateEnd" name="estimateEnd" class="layui-input" value="" placeholder="请选择预计考试结束时间" readonly style="cursor: pointer;" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-footer" style="left: 0;">
|
||||
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交申请</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
|
||||
var $ = layui.$;
|
||||
var $win = $(window);
|
||||
var form = layui.form;
|
||||
var laytpl = layui.laytpl;
|
||||
var laydate = layui.laydate;
|
||||
var classPlanId = top.restAjax.params(window.location.href).classPlanId;
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
$('.layui-card').height($win.height());
|
||||
laydate.render({
|
||||
elem: '#estimateStart',
|
||||
format: 'yyyy-MM-dd',
|
||||
trigger : 'click'
|
||||
});
|
||||
laydate.render({
|
||||
elem: '#estimateEnd',
|
||||
format: 'yyyy-MM-dd',
|
||||
trigger : 'click'
|
||||
});
|
||||
}
|
||||
initData();
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
// 校验时间
|
||||
if(verifyDate(formData.field['estimateStart'],formData.field['estimateEnd']) == 1){
|
||||
layer.msg('预计考试开始时间不能大于结束时间');
|
||||
return;
|
||||
}
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
top.restAjax.put(top.restAjax.path('api/classplan/update-exam/{classPlanId}', [classPlanId]), formData.field, null, function(code, data) {
|
||||
top.dialog.msg("提交成功");
|
||||
closeBox();
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
function verifyDate(value1,value2){
|
||||
var v1 = new Date(Date.parse(value1.replace(/-/g,"/"))).getTime();
|
||||
var v2 = new Date(Date.parse(value2.replace(/-/g,"/"))).getTime();
|
||||
if( v1 < v2){
|
||||
return -1;
|
||||
}
|
||||
if( v1 == v2){
|
||||
return 0;
|
||||
}
|
||||
if( v1 > v2){
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
$('.close').on('click', function() {
|
||||
closeBox();
|
||||
});
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
// 校验
|
||||
form.verify({
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</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();
|
||||
|
@ -1,195 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<base href="/signup/">
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-anim layui-anim-fadein">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<input type="hidden" id="orgId" name="orgId">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label" style="width: 160px;">考试类型</label>
|
||||
<div class="layui-input-block" style="margin-left: 160px;">
|
||||
<input type="text" class="layui-input" id="examTypeName" name="examTypeName" value="" readonly="readonly">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row theory-exam-div">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label" style="width: 160px;">理论考试时间</label>
|
||||
<div class="layui-input-block" style="margin-left: 160px;">
|
||||
<input type="text" id="theoryExam" name="theoryExam" class="layui-input" value="" readonly style="cursor: pointer;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label" style="width: 160px;">理论考试地点</label>
|
||||
<div class="layui-input-block" style="margin-left: 160px;">
|
||||
<input type="text" id="theoryExamAddr" name="theoryExamAddr" class="layui-input" value="" readonly style="cursor: pointer;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row practice-exam-div">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label" style="width: 160px;">实操考试时间</label>
|
||||
<div class="layui-input-block" style="margin-left: 160px;">
|
||||
<input type="text" id="practiceExam" name="practiceExam" class="layui-input" value="" readonly style="cursor: pointer;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label" style="width: 160px;">实操考试地点</label>
|
||||
<div class="layui-input-block" style="margin-left: 160px;">
|
||||
<input type="text" id="practiceExamAddr" name="practiceExamAddr" class="layui-input" value="" readonly style="cursor: pointer;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<blockquote id="report-reason-block" class="layui-elem-quote" style="border-left: 5px solid #51cc2e;">参考人员</blockquote>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md12">
|
||||
<table class="layui-table" id="dataTable" lay-filter="dataTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 80px; text-align: center"><b>姓名</b></th>
|
||||
<th style="width: 80px; text-align: center"><b>性别</b></th>
|
||||
<th style="width: 120px; text-align: center"><b>证件号码</b></th>
|
||||
<th style="width: 120px; text-align: center"><b>联系方式</b></th>
|
||||
<th style="width: 120px; text-align: center"><b>准考证</b></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="examUserTemplateBox"></tbody>
|
||||
<script type="text/html" id="examUserTemplate">
|
||||
{{# if(d.length == 0){ }}
|
||||
<tr style="text-align: center">
|
||||
<td>没有查询到参考人员信息</td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<tr>
|
||||
<td style="text-align: center">{{item.applyName}}</td>
|
||||
<td style="text-align: center">{{item.applySexName}}</td>
|
||||
<td style="text-align: center">{{item.applyCardNumber}}</td>
|
||||
<td style="text-align: center">{{item.applyPhone}}</td>
|
||||
<td style="text-align: center"><img src="{{item.distributionCardCode}}"></td>
|
||||
</tr>
|
||||
{{# } }}
|
||||
</script>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
|
||||
var $ = layui.$;
|
||||
var $win = $(window);
|
||||
var form = layui.form;
|
||||
var laytpl = layui.laytpl;
|
||||
var laydate = layui.laydate;
|
||||
var classPlanId = top.restAjax.params(window.location.href).classPlanId;
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
top.restAjax.get(top.restAjax.path('api/classplan/get-report-exam-detail/{classPlanId}', [classPlanId]), {}, null, function(code, data) {
|
||||
var dataFormData = {};
|
||||
for(var i in data) {
|
||||
dataFormData[i] = data[i] +'';
|
||||
}
|
||||
var examType = dataFormData['examType'];
|
||||
if(examType == '1'){
|
||||
dataFormData['examTypeName'] = '理论考试';
|
||||
$('.practice-exam-div').hide();
|
||||
}
|
||||
if(examType == '2'){
|
||||
dataFormData['examTypeName'] = '实操考试';
|
||||
$('.theory-exam-div').hide();
|
||||
}
|
||||
if(examType == '3'){
|
||||
dataFormData['examTypeName'] = '理论与实操考试';
|
||||
}
|
||||
dataFormData['theoryExam'] = dataFormData['theoryExamStartTime'] + ' 至 ' + dataFormData['theoryExamEndTime'];
|
||||
dataFormData['theoryExamAddr'] = dataFormData['theoryExamAddress'];
|
||||
dataFormData['practiceExam'] = dataFormData['practiceExamStartTime'] + ' 至 ' + dataFormData['practiceExamEndTime'];
|
||||
dataFormData['practiceExamAddr'] = dataFormData['practiceExamAddress'];
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
$('.layui-card').height($win.height())
|
||||
}
|
||||
initData();
|
||||
|
||||
//初始化参考人员列表
|
||||
function initExamUser(){
|
||||
top.restAjax.get(top.restAjax.path('api/classplan/list-exam-user/{classPlanId}', [classPlanId]), {}, null, function(code, data) {
|
||||
laytpl(document.getElementById('examUserTemplate').innerHTML).render(data, function(html) {
|
||||
document.getElementById('examUserTemplateBox').innerHTML = html;
|
||||
});
|
||||
form.render();
|
||||
new Viewer(document.getElementById('dataTable'),{loop:true});
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
initExamUser();
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
top.restAjax.put(top.restAjax.path('api/classplan/update-exam/{classPlanId}', [classPlanId]), formData.field, null, function(code, data) {
|
||||
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
||||
time: 0,
|
||||
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||
shade: 0.3,
|
||||
yes: function(index) {
|
||||
top.dialog.close(index);
|
||||
window.location.reload();
|
||||
},
|
||||
btn2: function() {
|
||||
closeBox();
|
||||
}
|
||||
});
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.close').on('click', function() {
|
||||
closeBox();
|
||||
});
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
// 校验
|
||||
form.verify({
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -1,164 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<base href="/signup/">
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-anim layui-anim-fadein">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<blockquote id="reason-block" class="layui-elem-quote" style="border-left: 5px solid #cc0200;display: none;"></blockquote>
|
||||
<input type="hidden" id="orgId" name="orgId">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label" style="width: 160px;">选择考试类型</label>
|
||||
<div class="layui-input-block" style="margin-left: 160px;">
|
||||
<select id="examType" name="examType" lay-verify="required">
|
||||
<option value="1">理论考试</option>
|
||||
<option value="2">实操考试</option>
|
||||
<option value="3">理论与实操</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label" style="width: 160px;"><span style="color: red">*</span>预计考试时间始</label>
|
||||
<div class="layui-input-block" style="margin-left: 160px;">
|
||||
<input type="text" id="estimateStart" name="estimateStart" class="layui-input" value="" placeholder="请选择预计考试开始时间" readonly style="cursor: pointer;" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label" style="width: 160px;"><span style="color: red">*</span>预计考试时间止</label>
|
||||
<div class="layui-input-block" style="margin-left: 160px;">
|
||||
<input type="text" id="estimateEnd" name="estimateEnd" class="layui-input" value="" placeholder="请选择预计考试结束时间" readonly style="cursor: pointer;" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-layout-admin" id="submit-div" style="display: none;">
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-footer" style="left: 0;">
|
||||
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">重新提交</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
|
||||
var $ = layui.$;
|
||||
var $win = $(window);
|
||||
var form = layui.form;
|
||||
var laytpl = layui.laytpl;
|
||||
var laydate = layui.laydate;
|
||||
var classPlanId = top.restAjax.params(window.location.href).classPlanId;
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
top.restAjax.get(top.restAjax.path('api/classplan/get-report-exam-detail/{classPlanId}', [classPlanId]), {}, null, function(code, data) {
|
||||
var dataFormData = {};
|
||||
for(var i in data) {
|
||||
dataFormData[i] = data[i] +'';
|
||||
}
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
var estimateStart = dataFormData['theoryExamStartTime'];
|
||||
var estimateEnd = dataFormData['theoryExamEndTime'];
|
||||
laydate.render({
|
||||
elem: '#estimateStart',
|
||||
format: 'yyyy-MM-dd',
|
||||
trigger: 'click',
|
||||
value : estimateStart.substring(0,10)
|
||||
});
|
||||
laydate.render({
|
||||
elem: '#estimateEnd',
|
||||
format: 'yyyy-MM-dd',
|
||||
trigger: 'click',
|
||||
value : estimateEnd.substring(0,10)
|
||||
});
|
||||
//判断审核状态0审核中
|
||||
if(dataFormData['checkStatus'] == '0'){
|
||||
$('#reason-block').text('审核中.....');
|
||||
$('#reason-block').show();
|
||||
}
|
||||
//判断审核状态2审核不通过
|
||||
if(dataFormData['checkStatus'] == '2'){
|
||||
$('#submit-div').show();
|
||||
$('#reason-block').text('未通过原因:' + dataFormData['reason']);
|
||||
$('#reason-block').show();
|
||||
}
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
|
||||
$('.layui-card').height($win.height());
|
||||
}
|
||||
initData();
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
// 校验时间
|
||||
if(verifyDate(formData.field['estimateStart'],formData.field['estimateEnd']) == 1){
|
||||
layer.msg('预计考试开始时间不能大于结束时间');
|
||||
return;
|
||||
}
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
top.restAjax.put(top.restAjax.path('api/classplan/update-exam/{classPlanId}', [classPlanId]), formData.field, null, function(code, data) {
|
||||
top.dialog.msg("提交成功");
|
||||
closeBox();
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.close').on('click', function() {
|
||||
closeBox();
|
||||
});
|
||||
|
||||
function verifyDate(value1,value2){
|
||||
var v1 = new Date(Date.parse(value1.replace(/-/g,"/"))).getTime();
|
||||
var v2 = new Date(Date.parse(value2.replace(/-/g,"/"))).getTime();
|
||||
if( v1 < v2){
|
||||
return -1;
|
||||
}
|
||||
if( v1 == v2){
|
||||
return 0;
|
||||
}
|
||||
if( v1 > v2){
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
// 校验
|
||||
form.verify({
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user