[新增] 解决一些流程流转的问题
This commit is contained in:
+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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user