ExcelRiBaoPrivate.java 8.7 KB

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