StatusUtil.java 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. package com.fdkankan.sale.util;
  2. import com.fdkankan.sale.common.ResultCode;
  3. import com.fdkankan.sale.exception.BusinessException;
  4. import org.bouncycastle.cert.ocsp.Req;
  5. import java.util.ArrayList;
  6. import java.util.Arrays;
  7. import java.util.Collections;
  8. import java.util.List;
  9. public class StatusUtil {
  10. //已完结状态
  11. public static List<Integer> overStatusList = Arrays.asList(110);
  12. /**
  13. * 售后工程师
  14. * statusParam 0 待接单,1待跟进,2已完结
  15. * * status 0待接单,10待检测,20待报价,30待确认,40已取消,50待备料,60维修中,70待测试,
  16. * * 80待支付(已完结),90待回收,100待发货,110已发货
  17. */
  18. public static List<Integer> getSaleStatus(Integer statusParam){
  19. if(statusParam == null){
  20. throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
  21. }
  22. switch (statusParam){
  23. case 0 : return Collections.singletonList(0);
  24. case 1 : return Arrays.asList(10,20,30,40,50,60,70,80,90,91,100);
  25. case 2 : return Arrays.asList(110);
  26. default: throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
  27. }
  28. }
  29. /**
  30. * 维修工程师
  31. * statusParam 0 待检测,1待跟进,2维修完成
  32. * * status 0待接单,10待检测,20待报价,30待确认,40已取消,50待备料,60维修中,70待测试,
  33. * * 80待支付(已完结),90待回收,91取消维修备件回收,100待发货,110已发货
  34. */
  35. public static List<Integer> getRepairerStatus(Integer statusParam){
  36. if(statusParam == null){
  37. throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
  38. }
  39. switch (statusParam){
  40. case 0 : return Collections.singletonList(10);
  41. case 1 : return Arrays.asList(20,50,60,70);
  42. case 2 : return Arrays.asList(80,90,91,100,110);
  43. default: throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
  44. }
  45. }
  46. /**
  47. * 维修备件管理 供应链
  48. * statusParam 0 待备料,1已备料,2待回收
  49. * * status 0待接单,10待检测,20待报价,30待确认,40已取消,50待备料,60维修中,70待测试,
  50. * * 80待支付(已完结),90待回收,100待发货,110已发货
  51. */
  52. public static List<Integer> getSupplyStatus(Integer statusParam){
  53. if(statusParam == null){
  54. throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
  55. }
  56. switch (statusParam){
  57. case 0 : return Collections.singletonList(50);
  58. case 1 : return Arrays.asList(60,70,80,90,91,100,110);
  59. case 2 : return Arrays.asList(90,91);
  60. default: throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
  61. }
  62. }
  63. /**
  64. * 测试工程师
  65. * statusParam 0 待测试,1测试完成
  66. * * status 0待接单,10待检测,20待报价,30待确认,40已取消,41u8待发货,50待备料,60维修中,70待测试,
  67. * * 80待支付(已完结),90待回收,100待发货,110已发货
  68. */
  69. public static List<Integer> getTesterStatus(Integer statusParam) {
  70. if(statusParam == null){
  71. throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
  72. }
  73. switch (statusParam){
  74. case 0 : return Collections.singletonList(70);
  75. case 1 : return Arrays.asList(80,90,91,100,110);
  76. default: throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
  77. }
  78. }
  79. public static List<Integer> getU8Status(Integer statusParam) {
  80. if(statusParam == null){
  81. throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
  82. }
  83. switch (statusParam){
  84. case 0 : return Collections.singletonList(41);
  85. case 1 : return Arrays.asList(50,60,70,80,90,91,100,110);
  86. default: throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
  87. }
  88. }
  89. public static String getCameraName(Integer cameraType){
  90. switch (cameraType){
  91. case 0 : return "四维看看";
  92. case 1 : return "四维看见";
  93. case 2 : return "四维深时";
  94. }
  95. return null;
  96. }
  97. //保修类型 0保修期内,1保修期外,2非保修项目
  98. public static String getWarrantyType(Integer type){
  99. switch (type){
  100. case 0 : return "保内维修";
  101. case 1 : return "保内转保外";
  102. case 2 : return "保外维修";
  103. }
  104. return null;
  105. }
  106. }