|
@@ -63,6 +63,8 @@ public class TBDingServiceImpl extends ServiceImpl<TBDingMapper, TBDing> impleme
|
|
|
private SysDingObjService sysDingObjService;
|
|
|
@Resource
|
|
|
private TBDingApplyService tbDingApplyService;
|
|
|
+ @Resource
|
|
|
+ private TFFlowLogService tfFlowLogService;
|
|
|
|
|
|
@Override
|
|
|
public DingElementResult findDingElements(String sopNo, Long userId) {
|
|
@@ -477,10 +479,23 @@ public class TBDingServiceImpl extends ServiceImpl<TBDingMapper, TBDing> impleme
|
|
|
}
|
|
|
TFFlowApprove tfFlowApprove = tfFlowApproves.get(0);
|
|
|
FlowStatusEnum flowStatusEnum = tfFlowApprove.getStatus();
|
|
|
- Long createTime = tfFlowApprove.getCreateTime();
|
|
|
Long updateTime = tfFlowApprove.getUpdateTime();
|
|
|
Long currentTime = System.currentTimeMillis();
|
|
|
|
|
|
+ Long flowId = tfFlowApprove.getFlowId();
|
|
|
+ TFFlowLog tfFlowLog = tfFlowLogService.getOne(new QueryWrapper<TFFlowLog>().lambda()
|
|
|
+ .eq(TFFlowLog::getFlowId, flowId)
|
|
|
+ .eq(TFFlowLog::getApproveRemark, "通过")
|
|
|
+ .eq(TFFlowLog::getApproveSetup, 1)
|
|
|
+ .eq(TFFlowLog::getApproveOperation, FlowApproveOperationEnum.START)
|
|
|
+ .orderByDesc(TFFlowLog::getId)
|
|
|
+ .last("limit 1"));
|
|
|
+ if (Objects.isNull(tfFlowLog)){
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("未找到流程提交记录");
|
|
|
+ }
|
|
|
+ Long createTime = tfFlowLog.getCreateTime();
|
|
|
+
|
|
|
+
|
|
|
if (FlowStatusEnum.FINISH.equals(flowStatusEnum)) {
|
|
|
dateList = DateDisposeUtils.getDaysBetween(createTime, updateTime, SystemConstant.DEFAULT_DATE_YMD_S_PATTERN);
|
|
|
result.setSopIsEnd(true);
|