Browse Source

修改新需求

y 2 years ago
parent
commit
8bb8de0940

+ 16 - 0
src/main/java/com/ydtech/modules/inv/model/InvAccountExcel.java

@@ -60,6 +60,22 @@ public class InvAccountExcel implements Serializable {
     @NotBlank
     private Date applyTime;
 
+    /**
+     * 申请时间起
+     */
+    @ApiModelProperty(value = "申请时间起")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @TableField(exist = false)
+    private Date applyTimeStart;
+
+    /**
+     * 申请时间止
+     */
+    @ApiModelProperty(value = "申请时间止")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @TableField(exist = false)
+    private Date applyTimeEnd;
+
     /**
      * 解决excel日期格式转换问题
      */

+ 4 - 0
src/main/java/com/ydtech/modules/inv/utils/EasyExcelUtils.java

@@ -144,6 +144,8 @@ public class EasyExcelUtils {
         head6.add("支出金额");
         List<String> head7 = ListUtils.newArrayList();
         head7.add("转账类型");
+        List<String> head8 = ListUtils.newArrayList();
+        head8.add("备注");
 
         list.add(0, head);
         list.add(1, head1);
@@ -153,6 +155,7 @@ public class EasyExcelUtils {
         list.add(5, head5);
         list.add(6, head6);
         list.add(7, head7);
+        list.add(8, head8);
         invAccountProfitList.forEach(invAccountProfit -> {
             List<String> head0 = ListUtils.newArrayList();
             head0.add(invAccountProfit.getProfitName());
@@ -175,6 +178,7 @@ public class EasyExcelUtils {
             data.add(invAccountOperate.getFundFen());
             data.add(invAccountOperate.getApplyAmount());
             data.add(invAccountOperate.getRevenueOutlay().equals("0") ? "收入" : "支出");
+            data.add(invAccountOperate.getRemark());
             invAccountProfitList.forEach(invAccountProfit -> {
                 if (invAccountOperate.getOutProfit() != null) {
                     for (Map.Entry<String, Object> entry : invAccountOperate.getOutProfit().entrySet()) {

+ 4 - 4
src/main/resources/mapper/modules/inv/InvAccountExcelMapper.xml

@@ -59,11 +59,11 @@
         <if test="insAccountExcel.applicant!= null and insAccountExcel.applicant!= ''">
             and applicant = #{insAccountExcel.applicant}
         </if>
-        <if test="insAccountExcel.applyTime!= null">
-            and apply_time &gt;= #{insAccountExcel.applyTime}
+        <if test="insAccountExcel.applyTimeStart!= null">
+            and apply_time &gt;= #{insAccountExcel.applyTimeStart}
         </if>
-        <if test="insAccountExcel.applyTime!= null">
-            and apply_time &lt;= #{insAccountExcel.applyTime}
+        <if test="insAccountExcel.applyTimeEnd!= null">
+            and apply_time &lt;= #{insAccountExcel.applyTimeEnd}
         </if>
         <if test="insAccountExcel.applySector!= null and insAccountExcel.applySector!= ''">
             and apply_sector = #{insAccountExcel.applySector}