|
@@ -352,8 +352,11 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
|
|
|
if (sopInfoListParam.getType() != TFCustomTypeEnum.OFFICE_SOP_FLOW && sopInfoListParam.getType() != TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW) {
|
|
|
throw ExceptionResultEnum.ERROR.exception("流程类型只能为教务处或研究生");
|
|
|
}
|
|
|
- TFCustomFlow maxTfCustomFlow = tfCustomFlowService.findMaxVersion(null, null, sopInfoListParam.getType());
|
|
|
- String tableName = sopInfoListParam.getType().getTableName() + "_" + maxTfCustomFlow.getVersion();
|
|
|
+ if (Objects.isNull(sopInfoListParam.getVersion())) {
|
|
|
+ TFCustomFlow maxTfCustomFlow = tfCustomFlowService.findMaxVersion(null, null, sopInfoListParam.getType());
|
|
|
+ sopInfoListParam.setVersion(maxTfCustomFlow.getVersion());
|
|
|
+ }
|
|
|
+ String tableName = sopInfoListParam.getType().getTableName() + "_" + sopInfoListParam.getVersion();
|
|
|
String fieldName = null, fieldValue = null, fieldOrder = null;
|
|
|
StringJoiner stringJoinerView = new StringJoiner(",");
|
|
|
StringJoiner stringJoinerCondition = new StringJoiner("");
|
|
@@ -721,6 +724,11 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
|
|
|
|
|
|
tfCustomFlow = tfCustomFlowService.getOne(new QueryWrapper<TFCustomFlow>().lambda().eq(TFCustomFlow::getFlowDeploymentId, flowDeploymentId));
|
|
|
Optional.ofNullable(tfCustomFlow).orElseThrow(() -> ExceptionResultEnum.FLOW_CUSTOM_NO_DATA.exception());
|
|
|
+ TFCustomFlow maxTfCustomFlow = tfCustomFlowService.findMaxVersion(null, null, tfCustomFlow.getType());
|
|
|
+ Optional.ofNullable(maxTfCustomFlow).orElseThrow(() -> ExceptionResultEnum.FLOW_CUSTOM_NO_DATA.exception());
|
|
|
+ if (maxTfCustomFlow.getVersion().intValue() != tfCustomFlow.getVersion().intValue()) {//说明版本发生变化
|
|
|
+ BeanUtils.copyProperties(maxTfCustomFlow, tfCustomFlow);
|
|
|
+ }
|
|
|
|
|
|
if (tfCustomFlow.getType() != TFCustomTypeEnum.OFFICE_SOP_FLOW && tfCustomFlow.getType() != TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW) {
|
|
|
throw ExceptionResultEnum.ERROR.exception("sop流程类型错误");
|