Răsfoiți Sursa

sop列表修改

wangliang 1 an în urmă
părinte
comite
2980e10918

+ 4 - 0
sop-business/src/main/java/com/qmth/sop/business/service/impl/TDFormWidgetMetadataServiceImpl.java

@@ -7,6 +7,7 @@ import com.qmth.sop.business.entity.TDFormWidgetMetadata;
 import com.qmth.sop.business.mapper.TDFormWidgetMetadataMapper;
 import com.qmth.sop.business.service.TDFormWidgetMetadataService;
 import com.qmth.sop.common.contant.SystemConstant;
+import com.qmth.sop.common.enums.ExceptionResultEnum;
 import com.qmth.sop.common.enums.TFCustomTypeEnum;
 import com.qmth.sop.common.util.ResultUtil;
 import org.slf4j.Logger;
@@ -74,6 +75,9 @@ public class TDFormWidgetMetadataServiceImpl extends ServiceImpl<TDFormWidgetMet
      */
     @Override
     public List<TDFormWidgetMetadata> selectAll(TFCustomTypeEnum type, Integer version) {
+        if (type != TFCustomTypeEnum.OFFICE_SOP_FLOW || type != TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW) {
+            throw ExceptionResultEnum.ERROR.exception("流程类型只能为教务处或研究生");
+        }
         return this.list(new QueryWrapper<TDFormWidgetMetadata>().lambda().eq(TDFormWidgetMetadata::getType, type).eq(TDFormWidgetMetadata::getVersion, version).orderByAsc(TDFormWidgetMetadata::getSetup));
     }