ソースを参照

后台列表修改

anderx 2 年 前
コミット
6385591605

+ 38 - 11
src/main/java/com/goafanti/common/mapper/ExpenseAccountMapper.xml

@@ -295,12 +295,10 @@
 
   <select id="selectExpenseAccountList" resultType="com.goafanti.expenseAccount.bo.OutExpenseAccountBo">
     select a.id,a.total_amount totalAmount,a.`type`,a.process_status processStatus,a.status,a.examine_name examineName,
-           date_format(a.create_time,'%Y-%m-%d %H:%i:%S')createTimeStr,a.aname,
-    b.name appDepName, c.name payDepName,
+           date_format(a.create_time,'%Y-%m-%d %H:%i:%S')createTimeStr,a.aname, b.name appDepName, c.name payDepName
     from expense_account a left join department b on a.apply_dep =b.id left join department c on a.pay_dep =c.id
-    <if test="processStatus ==1">
-      left join admin b on a.aid =b.id
-    </if>
+    left join admin d on a.aid =d.id left join t_order_new e on a.order_no =e.order_no
+    left join t_order_mid tm on a.order_no =tm.order_no
     where 1=1
     <if test="processStatus ==0">
     and a.aid= #{aid}
@@ -308,7 +306,7 @@
     <if test="processStatus ==1">
       and a.process_status>0
       and a.status =1
-      and b.superior_id =#{aid}
+      and d.superior_id =#{aid}
     </if>
     <if test="status != null">
       and a.status= #{status}
@@ -316,6 +314,21 @@
     <if test="startTime !=null and endTime !=null">
       and a.create_time between #{startTime} and #{endTime}
     </if>
+    <if test="depId != null">
+      and d.department_id = #{depId}
+    </if>
+    <if test="orderNo != null">
+      and a.order_no = #{orderNo}
+    </if>
+    <if test="username != null">
+      and tm.buyer_name = #{username}
+    </if>
+    <if test="applyDep != null">
+      and a.apply_dep  = #{applyDep}
+    </if>
+    <if test="payDep != null">
+      and a.pay_dep = #{payDep}
+    </if>
     order by a.create_time desc
     <if test="page_sql !=null">
       ${page_sql}
@@ -324,10 +337,9 @@
   </select>
   <select id="selectExpenseAccountCount" resultType="java.lang.Integer">
     select count(*)
-    from expense_account a
-    <if test="processStatus ==1">
-      left join admin b on a.aid =b.id
-    </if>
+    from expense_account a left join department b on a.apply_dep =b.id left join department c on a.pay_dep =c.id
+    left join admin d on a.aid =d.id left join t_order_new e on a.order_no =e.order_no
+    left join t_order_mid tm on a.order_no =tm.order_no
     where 1=1
     <if test="processStatus ==0">
       and a.aid= #{aid}
@@ -335,7 +347,7 @@
     <if test="processStatus ==1">
       and a.process_status>0
       and a.status =1
-      and b.superior_id =#{aid}
+      and d.superior_id =#{aid}
     </if>
     <if test="status != null">
       and a.status= #{status}
@@ -343,6 +355,21 @@
     <if test="startTime !=null and endTime !=null">
       and a.create_time between #{startTime} and #{endTime}
     </if>
+    <if test="depId != null">
+      and d.department_id = #{depId}
+    </if>
+    <if test="orderNo != null">
+      and a.order_no = #{orderNo}
+    </if>
+    <if test="username != null">
+      and tm.buyer_name = #{username}
+    </if>
+    <if test="applyDep != null">
+      and a.apply_dep  = #{applyDep}
+    </if>
+    <if test="payDep != null">
+      and a.pay_dep = #{payDep}
+    </if>
   </select>
   <select id="selectByaidAndPrid" resultType="com.goafanti.expenseAccount.bo.OutExpenseAccount">
     SELECT

+ 57 - 2
src/main/java/com/goafanti/expenseAccount/bo/InputPageListBo.java

@@ -1,15 +1,70 @@
 package com.goafanti.expenseAccount.bo;
 
-import java.util.Date;
-
 public class InputPageListBo {
     private String startTime;
     private String endTime;
     private Integer status;
     private Integer processStatus;
+
+    //同编号搜索、按客户名称搜索 、按部门/公司搜索 、按报销类型搜索、按报销公司部门/公司、按支付部门/公司搜索、按审核状态(财务审核中-不同人员针对的审核状态不一样、已完成)、报销时间(按报销的时间段进行搜索)
+    private String contractNo;
+    private String username;
+    private String depId;
+    private String type;
+    private String applyDep;
+    private String payDep;
+
     private Integer pageNo;
     private Integer pageSize;
 
+    public String getContractNo() {
+        return contractNo;
+    }
+
+    public void setContractNo(String contractNo) {
+        this.contractNo = contractNo;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public String getDepId() {
+        return depId;
+    }
+
+    public void setDepId(String depId) {
+        this.depId = depId;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getApplyDep() {
+        return applyDep;
+    }
+
+    public void setApplyDep(String applyDep) {
+        this.applyDep = applyDep;
+    }
+
+    public String getPayDep() {
+        return payDep;
+    }
+
+    public void setPayDep(String payDep) {
+        this.payDep = payDep;
+    }
+
     public String getStartTime() {
         return startTime;
     }

+ 6 - 0
src/main/java/com/goafanti/expenseAccount/service/impl/ExpenseAccountServiceImpl.java

@@ -316,6 +316,12 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
         }else {
             param.put("processStatus",0);
         }
+        if (in.getContractNo()!=null)param.put("contractNo",in.getContractNo());
+        if (in.getDepId()!=null)param.put("depId",in.getDepId());
+        if (in.getUsername()!=null)param.put("username",in.getUsername());
+        if (in.getApplyDep()!=null)param.put("applyDep",in.getApplyDep());
+        if (in.getPayDep()!=null)param.put("payDep",in.getPayDep());
+        if (in.getType()!=null)param.put("type",in.getContractNo());
     }
 
     /**