[修改] 流程重复发起问题
This commit is contained in:
+1
-1
@@ -19,5 +19,5 @@ public interface ITtReportManageActService {
|
||||
|
||||
void deleteById(DeleteParamRequestVO deleteParamVO);
|
||||
|
||||
void saveReport(TtReportManageAct ttReportManageAct);
|
||||
void saveOrUpdataReport(TtReportManageAct ttReportManageAct);
|
||||
}
|
||||
|
||||
+16
-3
@@ -1,9 +1,11 @@
|
||||
package com.adc.da.report.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.adc.da.report.dao.mysql.PowerApplyDao;
|
||||
import com.adc.da.report.dao.mysql.ReportDao;
|
||||
import com.adc.da.report.dao.mysql.TtReportManageActDao;
|
||||
import com.adc.da.report.eo.ReportEntity;
|
||||
import com.adc.da.report.eo.TtReportManageAct;
|
||||
import com.adc.da.report.service.IReportContentService;
|
||||
import com.adc.da.report.service.ITtReportManageActService;
|
||||
@@ -125,7 +127,7 @@ public class ITtReportManageActServiceImpl extends ServiceImpl<TtReportManageAct
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveReport(TtReportManageAct ttReportManageAct) {
|
||||
public void saveOrUpdataReport(TtReportManageAct ttReportManageAct) {
|
||||
//插入报表内容表
|
||||
try {
|
||||
iReportContentService.insertReportContent(ttReportManageAct.getDataId(), ttReportManageAct.getFileId());
|
||||
@@ -133,7 +135,18 @@ public class ITtReportManageActServiceImpl extends ServiceImpl<TtReportManageAct
|
||||
} catch (IOException e) {
|
||||
log.error("获取报告内容失败", e);
|
||||
}
|
||||
//保存报告
|
||||
reportDao.saveReportAct(ttReportManageAct);
|
||||
|
||||
ReportEntity reportEntity = reportDao.selectById(ttReportManageAct.getDataId());
|
||||
if (reportEntity == null){
|
||||
//保存报告
|
||||
reportDao.saveReportAct(ttReportManageAct);
|
||||
}else {
|
||||
//更改
|
||||
ReportEntity reportEntity1 = new ReportEntity();
|
||||
BeanUtil.copyProperties(ttReportManageAct,reportEntity1);
|
||||
reportEntity1.setId(ttReportManageAct.getDataId());
|
||||
reportDao.updateById(reportEntity);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,4 +128,10 @@ public class ReportVo {
|
||||
*/
|
||||
private String uploader;
|
||||
|
||||
/**
|
||||
* 0 在流程中
|
||||
* 1 不在流程中
|
||||
*/
|
||||
private Integer isAct;
|
||||
|
||||
}
|
||||
|
||||
@@ -112,7 +112,10 @@
|
||||
thumbUpCount.thumbUp AS thumbUp,
|
||||
clicksCount.clicks AS clicks,
|
||||
downloadCount.download AS download,
|
||||
AVG( trur.user_rating ) AS reportRating
|
||||
AVG( trur.user_rating ) AS reportRating,
|
||||
IF(bpn.id is null,1,
|
||||
IF(bpn.end_time is null,0,1)
|
||||
) as isAct
|
||||
FROM
|
||||
TT_REPORT_MANAGE eo
|
||||
LEFT JOIN ts_report_content rc ON eo.id = rc.report_id
|
||||
@@ -122,6 +125,7 @@
|
||||
LEFT JOIN (SELECT report_id, COUNT(id) AS clicks FROM report_log_book WHERE type = 1 GROUP BY report_id) AS clicksCount ON eo.id = clicksCount.report_id
|
||||
LEFT JOIN (SELECT report_id, COUNT(id) AS download FROM report_log_book WHERE type = 2 GROUP BY report_id) AS downloadCount ON eo.id = downloadCount.report_id
|
||||
LEFT JOIN ts_report_user_rating AS trur ON eo.id = trur.report_id
|
||||
LEFT JOIN bus_process_name as bpn on bpn.data_id = eo.id and bpn.prc_type != '5'
|
||||
WHERE
|
||||
eo.DEL_FLAG = 0
|
||||
<!--全文模糊搜索-->
|
||||
@@ -180,8 +184,12 @@
|
||||
t.department,
|
||||
t.maincontent,
|
||||
t.confidentialLevel,
|
||||
t.privacyLevel
|
||||
t.privacyLevel,
|
||||
IF(bpn.id is null,1,
|
||||
IF(bpn.end_time is null,0,1)
|
||||
) as isAct
|
||||
FROM `tt_report_manage` AS t
|
||||
LEFT JOIN bus_process_name as bpn on bpn.data_id = t.id and bpn.prc_type = '5'
|
||||
WHERE t.del_flag = 0
|
||||
<!--报表名称搜索-->
|
||||
<if test="Vo.name != null and Vo.name != ''">
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -19,7 +19,9 @@
|
||||
<if test="roleName !='' and roleName !=null">
|
||||
and t3.NAME like "%"#{roleName}"%"
|
||||
</if>
|
||||
ORDER BY t1.UPDATE_TIME DESC)tt
|
||||
GROUP BY t1.USID
|
||||
ORDER BY t1.UPDATE_TIME DESC
|
||||
)tt
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
+3
@@ -56,4 +56,7 @@ public class TaskCommonQuery {
|
||||
|
||||
@ApiModelProperty(value = "高级搜索字符串")
|
||||
private String advanceSearchVOStr;
|
||||
|
||||
@ApiModelProperty(value = "发起人")
|
||||
private String creatUserName;
|
||||
}
|
||||
|
||||
+1
@@ -122,6 +122,7 @@ public class TaskController {
|
||||
map.put("prcNum",one.getPrcNum());
|
||||
Date createTime = busProcessEntrust.getCreateTime();
|
||||
map.put("createTime",createTime);
|
||||
map.put("approvalOpinion",busProcessEntrust.getApprovalOpinion());
|
||||
if (i+1 != EOS.size()){
|
||||
BusProcessEntrust busProcessEntrust1 = EOS.get(i + 1);
|
||||
Date endTime = busProcessEntrust1.getCreateTime();
|
||||
|
||||
+6
-1
@@ -186,6 +186,9 @@ public class TodoTaskController {
|
||||
if (taskCommonQuery.getCreatuserId() != null && !taskCommonQuery.getCreatuserId().equals("")) {
|
||||
queryWrapper.eq("CREAT_USER", taskCommonQuery.getCreatuserId());
|
||||
}
|
||||
if (taskCommonQuery.getCreatUserName() != null && !taskCommonQuery.getCreatUserName().equals("")) {
|
||||
queryWrapper.like("CREATE_USER_NAME", taskCommonQuery.getCreatUserName());
|
||||
}
|
||||
queryWrapper.lambda().eq(BusProcessName::getSubmitStatus,SubmitStatusEnum.SUBMIT.getValue());
|
||||
|
||||
BusProcessName busProcessName = iBusProcessNameService.getOne(queryWrapper);
|
||||
@@ -262,7 +265,8 @@ public class TodoTaskController {
|
||||
@ApiImplicitParam(name = "pId", value = "流程实例ID")})
|
||||
@GetMapping("/changeAssigneeNew")
|
||||
public Wrapper<String> changeAssigneeNew(String taskId, String assignee, String userId, String pId,
|
||||
@RequestParam(required = false,value = "replaceMap")String replaceMap) {
|
||||
@RequestParam(required = false,value = "replaceMap")String replaceMap,
|
||||
String approvalOpinion) {
|
||||
|
||||
List<String> list = Arrays.asList(taskId.split(","));
|
||||
for (String str : list) {
|
||||
@@ -291,6 +295,7 @@ public class TodoTaskController {
|
||||
busProcessEntrust.setPrcId(pId);
|
||||
busProcessEntrust.setPrcName(one.getPrcName());
|
||||
busProcessEntrust.setTaskId(str);
|
||||
busProcessEntrust.setApprovalOpinion(approvalOpinion);
|
||||
iBusProcessEntrustService.save(busProcessEntrust);
|
||||
}
|
||||
}
|
||||
|
||||
+5
@@ -59,5 +59,10 @@ public class BusProcessEntrust implements Serializable {
|
||||
@TableField("VALID_FLAG")
|
||||
private String validFlag;
|
||||
|
||||
/**
|
||||
* 审批意见
|
||||
*/
|
||||
@TableField("APPROVAL_OPINION")
|
||||
private String approvalOpinion;
|
||||
|
||||
}
|
||||
|
||||
+3
@@ -55,6 +55,9 @@ public class BusProcessNameServiceImpl extends ServiceImpl<BusProcessNameMapper,
|
||||
}else if (StringUtils.equals(FlowTypeEnum.SCBGLC.getValue(), prcType)){
|
||||
prcName = FlowTypeEnum.SCBGLC.getPrcName();
|
||||
prcNum = FlowTypeEnum.SCBGLC.getPrcNum();
|
||||
}else if (StringUtils.equals(FlowTypeEnum.BJBGLC.getValue(), prcType)){
|
||||
prcName = FlowTypeEnum.BJBGLC.getPrcName();
|
||||
prcNum = FlowTypeEnum.BJBGLC.getPrcNum();
|
||||
}
|
||||
else {
|
||||
throw new ActivitiException("非法的流程类型: " + prcType);
|
||||
|
||||
@@ -57,7 +57,7 @@ public class oneApplyAfter implements TaskListener {
|
||||
// 1: 同意 2:退回
|
||||
delegateTask.setVariable("flag",s);
|
||||
if ("1".equals(s)){
|
||||
ttReportManageActService.saveReport(ttReportManageAct);
|
||||
ttReportManageActService.saveOrUpdataReport(ttReportManageAct);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+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::getPrcId, delegateTask.getProcessInstanceId());
|
||||
queryWrapper.eq(PowerApplyAct::getTaskId, delegateTask.getId());
|
||||
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::getPrcId, delegateTask.getProcessInstanceId());
|
||||
queryWrapper.eq(PowerApplyAct::getTaskId, delegateTask.getId());
|
||||
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::getPrcId, delegateTask.getProcessInstanceId());
|
||||
queryWrapper.eq(PowerApplyAct::getTaskId, delegateTask.getId());
|
||||
queryWrapper.eq(PowerApplyAct::getDelFlag, 0);
|
||||
List<PowerApplyAct> powerApplyActs = powerApplyActDao.selectList(queryWrapper);
|
||||
PowerApplyAct powerApplyAct = new PowerApplyAct();
|
||||
|
||||
+3
-4
@@ -16,7 +16,6 @@ import org.activiti.engine.delegate.DelegateTask;
|
||||
import org.activiti.engine.delegate.TaskListener;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 权限申请流程 发起流程
|
||||
@@ -31,7 +30,7 @@ public class twoApplyAfter implements TaskListener {
|
||||
IBusProcessApproveService approveService = SpringContextUtil.getBean(IBusProcessApproveService.class);
|
||||
//查询task任务
|
||||
LambdaQueryWrapper<PowerApplyAct> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(PowerApplyAct::getPrcId, delegateTask.getProcessInstanceId());
|
||||
queryWrapper.eq(PowerApplyAct::getTaskId, delegateTask.getId());
|
||||
queryWrapper.eq(PowerApplyAct::getDelFlag, 0);
|
||||
List<PowerApplyAct> powerApplyActs = powerApplyActDao.selectList(queryWrapper);
|
||||
PowerApplyAct powerApplyAct = new PowerApplyAct();
|
||||
@@ -61,8 +60,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);
|
||||
// List<String> collect = powerApplyActs.stream().map(e -> e.getId()).collect(Collectors.toList());
|
||||
// powerApplyActDao.batchDel(collect);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,6 +110,10 @@ public class ImpulseSenderUtils {
|
||||
number = bgqxsqNumber.incrementAndGet();
|
||||
checkNumberLegitimate(number,"上传审批流程");
|
||||
break;
|
||||
case BJBGLC:
|
||||
number = bgqxsqNumber.incrementAndGet();
|
||||
checkNumberLegitimate(number,"编辑审批流程");
|
||||
break;
|
||||
default:
|
||||
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.
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.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user