Browse Source

修改审核逻辑

anderx 2 years ago
parent
commit
afb127dd75

+ 21 - 0
src/main/java/com/goafanti/common/dao/ExpenseAccountExamineMapper.java

@@ -0,0 +1,21 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.ExpenseAccountExamine;
+
+import java.util.List;
+
+public interface ExpenseAccountExamineMapper {
+    int deleteByPrimaryKey(Integer id);
+
+    int insert(ExpenseAccountExamine record);
+
+    int insertSelective(ExpenseAccountExamine record);
+
+    ExpenseAccountExamine selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(ExpenseAccountExamine record);
+
+    int updateByPrimaryKey(ExpenseAccountExamine record);
+
+    void insertBatch(List<ExpenseAccountExamine> list);
+}

+ 122 - 0
src/main/java/com/goafanti/common/mapper/ExpenseAccountExamineMapper.xml

@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.goafanti.common.dao.ExpenseAccountExamineMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.ExpenseAccountExamine">
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="eaid" jdbcType="INTEGER" property="eaid" />
+    <result column="type" jdbcType="INTEGER" property="type" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="auditor" jdbcType="VARCHAR" property="auditor" />
+    <result column="auditorName" jdbcType="VARCHAR" property="auditorname" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    id, eaid, `type`, `status`, auditor, auditorName, create_time
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    select
+    <include refid="Base_Column_List" />
+    from expense_account_examine
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    delete from expense_account_examine
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.ExpenseAccountExamine" useGeneratedKeys="true">
+    insert into expense_account_examine (eaid, `type`, `status`,
+      auditor, auditorName, create_time
+      )
+    values (#{eaid,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
+      #{auditor,jdbcType=VARCHAR}, #{auditorname,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
+      )
+  </insert>
+  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.ExpenseAccountExamine" useGeneratedKeys="true">
+    insert into expense_account_examine
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="eaid != null">
+        eaid,
+      </if>
+      <if test="type != null">
+        `type`,
+      </if>
+      <if test="status != null">
+        `status`,
+      </if>
+      <if test="auditor != null">
+        auditor,
+      </if>
+      <if test="auditorname != null">
+        auditorName,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="eaid != null">
+        #{eaid,jdbcType=INTEGER},
+      </if>
+      <if test="type != null">
+        #{type,jdbcType=INTEGER},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="auditor != null">
+        #{auditor,jdbcType=VARCHAR},
+      </if>
+      <if test="auditorname != null">
+        #{auditorname,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.ExpenseAccountExamine">
+    update expense_account_examine
+    <set>
+      <if test="eaid != null">
+        eaid = #{eaid,jdbcType=INTEGER},
+      </if>
+      <if test="type != null">
+        `type` = #{type,jdbcType=INTEGER},
+      </if>
+      <if test="status != null">
+        `status` = #{status,jdbcType=INTEGER},
+      </if>
+      <if test="auditor != null">
+        auditor = #{auditor,jdbcType=VARCHAR},
+      </if>
+      <if test="auditorname != null">
+        auditorName = #{auditorname,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.ExpenseAccountExamine">
+    update expense_account_examine
+    set eaid = #{eaid,jdbcType=INTEGER},
+      `type` = #{type,jdbcType=INTEGER},
+      `status` = #{status,jdbcType=INTEGER},
+      auditor = #{auditor,jdbcType=VARCHAR},
+      auditorName = #{auditorname,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+
+
+  <insert id="insertBatch">
+    insert into expense_account_examine (eaid,type, `status`, auditor, auditorName)
+    values
+    <foreach close=")" collection="list" item="e" open="(">
+      #{e.eaid,jdbcType=INTEGER},#{e.type}, #{e.status,jdbcType=INTEGER}, #{e.auditor,jdbcType=VARCHAR},
+      #{e.auditorname,jdbcType=VARCHAR}
+    </foreach>
+
+  </insert>
+</mapper>

+ 111 - 0
src/main/java/com/goafanti/common/model/ExpenseAccountExamine.java

@@ -0,0 +1,111 @@
+package com.goafanti.common.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * expense_account_examine
+ * @author
+ */
+public class ExpenseAccountExamine implements Serializable {
+    /**
+     * id
+     */
+    private Integer id;
+
+    /**
+     * 报销编号
+     */
+    private Integer eaid;
+
+    /**
+     * 流程截点 1=上级,2=财务,3=管理员,4=总裁/董事长
+     */
+    private Integer type;
+
+    /**
+     * 状态 0=未审核,1=已审核
+     */
+    private Integer status;
+
+    /**
+     * 审核人
+     */
+    private String auditor;
+
+    /**
+     * 审核人名称
+     */
+    private String auditorname;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    private static final long serialVersionUID = 1L;
+
+    public ExpenseAccountExamine() {
+    }
+
+    public ExpenseAccountExamine(Integer eaid, Integer type) {
+        this.eaid = eaid;
+        this.type = type;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getEaid() {
+        return eaid;
+    }
+
+    public void setEaid(Integer eaid) {
+        this.eaid = eaid;
+    }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public String getAuditor() {
+        return auditor;
+    }
+
+    public void setAuditor(String auditor) {
+        this.auditor = auditor;
+    }
+
+    public String getAuditorname() {
+        return auditorname;
+    }
+
+    public void setAuditorname(String auditorname) {
+        this.auditorname = auditorname;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+}