修改app报名接口

This commit is contained in:
ly19960718 2021-05-06 18:38:01 +08:00
parent 92901b788e
commit a7b378b796
12 changed files with 254 additions and 16 deletions

View File

@ -5,6 +5,7 @@ import cn.com.tenlion.pojo.vos.apply.ApplyAuditVO;
import ink.wgink.annotation.CheckRequestBodyAnnotation;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.exceptions.SearchException;
import ink.wgink.exceptions.UpdateException;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.ErrorResult;
@ -66,7 +67,7 @@ public class ApplyAppController extends DefaultBaseController {
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "applyCardNumber", value = "报名证件号", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "projectCatalogId", value = "报名工种", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "workerCatalog", value = "报名工种", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "planType", value = "报名类型", paramType = "query", dataType = "String"),
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@ -87,6 +88,13 @@ public class ApplyAppController extends DefaultBaseController {
@PutMapping("updateAuditStateRecall/{applyId}")
@CheckRequestBodyAnnotation
public SuccessResult updateAuditStateRecall(@RequestHeader("token") String token,@PathVariable("applyId") String applyId) {
ApplyDTO applyDTO = applyService.get(applyId);
if(applyId == null){
throw new SearchException("未查询到表名信息");
}
if(applyDTO.getApplyAuditState() != 0){
throw new UpdateException("报名信息以审核不能撤回");
}
ApplyAuditVO applyAuditVO = new ApplyAuditVO();
applyAuditVO.setApplyId(applyId);
applyAuditVO.setApplyAuditExplain("用户撤回报名");

View File

@ -34,6 +34,23 @@ public class WorkTypeAppController extends DefaultBaseController {
@Autowired
private IWorkTypeService workTypeService;
@ApiOperation(value = "根据父级节点获取工种类型列表", notes = "根据父级节点获取工种类型列表接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "workTypeParentId", value = "父级节点ID", paramType = "query")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listByParentId")
public List<WorkTypeDTO> listByParentId(@RequestHeader("token") String token) {
Map<String, Object> params = requestParams();
return workTypeService.list(params);
}
@ApiOperation(value = "新增工种类型", notes = "新增工种类型接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header")

View File

@ -28,6 +28,9 @@ public class ApplyBO {
private Integer applyUnitPhone;
private String applyUnitAddress;
private String applyUserCardPhoto;
private String applyPosition;
private String applyMajorYear;
private String applyTechnicalTitles;
private Integer applyAuditState;
private String creator;
private String gmtCreate;
@ -179,6 +182,30 @@ public class ApplyBO {
this.applyUserCardPhoto = applyUserCardPhoto;
}
public String getApplyPosition() {
return applyPosition;
}
public void setApplyPosition(String applyPosition) {
this.applyPosition = applyPosition;
}
public String getApplyMajorYear() {
return applyMajorYear;
}
public void setApplyMajorYear(String applyMajorYear) {
this.applyMajorYear = applyMajorYear;
}
public String getApplyTechnicalTitles() {
return applyTechnicalTitles;
}
public void setApplyTechnicalTitles(String applyTechnicalTitles) {
this.applyTechnicalTitles = applyTechnicalTitles;
}
public Integer getApplyAuditState() {
return applyAuditState == null ? 0 : applyAuditState;
}

View File

@ -50,7 +50,15 @@ public class ApplyDTO {
private String applyUnitAddress;
@ApiModelProperty(name = "applyUserCardPhoto", value = "证件照片")
private String applyUserCardPhoto;
@ApiModelProperty(name = "applyAuditState", value = "报名状态 0 待审核 1用户撤回 2审核通过 3未报到 4报名完成-1审核不通过")
@ApiModelProperty(name = "applyPosition", value = "报名人职务")
private String applyPosition;
@ApiModelProperty(name = "applyMajorYear", value = "报名人从事专业年限")
private String applyMajorYear;
@ApiModelProperty(name = "applyTechnicalTitles", value = "报名人技术职称")
private String applyTechnicalTitles;
@ApiModelProperty(name = "applyAuditState", value = "报名状态 0 待审核 1用户撤回 2审核通过 3报名完成-1审核不通过")
private Integer applyAuditState;
@ApiModelProperty(name = "申请用户ID", value = "申请用户ID")
private String create;
@ -220,6 +228,30 @@ public class ApplyDTO {
this.applyUserCardPhoto = applyUserCardPhoto;
}
public String getApplyPosition() {
return applyPosition;
}
public void setApplyPosition(String applyPosition) {
this.applyPosition = applyPosition;
}
public String getApplyMajorYear() {
return applyMajorYear;
}
public void setApplyMajorYear(String applyMajorYear) {
this.applyMajorYear = applyMajorYear;
}
public String getApplyTechnicalTitles() {
return applyTechnicalTitles;
}
public void setApplyTechnicalTitles(String applyTechnicalTitles) {
this.applyTechnicalTitles = applyTechnicalTitles;
}
public Integer getApplyAuditState() {
return applyAuditState == null ? 0 : applyAuditState;
}

View File

@ -28,6 +28,11 @@ public class ApplyPO {
private String applyUnitPhone;
private String applyUnitAddress;
private String applyUserCardPhoto;
private String applyPosition;
private String applyMajorYear;
private String applyTechnicalTitles;
private Integer applyAuditState;
private String creator;
private String gmtCreate;
@ -179,6 +184,30 @@ public class ApplyPO {
this.applyUserCardPhoto = applyUserCardPhoto;
}
public String getApplyPosition() {
return applyPosition;
}
public void setApplyPosition(String applyPosition) {
this.applyPosition = applyPosition;
}
public String getApplyMajorYear() {
return applyMajorYear;
}
public void setApplyMajorYear(String applyMajorYear) {
this.applyMajorYear = applyMajorYear;
}
public String getApplyTechnicalTitles() {
return applyTechnicalTitles;
}
public void setApplyTechnicalTitles(String applyTechnicalTitles) {
this.applyTechnicalTitles = applyTechnicalTitles;
}
public Integer getApplyAuditState() {
return applyAuditState == null ? 0 : applyAuditState;
}

View File

@ -17,30 +17,42 @@ import io.swagger.annotations.ApiModelProperty;
public class ApplyVO {
@ApiModelProperty(name = "applyInstitutionId", value = "报名机构ID")
@CheckEmptyAnnotation(name="报名机构")
private String applyInstitutionId;
@ApiModelProperty(name = "applyClassId", value = "报名班级ID")
@CheckEmptyAnnotation(name="报名计划")
private String applyClassId;
@ApiModelProperty(name = "applyClassName", value = "报名班级名称")
private String applyClassName;
@ApiModelProperty(name = "applyName", value = "报名人姓名")
@CheckEmptyAnnotation(name="姓名")
private String applyName;
@ApiModelProperty(name = "applySex", value = "报名人性别 1男 2女【数据字典】")
@ApiModelProperty(name = "applySex", value = "报名人性别【数据字典】")
@CheckEmptyAnnotation(name="性别")
private String applySex;
@ApiModelProperty(name = "applyDataBirth", value = "报名人出生日期")
@CheckEmptyAnnotation(name="出生日期")
private String applyDataBirth;
@ApiModelProperty(name = "applyCardType", value = "报名人证件类型【数据字典】")
@CheckEmptyAnnotation(name="证件类型")
private String applyCardType;
@ApiModelProperty(name = "applyCardNumber", value = "报名人证件号码")
@CheckEmptyAnnotation(name="证件号码")
private String applyCardNumber;
@ApiModelProperty(name = "applyPhone", value = "报名人手机号码")
@CheckEmptyAnnotation(name="手机号码")
private String applyPhone;
@ApiModelProperty(name = "applyAddress", value = "报名人通讯地址")
@CheckEmptyAnnotation(name="通讯地址")
private String applyAddress;
@ApiModelProperty(name = "applyCultureLevel", value = "报名人文化程度【数据字典】")
@CheckEmptyAnnotation(name="文化程度")
private String applyCultureLevel;
@ApiModelProperty(name = "applyPostcode", value = "报名人邮编")
@CheckEmptyAnnotation(name="邮编")
private String applyPostcode;
@ApiModelProperty(name = "applyPhysicalState", value = "报名人身体状态【数据字典】")
@CheckEmptyAnnotation(name="身体状态")
private String applyPhysicalState;
@ApiModelProperty(name = "applyUnitName", value = "报名人单位名称")
private String applyUnitName;
@ -48,7 +60,15 @@ public class ApplyVO {
private String applyUnitPhone;
@ApiModelProperty(name = "applyUnitAddress", value = "报名人单位地址")
private String applyUnitAddress;
@ApiModelProperty(name = "applyPosition", value = "报名人职务")
@CheckEmptyAnnotation(name="职务")
private String applyPosition;
@ApiModelProperty(name = "applyMajorYear", value = "报名人从事专业年限")
private int applyMajorYear;
@ApiModelProperty(name = "applyTechnicalTitles", value = "报名人技术职称")
private String applyTechnicalTitles;
@ApiModelProperty(name = "applyUserCardPhoto", value = "证件照片")
@CheckEmptyAnnotation(name="证件照片")
private String applyUserCardPhoto;
public String getApplyInstitutionId() {
@ -179,6 +199,30 @@ public class ApplyVO {
this.applyUnitAddress = applyUnitAddress;
}
public String getApplyPosition() {
return applyPosition;
}
public void setApplyPosition(String applyPosition) {
this.applyPosition = applyPosition;
}
public int getApplyMajorYear() {
return applyMajorYear;
}
public void setApplyMajorYear(int applyMajorYear) {
this.applyMajorYear = applyMajorYear;
}
public String getApplyTechnicalTitles() {
return applyTechnicalTitles;
}
public void setApplyTechnicalTitles(String applyTechnicalTitles) {
this.applyTechnicalTitles = applyTechnicalTitles;
}
public String getApplyUserCardPhoto() {
return applyUserCardPhoto == null ? "" : applyUserCardPhoto.trim();
}

View File

@ -118,22 +118,22 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
public SuccessResultList<List<ApplyClassPlanDTO>> listPageApplyClassPlan(ListPage page) throws Exception{
List<ApplyClassPlanDTO> list= new ArrayList<>();
String applyCardNumber = page.getParams().get("applyCardNumber").toString();
String projectCatalogId = page.getParams().get("projectCatalogId").toString();
String workerCatalog = page.getParams().get("workerCatalog").toString();
String planType = page.getParams().get("planType").toString();
page.getParams().put("reportType",2);
page.getParams().put("signNowDate",DateUtil.getTime());
if(StringUtils.isBlank(applyCardNumber)){
throw new ParamsException("请填写证件号");
}
if(StringUtils.isBlank(projectCatalogId)){
if(StringUtils.isBlank(workerCatalog)){
throw new ParamsException("请选择报考工种");
}
if(StringUtils.isBlank(planType)){
throw new ParamsException("请选择报考类型");
}
PageHelper.startPage(page.getPage(), page.getRows());
List<ClassPlanDTO> classPlanDTOList = classPlanService.list(page.getParams());
for (ClassPlanDTO classPlanDTO : classPlanDTOList) {
SuccessResultList<List<ClassPlanDTO>> classPlanDTOList = classPlanService.listPage(page);
for (ClassPlanDTO classPlanDTO : classPlanDTOList.getRows()) {
ApplyClassPlanDTO applyClassPlanDTO = new ApplyClassPlanDTO();
int applyClassPlanState = countApplyCardNumber(applyCardNumber,classPlanDTO.getClassPlanId());
applyClassPlanDTO.setApplyClassPlanState(applyClassPlanState == 0 ? 0:1);
@ -141,8 +141,7 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
BeanUtils.copyProperties(applyClassPlanDTO,classPlanDTO);
list.add(applyClassPlanDTO);
}
PageInfo<ApplyClassPlanDTO> pageInfo = new PageInfo<>(list);
return new SuccessResultList<>(list, pageInfo.getPageNum(), pageInfo.getTotal());
return new SuccessResultList<>(list, classPlanDTOList.getPage(), classPlanDTOList.getTotal());
}
public List<ApplyDTO> listByClassId(String classId){

View File

@ -112,7 +112,6 @@ public class WorkTypeServiceImpl extends DefaultBaseService implements IWorkType
@Override
public void update(String token, String workTypeId, WorkTypeVO workTypeVO) {
checkCode(workTypeVO.getWorkTypeCode());
Map<String, Object> params = HashMapUtil.beanToMap(workTypeVO);
params.put("workTypeId", workTypeId);
if (StringUtils.isBlank(token)) {

View File

@ -20,6 +20,13 @@
<result column="apply_unit_name" property="applyUnitName"/>
<result column="apply_unit_phone" property="applyUnitPhone"/>
<result column="apply_unit_address" property="applyUnitAddress"/>
<result column="apply_position" property="applyPosition"/>
<result column="apply_major_year" property="applyMajorYear"/>
<result column="apply_technical_titles" property="applyTechnicalTitles"/>
<result column="apply_user_card_photo" property="applyUserCardPhoto"/>
<result column="apply_audit_state" property="applyAuditState"/>
<result column="gmt_create" property="gmtCreate"/>
@ -48,6 +55,9 @@
<result column="apply_unit_name" property="applyUnitName"/>
<result column="apply_unit_phone" property="applyUnitPhone"/>
<result column="apply_unit_address" property="applyUnitAddress"/>
<result column="apply_position" property="applyPosition"/>
<result column="apply_major_year" property="applyMajorYear"/>
<result column="apply_technical_titles" property="applyTechnicalTitles"/>
<result column="apply_user_card_photo" property="applyUserCardPhoto"/>
<result column="apply_audit_state" property="applyAuditState"/>
<result column="creator" property="creator"/>
@ -73,6 +83,9 @@
<result column="apply_postcode" property="applyPostcode"/>
<result column="apply_physical_state" property="applyPhysicalState"/>
<result column="apply_unit_name" property="applyUnitName"/>
<result column="apply_position" property="applyPosition"/>
<result column="apply_major_year" property="applyMajorYear"/>
<result column="apply_technical_titles" property="applyTechnicalTitles"/>
<result column="apply_unit_phone" property="applyUnitPhone"/>
<result column="apply_unit_address" property="applyUnitAddress"/>
<result column="apply_user_card_photo" property="applyUserCardPhoto"/>
@ -98,10 +111,6 @@
<!-- 新增报名信息 -->
<insert id="save" parameterType="map">
INSERT INTO e_apply(
@ -123,6 +132,9 @@
apply_unit_phone,
apply_unit_address,
apply_user_card_photo,
apply_position,
apply_major_year,
apply_technical_titles,
apply_audit_state,
creator,
gmt_create,
@ -148,6 +160,9 @@
#{applyUnitPhone},
#{applyUnitAddress},
#{applyUserCardPhoto},
#{applyPosition},
#{applyMajorYear},
#{applyTechnicalTitles},
#{applyAuditState},
#{creator},
#{gmtCreate},
@ -232,6 +247,15 @@
</if>
<if test="applyUserCardPhoto != null and applyUserCardPhoto != ''">
apply_user_card_photo = #{applyUserCardPhoto},
</if>
<if test="applyPosition != null and applyPosition != ''">
apply_position = #{applyPosition},
</if>
<if test="applyMajorYear != null and applyMajorYear != ''">
apply_major_year = #{applyMajorYear},
</if>
<if test="applyTechnicalTitles != null and applyTechnicalTitles != ''">
apply_technical_titles = #{applyTechnicalTitles},
</if>
<if test="applyAuditState != null">
apply_audit_state = #{applyAuditState},
@ -262,6 +286,9 @@
t1.apply_unit_phone,
t1.apply_unit_address,
t1.apply_user_card_photo,
t1.apply_position,
t1.apply_major_year,
t1.apply_technical_titles,
t1.apply_audit_state,
t1.apply_id,
t1.creator,
@ -309,6 +336,9 @@
t1.apply_unit_phone,
t1.apply_unit_address,
t1.apply_user_card_photo,
t1.apply_position,
t1.apply_major_year,
t1.apply_technical_titles,
t1.apply_audit_state,
t1.creator,
t1.gmt_create,
@ -346,6 +376,9 @@
t1.apply_unit_phone,
t1.apply_unit_address,
t1.apply_user_card_photo,
t1.apply_position,
t1.apply_major_year,
t1.apply_technical_titles,
t1.apply_audit_state,
t1.creator,
t1.gmt_create,
@ -381,6 +414,9 @@
t1.apply_physical_state,
t1.apply_unit_name,
t1.apply_unit_phone,
t1.apply_position,
t1.apply_major_year,
t1.apply_technical_titles,
t1.apply_unit_address,
t1.apply_user_card_photo,
t1.apply_audit_state,
@ -468,6 +504,9 @@
t1.apply_unit_phone,
t1.apply_unit_address,
t1.apply_user_card_photo,
t1.apply_position,
t1.apply_major_year,
t1.apply_technical_titles,
t1.apply_audit_state,
t1.creator,
t1.gmt_create,
@ -522,6 +561,9 @@
t1.apply_unit_phone,
t1.apply_unit_address,
t1.apply_user_card_photo,
t1.apply_position,
t1.apply_major_year,
t1.apply_technical_titles,
t1.apply_audit_state,
t1.creator,
t1.gmt_create,

View File

@ -69,7 +69,26 @@
</div>
</div>
</div>
<div class="layui-form-item layui-col-space10">
<div class="layui-col-md4">
<label class="layui-form-label">职务</label>
<div class="layui-input-block">
<input type="text" id="applyPosition" name="applyPosition" class="layui-input" value="" placeholder="无" lay-verify="required" readonly style="cursor: pointer;">
</div>
</div>
<div class="layui-col-md4">
<label class="layui-form-label">从业年限</label>
<div class="layui-input-block">
<input type="number" id="applyMajorYear" name="applyMajorYear" class="layui-input" value="" placeholder="无" maxlength="50" readonly="readonly">
</div>
</div>
<div class="layui-col-md4">
<label class="layui-form-label">技术职称</label>
<div class="layui-input-block">
<input type="text" id="applyTechnicalTitles" name="applyTechnicalTitles" class="layui-input" value="" placeholder="无" readonly="readonly">
</div>
</div>
</div>
<div class="layui-form-item layui-col-space10">
<div class="layui-col-md4">
<label class="layui-form-label">证件类型</label>

View File

@ -70,6 +70,28 @@
</div>
</div>
<div class="layui-form-item layui-col-space10">
<div class="layui-col-md4">
<label class="layui-form-label">职务</label>
<div class="layui-input-block">
<input type="text" id="applyPosition" name="applyPosition" class="layui-input" value="" placeholder="无" lay-verify="required" readonly style="cursor: pointer;">
</div>
</div>
<div class="layui-col-md4">
<label class="layui-form-label">从业年限</label>
<div class="layui-input-block">
<input type="number" id="applyMajorYear" name="applyMajorYear" class="layui-input" value="" placeholder="无" maxlength="50" readonly="readonly">
</div>
</div>
<div class="layui-col-md4">
<label class="layui-form-label">技术职称</label>
<div class="layui-input-block">
<input type="text" id="applyTechnicalTitles" name="applyTechnicalTitles" class="layui-input" value="" placeholder="无" readonly="readonly">
</div>
</div>
</div>
<div class="layui-form-item layui-col-space10">
<div class="layui-col-md4">
<label class="layui-form-label">证件类型</label>

View File

@ -38,7 +38,7 @@
<div class="layui-form-item">
<label class="layui-form-label">工种编码</label>
<div class="layui-input-block">
<input type="text" id="workTypeCode" name="workTypeCode" class="layui-input" value="" placeholder="请输入工种编码" maxlength="100" lay-verify="required">
<input type="text" id="workTypeCode" name="workTypeCode" class="layui-input" value="" placeholder="请输入工种编码" maxlength="100" lay-verify="required" readonly="readonly">
</div>
</div>
<div class="layui-form-item">