个人中心功能对接

This commit is contained in:
wans 2021-06-23 09:50:12 +08:00
parent 36f9d2caa6
commit 2ba1dffa2f
15 changed files with 302 additions and 101 deletions

View File

@ -4,13 +4,12 @@ import cn.com.tenlion.dao.classplan.IClassPlanDao;
import cn.com.tenlion.pojo.dtos.appraise.OrgAppraiseDTO;
import cn.com.tenlion.pojo.dtos.appraise.TeacherAppraiseDTO;
import cn.com.tenlion.service.appraise.IAppraiseService;
import com.alibaba.fastjson.JSONObject;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.exceptions.SaveException;
import ink.wgink.exceptions.SearchException;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.result.ErrorResult;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.util.map.HashMapUtil;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -65,9 +64,8 @@ public class OrgAppraiseAppController extends DefaultBaseController {
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save-teacher-appraise")
public SuccessResult saveTeacherAppraise(@RequestHeader("token") String token,
@RequestBody TeacherAppraiseDTO teacherAppraiseDTO) throws SaveException {
Map<String, Object> params = HashMapUtil.beanToMap(teacherAppraiseDTO);
//appraiseDao.saveTeacherAppraise(params);
@RequestBody JSONObject appraiseObj) throws SaveException {
appraiseService.saveTeacherAppraise(token, appraiseObj);
return new SuccessResult();
}
@ -76,29 +74,11 @@ public class OrgAppraiseAppController extends DefaultBaseController {
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("get-teacher-appraise")
public TeacherAppraiseDTO getTeacherAppraise(@RequestHeader("token") String token) {
@GetMapping("list-teacher-appraise")
public List<TeacherAppraiseDTO> getTeacherAppraise(@RequestHeader("token") String token) {
Map<String, Object> params = requestParams();
/*TeacherAppraiseDTO dto = appraiseDao.getTeacherAppraise(params);
return dto == null ? new TeacherAppraiseDTO() : dto;*/
return new TeacherAppraiseDTO();
}
@ApiOperation(value = "查询培训计划的授课讲师", notes = "查询个人资料信息接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("list-plan-teacher")
public List<Map<String, Object>> listPlanTeacher(@RequestHeader("token") String token){
Map<String, Object> params = requestParams();
if(params.get("classPlanId") == null
|| params.get("classPlanId").toString().length() == 0){
throw new SearchException("classPlanId参数缺失,查询失败");
}
String classPlanId = params.get("classPlanId").toString();
List<Map<String, Object>> list = classPlanDao.listClassPlanLessons(classPlanId);
return list;
List<TeacherAppraiseDTO> dto = appraiseService.getTeacherAppraise(token,params);
return dto;
}
}

View File

@ -1,8 +1,8 @@
package cn.com.tenlion.controller.app.api.basicuserinfo;
import cn.com.tenlion.pojo.dtos.basicuserinfo.BasicUserInfoDTO;
import cn.com.tenlion.pojo.dtos.myexam.MyExamDTO;
import cn.com.tenlion.service.basicuserinfo.IBasicUserInfoService;
import cn.com.tenlion.service.classplan.IClassPlanService;
import cn.com.tenlion.service.myexamforapp.IMyExamForAppService;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.exceptions.SaveException;
@ -33,6 +33,8 @@ public class BasicUserInfoAppController extends DefaultBaseController {
private IMyExamForAppService myExamForAppService;
@Autowired
private IBasicUserInfoService basicUserInfoService;
@Autowired
private IClassPlanService classPlanService;
@ApiOperation(value = "查询个人资料信息", notes = "查询个人资料信息接口")
@ApiImplicitParams({
@ -62,9 +64,21 @@ public class BasicUserInfoAppController extends DefaultBaseController {
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("list-my-exam")
public List<MyExamDTO> listMyExam(@RequestHeader("token") String token) throws SaveException {
public List<Map<String, Object>> listMyExam(@RequestHeader("token") String token) throws SaveException {
Map<String,Object> params = requestParams();
List<MyExamDTO> list = myExamForAppService.listMyExam(token,params);
List<Map<String, Object>> list = myExamForAppService.listMyExam(token,params);
return list;
}
@ApiOperation(value = "查询我的培训", notes = "查询我的培训")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("list-my-class-plan")
public List<Map<String, Object>> listMyClassPlan(@RequestHeader("token") String token) throws SaveException {
Map<String,Object> params = requestParams();
List<Map<String, Object>> list = classPlanService.listMyClassPlan(token,params);
return list;
}

View File

@ -40,4 +40,16 @@ public interface IAppraiseDao {
* @return
*/
TeacherAppraiseDTO getTeacherAppraise(Map<String, Object> params);
/**
* 删除用户机构评价
* @param params
*/
void deleteOrgAppraise(Map<String, Object> params);
/**
* 删除讲师评价
* @param params
*/
void deleteTeacherAppraise(Map<String, Object> params);
}

View File

@ -95,6 +95,10 @@ public class ApplyDTO {
private Integer applyUserNum2;
@ApiModelProperty(name = "applyUserNum3", value = "已通过审核人数")
private Integer applyUserNum3;
@ApiModelProperty(name = "orgCharge", value = "机构负责人")
private String orgCharge;
@ApiModelProperty(name = "orgTel", value = "机构联系方式")
private String orgTel;
@ -388,4 +392,20 @@ public class ApplyDTO {
public void setApplyUserNum3(Integer applyUserNum3) {
this.applyUserNum3 = applyUserNum3;
}
public String getOrgCharge() {
return orgCharge == null ? "" : orgCharge;
}
public void setOrgCharge(String orgCharge) {
this.orgCharge = orgCharge;
}
public String getOrgTel() {
return orgTel == null ? "" : orgTel;
}
public void setOrgTel(String orgTel) {
this.orgTel = orgTel;
}
}

View File

@ -12,12 +12,18 @@ import io.swagger.annotations.ApiModelProperty;
@ApiModel
public class TeacherAppraiseDTO {
@ApiModelProperty(name = "teacherId", value = "机构ID")
@ApiModelProperty(name = "teacherId", value = "讲师ID")
private String teacherId;
@ApiModelProperty(name = "teacherName", value = "讲师姓名")
private String teacherName;
@ApiModelProperty(name = "appraiseLevel", value = "评价等级1-5默认0")
private String appraiseLevel;
@ApiModelProperty(name = "classPlanId", value = "培训计划ID")
private String classPlanId;
@ApiModelProperty(name = "lessonId", value = "课程ID")
private String lessonId;
@ApiModelProperty(name = "lessonName", value = "课程名称")
private String lessonName;
@ApiModelProperty(name = "fullName", value = "评价人")
private String fullName;
@ApiModelProperty(name = "bindUserAccount", value = "统一用户Id")
@ -33,6 +39,14 @@ public class TeacherAppraiseDTO {
this.teacherId = teacherId;
}
public String getTeacherName() {
return teacherName == null ? "" : teacherName;
}
public void setTeacherName(String teacherName) {
this.teacherName = teacherName;
}
public String getAppraiseLevel() {
return appraiseLevel == null ? "" : appraiseLevel;
}
@ -49,6 +63,22 @@ public class TeacherAppraiseDTO {
this.classPlanId = classPlanId;
}
public String getLessonId() {
return lessonId == null ? "" : lessonId;
}
public void setLessonId(String lessonId) {
this.lessonId = lessonId;
}
public String getLessonName() {
return lessonName == null ? "" : lessonName;
}
public void setLessonName(String lessonName) {
this.lessonName = lessonName;
}
public String getFullName() {
return fullName == null ? "" : fullName;
}
@ -78,10 +108,16 @@ public class TeacherAppraiseDTO {
final StringBuilder sb = new StringBuilder("{");
sb.append("\"teacherId\":\"")
.append(teacherId).append('\"');
sb.append(",\"teacherName\":\"")
.append(teacherName).append('\"');
sb.append(",\"appraiseLevel\":\"")
.append(appraiseLevel).append('\"');
sb.append(",\"classPlanId\":\"")
.append(classPlanId).append('\"');
sb.append(",\"lessonId\":\"")
.append(lessonId).append('\"');
sb.append(",\"lessonName\":\"")
.append(lessonName).append('\"');
sb.append(",\"fullName\":\"")
.append(fullName).append('\"');
sb.append(",\"bindUserAccount\":\"")

View File

@ -191,6 +191,9 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
PageHelper.startPage(page.getPage(), page.getRows());
List<ApplyDTO> applyDTOs = list(page.getParams());
for (ApplyDTO applyDTO : applyDTOs) {
InstitutionDTO orgInfo = iInstitutionService.get(applyDTO.getApplyInstitutionId());
applyDTO.setOrgCharge(orgInfo.getInstitutionPrincipal());
applyDTO.setOrgTel(orgInfo.getInstitutionContact());
//统计机构报名数量
List<String> states = new ArrayList<>();
states.add("0");

View File

@ -1,7 +1,10 @@
package cn.com.tenlion.service.appraise;
import cn.com.tenlion.pojo.dtos.appraise.OrgAppraiseDTO;
import cn.com.tenlion.pojo.dtos.appraise.TeacherAppraiseDTO;
import com.alibaba.fastjson.JSONObject;
import java.util.List;
import java.util.Map;
/**
@ -25,4 +28,20 @@ public interface IAppraiseService {
* @return
*/
OrgAppraiseDTO getOrgAppraise(String token, Map<String, Object> params);
/**
* 保存讲师评价
* @param token
* @param appraiseObj
*/
void saveTeacherAppraise(String token, JSONObject appraiseObj);
/**
* 用户查询培训下授课讲师列表
* @param token
* @param params
* @return
*/
List<TeacherAppraiseDTO> getTeacherAppraise(String token, Map<String, Object> params);
}

View File

@ -1,8 +1,12 @@
package cn.com.tenlion.service.appraise.impl;
import cn.com.tenlion.dao.appraise.IAppraiseDao;
import cn.com.tenlion.dao.classplan.IClassPlanDao;
import cn.com.tenlion.pojo.dtos.appraise.OrgAppraiseDTO;
import cn.com.tenlion.pojo.dtos.appraise.TeacherAppraiseDTO;
import cn.com.tenlion.service.appraise.IAppraiseService;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.pojo.app.AppTokenUser;
import ink.wgink.util.date.DateUtil;
@ -10,6 +14,8 @@ import ink.wgink.util.map.HashMapUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
@ -22,6 +28,8 @@ public class AppraiseServiceImpl extends DefaultBaseService implements IAppraise
@Autowired
private IAppraiseDao appraiseDao;
@Autowired
private IClassPlanDao classPlanDao;
@Override
public void saveOrgAppraise(String token, OrgAppraiseDTO orgAppraiseDTO) {
@ -30,6 +38,7 @@ public class AppraiseServiceImpl extends DefaultBaseService implements IAppraise
orgAppraiseDTO.setBindUserAccount(appTokenUser.getId());
orgAppraiseDTO.setFullName(appTokenUser.getName());
Map<String, Object> params = HashMapUtil.beanToMap(orgAppraiseDTO);
appraiseDao.deleteOrgAppraise(params);
appraiseDao.saveOrgAppraise(params);
}
@ -40,4 +49,56 @@ public class AppraiseServiceImpl extends DefaultBaseService implements IAppraise
OrgAppraiseDTO dto = appraiseDao.getOrgAppraise(params);
return dto == null ? new OrgAppraiseDTO() : dto;
}
@Override
public List<TeacherAppraiseDTO> getTeacherAppraise(String token, Map<String, Object> params) {
AppTokenUser appTokenUser = getAppTokenUser(token);
String classPlanId = params.get("classPlanId").toString();
// 查询培训计划下讲师列表
List<Map<String, Object>> teacherLessonList = classPlanDao.listClassPlanLessons(classPlanId);
if(teacherLessonList == null || teacherLessonList.size() == 0){
return new ArrayList<>();
}
List<TeacherAppraiseDTO> dto = new ArrayList<>();
for (Map<String, Object> item : teacherLessonList){
// 查询当前讲师是否评价过
params.put("teacherId", item.get("teacherId").toString());
params.put("classPlanId", classPlanId);
params.put("bindUserAccount",appTokenUser.getId());
TeacherAppraiseDTO appraise = appraiseDao.getTeacherAppraise(params);
if(appraise == null){
appraise = new TeacherAppraiseDTO();
appraise.setTeacherId(item.get("teacherId").toString());
appraise.setTeacherName(item.get("teacherName").toString());
appraise.setLessonId(item.get("lessonId").toString());
appraise.setLessonName(item.get("lessonName").toString());
appraise.setAppraiseLevel("0");
appraise.setClassPlanId(classPlanId);
}
dto.add(appraise);
}
return dto;
}
@Override
public void saveTeacherAppraise(String token, JSONObject appraiseObj) {
AppTokenUser appTokenUser = getAppTokenUser(token);
JSONArray array = appraiseObj.getJSONArray("teacherAppraiseList");
TeacherAppraiseDTO dto = new TeacherAppraiseDTO();
for (int i = 0; i < array.size(); i++){
JSONObject item = array.getJSONObject(i);
dto.setTeacherId(item.getString("teacherId"));
dto.setTeacherName(item.getString("teacherName"));
dto.setClassPlanId(item.getString("classPlanId"));
dto.setAppraiseLevel(item.getString("appraiseLevel"));
dto.setLessonId(item.getString("lessonId"));
dto.setLessonName(item.getString("lessonName"));
dto.setBindUserAccount(appTokenUser.getId());
dto.setFullName(appTokenUser.getName());
dto.setAppraiseGMT(DateUtil.getTime());
Map<String, Object> params = HashMapUtil.beanToMap(dto);
appraiseDao.deleteTeacherAppraise(params);
appraiseDao.saveTeacherAppraise(params);
}
}
}

View File

@ -278,4 +278,12 @@ public interface IClassPlanService {
* @param classPlanVO
*/
void updateExamRecommit(String classPlanId, ClassPlanVO classPlanVO);
/**
* 查询我的培训
* @param token
* @param params
* @return
*/
List<Map<String, Object>> listMyClassPlan(String token, Map<String, Object> params);
}

View File

@ -39,6 +39,7 @@ import ink.wgink.exceptions.SaveException;
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
import ink.wgink.module.dictionary.service.IDataService;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.app.AppTokenUser;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.util.UUIDUtil;
import ink.wgink.util.date.DateUtil;
@ -718,4 +719,44 @@ public class ClassPlanServiceImpl extends DefaultBaseService implements IClassPl
}
return res;
}
@Override
public List<Map<String, Object>> listMyClassPlan(String token, Map<String, Object> params) {
AppTokenUser appTokenUser = getAppTokenUser(token);
params.put("creator", appTokenUser.getId());
List<ApplyStudentsDTO> list = studentsService.list(params);
List<Map<String, Object>> classPlanList = new ArrayList<>();
if (list == null || list.size() == 0){
return classPlanList;
}
for (ApplyStudentsDTO item : list){
Map<String, Object> itemMap = new HashMap<>();
params.clear();
String classPlanId = item.getApplyClassId();
params.put("classPlanId",classPlanId);
ClassPlanDTO classPlanDTO = classPlanDao.get(params);
itemMap.put("classPlanId",classPlanId);
String planType = "1".equals(classPlanDTO.getPlanType()) ? "初训" : "复训";
itemMap.put("classPlanName","[" + planType + "]"
+ "[" + classPlanDTO.getPlanNumber() + "]"
+ classPlanDTO.getPlanName());
itemMap.put("planStartTime",classPlanDTO.getPlanStartTime().substring(0,10));
itemMap.put("planEndTime",classPlanDTO.getPlanEndTime().substring(0,10));
String workTypeId = classPlanDTO.getWorkerCatalog();
WorkTypeDTO workTypeDTO = workTypeService.get(workTypeId);
itemMap.put("workTypeId", workTypeId);
itemMap.put("workTypeName", workTypeDTO.getWorkTypeName());
itemMap.put("chargePerson",classPlanDTO.getChargePerson());
itemMap.put("chargePersonTel",classPlanDTO.getChargePersonTel());
itemMap.put("planAddress",classPlanDTO.getPlanAddress());
String orgId = classPlanDTO.getOrgId();
InstitutionDTO orgInfo = iInstitutionService.get(orgId);
itemMap.put("orgId",orgInfo.getInstitutionId());
itemMap.put("orgName",orgInfo.getInstitutionName());
List<ApplyStudentsDTO> userCounts = studentsService.listByClssId(classPlanId);
itemMap.put("userCounts", userCounts.size());
classPlanList.add(itemMap);
}
return classPlanList;
}
}

View File

@ -1,7 +1,5 @@
package cn.com.tenlion.service.myexamforapp;
import cn.com.tenlion.pojo.dtos.myexam.MyExamDTO;
import java.util.List;
import java.util.Map;
@ -18,5 +16,5 @@ public interface IMyExamForAppService {
* @param token
* @return
*/
List<MyExamDTO> listMyExam(String token, Map<String,Object> params);
List<Map<String, Object>> listMyExam(String token, Map<String,Object> params);
}

View File

@ -2,24 +2,23 @@ package cn.com.tenlion.service.myexamforapp.impl;
import cn.com.tenlion.institutionmanagement.pojo.dtos.institution.InstitutionDTO;
import cn.com.tenlion.institutionmanagement.service.institution.IInstitutionService;
import cn.com.tenlion.pojo.dtos.applystudents.ApplyStudentsDTO;
import cn.com.tenlion.pojo.dtos.classplan.ClassPlanDTO;
import cn.com.tenlion.pojo.dtos.distributioncard.DistributionCardDTO;
import cn.com.tenlion.pojo.dtos.distribution.DistributionDTO;
import cn.com.tenlion.pojo.dtos.examapply.ExamApplyDTO;
import cn.com.tenlion.pojo.dtos.myexam.MyExamDTO;
import cn.com.tenlion.pojo.dtos.worktype.WorkTypeDTO;
import cn.com.tenlion.service.applystudents.IApplyStudentsService;
import cn.com.tenlion.service.classplan.IClassPlanService;
import cn.com.tenlion.service.examapply.IExamApplyService;
import cn.com.tenlion.service.examination.distributioncard.IDistributionCardService;
import cn.com.tenlion.service.examination.distribution.IDistributionService;
import cn.com.tenlion.service.myexamforapp.IMyExamForAppService;
import cn.com.tenlion.service.worktype.IWorkTypeService;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
import ink.wgink.module.dictionary.service.IDataService;
import ink.wgink.pojo.app.AppTokenUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -31,76 +30,56 @@ import java.util.Map;
@Service
public class MyExamForAppServiceImpl extends DefaultBaseService implements IMyExamForAppService {
/**
* 准考证
*/
@Autowired
private IDistributionCardService distributionCardService;
/**
* 培训计划
*/
@Autowired
private IClassPlanService classPlanService;
/**
* 培训机构
*/
@Autowired
private IInstitutionService iInstitutionService;
/**
* 数据字典
*/
@Autowired
private IDataService dataService;
/**
* 工种
*/
@Autowired
private IWorkTypeService workTypeService;
/**
* 考试申请
*/
@Autowired
private IExamApplyService examApplyService;
@Autowired
private IApplyStudentsService studentsService;
@Autowired
private IDistributionService distributionService;
@Override
public List<MyExamDTO> listMyExam(String token, Map<String, Object> params) {
public List<Map<String, Object>> listMyExam(String token, Map<String, Object> params) {
AppTokenUser appTokenUser = getAppTokenUser(token);
String userId = appTokenUser.getId();
params.put("distributionCardUserId",userId);
List<DistributionCardDTO> cardDTOS = distributionCardService.list(params);
if(cardDTOS == null || cardDTOS.size() == 0){
return new ArrayList<>(0);
String bindUserAccount = appTokenUser.getId();
params.put("creator",bindUserAccount);
// 从已报名人员表中查出所有培训记录
List<ApplyStudentsDTO> list = studentsService.list(params);
if(list == null || list.size() == 0){
return new ArrayList<>();
}
List<MyExamDTO> list = new ArrayList<>();
for(DistributionCardDTO item : cardDTOS){
MyExamDTO myExamDTO = new MyExamDTO();
// 查询计划信息
ClassPlanDTO classPlanDTO = classPlanService.get(item.getClassPlanId());
// 查询培训机构
InstitutionDTO institutionDTO = iInstitutionService.get(classPlanDTO.getOrgId());
// 查询培训项目
DataDTO dataDTO = dataService.get(classPlanDTO.getProjectCatalogId());
// 查询工种类别
WorkTypeDTO workTypeDTO = workTypeService.get(classPlanDTO.getWorkerCatalog());
myExamDTO.setOrgName(institutionDTO.getInstitutionName());
myExamDTO.setPlanName(classPlanDTO.getPlanName());
myExamDTO.setPlanNumber(classPlanDTO.getPlanNumber());
switch (classPlanDTO.getPlanType()){
case "1" : myExamDTO.setPlanTypeName("初训"); break;
case "2" : myExamDTO.setPlanTypeName("复训"); break;
case "3" : myExamDTO.setPlanTypeName("换证"); break;
default : myExamDTO.setPlanTypeName("-");
List<Map<String, Object>> examList = new ArrayList<>();
for (ApplyStudentsDTO item : list){
String classPlanId = item.getApplyClassId();
// 查询考试信息
params.clear();
params.put("classPlanId",classPlanId);
ExamApplyDTO examApplyDTO = examApplyService.get(params);
int examPassType = examApplyDTO.getCheckStatus();
int examPlaceType = examApplyDTO.getStatus();
if( examPassType == 1 && examPlaceType == 1){
//封装考试信息
Map<String, Object> examObj = new HashMap<>();
examObj.put("workTypeId",item.getApplyWorkTypeId());
examObj.put("workTypeName",item.getApplyWorkTypeName());
ClassPlanDTO classPlanDTO = classPlanService.get(classPlanId);
examObj.put("chargePerson",classPlanDTO.getChargePersonTel());
examObj.put("chargePersonTel",classPlanDTO.getChargePerson());
// 查询考点信息
DistributionDTO distributionDTO = distributionService.get(classPlanId);
InstitutionDTO examPlace = iInstitutionService.get(distributionDTO.getStationId());
examObj.put("examPlaceName",examPlace.getInstitutionName());
examObj.put("examPlaceAddr",examPlace.getInstitutionAddress());
examObj.put("startTime",distributionDTO.getDistributionAllotTime());
examObj.put("endTime",distributionDTO.getDistributionAllotEndTime());
examList.add(examObj);
}
myExamDTO.setProjectCatalogName(dataDTO.getDataName());
myExamDTO.setWorkerCatalogName(workTypeDTO.getWorkTypeName());
Map<String, Object> queryMap = getHashMap(8);
queryMap.put("examId",item.getClassPlanId());
ExamApplyDTO examApplyDTO = examApplyService.get(queryMap);
myExamDTO.setExamTimeStart(examApplyDTO.getPracticeExamStartTime());
myExamDTO.setExamTimeEnd(examApplyDTO.getPracticeExamEndTime());
list.add(myExamDTO);
}
return list;
return examList;
}
}

View File

@ -433,6 +433,9 @@
<if test="applyClassId != null and applyClassId != ''">
AND t1.apply_class_id = #{applyClassId}
</if>
<if test="creator != null and creator != ''">
AND t1.creator = #{creator}
</if>
<if test="startTime != null and startTime != ''">
AND
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}

View File

@ -13,8 +13,11 @@
<resultMap id="teacherAppraiseDTO" type="cn.com.tenlion.pojo.dtos.appraise.TeacherAppraiseDTO">
<result column="teacher_id" property="teacherId"/>
<result column="teacher_name" property="teacherName"/>
<result column="appraise_level" property="appraiseLevel"/>
<result column="class_plan_id" property="classPlanId"/>
<result column="lesson_id" property="lessonId"/>
<result column="lesson_name" property="lessonName"/>
<result column="full_name" property="fullName"/>
<result column="bind_user_account" property="bindUserAccount"/>
<result column="appraise_gmt" property="appraiseGMT"/>
@ -27,6 +30,16 @@
(#{orgId}, #{appraiseLevel}, #{classPlanId}, #{fullName}, #{bindUserAccount}, #{appraiseGMT}, '0')
</insert>
<update id="deleteOrgAppraise" parameterType="map">
UPDATE e_org_appraise SET
is_delete = '1'
WHERE
bind_user_account = #{bindUserAccount}
AND class_plan_id = #{classPlanId}
AND org_id = #{orgId}
</update>
<select id="getOrgAppraise" parameterType="map" resultMap="orgAppraiseDTO">
SELECT
t1.org_id,
@ -51,18 +64,22 @@
limit 1
</select>
<!--==========授课讲师评价=============-->
<insert id="saveTeacherAppraise" parameterType="map">
INSERT INTO e_teacher_appraise
(teacher_id, appraise_level, class_plan_id, full_name, bind_user_account, appraise_gmt, is_delete)
(teacher_id, teacher_name, appraise_level, class_plan_id, lesson_id, lesson_name, full_name, bind_user_account, appraise_gmt, is_delete)
VALUES
(#{teacherId}, #{appraiseLevel}, #{classPlanId}, #{fullName}, #{bindUserAccount}, #{appraiseGMT}, '0')
(#{teacherId}, #{teacherName}, #{appraiseLevel}, #{classPlanId}, #{lessonId}, #{lessonName}, #{fullName}, #{bindUserAccount}, #{appraiseGMT}, '0')
</insert>
<select id="getTeacherAppraise" parameterType="map" resultMap="teacherAppraiseDTO">
SELECT
t1.teacher_id,
t1.teacher_name,
t1.appraise_level,
t1.class_plan_id,
t1.lesson_id,
t1.lesson_name,
t1.full_name,
t1.bind_user_account,
t1.appraise_gmt
@ -82,4 +99,15 @@
limit 1
</select>
<update id="deleteTeacherAppraise" parameterType="map">
UPDATE e_teacher_appraise SET
is_delete = '1'
WHERE
bind_user_account = #{bindUserAccount}
AND class_plan_id = #{classPlanId}
AND teacher_id = #{teacherId}
AND lesson_id = #{lessonId}
</update>
</mapper>

View File

@ -100,7 +100,6 @@
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
{width:100, title: '操作', fixed: 'left', align:'center',
templet: function(row) {
console.log(row['examStatus'] == '1');
var dom = '';
if(row['examType'] == ''){
dom += '<a type="button" class="layui-btn layui-btn-info layui-btn-xs" lay-event="examEvent">申请考试</a>';
@ -292,7 +291,7 @@
area: ['80%', '80%'],
shadeClose: false,
anim: 2,
content: top.restAjax.path('route/examination/distribution/update-exam-commit.html?classPlanId={classPlanId}', [obj.data.classPlanId]),
content: top.restAjax.path('route/examination/distribution/show.html?planId={classPlanId}', [obj.data.classPlanId]),
end: function () {
}
});