Browse Source

财务审核修改

anderx 2 years ago
parent
commit
83e1a76cb9

+ 1 - 1
src/main/java/com/goafanti/common/dao/TOrderExamineMapper.java

@@ -18,7 +18,7 @@ public interface TOrderExamineMapper {
 
     int updateByPrimaryKey(TOrderExamine record);
 
-    List<TOrderExamine> selectByOrderNo(String orderNo);
+    List<TOrderExamine> selectByOrderNo(@Param("orderNo")String orderNo,@Param("type")Integer type);
 
     void updateStatusByOrderNo(@Param("orderNo")String orderNo,@Param("aid") String aid, @Param("status")Integer status);
 

+ 20 - 10
src/main/java/com/goafanti/common/mapper/TOrderExamineMapper.xml

@@ -8,9 +8,10 @@
     <result column="status" jdbcType="INTEGER" property="status" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="aname" jdbcType="VARCHAR" property="aname" />
+    <result column="type" jdbcType="INTEGER" property="type" />
   </resultMap>
   <sql id="Base_Column_List">
-    id, order_no, aid, `status`, create_time, aname
+    id, order_no, aid, `status`, create_time, aname, `type`
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select
@@ -18,17 +19,17 @@
     from t_order_examine
     where id = #{id,jdbcType=INTEGER}
   </select>
-
-    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
     delete from t_order_examine
     where id = #{id,jdbcType=INTEGER}
   </delete>
-
-    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderExamine" useGeneratedKeys="true">
+  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderExamine" useGeneratedKeys="true">
     insert into t_order_examine (order_no, aid, `status`,
-      create_time, aname)
+      create_time, aname, `type`
+      )
     values (#{orderNo,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
-      #{createTime,jdbcType=TIMESTAMP}, #{aname,jdbcType=VARCHAR})
+      #{createTime,jdbcType=TIMESTAMP}, #{aname,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}
+      )
   </insert>
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderExamine" useGeneratedKeys="true">
     insert into t_order_examine
@@ -48,6 +49,9 @@
       <if test="aname != null">
         aname,
       </if>
+      <if test="type != null">
+        `type`,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="orderNo != null">
@@ -65,9 +69,11 @@
       <if test="aname != null">
         #{aname,jdbcType=VARCHAR},
       </if>
+      <if test="type != null">
+        #{type,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
-
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderExamine">
     update t_order_examine
     <set>
@@ -86,6 +92,9 @@
       <if test="aname != null">
         aname = #{aname,jdbcType=VARCHAR},
       </if>
+      <if test="type != null">
+        `type` = #{type,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -95,7 +104,8 @@
       aid = #{aid,jdbcType=VARCHAR},
       `status` = #{status,jdbcType=INTEGER},
       create_time = #{createTime,jdbcType=TIMESTAMP},
-      aname = #{aname,jdbcType=VARCHAR}
+      aname = #{aname,jdbcType=VARCHAR},
+      `type` = #{type,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
 
@@ -104,7 +114,7 @@
     select
     <include refid="Base_Column_List" />
     from t_order_examine
-    where order_no = #{orderNo,jdbcType=VARCHAR}
+    where order_no = #{orderNo,jdbcType=VARCHAR} and type = #{type,jdbcType=INTEGER}
   </select>
 
 

+ 13 - 0
src/main/java/com/goafanti/common/model/TOrderExamine.java

@@ -35,6 +35,11 @@ public class TOrderExamine implements Serializable {
      */
     private String aname;
 
+    /**
+     * 0=订单审核,1=会员发起审核
+     */
+    private Integer type;
+
     private static final long serialVersionUID = 1L;
 
     public Integer getId() {
@@ -85,6 +90,14 @@ public class TOrderExamine implements Serializable {
         this.aname = aname;
     }
 
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
     public TOrderExamine() {
     }
 

+ 2 - 2
src/main/java/com/goafanti/order/service/impl/FundManagerOrderServiceImpl.java

@@ -521,7 +521,7 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 		if (flag){
 			pushNoticeAndEmail(t, use);
 		}else {
-			List<TOrderExamine> tOrderExamines = tOrderExamineMapper.selectByOrderNo(orderNo);
+			List<TOrderExamine> tOrderExamines = tOrderExamineMapper.selectByOrderNo(orderNo,0);
 			StringBuffer str=new StringBuffer();
 			for (TOrderExamine e : tOrderExamines) {
 				if (e.getStatus()==0){
@@ -581,7 +581,7 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 
 	private boolean judgeOrderExamine(String orderNo) {
 		tOrderExamineMapper.updateStatusByOrderNo(orderNo,TokenManager.getAdminId(),1);
-		List<TOrderExamine> tOrderExamines = tOrderExamineMapper.selectByOrderNo(orderNo);
+		List<TOrderExamine> tOrderExamines = tOrderExamineMapper.selectByOrderNo(orderNo,0);
 		int max = tOrderExamines.size();
 		int yes=0;
 		for (TOrderExamine e : tOrderExamines) {

+ 1 - 1
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -1106,7 +1106,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 				t.setProcessStatus(ProcessStatus.YPCW_JSZJ.getCode());
 				//设置财务与技术总监通知
 				//为了处理旧数据,后期可以去掉新增
-				List<TOrderExamine> tOrderExamines = tOrderExamineMapper.selectByOrderNo(orderNo);
+				List<TOrderExamine> tOrderExamines = tOrderExamineMapper.selectByOrderNo(orderNo,0);
 				if (tOrderExamines.isEmpty()){
 					List<TOrderExamine> tOrderExamines1 = addTOrderExamines(t2);
 					for (TOrderExamine e : tOrderExamines1) {