[修改] 权限申请对接 + 保密结束时间定时任务

This commit is contained in:
bupengxiang
2023-05-10 18:03:27 +08:00
parent 5997e134b9
commit 33e87fea97
32 changed files with 180 additions and 36 deletions
@@ -0,0 +1,39 @@
package com.adc.da.report.Timer;
import com.adc.da.report.dao.mysql.ReportDao;
import com.adc.da.report.eo.ReportEntity;
import com.adc.da.util.utils.CollectionUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* 定时任务,扫描全部报告的 保密到期日期。
* 当日日期 = 保密到期日期,则报告涉密等级自动改为 “公开(内部公开)”
* @Author bpx
* @Date2022/4/8;
*/
@Component
@EnableScheduling
@Slf4j
public class secrecyDDLTimer {
@Autowired
ReportDao reportDao;
@Scheduled(cron="0 0/10 * * * ?")
public void timingOpen() {
log.info("**********************保密到期定时任务开始**********************");
List<ReportEntity> entity = reportDao.selectDDL();
if (CollectionUtils.isNotEmpty(entity)){
entity.forEach(e -> {
e.setConfidentialLevel("公开(内部公开)");
});
}
log.info("**********************保密到期定时任务结束**********************");
}
}
@@ -65,4 +65,11 @@ public interface ReportDao extends BaseMapper<ReportEntity> {
void saveReportAct(@Param("Vo") TtReportManageAct ttReportManageAct); void saveReportAct(@Param("Vo") TtReportManageAct ttReportManageAct);
ReportDetailVo reportDetail(@Param("reportId") String reportId); ReportDetailVo reportDetail(@Param("reportId") String reportId);
/**
* 查询保密到期的报告
* @return
*/
List<ReportEntity> selectDDL();
} }
@@ -71,6 +71,7 @@ public class IpowerApplyActServiceImpl extends ServiceImpl<PowerApplyActDao, Pow
*/ */
public void saveOrUpdateSingle(PowerApplyAct powerApplyAct) { public void saveOrUpdateSingle(PowerApplyAct powerApplyAct) {
if (StringUtils.isEmpty(powerApplyAct.getId())) { if (StringUtils.isEmpty(powerApplyAct.getId())) {
// powerApplyAct.setId(UUID.randomUUID().toString().replaceAll("-",""));
baseMapper.insert(powerApplyAct); baseMapper.insert(powerApplyAct);
} else { } else {
baseMapper.updateById(powerApplyAct); baseMapper.updateById(powerApplyAct);
@@ -140,5 +140,12 @@ public class PowerApplyActPageVO extends BasePageVO {
private String name; private String name;
/**
* 报告上传人
*/
private String createUserId;
private String createUserName;
private List<PowerApplyAct> powerApplyList; private List<PowerApplyAct> powerApplyList;
} }
@@ -121,6 +121,8 @@ public class ReportVo {
*/ */
private String createUserId; private String createUserId;
private String createUserName;
/** /**
* 创建人 * 创建人
*/ */
@@ -114,13 +114,21 @@
where a.data_id = #{dataId} where a.data_id = #{dataId}
</select> </select>
<select id="selectActListBydataId" resultType="com.adc.da.report.eo.PowerApplyAct"> <select id="selectActListBydataId" resultType="com.adc.da.report.eo.PowerApplyAct">
select a.* select a.*,
rep.name,rep.keycontent,rep.maincontent,rep.DEPARTMENT,rep.year,rep.fileid,rep.confidentialLevel,rep.privacyLevel,
rep.createUserId , u.usname as createUserName
from <include refid="TableName"/> a from <include refid="TableName"/> a
left join TT_REPORT_MANAGE rep on a.report_id = rep.id
left join ts_user u on u.usid = rep.createUserId
where a.data_id = #{dataId} and a.del_flag = 0 where a.data_id = #{dataId} and a.del_flag = 0
</select> </select>
<select id="selectListByPrcId" resultType="com.adc.da.report.vo.PowerApplyActPageVO"> <select id="selectListByPrcId" resultType="com.adc.da.report.vo.PowerApplyActPageVO">
select a.* select a.*,
rep.name,rep.keycontent,rep.maincontent,rep.DEPARTMENT,rep.year,rep.fileid,rep.confidentialLevel,rep.privacyLevel,
rep.createUserId , u.usname as createUserName
from <include refid="TableName"/> a from <include refid="TableName"/> a
left join TT_REPORT_MANAGE rep on a.report_id = rep.id
left join ts_user u on u.usid = rep.createUserId
where a.prc_id = #{prcId} and a.del_flag = 0 where a.prc_id = #{prcId} and a.del_flag = 0
</select> </select>
</mapper> </mapper>
@@ -49,12 +49,15 @@
eo.fileid, eo.fileid,
eo.confidentialLevel, eo.confidentialLevel,
eo.privacyLevel, eo.privacyLevel,
eo.createUserId,
u.usname as createUserName,
pa.report_id, pa.report_id,
pa.user_id pa.user_id
FROM FROM
TT_REPORT_MANAGE eo TT_REPORT_MANAGE eo
LEFT JOIN tr_report_user ru ON eo.id = ru.reportId LEFT JOIN tr_report_user ru ON eo.id = ru.reportId
LEFT JOIN power_apply pa ON pa.report_id = eo.id LEFT JOIN power_apply pa ON pa.report_id = eo.id
LEFT JOIN ts_user u on u.USID = eo.createUserId
WHERE WHERE
eo.DEL_FLAG = 0 eo.DEL_FLAG = 0
<if test="pageVO.usid !='' and pageVO.usid != null"> <if test="pageVO.usid !='' and pageVO.usid != null">
@@ -261,4 +264,7 @@
WHERE rm.id = #{reportId} WHERE rm.id = #{reportId}
AND rm.del_flag = 0 AND rm.del_flag = 0
</select> </select>
<select id="selectDDL" resultType="com.adc.da.report.eo.ReportEntity">
SELECT * FROM tt_report_manage WHERE secrecy_last &lt;= NOW()
</select>
</mapper> </mapper>
@@ -114,13 +114,21 @@
where a.data_id = #{dataId} where a.data_id = #{dataId}
</select> </select>
<select id="selectActListBydataId" resultType="com.adc.da.report.eo.PowerApplyAct"> <select id="selectActListBydataId" resultType="com.adc.da.report.eo.PowerApplyAct">
select a.* select a.*,
rep.name,rep.keycontent,rep.maincontent,rep.DEPARTMENT,rep.year,rep.fileid,rep.confidentialLevel,rep.privacyLevel,
rep.createUserId , u.usname as createUserName
from <include refid="TableName"/> a from <include refid="TableName"/> a
left join TT_REPORT_MANAGE rep on a.report_id = rep.id
left join ts_user u on u.usid = rep.createUserId
where a.data_id = #{dataId} and a.del_flag = 0 where a.data_id = #{dataId} and a.del_flag = 0
</select> </select>
<select id="selectListByPrcId" resultType="com.adc.da.report.vo.PowerApplyActPageVO"> <select id="selectListByPrcId" resultType="com.adc.da.report.vo.PowerApplyActPageVO">
select a.* select a.*,
rep.name,rep.keycontent,rep.maincontent,rep.DEPARTMENT,rep.year,rep.fileid,rep.confidentialLevel,rep.privacyLevel,
rep.createUserId , u.usname as createUserName
from <include refid="TableName"/> a from <include refid="TableName"/> a
left join TT_REPORT_MANAGE rep on a.report_id = rep.id
left join ts_user u on u.usid = rep.createUserId
where a.prc_id = #{prcId} and a.del_flag = 0 where a.prc_id = #{prcId} and a.del_flag = 0
</select> </select>
</mapper> </mapper>
@@ -25,6 +25,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.binary.Base64; import org.apache.commons.codec.binary.Base64;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@@ -51,6 +52,7 @@ public class UserEOController extends BaseController<UserEO> {
@Resource @Resource
private IUserEoService userEOService; private IUserEoService userEOService;
@Autowired
private UserOrgEODao userOrgEODao; private UserOrgEODao userOrgEODao;
@Value("${isPassEncrypted}") @Value("${isPassEncrypted}")
@@ -123,15 +125,17 @@ public class UserEOController extends BaseController<UserEO> {
userOrgEOLambdaQueryWrapper.eq(UserOrgEO::getUserId,eo.getUsid()); userOrgEOLambdaQueryWrapper.eq(UserOrgEO::getUserId,eo.getUsid());
userOrgEODao.delete(userOrgEOLambdaQueryWrapper); userOrgEODao.delete(userOrgEOLambdaQueryWrapper);
String orgId = eo.getOrgId(); String orgId = eo.getOrgId();
String[] split = orgId.split(","); if (StringUtils.isNotEmpty(orgId)){
List<UserOrgEO> userOrgEOS = new ArrayList<>(); String[] split = orgId.split(",");
for (String s : split) { List<UserOrgEO> userOrgEOS = new ArrayList<>();
UserOrgEO userOrgEO = new UserOrgEO(); for (String s : split) {
userOrgEO.setUserId(eo.getUsid()); UserOrgEO userOrgEO = new UserOrgEO();
userOrgEO.setOrgId(s); userOrgEO.setUserId(eo.getUsid());
userOrgEOS.add(userOrgEO); userOrgEO.setOrgId(s);
userOrgEOS.add(userOrgEO);
}
userOrgEODao.insertBatch(userOrgEOS);
} }
userOrgEODao.insertBatch(userOrgEOS);
return Result.success(); return Result.success();
} }
@@ -1,7 +1,6 @@
package com.adc.da.sys.dao.mysql; package com.adc.da.sys.dao.mysql;
import com.adc.da.sys.entity.UserOrgEO; import com.adc.da.sys.entity.UserOrgEO;
import com.adc.da.sys.entity.UserRoleEO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@@ -231,7 +231,7 @@ public class ActivitDefineController {
@PostMapping("/batchStartProcess") @PostMapping("/batchStartProcess")
public Wrapper<String> batchStartProcess(@RequestBody List<StartProcessEO> startProcessEOList) { public Wrapper<String> batchStartProcess(@RequestBody List<StartProcessEO> startProcessEOList) {
List<BusProcessName> busProcessNames = new ArrayList<>(); List<BusProcessName> busProcessNames = new ArrayList<>();
StringBuilder stringBuilder = new StringBuilder(); StringBuilder taskIds = new StringBuilder();
for (StartProcessEO startProcessEO : startProcessEOList) { for (StartProcessEO startProcessEO : startProcessEOList) {
startProcessEO.setLoginUserId(UserUtils.getUserId()); startProcessEO.setLoginUserId(UserUtils.getUserId());
@@ -266,7 +266,7 @@ public class ActivitDefineController {
task.setAssignee(userId); task.setAssignee(userId);
taskService.saveTask(task); taskService.saveTask(task);
stringBuilder.append(","+task.getId()); taskIds.append(","+task.getId());
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
if(StringUtils.isEmpty(bpnId)) { if(StringUtils.isEmpty(bpnId)) {
@@ -310,7 +310,7 @@ public class ActivitDefineController {
} }
ibusprocessnameService.saveBatch(busProcessNames); ibusprocessnameService.saveBatch(busProcessNames);
String substring = stringBuilder.toString().substring(1, stringBuilder.length() - 1); String substring = taskIds.toString().substring(1, taskIds.length());
return WrapMapper.ok(substring); return WrapMapper.ok(substring);
} }
@@ -11,13 +11,16 @@ 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.CollectionUtils; import com.adc.da.util.utils.CollectionUtils;
import com.adc.da.util.utils.StringUtils; import com.adc.da.util.utils.StringUtils;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; 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.UUID; import java.util.UUID;
@Service @Service
@@ -48,15 +51,34 @@ public class ActivitDefineService {
reportId = UUID.randomUUID().toString().replace("-",""); reportId = UUID.randomUUID().toString().replace("-","");
} }
if ("1".equals(prcType)){ if ("1".equals(prcType)){
//预览
PowerApplyAct powerApplyAct = JSONObject.parseObject(dataJson, PowerApplyAct.class); PowerApplyAct powerApplyAct = JSONObject.parseObject(dataJson, PowerApplyAct.class);
powerApplyAct.setId(UUID.randomUUID().toString().replaceAll("-",""));
powerApplyAct.setDataId(reportId); 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());
iPowerApplyActService.saveOrUpdateSingle(powerApplyAct); iPowerApplyActService.saveOrUpdateSingle(powerApplyAct);
}else if ("4".equals(prcType)){ } else if("2".equals(prcType)){
//预览 + 下载
PowerApplyAct powerApplyAct = JSONObject.parseObject(dataJson, PowerApplyAct.class);
powerApplyAct.setDataId(reportId);
powerApplyAct.setTaskId(taskId);
powerApplyAct.setPrcId(prcId);
powerApplyAct.setDelFlag(0);
powerApplyAct.setCreateDate(new Date());
iPowerApplyActService.saveOrUpdateSingle(powerApplyAct);
}else if("3".equals(prcType)){
//下载
PowerApplyAct powerApplyAct = JSONObject.parseObject(dataJson, PowerApplyAct.class);
powerApplyAct.setDataId(reportId);
powerApplyAct.setTaskId(taskId);
powerApplyAct.setPrcId(prcId);
powerApplyAct.setDelFlag(0);
powerApplyAct.setCreateDate(new Date());
iPowerApplyActService.saveOrUpdateSingle(powerApplyAct);
} else if ("4".equals(prcType)){
//上传
TtReportManageAct ttReportManageAct = JSONObject.parseObject(dataJson, TtReportManageAct.class); TtReportManageAct ttReportManageAct = JSONObject.parseObject(dataJson, TtReportManageAct.class);
ttReportManageAct.setDataId(reportId); ttReportManageAct.setDataId(reportId);
ttReportManageAct.setTaskId(taskId); ttReportManageAct.setTaskId(taskId);
@@ -68,11 +90,15 @@ public class ActivitDefineService {
//修改报表标签关系表(先删后增) //修改报表标签关系表(先删后增)
iReportLabelService.deleteReportLabelByReportId(new String[]{reportId}); iReportLabelService.deleteReportLabelByReportId(new String[]{reportId});
if (CollectionUtils.isNotEmpty(ttReportManageAct.getLabelList())){ if (CollectionUtils.isNotEmpty(ttReportManageAct.getLabelList())){
ttReportManageAct.getLabelList().forEach((label) -> { List<ReportLabelEntity> labelList = new ArrayList<>();
for (String label : ttReportManageAct.getLabelList()) {
JSONArray objects = JSONObject.parseArray(label);
String lastLabel =(String)objects.get(objects.size()-1);
ReportLabelEntity reportLabelEntity = new ReportLabelEntity(com.adc.da.util.utils.UUID.randomUUID10() ReportLabelEntity reportLabelEntity = new ReportLabelEntity(com.adc.da.util.utils.UUID.randomUUID10()
,ttReportManageAct.getDataId(), label); ,ttReportManageAct.getDataId(), label,lastLabel);
reportLabelDao.insert(reportLabelEntity); labelList.add(reportLabelEntity);
}); }
iReportLabelService.saveBatch(labelList);
} }
} }
return reportId; return reportId;
@@ -213,14 +213,14 @@ public class TodoTaskController {
private ReportEntity selectReport(String prcType, String dataId) { private ReportEntity selectReport(String prcType, String dataId) {
ReportEntity reportEntity = new ReportEntity(); ReportEntity reportEntity = new ReportEntity();
if ("1".equals(prcType)){ if ("1".equals(prcType)){
//下载
reportEntity = reportDao.selectById(dataId);
}else if ("2".equals(prcType)){
//预览 //预览
reportEntity = reportDao.selectById(dataId); reportEntity = reportDao.selectById(dataId);
} else if ("3".equals(prcType)){ }else if ("2".equals(prcType)){
//下载 + 预览 //下载 + 预览
reportEntity = reportDao.selectById(dataId); reportEntity = reportDao.selectById(dataId);
} else if ("3".equals(prcType)){
//下载
reportEntity = reportDao.selectById(dataId);
}else if("4".equals(prcType)){ }else if("4".equals(prcType)){
//上传 //上传
TtReportManageAct ttReportManageAct = ttReportManageActDao.selectByDataId(dataId); TtReportManageAct ttReportManageAct = ttReportManageActDao.selectByDataId(dataId);
@@ -376,6 +376,11 @@ public class TodoTaskController {
busProcessApprove.setDataId(reportId); busProcessApprove.setDataId(reportId);
ibusProcessApproveService.save(busProcessApprove); ibusProcessApproveService.save(busProcessApprove);
taskService.complete(busMes.getTaskId()); taskService.complete(busMes.getTaskId());
LambdaQueryWrapper<BusProcessName> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(BusProcessName::getPrcId,task.getProcessInstanceId());
BusProcessName one = iBusProcessNameService.getOne(wrapper);
one.setDataId(reportId);
iBusProcessNameService.updateById(one);
} }
} else { } else {
throw new AdcDaBaseException("缺少任务id,无法完成任务"); throw new AdcDaBaseException("缺少任务id,无法完成任务");
@@ -541,6 +546,7 @@ public class TodoTaskController {
String pId = busProcessNew.getPId(); String pId = busProcessNew.getPId();
String dataId = busProcessNew.getDataId(); String dataId = busProcessNew.getDataId();
if ("1".equals(prcType)){ if ("1".equals(prcType)){
//预览
PowerApplyActPageVO powerApplyAct = new PowerApplyActPageVO(); PowerApplyActPageVO powerApplyAct = new PowerApplyActPageVO();
if (StringUtils.isBlank(pId)){ if (StringUtils.isBlank(pId)){
powerApplyAct = powerApplyActDao.selectListBydataId(dataId); powerApplyAct = powerApplyActDao.selectListBydataId(dataId);
@@ -550,7 +556,30 @@ public class TodoTaskController {
String string = JSONArray.toJSONString(powerApplyAct); String string = JSONArray.toJSONString(powerApplyAct);
//去对应的 数据表查数据 //去对应的 数据表查数据
busProcessNewVO.setDataJson(string); busProcessNewVO.setDataJson(string);
}else if("4".equals(prcType)){ }else if ("2".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 ("3".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("4".equals(prcType)){
//上传
TtReportManageAct ttReportManageAct = new TtReportManageAct(); TtReportManageAct ttReportManageAct = new TtReportManageAct();
if (StringUtils.isBlank(pId)){ if (StringUtils.isBlank(pId)){
ttReportManageAct = ttReportManageActDao.selectByDataId(dataId); ttReportManageAct = ttReportManageActDao.selectByDataId(dataId);
@@ -43,7 +43,13 @@ 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.XZSQ.getValue(), prcType)){ if(StringUtils.equals(FlowTypeEnum.YLSQ.getValue(), prcType)){
prcName = FlowTypeEnum.YLSQ.getPrcName();
prcNum = FlowTypeEnum.YLSQ.getPrcNum();
}else if(StringUtils.equals(FlowTypeEnum.YLXZSQ.getValue(), prcType)){
prcName = FlowTypeEnum.YLXZSQ.getPrcName();
prcNum = FlowTypeEnum.YLXZSQ.getPrcNum();
}else if(StringUtils.equals(FlowTypeEnum.XZSQ.getValue(), prcType)){
prcName = FlowTypeEnum.XZSQ.getPrcName(); prcName = FlowTypeEnum.XZSQ.getPrcName();
prcNum = FlowTypeEnum.XZSQ.getPrcNum(); prcNum = FlowTypeEnum.XZSQ.getPrcNum();
}else if (StringUtils.equals(FlowTypeEnum.SCBGLC.getValue(), prcType)){ }else if (StringUtils.equals(FlowTypeEnum.SCBGLC.getValue(), prcType)){
@@ -5,9 +5,9 @@ package com.adc.da.wkflow.enums;
*/ */
public enum FlowTypeEnum { public enum FlowTypeEnum {
XZSQ("1","下载申请","QXSQ","下载申请",""), YLSQ("1","预览申请","QXSQ","预览申请",""),
YLSQ("2","预览申请","QXSQ","预览申请",""), YLXZSQ("2","预览+下载申请","QXSQ","预览+下载申请",""),
YLXZSQ("3","预览+下载申请","QXSQ","预览+下载申请",""), XZSQ("3","下载申请","QXSQ","下载申请",""),
SCBGLC("4","上传审批","SCBG","上传审批",""), SCBGLC("4","上传审批","SCBG","上传审批",""),
; ;
@@ -28,7 +28,7 @@ public class oneApplyAfter implements TaskListener {
IBusProcessApproveService approveService = SpringContextUtil.getBean(IBusProcessApproveService.class); IBusProcessApproveService approveService = SpringContextUtil.getBean(IBusProcessApproveService.class);
//查询task任务 //查询task任务
LambdaQueryWrapper<PowerApplyAct> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<PowerApplyAct> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(PowerApplyAct::getTaskId, delegateTask.getId()); queryWrapper.eq(PowerApplyAct::getPrcId, delegateTask.getProcessInstanceId());
queryWrapper.eq(PowerApplyAct::getDelFlag, 0); queryWrapper.eq(PowerApplyAct::getDelFlag, 0);
List<PowerApplyAct> powerApplyActs = powerApplyActDao.selectList(queryWrapper); List<PowerApplyAct> powerApplyActs = powerApplyActDao.selectList(queryWrapper);
PowerApplyAct powerApplyAct = new PowerApplyAct(); PowerApplyAct powerApplyAct = new PowerApplyAct();
@@ -30,7 +30,7 @@ public class reEditAfter implements TaskListener {
IBusProcessApproveService approveService = SpringContextUtil.getBean(IBusProcessApproveService.class); IBusProcessApproveService approveService = SpringContextUtil.getBean(IBusProcessApproveService.class);
//查询task任务 //查询task任务
LambdaQueryWrapper<PowerApplyAct> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<PowerApplyAct> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(PowerApplyAct::getTaskId, delegateTask.getId()); queryWrapper.eq(PowerApplyAct::getPrcId, delegateTask.getProcessInstanceId());
queryWrapper.eq(PowerApplyAct::getDelFlag, 0); queryWrapper.eq(PowerApplyAct::getDelFlag, 0);
List<PowerApplyAct> powerApplyActs = powerApplyActDao.selectList(queryWrapper); List<PowerApplyAct> powerApplyActs = powerApplyActDao.selectList(queryWrapper);
PowerApplyAct powerApplyAct = new PowerApplyAct(); PowerApplyAct powerApplyAct = new PowerApplyAct();
@@ -27,7 +27,7 @@ public class startAfter implements TaskListener {
IBusProcessApproveService approveService = SpringContextUtil.getBean(IBusProcessApproveService.class); IBusProcessApproveService approveService = SpringContextUtil.getBean(IBusProcessApproveService.class);
//查询task任务 //查询task任务
LambdaQueryWrapper<PowerApplyAct> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<PowerApplyAct> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(PowerApplyAct::getTaskId, delegateTask.getId()); queryWrapper.eq(PowerApplyAct::getPrcId, delegateTask.getProcessInstanceId());
queryWrapper.eq(PowerApplyAct::getDelFlag, 0); queryWrapper.eq(PowerApplyAct::getDelFlag, 0);
List<PowerApplyAct> powerApplyActs = powerApplyActDao.selectList(queryWrapper); List<PowerApplyAct> powerApplyActs = powerApplyActDao.selectList(queryWrapper);
PowerApplyAct powerApplyAct = new PowerApplyAct(); PowerApplyAct powerApplyAct = new PowerApplyAct();
@@ -46,6 +46,7 @@ public class startAfter implements TaskListener {
//审批结果 //审批结果
LambdaQueryWrapper<BusProcessApprove> approveWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<BusProcessApprove> approveWrapper = new LambdaQueryWrapper<>();
approveWrapper.eq(BusProcessApprove::getTaskId, delegateTask.getId()); approveWrapper.eq(BusProcessApprove::getTaskId, delegateTask.getId());
// approveWrapper.eq(BusProcessApprove::getPrcId, delegateTask.getProcessInstanceId());
List<BusProcessApprove> list = approveService.list(approveWrapper); List<BusProcessApprove> list = approveService.list(approveWrapper);
String fromValsJson = list.get(0).getFromValsJson(); String fromValsJson = list.get(0).getFromValsJson();
JSONObject object = JSONObject.parseObject(fromValsJson); JSONObject object = JSONObject.parseObject(fromValsJson);
@@ -30,11 +30,12 @@ public class twoApplyAfter implements TaskListener {
IBusProcessApproveService approveService = SpringContextUtil.getBean(IBusProcessApproveService.class); IBusProcessApproveService approveService = SpringContextUtil.getBean(IBusProcessApproveService.class);
//查询task任务 //查询task任务
LambdaQueryWrapper<PowerApplyAct> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<PowerApplyAct> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(PowerApplyAct::getTaskId, delegateTask.getId()); queryWrapper.eq(PowerApplyAct::getPrcId, delegateTask.getProcessInstanceId());
queryWrapper.eq(PowerApplyAct::getDelFlag, 0);
List<PowerApplyAct> powerApplyActs = powerApplyActDao.selectList(queryWrapper); List<PowerApplyAct> powerApplyActs = powerApplyActDao.selectList(queryWrapper);
PowerApplyAct powerApplyAct = new PowerApplyAct(); PowerApplyAct powerApplyAct = new PowerApplyAct();
if (powerApplyActs.size()>0){ if (powerApplyActs.size()>0){
powerApplyAct = powerApplyActs.get(0); powerApplyAct = powerApplyActs.get(0);
} }
//构建工作流代办 //构建工作流代办
BusProcessNew busProcessNew = new BusProcessNew(); BusProcessNew busProcessNew = new BusProcessNew();