Pārlūkot izejas kodu

修改报销查看列表审核状态搜索BUG

anderx 2 gadi atpakaļ
vecāks
revīzija
5cab883bc3

+ 15 - 4
src/main/java/com/goafanti/common/mapper/ExpenseAccountMapper.xml

@@ -28,12 +28,13 @@
     <result column="target_type" jdbcType="INTEGER" property="targetType" />
     <result column="liquidation_status" jdbcType="INTEGER" property="liquidationStatus" />
     <result column="remarks" jdbcType="VARCHAR" property="remarks" />
+    <result column="check_no" jdbcType="VARCHAR" property="checkNo" />
   </resultMap>
   <sql id="Base_Column_List">
     id, prid, order_no, aid, aname, `type`, type_other, `status`, process_status, total_amount,
     attachment_url, apply_dep, pay_dep, eaaid, create_time, district_name, user_names,
     release_start, release_end, duration, examine_name, settlement_amount, debit_id,
-    target_type, liquidation_status, remarks
+    target_type, liquidation_status, remarks, check_no
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select
@@ -54,7 +55,7 @@
       user_names, release_start, release_end,
       duration, examine_name, settlement_amount,
       debit_id, target_type, liquidation_status,
-      remarks)
+      remarks, check_no)
     values (#{prid,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR},
       #{aname,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{typeOther,jdbcType=VARCHAR},
       #{status,jdbcType=INTEGER}, #{processStatus,jdbcType=INTEGER}, #{totalAmount,jdbcType=DECIMAL},
@@ -63,7 +64,7 @@
       #{userNames,jdbcType=VARCHAR}, #{releaseStart,jdbcType=TIMESTAMP}, #{releaseEnd,jdbcType=TIMESTAMP},
       #{duration,jdbcType=DOUBLE}, #{examineName,jdbcType=VARCHAR}, #{settlementAmount,jdbcType=DECIMAL},
       #{debitId,jdbcType=INTEGER}, #{targetType,jdbcType=INTEGER}, #{liquidationStatus,jdbcType=INTEGER},
-      #{remarks,jdbcType=VARCHAR})
+      #{remarks,jdbcType=VARCHAR}, #{checkNo,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.ExpenseAccount" useGeneratedKeys="true">
     insert into expense_account
@@ -143,6 +144,9 @@
       <if test="remarks != null">
         remarks,
       </if>
+      <if test="checkNo != null">
+        check_no,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="prid != null">
@@ -220,6 +224,9 @@
       <if test="remarks != null">
         #{remarks,jdbcType=VARCHAR},
       </if>
+      <if test="checkNo != null">
+        #{checkNo,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.ExpenseAccount">
@@ -300,6 +307,9 @@
       <if test="remarks != null">
         remarks = #{remarks,jdbcType=VARCHAR},
       </if>
+      <if test="checkNo != null">
+        check_no = #{checkNo,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -329,7 +339,8 @@
       debit_id = #{debitId,jdbcType=INTEGER},
       target_type = #{targetType,jdbcType=INTEGER},
       liquidation_status = #{liquidationStatus,jdbcType=INTEGER},
-      remarks = #{remarks,jdbcType=VARCHAR}
+      remarks = #{remarks,jdbcType=VARCHAR},
+      check_no = #{checkNo,jdbcType=VARCHAR}
     where id = #{id,jdbcType=INTEGER}
   </update>
 

+ 15 - 2
src/main/java/com/goafanti/common/model/ExpenseAccount.java

@@ -32,7 +32,7 @@ public class ExpenseAccount implements Serializable {
     private String aname;
 
     /**
-     * 分类 0=其他,1=差旅费,2=非业务报销, 3=第三方付款,4=申请借支
+     * 分类 0=其他,1=差旅费,2=非业务报销, 3=第三方付款,4=申请借支,5=抵扣
      */
     private Integer type;
 
@@ -127,7 +127,7 @@ public class ExpenseAccount implements Serializable {
     private Integer targetType;
 
     /**
-     * 清算状态 0-未抵扣,1=已抵扣,未全款,2=已全款
+     * 清算状态 0-未抵扣,1=已抵扣,未全款,2=已全款,未审核,3已全款,已审核
      */
     private Integer liquidationStatus;
 
@@ -136,6 +136,11 @@ public class ExpenseAccount implements Serializable {
      */
     private String remarks;
 
+    /**
+     * 报销查询编号
+     */
+    private String checkNo;
+
     private static final long serialVersionUID = 1L;
 
     public Integer getId() {
@@ -345,4 +350,12 @@ public class ExpenseAccount implements Serializable {
     public void setRemarks(String remarks) {
         this.remarks = remarks;
     }
+
+    public String getCheckNo() {
+        return checkNo;
+    }
+
+    public void setCheckNo(String checkNo) {
+        this.checkNo = checkNo;
+    }
 }

+ 10 - 5
src/main/java/com/goafanti/core/mybatis/JDBCIdGenerator.java

@@ -1,14 +1,13 @@
 package com.goafanti.core.mybatis;
 
-import java.text.MessageFormat;
-import java.util.Calendar;
-
+import com.goafanti.common.utils.LoggerUtils;
+import com.goafanti.common.utils.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.util.Assert;
 
-import com.goafanti.common.utils.LoggerUtils;
-import com.goafanti.common.utils.StringUtils;
+import java.text.MessageFormat;
+import java.util.Calendar;
 
 /**
  *
@@ -107,4 +106,10 @@ public class JDBCIdGenerator {
 		}
 		return time;
 	}
+
+	public String getNOgenerateId(){
+		StringBuffer str=new StringBuffer("NO");
+		str=str.append(generateId());
+		return str.toString();
+	}
 }

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

@@ -9,8 +9,12 @@ import com.goafanti.common.enums.NoticeStatus;
 import com.goafanti.common.enums.NoticeTypes;
 import com.goafanti.common.error.BusinessException;
 import com.goafanti.common.model.*;
-import com.goafanti.common.utils.*;
+import com.goafanti.common.utils.AsyncUtils;
+import com.goafanti.common.utils.DateUtils;
+import com.goafanti.common.utils.LoggerUtils;
+import com.goafanti.common.utils.WeChatUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.core.mybatis.JDBCIdGenerator;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.expenseAccount.Enums.EAProcessStatus;
@@ -45,6 +49,8 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
     private ExpenseAccountPrivateMapper expenseAccountPrivateMapper;
     @Autowired
     private ExpenseAccountExamineMapper expenseAccountExamineMapper;
+    @Autowired
+    private JDBCIdGenerator idGenerator;
 
 
 
@@ -53,6 +59,7 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
     @Override
     public Integer add(InputExpenseAccount in) {
         //设置付款部门和支付部门
+        in.setCheckNo(idGenerator.getNOgenerateId());
         if (in.getAid()!=null){
             Admin admin = adminMapper.selectByPrimaryKey(in.getAid());
             in.setAname(admin.getName());