bug修改。

This commit is contained in:
Renpc-kilig 2021-06-07 16:02:56 +08:00
parent 7ce3f1661b
commit c95b02bd5c
7 changed files with 117 additions and 0 deletions

View File

@ -118,4 +118,16 @@ public class ApplyStudentsNewAppController extends DefaultBaseController {
return new SuccessResultData<>(applyStudentsNewService.count(params));
}
@ApiOperation(value = "分页列表", notes = "分页列表接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("get-grade")
public List<ApplyStudentsNewDTO> getGrade(@RequestHeader("token") String token) {
Map<String, Object> params = requestParams();
params.put("token", token);
return applyStudentsNewService.getGrade(params);
}
}

View File

@ -117,4 +117,11 @@ public interface IApplyStudentsNewDao {
*/
Integer count(Map<String, Object> params) throws SearchException;
/**
* 查询成绩
* @param params
* @return
*/
List<ApplyStudentsNewDTO> getGrade(Map<String, Object> params);
}

View File

@ -1,5 +1,6 @@
package cn.com.tenlion.dao.classplan;
import cn.com.tenlion.pojo.dtos.applystudentsnew.ApplyStudentsNewDTO;
import ink.wgink.exceptions.RemoveException;
import ink.wgink.exceptions.SaveException;
import ink.wgink.exceptions.SearchException;
@ -167,4 +168,5 @@ public interface IClassPlanDao {
* @param params
*/
void updateExamFile(Map<String, Object> params);
}

View File

@ -88,6 +88,32 @@ public class ApplyStudentsServiceImpl extends DefaultBaseService implements IApp
Map<String, Object> params = HashMapUtil.beanToMap(po);
applyStudentsDao.save(params);
deleteIdList.add(applyPO.getApplyId());
ApplyStudentsNewVO applyStudentsNewVO = new ApplyStudentsNewVO();
applyStudentsNewVO.setOrgId(po.getApplyInstitutionId());
ClassPlanDTO classPlanDTO = classPlanService.get(po.getApplyClassId());
if(null != classPlanDTO) {
applyStudentsNewVO.setOrgName(classPlanDTO.getOrgName());
}
applyStudentsNewVO.setClassPlanId(po.getApplyClassId());
applyStudentsNewVO.setUserId(params.get("creator").toString());
applyStudentsNewVO.setName(po.getApplyName());
DataDTO dataDTO = dataService.get(po.getApplySex());
if(null != dataDTO) {
applyStudentsNewVO.setSex(dataDTO.getDataName());
}
applyStudentsNewVO.setCardType(po.getApplyCardType());
dataDTO = dataService.get(po.getApplyCardType());
if(null != dataDTO) {
applyStudentsNewVO.setCardTypeName(dataDTO.getDataName());
}
applyStudentsNewVO.setCardNumber(po.getApplyCardNumber());
applyStudentsNewVO.setWorkUnit(po.getApplyUnitName());
// applyStudentsNewVO.setWorkDept(applyStudentsVO);
applyStudentsNewVO.setWorkTitle(po.getApplyPosition());
applyStudentsNewVO.setPhone(po.getApplyPhone());
// applyStudentsNewVO.setExamOrgId(applyStudentsVO);
applyStudentsNewService.save(applyStudentsNewVO);
}
applyService.delete(deleteIdList);
}
@ -129,6 +155,7 @@ public class ApplyStudentsServiceImpl extends DefaultBaseService implements IApp
setAppSaveInfo(token, params);
}
applyStudentsDao.save(params);
ApplyStudentsNewVO applyStudentsNewVO = new ApplyStudentsNewVO();
applyStudentsNewVO.setOrgId(applyStudentsVO.getApplyInstitutionId());
ClassPlanDTO classPlanDTO = classPlanService.get(applyStudentsVO.getApplyClassId());

View File

