diff --git a/src/main/java/cn/com/tenlion/controller/app/api/apply/ApplyAppController.java b/src/main/java/cn/com/tenlion/controller/app/api/apply/ApplyAppController.java index e897b6d..dc664d8 100644 --- a/src/main/java/cn/com/tenlion/controller/app/api/apply/ApplyAppController.java +++ b/src/main/java/cn/com/tenlion/controller/app/api/apply/ApplyAppController.java @@ -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("用户撤回报名"); diff --git a/src/main/java/cn/com/tenlion/controller/app/api/worktype/WorkTypeAppController.java b/src/main/java/cn/com/tenlion/controller/app/api/worktype/WorkTypeAppController.java index 1b4e2c1..3ddc75b 100644 --- a/src/main/java/cn/com/tenlion/controller/app/api/worktype/WorkTypeAppController.java +++ b/src/main/java/cn/com/tenlion/controller/app/api/worktype/WorkTypeAppController.java @@ -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 listByParentId(@RequestHeader("token") String token) { + Map params = requestParams(); + return workTypeService.list(params); + } + + + + @ApiOperation(value = "新增工种类型", notes = "新增工种类型接口") @ApiImplicitParams({ @ApiImplicitParam(name = "token", value = "token", paramType = "header") diff --git a/src/main/java/cn/com/tenlion/pojo/bos/apply/ApplyBO.java b/src/main/java/cn/com/tenlion/pojo/bos/apply/ApplyBO.java index 57381c7..e7c2f39 100644 --- a/src/main/java/cn/com/tenlion/pojo/bos/apply/ApplyBO.java +++ b/src/main/java/cn/com/tenlion/pojo/bos/apply/ApplyBO.java @@ -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; } diff --git a/src/main/java/cn/com/tenlion/pojo/dtos/apply/ApplyDTO.java b/src/main/java/cn/com/tenlion/pojo/dtos/apply/ApplyDTO.java index dd239f0..1155815 100644 --- a/src/main/java/cn/com/tenlion/pojo/dtos/apply/ApplyDTO.java +++ b/src/main/java/cn/com/tenlion/pojo/dtos/apply/ApplyDTO.java @@ -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; } diff --git a/src/main/java/cn/com/tenlion/pojo/pos/apply/ApplyPO.java b/src/main/java/cn/com/tenlion/pojo/pos/apply/ApplyPO.java index d262787..bc414d8 100644 --- a/src/main/java/cn/com/tenlion/pojo/pos/apply/ApplyPO.java +++ b/src/main/java/cn/com/tenlion/pojo/pos/apply/ApplyPO.java @@ -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; } diff --git a/src/main/java/cn/com/tenlion/pojo/vos/apply/ApplyVO.java b/src/main/java/cn/com/tenlion/pojo/vos/apply/ApplyVO.java index 8576911..bcc84a3 100644 --- a/src/main/java/cn/com/tenlion/pojo/vos/apply/ApplyVO.java +++ b/src/main/java/cn/com/tenlion/pojo/vos/apply/ApplyVO.java @@ -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(); } diff --git a/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java b/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java index e51412b..ec5d743 100644 --- a/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java @@ -118,22 +118,22 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic public SuccessResultList> listPageApplyClassPlan(ListPage page) throws Exception{ List 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 classPlanDTOList = classPlanService.list(page.getParams()); - for (ClassPlanDTO classPlanDTO : classPlanDTOList) { + SuccessResultList> 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 pageInfo = new PageInfo<>(list); - return new SuccessResultList<>(list, pageInfo.getPageNum(), pageInfo.getTotal()); + return new SuccessResultList<>(list, classPlanDTOList.getPage(), classPlanDTOList.getTotal()); } public List listByClassId(String classId){ diff --git a/src/main/java/cn/com/tenlion/service/worktype/impl/WorkTypeServiceImpl.java b/src/main/java/cn/com/tenlion/service/worktype/impl/WorkTypeServiceImpl.java index b1b3d5a..8d5738b 100644 --- a/src/main/java/cn/com/tenlion/service/worktype/impl/WorkTypeServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/worktype/impl/WorkTypeServiceImpl.java @@ -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 params = HashMapUtil.beanToMap(workTypeVO); params.put("workTypeId", workTypeId); if (StringUtils.isBlank(token)) { diff --git a/src/main/resources/mybatis/mapper/apply/apply-mapper.xml b/src/main/resources/mybatis/mapper/apply/apply-mapper.xml index 3b54ce4..131512d 100644 --- a/src/main/resources/mybatis/mapper/apply/apply-mapper.xml +++ b/src/main/resources/mybatis/mapper/apply/apply-mapper.xml @@ -20,6 +20,13 @@ + + + + + + + @@ -48,6 +55,9 @@ + + + @@ -73,6 +83,9 @@ + + + @@ -98,10 +111,6 @@ - - - - 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 @@ apply_user_card_photo = #{applyUserCardPhoto}, + + + apply_position = #{applyPosition}, + + + apply_major_year = #{applyMajorYear}, + + + apply_technical_titles = #{applyTechnicalTitles}, 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, diff --git a/src/main/resources/static/route/apply/audit.html b/src/main/resources/static/route/apply/audit.html index c6f38e0..153a8dd 100644 --- a/src/main/resources/static/route/apply/audit.html +++ b/src/main/resources/static/route/apply/audit.html @@ -69,7 +69,26 @@ - +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
diff --git a/src/main/resources/static/route/apply/show.html b/src/main/resources/static/route/apply/show.html index 56e8249..b3a8cb2 100644 --- a/src/main/resources/static/route/apply/show.html +++ b/src/main/resources/static/route/apply/show.html @@ -70,6 +70,28 @@
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
diff --git a/src/main/resources/static/route/worktype/update.html b/src/main/resources/static/route/worktype/update.html index de4eccf..8d46850 100644 --- a/src/main/resources/static/route/worktype/update.html +++ b/src/main/resources/static/route/worktype/update.html @@ -38,7 +38,7 @@
- +