|
|
@@ -5,7 +5,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jul 14 15:27:49 CST 2021.
|
|
|
+ This element was generated on Fri Jul 16 15:11:11 CST 2021.
|
|
|
-->
|
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
|
<result column="order_no" jdbcType="VARCHAR" property="orderNo" />
|
|
|
@@ -63,12 +63,13 @@
|
|
|
<result column="certification_corporate" jdbcType="VARCHAR" property="certificationCorporate" />
|
|
|
<result column="if_publicity" jdbcType="INTEGER" property="ifPublicity" />
|
|
|
<result column="check_status" jdbcType="INTEGER" property="checkStatus" />
|
|
|
+ <result column="patent_type" jdbcType="INTEGER" property="patentType" />
|
|
|
</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 Wed Jul 14 15:27:49 CST 2021.
|
|
|
+ This element was generated on Fri Jul 16 15:11:11 CST 2021.
|
|
|
-->
|
|
|
<result column="attachment_url" jdbcType="LONGVARCHAR" property="attachmentUrl" />
|
|
|
<result column="time_record" jdbcType="LONGVARCHAR" property="timeRecord" />
|
|
|
@@ -77,7 +78,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jul 14 15:27:49 CST 2021.
|
|
|
+ This element was generated on Fri Jul 16 15:11:11 CST 2021.
|
|
|
-->
|
|
|
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,
|
|
|
@@ -88,13 +89,13 @@
|
|
|
split_status, split_id, split_aid, split_time, cname, receiver_name, declaration_batch,
|
|
|
cost_reduction, official_cost, set_up_status, set_up_time, spot_check_status, high_tech_status,
|
|
|
special_comment, if_certification_fee, certification_fee, certification_corporate,
|
|
|
- if_publicity, check_status
|
|
|
+ if_publicity, check_status, patent_type
|
|
|
</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 Wed Jul 14 15:27:49 CST 2021.
|
|
|
+ This element was generated on Fri Jul 16 15:11:11 CST 2021.
|
|
|
-->
|
|
|
attachment_url, time_record
|
|
|
</sql>
|
|
|
@@ -102,7 +103,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jul 14 15:27:49 CST 2021.
|
|
|
+ This element was generated on Fri Jul 16 15:11:11 CST 2021.
|
|
|
-->
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
@@ -115,7 +116,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jul 14 15:27:49 CST 2021.
|
|
|
+ This element was generated on Fri Jul 16 15:11:11 CST 2021.
|
|
|
-->
|
|
|
delete from t_order_task
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
@@ -124,7 +125,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jul 14 15:27:49 CST 2021.
|
|
|
+ This element was generated on Fri Jul 16 15:11:11 CST 2021.
|
|
|
-->
|
|
|
insert into t_order_task (id, order_no, main,
|
|
|
super_id, commodity_id, commodity_name,
|
|
|
@@ -144,8 +145,8 @@
|
|
|
official_cost, set_up_status, set_up_time,
|
|
|
spot_check_status, high_tech_status, special_comment,
|
|
|
if_certification_fee, certification_fee, certification_corporate,
|
|
|
- if_publicity, check_status, attachment_url,
|
|
|
- time_record)
|
|
|
+ if_publicity, check_status, patent_type,
|
|
|
+ attachment_url, time_record)
|
|
|
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},
|
|
|
@@ -164,14 +165,14 @@
|
|
|
#{officialCost,jdbcType=INTEGER}, #{setUpStatus,jdbcType=INTEGER}, #{setUpTime,jdbcType=TIMESTAMP},
|
|
|
#{spotCheckStatus,jdbcType=INTEGER}, #{highTechStatus,jdbcType=INTEGER}, #{specialComment,jdbcType=VARCHAR},
|
|
|
#{ifCertificationFee,jdbcType=INTEGER}, #{certificationFee,jdbcType=DECIMAL}, #{certificationCorporate,jdbcType=VARCHAR},
|
|
|
- #{ifPublicity,jdbcType=INTEGER}, #{checkStatus,jdbcType=INTEGER}, #{attachmentUrl,jdbcType=LONGVARCHAR},
|
|
|
- #{timeRecord,jdbcType=LONGVARCHAR})
|
|
|
+ #{ifPublicity,jdbcType=INTEGER}, #{checkStatus,jdbcType=INTEGER}, #{patentType,jdbcType=INTEGER},
|
|
|
+ #{attachmentUrl,jdbcType=LONGVARCHAR}, #{timeRecord,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 Wed Jul 14 15:27:49 CST 2021.
|
|
|
+ This element was generated on Fri Jul 16 15:11:11 CST 2021.
|
|
|
-->
|
|
|
insert into t_order_task
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
@@ -343,6 +344,9 @@
|
|
|
<if test="checkStatus != null">
|
|
|
check_status,
|
|
|
</if>
|
|
|
+ <if test="patentType != null">
|
|
|
+ patent_type,
|
|
|
+ </if>
|
|
|
<if test="attachmentUrl != null">
|
|
|
attachment_url,
|
|
|
</if>
|
|
|
@@ -519,6 +523,9 @@
|
|
|
<if test="checkStatus != null">
|
|
|
#{checkStatus,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="patentType != null">
|
|
|
+ #{patentType,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
<if test="attachmentUrl != null">
|
|
|
#{attachmentUrl,jdbcType=LONGVARCHAR},
|
|
|
</if>
|
|
|
@@ -531,7 +538,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jul 14 15:27:49 CST 2021.
|
|
|
+ This element was generated on Fri Jul 16 15:11:11 CST 2021.
|
|
|
-->
|
|
|
update t_order_task
|
|
|
<set>
|
|
|
@@ -700,6 +707,9 @@
|
|
|
<if test="checkStatus != null">
|
|
|
check_status = #{checkStatus,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="patentType != null">
|
|
|
+ patent_type = #{patentType,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
<if test="attachmentUrl != null">
|
|
|
attachment_url = #{attachmentUrl,jdbcType=LONGVARCHAR},
|
|
|
</if>
|
|
|
@@ -713,7 +723,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jul 14 15:27:49 CST 2021.
|
|
|
+ This element was generated on Fri Jul 16 15:11:11 CST 2021.
|
|
|
-->
|
|
|
update t_order_task
|
|
|
set order_no = #{orderNo,jdbcType=VARCHAR},
|
|
|
@@ -771,6 +781,7 @@
|
|
|
certification_corporate = #{certificationCorporate,jdbcType=VARCHAR},
|
|
|
if_publicity = #{ifPublicity,jdbcType=INTEGER},
|
|
|
check_status = #{checkStatus,jdbcType=INTEGER},
|
|
|
+ patent_type = #{patentType,jdbcType=INTEGER},
|
|
|
attachment_url = #{attachmentUrl,jdbcType=LONGVARCHAR},
|
|
|
time_record = #{timeRecord,jdbcType=LONGVARCHAR}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
@@ -779,7 +790,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jul 14 15:27:49 CST 2021.
|
|
|
+ This element was generated on Fri Jul 16 15:11:11 CST 2021.
|
|
|
-->
|
|
|
update t_order_task
|
|
|
set order_no = #{orderNo,jdbcType=VARCHAR},
|
|
|
@@ -836,15 +847,16 @@
|
|
|
certification_fee = #{certificationFee,jdbcType=DECIMAL},
|
|
|
certification_corporate = #{certificationCorporate,jdbcType=VARCHAR},
|
|
|
if_publicity = #{ifPublicity,jdbcType=INTEGER},
|
|
|
- check_status = #{checkStatus,jdbcType=INTEGER}
|
|
|
+ check_status = #{checkStatus,jdbcType=INTEGER},
|
|
|
+ patent_type = #{patentType,jdbcType=INTEGER}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
|
|
|
<!-- 记得返回id -->
|
|
|
- <!-- &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderTask" useGeneratedKeys="true"&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;
|
|
|
- &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;selectKey keyProperty="id" order="AFTER" resultType="int"&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;
|
|
|
+ <!-- &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderTask" useGeneratedKeys="true"&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;
|
|
|
+ &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;selectKey keyProperty="id" order="AFTER" resultType="int"&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;
|
|
|
SELECT LAST_INSERT_ID()
|
|
|
- &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;/selectKey&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt; -->
|
|
|
+ &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;/selectKey&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt; -->
|
|
|
<insert id="insertSelectiveGetId" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderTask" useGeneratedKeys="true">
|
|
|
insert into t_order_task
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
@@ -1204,7 +1216,7 @@
|
|
|
</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,
|
|
|
+ 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,
|
|
|
@@ -1212,7 +1224,8 @@
|
|
|
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.if_certification_fee ifCertificationFee , a.split_status splitStatus,
|
|
|
- a.cost_reduction costReduction,a.official_cost officialCost,i.`type` ,d.name ,a.declaration_batch declarationBatch
|
|
|
+ a.cost_reduction costReduction,a.official_cost officialCost,i.`type` ,d.name ,a.declaration_batch declarationBatch,
|
|
|
+ a.patent_type patentType
|
|
|
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
|
|
|
@@ -1376,7 +1389,7 @@ date_format(e.create_time ,'%Y-%m-%d')creteTime
|
|
|
</if>
|
|
|
</select>
|
|
|
<select id="getOrderTaskDetail" resultType="com.goafanti.order.bo.TOrderTaskDetailBo">
|
|
|
- select
|
|
|
+ select
|
|
|
a.id,a.commodity_name as taskName,a.order_no as orderNo,c.sort ,c.cname,d.name as receiverName,a.task_comment as taskComment,a.project_status as projectStatus,
|
|
|
a.task_status as taskStatus,e.contacts,a.attachment_url as attachmentUrl,a.outsource_name outsourceName, f.nickname as userName,a.set_up_amount as setUpAmount,
|
|
|
g.name as salesmanName,date_format(a.task_start_time,'%Y-%m-%d') as startDate,a.retrieve_content as retrieveContent, a.arrival_money as arrivalMoney,
|
|
|
@@ -1388,7 +1401,7 @@ date_format(e.create_time ,'%Y-%m-%d')creteTime
|
|
|
e.legal_person_tel as legalPersonTel, a.split_status splitStatus, a.split_super splitSuper, a.split_id splitId,a.declaration_batch declarationBatch,
|
|
|
a.if_certification_fee ifCertificationFee , a.certification_corporate certificationCorporate ,a.certification_fee certificationFee ,a.time_record timeRecord,
|
|
|
a.cost_reduction costReduction, a.official_cost officialCost,a.set_up_status setUpStatus ,date_format(a.set_up_time,'%Y-%m-%d') setUpTime ,a.high_tech_status highTechStatus ,
|
|
|
- a.spot_check_status spotCheckStatus , a.special_comment specialComment ,ttm.certificates_count certificatesCount ,ttm.reject_count rejectCount ,
|
|
|
+ a.spot_check_status spotCheckStatus , a.special_comment specialComment ,ttm.certificates_count certificatesCount ,ttm.reject_count rejectCount ,a.check_status checkStatus,
|
|
|
ttm.authorize_count authorizeCount ,ttm.end_count endCount,ttm.accept_count acceptCount,a.commodity_price commodityPrice,a.commodity_quantity commodityQuantity
|
|
|
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 admin d on a.task_receiver=d.id left join t_order_new e on a.order_no=e.order_no
|
|
|
@@ -2052,4 +2065,59 @@ left join department de on x.department_id=de.id left join business_category bc
|
|
|
left join t_order_task b on a.order_no =b.order_no
|
|
|
where a.buyer_id = #{uid}
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="selectProjectCheck" resultType="com.goafanti.order.bo.OutProjectCheck">
|
|
|
+ select a.id,a.commodity_name commodityName ,b.order_no orderNo,b.contract_no contractNo,a.commodity_quantity commodityQuantity,
|
|
|
+ c.buyer_name userName ,e.cname ,a.task_distribution_time taskDistributionTime,f.name depName ,a.check_status checkStatus ,
|
|
|
+ a.main ,a.commodity_price commodityPrice ,a.task_comment taskComment
|
|
|
+ from t_order_task a left join t_order_new b on a.order_no =b.order_no
|
|
|
+ left join t_order_mid c on a.order_no =c.order_no
|
|
|
+ left join business_project d on a.commodity_id =d.id
|
|
|
+ left join business_category e on d.cid =e.id
|
|
|
+ left join department f on b.order_dep =f.id
|
|
|
+ where check_status =1
|
|
|
+ <if test="name !=null">
|
|
|
+ and c.buyer_name like concat('%',#{name},'%')
|
|
|
+ </if>
|
|
|
+ <if test="orderNo !=null">
|
|
|
+ and a.order_no = #{orderNo}
|
|
|
+ </if>
|
|
|
+ <if test="contractNo !=null">
|
|
|
+ and b.contract_no = #{contractNo}
|
|
|
+ </if>
|
|
|
+ <if test="pname !=null">
|
|
|
+ and a.commodity_name like concat('%',#{pname},'%')
|
|
|
+ </if>
|
|
|
+ <if test="depId !=null">
|
|
|
+ and b.order_dep = #{depId}
|
|
|
+ </if>
|
|
|
+ <if test="page_sql!=null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="countProjectCheck" resultType="java.lang.Integer">
|
|
|
+ select count(*)
|
|
|
+ from t_order_task a left join t_order_new b on a.order_no =b.order_no
|
|
|
+ left join t_order_mid c on a.order_no =c.order_no
|
|
|
+ left join business_project d on a.commodity_id =d.id
|
|
|
+ left join business_category e on d.cid =e.id
|
|
|
+ left join department f on b.order_dep =f.id
|
|
|
+ where check_status =1
|
|
|
+ <if test="name !=null">
|
|
|
+ and c.buyer_name like concat('%',#{name},'%')
|
|
|
+ </if>
|
|
|
+ <if test="orderNo !=null">
|
|
|
+ and a.order_no = #{orderNo}
|
|
|
+ </if>
|
|
|
+ <if test="contractNo !=null">
|
|
|
+ and b.contract_no = #{contractNo}
|
|
|
+ </if>
|
|
|
+ <if test="pname !=null">
|
|
|
+ and a.commodity_name like concat('%',#{pname},'%')
|
|
|
+ </if>
|
|
|
+ <if test="depId !=null">
|
|
|
+ and b.order_dep = #{depId}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
</mapper>
|