| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- package cn.com.lzt.contractreports.dto;
- import java.math.BigDecimal;
- import org.jeecgframework.poi.excel.annotation.Excel;
- import net.sourceforge.pinyin4j.PinyinHelper;
- public class ContractSaleExecuteDTO implements Comparable<ContractSaleExecuteDTO>{
-
- public ContractSaleExecuteDTO() {
- this.totalAmount = BigDecimal.ZERO;
- this.invoice = BigDecimal.ZERO;
- this.income = BigDecimal.ZERO;
- this.noInvoice = BigDecimal.ZERO;
- this.noIncome = BigDecimal.ZERO;
- }
- public ContractSaleExecuteDTO(String projectname,BigDecimal ta,BigDecimal inv,BigDecimal noinv,BigDecimal inc,BigDecimal noinc) {
- this.projectname = projectname;
- this.totalAmount = ta;
- this.invoice = inv;
- this.income = inc;
- this.noInvoice = noinv;
- this.noIncome = noinc;
- }
-
- @Excel(name="财务核算编码",width=15)
- private String fincode;
- @Excel(name="项目名称",width=30)
- private String projectname;
-
- private String contractname;
- @Excel(name="合同应收",width=15)
- private BigDecimal totalAmount;
- @Excel(name="已开票",width=15)
- private BigDecimal invoice;
- @Excel(name="未开票",width=15)
- private BigDecimal noInvoice;
- @Excel(name="已收款",width=15)
- private BigDecimal income;
- @Excel(name="未收款",width=15)
- private BigDecimal noIncome;
-
- public String getProjectname() {
- return projectname;
- }
- public void setProjectname(String projectname) {
- this.projectname = projectname;
- }
- public String getContractname() {
- return contractname;
- }
- public void setContractname(String contractname) {
- this.contractname = contractname;
- }
- public BigDecimal getTotalAmount() {
- return totalAmount;
- }
-
- public void setTotalAmount(BigDecimal totalAmount) {
- this.totalAmount = totalAmount;
- }
-
- public BigDecimal getInvoice() {
- return invoice;
- }
-
- public void setInvoice(BigDecimal invoice) {
- this.invoice = invoice;
- }
-
- public BigDecimal getNoInvoice() {
- return noInvoice;
- }
-
- public void setNoInvoice(BigDecimal noInvoice) {
- this.noInvoice = noInvoice;
- }
-
- public BigDecimal getIncome() {
- return income;
- }
-
- public void setIncome(BigDecimal income) {
- this.income = income;
- }
-
- public BigDecimal getNoIncome() {
- return noIncome;
- }
-
- public void setNoIncome(BigDecimal noIncome) {
- this.noIncome = noIncome;
- }
- @Override
- public int compareTo(ContractSaleExecuteDTO s2) {
- String o1 = this.getProjectname();
- String o2 = s2.getProjectname();
- for (int i = 0; i < o1.length() && i < o2.length(); i++) {
- int codePoint1 = o1.charAt(i);
- int codePoint2 = o2.charAt(i);
- if (Character.isSupplementaryCodePoint(codePoint1) || Character.isSupplementaryCodePoint(codePoint2)) {
- i++;
- }
- if (codePoint1 != codePoint2) {
- if (Character.isSupplementaryCodePoint(codePoint1) || Character.isSupplementaryCodePoint(codePoint2)) {
- return codePoint1 - codePoint2;
- }
- String pinyin1 = PinyinHelper.toHanyuPinyinStringArray((char) codePoint1) == null ? null
- : PinyinHelper.toHanyuPinyinStringArray((char) codePoint1)[0];
- String pinyin2 = PinyinHelper.toHanyuPinyinStringArray((char) codePoint2) == null ? null
- : PinyinHelper.toHanyuPinyinStringArray((char) codePoint2)[0];
- if (pinyin1 != null && pinyin2 != null) { // 两个字符都是汉字
- if (!pinyin1.equals(pinyin2)) {
- return pinyin1.compareTo(pinyin2);
- }
- } else {
- return codePoint1 - codePoint2;
- }
- }
- }
- return o1.length() - o2.length();
- }
- public String getFincode() {
- return fincode;
- }
- public void setFincode(String fincode) {
- this.fincode = fincode;
- }
- }
|