ExcelRiBaoZJBM4.java 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388
  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. import java.util.Date;
  9. @Getter
  10. @Setter
  11. public class ExcelRiBaoZJBM4 {
  12. private String ridgepole = "";
  13. private String unit = "";
  14. private String doorplate = "";
  15. private BigDecimal temperature = new BigDecimal(0);
  16. private int grender = 0;
  17. private String familyStatus = "0,0,0,0,0,0,0";
  18. private int medical = 0;
  19. private int cough = 0;
  20. private int muscle = 0;
  21. private int dyspnea = 0;
  22. private int fatigue = 0;
  23. private int diarrhea = 0;
  24. private int singleRoom = 0;
  25. private int scoreRezult = 0;
  26. private int temperatureScore = 0;
  27. private int safetyNum = 0;
  28. private int reportStatus = 0;
  29. private int sureNum = 0;
  30. private int singleNum = 0;
  31. private int suspectedNum = 0;
  32. private int normalNum = 0;
  33. private String statusDesp = "";
  34. private String others = "";
  35. private Long tripId = 0L;
  36. private int workLocal = 0;
  37. private String workLocalOther = "";
  38. private int todayLocal = 0;
  39. private String todayLocalOther = "";
  40. private String autoLocal="";
  41. private String autoAddr="";
  42. private int isTrip = 0;
  43. private int isContact = 0;
  44. private int isSuspected = 0;
  45. private int returnWork = 0;
  46. private Date reportDate;
  47. private int msStatus;
  48. private Long userId;
  49. @ExcelProperty(value = "部门名称", index = 1)
  50. private String loudong = "";
  51. public String getLoudong() {
  52. if (loudong.length() <= 0) {
  53. loudong = ridgepole + unit;
  54. }
  55. return loudong;
  56. }
  57. @ExcelProperty(value = "今日复工", index = 2)
  58. private String returnWorkMsg;
  59. @ExcelProperty(value = "工号", index = 5)
  60. private String fanghao = "";
  61. public String getFanghao() {
  62. if (fanghao.length() <= 0) {
  63. fanghao = doorplate;
  64. }
  65. return fanghao;
  66. }
  67. @ExcelProperty(value = "姓名", index = 0)
  68. private String linkman;
  69. @ExcelProperty(value = "联系电话", index = 4)
  70. private String phone;
  71. private String safetyNumStr = "";
  72. public String getSafetyNumStr() {
  73. if (reportStatus == 0) {
  74. return "未填报";
  75. }
  76. safetyNumStr = "" + safetyNum;
  77. return safetyNumStr;
  78. }
  79. private String sureNumStr;
  80. public String getSureNumStr() {
  81. if (reportStatus == 0) {
  82. return "未填报";
  83. }
  84. sureNumStr = "" + sureNum;
  85. return sureNumStr;
  86. }
  87. private String singleNumStr;
  88. public String getSingleNumStr() {
  89. if (reportStatus == 0) {
  90. return "未填报";
  91. }
  92. singleNumStr = "" + singleNum;
  93. return singleNumStr;
  94. }
  95. private String suspectedNumStr;
  96. public String getSuspectedNumStr() {
  97. if (reportStatus == 0) {
  98. return "未填报";
  99. }
  100. suspectedNumStr = "" + suspectedNum;
  101. return suspectedNumStr;
  102. }
  103. private String normalNumStr;
  104. public String getNormalNumStr() {
  105. if (reportStatus == 0) {
  106. return "未填报";
  107. }
  108. normalNumStr = "" + normalNum;
  109. return normalNumStr;
  110. }
  111. private String userName;
  112. //
  113. // @ExcelProperty(value = "性别", index = 10)
  114. // private String grenderStr;
  115. // public String getGrenderStr() {
  116. // if (grender == 1) {
  117. // grenderStr = "男";
  118. // } else if (grender == 2) {
  119. // grenderStr = "女";
  120. // } else {
  121. // grenderStr = "未知";
  122. // }
  123. // return grenderStr;
  124. // }
  125. // @ExcelProperty(value = "年龄", index = 11)
  126. // private String age;
  127. private String temperatureStr;
  128. public String getTemperatureStr() {
  129. if (reportStatus == 0) {
  130. return "未填报";
  131. }
  132. temperatureStr = temperature.floatValue() > 10 ? temperature + "" : "未填报";
  133. return temperatureStr;
  134. }
  135. private String medicalStr;
  136. public String getMedicalStr() {
  137. if (reportStatus == 0) {
  138. return "未填报";
  139. }
  140. if (medical == 0) {
  141. medicalStr = "无";
  142. } else if (medical == 1) {
  143. medicalStr = "确诊";
  144. } else if (medical == 2) {
  145. medicalStr = "疑似";
  146. } else if (medical == 3) {
  147. medicalStr = "有接触史";
  148. } else if (medical == 4) {
  149. medicalStr = "解除隔离";
  150. }
  151. return medicalStr;
  152. }
  153. private String singleRoomStr;
  154. public String getSingleRoomStr() {
  155. if (reportStatus == 0) {
  156. return "未填报";
  157. }
  158. if (singleRoom == 0) {
  159. singleRoomStr = "否";
  160. } else {
  161. singleRoomStr = "是";
  162. }
  163. return singleRoomStr;
  164. }
  165. private String baseDesc = "";
  166. public String getBaseDesc() {
  167. if (reportStatus == 0) {
  168. return "未填报";
  169. }
  170. if (Conv.NI(familyStatus.split(",")[0]) == 1) {
  171. baseDesc += "心血管疾病(服用ARB),";
  172. } else if (Conv.NI(familyStatus.split(",")[1]) == 1) {
  173. baseDesc += "心血管疾病(未服用ARB),";
  174. }
  175. if (Conv.NI(familyStatus.split(",")[2]) == 1) {
  176. baseDesc += "呼吸系统病史,";
  177. }
  178. if (Conv.NI(familyStatus.split(",")[3]) == 1) {
  179. baseDesc += "肿瘤病史,";
  180. }
  181. if (Conv.NI(familyStatus.split(",")[4]) == 1) {
  182. baseDesc += "糖尿病史,";
  183. }
  184. if (Conv.NI(familyStatus.split(",")[5]) == 1) {
  185. baseDesc += "服用过激素药物,";
  186. }
  187. if (Conv.NI(familyStatus.split(",")[6]) == 1) {
  188. baseDesc += "妊娠期";
  189. }
  190. return baseDesc;
  191. }
  192. @ExcelProperty(value = "病情描述", index = 6)
  193. private String bingqingDesc = "";
  194. public String getBingqingDesc() {
  195. if (reportStatus == 0) {
  196. return "未填报";
  197. }
  198. if (medical == 1) {
  199. bingqingDesc += "已确诊、";
  200. } else if (medical == 2) {
  201. bingqingDesc += "疑似、";
  202. } else if (medical == 3) {
  203. bingqingDesc += "有接触史、";
  204. } else if (medical == 5) {
  205. bingqingDesc += "解除隔离、";
  206. }
  207. // if (isContact == 1) {
  208. // bingqingDesc += "家庭成员中有新冠肺炎疫情或有过病例接触史人员、";
  209. // }
  210. if (singleRoom == 1) {
  211. bingqingDesc += "单间隔离、";
  212. }
  213. bingqingDesc = bingqingDesc + "体温:" + getTemperatureStr() + "、";
  214. if (cough == 1) {
  215. bingqingDesc += "偶尔短暂咳嗽、";
  216. } else if (cough == 2) {
  217. bingqingDesc += "咳嗽轻度影响生活、";
  218. } else if (cough == 3) {
  219. bingqingDesc += "咳嗽严重影响生活、";
  220. }
  221. if (muscle == 1) {
  222. bingqingDesc += "肌肉按压有酸痛、";
  223. } else if (muscle == 2) {
  224. bingqingDesc += "偶尔肌肉按压酸痛、";
  225. } else if (muscle == 3) {
  226. bingqingDesc += "肌肉按压持续酸痛、";
  227. }
  228. if (dyspnea == 1) {
  229. bingqingDesc += "呼吸急走或上坡气短、";
  230. } else if (dyspnea == 2) {
  231. bingqingDesc += "呼吸气短而走路变慢、";
  232. } else if (dyspnea == 3) {
  233. bingqingDesc += "呼吸走路数分钟后气短、";
  234. } else if (dyspnea == 4) {
  235. bingqingDesc += "呼吸气短无法离开房间、";
  236. }
  237. if (fatigue == 1) {
  238. bingqingDesc += "可体力劳动但觉得累、";
  239. } else if (fatigue == 2) {
  240. bingqingDesc += "轻体力劳动后长时间不能恢复、";
  241. } else if (fatigue == 3) {
  242. bingqingDesc += "不能正常生活、";
  243. }
  244. if (diarrhea == 1) {
  245. bingqingDesc += "轻度腹泻少于于3次、";
  246. } else if (diarrhea == 2) {
  247. bingqingDesc += "中度腹泻4-6次、";
  248. } else if (diarrhea == 3) {
  249. bingqingDesc += "重度腹泻超过6次、";
  250. }
  251. if (!Strings.isNullOrEmpty(statusDesp)) {
  252. bingqingDesc += statusDesp;
  253. bingqingDesc += "、";
  254. }
  255. if (!Strings.isNullOrEmpty(others)) {
  256. bingqingDesc += others;
  257. }
  258. bingqingDesc += "评估结果:";
  259. if (scoreRezult == 0)
  260. bingqingDesc += "未评估";
  261. else if (scoreRezult == 1) {
  262. if (temperatureScore > 1)
  263. bingqingDesc += "正常,间隔时间服用退烧药,多休息,多喝水";
  264. else
  265. bingqingDesc += "正常";
  266. } else if (scoreRezult == 2) {
  267. if (temperatureScore > 1)
  268. bingqingDesc += "注意观察,间隔时间服用退烧药,多休息,多喝水";
  269. else
  270. bingqingDesc += "注意观察";
  271. } else if (scoreRezult == 3)
  272. bingqingDesc += "联系社区医生(或者在线问诊)";
  273. else if (scoreRezult == 4)
  274. bingqingDesc += "尽快就诊";
  275. return bingqingDesc;
  276. }
  277. @ExcelProperty(value = "工作驻地", index = 9)
  278. private String workLoalDesc = "";
  279. public String getWorkLoalDesc() {
  280. if (reportStatus == 0) {
  281. return "";
  282. }
  283. if (workLocal == 1) {
  284. workLoalDesc = "武汉市";
  285. } else if (workLocal == 2) {
  286. workLoalDesc = "宜昌市";
  287. } else if (workLocal == 3) {
  288. workLoalDesc = "当阳市";
  289. } else if (workLocal == 4) {
  290. workLoalDesc = "其它地点_" + workLocalOther;
  291. }
  292. return workLoalDesc;
  293. }
  294. @ExcelProperty(value = "今晚住地", index = 10)
  295. private String todayLoalDesc = "";
  296. public String getTodayLoalDesc() {
  297. if (reportStatus == 0) {
  298. return "";
  299. }
  300. if (todayLocal == 1) {
  301. todayLoalDesc = "武汉市";
  302. } else if (todayLocal == 2) {
  303. todayLoalDesc = "宜昌市";
  304. } else if (todayLocal == 3) {
  305. todayLoalDesc = "当阳市";
  306. } else if (todayLocal == 4) {
  307. todayLoalDesc = "其它地点_" + todayLocalOther;
  308. }
  309. return todayLoalDesc;
  310. }
  311. @ExcelProperty(value = "是否出行", index = 11)
  312. private String isTripDesc = "";
  313. public String getIsTripDesc() {
  314. if (reportStatus == 0) {
  315. return "";
  316. }
  317. if (isTrip == 1) {
  318. isTripDesc = "是";
  319. } else if (isTrip == 0) {
  320. isTripDesc = "否";
  321. }
  322. return isTripDesc;
  323. }
  324. @ExcelProperty(value = "出行详细", index = 12)
  325. private String tripDetDesc = "";
  326. @ExcelProperty(value = "密切接触人员", index = 7)
  327. private String isContactDesc = "";
  328. @ExcelProperty(value = "家人健康异常", index = 8)
  329. private String isSuspectedDesc = "";
  330. @ExcelProperty(value = "个人上报状态", index = 3)
  331. private String reportStatusDesc = "";
  332. }