|
@@ -13,6 +13,7 @@ import com.dragoninfo.dcuc.app.service.IServiceResourceService;
|
|
|
import com.dragoninfo.dcuc.app.vo.ServiceResourceVo;
|
|
|
import com.dragoninfo.dcuc.auth.auth.enumresources.YesNotEnum;
|
|
|
import com.dragoninfo.dcuc.duceap.enums.ServiceProvideWayEnum;
|
|
|
+import com.dragoninfo.dcuc.duceap.enums.ServiceResourceTypeEnum;
|
|
|
import com.dragoninfo.dcuc.duceap.facade.IDuceapUploadFacade;
|
|
|
import com.dragoninfo.dcuc.duceap.upload.dto.DocContentDTO;
|
|
|
import com.dragonsoft.duceap.base.entity.http.ResponseStatus;
|
|
@@ -339,10 +340,17 @@ public class ServiceResourceServiceImpl extends BaseMybatisService<ServiceResour
|
|
|
resource.setServiceName(value);
|
|
|
break;
|
|
|
case 2:
|
|
|
- if (value.length() > 20) {
|
|
|
- throw new NumberFormatException("第" + (row + 1) + "行'服务类型'长度大于20!");
|
|
|
+ String resourceType = "";
|
|
|
+ for (ServiceResourceTypeEnum typeEnum : ServiceResourceTypeEnum.values()) {
|
|
|
+ if(typeEnum.getLabel().equals(value)){
|
|
|
+ resourceType = typeEnum.getValue();
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
- resource.setServiceType(value);
|
|
|
+ if(StringUtils.isBlank(resourceType)) {
|
|
|
+ throw new NumberFormatException("第" + (row + 1) + "行'服务类型'填写不正确!");
|
|
|
+ }
|
|
|
+ resource.setServiceType(resourceType);
|
|
|
break;
|
|
|
case 3:
|
|
|
//判断服务提供方式的枚举
|
|
@@ -350,7 +358,7 @@ public class ServiceResourceServiceImpl extends BaseMybatisService<ServiceResour
|
|
|
for (ServiceProvideWayEnum wayEnum: ServiceProvideWayEnum.values()){
|
|
|
if (value.equals(wayEnum.getLabel())){
|
|
|
wayCode = wayEnum.getValue();
|
|
|
- continue;
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
if (StringUtils.isBlank(wayCode) ){
|