[新增] 工作流工作台 及权限申请流程
This commit is contained in:
@@ -329,7 +329,7 @@ public class ReportManageConroller {
|
||||
* @throws ParseException
|
||||
*/
|
||||
@ApiOperation("添加报告")
|
||||
@GetMapping("/addReportPage")
|
||||
@PostMapping("/addReportPage")
|
||||
public ResponseMessage addReportPage(@RequestBody ReportQueryVo vo) throws Exception {
|
||||
IPage<ReportVo> reportVoIPage = reportService.addReportPage(vo);
|
||||
return Result.success(reportVoIPage);
|
||||
|
||||
@@ -42,4 +42,7 @@ public interface PowerApplyActDao extends BaseMapper<PowerApplyAct> {
|
||||
* @description 列表查询
|
||||
*/
|
||||
List<PowerApplyAct> queryList(@Param("pageVO") PowerApplyActPageVO powerApplyActPageVO);
|
||||
|
||||
int batchInsert(@Param("list")List<PowerApplyAct> powerApplyActs);
|
||||
|
||||
}
|
||||
|
||||
@@ -48,10 +48,12 @@ public class PowerApply {
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 申请原因
|
||||
* 权限 1 预览
|
||||
* 2 预览 + 下载
|
||||
*/
|
||||
@TableField("power")
|
||||
private Integer power;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
|
||||
@@ -42,11 +42,24 @@ public class PowerApplyAct {
|
||||
private String dataId;
|
||||
|
||||
/**
|
||||
* 报告名称
|
||||
* 报告id
|
||||
*/
|
||||
@TableField("report_id")
|
||||
private String reportId;
|
||||
|
||||
/**
|
||||
* 权限 1 预览
|
||||
* 2 预览 + 下载
|
||||
*/
|
||||
@TableField("power")
|
||||
private Integer power;
|
||||
|
||||
/**
|
||||
* 申请原因
|
||||
*/
|
||||
@TableField("apply_reason")
|
||||
private String applyReason;
|
||||
|
||||
/**
|
||||
* 申请人
|
||||
*/
|
||||
|
||||
@@ -24,11 +24,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import io.swagger.models.auth.In;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
@@ -38,7 +34,6 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import javax.annotation.Resource;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -354,14 +349,14 @@ public class IReportServiceImpl extends ServiceImpl<ReportDao, ReportEntity>
|
||||
page.setSize(vo.getPageSize());
|
||||
|
||||
//判断是不是管理员
|
||||
boolean admin = CommonUtils.isAdmin();
|
||||
if (admin) {
|
||||
vo.setUsid(null);
|
||||
} else {
|
||||
vo.setUsid(CommonUtils.getUserId());
|
||||
}
|
||||
|
||||
// boolean admin = CommonUtils.isAdmin();
|
||||
// if (admin) {
|
||||
// vo.setUsid(null);
|
||||
// } else {
|
||||
// vo.setUsid(CommonUtils.getUserId());
|
||||
// }
|
||||
|
||||
vo.setUsid(CommonUtils.getUserId());
|
||||
IPage<ReportVo> list = reportDao.getAddReportPage(page, vo);
|
||||
|
||||
return list;
|
||||
|
||||
@@ -46,4 +46,6 @@ public class ReportQueryVo {
|
||||
*/
|
||||
private String usid;
|
||||
|
||||
private List<String> ids;
|
||||
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
<result column="update_date" property="updateDate" />
|
||||
<result column="update_user_id" property="updateUserId" />
|
||||
<result column="del_flag" property="delFlag" />
|
||||
<result column="power" property="power" />
|
||||
<result column="apply_reason" property="applyReason" />
|
||||
</resultMap>
|
||||
|
||||
<!--表名信息-->
|
||||
@@ -24,14 +26,13 @@
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="BaseColumnList">
|
||||
id,
|
||||
prc_id, task_id, data_id,user_id,report_id,create_user_id,create_date,update_date,update_user_id,del_flag
|
||||
id, prc_id, task_id, data_id, report_id, power, apply_reason, user_id, create_user_id, create_date, update_date, update_user_id, del_flag
|
||||
</sql>
|
||||
|
||||
<!-- 查询条件 -->
|
||||
<sql id="BaseQuerySql">
|
||||
<where>
|
||||
AND del = '${@com.adc.da.sys.constant.YesOrNoEnum@NO.value}'
|
||||
AND del_flag = '${@com.adc.da.sys.constant.YesOrNoEnum@NO.value}'
|
||||
<if test="pageVO != null">
|
||||
<if test="pageVO.prcId !=null and pageVO.prcId !=''">
|
||||
AND prc_id LIKE CONCAT(CONCAT('%',#{pageVO.prcId}),'%')
|
||||
@@ -52,6 +53,15 @@
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<insert id="batchInsert" parameterType="java.util.List">
|
||||
insert into power_apply_act (id, prc_id, task_id, data_id, report_id, power, apply_reason, user_id, create_user_id, create_date, update_date, update_user_id, del_flag)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id}, #{item.prcId}, #{item.taskId}, #{item.dataId}, #{item.reportId}, #{item.power}, #{item.applyReason}, #{item.userId}, #{item.createUserId}, #{item.createDate}, #{item.updateDate}, #{item.updateUserId}, #{item.delFlag})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
||||
<!-- 根据查询VO进行分页查询 -->
|
||||
<select id="selectPage" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
<result column="update_date" property="updateDate" />
|
||||
<result column="update_user_id" property="updateUserId" />
|
||||
<result column="del_flag" property="delFlag" />
|
||||
<result column="power" property="power" />
|
||||
<result column="apply_reason" property="applyReason" />
|
||||
</resultMap>
|
||||
|
||||
<!--表名信息-->
|
||||
@@ -22,8 +24,7 @@
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="BaseColumnList">
|
||||
id,
|
||||
data_id,report_id,user_id,create_user_id,create_date,update_date,update_user_id,del_flag
|
||||
id,data_id, report_id, power, apply_reason, user_id, create_user_id, create_date, update_date, update_user_id, del_flag
|
||||
</sql>
|
||||
|
||||
<!-- 查询条件 -->
|
||||
|
||||
@@ -141,7 +141,13 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<!--id搜索-->
|
||||
<if test="Vo.ids !=null and Vo.ids.size() > 0">
|
||||
and Vo.ids in
|
||||
<foreach collection="Vo.ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<!--用户搜索-->
|
||||
<if test="Vo.usid != null and Vo.usid != ''">
|
||||
@@ -164,11 +170,28 @@
|
||||
|
||||
|
||||
<select id="getAddReportPage" resultType="com.adc.da.report.vo.ReportVo">
|
||||
select * from TT_REPORT_MANAGE
|
||||
SELECT a.*
|
||||
from (
|
||||
select * from TT_REPORT_MANAGE eo
|
||||
LEFT JOIN tr_report_user ru on eo.id = ru.reportId
|
||||
WHERE eo.DEL_FLAG = 0 and ru.userId != #{pageVO.usid}
|
||||
|
||||
<if test="pageVO.name !='' and pageVO.name != null">
|
||||
and name like CONCAT(CONCAT('%',#{pageVO.name}),'%')
|
||||
</if>
|
||||
<!--年份搜索-->
|
||||
<if test="pageVO.year != null and pageVO.year.size() > 0">
|
||||
and year in
|
||||
<foreach collection="pageVO.year" item="year" open="(" separator="," close=")">
|
||||
#{year}
|
||||
</foreach>
|
||||
</if>
|
||||
) a
|
||||
|
||||
LEFT JOIN power_apply pa on pa.report_id = a.id
|
||||
where
|
||||
pa.user_id is null or pa.user_id != #{pageVO.usid}
|
||||
|
||||
<where>
|
||||
del = 0
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user