Browse Source

报销开发

anderx 2 years ago
parent
commit
6bf2a9b052

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

@@ -31,12 +31,15 @@
     <result column="check_no" jdbcType="VARCHAR" property="checkNo" />
     <result column="expense_main" jdbcType="INTEGER" property="expenseMain" />
     <result column="real_amount" jdbcType="DECIMAL" property="realAmount" />
+    <result column="secondary_type" jdbcType="INTEGER" property="secondaryType" />
+    <result column="secondary_type_other" jdbcType="VARCHAR" property="secondaryTypeOther" />
   </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, check_no, expense_main, real_amount
+    target_type, liquidation_status, remarks, check_no, expense_main, real_amount, secondary_type,
+    secondary_type_other
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select
@@ -58,7 +61,8 @@
       duration, examine_name, settlement_amount,
       debit_id, target_type, liquidation_status,
       remarks, check_no, expense_main,
-      real_amount)
+      real_amount, secondary_type, secondary_type_other
+      )
     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},
@@ -68,7 +72,8 @@
       #{duration,jdbcType=DOUBLE}, #{examineName,jdbcType=VARCHAR}, #{settlementAmount,jdbcType=DECIMAL},
       #{debitId,jdbcType=INTEGER}, #{targetType,jdbcType=INTEGER}, #{liquidationStatus,jdbcType=INTEGER},
       #{remarks,jdbcType=VARCHAR}, #{checkNo,jdbcType=VARCHAR}, #{expenseMain,jdbcType=INTEGER},
-      #{realAmount,jdbcType=DECIMAL})
+      #{realAmount,jdbcType=DECIMAL}, #{secondaryType,jdbcType=INTEGER}, #{secondaryTypeOther,jdbcType=VARCHAR}
+      )
   </insert>
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.ExpenseAccount" useGeneratedKeys="true">
     insert into expense_account
@@ -157,6 +162,12 @@
       <if test="realAmount != null">
         real_amount,
       </if>
+      <if test="secondaryType != null">
+        secondary_type,
+      </if>
+      <if test="secondaryTypeOther != null">
+        secondary_type_other,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="prid != null">
@@ -243,6 +254,12 @@
       <if test="realAmount != null">
         #{realAmount,jdbcType=DECIMAL},
       </if>
+      <if test="secondaryType != null">
+        #{secondaryType,jdbcType=INTEGER},
+      </if>
+      <if test="secondaryTypeOther != null">
+        #{secondaryTypeOther,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.ExpenseAccount">
@@ -332,6 +349,12 @@
       <if test="realAmount != null">
         real_amount = #{realAmount,jdbcType=DECIMAL},
       </if>
+      <if test="secondaryType != null">
+        secondary_type = #{secondaryType,jdbcType=INTEGER},
+      </if>
+      <if test="secondaryTypeOther != null">
+        secondary_type_other = #{secondaryTypeOther,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -364,7 +387,9 @@
       remarks = #{remarks,jdbcType=VARCHAR},
       check_no = #{checkNo,jdbcType=VARCHAR},
       expense_main = #{expenseMain,jdbcType=INTEGER},
-      real_amount = #{realAmount,jdbcType=DECIMAL}
+      real_amount = #{realAmount,jdbcType=DECIMAL},
+      secondary_type = #{secondaryType,jdbcType=INTEGER},
+      secondary_type_other = #{secondaryTypeOther,jdbcType=VARCHAR}
     where id = #{id,jdbcType=INTEGER}
   </update>
 

+ 26 - 0
src/main/java/com/goafanti/common/model/ExpenseAccount.java

@@ -151,6 +151,16 @@ public class ExpenseAccount implements Serializable {
      */
     private BigDecimal realAmount;
 
+    /**
+     * 0=无,1=招待费,2=办公费,3=福利费,4=物业水电费,5=打印费,6=其他
+     */
+    private Integer secondaryType;
+
+    /**
+     * 次要分类其他说明
+     */
+    private String secondaryTypeOther;
+
     private static final long serialVersionUID = 1L;
 
     public Integer getId() {
@@ -384,4 +394,20 @@ public class ExpenseAccount implements Serializable {
     public void setRealAmount(BigDecimal realAmount) {
         this.realAmount = realAmount;
     }
+
+    public Integer getSecondaryType() {
+        return secondaryType;
+    }
+
+    public void setSecondaryType(Integer secondaryType) {
+        this.secondaryType = secondaryType;
+    }
+
+    public String getSecondaryTypeOther() {
+        return secondaryTypeOther;
+    }
+
+    public void setSecondaryTypeOther(String secondaryTypeOther) {
+        this.secondaryTypeOther = secondaryTypeOther;
+    }
 }