[新增] 解决一些流程流转的问题
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
package com.adc.da.sync.service;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.http.Header;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.adc.da.sync.service.dao.mysql.SyncIAMLogDao;
|
||||
import com.adc.da.sync.service.entity.SyncIAMLogEO;
|
||||
import com.adc.da.sync.service.enums.SyncTypeEnum;
|
||||
import com.adc.da.sys.constant.SysConstants;
|
||||
import com.adc.da.sys.constant.UserBelongEnum;
|
||||
import com.adc.da.sys.dao.mysql.OrgEODao;
|
||||
import com.adc.da.sys.entity.OrgEO;
|
||||
import com.adc.da.sys.entity.UserEO;
|
||||
import com.adc.da.sys.service.OrgEOService;
|
||||
@@ -292,7 +290,7 @@ public class SyncIAMTimer {
|
||||
orgList.add(orgEO);
|
||||
}
|
||||
}
|
||||
userEO.setOrgList(orgList);
|
||||
userEO.setOrgEOList(orgList);
|
||||
|
||||
// 固定角色数据
|
||||
List<String> roleIdList = new ArrayList<>();
|
||||
|
||||
@@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.aspectj.weaver.ast.Or;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
@@ -133,7 +132,7 @@ public class UserEO extends BaseEntity implements Serializable {
|
||||
* 部门EO列表
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private List<OrgEO> orgList = new ArrayList<>();
|
||||
private List<OrgEO> orgEOList = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 角色ID列表
|
||||
|
||||
@@ -160,7 +160,7 @@ public class UserEOServiceImpl implements IUserEoService {
|
||||
});
|
||||
|
||||
// 插入组织关联表
|
||||
eo.getOrgList().forEach(c -> {
|
||||
eo.getOrgEOList().forEach(c -> {
|
||||
UserOrgEO userOrgEO = new UserOrgEO();
|
||||
userOrgEO.setUserId(eo.getUsid());
|
||||
userOrgEO.setOrgId(c.getOrgCode());
|
||||
|
||||
@@ -4,9 +4,13 @@
|
||||
|
||||
<select id="list" parameterType="string" resultType="map">
|
||||
select * from(select t1.USID,t1.ACCOUNT,t1.USNAME,t1.CELLPHONE_NUMBER,t1.EMAIL,t3.NAME ROLENAME,t3.id ROLEID,
|
||||
date_format(t1.UPDATE_TIME,'%Y-%m-%d %H:%i:%S')CREATEDATE from TS_USER t1
|
||||
date_format(t1.UPDATE_TIME,'%Y-%m-%d %H:%i:%S')CREATEDATE
|
||||
,org.ID as ORGID,org.org_name as ORGNAME
|
||||
from TS_USER t1
|
||||
left join TR_USER_ROLE t2 on t1.USID=t2.USER_ID
|
||||
left JOIN TS_ROLE t3 on t2.ROLE_ID=t3.ID
|
||||
left JOIN tr_user_org uo on t1.usid= uo.user_id
|
||||
left JOIN ts_org org on uo.org_id = org.id
|
||||
where t1.del_flag='0'
|
||||
<if test="account !='' and account !=null">
|
||||
and t1.ACCOUNT like "%"#{account}"%"
|
||||
@@ -57,7 +61,7 @@
|
||||
<result column="name" property="name"/>
|
||||
<result column="remarks" property="remarks"/>
|
||||
</collection>
|
||||
<collection property="orgList" ofType="com.adc.da.sys.entity.OrgEO">
|
||||
<collection property="orgEOList" ofType="com.adc.da.sys.entity.OrgEO">
|
||||
<id column="id" property="orgCode"/>
|
||||
<result column="org_name" property="orgName"/>
|
||||
</collection>
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
<!-- 插入记录 -->
|
||||
<insert id="insertBatch" parameterType="com.adc.da.sys.entity.UserOrgEO" >
|
||||
insert into TR_USER_ORG(<include refid="Base_Column_List" />)values
|
||||
<foreach collection="UserOrgEOList" item="ur" separator=",">
|
||||
<foreach collection="userOrgEOList" item="ur" separator=",">
|
||||
(#{ur.userId}, #{ur.orgId})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
Binary file not shown.
+3
@@ -9,6 +9,7 @@ import com.adc.da.report.eo.TtReportManageAct;
|
||||
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.util.exception.AdcDaBaseException;
|
||||
import com.adc.da.util.utils.CollectionUtils;
|
||||
import com.adc.da.util.utils.StringUtils;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
@@ -132,6 +133,8 @@ public class ActivitDefineService {
|
||||
}
|
||||
iReportLabelService.saveBatch(labelList);
|
||||
}
|
||||
}else {
|
||||
throw new AdcDaBaseException("没有流程类型"+prcType);
|
||||
}
|
||||
return reportId;
|
||||
}
|
||||
|
||||
+36
-42
@@ -226,6 +226,13 @@ public class TodoTaskController {
|
||||
TtReportManageAct ttReportManageAct = ttReportManageActDao.selectByDataId(dataId);
|
||||
reportEntity.setConfidentialLevel(ttReportManageAct.getConfidentialLevel());
|
||||
reportEntity.setPrivacyLevel(ttReportManageAct.getPrivacyLevel());
|
||||
}else if("5".equals(prcType)){
|
||||
//上传
|
||||
TtReportManageAct ttReportManageAct = ttReportManageActDao.selectByDataId(dataId);
|
||||
reportEntity.setConfidentialLevel(ttReportManageAct.getConfidentialLevel());
|
||||
reportEntity.setPrivacyLevel(ttReportManageAct.getPrivacyLevel());
|
||||
}else {
|
||||
throw new AdcDaBaseException("没有流程类型"+prcType);
|
||||
}
|
||||
return reportEntity;
|
||||
}
|
||||
@@ -500,52 +507,13 @@ public class TodoTaskController {
|
||||
return Result.success(busProcessNewVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dataId
|
||||
* @param prcType
|
||||
*/
|
||||
@ApiOperation(value = "草稿详情")
|
||||
@GetMapping("/queryDetailByDataId")
|
||||
public ResponseMessage queryDetailByDataId(@RequestParam("dataId") String dataId,
|
||||
@RequestParam("prcType")String prcType,
|
||||
@RequestParam(value = "prcId",required = false)String prcId) {
|
||||
// 查找详细业务数据
|
||||
BusProcessNewVO busProcessNewVO = this.queryDetailDateByDataId(dataId, prcType);
|
||||
//审批数据
|
||||
BusProcessApprove busProcessApprove = new BusProcessApprove();
|
||||
if(StringUtils.isNotEmpty(prcId)){
|
||||
List<BusProcessApprove> busProcessApproves = busProcessApproveMapper.selectEoByPrcIdAndTask(prcId);
|
||||
busProcessApprove = busProcessApproves.get(0);
|
||||
}else {
|
||||
List<BusProcessApprove> busProcessApproves = busProcessApproveMapper.selectEoByDataId(dataId);
|
||||
busProcessApprove = busProcessApproves.get(0);
|
||||
}
|
||||
busProcessNewVO.setSubmitJson(busProcessApprove.getFromValsJson());
|
||||
return Result.success(busProcessNewVO);
|
||||
}
|
||||
|
||||
private BusProcessNewVO queryDetailDateByDataId(String dataId, String prcType) {
|
||||
BusProcessNewVO busProcessNewVO = new BusProcessNewVO();
|
||||
if ("1".equals(prcType)){
|
||||
PowerApplyActPageVO powerApplyActPageVO = powerApplyActDao.selectListBydataId(dataId);
|
||||
String string = JSONArray.toJSONString(powerApplyActPageVO);
|
||||
//去对应的 数据表查数据
|
||||
busProcessNewVO.setDataJson(string);
|
||||
}else if ("4".equals(prcType)){
|
||||
TtReportManageAct ttReportManageAct = ttReportManageActDao.selectByDataId(dataId);
|
||||
String string = JSONArray.toJSONString(ttReportManageAct);
|
||||
//去对应的 数据表查数据
|
||||
busProcessNewVO.setDataJson(string);
|
||||
}
|
||||
return busProcessNewVO;
|
||||
}
|
||||
|
||||
private BusProcessNewVO queryDetailDate(BusProcessNew busProcessNew, String prcType) {
|
||||
BusProcessNewVO busProcessNewVO = new BusProcessNewVO();
|
||||
BeanUtils.copyProperties(busProcessNew,busProcessNewVO);
|
||||
String pId = busProcessNew.getPId();
|
||||
String dataId = busProcessNew.getDataId();
|
||||
if ("1".equals(prcType)){
|
||||
if ("".equals(prcType)){
|
||||
//预览
|
||||
PowerApplyActPageVO powerApplyAct = new PowerApplyActPageVO();
|
||||
if (StringUtils.isBlank(pId)){
|
||||
@@ -556,7 +524,18 @@ public class TodoTaskController {
|
||||
String string = JSONArray.toJSONString(powerApplyAct);
|
||||
//去对应的 数据表查数据
|
||||
busProcessNewVO.setDataJson(string);
|
||||
}else if ("2".equals(prcType)){
|
||||
}else if ("1".equals(prcType)){
|
||||
//预览 + 下载
|
||||
PowerApplyActPageVO powerApplyAct = new PowerApplyActPageVO();
|
||||
if (StringUtils.isBlank(pId)){
|
||||
powerApplyAct = powerApplyActDao.selectListBydataId(dataId);
|
||||
}else {
|
||||
powerApplyAct = powerApplyActDao.selectListByPrcId(pId);
|
||||
}
|
||||
String string = JSONArray.toJSONString(powerApplyAct);
|
||||
//去对应的 数据表查数据
|
||||
busProcessNewVO.setDataJson(string);
|
||||
} else if ("2".equals(prcType)){
|
||||
//预览 + 下载
|
||||
PowerApplyActPageVO powerApplyAct = new PowerApplyActPageVO();
|
||||
if (StringUtils.isBlank(pId)){
|
||||
@@ -591,6 +570,21 @@ public class TodoTaskController {
|
||||
String string = JSONArray.toJSONString(ttReportManageAct);
|
||||
//去对应的 数据表查数据
|
||||
busProcessNewVO.setDataJson(string);
|
||||
}else if("5".equals(prcType)){
|
||||
//编辑
|
||||
TtReportManageAct ttReportManageAct = new TtReportManageAct();
|
||||
if (StringUtils.isBlank(pId)){
|
||||
ttReportManageAct = ttReportManageActDao.selectByDataId(dataId);
|
||||
}else {
|
||||
ttReportManageAct = ttReportManageActDao.selectByPrcId(pId);
|
||||
}
|
||||
List<String> labelList = treeLableDao.selectIdByReport(ttReportManageAct.getDataId());
|
||||
ttReportManageAct.setLabelList(labelList);
|
||||
String string = JSONArray.toJSONString(ttReportManageAct);
|
||||
//去对应的 数据表查数据
|
||||
busProcessNewVO.setDataJson(string);
|
||||
}else {
|
||||
throw new AdcDaBaseException("没有流程类型"+prcType);
|
||||
}
|
||||
|
||||
return busProcessNewVO;
|
||||
@@ -686,12 +680,12 @@ public class TodoTaskController {
|
||||
for (ApproveDataVO approveDataVO : approveDataVOList) {
|
||||
String dataJson = approveDataVO.getDataJson();
|
||||
String submitJson = approveDataVO.getSubmitJson();
|
||||
// String reportId = approveDataVO.getReportId();
|
||||
String reportId = UUID.randomUUID().toString().replace("-","");
|
||||
String saveId = null;
|
||||
String dataId = null;
|
||||
if (approveDataVO.getId() != null && !approveDataVO.getId().equals("")) {
|
||||
saveId = approveDataVO.getId();
|
||||
saveIdList.append(","+saveId);
|
||||
|
||||
QueryWrapper<BusProcessName> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("CREAT_USER", approveDataVO.getCreateUser());
|
||||
|
||||
@@ -9,7 +9,7 @@ public enum FlowTypeEnum {
|
||||
YLXZSQ("2","预览+下载申请","QXSQ","预览+下载申请",""),
|
||||
XZSQ("3","下载申请","QXSQ","下载申请",""),
|
||||
SCBGLC("4","上传审批","SCBG","上传审批",""),
|
||||
BJBGLC("5","编辑报告","BJBG","编辑报告",""),
|
||||
BJBGLC("5","编辑报告","SCBG","编辑报告",""),
|
||||
;
|
||||
|
||||
private String value;
|
||||
|
||||
@@ -16,6 +16,7 @@ import org.activiti.engine.delegate.DelegateTask;
|
||||
import org.activiti.engine.delegate.TaskListener;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 权限申请流程 发起流程
|
||||
@@ -60,6 +61,8 @@ public class twoApplyAfter implements TaskListener {
|
||||
delegateTask.setVariable("flag",s);
|
||||
if ("1".equals(s)){
|
||||
powerApplyDao.savePowerAct(powerApplyAct);
|
||||
List<String> collect = powerApplyActs.stream().map(e -> e.getId()).collect(Collectors.toList());
|
||||
powerApplyActDao.batchDel(collect);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Reference in New Issue
Block a user