|
|
@@ -5,7 +5,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Mar 16 11:29:15 CST 2020.
|
|
|
+ This element was generated on Mon Mar 16 14:38:21 CST 2020.
|
|
|
-->
|
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
|
<result column="order_no" jdbcType="VARCHAR" property="orderNo" />
|
|
|
@@ -53,7 +53,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Mar 16 11:29:15 CST 2020.
|
|
|
+ This element was generated on Mon Mar 16 14:38:21 CST 2020.
|
|
|
-->
|
|
|
<result column="attachment_url" jdbcType="LONGVARCHAR" property="attachmentUrl" />
|
|
|
</resultMap>
|
|
|
@@ -61,7 +61,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Mar 16 11:29:15 CST 2020.
|
|
|
+ This element was generated on Mon Mar 16 14:38:21 CST 2020.
|
|
|
-->
|
|
|
<where>
|
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
|
|
@@ -95,7 +95,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Mar 16 11:29:15 CST 2020.
|
|
|
+ This element was generated on Mon Mar 16 14:38:21 CST 2020.
|
|
|
-->
|
|
|
<where>
|
|
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
|
@@ -129,7 +129,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Mar 16 11:29:15 CST 2020.
|
|
|
+ This element was generated on Mon Mar 16 14:38:21 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,
|
|
|
@@ -143,7 +143,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Mar 16 11:29:15 CST 2020.
|
|
|
+ This element was generated on Mon Mar 16 14:38:21 CST 2020.
|
|
|
-->
|
|
|
attachment_url
|
|
|
</sql>
|
|
|
@@ -151,7 +151,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Mar 16 11:29:15 CST 2020.
|
|
|
+ This element was generated on Mon Mar 16 14:38:21 CST 2020.
|
|
|
-->
|
|
|
select
|
|
|
<if test="distinct">
|
|
|
@@ -172,7 +172,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Mar 16 11:29:15 CST 2020.
|
|
|
+ This element was generated on Mon Mar 16 14:38:21 CST 2020.
|
|
|
-->
|
|
|
select
|
|
|
<if test="distinct">
|
|
|
@@ -191,7 +191,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Mar 16 11:29:15 CST 2020.
|
|
|
+ This element was generated on Mon Mar 16 14:38:21 CST 2020.
|
|
|
-->
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
@@ -204,7 +204,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Mar 16 11:29:15 CST 2020.
|
|
|
+ This element was generated on Mon Mar 16 14:38:21 CST 2020.
|
|
|
-->
|
|
|
delete from t_order_task
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
@@ -213,7 +213,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Mar 16 11:29:15 CST 2020.
|
|
|
+ This element was generated on Mon Mar 16 14:38:21 CST 2020.
|
|
|
-->
|
|
|
delete from t_order_task
|
|
|
<if test="_parameter != null">
|
|
|
@@ -224,7 +224,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Mar 16 11:29:15 CST 2020.
|
|
|
+ This element was generated on Mon Mar 16 14:38:21 CST 2020.
|
|
|
-->
|
|
|
insert into t_order_task (id, order_no, main,
|
|
|
super_id, commodity_id, commodity_name,
|
|
|
@@ -257,12 +257,12 @@
|
|
|
#{splitAid,jdbcType=VARCHAR}, #{splitTime,jdbcType=TIMESTAMP}, #{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 Mon Mar 16 11:29:15 CST 2020.
|
|
|
- -->
|
|
|
+ <!-- 记得返回id -->
|
|
|
+ <!-- <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderTask" useGeneratedKeys="true">
|
|
|
+ <selectKey keyProperty="id" order="AFTER" resultType="int">
|
|
|
+ SELECT LAST_INSERT_ID()
|
|
|
+ </selectKey> -->
|
|
|
+ <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderTask" useGeneratedKeys="true">
|
|
|
insert into t_order_task
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
|
@@ -520,12 +520,15 @@
|
|
|
#{attachmentUrl,jdbcType=LONGVARCHAR},
|
|
|
</if>
|
|
|
</trim>
|
|
|
+ <selectKey keyProperty="id" order="AFTER" resultType="int">
|
|
|
+ SELECT LAST_INSERT_ID()
|
|
|
+ </selectKey>
|
|
|
</insert>
|
|
|
<select id="countByExample" parameterType="com.goafanti.common.model.TOrderTaskExample" resultType="java.lang.Long">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Mar 16 11:29:15 CST 2020.
|
|
|
+ This element was generated on Mon Mar 16 14:38:21 CST 2020.
|
|
|
-->
|
|
|
select count(*) from t_order_task
|
|
|
<if test="_parameter != null">
|
|
|
@@ -536,7 +539,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Mar 16 11:29:15 CST 2020.
|
|
|
+ This element was generated on Mon Mar 16 14:38:21 CST 2020.
|
|
|
-->
|
|
|
update t_order_task
|
|
|
<set>
|
|
|
@@ -675,7 +678,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Mar 16 11:29:15 CST 2020.
|
|
|
+ This element was generated on Mon Mar 16 14:38:21 CST 2020.
|
|
|
-->
|
|
|
update t_order_task
|
|
|
set id = #{record.id,jdbcType=INTEGER},
|
|
|
@@ -728,7 +731,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Mar 16 11:29:15 CST 2020.
|
|
|
+ This element was generated on Mon Mar 16 14:38:21 CST 2020.
|
|
|
-->
|
|
|
update t_order_task
|
|
|
set id = #{record.id,jdbcType=INTEGER},
|
|
|
@@ -780,7 +783,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Mar 16 11:29:15 CST 2020.
|
|
|
+ This element was generated on Mon Mar 16 14:38:21 CST 2020.
|
|
|
-->
|
|
|
update t_order_task
|
|
|
<set>
|
|
|
@@ -914,7 +917,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Mar 16 11:29:15 CST 2020.
|
|
|
+ This element was generated on Mon Mar 16 14:38:21 CST 2020.
|
|
|
-->
|
|
|
update t_order_task
|
|
|
set order_no = #{orderNo,jdbcType=VARCHAR},
|
|
|
@@ -964,7 +967,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Mar 16 11:29:15 CST 2020.
|
|
|
+ This element was generated on Mon Mar 16 14:38:21 CST 2020.
|
|
|
-->
|
|
|
update t_order_task
|
|
|
set order_no = #{orderNo,jdbcType=VARCHAR},
|
|
|
@@ -1009,239 +1012,6 @@
|
|
|
split_time = #{splitTime,jdbcType=TIMESTAMP}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
- <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderTask" useGeneratedKeys="true">
|
|
|
-
|
|
|
- insert into t_order_task
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null">
|
|
|
- id,
|
|
|
- </if>
|
|
|
- <if test="orderNo != null">
|
|
|
- order_no,
|
|
|
- </if>
|
|
|
- <if test="main != null">
|
|
|
- main,
|
|
|
- </if>
|
|
|
- <if test="superId != null">
|
|
|
- super_id,
|
|
|
- </if>
|
|
|
- <if test="commodityId != null">
|
|
|
- commodity_id,
|
|
|
- </if>
|
|
|
- <if test="commodityName != null">
|
|
|
- commodity_name,
|
|
|
- </if>
|
|
|
- <if test="commodityQuantity != null">
|
|
|
- commodity_quantity,
|
|
|
- </if>
|
|
|
- <if test="commodityMode != null">
|
|
|
- commodity_mode,
|
|
|
- </if>
|
|
|
- <if test="commodityPrice != null">
|
|
|
- commodity_price,
|
|
|
- </if>
|
|
|
- <if test="taskStatus != null">
|
|
|
- task_status,
|
|
|
- </if>
|
|
|
- <if test="taskDistributionTime != null">
|
|
|
- task_distribution_time,
|
|
|
- </if>
|
|
|
- <if test="taskAllocator != null">
|
|
|
- task_allocator,
|
|
|
- </if>
|
|
|
- <if test="taskReceiver != null">
|
|
|
- task_receiver,
|
|
|
- </if>
|
|
|
- <if test="taskComment != null">
|
|
|
- task_comment,
|
|
|
- </if>
|
|
|
- <if test="taskStartTime != null">
|
|
|
- task_start_time,
|
|
|
- </if>
|
|
|
- <if test="taskEndTime != null">
|
|
|
- task_end_time,
|
|
|
- </if>
|
|
|
- <if test="projectStatus != null">
|
|
|
- project_status,
|
|
|
- </if>
|
|
|
- <if test="acceptTime != null">
|
|
|
- accept_time,
|
|
|
- </if>
|
|
|
- <if test="reviewTime != null">
|
|
|
- review_time,
|
|
|
- </if>
|
|
|
- <if test="publicityTime != null">
|
|
|
- publicity_time,
|
|
|
- </if>
|
|
|
- <if test="licenceTime != null">
|
|
|
- licence_time,
|
|
|
- </if>
|
|
|
- <if test="certificateNumber != null">
|
|
|
- certificate_number,
|
|
|
- </if>
|
|
|
- <if test="status != null">
|
|
|
- status,
|
|
|
- </if>
|
|
|
- <if test="formRetrieve != null">
|
|
|
- form_retrieve,
|
|
|
- </if>
|
|
|
- <if test="taskRefund != null">
|
|
|
- task_refund,
|
|
|
- </if>
|
|
|
- <if test="refundContent != null">
|
|
|
- refund_content,
|
|
|
- </if>
|
|
|
- <if test="retrieveContent != null">
|
|
|
- retrieve_content,
|
|
|
- </if>
|
|
|
- <if test="declareUser != null">
|
|
|
- declare_user,
|
|
|
- </if>
|
|
|
- <if test="declarePwd != null">
|
|
|
- declare_pwd,
|
|
|
- </if>
|
|
|
- <if test="setUpAmount != null">
|
|
|
- set_up_amount,
|
|
|
- </if>
|
|
|
- <if test="arrivalMoney != null">
|
|
|
- arrival_money,
|
|
|
- </if>
|
|
|
- <if test="outsourceName != null">
|
|
|
- outsource_name,
|
|
|
- </if>
|
|
|
- <if test="outsourcePrice != null">
|
|
|
- outsource_price,
|
|
|
- </if>
|
|
|
- <if test="consultantId != null">
|
|
|
- consultant_id,
|
|
|
- </if>
|
|
|
- <if test="managerId != null">
|
|
|
- manager_id,
|
|
|
- </if>
|
|
|
- <if test="outsource != null">
|
|
|
- outsource,
|
|
|
- </if>
|
|
|
- <if test="attachmentUrl != null">
|
|
|
- attachment_url,
|
|
|
- </if>
|
|
|
- </trim>
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null">
|
|
|
- #{id,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="orderNo != null">
|
|
|
- #{orderNo,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="main != null">
|
|
|
- #{main,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="superId != null">
|
|
|
- #{superId,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="commodityId != null">
|
|
|
- #{commodityId,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="commodityName != null">
|
|
|
- #{commodityName,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="commodityQuantity != null">
|
|
|
- #{commodityQuantity,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="commodityMode != null">
|
|
|
- #{commodityMode,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="commodityPrice != null">
|
|
|
- #{commodityPrice,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="taskStatus != null">
|
|
|
- #{taskStatus,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="taskDistributionTime != null">
|
|
|
- #{taskDistributionTime,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- <if test="taskAllocator != null">
|
|
|
- #{taskAllocator,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="taskReceiver != null">
|
|
|
- #{taskReceiver,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="taskComment != null">
|
|
|
- #{taskComment,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="taskStartTime != null">
|
|
|
- #{taskStartTime,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- <if test="taskEndTime != null">
|
|
|
- #{taskEndTime,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- <if test="projectStatus != null">
|
|
|
- #{projectStatus,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="acceptTime != null">
|
|
|
- #{acceptTime,jdbcType=DATE},
|
|
|
- </if>
|
|
|
- <if test="reviewTime != null">
|
|
|
- #{reviewTime,jdbcType=DATE},
|
|
|
- </if>
|
|
|
- <if test="publicityTime != null">
|
|
|
- #{publicityTime,jdbcType=DATE},
|
|
|
- </if>
|
|
|
- <if test="licenceTime != null">
|
|
|
- #{licenceTime,jdbcType=DATE},
|
|
|
- </if>
|
|
|
- <if test="certificateNumber != null">
|
|
|
- #{certificateNumber,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="status != null">
|
|
|
- #{status,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="formRetrieve != null">
|
|
|
- #{formRetrieve,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="taskRefund != null">
|
|
|
- #{taskRefund,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="refundContent != null">
|
|
|
- #{refundContent,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="retrieveContent != null">
|
|
|
- #{retrieveContent,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="declareUser != null">
|
|
|
- #{declareUser,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="declarePwd != null">
|
|
|
- #{declarePwd,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="setUpAmount != null">
|
|
|
- #{setUpAmount,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="arrivalMoney != null">
|
|
|
- #{arrivalMoney,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="outsourceName != null">
|
|
|
- #{outsourceName,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="outsourcePrice != null">
|
|
|
- #{outsourcePrice,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="consultantId != null">
|
|
|
- #{consultantId,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="managerId != null">
|
|
|
- #{managerId,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="outsource != null">
|
|
|
- #{outsource,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="attachmentUrl != null">
|
|
|
- #{attachmentUrl,jdbcType=LONGVARCHAR},
|
|
|
- </if>
|
|
|
- </trim>
|
|
|
- <selectKey keyProperty="id" order="AFTER" resultType="int">
|
|
|
- SELECT LAST_INSERT_ID()
|
|
|
- </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,
|
|
|
a.outsource_price outsourcePrice,g.name depName,e.order_status orderStatus,d.name as contacts,d.contact_mobile as contactsMobile,a.main, c.cname,
|
|
|
@@ -1563,11 +1333,13 @@ from t_order_task a left join business_project b on a.commodity_id=b.id left joi
|
|
|
</if>
|
|
|
where task_receiver=#{aid,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
+
|
|
|
<select id="selectEstimateCost" resultType="java.lang.String">
|
|
|
select ifnull(sum(a.commodity_quantity * ifnull(b.price,0)),0) from t_order_task a
|
|
|
left join business_project b on a.commodity_id=b.id
|
|
|
where order_no= #{orderNo}
|
|
|
</select>
|
|
|
+
|
|
|
<select id="listNameByDepAndName" resultType="java.lang.String">
|
|
|
select
|
|
|
<if test="type ==0">
|