ExcelRiBao.java 7.7 KB

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