wangliang 2 жил өмнө
parent
commit
a39591ae30

+ 2 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TFFlowJoinServiceImpl.java

@@ -58,12 +58,12 @@ public class TFFlowJoinServiceImpl extends ServiceImpl<TFFlowJoinMapper, TFFlowJ
         }
         try {
             QueryWrapper<TFFlowJoin> tfFlowJoinQueryWrapper = new QueryWrapper<>();
-            tfFlowJoinQueryWrapper.lambda().eq(TFFlowJoin::getObjectId, objectId);
+            tfFlowJoinQueryWrapper.lambda().eq(TFFlowJoin::getObjectId, objectId).orderByAsc(TFFlowJoin::getCreateTime);
             List<TFFlowJoin> tfFlowJoinList = this.list(tfFlowJoinQueryWrapper);
             if (Objects.isNull(tfFlowJoinList) || tfFlowJoinList.size() == 0) {
                 TFFlowJoin tfFlowJoin = new TFFlowJoin(flowEntityId, objectId, flowId, 1, flowJoinTypeEnum, sysUser.getId(), flowType.getTable());
                 this.save(tfFlowJoin);
-            } else if (Objects.nonNull(tfFlowJoinList) && tfFlowJoinList.size() == 1) {
+            } else if (Objects.nonNull(tfFlowJoinList) && tfFlowJoinList.size() >= 1) {
                 if (flowJoinTypeEnum == FlowJoinTypeEnum.NEW) {//子流程
                     TFFlowJoin tfFlowJoin = tfFlowJoinList.get(0);
                     Integer level = tfFlowJoin.getLevel();