From a907570ccc61019779a46b93a2e6aa2f0cc355f7 Mon Sep 17 00:00:00 2001 From: wans <747101512@qq.com> Date: Sat, 8 May 2021 16:51:17 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=80=83=E8=AF=95?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/classplan/ClassPlanController.java | 21 +- .../BasicStaffInfoAppController.java | 53 +++ .../classplan/impl/ClassPlanServiceImpl.java | 5 + .../mapper/classplan/class-plan-mapper.xml | 3 + .../route/classplan/list-report-exam.html | 398 ++++++++++++++++++ .../static/route/classplan/list.html | 23 +- .../static/route/classplan/save.html | 15 +- .../static/route/classplan/update.html | 4 + 8 files changed, 513 insertions(+), 9 deletions(-) create mode 100644 src/main/java/cn/com/tenlion/controller/app/api/basicstaffinfo/BasicStaffInfoAppController.java create mode 100644 src/main/resources/static/route/classplan/list-report-exam.html 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/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/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 @@ - -