[修改] 权限申请对接 + 保密结束时间定时任务
This commit is contained in:
+3
-3
@@ -231,7 +231,7 @@ public class ActivitDefineController {
|
||||
@PostMapping("/batchStartProcess")
|
||||
public Wrapper<String> batchStartProcess(@RequestBody List<StartProcessEO> startProcessEOList) {
|
||||
List<BusProcessName> busProcessNames = new ArrayList<>();
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
StringBuilder taskIds = new StringBuilder();
|
||||
|
||||
for (StartProcessEO startProcessEO : startProcessEOList) {
|
||||
startProcessEO.setLoginUserId(UserUtils.getUserId());
|
||||
@@ -266,7 +266,7 @@ public class ActivitDefineController {
|
||||
task.setAssignee(userId);
|
||||
taskService.saveTask(task);
|
||||
|
||||
stringBuilder.append(","+task.getId());
|
||||
taskIds.append(","+task.getId());
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
if(StringUtils.isEmpty(bpnId)) {
|
||||
@@ -310,7 +310,7 @@ public class ActivitDefineController {
|
||||
}
|
||||
ibusprocessnameService.saveBatch(busProcessNames);
|
||||
|
||||
String substring = stringBuilder.toString().substring(1, stringBuilder.length() - 1);
|
||||
String substring = taskIds.toString().substring(1, taskIds.length());
|
||||
|
||||
return WrapMapper.ok(substring);
|
||||
}
|
||||
|
||||
+32
-6
@@ -11,13 +11,16 @@ import com.adc.da.report.service.IReportLabelService;
|
||||
import com.adc.da.report.service.ITtReportManageActService;
|
||||
import com.adc.da.util.utils.CollectionUtils;
|
||||
import com.adc.da.util.utils.StringUtils;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
@Service
|
||||
@@ -48,15 +51,34 @@ public class ActivitDefineService {
|
||||
reportId = UUID.randomUUID().toString().replace("-","");
|
||||
}
|
||||
if ("1".equals(prcType)){
|
||||
//预览
|
||||
PowerApplyAct powerApplyAct = JSONObject.parseObject(dataJson, PowerApplyAct.class);
|
||||
powerApplyAct.setId(UUID.randomUUID().toString().replaceAll("-",""));
|
||||
powerApplyAct.setDataId(reportId);
|
||||
powerApplyAct.setTaskId(taskId);
|
||||
powerApplyAct.setPrcId(prcId);
|
||||
powerApplyAct.setDelFlag(0);
|
||||
powerApplyAct.setCreateDate(new Date());
|
||||
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.setDataId(reportId);
|
||||
ttReportManageAct.setTaskId(taskId);
|
||||
@@ -68,11 +90,15 @@ public class ActivitDefineService {
|
||||
//修改报表标签关系表(先删后增)
|
||||
iReportLabelService.deleteReportLabelByReportId(new String[]{reportId});
|
||||
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()
|
||||
,ttReportManageAct.getDataId(), label);
|
||||
reportLabelDao.insert(reportLabelEntity);
|
||||
});
|
||||
,ttReportManageAct.getDataId(), label,lastLabel);
|
||||
labelList.add(reportLabelEntity);
|
||||
}
|
||||
iReportLabelService.saveBatch(labelList);
|
||||
}
|
||||
}
|
||||
return reportId;
|
||||
|
||||
+34
-5
@@ -213,14 +213,14 @@ public class TodoTaskController {
|
||||
private ReportEntity selectReport(String prcType, String dataId) {
|
||||
ReportEntity reportEntity = new ReportEntity();
|
||||
if ("1".equals(prcType)){
|
||||
//下载
|
||||
reportEntity = reportDao.selectById(dataId);
|
||||
}else if ("2".equals(prcType)){
|
||||
//预览
|
||||
reportEntity = reportDao.selectById(dataId);
|
||||
} else if ("3".equals(prcType)){
|
||||
}else if ("2".equals(prcType)){
|
||||
//下载 + 预览
|
||||
reportEntity = reportDao.selectById(dataId);
|
||||
} else if ("3".equals(prcType)){
|
||||
//下载
|
||||
reportEntity = reportDao.selectById(dataId);
|
||||
}else if("4".equals(prcType)){
|
||||
//上传
|
||||
TtReportManageAct ttReportManageAct = ttReportManageActDao.selectByDataId(dataId);
|
||||
@@ -376,6 +376,11 @@ public class TodoTaskController {
|
||||
busProcessApprove.setDataId(reportId);
|
||||
ibusProcessApproveService.save(busProcessApprove);
|
||||
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 {
|
||||
throw new AdcDaBaseException("缺少任务id,无法完成任务");
|
||||
@@ -541,6 +546,7 @@ public class TodoTaskController {
|
||||
String pId = busProcessNew.getPId();
|
||||
String dataId = busProcessNew.getDataId();
|
||||
if ("1".equals(prcType)){
|
||||
//预览
|
||||
PowerApplyActPageVO powerApplyAct = new PowerApplyActPageVO();
|
||||
if (StringUtils.isBlank(pId)){
|
||||
powerApplyAct = powerApplyActDao.selectListBydataId(dataId);
|
||||
@@ -550,7 +556,30 @@ public class TodoTaskController {
|
||||
String string = JSONArray.toJSONString(powerApplyAct);
|
||||
//去对应的 数据表查数据
|
||||
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();
|
||||
if (StringUtils.isBlank(pId)){
|
||||
ttReportManageAct = ttReportManageActDao.selectByDataId(dataId);
|
||||
|
||||
+7
-1
@@ -43,7 +43,13 @@ public class BusProcessNameServiceImpl extends ServiceImpl<BusProcessNameMapper,
|
||||
Map<String,Object> result = new HashMap<>();
|
||||
String prcName = "";
|
||||
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();
|
||||
prcNum = FlowTypeEnum.XZSQ.getPrcNum();
|
||||
}else if (StringUtils.equals(FlowTypeEnum.SCBGLC.getValue(), prcType)){
|
||||
|
||||
@@ -5,9 +5,9 @@ package com.adc.da.wkflow.enums;
|
||||
*/
|
||||
public enum FlowTypeEnum {
|
||||
|
||||
XZSQ("1","下载申请","QXSQ","下载申请",""),
|
||||
YLSQ("2","预览申请","QXSQ","预览申请",""),
|
||||
YLXZSQ("3","预览+下载申请","QXSQ","预览+下载申请",""),
|
||||
YLSQ("1","预览申请","QXSQ","预览申请",""),
|
||||
YLXZSQ("2","预览+下载申请","QXSQ","预览+下载申请",""),
|
||||
XZSQ("3","下载申请","QXSQ","下载申请",""),
|
||||
SCBGLC("4","上传审批","SCBG","上传审批",""),
|
||||
;
|
||||
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ public class oneApplyAfter implements TaskListener {
|
||||
IBusProcessApproveService approveService = SpringContextUtil.getBean(IBusProcessApproveService.class);
|
||||
//查询task任务
|
||||
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);
|
||||
PowerApplyAct powerApplyAct = new PowerApplyAct();
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ public class reEditAfter implements TaskListener {
|
||||
IBusProcessApproveService approveService = SpringContextUtil.getBean(IBusProcessApproveService.class);
|
||||
//查询task任务
|
||||
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);
|
||||
PowerApplyAct powerApplyAct = new PowerApplyAct();
|
||||
|
||||
@@ -27,7 +27,7 @@ public class startAfter implements TaskListener {
|
||||
IBusProcessApproveService approveService = SpringContextUtil.getBean(IBusProcessApproveService.class);
|
||||
//查询task任务
|
||||
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);
|
||||
PowerApplyAct powerApplyAct = new PowerApplyAct();
|
||||
@@ -46,6 +46,7 @@ public class startAfter implements TaskListener {
|
||||
//审批结果
|
||||
LambdaQueryWrapper<BusProcessApprove> approveWrapper = new LambdaQueryWrapper<>();
|
||||
approveWrapper.eq(BusProcessApprove::getTaskId, delegateTask.getId());
|
||||
// approveWrapper.eq(BusProcessApprove::getPrcId, delegateTask.getProcessInstanceId());
|
||||
List<BusProcessApprove> list = approveService.list(approveWrapper);
|
||||
String fromValsJson = list.get(0).getFromValsJson();
|
||||
JSONObject object = JSONObject.parseObject(fromValsJson);
|
||||
|
||||
+3
-2
@@ -30,11 +30,12 @@ public class twoApplyAfter implements TaskListener {
|
||||
IBusProcessApproveService approveService = SpringContextUtil.getBean(IBusProcessApproveService.class);
|
||||
//查询task任务
|
||||
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);
|
||||
PowerApplyAct powerApplyAct = new PowerApplyAct();
|
||||
if (powerApplyActs.size()>0){
|
||||
powerApplyAct = powerApplyActs.get(0);
|
||||
powerApplyAct = powerApplyActs.get(0);
|
||||
}
|
||||
//构建工作流代办
|
||||
BusProcessNew busProcessNew = new BusProcessNew();
|
||||
|
||||
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.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Reference in New Issue
Block a user