ExcelRiBaoPrivate.java 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. package com.bofeng.entity;
  2. import com.alibaba.excel.annotation.ExcelProperty;
  3. import com.google.common.base.Strings;
  4. import com.yvan.platform.Conv;
  5. import lombok.Getter;
  6. import lombok.Setter;
  7. import java.math.BigDecimal;
  8. @Getter
  9. @Setter
  10. public class ExcelRiBaoPrivate {
  11. private String ridgepole;
  12. private String unit;
  13. private String doorplate;
  14. private BigDecimal temperature;
  15. private int grender;
  16. private String familyStatus;
  17. private int medical;
  18. private int cough;
  19. private int muscle;
  20. private int dyspnea;
  21. private int fatigue;
  22. private int diarrhea;
  23. private int singleRoom;
  24. private int scoreRezult;
  25. private String statusDesp = "";
  26. private String others = "";
  27. @ExcelProperty(value = "楼栋", index = 0)
  28. private String loudong = "";
  29. public String getLoudong() {
  30. if (loudong.length() <= 0) {
  31. loudong = ridgepole;
  32. }
  33. return loudong;
  34. }
  35. @ExcelProperty(value = "单元", index = 1)
  36. private String danyuan = "";
  37. public String getDanyuan() {
  38. if (danyuan.length() <= 0) {
  39. danyuan = unit;
  40. }
  41. return danyuan;
  42. }
  43. @ExcelProperty(value = "房号", index = 2)
  44. private String fanghao = "";
  45. public String getFanghao() {
  46. if (fanghao.length() <= 0) {
  47. fanghao = doorplate;
  48. }
  49. return fanghao;
  50. }
  51. @ExcelProperty(value = "联系人", index = 3)
  52. private String linkman;
  53. @ExcelProperty(value = "联系电话", index = 4)
  54. private String phone;
  55. @ExcelProperty(value = "今日居家人数", index = 5)
  56. private int safetyNum;
  57. @ExcelProperty(value = "确诊人数", index = 6)
  58. private int sureNum;
  59. @ExcelProperty(value = "隔离人数", index = 7)
  60. private int singleNum;
  61. @ExcelProperty(value = "异常观察人数", index = 8)
  62. private int suspectedNum;
  63. @ExcelProperty(value = "身体正常人数", index = 9)
  64. private int normalNum;
  65. @ExcelProperty(value = "居家人员姓名", index = 10)
  66. private String userName;
  67. @ExcelProperty(value = "性别", index = 11)
  68. private String grenderStr;
  69. public String getGrenderStr() {
  70. if (grender == 1) {
  71. grenderStr = "男";
  72. } else if (grender == 2) {
  73. grenderStr = "女";
  74. } else {
  75. grenderStr = "未知";
  76. }
  77. return grenderStr;
  78. }
  79. @ExcelProperty(value = "年龄", index = 12)
  80. private String age;
  81. @ExcelProperty(value = "体温", index = 13)
  82. private String temperatureStr;
  83. public String getTemperatureStr() {
  84. temperatureStr = temperature.floatValue() > 10 ? temperature + "" : "未填报";
  85. return temperatureStr;
  86. }
  87. @ExcelProperty(value = "确诊", index = 14)
  88. private String medicalStr;
  89. public String getMedicalStr() {
  90. if (medical == 0) {
  91. medicalStr = "否";
  92. } else {
  93. medicalStr = "是";
  94. }
  95. return medicalStr;
  96. }
  97. @ExcelProperty(value = "单间隔离", index = 15)
  98. private String singleRoomStr;
  99. public String getSingleRoomStr() {
  100. if (singleRoom == 0) {
  101. singleRoomStr = "否";
  102. } else {
  103. singleRoomStr = "是";
  104. }
  105. return singleRoomStr;
  106. }
  107. @ExcelProperty(value = "身体基本情况", index = 16)
  108. private String baseDesc = "";
  109. public String getBaseDesc() {
  110. if (Conv.NI(familyStatus.split(",")[0]) == 1) {
  111. baseDesc += "心血管疾病(服用ARB),";
  112. }
  113. else if (Conv.NI(familyStatus.split(",")[1]) == 1) {
  114. baseDesc += "心血管疾病(未服用ARB),";
  115. }
  116. if (Conv.NI(familyStatus.split(",")[2]) == 1) {
  117. baseDesc += "呼吸系统病史,";
  118. }
  119. if (Conv.NI(familyStatus.split(",")[3]) == 1) {
  120. baseDesc += "肿瘤病史,";
  121. }
  122. if (Conv.NI(familyStatus.split(",")[4]) == 1) {
  123. baseDesc += "糖尿病史,";
  124. }
  125. if (Conv.NI(familyStatus.split(",")[5]) == 1) {
  126. baseDesc += "服用过激素药物,";
  127. }
  128. if (Conv.NI(familyStatus.split(",")[6]) == 1) {
  129. baseDesc += "妊娠期";
  130. }
  131. return baseDesc;
  132. }
  133. @ExcelProperty(value = "病情描述", index = 17)
  134. private String bingqingDesc = "";
  135. public String getBingqingDesc() {
  136. if (medical == 1) {
  137. bingqingDesc += "已确诊、";
  138. }
  139. if (singleRoom == 1) {
  140. bingqingDesc += "单间隔离、";
  141. }
  142. bingqingDesc = bingqingDesc + "体温:" + temperatureStr + "、";
  143. if (cough == 1) {
  144. bingqingDesc += "偶尔短暂咳嗽、";
  145. } else if (cough == 2) {
  146. bingqingDesc += "咳嗽轻度影响生活、";
  147. } else if (cough == 3) {
  148. bingqingDesc += "咳嗽严重影响生活、";
  149. }
  150. if (muscle == 1) {
  151. bingqingDesc += "肌肉按压有酸痛、";
  152. } else if (muscle == 2) {
  153. bingqingDesc += "偶尔肌肉按压酸痛、";
  154. } else if (muscle == 3) {
  155. bingqingDesc += "肌肉按压持续酸痛、";
  156. }
  157. if (dyspnea == 1) {
  158. bingqingDesc += "呼吸急走或上坡气短、";
  159. } else if (dyspnea == 2) {
  160. bingqingDesc += "呼吸气短而走路变慢、";
  161. } else if (dyspnea == 3) {
  162. bingqingDesc += "呼吸走路数分钟后气短、";
  163. } else if (dyspnea == 4) {
  164. bingqingDesc += "呼吸气短无法离开房间、";
  165. }
  166. if (fatigue == 1) {
  167. bingqingDesc += "可体力劳动但觉得累、";
  168. } else if (fatigue == 2) {
  169. bingqingDesc += "轻体力劳动后长时间不能恢复、";
  170. } else if (fatigue == 3) {
  171. bingqingDesc += "不能正常生活、";
  172. }
  173. if (diarrhea == 1) {
  174. bingqingDesc += "轻度腹泻少于于3次、";
  175. } else if (diarrhea == 2) {
  176. bingqingDesc += "中度腹泻4-6次、";
  177. } else if (diarrhea == 3) {
  178. bingqingDesc += "重度腹泻超过6次、";
  179. }
  180. if (!Strings.isNullOrEmpty(statusDesp)) {
  181. bingqingDesc += statusDesp;
  182. bingqingDesc += "、";
  183. }
  184. if (!Strings.isNullOrEmpty(others)) {
  185. bingqingDesc += others;
  186. }
  187. return bingqingDesc;
  188. }
  189. @ExcelProperty(value = "健康评估", index = 18)
  190. private String scoreRezultStr;
  191. public String getScoreRezultStr() {
  192. if (scoreRezult == 0) {
  193. scoreRezultStr = "未评估";
  194. } else if (scoreRezult == 1) {
  195. scoreRezultStr = "正常";
  196. } else if (scoreRezult == 2) {
  197. scoreRezultStr = "注意观察";
  198. } else if (scoreRezult == 3) {
  199. scoreRezultStr = "联系医生";
  200. } else if (scoreRezult == 4) {
  201. scoreRezultStr = "尽快就诊";
  202. } else {
  203. scoreRezultStr = "";
  204. }
  205. return scoreRezultStr;
  206. }
  207. }