FeedbackVo.java 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. package com.fdkankan.manage.vo.response;
  2. import com.alibaba.excel.annotation.ExcelIgnore;
  3. import com.alibaba.excel.annotation.ExcelProperty;
  4. import com.alibaba.fastjson.JSONArray;
  5. import com.fdkankan.manage.entity.FeedbackOption;
  6. import com.fdkankan.manage.util.DateUtils;
  7. import lombok.Data;
  8. import java.math.BigDecimal;
  9. import java.math.RoundingMode;
  10. import java.util.Date;
  11. @Data
  12. public class FeedbackVo {
  13. @ExcelIgnore
  14. private Integer id;
  15. /**
  16. * 硬件产品id
  17. */
  18. @ExcelIgnore
  19. private Integer hardwareOptionId;
  20. /**
  21. * 软件产品id
  22. */
  23. @ExcelIgnore
  24. private Integer softwareOptionId;
  25. /**
  26. * 所在行业id
  27. */
  28. @ExcelIgnore
  29. private Integer industryOptionId;
  30. @ExcelIgnore
  31. private JSONArray problemDescImgs;
  32. @ExcelIgnore
  33. private JSONArray solutionImgs;
  34. /**
  35. * 硬件产品id
  36. */
  37. @ExcelIgnore
  38. private FeedbackOption hardwareOption;
  39. /**
  40. * 软件产品id
  41. */
  42. @ExcelIgnore
  43. private FeedbackOption softwareOption;
  44. /**
  45. * 所在行业id
  46. */
  47. @ExcelIgnore
  48. private FeedbackOption industryOption;
  49. /**
  50. * 问题描述
  51. */
  52. @ExcelProperty("问题描述")
  53. private String problemDesc;
  54. /**
  55. * 硬件产品id
  56. */
  57. @ExcelProperty("硬件产品")
  58. private String hardwareOptionName;
  59. /**
  60. * 软件产品id
  61. */
  62. @ExcelProperty("软件产品")
  63. private String softwareOptionName;
  64. /**
  65. * 所在行业id
  66. */
  67. @ExcelProperty("所在行业")
  68. private String industryOptionName;
  69. /**
  70. * 解决方案
  71. */
  72. @ExcelProperty("期望解决方案")
  73. private String solution;
  74. /**
  75. * 姓名
  76. */
  77. @ExcelProperty("姓名")
  78. private String nickName;
  79. /**
  80. * 联系方式
  81. */
  82. @ExcelProperty("联系方式")
  83. private String phone;
  84. /**
  85. * 地址
  86. */
  87. @ExcelProperty("国家和地区")
  88. private String address;
  89. /**
  90. * 评分
  91. */
  92. @ExcelIgnore
  93. private BigDecimal score;
  94. @ExcelProperty("评分")
  95. private String scoreStr;
  96. /**
  97. * 评分理由
  98. */
  99. @ExcelProperty("评分理由")
  100. private String scoreReason;
  101. @ExcelIgnore
  102. private Date createTime;
  103. @ExcelProperty("反馈时间")
  104. private String createTimeStr;
  105. /**
  106. * 处理状态 0未处理,1已处理
  107. */
  108. @ExcelIgnore
  109. private Integer status;
  110. @ExcelProperty("处理状态")
  111. private String statusStr;
  112. /**
  113. * 处理结果
  114. */
  115. @ExcelProperty("处理结果")
  116. private String result;
  117. public String getStatusStr() {
  118. if(status != null){
  119. switch (status){
  120. case 0 : return "待处理";
  121. case 1 : return "已处理";
  122. }
  123. }
  124. return statusStr;
  125. }
  126. public String getHardwareOptionName() {
  127. if(hardwareOption != null){
  128. return hardwareOption.getNameCn();
  129. }
  130. return hardwareOptionName;
  131. }
  132. public String getSoftwareOptionName() {
  133. if(softwareOption != null){
  134. return softwareOption.getNameCn();
  135. }
  136. return softwareOptionName;
  137. }
  138. public String getIndustryOptionName() {
  139. if(industryOption != null){
  140. return industryOption.getNameCn();
  141. }
  142. return industryOptionName;
  143. }
  144. public String getScoreStr() {
  145. if(score != null){
  146. BigDecimal bigDecimal = score.setScale(1, RoundingMode.HALF_UP);
  147. return bigDecimal.toString();
  148. }
  149. return scoreStr;
  150. }
  151. public String getCreateTimeStr() {
  152. if(createTime != null){
  153. return DateUtils.getDate(createTime);
  154. }
  155. return createTimeStr;
  156. }
  157. }