Browse Source

新增报销

anderx 2 years ago
parent
commit
ddd700714c

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

@@ -17,10 +17,16 @@
     <result column="pay_dep" jdbcType="VARCHAR" property="payDep" />
     <result column="eaaid" jdbcType="INTEGER" property="eaaid" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="district_name" jdbcType="VARCHAR" property="districtName" />
+    <result column="user_names" jdbcType="VARCHAR" property="userNames" />
+    <result column="release_start" jdbcType="TIMESTAMP" property="releaseStart" />
+    <result column="release_end" jdbcType="TIMESTAMP" property="releaseEnd" />
+    <result column="duration" jdbcType="DOUBLE" property="duration" />
   </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
+    attachment_url, apply_dep, pay_dep, eaaid, create_time, district_name, user_names, 
+    release_start, release_end, duration
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select 
@@ -37,12 +43,16 @@
       aname, `type`, type_other, 
       `status`, process_status, total_amount, 
       attachment_url, apply_dep, pay_dep, 
-      eaaid, create_time)
+      eaaid, create_time, district_name, 
+      user_names, release_start, release_end, 
+      duration)
     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}, 
       #{attachmentUrl,jdbcType=VARCHAR}, #{applyDep,jdbcType=VARCHAR}, #{payDep,jdbcType=VARCHAR}, 
-      #{eaaid,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP})
+      #{eaaid,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{districtName,jdbcType=VARCHAR}, 
+      #{userNames,jdbcType=VARCHAR}, #{releaseStart,jdbcType=TIMESTAMP}, #{releaseEnd,jdbcType=TIMESTAMP}, 
+      #{duration,jdbcType=DOUBLE})
   </insert>
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.ExpenseAccount" useGeneratedKeys="true">
     insert into expense_account
@@ -89,6 +99,21 @@
       <if test="createTime != null">
         create_time,
       </if>
+      <if test="districtName != null">
+        district_name,
+      </if>
+      <if test="userNames != null">
+        user_names,
+      </if>
+      <if test="releaseStart != null">
+        release_start,
+      </if>
+      <if test="releaseEnd != null">
+        release_end,
+      </if>
+      <if test="duration != null">
+        duration,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="prid != null">
@@ -133,6 +158,21 @@
       <if test="createTime != null">
         #{createTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="districtName != null">
+        #{districtName,jdbcType=VARCHAR},
+      </if>
+      <if test="userNames != null">
+        #{userNames,jdbcType=VARCHAR},
+      </if>
+      <if test="releaseStart != null">
+        #{releaseStart,jdbcType=TIMESTAMP},
+      </if>
+      <if test="releaseEnd != null">
+        #{releaseEnd,jdbcType=TIMESTAMP},
+      </if>
+      <if test="duration != null">
+        #{duration,jdbcType=DOUBLE},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.ExpenseAccount">
@@ -180,6 +220,21 @@
       <if test="createTime != null">
         create_time = #{createTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="districtName != null">
+        district_name = #{districtName,jdbcType=VARCHAR},
+      </if>
+      <if test="userNames != null">
+        user_names = #{userNames,jdbcType=VARCHAR},
+      </if>
+      <if test="releaseStart != null">
+        release_start = #{releaseStart,jdbcType=TIMESTAMP},
+      </if>
+      <if test="releaseEnd != null">
+        release_end = #{releaseEnd,jdbcType=TIMESTAMP},
+      </if>
+      <if test="duration != null">
+        duration = #{duration,jdbcType=DOUBLE},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -198,7 +253,12 @@
       apply_dep = #{applyDep,jdbcType=VARCHAR},
       pay_dep = #{payDep,jdbcType=VARCHAR},
       eaaid = #{eaaid,jdbcType=INTEGER},
-      create_time = #{createTime,jdbcType=TIMESTAMP}
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      district_name = #{districtName,jdbcType=VARCHAR},
+      user_names = #{userNames,jdbcType=VARCHAR},
+      release_start = #{releaseStart,jdbcType=TIMESTAMP},
+      release_end = #{releaseEnd,jdbcType=TIMESTAMP},
+      duration = #{duration,jdbcType=DOUBLE}
     where id = #{id,jdbcType=INTEGER}
   </update>
 </mapper>

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

@@ -81,6 +81,31 @@ public class ExpenseAccount implements Serializable {
      */
     private Date createTime;
 
+    /**
+     * 公出企业地址
+     */
+    private String districtName;
+
+    /**
+     * 公司名称
+     */
+    private String userNames;
+
+    /**
+     * 公出开始时间
+     */
+    private Date releaseStart;
+
+    /**
+     * 公出结束时间
+     */
+    private Date releaseEnd;
+
+    /**
+     * 时长
+     */
+    private Double duration;
+
     private static final long serialVersionUID = 1L;
 
     public Integer getId() {
@@ -202,4 +227,44 @@ public class ExpenseAccount implements Serializable {
     public void setCreateTime(Date createTime) {
         this.createTime = createTime;
     }
+
+    public String getDistrictName() {
+        return districtName;
+    }
+
+    public void setDistrictName(String districtName) {
+        this.districtName = districtName;
+    }
+
+    public String getUserNames() {
+        return userNames;
+    }
+
+    public void setUserNames(String userNames) {
+        this.userNames = userNames;
+    }
+
+    public Date getReleaseStart() {
+        return releaseStart;
+    }
+
+    public void setReleaseStart(Date releaseStart) {
+        this.releaseStart = releaseStart;
+    }
+
+    public Date getReleaseEnd() {
+        return releaseEnd;
+    }
+
+    public void setReleaseEnd(Date releaseEnd) {
+        this.releaseEnd = releaseEnd;
+    }
+
+    public Double getDuration() {
+        return duration;
+    }
+
+    public void setDuration(Double duration) {
+        this.duration = duration;
+    }
 }

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

@@ -8,7 +8,7 @@ import org.springframework.stereotype.Service;
 public class ExpenseAccountServiceImpl implements ExpenseAccountService {
     @Override
     public int add(InputExpenseAccount in) {
-
+        
         return 0;
     }
 }