Merge branch 'master' of e.coding.net:tsteam/btsaqscksfwpt/system-examination-signup

This commit is contained in:
wans 2021-05-05 12:51:47 +08:00
commit a2bd1710d5
5 changed files with 107 additions and 8 deletions

View File

@ -39,6 +39,24 @@ public class ApplyAppController extends DefaultBaseController {
@ApiOperation(value = "我的报名信息分页列表", notes = "我的报名信息分页列表接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String"),
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listPageMyApply")
public SuccessResultList<List<ApplyDTO>> listPageMyApply(@RequestHeader("token") String token, ListPage page) throws Exception{
Map<String, Object> params = requestParams();
page.setParams(params);
return applyService.listPageMyApply(token,page);
}
@ApiOperation(value = "报名计划分页列表", notes = "报名计划分页列表接口") @ApiOperation(value = "报名计划分页列表", notes = "报名计划分页列表接口")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"), @ApiImplicitParam(name = "token", value = "token", paramType = "header"),

View File

@ -52,6 +52,9 @@ public class ApplyDTO {
private String applyUserCardPhoto; private String applyUserCardPhoto;
@ApiModelProperty(name = "applyAuditState", value = "报名状态 0 待审核 1用户撤回 2审核通过 3未报到 4报名完成-1审核不通过") @ApiModelProperty(name = "applyAuditState", value = "报名状态 0 待审核 1用户撤回 2审核通过 3未报到 4报名完成-1审核不通过")
private Integer applyAuditState; private Integer applyAuditState;
@ApiModelProperty(name = "申请用户ID", value = "申请用户ID")
private String create;
@ApiModelProperty(name = "gmtCreate", value = "报名时间") @ApiModelProperty(name = "gmtCreate", value = "报名时间")
private String gmtCreate; private String gmtCreate;
@ -67,6 +70,11 @@ public class ApplyDTO {
@ApiModelProperty(name = "applyPhysicalStateName", value = "身体状态中文") @ApiModelProperty(name = "applyPhysicalStateName", value = "身体状态中文")
private String applyPhysicalStateName; private String applyPhysicalStateName;
@ApiModelProperty(name = "是否可查看准考证", value = "是否可查看准考证 0不可查看 1可查看")
private int distributionCardState;
@ApiModelProperty(name = "准考证码", value = "准考证码")
private String distributionCardCode;
public String getApplyInstitutionId() { public String getApplyInstitutionId() {
return applyInstitutionId; return applyInstitutionId;
@ -259,4 +267,29 @@ public class ApplyDTO {
public void setApplyPhysicalStateName(String applyPhysicalStateName) { public void setApplyPhysicalStateName(String applyPhysicalStateName) {
this.applyPhysicalStateName = applyPhysicalStateName; this.applyPhysicalStateName = applyPhysicalStateName;
} }
public String getCreate() {
return create;
}
public void setCreate(String create) {
this.create = create;
}
public int getDistributionCardState() {
return distributionCardState;
}
public void setDistributionCardState(int distributionCardState) {
this.distributionCardState = distributionCardState;
}
public String getDistributionCardCode() {
return distributionCardCode;
}
public void setDistributionCardCode(String distributionCardCode) {
this.distributionCardCode = distributionCardCode;
}
} }

View File

@ -27,6 +27,14 @@ public interface IApplyService {
*/ */
void audit(String token,ApplyAuditVO applyAuditVO); void audit(String token,ApplyAuditVO applyAuditVO);
/**
* 获取我的报名列表
* @param token
* @param page
* @return
*/
SuccessResultList<List<ApplyDTO>> listPageMyApply(String token,ListPage page);
/** /**
* 获取报名计划列表 * 获取报名计划列表
* @param page * @param page

View File

@ -2,16 +2,19 @@ package cn.com.tenlion.service.apply.impl;
import cn.com.tenlion.pojo.dtos.apply.ApplyClassPlanDTO; import cn.com.tenlion.pojo.dtos.apply.ApplyClassPlanDTO;
import cn.com.tenlion.pojo.dtos.classplan.ClassPlanDTO; import cn.com.tenlion.pojo.dtos.classplan.ClassPlanDTO;
import cn.com.tenlion.pojo.dtos.distributioncard.DistributionCardDTO;
import cn.com.tenlion.pojo.vos.apply.ApplyAuditVO; import cn.com.tenlion.pojo.vos.apply.ApplyAuditVO;
import cn.com.tenlion.pojo.vos.applyauditlog.ApplyAuditLogVO; import cn.com.tenlion.pojo.vos.applyauditlog.ApplyAuditLogVO;
import cn.com.tenlion.pojo.vos.traininginstitutionuser.InstitutionUserVO; import cn.com.tenlion.pojo.vos.traininginstitutionuser.InstitutionUserVO;
import cn.com.tenlion.service.applyauditlog.IApplyAuditLogService; import cn.com.tenlion.service.applyauditlog.IApplyAuditLogService;
import cn.com.tenlion.service.classplan.IClassPlanService; import cn.com.tenlion.service.classplan.IClassPlanService;
import cn.com.tenlion.service.examination.distributioncard.IDistributionCardService;
import ink.wgink.common.base.DefaultBaseService; import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.exceptions.ParamsException; import ink.wgink.exceptions.ParamsException;
import ink.wgink.exceptions.SaveException; import ink.wgink.exceptions.SaveException;
import ink.wgink.exceptions.SearchException; import ink.wgink.exceptions.SearchException;
import ink.wgink.pojo.ListPage; import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.app.AppTokenUser;
import ink.wgink.pojo.result.SuccessResult; import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList; import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.util.date.DateUtil; import ink.wgink.util.date.DateUtil;
@ -50,6 +53,39 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
private IApplyAuditLogService applyAuditLogService; private IApplyAuditLogService applyAuditLogService;
@Autowired @Autowired
private IClassPlanService classPlanService; private IClassPlanService classPlanService;
@Autowired
private IDistributionCardService distributionCardService;
public SuccessResultList<List<ApplyDTO>> listPageMyApply(String token,ListPage page){
if (StringUtils.isBlank(token)) {
page.getParams().put("creator",securityComponent.getCurrentUser().getUserId());
} else {
AppTokenUser appTokenUser = getAppTokenUser(token);
page.getParams().put("creator",appTokenUser.getId());
}
PageHelper.startPage(page.getPage(), page.getRows());
List<ApplyDTO> applyDTOs = list(page.getParams());
for (ApplyDTO applyDTO : applyDTOs) {
DistributionCardDTO distributionCardDTO = distributionCardService.get(applyDTO.getApplyId());
if(distributionCardDTO == null){
applyDTO.setDistributionCardState(0);
}else{
applyDTO.setDistributionCardState(1);
applyDTO.setDistributionCardCode(distributionCardDTO.getDistributionCardPictures());
}
}
PageInfo<ApplyDTO> pageInfo = new PageInfo<>(applyDTOs);
return new SuccessResultList<>(applyDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
}
public void audit(String token,ApplyAuditVO applyAuditVO){ public void audit(String token,ApplyAuditVO applyAuditVO){
@ -276,10 +312,6 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
@Override @Override
public List<ApplyDTO> list(Map<String, Object> params) { public List<ApplyDTO> list(Map<String, Object> params) {
InstitutionUserVO institutionUserVO = securityComponent.getExpandData(InstitutionUserVO.class);
if(institutionUserVO != null){
params.put("applyInstitutionId",institutionUserVO.getInstitutionId());
}
return applyDao.list(params); return applyDao.list(params);
} }
@ -295,6 +327,10 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
@Override @Override
public SuccessResultList<List<ApplyDTO>> listPage(ListPage page) { public SuccessResultList<List<ApplyDTO>> listPage(ListPage page) {
InstitutionUserVO institutionUserVO = securityComponent.getExpandData(InstitutionUserVO.class);
if(institutionUserVO != null){
page.getParams().put("applyInstitutionId",institutionUserVO.getInstitutionId());
}
PageHelper.startPage(page.getPage(), page.getRows()); PageHelper.startPage(page.getPage(), page.getRows());
List<ApplyDTO> applyDTOs = list(page.getParams()); List<ApplyDTO> applyDTOs = list(page.getParams());
PageInfo<ApplyDTO> pageInfo = new PageInfo<>(applyDTOs); PageInfo<ApplyDTO> pageInfo = new PageInfo<>(applyDTOs);

View File

@ -23,6 +23,7 @@
<result column="apply_user_card_photo" property="applyUserCardPhoto"/> <result column="apply_user_card_photo" property="applyUserCardPhoto"/>
<result column="apply_audit_state" property="applyAuditState"/> <result column="apply_audit_state" property="applyAuditState"/>
<result column="gmt_create" property="gmtCreate"/> <result column="gmt_create" property="gmtCreate"/>
<result column="create" property="create"/>
<result column="apply_sex_name" property="applySexName"/> <result column="apply_sex_name" property="applySexName"/>
<result column="apply_card_type_name" property="applyCardTypeName"/> <result column="apply_card_type_name" property="applyCardTypeName"/>
<result column="apply_culture_level_name" property="applyCultureLevelName"/> <result column="apply_culture_level_name" property="applyCultureLevelName"/>
@ -263,7 +264,8 @@
t1.apply_user_card_photo, t1.apply_user_card_photo,
t1.apply_audit_state, t1.apply_audit_state,
t1.apply_id, t1.apply_id,
t1.creator,
t1.gmt_create,
t2.data_name AS apply_sex_name, t2.data_name AS apply_sex_name,
t3.data_name AS apply_card_type_name, t3.data_name AS apply_card_type_name,
t4.data_name AS apply_culture_level_name, t4.data_name AS apply_culture_level_name,
@ -383,6 +385,7 @@
t1.apply_user_card_photo, t1.apply_user_card_photo,
t1.apply_audit_state, t1.apply_audit_state,
t1.gmt_create, t1.gmt_create,
t1.creator,
t2.data_name AS apply_sex_name, t2.data_name AS apply_sex_name,
t3.data_name AS apply_card_type_name, t3.data_name AS apply_card_type_name,
t4.data_name AS apply_culture_level_name, t4.data_name AS apply_culture_level_name,
@ -430,6 +433,10 @@
AND AND
t1.apply_institution_id = #{applyInstitutionId} t1.apply_institution_id = #{applyInstitutionId}
</if> </if>
<if test="create != null and create != ''">
AND
t1.creator = #{creator}
</if>
<if test="applyAuditStates != null and applyAuditStates.size > 0"> <if test="applyAuditStates != null and applyAuditStates.size > 0">
AND AND
t1.apply_audit_state IN t1.apply_audit_state IN
@ -437,9 +444,6 @@
#{applyAuditStates[${index}]} #{applyAuditStates[${index}]}
</foreach> </foreach>
</if> </if>
ORDER BY t1.gmt_create DESC ORDER BY t1.gmt_create DESC
</select> </select>