Просмотр исходного кода

报销开发子报销列表新增字段

anderx лет назад: 2
Родитель
Сommit
638a87fe36

+ 20 - 12
src/main/java/com/goafanti/common/mapper/ExpenseAccountMapper.xml

@@ -423,7 +423,7 @@
 
   <select id="selectExpenseAccountList" resultType="com.goafanti.expenseAccount.bo.OutExpenseAccountBo">
     select a.id,a.total_amount totalAmount,a.`type`,a.process_status processStatus,a.type_other typeOther,
-    a.attachment_url attachmentUrl,a.target_type targetType , e.contract_no contractNo,tm.buyer_name buyerName ,
+    a.attachment_url attachmentUrl,a.target_type targetType ,a.user_names userNames,
     a.secondary_type secondaryType, a.secondary_type_other secondaryTypeOther,a.status,
     date_format(a.release_start,'%Y-%m-%d %H:%i:%S')releaseStartStr,
     date_format(a.release_end,'%Y-%m-%d %H:%i:%S')releaseEndStr,
@@ -431,7 +431,7 @@
       eae.type eaeType,
     </if>
     <if test="expenseMain ==0">
-      mea.examine_name examineName,mea.check_no checkNo,
+      mea.examine_name examineName,mea.check_no checkNo,e.contract_no contractNo,
     </if>
     <if test="expenseMain ==1">
        a.examine_name examineName,a.check_no checkNo,
@@ -445,12 +445,12 @@
       left join expense_account c on b.ea_id =c.id
       where c.`type` = #{type})x on a.id=x.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 left join department f on d.department_id =f.id
+    left join admin d on a.aid =d.id left join department f on d.department_id =f.id
     left join admin d2 on f.finance_id =d2.id
     <if test="expenseMain ==0">
-      left join expense_relationship er on a.id=er.id
-      left join expense_account mea on  er.ea_id=mea.id
+      left join expense_relationship er on a.id=er.ea_id
+      left join expense_account mea on  er.id=mea.id
+      left join t_order_new e on mea.order_no =e.order_no
       left join department b on mea.apply_dep =b.id left join department c on mea.pay_dep =c.id
     </if>
     <if test="expenseMain ==1">
@@ -494,7 +494,7 @@
       </if>
     </if>
     <if test="username != null" >
-      and  tm.buyer_name  like concat('%',#{username},'%')
+      and  a.user_names  like concat('%',#{username},'%')
     </if>
     <if test="startTime !=null and endTime !=null">
       and a.create_time between #{startTime} and #{endTime}
@@ -532,9 +532,17 @@
       left join expense_account c on b.ea_id =c.id
       where c.`type` = #{type})x on a.id=x.id
     </if>
-    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
+    left join admin d on a.aid =d.id left join department f on d.department_id =f.id
+    left join admin d2 on f.finance_id =d2.id
+    <if test="expenseMain ==0">
+      left join expense_relationship er on a.id=er.ea_id
+      left join expense_account mea on  er.id=mea.id
+      left join t_order_new e on mea.order_no =e.order_no
+      left join department b on mea.apply_dep =b.id left join department c on mea.pay_dep =c.id
+    </if>
+    <if test="expenseMain ==1">
+      left join department b on a.apply_dep =b.id left join department c on a.pay_dep =c.id
+    </if>
     <if test="processStatus ==1">
       inner join (select eaid ,auditor,min(process_status)`type` from expense_account_examine
       where auditor= #{auditor} group by eaid) eae on a.id=eae.eaid
@@ -574,7 +582,7 @@
       </if>
     </if>
     <if test="username != null" >
-      and  tm.buyer_name  like concat('%',#{username},'%')
+      and  a.user_names  like concat('%',#{username},'%')
     </if>
     <if test="startTime !=null and endTime !=null">
       and a.create_time between #{startTime} and #{endTime}
@@ -650,7 +658,7 @@
       </if>
     </if>
     <if test="username != null" >
-      and  tm.buyer_name  like concat('%',#{username},'%')
+      and  a.user_names  like concat('%',#{username},'%')
     </if>
     <if test="startTime !=null and endTime !=null">
       and a.create_time between #{startTime} and #{endTime}

+ 5 - 5
src/main/java/com/goafanti/expenseAccount/bo/OutExpenseAccountBo.java

@@ -23,7 +23,7 @@ public class OutExpenseAccountBo {
 
     private String contractNo;
     private String checkNo;
-    private String buyerName;
+    private String userNames;
     private String depName;
     private String financeName;
     private String attachmentUrl;
@@ -117,12 +117,12 @@ public class OutExpenseAccountBo {
         this.contractNo = contractNo;
     }
 
-    public String getBuyerName() {
-        return buyerName;
+    public String getUserNames() {
+        return userNames;
     }
 
-    public void setBuyerName(String buyerName) {
-        this.buyerName = buyerName;
+    public void setUserNames(String userNames) {
+        this.userNames = userNames;
     }
 
     public String getDepName() {