Merge remote-tracking branch 'origin/master'

This commit is contained in:
cuibaocheng 2021-05-05 13:11:25 +08:00
commit 45136485bf
8 changed files with 96 additions and 7 deletions

View File

@ -27,7 +27,7 @@ import java.util.Map;
* @Date: 2021-05-03 06:54:52
* @Version: 3.0
**/
@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "接口")
@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "培训计划接口")
@RestController
@RequestMapping(ISystemConstant.API_PREFIX + "/classplan")
public class ClassPlanController extends DefaultBaseController {

View File

@ -26,7 +26,7 @@ import java.util.Map;
* @Date: 2021-05-02 07:03:18
* @Version: 3.0
**/
@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "接口")
@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "课程接口")
@RestController
@RequestMapping(ISystemConstant.API_PREFIX + "/lessons")
public class LessonsController extends DefaultBaseController {

View File

@ -106,4 +106,5 @@ public class TeacherController extends DefaultBaseController {
public SuccessResult delete(@PathVariable("ids") String ids) throws RemoveException {
return teacherService.delete(ids);
}
}

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 = "报名计划分页列表接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),

View File

@ -70,6 +70,11 @@ public class ApplyDTO {
@ApiModelProperty(name = "applyPhysicalStateName", value = "身体状态中文")
private String applyPhysicalStateName;
@ApiModelProperty(name = "是否可查看准考证", value = "是否可查看准考证 0不可查看 1可查看")
private int distributionCardState;
@ApiModelProperty(name = "准考证码", value = "准考证码")
private String distributionCardCode;
public String getApplyInstitutionId() {
return applyInstitutionId;
@ -270,4 +275,21 @@ public class ApplyDTO {
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);
/**
* 获取我的报名列表
* @param token
* @param page
* @return
*/
SuccessResultList<List<ApplyDTO>> listPageMyApply(String token,ListPage 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.classplan.ClassPlanDTO;
import cn.com.tenlion.pojo.dtos.distributioncard.DistributionCardDTO;
import cn.com.tenlion.pojo.vos.apply.ApplyAuditVO;
import cn.com.tenlion.pojo.vos.applyauditlog.ApplyAuditLogVO;
import cn.com.tenlion.pojo.vos.traininginstitutionuser.InstitutionUserVO;
import cn.com.tenlion.service.applyauditlog.IApplyAuditLogService;
import cn.com.tenlion.service.classplan.IClassPlanService;
import cn.com.tenlion.service.examination.distributioncard.IDistributionCardService;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.exceptions.ParamsException;
import ink.wgink.exceptions.SaveException;
import ink.wgink.exceptions.SearchException;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.app.AppTokenUser;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.util.date.DateUtil;
@ -50,6 +53,39 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
private IApplyAuditLogService applyAuditLogService;
@Autowired
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){
@ -276,10 +312,6 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
@Override
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);
}
@ -295,6 +327,10 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
@Override
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());
List<ApplyDTO> applyDTOs = list(page.getParams());
PageInfo<ApplyDTO> pageInfo = new PageInfo<>(applyDTOs);

View File

@ -385,7 +385,7 @@
t1.apply_user_card_photo,
t1.apply_audit_state,
t1.gmt_create,
t1,t1.creator,
t1.creator,
t2.data_name AS apply_sex_name,
t3.data_name AS apply_card_type_name,
t4.data_name AS apply_culture_level_name,
@ -433,6 +433,10 @@
AND
t1.apply_institution_id = #{applyInstitutionId}
</if>
<if test="create != null and create != ''">
AND
t1.creator = #{creator}
</if>
<if test="applyAuditStates != null and applyAuditStates.size > 0">
AND
t1.apply_audit_state IN