@ -6,6 +6,7 @@ import cn.com.tenlion.pojo.dtos.classplan.ClassPlanDTO;
import cn.com.tenlion.pojo.pos.applystudentsnew.ApplyStudentsNewPO;
import cn.com.tenlion.pojo.vos.applystudentsnew.ApplyStudentsNewVO;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResultData;
import ink.wgink.pojo.result.SuccessResultList;
import java.util.List;
@ -193,4 +194,11 @@ public interface IApplyStudentsNewService {
* @return
*/
SuccessResultList<List<ClassPlanDTO>> listPageClassPlan(ListPage page);
/**
* 获取考试成绩
* @param params
* @return
*/
List<ApplyStudentsNewDTO> getGrade(Map<String, Object> params);
}

View File

@ -24,6 +24,8 @@ 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.ListPage;
import ink.wgink.pojo.app.AppTokenUser;
import ink.wgink.pojo.result.SuccessResultData;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.util.map.HashMapUtil;
import ink.wgink.util.UUIDUtil;
@ -283,6 +285,35 @@ public class ApplyStudentsNewServiceImpl extends DefaultBaseService implements I
return new SuccessResultList<>(classPlanDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
}
@Override
public List<ApplyStudentsNewDTO> getGrade(Map<String, Object> params) {
String token = params.get("token").toString();
AppTokenUser appTokenUser = this.getAppTokenUser(token);
params.put("userId", appTokenUser.getId());
List<ApplyStudentsNewDTO> list = applyStudentsNewDao.getGrade(params);
if(null != list && list.size() > 0) {
Iterator<ApplyStudentsNewDTO> applyStudentsNewDTOIterator = list.iterator();
while (applyStudentsNewDTOIterator.hasNext()) {
ApplyStudentsNewDTO applyStudentsNewDTO = applyStudentsNewDTOIterator.next();
ClassPlanDTO classPlanDTO = classPlanService.get(applyStudentsNewDTO.getClassPlanId());
applyStudentsNewDTO.setClassPlanDTO(classPlanDTO);
/*WorkTypeDTO workTypeDTO = workTypeService.get(applyStudentsNewDTO.getApplyWorkTypeId());
if(null != workTypeDTO) {
applyStudentsNewDTO.setApplyWorkTypeName(workTypeDTO.getWorkTypeName());
}*/
params.put("examId", applyStudentsNewDTO.getClassPlanId());
ExamApplyDTO examApplyDTO = examApplyService.get(params);
if(null != examApplyDTO) {
applyStudentsNewDTO.setExamStartTime(examApplyDTO.getPracticeExamStartTime());
applyStudentsNewDTO.setExamEndTime(examApplyDTO.getPracticeExamEndTime());
}
}
}else {
list = new ArrayList<>();
}
return list;
}
public List<ClassPlanDTO> listClassPlan(Map<String, Object> params) {
String[] classPlanIdListIds = params.get("classPlanIdListIds") == null ? null : params.get("classPlanIdListIds").toString().split(",");
params.put("classPlanIdList", classPlanIdListIds);

View File

@ -587,4 +587,34 @@
t1.is_delete = 0
</select>
<select id="getGrade" parameterType="map" resultMap="applyStudentsNewDTO">
SELECT
t1.apply_students_new_id,
t1.org_id,
t1.org_name,
t1.class_plan_id,
t1.user_id,
t1.name,
t1.sex,
t1.card_type,
t1.card_type_name,
t1.card_number,
t1.work_unit,
t1.work_dept,
t1.work_title,
t1.phone,
t1.exam_org_id,
t1.exam_org_name,
t1.exam_point_id,
t1.exam_point_name,
t1.hands_point_id,
t1.hands_point_name,
t1.exam_grade,
t1.hands_grade,
t1.resit_exam_grade,
t1.resit_hands_grade,
t1.apply_paper_status
FROM e_apply_students_new t1 WHERE t1.is_delete = 0 AND t1.user_id = #{userId}
</select>
</mapper>