Contract4FinanceRptDto.java 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. package cn.com.lzt.contractreports.dto;
  2. import java.math.BigDecimal;
  3. import java.util.ArrayList;
  4. import java.util.Date;
  5. import java.util.List;
  6. import org.apache.commons.lang3.StringUtils;
  7. import org.jeecgframework.poi.excel.annotation.Excel;
  8. public class Contract4FinanceRptDto implements Comparable<Contract4FinanceRptDto>{
  9. @Excel(name="财务核算编码",width=15)
  10. private String fincode;
  11. @Excel(name="管理处",width=30)
  12. private String projectname;
  13. @Excel(name="合同支出",width=15)
  14. private BigDecimal totalamount;
  15. @Excel(name="今年已付",width=15)
  16. private BigDecimal totalpayment;
  17. @Excel(name="今年未付",width=15)
  18. private BigDecimal nopay;
  19. @Excel(name="每月合同支出",width=15)
  20. private BigDecimal permonthamount;
  21. @Excel(name="本季预提",width=15)
  22. private BigDecimal quarterlyNoPay;
  23. // @Excel(name="合同支出",width=15)
  24. // private BigDecimal bdtotalamount;
  25. //
  26. // @Excel(name="今年已付",width=15)
  27. // private BigDecimal bdtotalpayment;
  28. //
  29. // @Excel(name="今年未付",width=15)
  30. // private BigDecimal bdnopay;
  31. //
  32. // @Excel(name="每月合同支出",width=15)
  33. // private BigDecimal bdpermonthamount;
  34. //
  35. // @Excel(name="本季预提",width=15)
  36. // private BigDecimal bdquarterlyNoPay;
  37. private String partnername;
  38. private String servicename;
  39. private Date start;
  40. private Date end;
  41. private String contractid;
  42. private String paytype;
  43. /**上年度***/
  44. private String contractidlast;
  45. private Date startlast;
  46. private Date endlast;
  47. private Double totalamountlast;
  48. /**下年度***/
  49. private String contractidnext;
  50. private Date startnext;
  51. private Date endnext;
  52. private Double totalamountnext;
  53. private String startyear;
  54. private String endyear;
  55. public String getProjectname() {
  56. return projectname;
  57. }
  58. public void setProjectname(String projectname) {
  59. this.projectname = projectname;
  60. }
  61. public String getPartnername() {
  62. return partnername;
  63. }
  64. public void setPartnername(String partnername) {
  65. this.partnername = partnername;
  66. }
  67. public String getServicename() {
  68. return servicename;
  69. }
  70. public void setServicename(String servicename) {
  71. this.servicename = servicename;
  72. }
  73. public Date getStart() {
  74. return start;
  75. }
  76. public void setStart(Date start) {
  77. this.start = start;
  78. }
  79. public Date getEnd() {
  80. return end;
  81. }
  82. public void setEnd(Date end) {
  83. this.end = end;
  84. }
  85. public BigDecimal getTotalamount() {
  86. return totalamount;
  87. }
  88. public void setTotalamount(BigDecimal totalamount) {
  89. this.totalamount = totalamount;
  90. }
  91. public BigDecimal getTotalpayment() {
  92. if(totalpayment == null) {
  93. return BigDecimal.ZERO;
  94. }
  95. return totalpayment;
  96. }
  97. public void setTotalpayment(BigDecimal totalpayment) {
  98. this.totalpayment = totalpayment;
  99. }
  100. public BigDecimal getPermonthamount() {
  101. return permonthamount;
  102. }
  103. public void setPermonthamount(BigDecimal permonthamount) {
  104. this.permonthamount = permonthamount;
  105. }
  106. public BigDecimal getNopay() {
  107. return nopay;
  108. }
  109. public void setNopay(BigDecimal nopay) {
  110. this.nopay = nopay;
  111. }
  112. public BigDecimal getQuarterlyNoPay() {
  113. return quarterlyNoPay;
  114. }
  115. public void setQuarterlyNoPay(BigDecimal quarterlyNoPay) {
  116. this.quarterlyNoPay = quarterlyNoPay;
  117. }
  118. public String getContractid() {
  119. return contractid;
  120. }
  121. public void setContractid(String contractid) {
  122. this.contractid = contractid;
  123. }
  124. public String getPaytype() {
  125. return paytype;
  126. }
  127. public void setPaytype(String paytype) {
  128. this.paytype = paytype;
  129. }
  130. public String getContractidlast() {
  131. return contractidlast;
  132. }
  133. public void setContractidlast(String contractidlast) {
  134. this.contractidlast = contractidlast;
  135. }
  136. public Date getStartlast() {
  137. return startlast;
  138. }
  139. public void setStartlast(Date startlast) {
  140. this.startlast = startlast;
  141. }
  142. public Date getEndlast() {
  143. return endlast;
  144. }
  145. public void setEndlast(Date endlast) {
  146. this.endlast = endlast;
  147. }
  148. public Double getTotalamountlast() {
  149. return totalamountlast;
  150. }
  151. public void setTotalamountlast(Double totalamountlast) {
  152. this.totalamountlast = totalamountlast;
  153. }
  154. public String getContractidnext() {
  155. return contractidnext;
  156. }
  157. public void setContractidnext(String contractidnext) {
  158. this.contractidnext = contractidnext;
  159. }
  160. public Date getStartnext() {
  161. return startnext;
  162. }
  163. public void setStartnext(Date startnext) {
  164. this.startnext = startnext;
  165. }
  166. public Date getEndnext() {
  167. return endnext;
  168. }
  169. public void setEndnext(Date endnext) {
  170. this.endnext = endnext;
  171. }
  172. public Double getTotalamountnext() {
  173. return totalamountnext;
  174. }
  175. public void setTotalamountnext(Double totalamountnext) {
  176. this.totalamountnext = totalamountnext;
  177. }
  178. public String getStartyear() {
  179. return startyear;
  180. }
  181. public void setStartyear(String startyear) {
  182. this.startyear = startyear;
  183. }
  184. public String getEndyear() {
  185. return endyear;
  186. }
  187. public void setEndyear(String endyear) {
  188. this.endyear = endyear;
  189. }
  190. public List<String> getServiceNameList(){
  191. ArrayList<String> names = new ArrayList<String>();
  192. if(StringUtils.isEmpty(this.servicename))
  193. return names;
  194. for(String name: this.servicename.split(",")) {
  195. names.add(name);
  196. };
  197. return names;
  198. }
  199. /**
  200. * 供应商相同、项目相同、服务名字有交集,则为相同
  201. * */
  202. @Override
  203. public int compareTo(Contract4FinanceRptDto o) {
  204. if(!this.projectname.equals(o.projectname)) {
  205. return -1;
  206. }
  207. if(!this.partnername.equals(o.partnername)) {
  208. return -1;
  209. }
  210. List<String> thisName = getServiceNameList();
  211. List<String> otherName = o.getServiceNameList();
  212. thisName.retainAll(otherName);
  213. if(thisName.size() > 0) {
  214. return 0;
  215. }else {
  216. return -1;
  217. }
  218. }
  219. public String getFincode() {
  220. return fincode;
  221. }
  222. public void setFincode(String fincode) {
  223. this.fincode = fincode;
  224. }
  225. }