|
|
@@ -5,7 +5,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 09 09:38:55 CST 2020.
|
|
|
+ This element was generated on Tue Jun 09 15:36:58 CST 2020.
|
|
|
-->
|
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
|
<result column="order_no" jdbcType="VARCHAR" property="orderNo" />
|
|
|
@@ -51,12 +51,14 @@
|
|
|
<result column="cname" jdbcType="VARCHAR" property="cname" />
|
|
|
<result column="receiver_name" jdbcType="VARCHAR" property="receiverName" />
|
|
|
<result column="declaration_batch" jdbcType="INTEGER" property="declarationBatch" />
|
|
|
+ <result column="official_fees" jdbcType="INTEGER" property="officialFees" />
|
|
|
+ <result column="cost_reduction" jdbcType="INTEGER" property="costReduction" />
|
|
|
</resultMap>
|
|
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.goafanti.common.model.TOrderTask">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 09 09:38:55 CST 2020.
|
|
|
+ This element was generated on Tue Jun 09 15:36:58 CST 2020.
|
|
|
-->
|
|
|
<result column="attachment_url" jdbcType="LONGVARCHAR" property="attachmentUrl" />
|
|
|
</resultMap>
|
|
|
@@ -64,7 +66,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 09 09:38:55 CST 2020.
|
|
|
+ This element was generated on Tue Jun 09 15:36:58 CST 2020.
|
|
|
-->
|
|
|
<where>
|
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
|
|
@@ -98,7 +100,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 09 09:38:55 CST 2020.
|
|
|
+ This element was generated on Tue Jun 09 15:36:58 CST 2020.
|
|
|
-->
|
|
|
<where>
|
|
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
|
@@ -132,7 +134,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 09 09:38:55 CST 2020.
|
|
|
+ This element was generated on Tue Jun 09 15:36:58 CST 2020.
|
|
|
-->
|
|
|
id, order_no, main, super_id, commodity_id, commodity_name, commodity_quantity, commodity_mode,
|
|
|
commodity_price, task_status, task_distribution_time, task_allocator, task_receiver,
|
|
|
@@ -140,13 +142,14 @@
|
|
|
publicity_time, licence_time, certificate_number, status, form_retrieve, task_refund,
|
|
|
refund_content, retrieve_content, declare_user, declare_pwd, set_up_amount, arrival_money,
|
|
|
outsource_name, outsource_price, consultant_id, manager_id, outsource, split_super,
|
|
|
- split_status, split_id, split_aid, split_time, cname, receiver_name, declaration_batch
|
|
|
+ split_status, split_id, split_aid, split_time, cname, receiver_name, declaration_batch,
|
|
|
+ official_fees, cost_reduction
|
|
|
</sql>
|
|
|
<sql id="Blob_Column_List">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 09 09:38:55 CST 2020.
|
|
|
+ This element was generated on Tue Jun 09 15:36:58 CST 2020.
|
|
|
-->
|
|
|
attachment_url
|
|
|
</sql>
|
|
|
@@ -154,7 +157,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 09 09:38:55 CST 2020.
|
|
|
+ This element was generated on Tue Jun 09 15:36:58 CST 2020.
|
|
|
-->
|
|
|
select
|
|
|
<if test="distinct">
|
|
|
@@ -175,7 +178,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 09 09:38:55 CST 2020.
|
|
|
+ This element was generated on Tue Jun 09 15:36:58 CST 2020.
|
|
|
-->
|
|
|
select
|
|
|
<if test="distinct">
|
|
|
@@ -194,7 +197,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 09 09:38:55 CST 2020.
|
|
|
+ This element was generated on Tue Jun 09 15:36:58 CST 2020.
|
|
|
-->
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
@@ -207,7 +210,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 09 09:38:55 CST 2020.
|
|
|
+ This element was generated on Tue Jun 09 15:36:58 CST 2020.
|
|
|
-->
|
|
|
delete from t_order_task
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
@@ -216,7 +219,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 09 09:38:55 CST 2020.
|
|
|
+ This element was generated on Tue Jun 09 15:36:58 CST 2020.
|
|
|
-->
|
|
|
delete from t_order_task
|
|
|
<if test="_parameter != null">
|
|
|
@@ -227,7 +230,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 09 09:38:55 CST 2020.
|
|
|
+ This element was generated on Tue Jun 09 15:36:58 CST 2020.
|
|
|
-->
|
|
|
insert into t_order_task (id, order_no, main,
|
|
|
super_id, commodity_id, commodity_name,
|
|
|
@@ -243,8 +246,8 @@
|
|
|
consultant_id, manager_id, outsource,
|
|
|
split_super, split_status, split_id,
|
|
|
split_aid, split_time, cname,
|
|
|
- receiver_name, declaration_batch, attachment_url
|
|
|
- )
|
|
|
+ receiver_name, declaration_batch, official_fees,
|
|
|
+ cost_reduction, attachment_url)
|
|
|
values (#{id,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{main,jdbcType=INTEGER},
|
|
|
#{superId,jdbcType=VARCHAR}, #{commodityId,jdbcType=VARCHAR}, #{commodityName,jdbcType=VARCHAR},
|
|
|
#{commodityQuantity,jdbcType=INTEGER}, #{commodityMode,jdbcType=VARCHAR}, #{commodityPrice,jdbcType=DECIMAL},
|
|
|
@@ -259,14 +262,14 @@
|
|
|
#{consultantId,jdbcType=VARCHAR}, #{managerId,jdbcType=VARCHAR}, #{outsource,jdbcType=INTEGER},
|
|
|
#{splitSuper,jdbcType=INTEGER}, #{splitStatus,jdbcType=INTEGER}, #{splitId,jdbcType=INTEGER},
|
|
|
#{splitAid,jdbcType=VARCHAR}, #{splitTime,jdbcType=TIMESTAMP}, #{cname,jdbcType=VARCHAR},
|
|
|
- #{receiverName,jdbcType=VARCHAR}, #{declarationBatch,jdbcType=INTEGER}, #{attachmentUrl,jdbcType=LONGVARCHAR}
|
|
|
- )
|
|
|
+ #{receiverName,jdbcType=VARCHAR}, #{declarationBatch,jdbcType=INTEGER}, #{officialFees,jdbcType=INTEGER},
|
|
|
+ #{costReduction,jdbcType=INTEGER}, #{attachmentUrl,jdbcType=LONGVARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.goafanti.common.model.TOrderTask">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 09 09:38:55 CST 2020.
|
|
|
+ This element was generated on Tue Jun 09 15:36:58 CST 2020.
|
|
|
-->
|
|
|
insert into t_order_task
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
@@ -402,6 +405,12 @@
|
|
|
<if test="declarationBatch != null">
|
|
|
declaration_batch,
|
|
|
</if>
|
|
|
+ <if test="officialFees != null">
|
|
|
+ official_fees,
|
|
|
+ </if>
|
|
|
+ <if test="costReduction != null">
|
|
|
+ cost_reduction,
|
|
|
+ </if>
|
|
|
<if test="attachmentUrl != null">
|
|
|
attachment_url,
|
|
|
</if>
|
|
|
@@ -539,6 +548,12 @@
|
|
|
<if test="declarationBatch != null">
|
|
|
#{declarationBatch,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="officialFees != null">
|
|
|
+ #{officialFees,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="costReduction != null">
|
|
|
+ #{costReduction,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
<if test="attachmentUrl != null">
|
|
|
#{attachmentUrl,jdbcType=LONGVARCHAR},
|
|
|
</if>
|
|
|
@@ -548,7 +563,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 09 09:38:55 CST 2020.
|
|
|
+ This element was generated on Tue Jun 09 15:36:58 CST 2020.
|
|
|
-->
|
|
|
select count(*) from t_order_task
|
|
|
<if test="_parameter != null">
|
|
|
@@ -559,7 +574,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 09 09:38:55 CST 2020.
|
|
|
+ This element was generated on Tue Jun 09 15:36:58 CST 2020.
|
|
|
-->
|
|
|
update t_order_task
|
|
|
<set>
|
|
|
@@ -695,6 +710,12 @@
|
|
|
<if test="record.declarationBatch != null">
|
|
|
declaration_batch = #{record.declarationBatch,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="record.officialFees != null">
|
|
|
+ official_fees = #{record.officialFees,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.costReduction != null">
|
|
|
+ cost_reduction = #{record.costReduction,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
<if test="record.attachmentUrl != null">
|
|
|
attachment_url = #{record.attachmentUrl,jdbcType=LONGVARCHAR},
|
|
|
</if>
|
|
|
@@ -707,7 +728,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 09 09:38:55 CST 2020.
|
|
|
+ This element was generated on Tue Jun 09 15:36:58 CST 2020.
|
|
|
-->
|
|
|
update t_order_task
|
|
|
set id = #{record.id,jdbcType=INTEGER},
|
|
|
@@ -754,6 +775,8 @@
|
|
|
cname = #{record.cname,jdbcType=VARCHAR},
|
|
|
receiver_name = #{record.receiverName,jdbcType=VARCHAR},
|
|
|
declaration_batch = #{record.declarationBatch,jdbcType=INTEGER},
|
|
|
+ official_fees = #{record.officialFees,jdbcType=INTEGER},
|
|
|
+ cost_reduction = #{record.costReduction,jdbcType=INTEGER},
|
|
|
attachment_url = #{record.attachmentUrl,jdbcType=LONGVARCHAR}
|
|
|
<if test="_parameter != null">
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
@@ -763,7 +786,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 09 09:38:55 CST 2020.
|
|
|
+ This element was generated on Tue Jun 09 15:36:58 CST 2020.
|
|
|
-->
|
|
|
update t_order_task
|
|
|
set id = #{record.id,jdbcType=INTEGER},
|
|
|
@@ -809,7 +832,9 @@
|
|
|
split_time = #{record.splitTime,jdbcType=TIMESTAMP},
|
|
|
cname = #{record.cname,jdbcType=VARCHAR},
|
|
|
receiver_name = #{record.receiverName,jdbcType=VARCHAR},
|
|
|
- declaration_batch = #{record.declarationBatch,jdbcType=INTEGER}
|
|
|
+ declaration_batch = #{record.declarationBatch,jdbcType=INTEGER},
|
|
|
+ official_fees = #{record.officialFees,jdbcType=INTEGER},
|
|
|
+ cost_reduction = #{record.costReduction,jdbcType=INTEGER}
|
|
|
<if test="_parameter != null">
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
</if>
|
|
|
@@ -818,7 +843,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 09 09:38:55 CST 2020.
|
|
|
+ This element was generated on Tue Jun 09 15:36:58 CST 2020.
|
|
|
-->
|
|
|
update t_order_task
|
|
|
<set>
|
|
|
@@ -951,6 +976,12 @@
|
|
|
<if test="declarationBatch != null">
|
|
|
declaration_batch = #{declarationBatch,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="officialFees != null">
|
|
|
+ official_fees = #{officialFees,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="costReduction != null">
|
|
|
+ cost_reduction = #{costReduction,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
<if test="attachmentUrl != null">
|
|
|
attachment_url = #{attachmentUrl,jdbcType=LONGVARCHAR},
|
|
|
</if>
|
|
|
@@ -961,7 +992,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 09 09:38:55 CST 2020.
|
|
|
+ This element was generated on Tue Jun 09 15:36:58 CST 2020.
|
|
|
-->
|
|
|
update t_order_task
|
|
|
set order_no = #{orderNo,jdbcType=VARCHAR},
|
|
|
@@ -1007,6 +1038,8 @@
|
|
|
cname = #{cname,jdbcType=VARCHAR},
|
|
|
receiver_name = #{receiverName,jdbcType=VARCHAR},
|
|
|
declaration_batch = #{declarationBatch,jdbcType=INTEGER},
|
|
|
+ official_fees = #{officialFees,jdbcType=INTEGER},
|
|
|
+ cost_reduction = #{costReduction,jdbcType=INTEGER},
|
|
|
attachment_url = #{attachmentUrl,jdbcType=LONGVARCHAR}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
@@ -1014,7 +1047,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 09 09:38:55 CST 2020.
|
|
|
+ This element was generated on Tue Jun 09 15:36:58 CST 2020.
|
|
|
-->
|
|
|
update t_order_task
|
|
|
set order_no = #{orderNo,jdbcType=VARCHAR},
|
|
|
@@ -1059,16 +1092,18 @@
|
|
|
split_time = #{splitTime,jdbcType=TIMESTAMP},
|
|
|
cname = #{cname,jdbcType=VARCHAR},
|
|
|
receiver_name = #{receiverName,jdbcType=VARCHAR},
|
|
|
- declaration_batch = #{declarationBatch,jdbcType=INTEGER}
|
|
|
+ declaration_batch = #{declarationBatch,jdbcType=INTEGER},
|
|
|
+ official_fees = #{officialFees,jdbcType=INTEGER},
|
|
|
+ cost_reduction = #{costReduction,jdbcType=INTEGER}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
<!-- 记得返回id -->
|
|
|
- <!-- &amp;lt;insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderTask" useGeneratedKeys="true"&amp;gt;
|
|
|
- &amp;lt;selectKey keyProperty="id" order="AFTER" resultType="int"&amp;gt;
|
|
|
+ <!-- &amp;amp;amp;lt;insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderTask" useGeneratedKeys="true"&amp;amp;amp;gt;
|
|
|
+ &amp;amp;amp;lt;selectKey keyProperty="id" order="AFTER" resultType="int"&amp;amp;amp;gt;
|
|
|
SELECT LAST_INSERT_ID()
|
|
|
- &amp;lt;/selectKey&amp;gt; -->
|
|
|
+ &amp;amp;amp;lt;/selectKey&amp;amp;amp;gt; -->
|
|
|
<insert id="insertSelectiveGetId" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderTask" useGeneratedKeys="true">
|
|
|
- insert into t_order_task
|
|
|
+ insert into t_order_task
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
|
id,
|
|
|
@@ -1199,6 +1234,15 @@
|
|
|
<if test="receiverName != null">
|
|
|
receiver_name,
|
|
|
</if>
|
|
|
+ <if test="declarationBatch != null">
|
|
|
+ declaration_batch,
|
|
|
+ </if>
|
|
|
+ <if test="officialFees != null">
|
|
|
+ official_fees,
|
|
|
+ </if>
|
|
|
+ <if test="costReduction != null">
|
|
|
+ cost_reduction,
|
|
|
+ </if>
|
|
|
<if test="attachmentUrl != null">
|
|
|
attachment_url,
|
|
|
</if>
|
|
|
@@ -1333,6 +1377,15 @@
|
|
|
<if test="receiverName != null">
|
|
|
#{receiverName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="declarationBatch != null">
|
|
|
+ #{declarationBatch,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="officialFees != null">
|
|
|
+ #{officialFees,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="costReduction != null">
|
|
|
+ #{costReduction,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
<if test="attachmentUrl != null">
|
|
|
#{attachmentUrl,jdbcType=LONGVARCHAR},
|
|
|
</if>
|
|
|
@@ -1342,11 +1395,12 @@
|
|
|
</selectKey>
|
|
|
</insert>
|
|
|
<select id="selectOrderTask" resultType="com.goafanti.order.bo.TOrderTaskBo">
|
|
|
- select a.id,e.contract_no contractNo,a.order_no as orderNo,h.nickname userName,f.name salesmanName,a.outsource_name outsourceName,a.outsource,
|
|
|
+ select a.id,e.contract_no contractNo,a.order_no as orderNo,h.nickname userName,f.name salesmanName,a.outsource_name outsourceName,a.outsource,
|
|
|
a.outsource_price outsourcePrice,g.name depName,e.order_status orderStatus,d.name as contacts,d.contact_mobile as contactsMobile,a.main, c.cname,
|
|
|
c.sort cSort,a.commodity_name as commodityName,a.commodity_quantity as commodityQuantity,i.price,a.certificate_number as certificateNumber,
|
|
|
a.commodity_id as commodityId,a.manager_id managerId,a.consultant_id consultantId,a.project_status as projectStatus,a.set_up_amount setUpAmount,
|
|
|
- a.task_comment as taskComment ,a.commodity_price as commodityPrice, a.task_status as taskStatus, a.task_receiver as taskReceiver ,a.split_status splitStatus
|
|
|
+ a.task_comment as taskComment ,a.commodity_price as commodityPrice, a.task_status as taskStatus, a.task_receiver as taskReceiver ,
|
|
|
+ a.split_status splitStatus,a.cost_reduction costReduction,a.official_fees officialFees
|
|
|
from t_order_task a left join business_project b on a.commodity_id=b.id left join t_order_new e on a.order_no=e.order_no
|
|
|
left join admin f on e.salesman_id=f.id left join department g on e.order_dep=g.id left join user h on e.buyer_id=h.id
|
|
|
left join business_project i on a.commodity_id=i.id left join business_category c on b.cid=c.id left join admin d on a.task_receiver=d.id
|
|
|
@@ -1371,7 +1425,7 @@
|
|
|
select a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,a.receiver_name receiverName,a.project_status as projectStatus,e.contract_no contractNo,
|
|
|
a.task_receiver taskReceiver,a.task_status as taskStatus,date_format(a.task_distribution_time,'%Y-%m-%d') as taskDate, a.commodity_quantity as commodityQuantity,
|
|
|
e.approval,l.refund_status outsourceStatus,ifnull(i.alreadyNumber,0) as alreadyNumber,f.nickname as userName,h.name as depName, l.company_name as outsourceName ,
|
|
|
-ifnull(k.hours,0) hours,a.split_status splitStatus,a.split_super splitSuper, a.split_id splitId
|
|
|
+ifnull(k.hours,0) hours,a.split_status splitStatus,a.split_super splitSuper, a.split_id splitId,b.`type` projectType
|
|
|
from t_order_task a left join business_project b on a.commodity_id=b.id left join business_category c on b.cid=c.id
|
|
|
left join t_order_new e on a.order_no=e.order_no left join user f on e.buyer_id=f.id
|
|
|
left join department h on e.order_dep=h.id left join (select task_id , sum(already_number) as alreadyNumber from task_progress
|