|
@@ -1,8 +1,13 @@
|
|
|
package com.diagbot.dto;
|
|
|
|
|
|
+import com.diagbot.enums.AccessTypeEnum;
|
|
|
+import com.diagbot.enums.ChargeTypeEnum;
|
|
|
import lombok.Getter;
|
|
|
import lombok.Setter;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
* @Description: 用户更多服务出参类
|
|
|
* @author: wangyu
|
|
@@ -29,4 +34,48 @@ public class ProductLineDTO {
|
|
|
*/
|
|
|
private String accessType;
|
|
|
|
|
|
+
|
|
|
+ public String[] getAccessType() {
|
|
|
+ String[] strs =accessType.split(",");
|
|
|
+ List<String> list =new ArrayList();
|
|
|
+ for (int i =0;i<strs.length;i++){
|
|
|
+ if(Integer.parseInt(strs[i])==AccessTypeEnum.Online.getKey()){
|
|
|
+ list.add(AccessTypeEnum.Online.getName());
|
|
|
+ }
|
|
|
+ if(Integer.parseInt(strs[i])==AccessTypeEnum.InterfaceType.getKey()){
|
|
|
+ list.add(AccessTypeEnum.InterfaceType.getName());
|
|
|
+ }
|
|
|
+ if(Integer.parseInt(strs[i])==AccessTypeEnum.Embedded.getKey()){
|
|
|
+ list.add(AccessTypeEnum.Embedded.getName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ String[] strs1 =new String[list.size()];
|
|
|
+ return list.toArray(strs1);
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setAccessType(String accessType) {
|
|
|
+ this.accessType = accessType;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String[] getChargeType() {
|
|
|
+ String[] strs =chargeType.split(",");
|
|
|
+ List<String> list =new ArrayList();
|
|
|
+ for (int i =0;i<strs.length;i++){
|
|
|
+ if(Integer.parseInt(strs[i]) == ChargeTypeEnum.ByFlow.getKey()){
|
|
|
+ list.add(ChargeTypeEnum.ByFlow.getName());
|
|
|
+ }
|
|
|
+ if(Integer.parseInt(strs[i]) == ChargeTypeEnum.ByOrginations.getKey()){
|
|
|
+ list.add(ChargeTypeEnum.ByOrginations.getName());
|
|
|
+ }
|
|
|
+ if(Integer.parseInt(strs[i]) == ChargeTypeEnum.ByUser.getKey()){
|
|
|
+ list.add(ChargeTypeEnum.ByUser.getName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ String[] strs1 =new String[list.size()];
|
|
|
+ return list.toArray(strs1);
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setChargeType(String chargeType) {
|
|
|
+ this.chargeType = chargeType;
|
|
|
+ }
|
|
|
}
|