123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- package com.fdkankan.sale.util;
- import com.fdkankan.sale.common.ResultCode;
- import com.fdkankan.sale.exception.BusinessException;
- import org.bouncycastle.cert.ocsp.Req;
- import java.util.ArrayList;
- import java.util.Arrays;
- import java.util.Collections;
- import java.util.List;
- public class StatusUtil {
- //已完结状态
- public static List<Integer> overStatusList = Arrays.asList(110);
- /**
- * 售后工程师
- * statusParam 0 待接单,1待跟进,2已完结
- * * status 0待接单,10待检测,20待报价,30待确认,40已取消,50待备料,60维修中,70待测试,
- * * 80待支付(已完结),90待回收,100待发货,110已发货
- */
- public static List<Integer> getSaleStatus(Integer statusParam){
- if(statusParam == null){
- throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
- }
- switch (statusParam){
- case 0 : return Collections.singletonList(0);
- case 1 : return Arrays.asList(10,20,30,40,50,60,70,80,90,91,100);
- case 2 : return Arrays.asList(110);
- default: throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
- }
- }
- /**
- * 维修工程师
- * statusParam 0 待检测,1待跟进,2维修完成
- * * status 0待接单,10待检测,20待报价,30待确认,40已取消,50待备料,60维修中,70待测试,
- * * 80待支付(已完结),90待回收,91取消维修备件回收,100待发货,110已发货
- */
- public static List<Integer> getRepairerStatus(Integer statusParam){
- if(statusParam == null){
- throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
- }
- switch (statusParam){
- case 0 : return Collections.singletonList(10);
- case 1 : return Arrays.asList(20,50,60,70);
- case 2 : return Arrays.asList(80,90,91,100,110);
- default: throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
- }
- }
- /**
- * 维修备件管理 供应链
- * statusParam 0 待备料,1已备料,2待回收
- * * status 0待接单,10待检测,20待报价,30待确认,40已取消,50待备料,60维修中,70待测试,
- * * 80待支付(已完结),90待回收,100待发货,110已发货
- */
- public static List<Integer> getSupplyStatus(Integer statusParam){
- if(statusParam == null){
- throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
- }
- switch (statusParam){
- case 0 : return Collections.singletonList(50);
- case 1 : return Arrays.asList(60,70,80,90,91,100,110);
- case 2 : return Arrays.asList(90,91);
- default: throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
- }
- }
- /**
- * 测试工程师
- * statusParam 0 待测试,1测试完成
- * * status 0待接单,10待检测,20待报价,30待确认,40已取消,41u8待发货,50待备料,60维修中,70待测试,
- * * 80待支付(已完结),90待回收,100待发货,110已发货
- */
- public static List<Integer> getTesterStatus(Integer statusParam) {
- if(statusParam == null){
- throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
- }
- switch (statusParam){
- case 0 : return Collections.singletonList(70);
- case 1 : return Arrays.asList(80,90,91,100,110);
- default: throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
- }
- }
- public static List<Integer> getU8Status(Integer statusParam) {
- if(statusParam == null){
- throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
- }
- switch (statusParam){
- case 0 : return Collections.singletonList(41);
- case 1 : return Arrays.asList(50,60,70,80,90,91,100,110);
- default: throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
- }
- }
- public static String getCameraName(Integer cameraType){
- switch (cameraType){
- case 0 : return "四维看看";
- case 1 : return "四维看见";
- case 2 : return "四维深时";
- }
- return null;
- }
- //保修类型 0保修期内,1保修期外,2非保修项目
- public static String getWarrantyType(Integer type){
- switch (type){
- case 0 : return "保内维修";
- case 1 : return "保内转保外";
- case 2 : return "保外维修";
- }
- return null;
- }
- }
|