ExcelRiBao.java 6.2 KB

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