Procházet zdrojové kódy

报销开发费用明细列表,费用列表新增
主报销查询修改

anderx před 2 roky
rodič
revize
40e8aa988c

+ 24 - 137
src/main/java/com/goafanti/common/mapper/ExpenseAccountMapper.xml

@@ -457,37 +457,42 @@
       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
+      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
     </if>
     where 1=1
-      <if test="processStatus ==2">
-        and a.process_status>=0
-        <if test="examineStatus ==1">
-          and a.status=1
-        </if>
-        <if test="examineStatus ==2">
-          and a.status=2
-        </if>
+    <include refid="selectExpenseAccountSql"/>
+    order by a.status,a.create_time desc
+    <if test="page_sql !=null">
+      ${page_sql}
+    </if>
+  </select>
+  <sql id="selectExpenseAccountSql">
+    <if test="processStatus ==2">
+      and a.process_status>=0
+      <if test="examineStatus ==1">
+        and a.status=1
       </if>
+      <if test="examineStatus ==2">
+        and a.status=2
+      </if>
+    </if>
     <if test=" aid !=null">
-    and a.aid= #{aid}
+      and a.aid= #{aid}
     </if>
     <if test="processStatus ==1">
       and a.process_status>0
-    <if test="examineStatus ==0">
-      and a.process_status =eae.`type`
-    </if>
+      <if test="examineStatus ==0">
+        and a.process_status =eae.`type`
+      </if>
       <if test="examineStatus ==1">
         and a.process_status >eae.`type`
       </if>
     </if>
     <if test="processStatus ==5">
-
+      and f.finance_id in (select id from admin where superior_id = #{auditor})
     </if>
-    <if test="processStatus ==6">
 
-    </if>
     <if test="status != null">
       and a.status= #{status}
     </if>
@@ -523,12 +528,7 @@
     <if test="secondaryType != null">
       and a.secondary_type= #{secondaryType}
     </if>
-    order by a.status,a.create_time desc
-    <if test="page_sql !=null">
-      ${page_sql}
-    </if>
-
-  </select>
+  </sql>
   <select id="selectExpenseAccountCount" resultType="java.lang.Integer">
     select count(*)
     from expense_account a
@@ -554,64 +554,7 @@
       where auditor= #{auditor} group by eaid) eae on a.id=eae.eaid
     </if>
     where 1=1
-    <if test="processStatus ==2">
-      and a.process_status>=0
-      <if test="examineStatus ==1">
-        and a.status=1
-      </if>
-      <if test="examineStatus ==2">
-        and a.status=2
-      </if>
-    </if>
-    <if test=" aid !=null">
-      and a.aid= #{aid}
-    </if>
-    <if test="processStatus ==1">
-      and a.process_status>0
-      <if test="examineStatus ==0">
-        and a.process_status =eae.`type`
-      </if>
-      <if test="examineStatus ==1">
-        and a.process_status >eae.`type`
-      </if>
-    </if>
-    <if test="status != null">
-      and a.status= #{status}
-    </if>
-
-    <if test="checkNo != null " >
-      <if test="expenseMain ==0">
-        and mea.check_no like concat('%',#{checkNo},'%')
-      </if>
-      <if test="expenseMain ==1">
-        and a.check_no like concat('%',#{checkNo},'%')
-      </if>
-    </if>
-    <if test="username != null" >
-      and  a.user_names  like concat('%',#{username},'%')
-    </if>
-    <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="contractNo != null">
-      and e.contract_no = #{contractNo}
-    </if>
-
-    <if test="applyDep != null">
-      and a.apply_dep  = #{applyDep}
-    </if>
-    <if test="payDep != null">
-      and a.pay_dep = #{payDep}
-    </if>
-    <if test="expenseMain != null">
-      and a.expense_main= #{expenseMain}
-    </if>
-    <if test="secondaryType != null">
-      and a.secondary_type= #{secondaryType}
-    </if>
+    <include refid="selectExpenseAccountSql"/>
   </select>
 
   <select id="selectExpenseAccountTotalAmount" resultType="java.lang.Integer">
@@ -631,63 +574,7 @@
       where auditor= #{auditor} group by eaid) eae on a.id=eae.eaid
     </if>
     where 1=1
-    <if test="processStatus ==2">
-      and a.process_status>=0
-      <if test="examineStatus ==1">
-        and a.status=1
-      </if>
-      <if test="examineStatus ==2">
-        and a.status=2
-      </if>
-    </if>
-    <if test=" aid !=null">
-      and a.aid= #{aid}
-    </if>
-    <if test="processStatus ==1">
-      and a.process_status>0
-      <if test="examineStatus ==0">
-        and a.process_status =eae.`type`
-      </if>
-      <if test="examineStatus ==1">
-        and a.process_status >eae.`type`
-      </if>
-    </if>
-    <if test="status != null">
-      and a.status= #{status}
-    </if>
-    <if test="checkNo != null " >
-      <if test="expenseMain ==0">
-        and mea.check_no like concat('%',#{checkNo},'%')
-      </if>
-      <if test="expenseMain ==1">
-        and a.check_no like concat('%',#{checkNo},'%')
-      </if>
-    </if>
-    <if test="username != null" >
-      and  a.user_names  like concat('%',#{username},'%')
-    </if>
-    <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="contractNo != null">
-      and e.contract_no = #{contractNo}
-    </if>
-
-    <if test="applyDep != null">
-      and a.apply_dep  = #{applyDep}
-    </if>
-    <if test="payDep != null">
-      and a.pay_dep = #{payDep}
-    </if>
-    <if test="expenseMain != null">
-      and a.expense_main= #{expenseMain}
-    </if>
-    <if test="secondaryType != null">
-      and a.secondary_type= #{secondaryType}
-    </if>
+    <include refid="selectExpenseAccountSql"/>
   </select>
 
 

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

@@ -974,6 +974,7 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
                 if (in.getAid()!=null){
                     param.put("aid",in.getAid());
                 }
+             param.put("auditor",TokenManager.getAdminId());
         }else if(in.getProcessStatus()==1) {
              param.put("auditor",TokenManager.getAdminId());
              if (in.getAid()!=null){

+ 2 - 2
src/main/resources/props/config_local.properties

@@ -52,11 +52,11 @@ yxjl_max=100
 amb.maxLvl=6
 
 avatar.host=//static.jishutao.com
-static.host=//static.jishutao.com/1.2.98
+#static.host=//static.jishutao.com/1.2.98
 rd.static.host=//static.jishutao.com/RD/1.0.03
 #avatar.host=//172.16.0.255:3000
 #static.host=//172.16.0.255:3000/1.2.62
-#static.host=//172.16.1.187/1.2.98
+static.host=//172.16.1.187/1.2.98
 
 #\u5FAE\u4FE1\u6253\u5361\u5C0F\u7A0B\u5E8F
 wx.appId=wxff2f5720ed7d7f63