diff --git a/src/main/java/cn/com/tenlion/controller/api/classplan/ClassPlanController.java b/src/main/java/cn/com/tenlion/controller/api/classplan/ClassPlanController.java index a1bf0ab..d45f721 100644 --- a/src/main/java/cn/com/tenlion/controller/api/classplan/ClassPlanController.java +++ b/src/main/java/cn/com/tenlion/controller/api/classplan/ClassPlanController.java @@ -6,12 +6,14 @@ import cn.com.tenlion.pojo.dtos.classplan.ClassPlanDTO; import cn.com.tenlion.pojo.dtos.classplan.ClassPlanReportExamDTO; import cn.com.tenlion.pojo.dtos.worktype.WorkTypeDTO; import cn.com.tenlion.pojo.vos.classplan.ClassPlanVO; +import cn.com.tenlion.service.apply.IApplyService; import cn.com.tenlion.service.applystudents.IApplyStudentsService; import cn.com.tenlion.service.classplan.IClassPlanService; import cn.com.tenlion.service.examcheck.IExamCheckService; import cn.com.tenlion.service.worktype.IWorkTypeService; import cn.com.tenlion.uploadlistener.ImportExamScoreListener; import cn.com.tenlion.util.IdCardVerifyUtil; +import cn.com.tenlion.util.ImportErrorData; import com.alibaba.excel.EasyExcel; import com.alibaba.fastjson.JSONObject; import ink.wgink.annotation.CheckRequestBodyAnnotation; @@ -59,6 +61,8 @@ public class ClassPlanController extends DefaultBaseController { @Autowired private IApplyStudentsService applyStudentsService; @Autowired + private IApplyService applyService; + @Autowired private IDataService dataService; @ApiOperation(value = "新增", notes = "新增接口") @@ -477,4 +481,45 @@ public class ClassPlanController extends DefaultBaseController { } EasyExcel.write(response.getOutputStream()).sheet("人员信息表").head(listHeader).doWrite(listData); } + + @GetMapping("export-apply-user-excel") + public void exportApplyUserExcel(HttpServletResponse response) throws IOException { + Map params = requestParams(); + String [] headers = { + "姓名","性别","身份证号","手机号码","学历","作业类别","准操项目","单位","初训/复训/换证","审核状态"}; + String excelName = "报名信息表"; + String fileName = URLEncoder.encode(excelName, "UTF-8"); + response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); + List> listHeader = new ArrayList<>(); + for(String item : headers) { + List title = new ArrayList<>(); + title.add(item); + listHeader.add(title); + } + if(params.get("applyAuditStates") != null + && params.get("applyAuditStates").toString().length() > 0){ + params.put("applyAuditStates", Arrays.asList(params.get("applyAuditStates").toString().split(","))); + } + List> listData = new ArrayList<>(); + List list = applyService.list(params); + for (ApplyDTO item : list) { + List el = new ArrayList<>(); + el.add(item.getApplyName()); + String gender = IdCardVerifyUtil.getIdCardGender(item.getApplyCardNumber()); + el.add("1".equals(gender) ? "男" : "0".equals(gender) ? "女" : ""); + el.add(item.getApplyCardNumber()); + el.add(item.getApplyPhone()); + el.add(item.getApplyCultureLevelName()); + WorkTypeDTO workTypeDTO = workTypeService.get(item.getApplyWorkTypeId()); + el.add(workTypeDTO.getWorkTypeParentName()); + el.add(workTypeDTO.getWorkTypeName()); + el.add(item.getApplyUnitName()); + String fenLei = item.getApplyFenLei(); + el.add("1".equals(fenLei) ? "初训" : "2".equals(fenLei) ? "复训" : "3".equals(fenLei) ? "换证" : ""); + Integer applyAuditState = item.getApplyAuditState(); + el.add(applyAuditState == -1 ? "审核不通过" : applyAuditState == 0 ? "待审核" : applyAuditState == 2 ? "审核通过" : ""); + listData.add(el); + } + EasyExcel.write(response.getOutputStream()).sheet("人员基础信息异常数据").head(listHeader).doWrite(listData); + } } \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/apply/apply-mapper.xml b/src/main/resources/mybatis/mapper/apply/apply-mapper.xml index df47002..38b15d4 100644 --- a/src/main/resources/mybatis/mapper/apply/apply-mapper.xml +++ b/src/main/resources/mybatis/mapper/apply/apply-mapper.xml @@ -508,6 +508,8 @@ t1.apply_name LIKE CONCAT('%', #{keywords}, '%') OR t1.apply_card_number LIKE CONCAT('%', #{keywords}, '%') + OR + t1.apply_unit_name LIKE CONCAT('%', #{keywords}, '%') ) diff --git a/src/main/resources/static/route/classplan/audit-user-register2.html b/src/main/resources/static/route/classplan/audit-user-register2.html index c14b7d5..b65afdd 100644 --- a/src/main/resources/static/route/classplan/audit-user-register2.html +++ b/src/main/resources/static/route/classplan/audit-user-register2.html @@ -396,7 +396,7 @@ } if(data['applyFenLei'] == '3'){ $('.fuxun-upload').show(); - $('.zaipei-upload').hide(); + $('.zaipei-upload').show(); } form.val('dataForm', dataFormData); form.render(null, 'dataForm'); diff --git a/src/main/resources/static/route/classplan/list-signup.html b/src/main/resources/static/route/classplan/list-signup.html index 02165c2..362d8f8 100644 --- a/src/main/resources/static/route/classplan/list-signup.html +++ b/src/main/resources/static/route/classplan/list-signup.html @@ -63,7 +63,7 @@
+ style="width: 170px" autocomplete="off" placeholder="姓名|手机号|身份证|单位">
手动报名 +
+