[新增] 上传报告流程开发
This commit is contained in:
@@ -44,5 +44,7 @@ public interface TtReportManageActDao extends BaseMapper<TtReportManageAct> {
|
|||||||
*/
|
*/
|
||||||
List<TtReportManageAct> queryList(@Param("pageVO") TtReportManageActPageVO ttReportManageActPageVO);
|
List<TtReportManageAct> queryList(@Param("pageVO") TtReportManageActPageVO ttReportManageActPageVO);
|
||||||
|
|
||||||
TtReportManageActPageVO selectByDataId(String dataId);
|
TtReportManageAct selectByDataId(String dataId);
|
||||||
|
|
||||||
|
TtReportManageAct selectByPrcId(String prcId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,6 +95,12 @@ public class ReportEntity {
|
|||||||
@TableField("del_flag")
|
@TableField("del_flag")
|
||||||
private String delFlag;
|
private String delFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保密到期时间
|
||||||
|
*/
|
||||||
|
@TableField("secrecy_last")
|
||||||
|
private Date secrecyLast;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户id列表
|
* 用户id列表
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -113,11 +113,15 @@ public class TtReportManageAct {
|
|||||||
@TableField("del_flag")
|
@TableField("del_flag")
|
||||||
private Integer delFlag;
|
private Integer delFlag;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 权限设置
|
* 保密到期时间
|
||||||
*/
|
*/
|
||||||
|
@TableField("secrecy_last")
|
||||||
|
private Date secrecyLast;
|
||||||
|
|
||||||
|
@TableField("file_name")
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private List<PowerApplyAct> powerList;
|
private List<String> labelList;
|
||||||
}
|
}
|
||||||
|
|||||||
-4
@@ -4,7 +4,6 @@ package com.adc.da.report.service.impl;
|
|||||||
import com.adc.da.report.dao.mysql.PowerApplyDao;
|
import com.adc.da.report.dao.mysql.PowerApplyDao;
|
||||||
import com.adc.da.report.dao.mysql.ReportDao;
|
import com.adc.da.report.dao.mysql.ReportDao;
|
||||||
import com.adc.da.report.dao.mysql.TtReportManageActDao;
|
import com.adc.da.report.dao.mysql.TtReportManageActDao;
|
||||||
import com.adc.da.report.eo.PowerApplyAct;
|
|
||||||
import com.adc.da.report.eo.TtReportManageAct;
|
import com.adc.da.report.eo.TtReportManageAct;
|
||||||
import com.adc.da.report.service.ITtReportManageActService;
|
import com.adc.da.report.service.ITtReportManageActService;
|
||||||
import com.adc.da.report.vo.DeleteParamRequestVO;
|
import com.adc.da.report.vo.DeleteParamRequestVO;
|
||||||
@@ -123,8 +122,5 @@ public class ITtReportManageActServiceImpl extends ServiceImpl<TtReportManageAct
|
|||||||
public void saveReport(TtReportManageAct ttReportManageAct) {
|
public void saveReport(TtReportManageAct ttReportManageAct) {
|
||||||
//保存报告
|
//保存报告
|
||||||
reportDao.saveReportAct(ttReportManageAct);
|
reportDao.saveReportAct(ttReportManageAct);
|
||||||
//保存报告权限数据
|
|
||||||
List<PowerApplyAct> powerList = ttReportManageAct.getPowerList();
|
|
||||||
powerApplyDao.saveBatch(powerList);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,21 +4,26 @@
|
|||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
<sql id="BaseColumnList">
|
<sql id="BaseColumnList">
|
||||||
id,
|
id, name, keycontent, maincontent, department, year, fileId, confidentialLevel, privacyLevel,
|
||||||
data_id, name, keycontent, maincontent, department, year, fileId, confidentialLevel, privacyLevel, createUserId, createDate, updateDate, del_flag
|
createUserId, createDate, updateDate, del_flag,secrecy_last
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<sql id="BaseColumnValue">
|
<sql id="BaseColumnValue">
|
||||||
#{Vo.id},
|
#{Vo.id},#{Vo.name},#{Vo.keycontent},#{Vo.maincontent},#{Vo.department},#{Vo.year},#{Vo.fileId},
|
||||||
#{Vo.dataId},#{Vo.name},#{Vo.keycontent},#{Vo.maincontent},#{Vo.department},#{Vo.year},#{Vo.fileId},
|
|
||||||
#{Vo.confidentialLevel},#{Vo.privacyLevel},
|
#{Vo.confidentialLevel},#{Vo.privacyLevel},
|
||||||
#{Vo.createUserId},
|
#{Vo.createUserId},
|
||||||
#{Vo.createDate},#{Vo.updateDate},#{Vo.del_flag}
|
#{Vo.createDate},#{Vo.updateDate},#{Vo.del_flag},
|
||||||
|
#{Vo.secrecyLast}
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<insert id="saveReportAct">
|
<insert id="saveReportAct">
|
||||||
insert into TT_REPORT_MANAGE (<include refid="BaseColumnList"/>)
|
insert into TT_REPORT_MANAGE (<include refid="BaseColumnList"/>)
|
||||||
value (<include refid="BaseColumnValue"/>)
|
value (
|
||||||
|
#{Vo.dataId},#{Vo.name},#{Vo.keycontent},#{Vo.maincontent},#{Vo.department},#{Vo.year},#{Vo.fileId},
|
||||||
|
#{Vo.confidentialLevel},#{Vo.privacyLevel},
|
||||||
|
#{Vo.createUserId},
|
||||||
|
#{Vo.createDate},#{Vo.updateDate},#{Vo.del_flag},
|
||||||
|
#{Vo.secrecyLast})
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<select id="getReportDateList" parameterType="string" resultType="string">
|
<select id="getReportDateList" parameterType="string" resultType="string">
|
||||||
|
|||||||
@@ -20,6 +20,12 @@
|
|||||||
<result column="createDate" property="createDate" />
|
<result column="createDate" property="createDate" />
|
||||||
<result column="updateDate" property="updateDate" />
|
<result column="updateDate" property="updateDate" />
|
||||||
<result column="del_flag" property="delFlag" />
|
<result column="del_flag" property="delFlag" />
|
||||||
|
<result column="secrecy_last" property="secrecyLast" />
|
||||||
|
<result column="file_name" property="fileName" />
|
||||||
|
<collection property="labelList" ofType="com.adc.da.report.eo.LabelEntity">
|
||||||
|
<id column="lableId" property="id"/>
|
||||||
|
<result column="lableName" property="name"/>
|
||||||
|
</collection>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!--表名信息-->
|
<!--表名信息-->
|
||||||
@@ -31,6 +37,7 @@
|
|||||||
<sql id="BaseColumnList">
|
<sql id="BaseColumnList">
|
||||||
id,
|
id,
|
||||||
task_id, prc_id, data_id, name, keycontent, maincontent, department, year, fileId, confidentialLevel, privacyLevel, createUserId, createDate, updateDate, del_flag
|
task_id, prc_id, data_id, name, keycontent, maincontent, department, year, fileId, confidentialLevel, privacyLevel, createUserId, createDate, updateDate, del_flag
|
||||||
|
,secrecy_last,file_name
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 查询条件 -->
|
<!-- 查询条件 -->
|
||||||
@@ -117,12 +124,30 @@
|
|||||||
<include refid="BaseQuerySql"/>
|
<include refid="BaseQuerySql"/>
|
||||||
ORDER BY create_time DESC
|
ORDER BY create_time DESC
|
||||||
</select>
|
</select>
|
||||||
<select id="selectByDataId" resultType="com.adc.da.report.vo.TtReportManageActPageVO">
|
<select id="selectByDataId" resultMap="BaseResultMap">
|
||||||
SELECT
|
SELECT
|
||||||
<include refid="BaseColumnList"/>
|
a.id,
|
||||||
FROM <include refid="TableName"/>
|
task_id, prc_id, data_id, name, keycontent, maincontent, department, year, fileId, confidentialLevel, privacyLevel, createUserId, createDate, updateDate, del_flag
|
||||||
|
,secrecy_last,file_name
|
||||||
|
,label.label as lableName,label.id as labelId
|
||||||
|
FROM <include refid="TableName"/> a
|
||||||
|
LEFT JOIN ts_report_label rl on rl.report_id = a.data_id
|
||||||
|
LEFT JOIN ts_tree_label label on rl.label_id = label.id
|
||||||
<where>
|
<where>
|
||||||
data_id = #{dataId}
|
data_id = #{dataId}
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectByPrcId" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
a.id,
|
||||||
|
task_id, prc_id, data_id, name, keycontent, maincontent, department, year, fileId, confidentialLevel, privacyLevel, createUserId, createDate, updateDate, del_flag
|
||||||
|
,secrecy_last,file_name
|
||||||
|
,label.label as lableName,label.id as labelId
|
||||||
|
FROM <include refid="TableName"/> a
|
||||||
|
LEFT JOIN ts_report_label rl on rl.report_id = a.data_id
|
||||||
|
LEFT JOIN ts_tree_label label on rl.label_id = label.id
|
||||||
|
<where>
|
||||||
|
prc_id = #{prcId}
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
@@ -4,21 +4,26 @@
|
|||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
<sql id="BaseColumnList">
|
<sql id="BaseColumnList">
|
||||||
id,
|
id, name, keycontent, maincontent, department, year, fileId, confidentialLevel, privacyLevel,
|
||||||
data_id, name, keycontent, maincontent, department, year, fileId, confidentialLevel, privacyLevel, createUserId, createDate, updateDate, del_flag
|
createUserId, createDate, updateDate, del_flag,secrecy_last
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<sql id="BaseColumnValue">
|
<sql id="BaseColumnValue">
|
||||||
#{Vo.id},
|
#{Vo.id},#{Vo.name},#{Vo.keycontent},#{Vo.maincontent},#{Vo.department},#{Vo.year},#{Vo.fileId},
|
||||||
#{Vo.dataId},#{Vo.name},#{Vo.keycontent},#{Vo.maincontent},#{Vo.department},#{Vo.year},#{Vo.fileId},
|
|
||||||
#{Vo.confidentialLevel},#{Vo.privacyLevel},
|
#{Vo.confidentialLevel},#{Vo.privacyLevel},
|
||||||
#{Vo.createUserId},
|
#{Vo.createUserId},
|
||||||
#{Vo.createDate},#{Vo.updateDate},#{Vo.del_flag}
|
#{Vo.createDate},#{Vo.updateDate},#{Vo.del_flag},
|
||||||
|
#{Vo.secrecyLast}
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<insert id="saveReportAct">
|
<insert id="saveReportAct">
|
||||||
insert into TT_REPORT_MANAGE (<include refid="BaseColumnList"/>)
|
insert into TT_REPORT_MANAGE (<include refid="BaseColumnList"/>)
|
||||||
value (<include refid="BaseColumnValue"/>)
|
value (
|
||||||
|
#{Vo.dataId},#{Vo.name},#{Vo.keycontent},#{Vo.maincontent},#{Vo.department},#{Vo.year},#{Vo.fileId},
|
||||||
|
#{Vo.confidentialLevel},#{Vo.privacyLevel},
|
||||||
|
#{Vo.createUserId},
|
||||||
|
#{Vo.createDate},#{Vo.updateDate},#{Vo.del_flag},
|
||||||
|
#{Vo.secrecyLast})
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<select id="getReportDateList" parameterType="string" resultType="string">
|
<select id="getReportDateList" parameterType="string" resultType="string">
|
||||||
|
|||||||
@@ -20,6 +20,12 @@
|
|||||||
<result column="createDate" property="createDate" />
|
<result column="createDate" property="createDate" />
|
||||||
<result column="updateDate" property="updateDate" />
|
<result column="updateDate" property="updateDate" />
|
||||||
<result column="del_flag" property="delFlag" />
|
<result column="del_flag" property="delFlag" />
|
||||||
|
<result column="secrecy_last" property="secrecyLast" />
|
||||||
|
<result column="file_name" property="fileName" />
|
||||||
|
<collection property="labelList" ofType="com.adc.da.report.eo.LabelEntity">
|
||||||
|
<id column="lableId" property="id"/>
|
||||||
|
<result column="lableName" property="name"/>
|
||||||
|
</collection>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!--表名信息-->
|
<!--表名信息-->
|
||||||
@@ -31,6 +37,7 @@
|
|||||||
<sql id="BaseColumnList">
|
<sql id="BaseColumnList">
|
||||||
id,
|
id,
|
||||||
task_id, prc_id, data_id, name, keycontent, maincontent, department, year, fileId, confidentialLevel, privacyLevel, createUserId, createDate, updateDate, del_flag
|
task_id, prc_id, data_id, name, keycontent, maincontent, department, year, fileId, confidentialLevel, privacyLevel, createUserId, createDate, updateDate, del_flag
|
||||||
|
,secrecy_last,file_name
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 查询条件 -->
|
<!-- 查询条件 -->
|
||||||
@@ -117,12 +124,30 @@
|
|||||||
<include refid="BaseQuerySql"/>
|
<include refid="BaseQuerySql"/>
|
||||||
ORDER BY create_time DESC
|
ORDER BY create_time DESC
|
||||||
</select>
|
</select>
|
||||||
<select id="selectByDataId" resultType="com.adc.da.report.vo.TtReportManageActPageVO">
|
<select id="selectByDataId" resultMap="BaseResultMap">
|
||||||
SELECT
|
SELECT
|
||||||
<include refid="BaseColumnList"/>
|
a.id,
|
||||||
FROM <include refid="TableName"/>
|
task_id, prc_id, data_id, name, keycontent, maincontent, department, year, fileId, confidentialLevel, privacyLevel, createUserId, createDate, updateDate, del_flag
|
||||||
|
,secrecy_last,file_name
|
||||||
|
,label.label as lableName,label.id as labelId
|
||||||
|
FROM <include refid="TableName"/> a
|
||||||
|
LEFT JOIN ts_report_label rl on rl.report_id = a.data_id
|
||||||
|
LEFT JOIN ts_tree_label label on rl.label_id = label.id
|
||||||
<where>
|
<where>
|
||||||
data_id = #{dataId}
|
data_id = #{dataId}
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectByPrcId" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
a.id,
|
||||||
|
task_id, prc_id, data_id, name, keycontent, maincontent, department, year, fileId, confidentialLevel, privacyLevel, createUserId, createDate, updateDate, del_flag
|
||||||
|
,secrecy_last,file_name
|
||||||
|
,label.label as lableName,label.id as labelId
|
||||||
|
FROM <include refid="TableName"/> a
|
||||||
|
LEFT JOIN ts_report_label rl on rl.report_id = a.data_id
|
||||||
|
LEFT JOIN ts_tree_label label on rl.label_id = label.id
|
||||||
|
<where>
|
||||||
|
prc_id = #{prcId}
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -4,7 +4,9 @@ import com.adc.da.base.web.BaseController;
|
|||||||
import com.adc.da.excel.poi.excel.ExcelImportUtil;
|
import com.adc.da.excel.poi.excel.ExcelImportUtil;
|
||||||
import com.adc.da.excel.poi.excel.entity.ImportParams;
|
import com.adc.da.excel.poi.excel.entity.ImportParams;
|
||||||
import com.adc.da.sys.constant.SysConstants;
|
import com.adc.da.sys.constant.SysConstants;
|
||||||
|
import com.adc.da.sys.dao.mysql.UserOrgEODao;
|
||||||
import com.adc.da.sys.entity.UserEO;
|
import com.adc.da.sys.entity.UserEO;
|
||||||
|
import com.adc.da.sys.entity.UserOrgEO;
|
||||||
import com.adc.da.sys.service.iservice.IUserEoService;
|
import com.adc.da.sys.service.iservice.IUserEoService;
|
||||||
import com.adc.da.sys.util.EncryptUtil;
|
import com.adc.da.sys.util.EncryptUtil;
|
||||||
import com.adc.da.sys.util.RSAUtil;
|
import com.adc.da.sys.util.RSAUtil;
|
||||||
@@ -14,6 +16,7 @@ import com.adc.da.util.http.ResponseMessage;
|
|||||||
import com.adc.da.util.http.Result;
|
import com.adc.da.util.http.Result;
|
||||||
import com.adc.da.util.utils.FileUtil;
|
import com.adc.da.util.utils.FileUtil;
|
||||||
import com.adc.da.util.utils.StringUtils;
|
import com.adc.da.util.utils.StringUtils;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.JsonElement;
|
import com.google.gson.JsonElement;
|
||||||
@@ -35,6 +38,7 @@ import java.io.InputStream;
|
|||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -47,6 +51,8 @@ public class UserEOController extends BaseController<UserEO> {
|
|||||||
@Resource
|
@Resource
|
||||||
private IUserEoService userEOService;
|
private IUserEoService userEOService;
|
||||||
|
|
||||||
|
private UserOrgEODao userOrgEODao;
|
||||||
|
|
||||||
@Value("${isPassEncrypted}")
|
@Value("${isPassEncrypted}")
|
||||||
private boolean isPassEncrypted;
|
private boolean isPassEncrypted;
|
||||||
|
|
||||||
@@ -112,7 +118,20 @@ public class UserEOController extends BaseController<UserEO> {
|
|||||||
|
|
||||||
|
|
||||||
userEOService.save(eo);
|
userEOService.save(eo);
|
||||||
|
//保存部门
|
||||||
|
LambdaQueryWrapper<UserOrgEO> userOrgEOLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
userOrgEOLambdaQueryWrapper.eq(UserOrgEO::getUserId,eo.getUsid());
|
||||||
|
userOrgEODao.delete(userOrgEOLambdaQueryWrapper);
|
||||||
|
String orgId = eo.getOrgId();
|
||||||
|
String[] split = orgId.split(",");
|
||||||
|
List<UserOrgEO> userOrgEOS = new ArrayList<>();
|
||||||
|
for (String s : split) {
|
||||||
|
UserOrgEO userOrgEO = new UserOrgEO();
|
||||||
|
userOrgEO.setUserId(eo.getUsid());
|
||||||
|
userOrgEO.setOrgId(s);
|
||||||
|
userOrgEOS.add(userOrgEO);
|
||||||
|
}
|
||||||
|
userOrgEODao.insertBatch(userOrgEOS);
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -97,6 +97,8 @@ public class UserEO extends BaseEntity implements Serializable {
|
|||||||
@TableField("USNAME")
|
@TableField("USNAME")
|
||||||
private String usname;
|
private String usname;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String orgId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 角色ID列表
|
* 角色ID列表
|
||||||
@@ -110,6 +112,12 @@ public class UserEO extends BaseEntity implements Serializable {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private List<RoleEO> roleEOList = new ArrayList<>();
|
private List<RoleEO> roleEOList = new ArrayList<>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门EO列表
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<RoleEO> orgList = new ArrayList<>();
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String roleId;
|
private String roleId;
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,10 @@
|
|||||||
<result column="name" property="name"/>
|
<result column="name" property="name"/>
|
||||||
<result column="remarks" property="remarks"/>
|
<result column="remarks" property="remarks"/>
|
||||||
</collection>
|
</collection>
|
||||||
|
<collection property="orgList" ofType="com.adc.da.sys.entity.OrgEO">
|
||||||
|
<id column="id" property="id"/>
|
||||||
|
<result column="org_name" property="orgName"/>
|
||||||
|
</collection>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!-- 包含用户基本数据,角色数据,组织机构数据等-->
|
<!-- 包含用户基本数据,角色数据,组织机构数据等-->
|
||||||
@@ -93,10 +97,19 @@
|
|||||||
<!--获取用户角色信息-->
|
<!--获取用户角色信息-->
|
||||||
<select id="getUserWithRoles" resultMap="UserRoleMap" parameterType="java.lang.String">
|
<select id="getUserWithRoles" resultMap="UserRoleMap" parameterType="java.lang.String">
|
||||||
select
|
select
|
||||||
<include refid="User_Role_List"/>
|
u.*, r.id as id,
|
||||||
|
r.data_scope as dataScope,
|
||||||
|
r.del_flag as r_delFlag,
|
||||||
|
r.is_default as isDefault,
|
||||||
|
r.name as name,
|
||||||
|
r.remarks as remarks,
|
||||||
|
org.id as orgId,
|
||||||
|
org.org_name
|
||||||
from TS_USER u
|
from TS_USER u
|
||||||
left join TR_USER_ROLE ur on u.usid = ur.user_id
|
left join TR_USER_ROLE ur on u.usid = ur.user_id
|
||||||
left join TS_ROLE r on ur.role_id = r.id
|
left join TS_ROLE r on ur.role_id = r.id
|
||||||
|
left join TR_USER_org uo on u.usid = uo.user_id
|
||||||
|
left join TS_org org on uo.org_id = org.id and org.status = 1
|
||||||
where u.usid = #{id}
|
where u.usid = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -57,6 +57,10 @@
|
|||||||
<result column="name" property="name"/>
|
<result column="name" property="name"/>
|
||||||
<result column="remarks" property="remarks"/>
|
<result column="remarks" property="remarks"/>
|
||||||
</collection>
|
</collection>
|
||||||
|
<collection property="orgList" ofType="com.adc.da.sys.entity.OrgEO">
|
||||||
|
<id column="id" property="id"/>
|
||||||
|
<result column="org_name" property="orgName"/>
|
||||||
|
</collection>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!-- 包含用户基本数据,角色数据,组织机构数据等-->
|
<!-- 包含用户基本数据,角色数据,组织机构数据等-->
|
||||||
@@ -93,10 +97,19 @@
|
|||||||
<!--获取用户角色信息-->
|
<!--获取用户角色信息-->
|
||||||
<select id="getUserWithRoles" resultMap="UserRoleMap" parameterType="java.lang.String">
|
<select id="getUserWithRoles" resultMap="UserRoleMap" parameterType="java.lang.String">
|
||||||
select
|
select
|
||||||
<include refid="User_Role_List"/>
|
u.*, r.id as id,
|
||||||
|
r.data_scope as dataScope,
|
||||||
|
r.del_flag as r_delFlag,
|
||||||
|
r.is_default as isDefault,
|
||||||
|
r.name as name,
|
||||||
|
r.remarks as remarks,
|
||||||
|
org.id as orgId,
|
||||||
|
org.org_name
|
||||||
from TS_USER u
|
from TS_USER u
|
||||||
left join TR_USER_ROLE ur on u.usid = ur.user_id
|
left join TR_USER_ROLE ur on u.usid = ur.user_id
|
||||||
left join TS_ROLE r on ur.role_id = r.id
|
left join TS_ROLE r on ur.role_id = r.id
|
||||||
|
left join TR_USER_org uo on u.usid = uo.user_id
|
||||||
|
left join TS_org org on uo.org_id = org.id and org.status = 1
|
||||||
where u.usid = #{id}
|
where u.usid = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
+7
-8
@@ -13,9 +13,7 @@ import com.adc.da.wkflow.util.ImpulseSenderUtils;
|
|||||||
import com.adc.da.wkflow.util.activiti.ActivitiTools;
|
import com.adc.da.wkflow.util.activiti.ActivitiTools;
|
||||||
import com.adc.da.wkflow.util.wrapper.WrapMapper;
|
import com.adc.da.wkflow.util.wrapper.WrapMapper;
|
||||||
import com.adc.da.wkflow.util.wrapper.Wrapper;
|
import com.adc.da.wkflow.util.wrapper.Wrapper;
|
||||||
import com.alibaba.fastjson.JSON;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
@@ -155,6 +153,7 @@ public class ActivitDefineController {
|
|||||||
String id = jsonObject.getString("id");
|
String id = jsonObject.getString("id");
|
||||||
String userId = jsonObject.getString("loginUserId");
|
String userId = jsonObject.getString("loginUserId");
|
||||||
String bpnId = jsonObject.getString("bpnId");
|
String bpnId = jsonObject.getString("bpnId");
|
||||||
|
String reportId = jsonObject.getString("reportId");
|
||||||
Object dataMsg = jsonObject.get("dataMsg");
|
Object dataMsg = jsonObject.get("dataMsg");
|
||||||
Object approveData =jsonObject.get("approveData");
|
Object approveData =jsonObject.get("approveData");
|
||||||
|
|
||||||
@@ -187,9 +186,9 @@ public class ActivitDefineController {
|
|||||||
busProcessName.setCreatUserName(byId.getUsname());
|
busProcessName.setCreatUserName(byId.getUsname());
|
||||||
busProcessName.setPrcNum((String) prcNameAndPrcNum.get("prcNum"));
|
busProcessName.setPrcNum((String) prcNameAndPrcNum.get("prcNum"));
|
||||||
busProcessName.setPrcType(prcType);
|
busProcessName.setPrcType(prcType);
|
||||||
String data = JSON.toJSONString(dataMsg, SerializerFeature.DisableCircularReferenceDetect);
|
// String data = JSON.toJSONString(dataMsg, SerializerFeature.DisableCircularReferenceDetect);
|
||||||
String dateId = activitDefineService.saveOrUpdateDate(prcType,data,task.getId(),pi.getId());
|
// String dateId = activitDefineService.saveOrUpdateDate(prcType,data,task.getId(),pi.getId(),reportId);
|
||||||
busProcessName.setDataId(dateId);
|
// busProcessName.setDataId(dateId);
|
||||||
// busProcessName.setPrcName((String) prcNameAndPrcNum.get("prcName"));
|
// busProcessName.setPrcName((String) prcNameAndPrcNum.get("prcName"));
|
||||||
busProcessName.setPrcName(jsonObject.getString("prcName"));
|
busProcessName.setPrcName(jsonObject.getString("prcName"));
|
||||||
busProcessName.setSubmitStatus(SubmitStatusEnum.SUBMIT.getValue());
|
busProcessName.setSubmitStatus(SubmitStatusEnum.SUBMIT.getValue());
|
||||||
@@ -210,9 +209,9 @@ public class ActivitDefineController {
|
|||||||
one.setPrcId(pi.getId());
|
one.setPrcId(pi.getId());
|
||||||
one.setSubmitStatus(SubmitStatusEnum.SUBMIT.getValue());
|
one.setSubmitStatus(SubmitStatusEnum.SUBMIT.getValue());
|
||||||
one.setCreatTime(sdf.format(new Date()));
|
one.setCreatTime(sdf.format(new Date()));
|
||||||
String data = JSON.toJSONString(dataMsg, SerializerFeature.DisableCircularReferenceDetect);
|
// String data = JSON.toJSONString(dataMsg, SerializerFeature.DisableCircularReferenceDetect);
|
||||||
String dateId = activitDefineService.saveOrUpdateDate(prcType,data,task.getId(),pi.getId());
|
// String dateId = activitDefineService.saveOrUpdateDate(prcType,data,task.getId(),pi.getId(),reportId);
|
||||||
one.setDataId(dateId);
|
// one.setDataId(dateId);
|
||||||
ibusprocessnameService.save(one);
|
ibusprocessnameService.save(one);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+24
-25
@@ -1,10 +1,13 @@
|
|||||||
package com.adc.da.wkflow.business_activiti.service;
|
package com.adc.da.wkflow.business_activiti.service;
|
||||||
|
|
||||||
import com.adc.da.report.dao.mysql.PowerApplyActDao;
|
import com.adc.da.report.dao.mysql.PowerApplyActDao;
|
||||||
|
import com.adc.da.report.dao.mysql.ReportLabelDao;
|
||||||
import com.adc.da.report.dao.mysql.TtReportManageActDao;
|
import com.adc.da.report.dao.mysql.TtReportManageActDao;
|
||||||
import com.adc.da.report.eo.PowerApplyAct;
|
import com.adc.da.report.eo.PowerApplyAct;
|
||||||
|
import com.adc.da.report.eo.ReportLabelEntity;
|
||||||
import com.adc.da.report.eo.TtReportManageAct;
|
import com.adc.da.report.eo.TtReportManageAct;
|
||||||
import com.adc.da.report.service.IPowerApplyActService;
|
import com.adc.da.report.service.IPowerApplyActService;
|
||||||
|
import com.adc.da.report.service.IReportLabelService;
|
||||||
import com.adc.da.report.service.ITtReportManageActService;
|
import com.adc.da.report.service.ITtReportManageActService;
|
||||||
import com.adc.da.util.utils.StringUtils;
|
import com.adc.da.util.utils.StringUtils;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
@@ -13,7 +16,6 @@ import org.slf4j.LoggerFactory;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
@@ -35,47 +37,44 @@ public class ActivitDefineService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
ITtReportManageActService ttReportManageActService;
|
ITtReportManageActService ttReportManageActService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ReportLabelDao reportLabelDao;
|
||||||
|
@Autowired
|
||||||
|
private IReportLabelService iReportLabelService;
|
||||||
|
|
||||||
//保存data数据
|
//保存data数据
|
||||||
public String saveOrUpdateDate(String prcType, String dataJson,String taskId,String prcId) {
|
public String saveOrUpdateDate(String prcType, String dataJson,String taskId,String prcId,String reportId) {
|
||||||
String dataId = UUID.randomUUID().toString().replaceAll("-","");
|
if (StringUtils.isBlank(reportId)){
|
||||||
|
reportId = UUID.randomUUID().toString().replace("-","");
|
||||||
|
}
|
||||||
if ("1".equals(prcType)){
|
if ("1".equals(prcType)){
|
||||||
List<PowerApplyAct> powerApplyActs = JSONObject.parseArray(dataJson, PowerApplyAct.class);
|
List<PowerApplyAct> powerApplyActs = JSONObject.parseArray(dataJson, PowerApplyAct.class);
|
||||||
for (PowerApplyAct powerApplyAct : powerApplyActs) {
|
for (PowerApplyAct powerApplyAct : powerApplyActs) {
|
||||||
powerApplyAct.setId(UUID.randomUUID().toString().replaceAll("-",""));
|
powerApplyAct.setId(UUID.randomUUID().toString().replaceAll("-",""));
|
||||||
powerApplyAct.setDataId(dataId);
|
powerApplyAct.setDataId(reportId);
|
||||||
powerApplyAct.setTaskId(taskId);
|
powerApplyAct.setTaskId(taskId);
|
||||||
powerApplyAct.setPrcId(prcId);
|
powerApplyAct.setPrcId(prcId);
|
||||||
powerApplyAct.setDelFlag(0);
|
powerApplyAct.setDelFlag(0);
|
||||||
powerApplyAct.setCreateDate(new Date());
|
powerApplyAct.setCreateDate(new Date());
|
||||||
}
|
}
|
||||||
powerApplyActDao.batchInsert(powerApplyActs);
|
powerApplyActDao.batchInsert(powerApplyActs);
|
||||||
}else if ("2".equals(prcType)){
|
}else if ("4".equals(prcType)){
|
||||||
TtReportManageAct ttReportManageAct = JSONObject.parseObject(dataJson, TtReportManageAct.class);
|
TtReportManageAct ttReportManageAct = JSONObject.parseObject(dataJson, TtReportManageAct.class);
|
||||||
ttReportManageAct.setDataId(dataId);
|
ttReportManageAct.setDataId(reportId);
|
||||||
ttReportManageAct.setTaskId(taskId);
|
ttReportManageAct.setTaskId(taskId);
|
||||||
ttReportManageAct.setPrcId(prcId);
|
ttReportManageAct.setPrcId(prcId);
|
||||||
ttReportManageAct.setDelFlag(0);
|
ttReportManageAct.setDelFlag(0);
|
||||||
ttReportManageAct.setCreateDate(new Date());
|
ttReportManageAct.setCreateDate(new Date());
|
||||||
ttReportManageActService.saveOrUpdateSingle(ttReportManageAct);
|
ttReportManageActService.saveOrUpdateSingle(ttReportManageAct);
|
||||||
//权限
|
//插入报表标签关系表
|
||||||
List<PowerApplyAct> powerApplyActs = new ArrayList<>();
|
//修改报表标签关系表(先删后增)
|
||||||
List<PowerApplyAct> powerList = ttReportManageAct.getPowerList();
|
iReportLabelService.deleteReportLabelByReportId(new String[]{reportId});
|
||||||
for (PowerApplyAct powerApplyAct : powerList) {
|
ttReportManageAct.getLabelList().forEach((label) -> {
|
||||||
if (StringUtils.isEmpty(powerApplyAct.getId())){
|
ReportLabelEntity reportLabelEntity = new ReportLabelEntity(com.adc.da.util.utils.UUID.randomUUID10()
|
||||||
powerApplyAct.setId(UUID.randomUUID().toString().replaceAll("-",""));
|
,ttReportManageAct.getDataId(), label);
|
||||||
powerApplyAct.setReportId(ttReportManageAct.getId());
|
reportLabelDao.insert(reportLabelEntity);
|
||||||
powerApplyAct.setDataId(dataId);
|
});
|
||||||
// powerApplyAct.setTaskId(taskId);
|
|
||||||
powerApplyAct.setPrcId(prcId);
|
|
||||||
powerApplyAct.setDelFlag(0);
|
|
||||||
powerApplyAct.setCreateDate(new Date());
|
|
||||||
powerApplyActs.add(powerApplyAct);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (powerApplyActs.size()>0){
|
|
||||||
powerApplyActDao.batchInsert(powerApplyActs);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return dataId;
|
return reportId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+22
-17
@@ -4,8 +4,8 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
import com.adc.da.login.util.UserUtils;
|
import com.adc.da.login.util.UserUtils;
|
||||||
import com.adc.da.report.dao.mysql.PowerApplyActDao;
|
import com.adc.da.report.dao.mysql.PowerApplyActDao;
|
||||||
import com.adc.da.report.dao.mysql.TtReportManageActDao;
|
import com.adc.da.report.dao.mysql.TtReportManageActDao;
|
||||||
|
import com.adc.da.report.eo.TtReportManageAct;
|
||||||
import com.adc.da.report.vo.PowerApplyActPageVO;
|
import com.adc.da.report.vo.PowerApplyActPageVO;
|
||||||
import com.adc.da.report.vo.TtReportManageActPageVO;
|
|
||||||
import com.adc.da.sys.service.iservice.IUserEoService;
|
import com.adc.da.sys.service.iservice.IUserEoService;
|
||||||
import com.adc.da.sys.vo.UserVO;
|
import com.adc.da.sys.vo.UserVO;
|
||||||
import com.adc.da.util.exception.AdcDaBaseException;
|
import com.adc.da.util.exception.AdcDaBaseException;
|
||||||
@@ -282,6 +282,7 @@ public class TodoTaskController {
|
|||||||
public Wrapper<String> completeTaskByUserId(@RequestBody ApproveDataVO busMes) {
|
public Wrapper<String> completeTaskByUserId(@RequestBody ApproveDataVO busMes) {
|
||||||
log.info("!!!!!!!!!!!!!TaskId!!!!!!!!!!!!!!!"+busMes.getTaskId());
|
log.info("!!!!!!!!!!!!!TaskId!!!!!!!!!!!!!!!"+busMes.getTaskId());
|
||||||
String dataJson = busMes.getDataJson();
|
String dataJson = busMes.getDataJson();
|
||||||
|
String reportId = busMes.getReportId();
|
||||||
if (busMes.getTaskId() != null && !busMes.getTaskId().equals("")) {
|
if (busMes.getTaskId() != null && !busMes.getTaskId().equals("")) {
|
||||||
Task task = taskService.createTaskQuery().taskId(busMes.getTaskId()).singleResult();
|
Task task = taskService.createTaskQuery().taskId(busMes.getTaskId()).singleResult();
|
||||||
if(task!=null){
|
if(task!=null){
|
||||||
@@ -297,7 +298,8 @@ public class TodoTaskController {
|
|||||||
ibusProcessApproveService.save(busProcessApprove);
|
ibusProcessApproveService.save(busProcessApprove);
|
||||||
if (StringUtils.isNotEmpty(dataJson)){
|
if (StringUtils.isNotEmpty(dataJson)){
|
||||||
//根据业务情况 对业务数据进行saveOrupdate
|
//根据业务情况 对业务数据进行saveOrupdate
|
||||||
activitDefineService.saveOrUpdateDate(busMes.getPrcType(),dataJson, task.getId(),task.getProcessInstanceId());
|
activitDefineService.saveOrUpdateDate(busMes.getPrcType(),dataJson, task.getId(),
|
||||||
|
task.getProcessInstanceId(),reportId);
|
||||||
}
|
}
|
||||||
taskService.complete(busMes.getTaskId());
|
taskService.complete(busMes.getTaskId());
|
||||||
}
|
}
|
||||||
@@ -444,11 +446,9 @@ public class TodoTaskController {
|
|||||||
String string = JSONArray.toJSONString(powerApplyActs);
|
String string = JSONArray.toJSONString(powerApplyActs);
|
||||||
//去对应的 数据表查数据
|
//去对应的 数据表查数据
|
||||||
busProcessNewVO.setDataJson(string);
|
busProcessNewVO.setDataJson(string);
|
||||||
}else if ("2".equals(prcType)){
|
}else if ("4".equals(prcType)){
|
||||||
TtReportManageActPageVO ttReportManageActPageVO = ttReportManageActDao.selectByDataId(dataId);
|
TtReportManageAct ttReportManageAct = ttReportManageActDao.selectByDataId(dataId);
|
||||||
List<PowerApplyActPageVO> powerApplyActs = powerApplyActDao.selectListByPrcId(ttReportManageActPageVO.getPrcId());
|
String string = JSONArray.toJSONString(ttReportManageAct);
|
||||||
ttReportManageActPageVO.setPowerList(powerApplyActs);
|
|
||||||
String string = JSONArray.toJSONString(ttReportManageActPageVO);
|
|
||||||
//去对应的 数据表查数据
|
//去对应的 数据表查数据
|
||||||
busProcessNewVO.setDataJson(string);
|
busProcessNewVO.setDataJson(string);
|
||||||
}
|
}
|
||||||
@@ -458,23 +458,27 @@ public class TodoTaskController {
|
|||||||
private BusProcessNewVO queryDetailDate(BusProcessNew busProcessNew, String prcType, Integer tag) {
|
private BusProcessNewVO queryDetailDate(BusProcessNew busProcessNew, String prcType, Integer tag) {
|
||||||
BusProcessNewVO busProcessNewVO = new BusProcessNewVO();
|
BusProcessNewVO busProcessNewVO = new BusProcessNewVO();
|
||||||
BeanUtils.copyProperties(busProcessNew,busProcessNewVO);
|
BeanUtils.copyProperties(busProcessNew,busProcessNewVO);
|
||||||
|
String pId = busProcessNew.getPId();
|
||||||
String dataId = busProcessNew.getDataId();
|
String dataId = busProcessNew.getDataId();
|
||||||
if ("1".equals(prcType)){
|
if ("1".equals(prcType)){
|
||||||
List<PowerApplyActPageVO> powerApplyActs = new ArrayList<>();
|
List<PowerApplyActPageVO> powerApplyActs = new ArrayList<>();
|
||||||
if (tag == 1){
|
if (StringUtils.isBlank(pId)){
|
||||||
//代办查看详情
|
//代办查看详情
|
||||||
powerApplyActs = powerApplyActDao.selectListBydataIdNodel(dataId);
|
|
||||||
}else {
|
|
||||||
powerApplyActs = powerApplyActDao.selectListBydataId(dataId);
|
powerApplyActs = powerApplyActDao.selectListBydataId(dataId);
|
||||||
|
}else {
|
||||||
|
powerApplyActs = powerApplyActDao.selectListByPrcId(pId);
|
||||||
}
|
}
|
||||||
String string = JSONArray.toJSONString(powerApplyActs);
|
String string = JSONArray.toJSONString(powerApplyActs);
|
||||||
//去对应的 数据表查数据
|
//去对应的 数据表查数据
|
||||||
busProcessNewVO.setDataJson(string);
|
busProcessNewVO.setDataJson(string);
|
||||||
}else if("2".equals(prcType)){
|
}else if("4".equals(prcType)){
|
||||||
TtReportManageActPageVO ttReportManageActPageVO = ttReportManageActDao.selectByDataId(dataId);
|
TtReportManageAct ttReportManageAct = new TtReportManageAct();
|
||||||
List<PowerApplyActPageVO> powerApplyActs = powerApplyActDao.selectListByPrcId(ttReportManageActPageVO.getPrcId());
|
if (StringUtils.isBlank(pId)){
|
||||||
ttReportManageActPageVO.setPowerList(powerApplyActs);
|
ttReportManageAct = ttReportManageActDao.selectByDataId(dataId);
|
||||||
String string = JSONArray.toJSONString(ttReportManageActPageVO);
|
}else {
|
||||||
|
ttReportManageAct = ttReportManageActDao.selectByPrcId(pId);
|
||||||
|
}
|
||||||
|
String string = JSONArray.toJSONString(ttReportManageAct);
|
||||||
//去对应的 数据表查数据
|
//去对应的 数据表查数据
|
||||||
busProcessNewVO.setDataJson(string);
|
busProcessNewVO.setDataJson(string);
|
||||||
}
|
}
|
||||||
@@ -491,6 +495,7 @@ public class TodoTaskController {
|
|||||||
public Wrapper<String> saveTaskFirst(@RequestBody ApproveDataVO approveDataVO) {
|
public Wrapper<String> saveTaskFirst(@RequestBody ApproveDataVO approveDataVO) {
|
||||||
String dataJson = approveDataVO.getDataJson();
|
String dataJson = approveDataVO.getDataJson();
|
||||||
String submitJson = approveDataVO.getSubmitJson();
|
String submitJson = approveDataVO.getSubmitJson();
|
||||||
|
String reportId = approveDataVO.getReportId();
|
||||||
String saveId = null;
|
String saveId = null;
|
||||||
String dataId = null;
|
String dataId = null;
|
||||||
if (approveDataVO.getId() != null && !approveDataVO.getId().equals("")) {
|
if (approveDataVO.getId() != null && !approveDataVO.getId().equals("")) {
|
||||||
@@ -509,7 +514,7 @@ public class TodoTaskController {
|
|||||||
if (StringUtils.isNotEmpty(dataJson)){
|
if (StringUtils.isNotEmpty(dataJson)){
|
||||||
//根据业务情况 对业务数据进行saveOrupdate
|
//根据业务情况 对业务数据进行saveOrupdate
|
||||||
dataId = activitDefineService.saveOrUpdateDate(approveDataVO.getPrcType(), dataJson, null,
|
dataId = activitDefineService.saveOrUpdateDate(approveDataVO.getPrcType(), dataJson, null,
|
||||||
null);
|
null,reportId);
|
||||||
busProcessName.setDataId(dataId);
|
busProcessName.setDataId(dataId);
|
||||||
}
|
}
|
||||||
iBusProcessNameService.saveOrUpdate(busProcessName);
|
iBusProcessNameService.saveOrUpdate(busProcessName);
|
||||||
@@ -521,7 +526,7 @@ public class TodoTaskController {
|
|||||||
if (StringUtils.isNotEmpty(dataJson)) {
|
if (StringUtils.isNotEmpty(dataJson)) {
|
||||||
//根据业务情况 对业务数据进行saveOrupdate
|
//根据业务情况 对业务数据进行saveOrupdate
|
||||||
dataId = activitDefineService.saveOrUpdateDate(approveDataVO.getPrcType(), dataJson,
|
dataId = activitDefineService.saveOrUpdateDate(approveDataVO.getPrcType(), dataJson,
|
||||||
approveDataVO.getTaskId(),"");
|
approveDataVO.getTaskId(),"",reportId);
|
||||||
busProcessName.setDataId(dataId);
|
busProcessName.setDataId(dataId);
|
||||||
}
|
}
|
||||||
busProcessName.setPrcType(approveDataVO.getPrcType());
|
busProcessName.setPrcType(approveDataVO.getPrcType());
|
||||||
|
|||||||
+3
-3
@@ -43,9 +43,9 @@ public class BusProcessNameServiceImpl extends ServiceImpl<BusProcessNameMapper,
|
|||||||
Map<String,Object> result = new HashMap<>();
|
Map<String,Object> result = new HashMap<>();
|
||||||
String prcName = "";
|
String prcName = "";
|
||||||
String prcNum = "";
|
String prcNum = "";
|
||||||
if(StringUtils.equals(FlowTypeEnum.BGQXSQLC.getValue(), prcType)){
|
if(StringUtils.equals(FlowTypeEnum.XZSQ.getValue(), prcType)){
|
||||||
prcName = FlowTypeEnum.BGQXSQLC.getPrcName();
|
prcName = FlowTypeEnum.XZSQ.getPrcName();
|
||||||
prcNum = FlowTypeEnum.BGQXSQLC.getPrcNum();
|
prcNum = FlowTypeEnum.XZSQ.getPrcNum();
|
||||||
}else if (StringUtils.equals(FlowTypeEnum.SCBGLC.getValue(), prcType)){
|
}else if (StringUtils.equals(FlowTypeEnum.SCBGLC.getValue(), prcType)){
|
||||||
prcName = FlowTypeEnum.SCBGLC.getPrcName();
|
prcName = FlowTypeEnum.SCBGLC.getPrcName();
|
||||||
prcNum = FlowTypeEnum.SCBGLC.getPrcNum();
|
prcNum = FlowTypeEnum.SCBGLC.getPrcNum();
|
||||||
|
|||||||
@@ -34,4 +34,6 @@ public class ApproveDataVO {
|
|||||||
|
|
||||||
private String prcName;
|
private String prcName;
|
||||||
|
|
||||||
|
private String reportId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,10 @@ package com.adc.da.wkflow.enums;
|
|||||||
*/
|
*/
|
||||||
public enum FlowTypeEnum {
|
public enum FlowTypeEnum {
|
||||||
|
|
||||||
BGQXSQLC("1","报告权限申请流程","QXSQ","报告权限申请流程",""),
|
XZSQ("1","下载申请流程","QXSQ","下载申请流程",""),
|
||||||
SCBGLC("2","上传报告流程","SCBG","上传报告流程",""),
|
YLSQ("2","预览申请流程","QXSQ","预览申请流程",""),
|
||||||
|
YLXZSQ("3","预览+下载申请流程","QXSQ","预览+下载申请流程",""),
|
||||||
|
SCBGLC("4","上传审批流程","SCBG","上传审批流程",""),
|
||||||
;
|
;
|
||||||
|
|
||||||
private String value;
|
private String value;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.adc.da.wkflow.listener.SCBG;
|
package com.adc.da.wkflow.listener.SCBG;
|
||||||
|
|
||||||
import com.adc.da.login.util.UserUtils;
|
import com.adc.da.login.util.UserUtils;
|
||||||
|
import com.adc.da.report.dao.mysql.ReportDao;
|
||||||
import com.adc.da.report.dao.mysql.TtReportManageActDao;
|
import com.adc.da.report.dao.mysql.TtReportManageActDao;
|
||||||
import com.adc.da.report.eo.TtReportManageAct;
|
import com.adc.da.report.eo.TtReportManageAct;
|
||||||
import com.adc.da.wkflow.business_main.entity.BusProcessApprove;
|
import com.adc.da.wkflow.business_main.entity.BusProcessApprove;
|
||||||
@@ -24,6 +25,7 @@ public class oneApplyAfter implements TaskListener {
|
|||||||
@Override
|
@Override
|
||||||
public void notify(DelegateTask delegateTask) {
|
public void notify(DelegateTask delegateTask) {
|
||||||
TtReportManageActDao ttReportManageActDao = SpringContextUtil.getBean(TtReportManageActDao.class);
|
TtReportManageActDao ttReportManageActDao = SpringContextUtil.getBean(TtReportManageActDao.class);
|
||||||
|
ReportDao reportDao = SpringContextUtil.getBean(ReportDao.class);
|
||||||
IBusProcessNewService busBean = SpringContextUtil.getBean(IBusProcessNewService.class);
|
IBusProcessNewService busBean = SpringContextUtil.getBean(IBusProcessNewService.class);
|
||||||
IBusProcessApproveService approveService = SpringContextUtil.getBean(IBusProcessApproveService.class);
|
IBusProcessApproveService approveService = SpringContextUtil.getBean(IBusProcessApproveService.class);
|
||||||
//查询task任务
|
//查询task任务
|
||||||
@@ -52,6 +54,10 @@ public class oneApplyAfter implements TaskListener {
|
|||||||
String s = object.getString("flag") == "" || object.getString("flag") == null ? FlagEnum.AGREE.getValue() : object.getString("flag");
|
String s = object.getString("flag") == "" || object.getString("flag") == null ? FlagEnum.AGREE.getValue() : object.getString("flag");
|
||||||
// 1: 同意 2:退回
|
// 1: 同意 2:退回
|
||||||
delegateTask.setVariable("flag",s);
|
delegateTask.setVariable("flag",s);
|
||||||
|
if ("1".equals(s)){
|
||||||
|
// ttReportManageActService.saveReport(ttReportManageAct);
|
||||||
|
reportDao.saveReportAct(ttReportManageAct);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,6 +50,5 @@ public class reEditAfter implements TaskListener {
|
|||||||
JSONObject object = JSONObject.parseObject(fromValsJson);
|
JSONObject object = JSONObject.parseObject(fromValsJson);
|
||||||
|
|
||||||
delegateTask.setVariable("oneApprove",object.getString("oneApprove"));
|
delegateTask.setVariable("oneApprove",object.getString("oneApprove"));
|
||||||
delegateTask.setVariable("twoApprove",object.getString("twoApprove"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ public class startAfter implements TaskListener {
|
|||||||
JSONObject object = JSONObject.parseObject(fromValsJson);
|
JSONObject object = JSONObject.parseObject(fromValsJson);
|
||||||
//审批人
|
//审批人
|
||||||
delegateTask.setVariable("oneApprove",object.getString("oneApprove"));
|
delegateTask.setVariable("oneApprove",object.getString("oneApprove"));
|
||||||
delegateTask.setVariable("twoApprove",object.getString("twoApprove"));
|
|
||||||
//发起人
|
//发起人
|
||||||
delegateTask.setVariable("userId",object.getString("userId"));
|
delegateTask.setVariable("userId",object.getString("userId"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,70 +0,0 @@
|
|||||||
package com.adc.da.wkflow.listener.SCBG;
|
|
||||||
|
|
||||||
import com.adc.da.login.util.UserUtils;
|
|
||||||
import com.adc.da.report.dao.mysql.PowerApplyActDao;
|
|
||||||
import com.adc.da.report.dao.mysql.TtReportManageActDao;
|
|
||||||
import com.adc.da.report.eo.PowerApplyAct;
|
|
||||||
import com.adc.da.report.eo.TtReportManageAct;
|
|
||||||
import com.adc.da.report.service.ITtReportManageActService;
|
|
||||||
import com.adc.da.wkflow.business_main.entity.BusProcessApprove;
|
|
||||||
import com.adc.da.wkflow.business_main.entity.BusProcessNew;
|
|
||||||
import com.adc.da.wkflow.business_main.service.IBusProcessApproveService;
|
|
||||||
import com.adc.da.wkflow.business_main.service.IBusProcessNewService;
|
|
||||||
import com.adc.da.wkflow.listener.FlagEnum;
|
|
||||||
import com.adc.da.wkflow.util.SpringContextUtil;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import org.activiti.engine.delegate.DelegateTask;
|
|
||||||
import org.activiti.engine.delegate.TaskListener;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 上传报告 发起流程
|
|
||||||
*/
|
|
||||||
public class twoApplyAfter implements TaskListener {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void notify(DelegateTask delegateTask) {
|
|
||||||
PowerApplyActDao powerApplyActDao = SpringContextUtil.getBean(PowerApplyActDao.class);
|
|
||||||
TtReportManageActDao ttReportManageActDao = SpringContextUtil.getBean(TtReportManageActDao.class);
|
|
||||||
ITtReportManageActService ttReportManageActService = SpringContextUtil.getBean(ITtReportManageActService.class);
|
|
||||||
IBusProcessNewService busBean = SpringContextUtil.getBean(IBusProcessNewService.class);
|
|
||||||
IBusProcessApproveService approveService = SpringContextUtil.getBean(IBusProcessApproveService.class);
|
|
||||||
//查询task任务
|
|
||||||
LambdaQueryWrapper<TtReportManageAct> queryWrapper = new LambdaQueryWrapper<>();
|
|
||||||
queryWrapper.eq(TtReportManageAct::getTaskId, delegateTask.getId());
|
|
||||||
List<TtReportManageAct> ttReportManageActs = ttReportManageActDao.selectList(queryWrapper);
|
|
||||||
TtReportManageAct ttReportManageAct = new TtReportManageAct();
|
|
||||||
if (ttReportManageActs.size()>0){
|
|
||||||
ttReportManageAct = ttReportManageActs.get(0);
|
|
||||||
List<PowerApplyAct> powerApplyActs = powerApplyActDao.selectActListBydataId(ttReportManageAct.getCreateUserId());
|
|
||||||
for (PowerApplyAct powerApplyAct : powerApplyActs) {
|
|
||||||
powerApplyAct.setReportId(ttReportManageAct.getId());
|
|
||||||
}
|
|
||||||
ttReportManageAct.setPowerList(powerApplyActs);
|
|
||||||
}
|
|
||||||
//构建工作流代办
|
|
||||||
BusProcessNew busProcessNew = new BusProcessNew();
|
|
||||||
busProcessNew.setUserId(UserUtils.getUserId());
|
|
||||||
busProcessNew.setPId(delegateTask.getProcessInstanceId());
|
|
||||||
busProcessNew.setTaskInfo(delegateTask.getEventName());
|
|
||||||
busProcessNew.setTaskId(delegateTask.getId());
|
|
||||||
busProcessNew.setDataId(ttReportManageAct.getDataId());
|
|
||||||
busBean.save(busProcessNew);
|
|
||||||
|
|
||||||
//审批结果
|
|
||||||
LambdaQueryWrapper<BusProcessApprove> approveWrapper = new LambdaQueryWrapper<>();
|
|
||||||
approveWrapper.eq(BusProcessApprove::getTaskId, delegateTask.getId());
|
|
||||||
List<BusProcessApprove> list = approveService.list(approveWrapper);
|
|
||||||
String fromValsJson = list.get(0).getFromValsJson();
|
|
||||||
JSONObject object = JSONObject.parseObject(fromValsJson);
|
|
||||||
String s = object.getString("flag") == "" || object.getString("flag") == null ? FlagEnum.AGREE.getValue() : object.getString("flag");
|
|
||||||
// 1: 同意 2:退回
|
|
||||||
delegateTask.setVariable("flag",s);
|
|
||||||
if ("1".equals(s)){
|
|
||||||
ttReportManageActService.saveReport(ttReportManageAct);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -69,7 +69,13 @@ public class ImpulseSenderUtils {
|
|||||||
String prcType = entry.getKey();
|
String prcType = entry.getKey();
|
||||||
FlowTypeEnum flowTypeEnumByValue = FlowTypeEnum.getFlowTypeEnumByValue(prcType);
|
FlowTypeEnum flowTypeEnumByValue = FlowTypeEnum.getFlowTypeEnumByValue(prcType);
|
||||||
switch (flowTypeEnumByValue){
|
switch (flowTypeEnumByValue){
|
||||||
case BGQXSQLC:
|
case XZSQ:
|
||||||
|
bgqxsqNumber = new AtomicInteger(count);
|
||||||
|
case YLSQ:
|
||||||
|
bgqxsqNumber = new AtomicInteger(count);
|
||||||
|
case YLXZSQ:
|
||||||
|
bgqxsqNumber = new AtomicInteger(count);
|
||||||
|
case SCBGLC:
|
||||||
bgqxsqNumber = new AtomicInteger(count);
|
bgqxsqNumber = new AtomicInteger(count);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -88,13 +94,21 @@ public class ImpulseSenderUtils {
|
|||||||
throw new ActivitiException("非法的流程类型: " + flowType);
|
throw new ActivitiException("非法的流程类型: " + flowType);
|
||||||
}
|
}
|
||||||
switch (flowTypeEnum){
|
switch (flowTypeEnum){
|
||||||
case BGQXSQLC:
|
case XZSQ:
|
||||||
number = bgqxsqNumber.incrementAndGet();
|
number = bgqxsqNumber.incrementAndGet();
|
||||||
checkNumberLegitimate(number,"报告权限申请流程");
|
checkNumberLegitimate(number,"下载申请流程");
|
||||||
|
break;
|
||||||
|
case YLSQ:
|
||||||
|
number = bgqxsqNumber.incrementAndGet();
|
||||||
|
checkNumberLegitimate(number,"预览申请流程");
|
||||||
|
break;
|
||||||
|
case YLXZSQ:
|
||||||
|
number = bgqxsqNumber.incrementAndGet();
|
||||||
|
checkNumberLegitimate(number,"预览+下载申请流程");
|
||||||
break;
|
break;
|
||||||
case SCBGLC:
|
case SCBGLC:
|
||||||
number = bgqxsqNumber.incrementAndGet();
|
number = bgqxsqNumber.incrementAndGet();
|
||||||
checkNumberLegitimate(number,"上传报告流程");
|
checkNumberLegitimate(number,"上传审批流程");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new ActivitiException("流程类型 " + flowType + " 非法!");
|
throw new ActivitiException("流程类型 " + flowType + " 非法!");
|
||||||
|
|||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user