MzReceipt.java 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. package thyyxxk.webserver.entity.markmtfees;
  2. import lombok.Data;
  3. import java.math.BigDecimal;
  4. import java.math.RoundingMode;
  5. import java.util.Date;
  6. /**
  7. * @author dj
  8. */
  9. @Data
  10. public class MzReceipt {
  11. private String drugName;
  12. private String patientId;
  13. private Integer times;
  14. private Integer receiptNo;
  15. private Integer orderNo;
  16. private Integer itemNo;
  17. private String chargeItemCode;
  18. private String chargeBillCode;
  19. private Double quantity;
  20. private BigDecimal unitPrice;
  21. private Integer payMark;
  22. private String serial;
  23. private String serialNo;
  24. private String frequency;
  25. private Double drugQuan;
  26. private String drugUnit;
  27. private String supplyCode;
  28. private Integer orderDays;
  29. private String chargeDate;
  30. /**
  31. * 00 项目,其他 药品
  32. * */
  33. private String groupNo;
  34. private String specification;
  35. private Integer confirmFlag;
  36. private String instructionText;
  37. private Integer drugWin;
  38. private String priceTime;
  39. private String dosage;
  40. private String mediItemType;
  41. private String billItemCode;
  42. private String doctorCode;
  43. private String doctorName;
  44. private String name;
  45. private String responceType;
  46. private String tcNo;
  47. private String tcName;
  48. private BigDecimal price;
  49. private BigDecimal chargeFee;
  50. private Boolean checked;
  51. private String nationalCode;
  52. private String ybComment;
  53. private String hospApprFlag;
  54. public String getDrugName() {
  55. return null == drugName ? "" : (drugName).trim();
  56. }
  57. public String getPatientId() {
  58. return null == patientId ? "" : (patientId).trim();
  59. }
  60. public String getChargeItemCode() {
  61. return null == chargeItemCode ? "" : (chargeItemCode).trim();
  62. }
  63. public String getChargeBillCode() {
  64. return null == chargeBillCode ? "" : (chargeBillCode).trim();
  65. }
  66. public String getSerial() {
  67. return null == serial ? "" : (serial).trim();
  68. }
  69. public String getSerialNo() {
  70. return null == serialNo ? "" : (serialNo).trim();
  71. }
  72. public String getGroupNo() {
  73. return null == groupNo ? "" : (groupNo).trim();
  74. }
  75. public String getSpecification() {
  76. return null == specification ? "" : (specification).trim();
  77. }
  78. public String getDosage() {
  79. return null == dosage ? "" : (dosage).trim();
  80. }
  81. public String getDoctorCode() {
  82. return null == doctorCode ? "" : (doctorCode).trim();
  83. }
  84. public String getName() {
  85. return null == name ? "" : (name).trim();
  86. }
  87. public String getResponceType() {
  88. return null == responceType ? "" : (responceType).trim();
  89. }
  90. public String getTcNo() {
  91. return null == tcNo ? "" : (tcNo).trim();
  92. }
  93. public String getTcName() {
  94. return null == tcName ? "" : (tcName).trim();
  95. }
  96. public String getMediItemType() {
  97. if ("TC".equals(billItemCode.trim())) {
  98. return "TC";
  99. }
  100. switch (billItemCode.trim()) {
  101. // 西药
  102. case "010":
  103. case "1":
  104. return "1";
  105. // 中成药
  106. case "011":
  107. case "2":
  108. return "2";
  109. // 中草药
  110. case "012":
  111. case "3":
  112. return "3";
  113. // 其他
  114. default:
  115. return "0";
  116. }
  117. }
  118. public String getBillItemCode() {
  119. return null == billItemCode ? "" : (billItemCode).trim();
  120. }
  121. public BigDecimal getPrice() {
  122. BigDecimal price= (getUnitPrice() == null ? BigDecimal.ZERO : getUnitPrice()).setScale(2, RoundingMode.HALF_UP);
  123. return price.multiply(BigDecimal.valueOf(getDrugWin() == null ? 1D : getDrugWin()));
  124. }
  125. public BigDecimal getChargeFee() {
  126. return getPrice().multiply(BigDecimal.valueOf(getQuantity() == null ? 1D : getQuantity()));
  127. }
  128. public Boolean getChecked() {
  129. return null != checked && checked;
  130. }
  131. }