| | |
| | | * @param apply 考试报名信息对象 |
| | | */ |
| | | @PostMapping("/submit") |
| | | public R submit(@RequestBody Apply apply) { |
| | | public R submit(@RequestBody Apply apply) throws Exception { |
| | | if (null==apply.getId()){ |
| | | //去生成准考证号码 |
| | | apply.setCandidateNo(getCandidateNo(apply)); |
| | |
| | | //默认通过 |
| | | apply.setApplyStatus(2); |
| | | apply.setApplyTime(new Date()); |
| | | //内网新增 |
| | | arg.test01(arg.url+"/apply/save",apply); |
| | | } |
| | | //内网修改 |
| | | if(null!=apply.getId()){ |
| | | //修改 |
| | | arg.test01(arg.url+"/apply/update",apply); |
| | | } |
| | | return R.status(applyService.saveOrUpdate(apply)); |
| | | } |
| | |
| | | |
| | | |
| | | /** |
| | | * 生成准考证号码 |
| | | * 生成报名编号 |
| | | * @param apply 考试报名信息对象 |
| | | */ |
| | | private String getApplyCode(Apply apply) { |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.common.utils.arg; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | |
| | | * @param examPayment 考试缴费信息对象 |
| | | */ |
| | | @PostMapping("/submit") |
| | | public R submit(@RequestBody ExamPayment examPayment) { |
| | | public R submit(@RequestBody ExamPayment examPayment) throws Exception { |
| | | arg.test01(arg.url+"/examPayment/submit",examPayment); |
| | | return R.status(examPaymentService.saveOrUpdate(examPayment)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping("/remove") |
| | | public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) { |
| | | arg.sendPostRemoveByIds(arg.url+"/examPayment/remove",ids); |
| | | return R.status(examPaymentService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * 懒加载获取部门树形结构(按分类查询) |
| | | */ |
| | | @GetMapping("/lazy-tree-type") |
| | | @ApiOperation(value = "懒加载树形结构", notes = "树形结构") |
| | | public R<List<DeptVO>> LazyTreeType(String deptCategory, Long parentId) { |
| | | List<DeptVO> tree = deptService.lazyTreeType(deptCategory, parentId); |
| | | return R.data(tree); |
| | | } |
| | | |
| | | /** |
| | | * 懒加载获取部门树形结构 |
| | | */ |
| | | @GetMapping("/lazy-trees") |
| | |
| | | @SqlParser(filter=true) |
| | | List<DeptVO> lazyTreeUser(String tenantId, @Param("parentId") Long parentId); |
| | | Long add(Dept dept); |
| | | |
| | | /** |
| | | * 懒加载获取部门树形结构(按分类查询) |
| | | */ |
| | | List<DeptVO> lazyTreeType(String tenantId, String deptCategory, Long parentId); |
| | | } |
| | |
| | | ORDER BY dept.sort |
| | | </select> |
| | | |
| | | <!--懒加载获取部门树形结构(按分类查询)--> |
| | | <select id="lazyTreeType" resultMap="treeNodeResultMap" > |
| | | SELECT |
| | | dept.id, |
| | | dept.parent_id, |
| | | dept.dept_name AS title, |
| | | dept.id AS "value", |
| | | dept.id AS "key", |
| | | ( |
| | | SELECT |
| | | CASE WHEN count(1) > 0 THEN 1 ELSE 0 END |
| | | FROM |
| | | blade_dept |
| | | WHERE |
| | | parent_id = dept.id and is_deleted = 0 |
| | | ) AS "has_children" |
| | | FROM |
| | | blade_dept dept |
| | | WHERE |
| | | dept.parent_id = #{param3} AND dept.is_deleted = 0 |
| | | <if test="param2!=null and param2!=''"> |
| | | and dept.dept_category = #{param2} |
| | | </if> |
| | | <if test="param1!=null and param1!=''"> |
| | | and dept.tenant_id = #{param1} |
| | | </if> |
| | | ORDER BY dept.sort |
| | | </select> |
| | | |
| | | <!--懒加载获取部门树形结构(包含用户数据)--> |
| | | <select id="lazyTreeUser" resultMap="treeNodeResultMap" > |
| | | select DISTINCT * from ( |
| | |
| | | */ |
| | | List<DeptVO> lazyTreeUser(String tenantId, Long parentId); |
| | | Long add(Dept dept); |
| | | |
| | | /** |
| | | * 懒加载获取部门树形结构(按分类查询) |
| | | */ |
| | | List<DeptVO> lazyTreeType(String deptCategory, Long parentId); |
| | | } |
| | |
| | | public Long add(Dept dept) { |
| | | return baseMapper.add(dept); |
| | | } |
| | | |
| | | /** |
| | | * 懒加载获取部门树形结构(按分类查询) |
| | | */ |
| | | @Override |
| | | public List<DeptVO> lazyTreeType(String deptCategory, Long parentId) { |
| | | return ForestNodeMerger.merge(baseMapper.lazyTreeType("000000",deptCategory,parentId)); |
| | | } |
| | | } |
| | |
| | | @TableField("audit_detail") |
| | | private String auditDetail; |
| | | |
| | | /** |
| | | * 审核时间 |
| | | */ |
| | | @TableField("audit_time") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date auditTime; |
| | | |
| | | } |