|
|
@@ -90,7 +90,7 @@
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</delete>
|
|
|
|
|
|
- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderTask" useGeneratedKeys="true">
|
|
|
+ <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderTask" useGeneratedKeys="true">
|
|
|
insert into t_order_task (id, order_no, main,
|
|
|
super_id, commodity_id, commodity_name,
|
|
|
commodity_quantity, commodity_mode, commodity_price,
|
|
|
@@ -789,11 +789,11 @@
|
|
|
c.sort cSort,a.commodity_name as commodityName,a.commodity_quantity as commodityQuantity,b.patent_transfer patentTransfer ,
|
|
|
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,j.contract_term contractTerm,
|
|
|
- a.task_comment as taskComment ,a.commodity_price as commodityPrice, a.task_status as taskStatus,
|
|
|
+ a.task_comment as taskComment ,a.commodity_price as commodityPrice, a.task_status as taskStatus,ttm.stop_type stopType,ttm.stop_status stopStatus,
|
|
|
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.patent_type patentType,a.picture_url pictureUrl,j.service_life serviceLife ,j.service_year serviceYear,j.year_sum yearSum,
|
|
|
- ttm.last_year lastYear,ttm.last_year_capital lastYearCapital,ttm.last_year_income lastYearIncome
|
|
|
+ ttm.last_year lastYear,ttm.last_year_capital lastYearCapital,ttm.last_year_income lastYearIncome,ttm.stop_status projectStopStatus
|
|
|
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
|
|
|
@@ -994,7 +994,7 @@
|
|
|
a.certificate_number as certificateNumber, a.status,a.form_retrieve as formRetrieve, a.task_refund as taskRefund,a.task_receiver taskReceiver,b.patent_transfer patentTransfer,
|
|
|
a.refund_content as refundContent, a.declare_user as declareUser, a.declare_pwd as declarePwd,e.contract_no as contractNo,e.contacts ,b.`type` bpType,
|
|
|
date_format(a.task_end_time,'%Y-%m-%d') as endDate,date_format(a.accept_time,'%Y-%m-%d') as acceptDate,h.name as depName,e.contact_mobile as contactMobile ,
|
|
|
- date_format(a.review_time,'%Y-%m-%d') as reviewDate,date_format(a.publicity_time,'%Y-%m-%d') as publicityDate,a.outsource_price outsourcePrice,
|
|
|
+ date_format(a.review_time,'%Y-%m-%d') as reviewDate,date_format(a.publicity_time,'%Y-%m-%d') as publicityDate,a.outsource_price outsourcePrice,e.delete_sign deleteSign,
|
|
|
date_format(a.licence_time,'%Y-%m-%d') as licenceDate,date_format(a.task_distribution_time,'%Y-%m-%d %H:%i:%S') as taskDate,e.legal_person as legalPerson,
|
|
|
e.legal_person_tel as legalPersonTel, a.split_status splitStatus, a.split_super splitSuper, a.split_id splitId,a.declaration_batch declarationBatch,a.patent_type patentType,
|
|
|
a.if_certification_fee ifCertificationFee , a.certification_corporate certificationCorporate ,a.certification_fee certificationFee ,a.time_record timeRecord,
|
|
|
@@ -1342,6 +1342,9 @@
|
|
|
<if test="projectStatus !=null">
|
|
|
and bp.cid= #{projectStatus}
|
|
|
</if>
|
|
|
+ <if test="taskProjectStatus !=null">
|
|
|
+ and a.project_status= #{taskProjectStatus}
|
|
|
+ </if>
|
|
|
<if test="projectType !=null">
|
|
|
and bp.type= #{projectType}
|
|
|
</if>
|
|
|
@@ -1456,6 +1459,9 @@
|
|
|
<if test="projectStatus !=null">
|
|
|
and bp.cid= #{projectStatus}
|
|
|
</if>
|
|
|
+ <if test="taskProjectStatus !=null">
|
|
|
+ and a.project_status= #{taskProjectStatus}
|
|
|
+ </if>
|
|
|
<if test="projectType !=null">
|
|
|
and bp.type= #{projectType}
|
|
|
</if>
|
|
|
@@ -1753,11 +1759,12 @@
|
|
|
set cost_amount =cost_amount + #{cost}
|
|
|
where tid= #{tid}
|
|
|
</update>
|
|
|
+
|
|
|
<select id="selectAidByParam" resultType="com.goafanti.common.bo.OrderOperator">
|
|
|
select a.id tid,b.order_no orderNo ,b.salesman_id salesmanId,b.finance_id financeId ,a.task_receiver techId,
|
|
|
b.salesman_name salesmanName ,b.finance_name financeName ,d.name techName,b.buyer_name buyerName
|
|
|
from t_order_task a left join t_order_mid b on a.order_no=b.order_no
|
|
|
- left join t_task_mid c on a.id =c.tid left join admin d on a.task_receiver=d.id
|
|
|
+ left join admin d on a.task_receiver=d.id
|
|
|
where 1=1
|
|
|
<if test="tid !=null">
|
|
|
and a.id= #{tid}
|
|
|
@@ -1968,6 +1975,322 @@
|
|
|
where split_super = #{tid}
|
|
|
</select>
|
|
|
|
|
|
+ <select id="selectProjectSotpList" resultType="com.goafanti.order.bo.OutselectProjectSotp">
|
|
|
+ select DATE_FORMAT(a.create_time,'%Y-%m-%d %H:%i:%S') createTimes,dg.name province,c.contract_no contractNo, a.type stopType,a.status stopStatus,
|
|
|
+ c.order_no orderNo ,tom.buyer_name userName,b.cname ,b.commodity_name projectName,b.commodity_quantity commodityQuantity ,a.annex_url annexUrl,
|
|
|
+ tom.service_type serviceType , b.receiver_name receiverName ,b.status ,b.commodity_price commodityPrice ,a.reason,a.id,b.id tid,
|
|
|
+ ttm.stop_status projectStopStatus, ttm.stop_type projectStopType
|
|
|
+ from task_stop a left join t_order_task b on a.tid=b.id
|
|
|
+ left join t_order_new c on b.order_no =c.order_no
|
|
|
+ left join t_task_mid ttm on b.id=ttm.tid
|
|
|
+ left join t_order_mid tom on c.order_no =tom.order_no
|
|
|
+ left join department d on c.order_dep =d.id
|
|
|
+ left join district_glossory dg on d.province =dg.id
|
|
|
+ where 1=1
|
|
|
+ <if test="shiro ==1">
|
|
|
+ and c.salesman_id =#{aid}
|
|
|
+ </if>
|
|
|
+ <if test="shiro ==2">
|
|
|
+ and c.order_dep in
|
|
|
+ <foreach close=")" collection="deps" item="dep" open="(" separator=",">
|
|
|
+ #{dep}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="orderNo !=null">
|
|
|
+ and b.order_no = #{orderNo}
|
|
|
+ </if>
|
|
|
+ <if test="userName !=null">
|
|
|
+ and tom.buyer_name like CONCAT('%',#{userName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="depId !=null">
|
|
|
+ and c.order_dep = #{depId}
|
|
|
+ </if>
|
|
|
+ <if test="contractNo !=null">
|
|
|
+ and c.contract_no like CONCAT('%',#{contractNo},'%')
|
|
|
+ </if>
|
|
|
+ <if test="projectName !=null">
|
|
|
+ and b.commodity_name like CONCAT('%',#{projectName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="status !=null">
|
|
|
+ <if test="status==0">
|
|
|
+ and a.`type` =0 and a.status =0
|
|
|
+ </if>
|
|
|
+ <if test="status==1">
|
|
|
+ and a.`type` =1 and a.status =0
|
|
|
+ </if>
|
|
|
+ <if test="status==2">
|
|
|
+ and a.`type` =0 and a.status =1
|
|
|
+ </if>
|
|
|
+ <if test="status==3">
|
|
|
+ and a.`type` =1 and a.status =1
|
|
|
+ </if>
|
|
|
+ <if test="status==4">
|
|
|
+ and a.`type` =0 and a.status =2
|
|
|
+ </if>
|
|
|
+ <if test="status==5">
|
|
|
+ and a.`type` =1 and a.status =2
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="receiverId !=null">
|
|
|
+ and b.task_receiver = #{receiverId}
|
|
|
+ </if>
|
|
|
+ <if test="startTime !=null and endTime !=null">
|
|
|
+ and a.create_time BETWEEN #{startTime} and #{endTime}
|
|
|
+ </if>
|
|
|
+ order by a.create_time desc
|
|
|
+ <if test="page_sql!=null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectProjectSotpCount" resultType="java.lang.Integer">
|
|
|
+ select count(*)
|
|
|
+ from task_stop a left join t_order_task b on a.tid=b.id
|
|
|
+ left join t_order_new c on b.order_no =c.order_no
|
|
|
+ left join t_order_mid tom on c.order_no =tom.order_no
|
|
|
+ where 1=1
|
|
|
+ <if test="shiro ==1">
|
|
|
+ and c.salesman_id =#{aid}
|
|
|
+ </if>
|
|
|
+ <if test="shiro ==2">
|
|
|
+ and c.order_dep in
|
|
|
+ <foreach close=")" collection="deps" item="dep" open="(" separator=",">
|
|
|
+ #{dep}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="orderNo !=null">
|
|
|
+ and b.order_no = #{orderNo}
|
|
|
+ </if>
|
|
|
+ <if test="userName !=null">
|
|
|
+ and tom.buyer_name like CONCAT('%',#{userName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="depId !=null">
|
|
|
+ and c.order_dep = #{depId}
|
|
|
+ </if>
|
|
|
+ <if test="contractNo !=null">
|
|
|
+ and c.contract_no like CONCAT('%',#{contractNo},'%')
|
|
|
+ </if>
|
|
|
+ <if test="projectName !=null">
|
|
|
+ and b.commodity_name like CONCAT('%',#{projectName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="status !=null">
|
|
|
+ <if test="status==0">
|
|
|
+ and a.`type` =0 and a.status =0
|
|
|
+ </if>
|
|
|
+ <if test="status==1">
|
|
|
+ and a.`type` =1 and a.status =0
|
|
|
+ </if>
|
|
|
+ <if test="status==2">
|
|
|
+ and a.`type` =0 and a.status =1
|
|
|
+ </if>
|
|
|
+ <if test="status==3">
|
|
|
+ and a.`type` =1 and a.status =1
|
|
|
+ </if>
|
|
|
+ <if test="status==4">
|
|
|
+ and a.status=2
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="receiverId !=null">
|
|
|
+ and b.task_receiver = #{receiverId}
|
|
|
+ </if>
|
|
|
+ <if test="startTime !=null and endTime !=null">
|
|
|
+ and a.create_time BETWEEN #{startTime} and #{endTime}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <update id="updateBySuperId">
|
|
|
+ update t_order_task
|
|
|
+ <set>
|
|
|
+ <if test="orderNo != null">
|
|
|
+ order_no = #{orderNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="main != null">
|
|
|
+ main = #{main,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="superId != null">
|
|
|
+ super_id = #{superId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="commodityId != null">
|
|
|
+ commodity_id = #{commodityId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="commodityName != null">
|
|
|
+ commodity_name = #{commodityName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="commodityQuantity != null">
|
|
|
+ commodity_quantity = #{commodityQuantity,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="commodityMode != null">
|
|
|
+ commodity_mode = #{commodityMode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="commodityPrice != null">
|
|
|
+ commodity_price = #{commodityPrice,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="taskStatus != null">
|
|
|
+ task_status = #{taskStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="taskDistributionTime != null">
|
|
|
+ task_distribution_time = #{taskDistributionTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="taskAllocator != null">
|
|
|
+ task_allocator = #{taskAllocator,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="taskReceiver != null">
|
|
|
+ task_receiver = #{taskReceiver,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="taskComment != null">
|
|
|
+ task_comment = #{taskComment,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="taskStartTime != null">
|
|
|
+ task_start_time = #{taskStartTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="taskEndTime != null">
|
|
|
+ task_end_time = #{taskEndTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="attachmentUrl != null">
|
|
|
+ attachment_url = #{attachmentUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="projectStatus != null">
|
|
|
+ project_status = #{projectStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="acceptTime != null">
|
|
|
+ accept_time = #{acceptTime,jdbcType=DATE},
|
|
|
+ </if>
|
|
|
+ <if test="reviewTime != null">
|
|
|
+ review_time = #{reviewTime,jdbcType=DATE},
|
|
|
+ </if>
|
|
|
+ <if test="publicityTime != null">
|
|
|
+ publicity_time = #{publicityTime,jdbcType=DATE},
|
|
|
+ </if>
|
|
|
+ <if test="licenceTime != null">
|
|
|
+ licence_time = #{licenceTime,jdbcType=DATE},
|
|
|
+ </if>
|
|
|
+ <if test="certificateNumber != null">
|
|
|
+ certificate_number = #{certificateNumber,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ `status` = #{status,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="formRetrieve != null">
|
|
|
+ form_retrieve = #{formRetrieve,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="taskRefund != null">
|
|
|
+ task_refund = #{taskRefund,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="refundContent != null">
|
|
|
+ refund_content = #{refundContent,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="retrieveContent != null">
|
|
|
+ retrieve_content = #{retrieveContent,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="declareUser != null">
|
|
|
+ declare_user = #{declareUser,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="declarePwd != null">
|
|
|
+ declare_pwd = #{declarePwd,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="setUpAmount != null">
|
|
|
+ set_up_amount = #{setUpAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="arrivalMoney != null">
|
|
|
+ arrival_money = #{arrivalMoney,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="outsourceName != null">
|
|
|
+ outsource_name = #{outsourceName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="outsourcePrice != null">
|
|
|
+ outsource_price = #{outsourcePrice,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="consultantId != null">
|
|
|
+ consultant_id = #{consultantId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="managerId != null">
|
|
|
+ manager_id = #{managerId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="outsource != null">
|
|
|
+ outsource = #{outsource,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="splitStatus != null">
|
|
|
+ split_status = #{splitStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="splitId != null">
|
|
|
+ split_id = #{splitId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="splitAid != null">
|
|
|
+ split_aid = #{splitAid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="splitTime != null">
|
|
|
+ split_time = #{splitTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="cname != null">
|
|
|
+ cname = #{cname,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="receiverName != null">
|
|
|
+ receiver_name = #{receiverName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="declarationBatch != null">
|
|
|
+ declaration_batch = #{declarationBatch,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="costReduction != null">
|
|
|
+ cost_reduction = #{costReduction,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="officialCost != null">
|
|
|
+ official_cost = #{officialCost,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="setUpStatus != null">
|
|
|
+ set_up_status = #{setUpStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="setUpTime != null">
|
|
|
+ set_up_time = #{setUpTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="spotCheckStatus != null">
|
|
|
+ spot_check_status = #{spotCheckStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="highTechStatus != null">
|
|
|
+ high_tech_status = #{highTechStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="specialComment != null">
|
|
|
+ special_comment = #{specialComment,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ifCertificationFee != null">
|
|
|
+ if_certification_fee = #{ifCertificationFee,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="certificationFee != null">
|
|
|
+ certification_fee = #{certificationFee,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="certificationCorporate != null">
|
|
|
+ certification_corporate = #{certificationCorporate,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="timeRecord != null">
|
|
|
+ time_record = #{timeRecord,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ifPublicity != null">
|
|
|
+ if_publicity = #{ifPublicity,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="checkStatus != null">
|
|
|
+ check_status = #{checkStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="patentType != null">
|
|
|
+ patent_type = #{patentType,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="pubicityUrl != null">
|
|
|
+ pubicity_url = #{pubicityUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="processStatus != null">
|
|
|
+ process_status = #{processStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="memberType != null">
|
|
|
+ member_type = #{memberType,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="pictureUrl != null">
|
|
|
+ picture_url = #{pictureUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where split_super = #{splitSuper,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
|
|
|
+ <delete id="deleteBySplitId" parameterType="java.lang.Integer">
|
|
|
+ delete from t_order_task
|
|
|
+ where split_super = #{id,jdbcType=INTEGER}
|
|
|
+ </delete>
|
|
|
|
|
|
</mapper>
|