diff --git a/test/org/hy/common/report/junit/read01/DataInfo.java b/test/org/hy/common/report/junit/read01/DataInfo.java new file mode 100644 index 0000000..71a647f --- /dev/null +++ b/test/org/hy/common/report/junit/read01/DataInfo.java @@ -0,0 +1,181 @@ +package org.hy.common.report.junit.read01; + +/** + * @author zy + * @version v1.0 + * @description: + * @createDate 2022/3/9 + */ +public class DataInfo { + private String a; + private String b; + private String c; + private String d; + private String e; + private String f; + private String g; + private String h; + private String i; + private String j; + private String k; + private String l; + private String m; + private String n; + private String o; + private String p; + private String q; + private String r; + private String s; + + public String getA() { + return a; + } + + public void setA(String a) { + this.a = a; + } + + public String getB() { + return b; + } + + public void setB(String b) { + this.b = b; + } + + public String getC() { + return c; + } + + public void setC(String c) { + this.c = c; + } + + public String getD() { + return d; + } + + public void setD(String d) { + this.d = d; + } + + public String getE() { + return e; + } + + public void setE(String e) { + this.e = e; + } + + public String getF() { + return f; + } + + public void setF(String f) { + this.f = f; + } + + public String getG() { + return g; + } + + public void setG(String g) { + this.g = g; + } + + public String getH() { + return h; + } + + public void setH(String h) { + this.h = h; + } + + public String getI() { + return i; + } + + public void setI(String i) { + this.i = i; + } + + public String getJ() { + return j; + } + + public void setJ(String j) { + this.j = j; + } + + public String getK() { + return k; + } + + public void setK(String k) { + this.k = k; + } + + public String getL() { + return l; + } + + public void setL(String l) { + this.l = l; + } + + public String getM() { + return m; + } + + public void setM(String m) { + this.m = m; + } + + public String getN() { + return n; + } + + public void setN(String n) { + this.n = n; + } + + public String getO() { + return o; + } + + public void setO(String o) { + this.o = o; + } + + public String getP() { + return p; + } + + public void setP(String p) { + this.p = p; + } + + public String getQ() { + return q; + } + + public void setQ(String q) { + this.q = q; + } + + public String getR() { + return r; + } + + public void setR(String r) { + this.r = r; + } + + public String getS() { + return s; + } + + public void setS(String s) { + this.s = s; + } +} diff --git a/test/org/hy/common/report/junit/read01/Datas.xls b/test/org/hy/common/report/junit/read01/Datas.xls new file mode 100644 index 0000000..c8aada7 Binary files /dev/null and b/test/org/hy/common/report/junit/read01/Datas.xls differ diff --git a/test/org/hy/common/report/junit/read01/Datas_9J04-1.XLS b/test/org/hy/common/report/junit/read01/Datas_9J04-1.XLS new file mode 100644 index 0000000..a4839f5 Binary files /dev/null and b/test/org/hy/common/report/junit/read01/Datas_9J04-1.XLS differ diff --git a/test/org/hy/common/report/junit/read01/JU_Read01.java b/test/org/hy/common/report/junit/read01/JU_Read01.java new file mode 100644 index 0000000..a021615 --- /dev/null +++ b/test/org/hy/common/report/junit/read01/JU_Read01.java @@ -0,0 +1,55 @@ +package org.hy.common.report.junit.read01; + +import java.util.List; + +import org.hy.common.Help; +import org.hy.common.report.ReportHelp; +import org.hy.common.report.bean.RTemplate; +import org.hy.common.xml.XJava; +import org.hy.common.xml.annotation.XType; +import org.hy.common.xml.annotation.Xjava; +import org.junit.FixMethodOrder; +import org.junit.Test; +import org.junit.runners.MethodSorters; + + + + + +/** + * 测试单元:Excel转为Java对象 + * + * @author ZhengWei(HY) + * @createDate 2022-03-09 + * @version v1.0 + */ +@Xjava(value=XType.XML) +@FixMethodOrder(MethodSorters.NAME_ASCENDING) +public class JU_Read01 +{ + private static boolean $isInit = false; + + + + public JU_Read01() throws Exception + { + if ( !$isInit ) + { + $isInit = true; + XJava.parserAnnotation(this.getClass().getName()); + } + } + + + + @SuppressWarnings("unchecked") + @Test + public void test_Read01() + { + RTemplate v_RTemplate = (RTemplate)XJava.getObject("Report_Read01"); + List v_Datas = (List)ReportHelp.toJava(v_RTemplate ,JU_Read01.class.getResource("Datas_9J04-1.xls").toString()); + + Help.print(v_Datas); + } + +} diff --git a/test/org/hy/common/report/junit/read01/JU_Read01.xls b/test/org/hy/common/report/junit/read01/JU_Read01.xls new file mode 100644 index 0000000..a36579c Binary files /dev/null and b/test/org/hy/common/report/junit/read01/JU_Read01.xls differ diff --git a/test/org/hy/common/report/junit/read01/JU_Read01.xlsx b/test/org/hy/common/report/junit/read01/JU_Read01.xlsx new file mode 100644 index 0000000..1bcbab3 Binary files /dev/null and b/test/org/hy/common/report/junit/read01/JU_Read01.xlsx differ diff --git a/test/org/hy/common/report/junit/read01/JU_Read01.xml b/test/org/hy/common/report/junit/read01/JU_Read01.xml new file mode 100644 index 0000000..4d3e079 --- /dev/null +++ b/test/org/hy/common/report/junit/read01/JU_Read01.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/org/hy/common/report/junit/readHorizontal/Finance.java b/test/org/hy/common/report/junit/readHorizontal/Finance.java index 64cf8cc..05b78a2 100644 --- a/test/org/hy/common/report/junit/readHorizontal/Finance.java +++ b/test/org/hy/common/report/junit/readHorizontal/Finance.java @@ -10,7 +10,7 @@ /** - * 财务信息 + * 财务信息 * * @author ZhengWei(HY) * @createDate 2017-05-08 @@ -39,6 +39,9 @@ public class Finance extends SerializableDef /** yyyy-MM格式的时间 */ private Date time3; + + /* 纳税(千分位) */ + private Double tax; @@ -54,7 +57,7 @@ public Double getIncome() /** * 设置:收益 * - * @param income + * @param income */ public void setIncome(Double income) { @@ -74,7 +77,7 @@ public Double getPay() /** * 设置:支出 * - * @param pay + * @param pay */ public void setPay(Double pay) { @@ -96,7 +99,7 @@ public String getRate() /** * 设置:流动比 * - * @param rate + * @param rate */ public void setRate(String rate) { @@ -118,7 +121,7 @@ public Date getTime() /** * 设置:时间 * - * @param time + * @param time */ public void setTime(Date time) { @@ -140,7 +143,7 @@ public Timestamp getTime2() /** * 设置:数据库时间 * - * @param time2 + * @param time2 */ public void setTime2(Timestamp time2) { @@ -162,11 +165,33 @@ public Date getTime3() /** * 设置:yyyy-MM格式的时间 * - * @param time3 + * @param time3 */ public void setTime3(Date time3) { this.time3 = time3; } + + + + /** + * 获取:纳税(千分位) + */ + public Double getTax() + { + return tax; + } + + + + /** + * 设置:纳税(千分位) + * + * @param tax + */ + public void setTax(Double tax) + { + this.tax = tax; + } } diff --git a/test/org/hy/common/report/junit/readVertical/JU_ReadVertical.xlsx b/test/org/hy/common/report/junit/readVertical/JU_ReadVertical.xlsx index 72b8db9..449b4b3 100644 Binary files a/test/org/hy/common/report/junit/readVertical/JU_ReadVertical.xlsx and b/test/org/hy/common/report/junit/readVertical/JU_ReadVertical.xlsx differ diff --git a/test/org/hy/common/report/junit/readVertical/JU_ReadVertical.xml b/test/org/hy/common/report/junit/readVertical/JU_ReadVertical.xml index 5003059..b62f8b8 100644 --- a/test/org/hy/common/report/junit/readVertical/JU_ReadVertical.xml +++ b/test/org/hy/common/report/junit/readVertical/JU_ReadVertical.xml @@ -2,21 +2,21 @@ - - - - - - - - - - - - + + + + + + + + + + + + \ No newline at end of file diff --git a/test/org/hy/common/report/junit/readVertical/JU_ReadVertical_Datas.xlsx b/test/org/hy/common/report/junit/readVertical/JU_ReadVertical_Datas.xlsx index 66798ea..a9f856f 100644 Binary files a/test/org/hy/common/report/junit/readVertical/JU_ReadVertical_Datas.xlsx and b/test/org/hy/common/report/junit/readVertical/JU_ReadVertical_Datas.xlsx differ