Initial commit
This commit is contained in:
parent
a2ae924b6c
commit
5abe7e8e44
@ -0,0 +1,59 @@
|
|||||||
|
package com.atguigu.process.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.atguigu.common.result.Result;
|
||||||
|
import com.atguigu.process.service.OaProcessService;
|
||||||
|
import com.atguigu.vo.process.ProcessQueryVo;
|
||||||
|
import com.atguigu.vo.process.ProcessVo;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.annotations.ApiParam;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 审批类型 前端控制器
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author yovinchen
|
||||||
|
* @since 2023-06-20
|
||||||
|
*/
|
||||||
|
@Api(tags = "审批流管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(value = "/admin/process")
|
||||||
|
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||||
|
public class OaProcessController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private OaProcessService oaprocessService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取分页列表
|
||||||
|
*
|
||||||
|
* @param page
|
||||||
|
* @param limit
|
||||||
|
* @param processQueryVo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PreAuthorize("hasAuthority('bnt.process.list')")
|
||||||
|
@ApiOperation(value = "获取分页列表")
|
||||||
|
@GetMapping("{page}/{limit}")
|
||||||
|
public Result index(@ApiParam(name = "page", value = "当前页码", required = true) @PathVariable Long page,
|
||||||
|
|
||||||
|
@ApiParam(name = "limit", value = "每页记录数", required = true) @PathVariable Long limit,
|
||||||
|
|
||||||
|
@ApiParam(name = "processQueryVo", value = "查询对象", required = false) ProcessQueryVo processQueryVo) {
|
||||||
|
Page<ProcessVo> pageParam = new Page<>(page, limit);
|
||||||
|
IPage<ProcessVo> pageModel = oaprocessService.selectPage(pageParam, processQueryVo);
|
||||||
|
return Result.ok(pageModel);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.atguigu.process.mapper;
|
||||||
|
|
||||||
|
import com.atguigu.model.process.Process;
|
||||||
|
import com.atguigu.vo.process.ProcessQueryVo;
|
||||||
|
import com.atguigu.vo.process.ProcessVo;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 审批类型 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author yovinchen
|
||||||
|
* @since 2023-06-20
|
||||||
|
*/
|
||||||
|
public interface OaProcessMapper extends BaseMapper<Process> {
|
||||||
|
|
||||||
|
//审批管理列表
|
||||||
|
IPage<ProcessVo> selectPage(Page<ProcessVo> pageInfo, @Param("vo") ProcessQueryVo processQueryVo);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.atguigu.process.mapper.OaProcessMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectPage" resultType="com.atguigu.vo.process.ProcessVo">
|
||||||
|
SELECT
|
||||||
|
a.id,a.process_code,a.user_id,a.process_template_id,a.process_type_id,a.title,a.description,a.form_values,a.process_instance_id,a.current_auditor,a.status,a.create_time,a.update_time,
|
||||||
|
b.name AS processTemplateName,
|
||||||
|
c.name AS processTypeName,
|
||||||
|
d.name
|
||||||
|
FROM oa_process a
|
||||||
|
LEFT JOIN sys_user d ON a.user_id =d.id
|
||||||
|
LEFT JOIN oa_process_template b ON a.process_template_id = b.id
|
||||||
|
LEFT JOIN oa_process_type c ON a.process_type_id = c.id
|
||||||
|
<where>
|
||||||
|
<if test="vo.keyword != null and vo.keyword != ''">
|
||||||
|
and (a.process_code like CONCAT('%',#{vo.keyword},'%') or
|
||||||
|
a.title like CONCAT('%',#{vo.keyword},'%'))
|
||||||
|
</if>
|
||||||
|
<if test="vo.userId != null and vo.userId != ''">
|
||||||
|
and a.user_id = #{vo.userId}
|
||||||
|
</if>
|
||||||
|
<if test="vo.status != null and vo.status != ''">
|
||||||
|
and a.status = #{vo.status}
|
||||||
|
</if>
|
||||||
|
<if test="vo.createTimeBegin != null and vo.createTimeBegin != ''">
|
||||||
|
and a.create_time >= #{vo.createTimeBegin}
|
||||||
|
</if>
|
||||||
|
<if test="vo.createTimeEnd != null and vo.createTimeEnd != ''">
|
||||||
|
and a.create_time <= #{vo.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,28 @@
|
|||||||
|
package com.atguigu.process.service;
|
||||||
|
|
||||||
|
import com.atguigu.model.process.Process;
|
||||||
|
import com.atguigu.vo.process.ProcessQueryVo;
|
||||||
|
import com.atguigu.vo.process.ProcessVo;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 审批类型 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author yovinchen
|
||||||
|
* @since 2023-06-20
|
||||||
|
*/
|
||||||
|
public interface OaProcessService extends IService<Process> {
|
||||||
|
/**
|
||||||
|
* 获取分页列表
|
||||||
|
*
|
||||||
|
* @param pageParam
|
||||||
|
* @param processQueryVo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
|
||||||
|
IPage<ProcessVo> selectPage(Page<ProcessVo> pageParam, ProcessQueryVo processQueryVo);
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
package com.atguigu.process.service.impl;
|
||||||
|
|
||||||
|
import com.atguigu.model.process.Process;
|
||||||
|
import com.atguigu.model.process.ProcessType;
|
||||||
|
import com.atguigu.process.mapper.OaProcessMapper;
|
||||||
|
import com.atguigu.process.service.OaProcessService;
|
||||||
|
import com.atguigu.vo.process.ProcessQueryVo;
|
||||||
|
import com.atguigu.vo.process.ProcessVo;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 审批类型 服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author yovinchen
|
||||||
|
* @since 2023-06-20
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class OaProcessServiceImpl extends ServiceImpl<OaProcessMapper, Process> implements OaProcessService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取分页列表
|
||||||
|
*
|
||||||
|
* @param pageParam
|
||||||
|
* @param processQueryVo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//审批管理列表
|
||||||
|
@Override
|
||||||
|
public IPage<ProcessVo> selectPage(Page<ProcessVo> pageParam, ProcessQueryVo processQueryVo) {
|
||||||
|
IPage<ProcessVo> pageModel = baseMapper.selectPage(pageParam,processQueryVo);
|
||||||
|
return pageModel;
|
||||||
|
}
|
||||||
|
}
|
@ -4,18 +4,18 @@ mybatis-plus:
|
|||||||
configuration:
|
configuration:
|
||||||
# 查看日志
|
# 查看日志
|
||||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||||
mapper-locations: classpath:com/atguigu/auth/mapper/xml/*.xml
|
mapper-locations: classpath:com/atguigu/*/mapper/xml/*.xml
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
datasource:
|
datasource:
|
||||||
type: com.zaxxer.hikari.HikariDataSource
|
type: com.zaxxer.hikari.HikariDataSource
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
# url: jdbc:mysql://43.143.164.194:3306/guigu-oa?useSSL=false&useUnicode=true&characterEncoding=utf8&allowPublicKeyRetrieval=true
|
url: jdbc:mysql://43.143.164.194:3306/guigu-oa?useSSL=false&useUnicode=true&characterEncoding=utf8&allowPublicKeyRetrieval=true
|
||||||
# username: admin
|
username: admin
|
||||||
# password: admin
|
password: admin
|
||||||
url: jdbc:mysql://localhost:3306/guigu-oa?useSSL=false&useUnicode=true&characterEncoding=utf8&allowPublicKeyRetrieval=true
|
# url: jdbc:mysql://localhost:3306/guigu-oa?useSSL=false&useUnicode=true&characterEncoding=utf8&allowPublicKeyRetrieval=true
|
||||||
username: root
|
# username: root
|
||||||
password: root
|
# password: root
|
||||||
jackson:
|
jackson:
|
||||||
date-format: yyyy-MM-dd HH:mm:ss
|
date-format: yyyy-MM-dd HH:mm:ss
|
||||||
time-zone: GMT+8
|
time-zone: GMT+8
|
||||||
|
@ -47,7 +47,7 @@ public class CodeGet {
|
|||||||
// 5、策略配置
|
// 5、策略配置
|
||||||
StrategyConfig strategy = new StrategyConfig();
|
StrategyConfig strategy = new StrategyConfig();
|
||||||
|
|
||||||
strategy.setInclude("oa_process_type","oa_process_template");
|
strategy.setInclude("oa_process");
|
||||||
//数据库表映射到实体的命名策略
|
//数据库表映射到实体的命名策略
|
||||||
strategy.setNaming(NamingStrategy.underline_to_camel);
|
strategy.setNaming(NamingStrategy.underline_to_camel);
|
||||||
//数据库表字段映射到实体的命名策略
|
//数据库表字段映射到实体的命名策略
|
||||||
|
Loading…
Reference in New Issue
Block a user