| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.goafanti.common.dao.TOrderTaskMapper">
- <resultMap id="BaseResultMap" type="com.goafanti.common.model.TOrderTask">
- <id column="id" jdbcType="INTEGER" property="id" />
- <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
- <result column="main" jdbcType="INTEGER" property="main" />
- <result column="super_id" jdbcType="VARCHAR" property="superId" />
- <result column="commodity_id" jdbcType="VARCHAR" property="commodityId" />
- <result column="commodity_name" jdbcType="VARCHAR" property="commodityName" />
- <result column="commodity_quantity" jdbcType="INTEGER" property="commodityQuantity" />
- <result column="commodity_mode" jdbcType="VARCHAR" property="commodityMode" />
- <result column="commodity_price" jdbcType="DECIMAL" property="commodityPrice" />
- <result column="task_status" jdbcType="INTEGER" property="taskStatus" />
- <result column="task_distribution_time" jdbcType="TIMESTAMP" property="taskDistributionTime" />
- <result column="task_allocator" jdbcType="VARCHAR" property="taskAllocator" />
- <result column="task_receiver" jdbcType="VARCHAR" property="taskReceiver" />
- <result column="task_comment" jdbcType="VARCHAR" property="taskComment" />
- <result column="task_start_time" jdbcType="TIMESTAMP" property="taskStartTime" />
- <result column="task_end_time" jdbcType="TIMESTAMP" property="taskEndTime" />
- <result column="attachment_url" jdbcType="VARCHAR" property="attachmentUrl" />
- <result column="project_status" jdbcType="INTEGER" property="projectStatus" />
- <result column="accept_time" jdbcType="DATE" property="acceptTime" />
- <result column="review_time" jdbcType="DATE" property="reviewTime" />
- <result column="publicity_time" jdbcType="DATE" property="publicityTime" />
- <result column="licence_time" jdbcType="DATE" property="licenceTime" />
- <result column="certificate_number" jdbcType="VARCHAR" property="certificateNumber" />
- <result column="status" jdbcType="INTEGER" property="status" />
- <result column="form_retrieve" jdbcType="INTEGER" property="formRetrieve" />
- <result column="task_refund" jdbcType="INTEGER" property="taskRefund" />
- <result column="refund_content" jdbcType="VARCHAR" property="refundContent" />
- <result column="retrieve_content" jdbcType="VARCHAR" property="retrieveContent" />
- <result column="declare_user" jdbcType="VARCHAR" property="declareUser" />
- <result column="declare_pwd" jdbcType="VARCHAR" property="declarePwd" />
- <result column="set_up_amount" jdbcType="DECIMAL" property="setUpAmount" />
- <result column="arrival_money" jdbcType="INTEGER" property="arrivalMoney" />
- <result column="outsource_name" jdbcType="VARCHAR" property="outsourceName" />
- <result column="outsource_price" jdbcType="DECIMAL" property="outsourcePrice" />
- <result column="consultant_id" jdbcType="VARCHAR" property="consultantId" />
- <result column="manager_id" jdbcType="VARCHAR" property="managerId" />
- <result column="outsource" jdbcType="INTEGER" property="outsource" />
- <result column="split_super" jdbcType="INTEGER" property="splitSuper" />
- <result column="split_status" jdbcType="INTEGER" property="splitStatus" />
- <result column="split_id" jdbcType="INTEGER" property="splitId" />
- <result column="split_aid" jdbcType="VARCHAR" property="splitAid" />
- <result column="split_time" jdbcType="TIMESTAMP" property="splitTime" />
- <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="cost_reduction" jdbcType="INTEGER" property="costReduction" />
- <result column="official_cost" jdbcType="INTEGER" property="officialCost" />
- <result column="set_up_status" jdbcType="INTEGER" property="setUpStatus" />
- <result column="set_up_time" jdbcType="TIMESTAMP" property="setUpTime" />
- <result column="spot_check_status" jdbcType="INTEGER" property="spotCheckStatus" />
- <result column="high_tech_status" jdbcType="INTEGER" property="highTechStatus" />
- <result column="special_comment" jdbcType="VARCHAR" property="specialComment" />
- <result column="if_certification_fee" jdbcType="INTEGER" property="ifCertificationFee" />
- <result column="certification_fee" jdbcType="DECIMAL" property="certificationFee" />
- <result column="certification_corporate" jdbcType="VARCHAR" property="certificationCorporate" />
- <result column="time_record" jdbcType="VARCHAR" property="timeRecord" />
- <result column="if_publicity" jdbcType="INTEGER" property="ifPublicity" />
- <result column="check_status" jdbcType="INTEGER" property="checkStatus" />
- <result column="patent_type" jdbcType="INTEGER" property="patentType" />
- <result column="pubicity_url" jdbcType="VARCHAR" property="pubicityUrl" />
- <result column="process_status" jdbcType="INTEGER" property="processStatus" />
- <result column="member_type" jdbcType="INTEGER" property="memberType" />
- <result column="picture_url" jdbcType="VARCHAR" property="pictureUrl" />
- <result column="satisfaction_degree" jdbcType="INTEGER" property="satisfactionDegree" />
- <result column="satisfaction_degree_url" jdbcType="VARCHAR" property="satisfactionDegreeUrl" />
- </resultMap>
- <sql id="Base_Column_List">
- 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,
- task_comment, task_start_time, task_end_time, attachment_url, project_status, accept_time,
- review_time, 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, 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,
- time_record, if_publicity, check_status, patent_type, pubicity_url, process_status,
- member_type, picture_url, satisfaction_degree, satisfaction_degree_url
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from t_order_task
- where id = #{id,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
- delete from t_order_task
- where id = #{id,jdbcType=INTEGER}
- </delete>
- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderTask" useGeneratedKeys="true">
- insert into t_order_task (order_no, main, super_id,
- commodity_id, commodity_name, commodity_quantity,
- commodity_mode, commodity_price, task_status,
- task_distribution_time, task_allocator,
- task_receiver, task_comment, task_start_time,
- task_end_time, attachment_url, project_status,
- accept_time, review_time, 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,
- 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, time_record, if_publicity,
- check_status, patent_type, pubicity_url,
- process_status, member_type, picture_url,
- satisfaction_degree, satisfaction_degree_url
- )
- values (#{orderNo,jdbcType=VARCHAR}, #{main,jdbcType=INTEGER}, #{superId,jdbcType=VARCHAR},
- #{commodityId,jdbcType=VARCHAR}, #{commodityName,jdbcType=VARCHAR}, #{commodityQuantity,jdbcType=INTEGER},
- #{commodityMode,jdbcType=VARCHAR}, #{commodityPrice,jdbcType=DECIMAL}, #{taskStatus,jdbcType=INTEGER},
- #{taskDistributionTime,jdbcType=TIMESTAMP}, #{taskAllocator,jdbcType=VARCHAR},
- #{taskReceiver,jdbcType=VARCHAR}, #{taskComment,jdbcType=VARCHAR}, #{taskStartTime,jdbcType=TIMESTAMP},
- #{taskEndTime,jdbcType=TIMESTAMP}, #{attachmentUrl,jdbcType=VARCHAR}, #{projectStatus,jdbcType=INTEGER},
- #{acceptTime,jdbcType=DATE}, #{reviewTime,jdbcType=DATE}, #{publicityTime,jdbcType=DATE},
- #{licenceTime,jdbcType=DATE}, #{certificateNumber,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
- #{formRetrieve,jdbcType=INTEGER}, #{taskRefund,jdbcType=INTEGER}, #{refundContent,jdbcType=VARCHAR},
- #{retrieveContent,jdbcType=VARCHAR}, #{declareUser,jdbcType=VARCHAR}, #{declarePwd,jdbcType=VARCHAR},
- #{setUpAmount,jdbcType=DECIMAL}, #{arrivalMoney,jdbcType=INTEGER}, #{outsourceName,jdbcType=VARCHAR},
- #{outsourcePrice,jdbcType=DECIMAL}, #{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},
- #{costReduction,jdbcType=INTEGER}, #{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}, #{timeRecord,jdbcType=VARCHAR}, #{ifPublicity,jdbcType=INTEGER},
- #{checkStatus,jdbcType=INTEGER}, #{patentType,jdbcType=INTEGER}, #{pubicityUrl,jdbcType=VARCHAR},
- #{processStatus,jdbcType=INTEGER}, #{memberType,jdbcType=INTEGER}, #{pictureUrl,jdbcType=VARCHAR},
- #{satisfactionDegree,jdbcType=INTEGER}, #{satisfactionDegreeUrl,jdbcType=VARCHAR}
- )
- </insert>
- <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="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="attachmentUrl != null">
- attachment_url,
- </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="splitSuper != null">
- split_super,
- </if>
- <if test="splitStatus != null">
- split_status,
- </if>
- <if test="splitId != null">
- split_id,
- </if>
- <if test="splitAid != null">
- split_aid,
- </if>
- <if test="splitTime != null">
- split_time,
- </if>
- <if test="cname != null">
- cname,
- </if>
- <if test="receiverName != null">
- receiver_name,
- </if>
- <if test="declarationBatch != null">
- declaration_batch,
- </if>
- <if test="costReduction != null">
- cost_reduction,
- </if>
- <if test="officialCost != null">
- official_cost,
- </if>
- <if test="setUpStatus != null">
- set_up_status,
- </if>
- <if test="setUpTime != null">
- set_up_time,
- </if>
- <if test="spotCheckStatus != null">
- spot_check_status,
- </if>
- <if test="highTechStatus != null">
- high_tech_status,
- </if>
- <if test="specialComment != null">
- special_comment,
- </if>
- <if test="ifCertificationFee != null">
- if_certification_fee,
- </if>
- <if test="certificationFee != null">
- certification_fee,
- </if>
- <if test="certificationCorporate != null">
- certification_corporate,
- </if>
- <if test="timeRecord != null">
- time_record,
- </if>
- <if test="ifPublicity != null">
- if_publicity,
- </if>
- <if test="checkStatus != null">
- check_status,
- </if>
- <if test="patentType != null">
- patent_type,
- </if>
- <if test="pubicityUrl != null">
- pubicity_url,
- </if>
- <if test="processStatus != null">
- process_status,
- </if>
- <if test="memberType != null">
- member_type,
- </if>
- <if test="pictureUrl != null">
- picture_url,
- </if>
- <if test="satisfactionDegree != null">
- satisfaction_degree,
- </if>
- <if test="satisfactionDegreeUrl != null">
- satisfaction_degree_url,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <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="attachmentUrl != null">
- #{attachmentUrl,jdbcType=VARCHAR},
- </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="splitSuper != null">
- #{splitSuper,jdbcType=INTEGER},
- </if>
- <if test="splitStatus != null">
- #{splitStatus,jdbcType=INTEGER},
- </if>
- <if test="splitId != null">
- #{splitId,jdbcType=INTEGER},
- </if>
- <if test="splitAid != null">
- #{splitAid,jdbcType=VARCHAR},
- </if>
- <if test="splitTime != null">
- #{splitTime,jdbcType=TIMESTAMP},
- </if>
- <if test="cname != null">
- #{cname,jdbcType=VARCHAR},
- </if>
- <if test="receiverName != null">
- #{receiverName,jdbcType=VARCHAR},
- </if>
- <if test="declarationBatch != null">
- #{declarationBatch,jdbcType=INTEGER},
- </if>
- <if test="costReduction != null">
- #{costReduction,jdbcType=INTEGER},
- </if>
- <if test="officialCost != null">
- #{officialCost,jdbcType=INTEGER},
- </if>
- <if test="setUpStatus != null">
- #{setUpStatus,jdbcType=INTEGER},
- </if>
- <if test="setUpTime != null">
- #{setUpTime,jdbcType=TIMESTAMP},
- </if>
- <if test="spotCheckStatus != null">
- #{spotCheckStatus,jdbcType=INTEGER},
- </if>
- <if test="highTechStatus != null">
- #{highTechStatus,jdbcType=INTEGER},
- </if>
- <if test="specialComment != null">
- #{specialComment,jdbcType=VARCHAR},
- </if>
- <if test="ifCertificationFee != null">
- #{ifCertificationFee,jdbcType=INTEGER},
- </if>
- <if test="certificationFee != null">
- #{certificationFee,jdbcType=DECIMAL},
- </if>
- <if test="certificationCorporate != null">
- #{certificationCorporate,jdbcType=VARCHAR},
- </if>
- <if test="timeRecord != null">
- #{timeRecord,jdbcType=VARCHAR},
- </if>
- <if test="ifPublicity != null">
- #{ifPublicity,jdbcType=INTEGER},
- </if>
- <if test="checkStatus != null">
- #{checkStatus,jdbcType=INTEGER},
- </if>
- <if test="patentType != null">
- #{patentType,jdbcType=INTEGER},
- </if>
- <if test="pubicityUrl != null">
- #{pubicityUrl,jdbcType=VARCHAR},
- </if>
- <if test="processStatus != null">
- #{processStatus,jdbcType=INTEGER},
- </if>
- <if test="memberType != null">
- #{memberType,jdbcType=INTEGER},
- </if>
- <if test="pictureUrl != null">
- #{pictureUrl,jdbcType=VARCHAR},
- </if>
- <if test="satisfactionDegree != null">
- #{satisfactionDegree,jdbcType=INTEGER},
- </if>
- <if test="satisfactionDegreeUrl != null">
- #{satisfactionDegreeUrl,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderTask">
- 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="splitSuper != null">
- split_super = #{splitSuper,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>
- <if test="satisfactionDegree != null">
- satisfaction_degree = #{satisfactionDegree,jdbcType=INTEGER},
- </if>
- <if test="satisfactionDegreeUrl != null">
- satisfaction_degree_url = #{satisfactionDegreeUrl,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TOrderTask">
- update t_order_task
- set order_no = #{orderNo,jdbcType=VARCHAR},
- main = #{main,jdbcType=INTEGER},
- super_id = #{superId,jdbcType=VARCHAR},
- commodity_id = #{commodityId,jdbcType=VARCHAR},
- commodity_name = #{commodityName,jdbcType=VARCHAR},
- commodity_quantity = #{commodityQuantity,jdbcType=INTEGER},
- commodity_mode = #{commodityMode,jdbcType=VARCHAR},
- commodity_price = #{commodityPrice,jdbcType=DECIMAL},
- task_status = #{taskStatus,jdbcType=INTEGER},
- task_distribution_time = #{taskDistributionTime,jdbcType=TIMESTAMP},
- task_allocator = #{taskAllocator,jdbcType=VARCHAR},
- task_receiver = #{taskReceiver,jdbcType=VARCHAR},
- task_comment = #{taskComment,jdbcType=VARCHAR},
- task_start_time = #{taskStartTime,jdbcType=TIMESTAMP},
- task_end_time = #{taskEndTime,jdbcType=TIMESTAMP},
- attachment_url = #{attachmentUrl,jdbcType=VARCHAR},
- project_status = #{projectStatus,jdbcType=INTEGER},
- accept_time = #{acceptTime,jdbcType=DATE},
- review_time = #{reviewTime,jdbcType=DATE},
- publicity_time = #{publicityTime,jdbcType=DATE},
- licence_time = #{licenceTime,jdbcType=DATE},
- certificate_number = #{certificateNumber,jdbcType=VARCHAR},
- `status` = #{status,jdbcType=INTEGER},
- form_retrieve = #{formRetrieve,jdbcType=INTEGER},
- task_refund = #{taskRefund,jdbcType=INTEGER},
- refund_content = #{refundContent,jdbcType=VARCHAR},
- retrieve_content = #{retrieveContent,jdbcType=VARCHAR},
- declare_user = #{declareUser,jdbcType=VARCHAR},
- declare_pwd = #{declarePwd,jdbcType=VARCHAR},
- set_up_amount = #{setUpAmount,jdbcType=DECIMAL},
- arrival_money = #{arrivalMoney,jdbcType=INTEGER},
- outsource_name = #{outsourceName,jdbcType=VARCHAR},
- outsource_price = #{outsourcePrice,jdbcType=DECIMAL},
- consultant_id = #{consultantId,jdbcType=VARCHAR},
- manager_id = #{managerId,jdbcType=VARCHAR},
- outsource = #{outsource,jdbcType=INTEGER},
- split_super = #{splitSuper,jdbcType=INTEGER},
- split_status = #{splitStatus,jdbcType=INTEGER},
- split_id = #{splitId,jdbcType=INTEGER},
- split_aid = #{splitAid,jdbcType=VARCHAR},
- split_time = #{splitTime,jdbcType=TIMESTAMP},
- cname = #{cname,jdbcType=VARCHAR},
- receiver_name = #{receiverName,jdbcType=VARCHAR},
- declaration_batch = #{declarationBatch,jdbcType=INTEGER},
- cost_reduction = #{costReduction,jdbcType=INTEGER},
- official_cost = #{officialCost,jdbcType=INTEGER},
- set_up_status = #{setUpStatus,jdbcType=INTEGER},
- set_up_time = #{setUpTime,jdbcType=TIMESTAMP},
- spot_check_status = #{spotCheckStatus,jdbcType=INTEGER},
- high_tech_status = #{highTechStatus,jdbcType=INTEGER},
- special_comment = #{specialComment,jdbcType=VARCHAR},
- if_certification_fee = #{ifCertificationFee,jdbcType=INTEGER},
- certification_fee = #{certificationFee,jdbcType=DECIMAL},
- certification_corporate = #{certificationCorporate,jdbcType=VARCHAR},
- time_record = #{timeRecord,jdbcType=VARCHAR},
- if_publicity = #{ifPublicity,jdbcType=INTEGER},
- check_status = #{checkStatus,jdbcType=INTEGER},
- patent_type = #{patentType,jdbcType=INTEGER},
- pubicity_url = #{pubicityUrl,jdbcType=VARCHAR},
- process_status = #{processStatus,jdbcType=INTEGER},
- member_type = #{memberType,jdbcType=INTEGER},
- picture_url = #{pictureUrl,jdbcType=VARCHAR},
- satisfaction_degree = #{satisfactionDegree,jdbcType=INTEGER},
- satisfaction_degree_url = #{satisfactionDegreeUrl,jdbcType=VARCHAR}
- where id = #{id,jdbcType=INTEGER}
- </update>
- <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>
- <if test="satisfactionDegree != null">
- satisfaction_degree = #{satisfactionDegree,jdbcType=INTEGER},
- </if>
- <if test="satisfactionDegreeUrl != null">
- satisfaction_degree_url = #{satisfactionDegreeUrl,jdbcType=VARCHAR},
- </if>
- </set>
- where split_super = #{splitSuper,jdbcType=INTEGER}
- </update>
- <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,
- 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,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.change,
- 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
- left join admin d on a.task_receiver=d.id left join t_task_member j on a.id =j.tid
- left join t_task_mid ttm on a.id=ttm.tid
- where a.super_id is null and a.split_status in(0,1)
- <if test="orderNo != null">
- and a.order_no= #{orderNo,jdbcType=VARCHAR}
- </if>
- <if test="type == 1">
- and a.process_status in(0,3)
- </if>
- order by a.id
- </select>
- <select id="selectOrderTaskAll" 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,
- c.sort cSort,a.commodity_name as commodityName,a.commodity_quantity as commodityQuantity,i.price,a.certificate_number as certificateNumber,a.receiver_name receiverName,
- 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.split_super splitSuper,a.split_aid splitAid,a.split_time splitTime,a.patent_type patentType,ttm.contract_term contractTerm,
- a.picture_url pictureUrl, ttm.service_life serviceLife ,ttm.service_year serviceYear,ttm.year_sum yearSum,
- tm.last_year lastYear,tm.last_year_capital lastYearCapital,tm.last_year_income lastYearIncome
- from t_order_task a 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 i.cid=c.id left join admin d on a.task_receiver=d.id
- left join t_task_member ttm on a.id=ttm.tid left join t_task_mid tm on a.id=tm.tid
- where a.super_id is null and a.process_status in (0,3) and a.order_no= #{orderNo,jdbcType=VARCHAR}
- <if test="splitStatus !=null">
- <if test="splitStatus < 3">
- and a.split_status= #{splitStatus}
- </if>
- <if test="splitStatus ==3">
- and a.split_status in(0,1)
- </if>
- <if test="splitStatus ==4">
- and a.split_status in(0,2)
- </if>
- </if>
- order by a.id
- </select>
- <select id="selectOrderTaskListByPage" resultType="com.goafanti.order.bo.TOrderTaskListBo">
- select a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,a.receiver_name receiverName,a.project_status projectStatus,e.contract_no contractNo,
- a.task_receiver taskReceiver,a.task_status as taskStatus,date_format(a.task_distribution_time,'%Y-%m-%d %H:%i:%S') as taskDate, a.commodity_quantity as commodityQuantity,
- e.approval,l.refund_status outsourceStatus,l.start_type outsourceType,ttm.certificates_count 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,b.`type` projectType,ttm.cost_amount costAmount,tm.salesman_name salesmanName ,
- ttm.party_amount partyAmount,a.commodity_price commodityPrice,a.outsource,date_format(a.task_end_time,'%Y-%m-%d') taskEndTime,date_format(e.sign_time,'%Y-%m-%d') signTime,
- date_format(e.create_time ,'%Y-%m-%d')creteTime,a.patent_type patentType
- 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 t_order_mid tm on a.order_no =tm.order_no
- left join department h on e.order_dep=h.id left join task_hours_count k on a.id=k.tid and a.task_receiver=k.aid left join t_order_outsource l
- on a.id=l.tid left join t_task_mid ttm on a.id=ttm.tid where e.delete_sign in (0,2,3) and e.order_status in (2,4)
- and a.outsource= #{outsource,jdbcType=INTEGER}
- <if test="role == 0 ">
- and a.task_receiver= #{aid,jdbcType=VARCHAR}
- </if>
- <if test="role ==1 and fids != null and fids.size() > 0">
- and e.finance_id in
- <foreach close=")" collection="fids" index="" item="item" open="(" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="specially == 0 ">
- and a.split_status in (0,2)
- </if>
- <if test="orderNo != null">
- and a.order_no= #{orderNo,jdbcType=VARCHAR}
- </if>
- <if test="approval ==0">
- and e.approval = 0
- </if>
- <if test="approval ==1">
- and e.approval in(1,2)
- </if>
- <if test="approval ==2">
- and e.approval in (4,5)
- </if>
- <if test="cid != null">
- and c.id = #{cid}
- </if>
- <if test="outsourceStatus !=null">
- and l.refund_status = #{outsourceStatus,jdbcType=INTEGER}
- </if>
- <if test="contractNo != null">
- and e.contract_no like CONCAT('%',#{contractNo,jdbcType=VARCHAR},'%')
- </if>
- <if test="projectStatus != null">
- and a.project_status = #{projectStatus,jdbcType=INTEGER}
- </if>
- <if test="deps != null">
- and e.order_dep in
- <foreach close=")" collection="deps" item="depId" open="(" separator=",">
- #{depId}
- </foreach>
- </if>
- <if test="name != null">
- and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
- </if>
- <if test="taskId != null">
- and (a.id= #{taskId,jdbcType=VARCHAR} or a.split_super= #{taskId,jdbcType=VARCHAR})
- </if>
- <if test="taskStatus != null">
- and a.task_status= #{taskStatus,jdbcType=INTEGER}
- </if>
- <if test="adminName != null">
- and a.receiver_name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
- </if>
- <if test="startTime != null and endTime != null">
- and e.sign_time between #{startTime} and #{endTime}
- </if>
- order by a.task_distribution_time desc
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
- <select id="selectOrderTaskListCount" resultType="java.lang.Integer">
- select count(*) from t_order_task a
- left join t_order_new e on a.order_no=e.order_no
- <if test="cid != null">
- left join business_project b on a.commodity_id=b.id
- left join business_category c on b.cid=c.id
- </if>
- <if test="name != null">
- left join user f on e.buyer_id=f.id
- </if>
- <if test="outsourceStatus !=null">
- left join t_order_outsource l on a.id=l.tid
- </if>
- where e.delete_sign in (0,2,3) and e.order_status in (2,4)
- and a.outsource= #{outsource,jdbcType=INTEGER}
- <if test="role == 0 ">
- and a.task_receiver= #{aid,jdbcType=VARCHAR}
- </if>
- <if test="role ==1 and fids != null and fids.size() > 0">
- and e.finance_id in
- <foreach close=")" collection="fids" index="" item="item" open="(" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="specially == 0 ">
- and a.split_status in (0,2)
- </if>
- <if test="orderNo != null">
- and a.order_no= #{orderNo,jdbcType=VARCHAR}
- </if>
- <if test="approval ==0">
- and e.approval = 0
- </if>
- <if test="approval ==1">
- and e.approval in(1,2)
- </if>
- <if test="approval ==2">
- and e.approval in (4,5)
- </if>
- <if test="cid != null">
- and c.id = #{cid}
- </if>
- <if test="outsourceStatus !=null">
- and l.refund_status = #{outsourceStatus,jdbcType=INTEGER}
- </if>
- <if test="contractNo != null">
- and e.contract_no like CONCAT('%',#{contractNo,jdbcType=VARCHAR},'%')
- </if>
- <if test="projectStatus != null">
- and a.project_status = #{projectStatus,jdbcType=INTEGER}
- </if>
- <if test="deps != null">
- and e.order_dep in
- <foreach close=")" collection="deps" item="depId" open="(" separator=",">
- #{depId}
- </foreach>
- </if>
- <if test="name != null">
- and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
- </if>
- <if test="taskId != null">
- and (a.id= #{taskId,jdbcType=VARCHAR} or a.split_super= #{taskId,jdbcType=VARCHAR})
- </if>
- <if test="taskStatus != null">
- and a.task_status= #{taskStatus,jdbcType=INTEGER}
- </if>
- <if test="adminName != null">
- and a.receiver_name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
- </if>
- <if test="startTime != null and endTime != null">
- and e.sign_time between #{startTime} and #{endTime}
- </if>
- </select>
- <select id="getOrderTaskDetail" resultType="com.goafanti.order.bo.TOrderTaskDetailBo">
- 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,
- 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,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,
- 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.check_status checkStatus,
- ttm.authorize_count authorizeCount ,ttm.end_count endCount,ttm.accept_count acceptCount,a.commodity_price commodityPrice,a.commodity_quantity commodityQuantity,
- a.satisfaction_degree satisfactionDegree,a.satisfaction_degree_url satisfactionDegreeUrl
- 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
- left join department h on e.order_dep=h.id left join user f on e.buyer_id=f.id LEFT JOIN t_task_mid ttm ON a.id=ttm.tid
- left join admin g on e.salesman_id=g.id
- where a.id= #{id,jdbcType=VARCHAR}
- </select>
- <select id="selectBySuperId" resultType="com.goafanti.common.model.TOrderTask">
- select super_id as superId,min(task_status) as taskStatus,min(project_status) as projectStatus,max(main) as main from t_order_task
- where super_id = #{superId,jdbcType=VARCHAR} group by super_id
- </select>
- <select id="selectTaskHoursListByPage" resultType="com.goafanti.order.bo.TOrderTaskListBo">
- select a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,a.receiver_name as receiverName,dep.name as depName,a.project_status projectStatus,
- a.task_status as taskStatus,f.nickname as userName,ifnull(g.hours,0) as hours,a.commodity_quantity as commodityQuantity,a.commodity_price commodityPrice,
- e.contract_no as contractNo,date_format(e.create_time,'%Y-%m-%d %H:%i:%S')as creteTime,date_format(e.sign_time,'%Y-%m-%d')as signTime,a.outsource,
- date_format(a.task_distribution_time,'%Y-%m-%d %H:%i:%S')taskDate, date_format(a.task_end_time,'%Y-%m-%d')taskEndTime,tm.salesman_name salesmanName,
- a.split_status splitStatus, a.split_super splitSuper, a.split_id splitId,ifnull(ttm.cost_amount,0) costAmount,ifnull(ttm.party_amount,0) partyAmount
- 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 department dep on e.order_dep=dep.id
- left join user f on e.buyer_id=f.id left join (select tid,sum(hours)hours from task_hours_count group by tid) g on a.id=g.tid
- left join t_order_mid tm on a.order_no=tm.order_no left join t_task_mid ttm on a.id=ttm.tid
- where e.delete_sign =0 and a.super_id is null and a.split_status in(0,2)
- <if test="shiroType == 1 and aid !=null">
- and tm.finance_id= #{aid,jdbcType=VARCHAR}
- </if>
- <if test="shiroType == 2 and aid !=null">
- and tm.finance_id in (select id from admin where superior_id= #{aid,jdbcType=VARCHAR})
- </if>
- <if test="name != null">
- and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
- </if>
- <if test="thchId != null">
- and a.task_receiver = #{thchId,jdbcType=VARCHAR}
- </if>
- <if test="cid != null">
- and b.cid = #{cid,jdbcType=VARCHAR}
- </if>
- <if test="outsource != null">
- and a.outsource = #{outsource,jdbcType=INTEGER}
- </if>
- <if test="depId != null">
- and e.order_dep = #{depId,jdbcType=VARCHAR}
- </if>
- <if test="contractNo != null">
- and e.contract_no like CONCAT('%',#{contractNo,jdbcType=VARCHAR},'%')
- </if>
- <if test="orderNo != null">
- and e.order_no like CONCAT('%',#{orderNo,jdbcType=VARCHAR},'%')
- </if>
- <if test="taskId != null">
- and a.id= #{taskId,jdbcType=VARCHAR}
- </if>
- <if test="starTime !=null and endTime !=null">
- and e.sign_time between #{starTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
- </if>
- order by a.task_start_time desc,e.create_time desc
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
- <select id="selectTaskHoursListCount" resultType="java.lang.Integer">
- select count(*) 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 t_order_mid tm on a.order_no=tm.order_no
- where e.delete_sign =0 and a.super_id is null and a.split_status in(0,2)
- <if test="shiroType == 1 and aid !=null">
- and tm.finance_id= #{aid,jdbcType=VARCHAR}
- </if>
- <if test="shiroType == 2 and aid !=null">
- and tm.finance_id in (select id from admin where superior_id= #{aid,jdbcType=VARCHAR})
- </if>
- <if test="name != null">
- and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
- </if>
- <if test="thchId != null">
- and a.task_receiver = #{thchId,jdbcType=VARCHAR}
- </if>
- <if test="outsource != null">
- and a.outsource = #{outsource,jdbcType=INTEGER}
- </if>
- <if test="cid != null">
- and b.cid = #{cid,jdbcType=VARCHAR}
- </if>
- <if test="depId != null">
- and e.order_dep = #{depId,jdbcType=VARCHAR}
- </if>
- <if test="contractNo != null">
- and e.contract_no like CONCAT('%',#{contractNo,jdbcType=VARCHAR},'%')
- </if>
- <if test="orderNo != null">
- and e.order_no like CONCAT('%',#{orderNo,jdbcType=VARCHAR},'%')
- </if>
- <if test="taskId != null">
- and a.id= #{taskId,jdbcType=VARCHAR}
- </if>
- <if test="starTime !=null and endTime !=null">
- and e.sign_time between #{starTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
- </if>
- </select>
- <select id="selectTaskListByPage" resultType="com.goafanti.order.bo.TOrderTaskListBo">
- select a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,d.name as receiverName,
- a.project_status as projectStatus,a.task_status as taskStatus,date_format(a.task_distribution_time,'%Y-%m-%d') as taskDate,
- a.commodity_quantity as commodityQuantity,f.nickname as userName,h.name as depName,ifnull(i.alreadyNumber,0)as alreadyNumber,
- a.split_status splitStatus,a.split_super splitSuper, a.split_id splitId
- from (select task_id from t_task_log a where task_receiver=#{aid ,jdbcType=VARCHAR} UNION select task_id from t_task_log a
- where task_allocator=#{aid ,jdbcType=VARCHAR}) x left join t_order_task a on x.task_id=a.id
- 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
- 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 group by task_id) i on a.id=i.task_id
- where e.delete_sign in(0,2,3)
- <if test="orderNo != null">
- and a.order_no= #{orderNo,jdbcType=VARCHAR}
- </if>
- <if test="name != null">
- and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
- </if>
- <if test="orderNo != null">
- and a.order_no= #{orderNo,jdbcType=VARCHAR}
- </if>
- <if test="depId != null">
- and e.order_dep= #{depId ,jdbcType=VARCHAR}
- </if>
- <if test="thchId != null">
- and a.task_receiver = #{thchId,jdbcType=VARCHAR}
- </if>
- <if test="taskId != null">
- and (a.id= #{taskId,jdbcType=VARCHAR} or a.split_super= #{taskId,jdbcType=VARCHAR})
- </if>
- <if test="taskStatus != null">
- and a.task_status= #{taskStatus,jdbcType=INTEGER}
- </if>
- <if test="adminName != null">
- and d.name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
- </if>
- order by a.task_distribution_time desc
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
- <select id="selectTaskListCount" resultType="java.lang.Integer">
- select count(*)
- from (select task_id from t_task_log a where task_receiver=#{aid ,jdbcType=VARCHAR} UNION select task_id from t_task_log a
- where task_allocator=#{aid ,jdbcType=VARCHAR}) x left join t_order_task a on x.task_id=a.id
- 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
- 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 group by task_id) i on a.id=i.task_id
- where e.delete_sign in(0,2,3)
- <if test="orderNo != null">
- and a.order_no= #{orderNo,jdbcType=VARCHAR}
- </if>
- <if test="name != null">
- and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
- </if>
- <if test="depId != null">
- and e.order_dep= #{depId ,jdbcType=VARCHAR}
- </if>
- <if test="thchId != null">
- and a.task_receiver = #{thchId,jdbcType=VARCHAR}
- </if>
- <if test="orderNo != null">
- and a.order_no= #{orderNo,jdbcType=VARCHAR}
- </if>
- <if test="taskId != null">
- and (a.id= #{taskId,jdbcType=VARCHAR} or a.split_super= #{taskId,jdbcType=VARCHAR})
- </if>
- <if test="taskStatus != null">
- and a.task_status= #{taskStatus,jdbcType=INTEGER}
- </if>
- <if test="adminName != null">
- and d.name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
- </if>
- </select>
- <!-- 根据订单编号获得所有的任务负责人 -->
- <select id="getReceiverByOid" resultType="com.goafanti.order.bo.TOrderTaskBo">
- select distinct task_receiver, a.name, a.email, t.id, t.project_status from t_order_task t
- inner join admin a on t.task_receiver = a.id
- where order_no = #{orderNo,jdbcType=VARCHAR} and task_status > 0 and super_id is null
- </select>
- <update id="updateDimissionTransfer" parameterType="java.lang.String">
- update t_order_task a left join t_change_task b on a.id =b.tid
- left join (select * from admin where id= #{transferId,jdbcType=VARCHAR})c on 1=1
- set a.task_allocator= #{aid,jdbcType=VARCHAR},a.task_receiver= c.id,
- a.receiver_name=c.name,b.receiver_name=c.name
- <if test="type==0">
- ,a.consultant_id=c.id
- </if>
- <if test="type==1">
- ,a.manager_id=c.id
- </if>
- <if test="type==3">
- ,a.consultant_id= null
- ,a.manager_id=c.id
- </if>
- <if test="type==4">
- ,a.consultant_id=c.id
- ,a.manager_id= null
- </if>
- <if test="type==1">
- ,a.manager_id= null
- </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">
- consultant_id
- </if>
- <if test="type ==1">
- manager_id
- </if>
- from t_order_task
- where order_no= #{orderNo}
- group by
- <if test="type ==0">
- consultant_id
- </if>
- <if test="type ==1">
- manager_id
- </if>
- </select>
- <select id="splitProjectList" resultType="com.goafanti.order.bo.TOrderTaskListBo">
- select a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,d.name as receiverName,a.project_status as projectStatus,d.contact_mobile receiverMobile,
- 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,a.task_comment taskComment ,
- f.nickname as userName,h.name as depName, j.name as outsourceName ,ifnull(k.hours,0) hours,a.split_status splitStatus,a.split_super splitSuper,a.member_type memberType,
- date_format(a.split_time,'%Y-%m-%d %H:%i:%S') splitTimes,ad.name splitAname,a.split_id splitId,a.patent_type patentType,a.picture_url pictureUrl,
- ttm.service_life serviceLife,ttm.service_year serviceYear ,ttm.year_sum yearSum ,ttm.contract_term contractTerm,a.process_status processStatus
- 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 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 group by task_id) i on a.id=i.task_id left join (select order_no,max(name)as name
- from outsource_organization group by order_no) j on a.order_no=j.order_no left join task_hours_count k on a.id=k.tid and a.task_receiver=k.aid
- left join t_order_outsource l on a.id=l.tid left join admin ad on ad.id=a.split_aid left join t_task_member ttm on a.id=ttm.tid
- where e.order_status in (0,1,2,3,4,5)
- and split_status =2 and a.split_super= #{tid}
- <if test="type == 1">
- and a.process_status in(0,3)
- </if>
- order by split_id
- </select>
- <select id="selectByidGetCname" resultType="java.lang.String">
- select b.cname from business_project a left join business_category b on a.cid =b.id
- where a.id= #{pid}
- </select>
- <update id="updateByOutsourceToOrderNo">
- update t_order_task set outsource= #{type} where order_no= #{orderNo}
- </update>
- <select id="getLockId" resultType="java.lang.String">
- select id from user_lock_release a left join (select commodity_id from t_order_task
- where order_no = #{orderNo} GROUP by commodity_id ) b on a.business_project_id =b.commodity_id
- where a.`type` =1 and a.aid = #{aid} and a.uid = #{uid}
- </select>
- <select id="selectProjectStatisticsListByPage" resultType="com.goafanti.order.bo.OutProjectStatistics">
- select date_format( a.task_distribution_time, '%Y-%m-%d %H:%i:%S' ) distributionTime ,d.name province , c.name depName,e.salesman_name salesmanName,
- b.contract_no contractNo ,b.order_no orderNo ,e.buyer_name userName,bc.cname ,a.commodity_name pname,ta.name techName,td.name techDepName,
- a.project_status projectStatus,a.id,b.order_remarks orderRemarks, a.set_up_status setUpStatus , date_format( a.set_up_time , '%Y-%m-%d' ) setUpTime ,
- a.spot_check_status spotCheckStatus ,b.contact_mobile contactMobile ,b.legal_person_tel legalPersonTel , a.certificate_number certificateNumber,
- a.declaration_batch declarationBatch, date_format(a.licence_time, '%Y-%m-%d' ) licenceTime, a.commodity_quantity commodityQuantity ,
- ttm.certificates_count certificatesCount,ttm.urgent_day urgentDay ,ttm.if_material ifMaterial, ttm.cost_amount costAmount ,
- (a.commodity_price-ttm.cost_amount)profit, a.high_tech_status highTechStatus, tp.patent_name patentName ,tp.patent_no patentNo ,
- date_format(tp.accept_time, '%Y-%m-%d ' ) acceptTime , date_format(tp.authorize_time, '%Y-%m-%d ' ) authorizeTime, ttm.reject_count rejectCount ,
- tm.service_life serviceLife,tm.service_year serviceyear, tm.year_sum yearsum,tm.contract_term contractTerm, a.commodity_price commodityPrice ,
- a.special_comment specialComment,a.task_comment taskComment,ttm.last_year lastYear,ttm.last_year_capital lastYearCapital,ttm.last_year_income lastYearIncome,
- e.service_type serviceType,e.service_project serviceProject, a.form_retrieve formRetrieve ,a.satisfaction_degree satisfactionDegree
- from t_order_task a left join t_order_new b on a.order_no =b.order_no left join department c on b.order_dep =c.id
- left join district_glossory d on c.province=d.id left join task_progress tp on a.id=tp.task_id left join t_task_member tm on a.id=tm.tid
- left join t_order_mid e on b.order_no =e.order_no left join business_project bp on a.commodity_id =bp.id left join business_category bc on bp.cid =bc.id
- left join t_task_mid ttm on a.id=ttm.tid left join admin ta on a.task_receiver =ta.id left join department td on ta.department_id =td.id
- <if test="screen ==6">
- right join (select tid ,accept_count sls from t_task_mid where accept_count > 0)tj on a.id=tj.tid
- </if>
- <if test="screen ==7">
- right join (select tid ,end_count wjs from t_task_mid where end_count > 0)tj on a.id=tj.tid
- </if>
- <if test="screen ==8">
- right join (select tid ,authorize_count sqs from t_task_mid where authorize_count > 0)tj on a.id=tj.tid
- </if>
- <if test="screen ==9">
- right join (select tid ,reject_count bhs from t_task_mid where reject_count > 0)tj on a.id=tj.tid
- </if>
- <if test="screen ==10">
- right join (select tid ,certificates_count xzs from t_task_mid where certificates_count > 0)tj on a.id=tj.tid
- </if>
- <if test="screen ==11">
- right join (select tid ,apply_count sqs,reject_count bhs,certificates_count xzs from t_task_mid
- where apply_count > 0)tj on a.id=tj.tid
- </if>
- where a.split_status in (0,2) and b. delete_sign in (0,2)
- <!-- 筛选项 0库存 1派单 2完成 3立项 4抽查 5未通过 6受理 7完结 8授权 9驳回 10下证 11申请 -->
- <if test="screen ==0">
- and a.project_status in(0,1,2,3)
- </if>
- <if test="screen ==2">
- and a.project_status > 3
- </if>
- <if test="screen ==3">
- and a.set_up_status =1
- </if>
- <if test="screen ==4">
- and a.spot_check_status in (1,2)
- </if>
- <if test="screen ==5">
- and a.spot_check_status =1
- </if>
- <if test="screen ==12">
- and a.publicity_time is not null
- </if>
- <if test="startDate != null and endDate != null">
- and a.task_distribution_time between #{startDate} and #{endDate}
- </if>
- <if test="province !=null">
- and c.province = #{province}
- </if>
- <if test="projectId !=null">
- and a.commodity_id = #{projectId}
- </if>
- <if test="sdStatus !=null">
- <if test="sdStatus==0">
- and a.form_retrieve=0
- </if>
- <if test="sdStatus==1">
- and a.form_retrieve=1
- </if>
- <if test="sdStatus==2">
- and a.form_retrieve=2
- and a.satisfaction_degree=0
- </if>
- <if test="sdStatus==3">
- and a.form_retrieve=2
- and a.satisfaction_degree=1
- </if>
- <if test="sdStatus==4">
- and a.form_retrieve=2
- and a.satisfaction_degree=2
- </if>
- <if test="sdStatus==5">
- and a.form_retrieve=2
- and a.satisfaction_degree=3
- </if>
- </if>
- <if test="deps != null">
- and b.order_dep in
- <foreach close=")" collection="deps" item="dep" open="(" separator=",">
- #{dep}
- </foreach>
- </if>
- <if test="thchDeps != null">
- and td.id in
- <foreach close=")" collection="thchDeps" item="thchDep" open="(" separator=",">
- #{thchDep}
- </foreach>
- </if>
- <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>
- <if test="orderNo !=null">
- and b.order_no = #{orderNo}
- </if>
- <if test="contractNo !=null">
- and b.contract_no = #{contractNo}
- </if>
- <if test="userName !=null">
- and e.buyer_name like concat('%', #{userName},'%')
- </if>
- <if test="thchId !=null">
- and a.task_receiver = #{thchId}
- </if>
- <if test="declarationBatch !=null">
- and a.declaration_batch = #{declarationBatch}
- </if>
- <if test="projectSituation !=null">
- and a.status = #{projectSituation}
- </if>
- <if test=" projectAmount !=null and projectAmount != 9">
- and a.commodity_price >= #{amountStart} and a.commodity_price < #{amountEnd}
- </if>
- <if test=" projectAmount == 9">
- and a.commodity_price >= #{amountStart}
- </if>
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
- <select id="selectProjectStatisticsCount" resultType="java.lang.Integer">
- select count(*)
- from t_order_task a left join t_order_new b on a.order_no =b.order_no
- <if test="province !=null">
- left join department c on b.order_dep =c.id
- </if>
- <if test="userName !=null">
- left join t_order_mid e on b.order_no =e.order_no
- </if>
- <if test="projectStatus !=null or projectType !=null">
- left join business_project bp on a.commodity_id =bp.id
- </if>
- <if test="thchDeps !=null">
- left join admin ta on a.task_receiver =ta.id
- left join department td on ta.department_id =td.id
- </if>
- <if test="status==3 or status==4">
- left join task_progress tp on a.id=tp.task_id
- </if>
- <if test="screen ==6">
- right join (select tid ,accept_count sls from t_task_mid where accept_count > 0)tj on a.id=tj.tid
- </if>
- <if test="screen ==7">
- right join (select tid ,end_count wjs from t_task_mid where end_count > 0)tj on a.id=tj.tid
- </if>
- <if test="screen ==8">
- right join (select tid ,authorize_count sqs from t_task_mid where authorize_count > 0)tj on a.id=tj.tid
- </if>
- <if test="screen ==9">
- right join (select tid ,reject_count bhs from t_task_mid where reject_count > 0)tj on a.id=tj.tid
- </if>
- <if test="screen ==10">
- right join (select tid ,certificates_count xzs from t_task_mid where certificates_count > 0)tj on a.id=tj.tid
- </if>
- <if test="screen ==11">
- right join (select tid ,apply_count sqs,reject_count bhs,certificates_count xzs from t_task_mid
- where apply_count > 0)tj on a.id=tj.tid
- </if>
- where a.split_status in (0,2) and b. delete_sign in (0,2)
- <!-- 筛选项 0库存 1派单 2完成 3立项 4抽查 5未通过 6受理 7完结 8授权 9驳回 10下证 11申请 -->
- <if test="screen ==0">
- and a.project_status in(0,1,2,3)
- </if>
- <if test="screen ==2">
- and a.project_status > 3
- </if>
- <if test="screen ==3">
- and a.set_up_status =1
- </if>
- <if test="screen ==4">
- and a.spot_check_status in (1,2)
- </if>
- <if test="screen ==5">
- and a.spot_check_status =1
- </if>
- <if test="screen ==12">
- and a.publicity_time is not null
- </if>
- <if test="startDate != null and endDate != null">
- and a.task_distribution_time between #{startDate} and #{endDate}
- </if>
- <if test="province !=null">
- and c.province = #{province}
- </if>
- <if test="projectId !=null">
- and a.commodity_id = #{projectId}
- </if>
- <if test="deps != null">
- and b.order_dep in
- <foreach close=")" collection="deps" item="dep" open="(" separator=",">
- #{dep}
- </foreach>
- </if>
- <if test="thchDeps != null">
- and td.id in
- <foreach close=")" collection="thchDeps" item="thchDep" open="(" separator=",">
- #{thchDep}
- </foreach>
- </if>
- <if test="projectStatus !=null">
- and bp.cid= #{projectStatus}
- </if>
- <if test="sdStatus !=null">
- <if test="sdStatus==0">
- and a.form_retrieve=0
- </if>
- <if test="sdStatus==1">
- and a.form_retrieve=1
- </if>
- <if test="sdStatus==2">
- and a.form_retrieve=2
- and a.satisfaction_degree=0
- </if>
- <if test="sdStatus==3">
- and a.form_retrieve=2
- and a.satisfaction_degree=1
- </if>
- <if test="sdStatus==4">
- and a.form_retrieve=2
- and a.satisfaction_degree=2
- </if>
- <if test="sdStatus==5">
- and a.form_retrieve=2
- and a.satisfaction_degree=3
- </if>
- </if>
- <if test="taskProjectStatus !=null">
- and a.project_status= #{taskProjectStatus}
- </if>
- <if test="projectType !=null">
- and bp.type= #{projectType}
- </if>
- <if test="orderNo !=null">
- and b.order_no = #{orderNo}
- </if>
- <if test="contractNo !=null">
- and b.contract_no = #{contractNo}
- </if>
- <if test="userName !=null">
- and e.buyer_name like concat('%', #{userName},'%')
- </if>
- <if test="thchId !=null">
- and a.task_receiver = #{thchId}
- </if>
- <if test="declarationBatch !=null">
- and a.declaration_batch = #{declarationBatch}
- </if>
- <if test="projectSituation !=null">
- and a.status = #{projectSituation}
- </if>
- <if test=" projectAmount !=null and projectAmount != 9">
- and a.commodity_price >= #{amountStart} and a.commodity_price < #{amountEnd}
- </if>
- <if test=" projectAmount == 9">
- and a.commodity_price >= #{amountStart}
- </if>
- </select>
- <select id="selectProvincialStatisticsListByPage" resultType="com.goafanti.order.bo.OutProvincialStatistics">
- select z.cid bpId, bc.cname projectStatus,z.dispatch_province province,dg.name provinceName,
- z.duty_dep thchDepId,d.name thchDepName,z.distributeCount,z.stockCount,z.completeCount,z.publicityCount,
- z.setUpCount,z.spotCheckCount,z.failCount,z.certificatesCount,z.acceptCount,z.endCount,z.authorizeCount,
- z.rejectCount,z.applyCount,z.amountCount,z.costAmount,z.profit
- from ( select y.dispatch_province, y.cid, y.duty_dep, sum(y.dispatch_count)distributeCount,
- sum(y.stock_count)stockCount, sum(y.complete_count)completeCount,sum(y.promulgate_count)publicityCount,
- sum(y.set_up_count)setUpCount,sum(y.spot_check_count)spotCheckCount,sum(y.fail_count)failCount,
- sum(y.certificates_count)certificatesCount,sum(y.accept_count)acceptCount,sum(y.end_count)endCount,
- sum(y.authorize_count)authorizeCount,sum(y.reject_count)rejectCount, sum(y.apply_count)applyCount,
- sum(y.commodity_price)amountCount,sum(y.cost_amount)costAmount, sum(y.commodity_price-y.cost_amount)profit
- from(select b.dispatch_province, bp.cid, b.duty_dep,
- b.stock_count,b.dispatch_count,b.promulgate_count, b.complete_count,b.set_up_count ,b.spot_check_count ,
- b.fail_count ,b.certificates_count, b.accept_count,b.end_count,b.authorize_count,b.reject_count,b.apply_count,
- a.commodity_price ,b.cost_amount, a.task_distribution_time from t_order_task a
- left join t_task_mid b on a.id=b.tid left join business_project bp on a.commodity_id =bp.id
- left join t_order_new ton on a.order_no =ton .order_no
- where a.task_status in(1,2,3) and ton.delete_sign in (0,2)
- <if test="projectId !=null">
- and a.commodity_id = #{projectId}
- </if>
- <if test="province !=null">
- and b.dispatch_province = #{province}
- </if>
- <if test="thchDeps !=null">
- and b.duty_dep in
- <foreach close=")" collection="thchDeps" item="depId" open="(" separator=",">
- #{depId}
- </foreach>
- </if>
- <if test="projectType !=null">
- and bp.`type` = #{projectType}
- </if>
- <if test="projectStatus !=null">
- and bp.cid= #{projectStatus}
- </if>
- <if test="startDate != null and endDate != null">
- and a.task_distribution_time between #{startDate} and #{endDate}
- </if>
- )y
- group by y.dispatch_province, y.cid, y.duty_dep )z
- left join business_category bc on z.cid=bc.id left join district_glossory dg on z.dispatch_province=dg.id
- left join department d on z.duty_dep=d.id
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
- <select id="selectProvincialStatisticsCount" resultType="java.lang.Integer">
- select count(*)
- from(select y.dispatch_province from (select bp.cid,
- b.dispatch_province,b.duty_dep,a.cname,b.stock_count,b.dispatch_count,b.promulgate_count,
- b.complete_count,b.set_up_count ,b.spot_check_count ,b.fail_count ,b.certificates_count,
- b.accept_count,b.end_count,b.authorize_count,b.reject_count,b.apply_count,
- a.commodity_price ,b.cost_amount, a.task_distribution_time
- from t_order_task a
- left join t_task_mid b on a.id=b.tid
- left join business_project bp on a.commodity_id =bp.id
- left join t_order_new ton on a.order_no =ton .order_no
- where a.task_status in(1,2,3) and ton.delete_sign in (0,2)
- <if test="projectId !=null">
- and a.commodity_id = #{projectId}
- </if>
- <if test="province !=null">
- and b.dispatch_province = #{province}
- </if>
- <if test="thchDeps !=null">
- and b.duty_dep in
- <foreach close=")" collection="thchDeps" item="depId" open="(" separator=",">
- #{depId}
- </foreach>
- </if>
- <if test="projectType !=null">
- and bp.`type` = #{projectType}
- </if>
- <if test="projectStatus !=null">
- and bp.cid= #{projectStatus}
- </if>
- <if test="startDate != null and endDate != null">
- and a.task_distribution_time between #{startDate} and #{endDate}
- </if>
- )y group by y.dispatch_province, y.cid, y.duty_dep )x
- </select>
- <select id="managerSelectByPage" resultType="com.goafanti.order.bo.managerListBo">
- select a.id,a.task_distribution_time taskDistributionTime ,tm.province_name provinceName,tm.dep_name depName,
- tm.salesman_name salesmanName, b.contract_no contractNo ,b.order_no orderNo,tm.buyer_name UserName,a.cname ,
- a.commodity_name commodityName,a.commodity_quantity commodityQuantity,dep.name techDepName,a.receiver_name techName,
- a.project_status projectStatus ,a.commodity_price commodityPrice ,a.special_comment specialComment
- from (select task_id from t_task_log a where task_receiver=#{aid}
- UNION select task_id from t_task_log a where task_allocator=#{aid}) x
- left join t_order_task a on x.task_id=a.id left join t_order_new b on a.order_no =b.order_no
- left join t_order_mid tm on b.order_no=tm.order_no left join admin ad on a.task_receiver =ad.id
- left join department dep on ad.department_id =dep.id left join business_project bp on a.commodity_id =bp.id
- where 1=1
- <if test="orderNo !=null">
- and a.order_no = #{orderNo}
- </if>
- <if test="contractNo !=null">
- and b.contract_no = #{contractNo}
- </if>
- <if test="name !=null">
- and tm.buyer_name like CONCAT('%',#{name},'%')
- </if>
- <if test="thchId !=null">
- and a.task_receiver = #{thchId}
- </if>
- <if test="cid !=null">
- and bp.cid =#{cid}
- </if>
- <if test="projectType !=null">
- and bp.`type` =#{projectType}
- </if>
- <if test="depId !=null">
- and b.order_dep =#{depId}
- </if>
- <if test="techDepId !=null">
- and ad.department_id =#{techDepId}
- </if>
- <if test="declarationBatch !=null">
- and a.declaration_batch =#{declarationBatch}
- </if>
- <if test="commodityPrice !=null">
- and a.commodity_price =#{commodityPrice}
- </if>
- <if test="startTime !=null and endTime !=null">
- and a.task_distribution_time between #{startTime} and #{endTime}
- </if>
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
- <select id="managerSelectCount" resultType="java.lang.Integer">
- select count(*)
- from (select task_id from t_task_log a where task_receiver= #{aid} UNION
- select task_id from t_task_log a where task_allocator= #{aid}) x
- left join t_order_task a on x.task_id=a.id left join t_order_new b on a.order_no =b.order_no
- left join t_order_mid tm on b.order_no=tm.order_no left join admin ad on a.task_receiver =ad.id
- left join department dep on ad.department_id =dep.id left join business_project bp on a.commodity_id =bp.id
- where 1=1
- <if test="orderNo !=null">
- and a.order_no = #{orderNo}
- </if>
- <if test="contractNo !=null">
- and b.contract_no = #{contractNo}
- </if>
- <if test="name !=null">
- and tm.buyer_name like CONCAT('%',#{name},'%')
- </if>
- <if test="thchId !=null">
- and a.task_receiver = #{thchId}
- </if>
- <if test="cid !=null">
- and bp.cid =#{cid}
- </if>
- <if test="projectType !=null">
- and bp.`type` =#{projectType}
- </if>
- <if test="depId !=null">
- and b.order_dep =#{depId}
- </if>
- <if test="techDepId !=null">
- and ad.department_id =#{techDepId}
- </if>
- <if test="declarationBatch !=null">
- and a.declaration_batch =#{declarationBatch}
- </if>
- <if test="commodityPrice !=null">
- and a.commodity_price =#{commodityPrice}
- </if>
- <if test="startTime !=null and endTime !=null">
- and a.task_distribution_time between #{startTime} and #{endTime}
- </if>
- </select>
- <resultMap id="userOrder" type="com.goafanti.common.bo.UserOrderTask">
- <id column="orderNo" jdbcType="VARCHAR" property="orderNo" />
- <collection ofType="com.goafanti.common.bo.UserTask" property="list">
- <id column="id" jdbcType="VARCHAR" property="id" />
- <result column="commodityName" jdbcType="VARCHAR" property="commodityName" />
- </collection>
- </resultMap>
- <select id="selectUidByproject" resultMap="userOrder">
- select a.order_no orderNo ,b.id,b.commodity_name commodityName from t_order_new a
- 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 ,a.official_cost officialCost,a.cost_reduction costReduction,
- a.patent_type patentType
- 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="aid !=null">
- and b.salesman_id = #{aid}
- </if>
- <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="deps !=null">
- and b.order_dep in
- <foreach close=")" collection="deps" item="depId" open="(" separator=",">
- #{depId}
- </foreach>
- </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="aid !=null">
- and b.salesman_id = #{aid}
- </if>
- <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="deps !=null">
- and b.order_dep in
- <foreach close=")" collection="deps" item="depId" open="(" separator=",">
- #{depId}
- </foreach>
- </if>
- </select>
- <update id="resstPayment">
- update t_order_task a ,t_task_mid c
- set c.party_amount =0,c.cost_amount =0
- where a.id= #{id} and a.id=c.tid
- </update>
- <update id="updateAddCostAmount">
- update t_task_mid
- 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,a.commodity_name projectName
- from t_order_task a left join t_order_mid b on a.order_no=b.order_no
- left join admin d on a.task_receiver=d.id
- where 1=1
- <if test="tid !=null">
- and a.id= #{tid}
- </if>
- </select>
- <select id="selectByTidGetDtails" resultType="com.goafanti.organization.bo.ProjectTypePuls">
- select a.id,a.order_no orderNo,a.official_cost officialCost,a.cost_reduction costReduction ,a.commodity_quantity quantity ,a.patent_type patentType,
- b.patent_name_type projectType, c.amount officialAmount,c.proportion85,b.patent_type outPatentType,d.type
- from t_order_task a left join t_order_outsource b on a.id=b.tid left join official_fee_price c on a.patent_type =c.patent_type and b.patent_name_type =c.`type`
- left join business_project d on a.commodity_id=d.id
- where a.id= #{tid}
- </select>
- <select id="highNewRetrialStatistics" resultType="com.goafanti.order.bo.OutHighNewRetrialStatistics">
- select t1. province,dg.name provinceName ,t1.quantity,t1.pass,t1.notPass,ifnull(t1.signBacks,0) signBacks
- from (SELECT e.province ,sum(1) quantity,sum(if(a.project_status=10,1,0))pass,sum(if(a.project_status != 10,1,0))notPass,
- sum(ttm.high_new_retrial)signBacks
- from t_order_task a left join business_project b on a.commodity_id =b.id left join t_task_mid ttm on a.id=ttm.tid
- left join t_order_new c on a.order_no =c.order_no left join admin d on c.salesman_id =d.id
- left join department e on d.department_id =e.id where b.`type` =5 and c.process_status >4 and c.delete_sign in (0,2)
- <if test="depId!=null">
- and e.id= #{depId}
- </if>
- <if test="startDate!=null and endDate!=null">
- and c.sign_time between #{startDate} and #{endDate}
- </if>
- group by e.province )t1 left join district_glossory dg on t1.province=dg.id
- </select>
- <select id="getHighNewRetrial" resultType="java.lang.Integer">
- select count(*) from t_order_new a left join t_order_new b on a.buyer_id =b.buyer_id
- left join t_order_task c on b.order_no =c.order_no left join business_project d on c.commodity_id =d.id
- where a.order_no =#{orderNo} and b.create_time < a.create_time and d.`type` =5
- </select>
- <select id="highNewRetrialList" resultType="com.goafanti.order.bo.OutHighNewRetrialList">
- select t1.province,dg.name provinceName,t1.salesman_id aid,t1.name name,t1.quantity,t1.pass,t1.notPass,t1.signBacks
- from (SELECT e.province,c.salesman_id,d.name ,sum(1) quantity,sum(if(a.project_status=10,1,0))pass,
- sum(if(a.project_status != 10,1,0))notPass, sum(ttm.high_new_retrial)signBacks
- from t_order_task a left join business_project b on a.commodity_id =b.id left join t_task_mid ttm on a.id=ttm.tid
- left join t_order_new c on a.order_no =c.order_no left join admin d on c.salesman_id =d.id
- left join department e on d.department_id =e.id where b.`type` =5 and c.process_status >4 and c.delete_sign in (0,2)
- <if test="province!=null">
- and e.province= #{province}
- </if>
- <if test="depId!=null">
- and e.id= #{depId}
- </if>
- <if test="startDate!=null and endDate!=null">
- and c.sign_time between #{startDate} and #{endDate}
- </if>
- <if test="aid !=null">
- and c.salesman_id = #{aid}
- </if>
- <if test="depId !=null">
- and d.department_id = #{depId}
- </if>
- group by e.province ,c.salesman_id ,d.name )t1 left join district_glossory dg on t1.province=dg.id
- order by
- <if test="sort==0">
- t1.pass
- </if>
- <if test="sort==1">
- t1.notPass
- </if>
- desc
- </select>
- <select id="findMemberList" resultType="com.goafanti.order.bo.OutMemberList">
- select a.id,b.contract_no contractNo,c.buyer_name userName,a.order_no orderNo,b.approval ,c.dep_name depName,
- c.salesman_name salesmanName,c.finance_name financeName,a.commodity_name projectName,a.member_type memberType,
- b.delete_sign deleteSign ,b.total_amount totalAmount ,b.sales_type salesType ,b.other,
- a.process_status status,a.commodity_id commodityId,a.commodity_name commodityName,
- a.commodity_quantity commodityQuantity,a.task_comment taskComment,a.picture_url pictureUrl,
- e.service_life serviceLife ,e.service_year serviceYear,e.year_sum yearSum
- 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 t_task_member e on a.id=e.tid
- <if test="shiroType ==2">
- left join department d on b.order_dep =d.id
- </if>
- where b.delete_sign in (0,2)
- and a.process_status in (1,2,3,4)
- <if test="shiroType ==1">
- and b.salesman_id = #{aid}
- </if>
- <if test="shiroType ==2">
- and d.finance_id = #{aid}
- </if>
- <if test="orderNo != null">
- and a.order_no = #{orderNo}
- </if>
- <if test="userName != null">
- and c.buyer_name like concat('%',#{userName},'%')
- </if>
- <if test="deps != null">
- and b.order_dep in
- <foreach close=")" collection="deps" item="dep" open="(" separator=",">
- #{dep}
- </foreach>
- </if>
- <if test="contractNo != null">
- and b.contract_no =#{contractNo}
- </if>
- <if test="salesmanId != null">
- and b.salesman_id =#{salesmanId}
- </if>
- <if test="projectName != null">
- and a.commodity_name like concat('%',#{projectName},'%')
- </if>
- <if test="amountStatus == 0">
- and b.total_amount < 10
- </if>
- <if test="amountStatus == 1">
- and b.total_amount between 10 and 20
- </if>
- <if test="amountStatus == 2">
- and b.total_amount between 20 and 30
- </if>
- <if test="amountStatus == 3">
- and b.total_amount between 30 and 40
- </if>
- <if test="amountStatus == 4">
- and b.total_amount > 40
- </if>
- <if test="approval != null and approval < 3">
- and b.approval = #{approval}
- </if>
- <if test="approval != null and approval ==4">
- and b.approval in (1,2)
- </if>
- <if test="status != null and status !=5">
- and a.process_status = #{status}
- </if>
- order by a.process_status
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
- <select id="findMemberCount" 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
- <if test="shiroType ==2">
- left join department d on b.order_dep =d.id
- </if>
- where b.delete_sign in (0,2)
- and a.process_status in (1,2,3,4)
- <if test="shiroType ==1">
- and b.salesman_id = #{aid}
- </if>
- <if test="shiroType ==2">
- and d.finance_id = #{aid}
- </if>
- <if test="orderNo != null">
- and a.order_no = #{orderNo}
- </if>
- <if test="userName != null">
- and c.buyer_name like concat('%',#{userName},'%')
- </if>
- <if test="deps != null">
- and b.order_dep in
- <foreach close=")" collection="deps" item="dep" open="(" separator=",">
- #{dep}
- </foreach>
- </if>
- <if test="contractNo != null">
- and b.contract_no =#{contractNo}
- </if>
- <if test="salesmanId != null">
- and b.salesman_id =#{salesmanId}
- </if>
- <if test="projectName != null">
- and a.commodity_name like concat('%',#{projectName},'%')
- </if>
- <if test="amountStatus == 1">
- and b.total_amount between 10 and 20
- </if>
- <if test="amountStatus == 2">
- and b.total_amount between 20 and 30
- </if>
- <if test="amountStatus == 3">
- and b.total_amount between 30 and 40
- </if>
- <if test="amountStatus == 4">
- and b.total_amount > 40
- </if>
- <if test="approval != null and approval < 3">
- and b.approval = #{approval}
- </if>
- <if test="approval != null and approval ==4">
- and b.approval in (1,2)
- </if>
- <if test="status != null and status !=5">
- and a.process_status = #{status}
- </if>
- </select>
- <select id="selectByAid" resultType="com.goafanti.common.model.TChangeTask">
- select b.id,b.cid from t_order_task a
- left join t_change_task b on a.id=b.tid
- left join new_order_change noc on b.cid =noc.id
- where b.id is not null and noc.process_state < 4 and noc.status in (0,1,2)
- and a.task_receiver = #{aid}
- </select>
- <select id="getSplitCount" resultType="java.lang.Integer">
- select count(*) from t_order_task
- 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>
- <select id="selectOrderNoAllByaid" resultType="java.lang.String">
- select order_no
- from t_order_task
- where task_receiver = #{aid} group by order_no
- </select>
- <delete id="deleteBySplitId" parameterType="java.lang.Integer">
- delete from t_order_task
- where split_super = #{id,jdbcType=INTEGER}
- </delete>
- <update id="updateDimissionTransferManager">
- update t_order_task
- set manager_id= #{transferId}
- where manager_id = #{aid}
- </update>
- </mapper>
|