Explorar el Código

主要接口修改

anderx hace 2 años
padre
commit
a4f931df1c

+ 13 - 6
src/main/java/com/goafanti/common/mapper/ExpenseAccountMapper.xml

@@ -824,19 +824,21 @@
     c.id sonId,c.total_amount sonTotalAmount,c.settlement_amount sonSettlementAmount,c.amount sonAmount,c.`type` sonType,c.type_other sonTypeOTher,
     c.id sonId,c.total_amount sonTotalAmount,c.settlement_amount sonSettlementAmount,c.amount sonAmount,c.`type` sonType,c.type_other sonTypeOTher,
     c.user_names ,c.release_start ,c.release_end, c.attachment_url attachmentUrl,c.secondary_type,c.secondary_type_other
     c.user_names ,c.release_start ,c.release_end, c.attachment_url attachmentUrl,c.secondary_type,c.secondary_type_other
     from expense_relationship a
     from expense_relationship a
-    left join expense_account b on a.id =b.id
+    left join expense_account b on a.id =b.id left join expense_relationship er on er.id=b.id
+    left join expense_account ea2 on ea2.id=er.ea_id
     left join department dep on b.apply_dep =dep.id left join department dep2 on b.pay_dep =dep2.id
     left join department dep on b.apply_dep =dep.id left join department dep2 on b.pay_dep =dep2.id
     left join t_order_new o on b.order_no =o.order_no left join expense_account c on a.ea_id =c.id
     left join t_order_new o on b.order_no =o.order_no left join expense_account c on a.ea_id =c.id
     left join admin ad on b.aid=ad.id left join department adDep on ad.department_id=adDep.id
     left join admin ad on b.aid=ad.id left join department adDep on ad.department_id=adDep.id
     <if test="roleType == 1">
     <if test="roleType == 1">
-    inner join (select eaid ,auditor,min(process_status)`type` from expense_account_examine
-    where auditor= #{aid} group by eaid) eae on b.id=eae.eaid
+      inner join (select eaid ,auditor,min(process_status)`type` from expense_account_examine
+      where auditor= #{aid} group by eaid) eae on b.id=eae.eaid
     </if>
     </if>
     <include refid="ExpenseMainSql"/>
     <include refid="ExpenseMainSql"/>
       order by if(b.status=3,-1,b.status)  ,b.create_time desc
       order by if(b.status=3,-1,b.status)  ,b.create_time desc
     ${page_sql}
     ${page_sql}
   </select>
   </select>
   <sql id="ExpenseMainSql">
   <sql id="ExpenseMainSql">
+
     where 1=1 and b.expense_main =1 and b.status &lt; 4
     where 1=1 and b.expense_main =1 and b.status &lt; 4
     <if test="checkNo !=null">
     <if test="checkNo !=null">
       and b.check_no like concat('%',#{checkNo},'%')
       and b.check_no like concat('%',#{checkNo},'%')
@@ -884,12 +886,17 @@
     <if test="startTime !=null and endTime !=null ">
     <if test="startTime !=null and endTime !=null ">
       and b.create_time between #{startTime} and #{endTime}
       and b.create_time between #{startTime} and #{endTime}
     </if>
     </if>
+    <if test="username !=null">
+      and ea2.user_names like concat('%',#{username},'%')
+    </if>
   </sql>
   </sql>
   <select id="ExpenseMainCount" resultType="java.lang.Integer">
   <select id="ExpenseMainCount" resultType="java.lang.Integer">
     select count(*)
     select count(*)
-    from expense_account b
-    left join admin ad on b.aid=ad.id
-    left join department adDep on ad .department_id=adDep.id
+    from  expense_account b  left join expense_relationship er on er.id=b.id
+    left join expense_account ea2 on ea2.id=er.ea_id
+    left join department dep on b.apply_dep =dep.id left join department dep2 on b.pay_dep =dep2.id
+    left join t_order_new o on b.order_no =o.order_no
+    left join admin ad on b.aid=ad.id left join department adDep on ad.department_id=adDep.id
     <if test="roleType == 1">
     <if test="roleType == 1">
       inner join (select eaid ,auditor,min(process_status)`type` from expense_account_examine
       inner join (select eaid ,auditor,min(process_status)`type` from expense_account_examine
       where auditor= #{aid} group by eaid) eae on b.id=eae.eaid
       where auditor= #{aid} group by eaid) eae on b.id=eae.eaid

+ 12 - 3
src/main/java/com/goafanti/expenseAccount/bo/ExpenseMainListInput.java

@@ -7,9 +7,10 @@ public class ExpenseMainListInput {
      *  状态 0=草稿,1=审核中,2=完成,3=驳回 ,4=撤销
      *  状态 0=草稿,1=审核中,2=完成,3=驳回 ,4=撤销
      */
      */
     private Integer status;
     private Integer status;
-    private Integer checkNo;
+    private String checkNo;
     private String startTime;
     private String startTime;
     private String endTime;
     private String endTime;
+    private String username;
 
 
 
 
     /**
     /**
@@ -21,6 +22,14 @@ public class ExpenseMainListInput {
      */
      */
     private Integer processStatus;
     private Integer processStatus;
 
 
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
     public String getStartTime() {
     public String getStartTime() {
         return startTime;
         return startTime;
     }
     }
@@ -37,11 +46,11 @@ public class ExpenseMainListInput {
         this.endTime = endTime;
         this.endTime = endTime;
     }
     }
 
 
-    public Integer getCheckNo() {
+    public String getCheckNo() {
         return checkNo;
         return checkNo;
     }
     }
 
 
-    public void setCheckNo(Integer checkNo) {
+    public void setCheckNo(String checkNo) {
         this.checkNo = checkNo;
         this.checkNo = checkNo;
     }
     }
 
 

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

@@ -819,6 +819,7 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
         if (in.getStatus()!=null) params.put("status",in.getStatus());
         if (in.getStatus()!=null) params.put("status",in.getStatus());
         if (in.getCheckNo()!=null) params.put("checkNo",in.getCheckNo());
         if (in.getCheckNo()!=null) params.put("checkNo",in.getCheckNo());
         if (in.getListStatus()!=null) params.put("listStatus",in.getListStatus());
         if (in.getListStatus()!=null) params.put("listStatus",in.getListStatus());
+        if (in.getUsername() != null)params.put("username",in.getUsername());
         if (in.getStartTime()!=null && in.getEndTime() !=null) {
         if (in.getStartTime()!=null && in.getEndTime() !=null) {
             params.put("startTime",in.getStartTime());
             params.put("startTime",in.getStartTime());
             params.put("endTime",in.getEndTime()+" 23:59:59");
             params.put("endTime",in.getEndTime()+" 23:59:59");