diff --git a/src/main/java/cn/com/tenlion/controller/api/apply/ApplyController.java b/src/main/java/cn/com/tenlion/controller/api/apply/ApplyController.java index 416720a..1794f07 100644 --- a/src/main/java/cn/com/tenlion/controller/api/apply/ApplyController.java +++ b/src/main/java/cn/com/tenlion/controller/api/apply/ApplyController.java @@ -16,6 +16,7 @@ import cn.com.tenlion.pojo.dtos.apply.ApplyDTO; import cn.com.tenlion.pojo.vos.apply.ApplyVO; import cn.com.tenlion.service.apply.IApplyService; import io.swagger.annotations.*; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -149,6 +150,9 @@ public class ApplyController extends DefaultBaseController { @GetMapping("listpage") public SuccessResultList> listPage(ListPage page) { Map params = requestParams(); + if(!StringUtils.isBlank(params.get("applyAuditStates").toString())){ + params.put("applyAuditStates",Arrays.asList(params.get("applyAuditStates"))); + } page.setParams(params); return applyService.listPage(page); } 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 a1389a2..222d52b 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 @@ -12,6 +12,7 @@ import ink.wgink.pojo.result.SuccessResultList; import cn.com.tenlion.pojo.dtos.classplan.ClassPlanDTO; import cn.com.tenlion.pojo.vos.classplan.ClassPlanVO; import cn.com.tenlion.service.classplan.IClassPlanService; +import ink.wgink.util.date.DateUtil; import io.swagger.annotations.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -86,7 +87,7 @@ public class ClassPlanController extends DefaultBaseController { return classPlanService.list(params); } - @ApiOperation(value = "分页列表", notes = "分页列表接口") + @ApiOperation(value = "培训计划分页列表", notes = "分页列表接口") @ApiImplicitParams({ @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"), @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"), @@ -102,6 +103,24 @@ public class ClassPlanController extends DefaultBaseController { return classPlanService.listPage(page); } + @ApiOperation(value = "考试申请分页列表", notes = "考试申请分页列表接口") + @ApiImplicitParams({ + @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("list-page-exam") + public SuccessResultList> listPageExam(ListPage page) { + Map params = requestParams(); + params.put("examNowDate", DateUtil.getTime()); + params.put("reportType", "2"); + page.setParams(params); + return classPlanService.listPage(page); + } + @ApiOperation(value = "统计", notes = "统计接口") @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @GetMapping("count") diff --git a/src/main/java/cn/com/tenlion/controller/app/api/basicstaffinfo/BasicStaffInfoAppController.java b/src/main/java/cn/com/tenlion/controller/app/api/basicstaffinfo/BasicStaffInfoAppController.java new file mode 100644 index 0000000..f77bb45 --- /dev/null +++ b/src/main/java/cn/com/tenlion/controller/app/api/basicstaffinfo/BasicStaffInfoAppController.java @@ -0,0 +1,53 @@ +package cn.com.tenlion.controller.app.api.basicstaffinfo; + +import cn.com.tenlion.staff.pojo.dtos.basicstaffinfo.BasicStaffInfoDTO; +import cn.com.tenlion.staff.pojo.vos.basicstaffinfo.BasicStaffInfoVO; +import cn.com.tenlion.staff.service.basicstaffinfo.IBasicStaffInfoService; +import ink.wgink.common.base.DefaultBaseController; +import ink.wgink.exceptions.SaveException; +import ink.wgink.interfaces.consts.ISystemConstant; +import ink.wgink.pojo.result.ErrorResult; +import ink.wgink.pojo.result.SuccessResult; +import io.swagger.annotations.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * 人员信息接口 + * @ClassName: ExamCheckAppController + * @Description: + * @Author: CodeFactory + * @Date: 2021-05-04 14:47:38 + * @Version: 3.0 + **/ +@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "人员信息接口") +@RestController +@RequestMapping(ISystemConstant.APP_PREFIX + "/basic-staff-info") +public class BasicStaffInfoAppController extends DefaultBaseController { + + @Autowired + private IBasicStaffInfoService basicStaffInfoService; + + @ApiOperation(value = "查询个人资料信息", notes = "查询个人资料信息接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("get-basic-staff-info") + public BasicStaffInfoDTO getBasicStaffInfo(@RequestHeader("token") String token) { + return basicStaffInfoService.getBindUserAccount(token); + } + + @ApiOperation(value = "保存个人信息", notes = "保存个人信息接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PostMapping("save") + public SuccessResult save(@RequestHeader("token") String token, + @RequestBody BasicStaffInfoVO basicStaffInfoVO) throws SaveException { + basicStaffInfoService.save(token, basicStaffInfoVO); + return new SuccessResult(); + } + +} \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/controller/app/api/traininginstitution/TrainingInstitutionController.java b/src/main/java/cn/com/tenlion/controller/app/api/traininginstitution/TrainingInstitutionController.java new file mode 100644 index 0000000..9b8c3d4 --- /dev/null +++ b/src/main/java/cn/com/tenlion/controller/app/api/traininginstitution/TrainingInstitutionController.java @@ -0,0 +1,61 @@ +package cn.com.tenlion.controller.app.api.traininginstitution; + +import cn.com.tenlion.institutionmanagement.pojo.dtos.institution.InstitutionDTO; +import cn.com.tenlion.institutionmanagement.service.institution.IInstitutionService; +import ink.wgink.common.base.DefaultBaseController; +import ink.wgink.interfaces.consts.ISystemConstant; +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.result.ErrorResult; +import ink.wgink.pojo.result.SuccessResultList; +import io.swagger.annotations.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; +import java.util.Map; + +/** + * 培训机构 + */ + +@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "培训机构接口") +@RestController +@RequestMapping(ISystemConstant.APP_PREFIX + "/traininginstitution") +public class TrainingInstitutionController extends DefaultBaseController { + @Autowired + private IInstitutionService iInstitutionService; + + + @ApiOperation(value = "培训机构分页列表", notes = "培训机构分页列表接口") + @ApiImplicitParams({ + @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("listpage"+ISystemConstant.APP_RELEASE_SUFFIX) + public SuccessResultList> listPage(ListPage page) { + Map params = requestParams(); + params.put("institutionType","training"); + page.setParams(params); + return iInstitutionService.listPage(page); + } + + + @ApiOperation(value = "培训机构详情(通过ID)", notes = "培训机构详情(通过ID)接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "applyId", value = "培训机构ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("get/"+ISystemConstant.APP_RELEASE_SUFFIX+"/{applyId}") + public InstitutionDTO get( @PathVariable("applyId") String applyId) { + return iInstitutionService.get(applyId); + } + + +} diff --git a/src/main/java/cn/com/tenlion/service/classplan/impl/ClassPlanServiceImpl.java b/src/main/java/cn/com/tenlion/service/classplan/impl/ClassPlanServiceImpl.java index c5fbae0..d5d4b1a 100644 --- a/src/main/java/cn/com/tenlion/service/classplan/impl/ClassPlanServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/classplan/impl/ClassPlanServiceImpl.java @@ -27,6 +27,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -278,6 +279,10 @@ public class ClassPlanServiceImpl extends DefaultBaseService implements IClassPl @Override public SuccessResultList> listPage(ListPage page) { + if(page.getParams().get("orgId") == null + || page.getParams().get("orgId").toString().length() == 0){ + return new SuccessResultList<>(new ArrayList<>(), 0, 0L); + } PageHelper.startPage(page.getPage(), page.getRows()); List classPlanDTOs = list(page.getParams()); for(ClassPlanDTO item : classPlanDTOs){ diff --git a/src/main/resources/mybatis/mapper/classplan/class-plan-mapper.xml b/src/main/resources/mybatis/mapper/classplan/class-plan-mapper.xml index 21bff99..8bfdf82 100644 --- a/src/main/resources/mybatis/mapper/classplan/class-plan-mapper.xml +++ b/src/main/resources/mybatis/mapper/classplan/class-plan-mapper.xml @@ -299,6 +299,9 @@ AND t1.sign_up_start_time #{signNowDate} AND t1.sign_up_end_time = ]]> #{signNowDate} + + AND t1.sign_up_end_time #{examNowDate} + AND t1.plan_type = #{planType} diff --git a/src/main/resources/static/route/apply/list.html b/src/main/resources/static/route/apply/list.html index 5233e83..9dd2132 100644 --- a/src/main/resources/static/route/apply/list.html +++ b/src/main/resources/static/route/apply/list.html @@ -28,6 +28,16 @@
+
+ +
@@ -242,7 +252,8 @@ where: { keywords: $('#keywords').val(), startTime: $('#startTime').val(), - endTime: $('#endTime').val() + endTime: $('#endTime').val(), + applyAuditStates:$('#applyAuditStates').val() }, page: { curr: currentPage diff --git a/src/main/resources/static/route/classplan/list-report-exam.html b/src/main/resources/static/route/classplan/list-report-exam.html new file mode 100644 index 0000000..48841c7 --- /dev/null +++ b/src/main/resources/static/route/classplan/list-report-exam.html @@ -0,0 +1,398 @@ + + + + + + + + + + + + + +
+
+
+
+
+
+
+ +
+
+ +
+
+ +
+ +
+
+ + +
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/static/route/classplan/list.html b/src/main/resources/static/route/classplan/list.html index 3448005..d491be7 100644 --- a/src/main/resources/static/route/classplan/list.html +++ b/src/main/resources/static/route/classplan/list.html @@ -109,7 +109,7 @@ templet: function(row) { var dom = ''; if(row['reportType'] === '0'){ - return '报备'; + return '开班报备'; } if(row['reportType'] === '1'){ return '报备待审'; @@ -117,6 +117,9 @@ if(row['reportType'] === '2'){ return '审核通过'; } + if(row['reportType'] === '3'){ + return '审核不通过'; + } return dom; } }, @@ -369,6 +372,8 @@ table.on('tool(dataTable)', function(obj) { var layEvent = obj.event; + var checkStatus = table.checkStatus('dataTable'); + var checkDatas = checkStatus.data; if(layEvent == 'reportEvent'){ top.dialog.msg('确认提交报备?', { time: 0, @@ -389,7 +394,21 @@ }); } }); - + return; + } + if(layEvent == 'unPassEvent') { + layer.open({ + type: 2, + title: false, + closeBtn: 0, + area: ['100%', '100%'], + shadeClose: true, + anim: 2, + content: top.restAjax.path('route/classplan/update.html?classPlanId={classPlanId}', [obj.data.classPlanId]), + end: function () { + reloadTable(); + } + }); } }) }); diff --git a/src/main/resources/static/route/classplan/save.html b/src/main/resources/static/route/classplan/save.html index d5524a9..9d32ba5 100644 --- a/src/main/resources/static/route/classplan/save.html +++ b/src/main/resources/static/route/classplan/save.html @@ -38,7 +38,7 @@
- +
@@ -215,8 +215,6 @@ - -