|
|
@@ -99,8 +99,8 @@
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
This element was generated on Fri Oct 16 15:54:00 CST 2020.
|
|
|
-->
|
|
|
- id, tid, cid, order_no, main, commodity_id, commodity_name, commodity_quantity, commodity_price,
|
|
|
- task_comment, type, create_time, split_status, split_super, receiver_name, official_cost,
|
|
|
+ id, tid, cid, order_no, main, commodity_id, commodity_name, commodity_quantity, commodity_price,
|
|
|
+ task_comment, type, create_time, split_status, split_super, receiver_name, official_cost,
|
|
|
cost_reduction
|
|
|
</sql>
|
|
|
<select id="selectByExample" parameterType="com.goafanti.common.model.TChangeTaskExample" resultMap="BaseResultMap">
|
|
|
@@ -128,7 +128,7 @@
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
This element was generated on Fri Oct 16 15:54:00 CST 2020.
|
|
|
-->
|
|
|
- select
|
|
|
+ select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from t_change_task
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
@@ -159,17 +159,17 @@
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
This element was generated on Fri Oct 16 15:54:00 CST 2020.
|
|
|
-->
|
|
|
- insert into t_change_task (id, tid, cid,
|
|
|
- order_no, main, commodity_id,
|
|
|
- commodity_name, commodity_quantity, commodity_price,
|
|
|
- task_comment, type, create_time,
|
|
|
- split_status, split_super, receiver_name,
|
|
|
+ insert into t_change_task (id, tid, cid,
|
|
|
+ order_no, main, commodity_id,
|
|
|
+ commodity_name, commodity_quantity, commodity_price,
|
|
|
+ task_comment, type, create_time,
|
|
|
+ split_status, split_super, receiver_name,
|
|
|
official_cost, cost_reduction)
|
|
|
- values (#{id,jdbcType=INTEGER}, #{tid,jdbcType=INTEGER}, #{cid,jdbcType=INTEGER},
|
|
|
- #{orderNo,jdbcType=VARCHAR}, #{main,jdbcType=INTEGER}, #{commodityId,jdbcType=VARCHAR},
|
|
|
- #{commodityName,jdbcType=VARCHAR}, #{commodityQuantity,jdbcType=INTEGER}, #{commodityPrice,jdbcType=DECIMAL},
|
|
|
- #{taskComment,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
|
|
|
- #{splitStatus,jdbcType=INTEGER}, #{splitSuper,jdbcType=INTEGER}, #{receiverName,jdbcType=VARCHAR},
|
|
|
+ values (#{id,jdbcType=INTEGER}, #{tid,jdbcType=INTEGER}, #{cid,jdbcType=INTEGER},
|
|
|
+ #{orderNo,jdbcType=VARCHAR}, #{main,jdbcType=INTEGER}, #{commodityId,jdbcType=VARCHAR},
|
|
|
+ #{commodityName,jdbcType=VARCHAR}, #{commodityQuantity,jdbcType=INTEGER}, #{commodityPrice,jdbcType=DECIMAL},
|
|
|
+ #{taskComment,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ #{splitStatus,jdbcType=INTEGER}, #{splitSuper,jdbcType=INTEGER}, #{receiverName,jdbcType=VARCHAR},
|
|
|
#{officialCost,jdbcType=INTEGER}, #{costReduction,jdbcType=INTEGER})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.goafanti.common.model.TChangeTask">
|
|
|
@@ -473,17 +473,17 @@
|
|
|
cost_reduction = #{costReduction,jdbcType=INTEGER}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
-
|
|
|
+
|
|
|
<insert id="insertSelectiveList" parameterType="java.util.List">
|
|
|
insert into t_change_task ( tid, cid, split_status,
|
|
|
- order_no, commodity_id, commodity_name,
|
|
|
- commodity_quantity, commodity_price, task_comment,
|
|
|
+ order_no, commodity_id, commodity_name,
|
|
|
+ commodity_quantity, commodity_price, task_comment,
|
|
|
split_super , receiver_name, create_time)
|
|
|
- values
|
|
|
+ values
|
|
|
<foreach collection="list" index="index" item="item" separator=",">
|
|
|
( #{item.tid,jdbcType=INTEGER}, #{item.cid,jdbcType=INTEGER}, #{item.splitStatus,jdbcType=INTEGER},
|
|
|
- #{item.orderNo,jdbcType=VARCHAR}, #{item.commodityId,jdbcType=VARCHAR}, #{item.commodityName,jdbcType=VARCHAR},
|
|
|
- #{item.commodityQuantity,jdbcType=INTEGER}, #{item.commodityPrice,jdbcType=DECIMAL}, #{item.taskComment,jdbcType=VARCHAR},
|
|
|
+ #{item.orderNo,jdbcType=VARCHAR}, #{item.commodityId,jdbcType=VARCHAR}, #{item.commodityName,jdbcType=VARCHAR},
|
|
|
+ #{item.commodityQuantity,jdbcType=INTEGER}, #{item.commodityPrice,jdbcType=DECIMAL}, #{item.taskComment,jdbcType=VARCHAR},
|
|
|
#{item.splitSuper,jdbcType=INTEGER}, #{item.receiverName,jdbcType=VARCHAR}, now())
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
@@ -493,7 +493,7 @@
|
|
|
a.receiver_name receiverName, a.task_comment as taskComment ,a.commodity_price as commodityPrice,a.split_status splitStatus,
|
|
|
a.split_super splitSuper
|
|
|
from t_change_task a left join business_project i on a.commodity_id=i.id
|
|
|
- left join business_category c on i.cid=c.id
|
|
|
+ left join business_category c on i.cid=c.id
|
|
|
where 1=1
|
|
|
<if test="splitStatus !=null and splitStatus !=3">
|
|
|
and a.split_status= #{splitStatus}
|
|
|
@@ -504,8 +504,8 @@
|
|
|
and a.cid= #{id} order by a.id
|
|
|
</select>
|
|
|
<update id="updateByTid">
|
|
|
- update t_change_task set type= #{type}
|
|
|
- where 1=1
|
|
|
+ update t_change_task set type= #{type}
|
|
|
+ where 1=1
|
|
|
<if test="tid !=null">
|
|
|
and tid= #{tid}
|
|
|
</if>
|
|
|
@@ -516,19 +516,27 @@
|
|
|
and split_super= #{sid}
|
|
|
</if>
|
|
|
</update>
|
|
|
-
|
|
|
+
|
|
|
<update id="deleteByTid">
|
|
|
delete from t_change_task where tid= #{tid};
|
|
|
</update>
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
|
|
|
<select id="selectBySuper" resultType="com.goafanti.order.bo.TChangeTaskOut">
|
|
|
select a.id,a.order_no as orderNo,a.main, c.cname,c.sort cSort,a.commodity_name as commodityName,
|
|
|
a.commodity_quantity as commodityQuantity,i.price,a.commodity_id as commodityId,a.type,a.tid,a.receiver_name receiverName,
|
|
|
a.task_comment as taskComment ,a.commodity_price as commodityPrice,a.split_status splitStatus,a.split_super splitSuper
|
|
|
from t_change_task a left join business_project i on a.commodity_id=i.id
|
|
|
- left join business_category c on i.cid=c.id
|
|
|
+ left join business_category c on i.cid=c.id
|
|
|
where a.split_status=2 and a.split_super= #{splitSuper} and a.cid= #{cid} order by a.id
|
|
|
</select>
|
|
|
-</mapper>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+<select id="selectBytid" resultType="com.goafanti.common.model.TChangeTask">
|
|
|
+ select tct.id,tct.tid,tct.cid,tct.order_no orderNo
|
|
|
+ from t_change_task tct left join new_order_change noc on tct.cid =noc.id
|
|
|
+ where noc.process_state < 4 and tct.tid= #{tid}
|
|
|
+ </select>
|
|
|
+</mapper>
|