Sfoglia il codice sorgente

报销金额与实报金额的区分

anderx 2 anni fa
parent
commit
533e5838bf

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

@@ -33,13 +33,14 @@
     <result column="real_amount" jdbcType="DECIMAL" property="realAmount" />
     <result column="real_amount" jdbcType="DECIMAL" property="realAmount" />
     <result column="secondary_type" jdbcType="INTEGER" property="secondaryType" />
     <result column="secondary_type" jdbcType="INTEGER" property="secondaryType" />
     <result column="secondary_type_other" jdbcType="VARCHAR" property="secondaryTypeOther" />
     <result column="secondary_type_other" jdbcType="VARCHAR" property="secondaryTypeOther" />
+    <result column="amount" jdbcType="DECIMAL" property="amount" />
   </resultMap>
   </resultMap>
   <sql id="Base_Column_List">
   <sql id="Base_Column_List">
     id, prid, order_no, aid, aname, `type`, type_other, `status`, process_status, total_amount,
     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,
     attachment_url, apply_dep, pay_dep, eaaid, create_time, district_name, user_names,
     release_start, release_end, duration, examine_name, settlement_amount, debit_id,
     release_start, release_end, duration, examine_name, settlement_amount, debit_id,
     target_type, liquidation_status, remarks, check_no, expense_main, real_amount, secondary_type,
     target_type, liquidation_status, remarks, check_no, expense_main, real_amount, secondary_type,
-    secondary_type_other
+    secondary_type_other, amount
   </sql>
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select
     select
@@ -61,8 +62,8 @@
       duration, examine_name, settlement_amount,
       duration, examine_name, settlement_amount,
       debit_id, target_type, liquidation_status,
       debit_id, target_type, liquidation_status,
       remarks, check_no, expense_main,
       remarks, check_no, expense_main,
-      real_amount, secondary_type, secondary_type_other
-      )
+      real_amount, secondary_type, secondary_type_other,
+      amount)
     values (#{prid,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR},
     values (#{prid,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR},
       #{aname,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{typeOther,jdbcType=VARCHAR},
       #{aname,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{typeOther,jdbcType=VARCHAR},
       #{status,jdbcType=INTEGER}, #{processStatus,jdbcType=INTEGER}, #{totalAmount,jdbcType=DECIMAL},
       #{status,jdbcType=INTEGER}, #{processStatus,jdbcType=INTEGER}, #{totalAmount,jdbcType=DECIMAL},
@@ -72,8 +73,8 @@
       #{duration,jdbcType=DOUBLE}, #{examineName,jdbcType=VARCHAR}, #{settlementAmount,jdbcType=DECIMAL},
       #{duration,jdbcType=DOUBLE}, #{examineName,jdbcType=VARCHAR}, #{settlementAmount,jdbcType=DECIMAL},
       #{debitId,jdbcType=INTEGER}, #{targetType,jdbcType=INTEGER}, #{liquidationStatus,jdbcType=INTEGER},
       #{debitId,jdbcType=INTEGER}, #{targetType,jdbcType=INTEGER}, #{liquidationStatus,jdbcType=INTEGER},
       #{remarks,jdbcType=VARCHAR}, #{checkNo,jdbcType=VARCHAR}, #{expenseMain,jdbcType=INTEGER},
       #{remarks,jdbcType=VARCHAR}, #{checkNo,jdbcType=VARCHAR}, #{expenseMain,jdbcType=INTEGER},
-      #{realAmount,jdbcType=DECIMAL}, #{secondaryType,jdbcType=INTEGER}, #{secondaryTypeOther,jdbcType=VARCHAR}
-      )
+      #{realAmount,jdbcType=DECIMAL}, #{secondaryType,jdbcType=INTEGER}, #{secondaryTypeOther,jdbcType=VARCHAR},
+      #{amount,jdbcType=DECIMAL})
   </insert>
   </insert>
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.ExpenseAccount" useGeneratedKeys="true">
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.ExpenseAccount" useGeneratedKeys="true">
     insert into expense_account
     insert into expense_account
@@ -168,6 +169,9 @@
       <if test="secondaryTypeOther != null">
       <if test="secondaryTypeOther != null">
         secondary_type_other,
         secondary_type_other,
       </if>
       </if>
+      <if test="amount != null">
+        amount,
+      </if>
     </trim>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="prid != null">
       <if test="prid != null">
@@ -260,6 +264,9 @@
       <if test="secondaryTypeOther != null">
       <if test="secondaryTypeOther != null">
         #{secondaryTypeOther,jdbcType=VARCHAR},
         #{secondaryTypeOther,jdbcType=VARCHAR},
       </if>
       </if>
+      <if test="amount != null">
+        #{amount,jdbcType=DECIMAL},
+      </if>
     </trim>
     </trim>
   </insert>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.ExpenseAccount">
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.ExpenseAccount">
@@ -355,6 +362,9 @@
       <if test="secondaryTypeOther != null">
       <if test="secondaryTypeOther != null">
         secondary_type_other = #{secondaryTypeOther,jdbcType=VARCHAR},
         secondary_type_other = #{secondaryTypeOther,jdbcType=VARCHAR},
       </if>
       </if>
+      <if test="amount != null">
+        amount = #{amount,jdbcType=DECIMAL},
+      </if>
     </set>
     </set>
     where id = #{id,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
   </update>
@@ -389,7 +399,8 @@
       expense_main = #{expenseMain,jdbcType=INTEGER},
       expense_main = #{expenseMain,jdbcType=INTEGER},
       real_amount = #{realAmount,jdbcType=DECIMAL},
       real_amount = #{realAmount,jdbcType=DECIMAL},
       secondary_type = #{secondaryType,jdbcType=INTEGER},
       secondary_type = #{secondaryType,jdbcType=INTEGER},
-      secondary_type_other = #{secondaryTypeOther,jdbcType=VARCHAR}
+      secondary_type_other = #{secondaryTypeOther,jdbcType=VARCHAR},
+      amount = #{amount,jdbcType=DECIMAL}
     where id = #{id,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
   </update>
 
 

+ 14 - 1
src/main/java/com/goafanti/common/model/ExpenseAccount.java

@@ -152,7 +152,7 @@ public class ExpenseAccount implements Serializable {
     private BigDecimal realAmount;
     private BigDecimal realAmount;
 
 
     /**
     /**
-     * 0=无,1=招待费,2=办公费,3=福利费,4=物业水电费,5=打印费,6=其他
+     * 0=无,8=招待费,9=办公费,10=福利费,11=物业水电费,12=打印费
      */
      */
     private Integer secondaryType;
     private Integer secondaryType;
 
 
@@ -161,6 +161,11 @@ public class ExpenseAccount implements Serializable {
      */
      */
     private String secondaryTypeOther;
     private String secondaryTypeOther;
 
 
+    /**
+     * 报销金额
+     */
+    private BigDecimal amount;
+
     private static final long serialVersionUID = 1L;
     private static final long serialVersionUID = 1L;
 
 
     public Integer getId() {
     public Integer getId() {
@@ -410,4 +415,12 @@ public class ExpenseAccount implements Serializable {
     public void setSecondaryTypeOther(String secondaryTypeOther) {
     public void setSecondaryTypeOther(String secondaryTypeOther) {
         this.secondaryTypeOther = secondaryTypeOther;
         this.secondaryTypeOther = secondaryTypeOther;
     }
     }
+
+    public BigDecimal getAmount() {
+        return amount;
+    }
+
+    public void setAmount(BigDecimal amount) {
+        this.amount = amount;
+    }
 }
 }