| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261 |
- <?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 type="com.goafanti.common.model.TOrderTask" id="TOrderTaskMap">
- <result property="id" column="id" jdbcType="INTEGER"/>
- <result property="orderNo" column="order_no" jdbcType="VARCHAR"/>
- <result property="main" column="main" jdbcType="INTEGER"/>
- <result property="superId" column="super_id" jdbcType="VARCHAR"/>
- <result property="commodityId" column="commodity_id" jdbcType="VARCHAR"/>
- <result property="commodityName" column="commodity_name" jdbcType="VARCHAR"/>
- <result property="commodityQuantity" column="commodity_quantity" jdbcType="INTEGER"/>
- <result property="commodityMode" column="commodity_mode" jdbcType="VARCHAR"/>
- <result property="commodityPrice" column="commodity_price" jdbcType="VARCHAR"/>
- <result property="taskStatus" column="task_status" jdbcType="INTEGER"/>
- <result property="taskDistributionTime" column="task_distribution_time" jdbcType="TIMESTAMP"/>
- <result property="taskAllocator" column="task_allocator" jdbcType="VARCHAR"/>
- <result property="taskReceiver" column="task_receiver" jdbcType="VARCHAR"/>
- <result property="taskComment" column="task_comment" jdbcType="VARCHAR"/>
- <result property="taskStartTime" column="task_start_time" jdbcType="TIMESTAMP"/>
- <result property="taskEndTime" column="task_end_time" jdbcType="TIMESTAMP"/>
- <result property="attachmentUrl" column="attachment_url" jdbcType="VARCHAR"/>
- <result property="projectStatus" column="project_status" jdbcType="INTEGER"/>
- <result property="acceptTime" column="accept_time" jdbcType="TIMESTAMP"/>
- <result property="reviewTime" column="review_time" jdbcType="TIMESTAMP"/>
- <result property="publicityTime" column="publicity_time" jdbcType="TIMESTAMP"/>
- <result property="licenceTime" column="licence_time" jdbcType="TIMESTAMP"/>
- <result property="certificateNumber" column="certificate_number" jdbcType="VARCHAR"/>
- <result property="status" column="status" jdbcType="INTEGER"/>
- <result property="formRetrieve" column="form_retrieve" jdbcType="INTEGER"/>
- <result property="taskRefund" column="task_refund" jdbcType="INTEGER"/>
- <result property="refundContent" column="refund_content" jdbcType="VARCHAR"/>
- <result property="retrieveContent" column="retrieve_content" jdbcType="VARCHAR"/>
- <result property="declareUser" column="declare_user" jdbcType="VARCHAR"/>
- <result property="declarePwd" column="declare_pwd" jdbcType="VARCHAR"/>
- <result property="setUpAmount" column="set_up_amount" jdbcType="VARCHAR"/>
- <result property="arrivalMoney" column="arrival_money" jdbcType="INTEGER"/>
- <result property="outsourceName" column="outsource_name" jdbcType="VARCHAR"/>
- <result property="outsourcePrice" column="outsource_price" jdbcType="VARCHAR"/>
- <result property="consultantId" column="consultant_id" jdbcType="VARCHAR"/>
- <result property="managerId" column="manager_id" jdbcType="VARCHAR"/>
- <result property="outsource" column="outsource" jdbcType="INTEGER"/>
- <result property="splitSuper" column="split_super" jdbcType="INTEGER"/>
- <result property="splitStatus" column="split_status" jdbcType="INTEGER"/>
- <result property="splitId" column="split_id" jdbcType="INTEGER"/>
- <result property="splitAid" column="split_aid" jdbcType="VARCHAR"/>
- <result property="splitTime" column="split_time" jdbcType="TIMESTAMP"/>
- <result property="cname" column="cname" jdbcType="VARCHAR"/>
- <result property="receiverName" column="receiver_name" jdbcType="VARCHAR"/>
- <result property="declarationBatch" column="declaration_batch" jdbcType="INTEGER"/>
- <result property="costReduction" column="cost_reduction" jdbcType="INTEGER"/>
- <result property="officialCost" column="official_cost" jdbcType="INTEGER"/>
- <result property="setUpStatus" column="set_up_status" jdbcType="INTEGER"/>
- <result property="setUpTime" column="set_up_time" jdbcType="TIMESTAMP"/>
- <result property="spotCheckStatus" column="spot_check_status" jdbcType="INTEGER"/>
- <result property="highTechStatus" column="high_tech_status" jdbcType="INTEGER"/>
- <result property="specialComment" column="special_comment" jdbcType="VARCHAR"/>
- <result property="ifCertificationFee" column="if_certification_fee" jdbcType="INTEGER"/>
- <result property="certificationFee" column="certification_fee" jdbcType="VARCHAR"/>
- <result property="certificationCorporate" column="certification_corporate" jdbcType="VARCHAR"/>
- <result property="timeRecord" column="time_record" jdbcType="VARCHAR"/>
- <result property="ifPublicity" column="if_publicity" jdbcType="INTEGER"/>
- <result property="checkStatus" column="check_status" jdbcType="INTEGER"/>
- <result property="patentType" column="patent_type" jdbcType="INTEGER"/>
- <result property="pubicityUrl" column="pubicity_url" jdbcType="VARCHAR"/>
- <result property="processStatus" column="process_status" jdbcType="INTEGER"/>
- <result property="memberType" column="member_type" jdbcType="INTEGER"/>
- <result property="pictureUrl" column="picture_url" jdbcType="VARCHAR"/>
- <result property="satisfactionDegree" column="satisfaction_degree" jdbcType="INTEGER"/>
- <result property="satisfactionDegreeUrl" column="satisfaction_degree_url" jdbcType="VARCHAR"/>
- <result property="examineType" column="examine_type" jdbcType="INTEGER"/>
- <result property="approval" column="approval" jdbcType="INTEGER"/>
- <result property="completeDate" column="complete_date" jdbcType="TIMESTAMP"/>
- <result property="completeStatus" column="complete_status" jdbcType="INTEGER"/>
- <result property="scoreStatus" column="score_status" jdbcType="INTEGER"/>
- <result property="scoreNumber" column="score_number" jdbcType="INTEGER"/>
- <result property="htMember" column="ht_member" jdbcType="INTEGER"/>
- <result property="additionalDeduction" column="additional_deduction" jdbcType="INTEGER"/>
- <result property="rdAwardsubsidy" column="rd_awardsubsidy" jdbcType="INTEGER"/>
- <result property="technologyProjectType" column="technology_project_Type" jdbcType="INTEGER"/>
- <result property="ordinaryRisk" column="ordinary_risk" jdbcType="INTEGER"/>
- <result property="days" column="days" jdbcType="INTEGER"/>
- <result property="scheme" column="scheme" jdbcType="INTEGER"/>
- <result property="progressTid" column="progress_tid" jdbcType="INTEGER"/>
- </resultMap>
- <sql id="TOrderTaskAllSql">
- 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, examine_type, approval, complete_date, complete_status, score_status, score_number, ht_member, additional_deduction, rd_awardsubsidy, technology_project_Type, ordinary_risk, days, scheme, progress_tid
- </sql>
- <!--查询单个-->
- <select id="queryById" resultMap="TOrderTaskMap">
- select
- <include refid="TOrderTaskAllSql"/>
- from t_order_task
- where id = #{id}
- </select>
- <!--新增所有列-->
- <insert id="insert" keyProperty="id" 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, examine_type, approval, complete_date, complete_status,
- score_status, score_number, ht_member, additional_deduction, rd_awardsubsidy,
- technology_project_Type, ordinary_risk, days, scheme, progress_tid)
- values (#{orderNo}, #{main}, #{superId}, #{commodityId}, #{commodityName}, #{commodityQuantity},
- #{commodityMode}, #{commodityPrice}, #{taskStatus}, #{taskDistributionTime}, #{taskAllocator},
- #{taskReceiver}, #{taskComment}, #{taskStartTime}, #{taskEndTime}, #{attachmentUrl}, #{projectStatus},
- #{acceptTime}, #{reviewTime}, #{publicityTime}, #{licenceTime}, #{certificateNumber}, #{status},
- #{formRetrieve}, #{taskRefund}, #{refundContent}, #{retrieveContent}, #{declareUser}, #{declarePwd},
- #{setUpAmount}, #{arrivalMoney}, #{outsourceName}, #{outsourcePrice}, #{consultantId}, #{managerId},
- #{outsource}, #{splitSuper}, #{splitStatus}, #{splitId}, #{splitAid}, #{splitTime}, #{cname},
- #{receiverName}, #{declarationBatch}, #{costReduction}, #{officialCost}, #{setUpStatus}, #{setUpTime},
- #{spotCheckStatus}, #{highTechStatus}, #{specialComment}, #{ifCertificationFee}, #{certificationFee},
- #{certificationCorporate}, #{timeRecord}, #{ifPublicity}, #{checkStatus}, #{patentType}, #{pubicityUrl},
- #{processStatus}, #{memberType}, #{pictureUrl}, #{satisfactionDegree}, #{satisfactionDegreeUrl},
- #{examineType}, #{approval}, #{completeDate}, #{completeStatus}, #{scoreStatus}, #{scoreNumber},
- #{htMember}, #{additionalDeduction}, #{rdAwardsubsidy}, #{technologyProjectType}, #{ordinaryRisk},
- #{days}, #{scheme}, #{progressTid})
- </insert>
- <insert id="insertBatch">
- 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, examine_type, approval, complete_date, complete_status,
- score_status, score_number, ht_member, additional_deduction, rd_awardsubsidy, technology_project_Type,
- ordinary_risk, days, scheme, progress_tid)
- values
- <foreach collection="entities" item="entity" separator=",">
- (#{entity.orderNo}, #{entity.main}, #{entity.superId}, #{entity.commodityId}, #{entity.commodityName},
- #{entity.commodityQuantity}, #{entity.commodityMode}, #{entity.commodityPrice}, #{entity.taskStatus},
- #{entity.taskDistributionTime}, #{entity.taskAllocator}, #{entity.taskReceiver}, #{entity.taskComment},
- #{entity.taskStartTime}, #{entity.taskEndTime}, #{entity.attachmentUrl}, #{entity.projectStatus},
- #{entity.acceptTime}, #{entity.reviewTime}, #{entity.publicityTime}, #{entity.licenceTime},
- #{entity.certificateNumber}, #{entity.status}, #{entity.formRetrieve}, #{entity.taskRefund},
- #{entity.refundContent}, #{entity.retrieveContent}, #{entity.declareUser}, #{entity.declarePwd},
- #{entity.setUpAmount}, #{entity.arrivalMoney}, #{entity.outsourceName}, #{entity.outsourcePrice},
- #{entity.consultantId}, #{entity.managerId}, #{entity.outsource}, #{entity.splitSuper},
- #{entity.splitStatus}, #{entity.splitId}, #{entity.splitAid}, #{entity.splitTime}, #{entity.cname},
- #{entity.receiverName}, #{entity.declarationBatch}, #{entity.costReduction}, #{entity.officialCost},
- #{entity.setUpStatus}, #{entity.setUpTime}, #{entity.spotCheckStatus}, #{entity.highTechStatus},
- #{entity.specialComment}, #{entity.ifCertificationFee}, #{entity.certificationFee},
- #{entity.certificationCorporate}, #{entity.timeRecord}, #{entity.ifPublicity}, #{entity.checkStatus},
- #{entity.patentType}, #{entity.pubicityUrl}, #{entity.processStatus}, #{entity.memberType},
- #{entity.pictureUrl}, #{entity.satisfactionDegree}, #{entity.satisfactionDegreeUrl}, #{entity.examineType},
- #{entity.approval}, #{entity.completeDate}, #{entity.completeStatus}, #{entity.scoreStatus},
- #{entity.scoreNumber}, #{entity.htMember}, #{entity.additionalDeduction}, #{entity.rdAwardsubsidy},
- #{entity.technologyProjectType}, #{entity.ordinaryRisk}, #{entity.days}, #{entity.scheme},
- #{entity.progressTid})
- </foreach>
- </insert>
- <insert id="insertOrUpdateBatch" keyProperty="id" 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, examine_type, approval, complete_date, complete_status,
- score_status, score_number, ht_member, additional_deduction, rd_awardsubsidy, technology_project_Type,
- ordinary_risk, days, scheme, progress_tid)
- values
- <foreach collection="entities" item="entity" separator=",">
- (#{entity.orderNo}, #{entity.main}, #{entity.superId}, #{entity.commodityId}, #{entity.commodityName},
- #{entity.commodityQuantity}, #{entity.commodityMode}, #{entity.commodityPrice}, #{entity.taskStatus},
- #{entity.taskDistributionTime}, #{entity.taskAllocator}, #{entity.taskReceiver}, #{entity.taskComment},
- #{entity.taskStartTime}, #{entity.taskEndTime}, #{entity.attachmentUrl}, #{entity.projectStatus},
- #{entity.acceptTime}, #{entity.reviewTime}, #{entity.publicityTime}, #{entity.licenceTime},
- #{entity.certificateNumber}, #{entity.status}, #{entity.formRetrieve}, #{entity.taskRefund},
- #{entity.refundContent}, #{entity.retrieveContent}, #{entity.declareUser}, #{entity.declarePwd},
- #{entity.setUpAmount}, #{entity.arrivalMoney}, #{entity.outsourceName}, #{entity.outsourcePrice},
- #{entity.consultantId}, #{entity.managerId}, #{entity.outsource}, #{entity.splitSuper},
- #{entity.splitStatus}, #{entity.splitId}, #{entity.splitAid}, #{entity.splitTime}, #{entity.cname},
- #{entity.receiverName}, #{entity.declarationBatch}, #{entity.costReduction}, #{entity.officialCost},
- #{entity.setUpStatus}, #{entity.setUpTime}, #{entity.spotCheckStatus}, #{entity.highTechStatus},
- #{entity.specialComment}, #{entity.ifCertificationFee}, #{entity.certificationFee},
- #{entity.certificationCorporate}, #{entity.timeRecord}, #{entity.ifPublicity}, #{entity.checkStatus},
- #{entity.patentType}, #{entity.pubicityUrl}, #{entity.processStatus}, #{entity.memberType},
- #{entity.pictureUrl}, #{entity.satisfactionDegree}, #{entity.satisfactionDegreeUrl}, #{entity.examineType},
- #{entity.approval}, #{entity.completeDate}, #{entity.completeStatus}, #{entity.scoreStatus},
- #{entity.scoreNumber}, #{entity.htMember}, #{entity.additionalDeduction}, #{entity.rdAwardsubsidy},
- #{entity.technologyProjectType}, #{entity.ordinaryRisk}, #{entity.days}, #{entity.scheme},
- #{entity.progressTid})
- </foreach>
- on duplicate key update
- order_no = values(order_no),
- main = values(main),
- super_id = values(super_id),
- commodity_id = values(commodity_id),
- commodity_name = values(commodity_name),
- commodity_quantity = values(commodity_quantity),
- commodity_mode = values(commodity_mode),
- commodity_price = values(commodity_price),
- task_status = values(task_status),
- task_distribution_time = values(task_distribution_time),
- task_allocator = values(task_allocator),
- task_receiver = values(task_receiver),
- task_comment = values(task_comment),
- task_start_time = values(task_start_time),
- task_end_time = values(task_end_time),
- attachment_url = values(attachment_url),
- project_status = values(project_status),
- accept_time = values(accept_time),
- review_time = values(review_time),
- publicity_time = values(publicity_time),
- licence_time = values(licence_time),
- certificate_number = values(certificate_number),
- status = values(status),
- form_retrieve = values(form_retrieve),
- task_refund = values(task_refund),
- refund_content = values(refund_content),
- retrieve_content = values(retrieve_content),
- declare_user = values(declare_user),
- declare_pwd = values(declare_pwd),
- set_up_amount = values(set_up_amount),
- arrival_money = values(arrival_money),
- outsource_name = values(outsource_name),
- outsource_price = values(outsource_price),
- consultant_id = values(consultant_id),
- manager_id = values(manager_id),
- outsource = values(outsource),
- split_super = values(split_super),
- split_status = values(split_status),
- split_id = values(split_id),
- split_aid = values(split_aid),
- split_time = values(split_time),
- cname = values(cname),
- receiver_name = values(receiver_name),
- declaration_batch = values(declaration_batch),
- cost_reduction = values(cost_reduction),
- official_cost = values(official_cost),
- set_up_status = values(set_up_status),
- set_up_time = values(set_up_time),
- spot_check_status = values(spot_check_status),
- high_tech_status = values(high_tech_status),
- special_comment = values(special_comment),
- if_certification_fee = values(if_certification_fee),
- certification_fee = values(certification_fee),
- certification_corporate = values(certification_corporate),
- time_record = values(time_record),
- if_publicity = values(if_publicity),
- check_status = values(check_status),
- patent_type = values(patent_type),
- pubicity_url = values(pubicity_url),
- process_status = values(process_status),
- member_type = values(member_type),
- picture_url = values(picture_url),
- satisfaction_degree = values(satisfaction_degree),
- satisfaction_degree_url = values(satisfaction_degree_url),
- examine_type = values(examine_type),
- approval = values(approval),
- complete_date = values(complete_date),
- complete_status = values(complete_status),
- score_status = values(score_status),
- score_number = values(score_number),
- ht_member = values(ht_member),
- additional_deduction = values(additional_deduction),
- rd_awardsubsidy = values(rd_awardsubsidy),
- technology_project_Type = values(technology_project_Type),
- ordinary_risk = values(ordinary_risk),
- days = values(days),
- scheme = values(scheme),
- progress_tid = values(progress_tid)
- </insert>
- <!--通过主键修改数据-->
- <update id="update">
- update t_order_task
- <set>
- <if test="orderNo != null and orderNo != ''">
- order_no = #{orderNo},
- </if>
- <if test="main != null">
- main = #{main},
- </if>
- <if test="superId != null and superId != ''">
- super_id = #{superId},
- </if>
- <if test="commodityId != null and commodityId != ''">
- commodity_id = #{commodityId},
- </if>
- <if test="commodityName != null and commodityName != ''">
- commodity_name = #{commodityName},
- </if>
- <if test="commodityQuantity != null">
- commodity_quantity = #{commodityQuantity},
- </if>
- <if test="commodityMode != null and commodityMode != ''">
- commodity_mode = #{commodityMode},
- </if>
- <if test="commodityPrice != null">
- commodity_price = #{commodityPrice},
- </if>
- <if test="taskStatus != null">
- task_status = #{taskStatus},
- </if>
- <if test="taskDistributionTime != null">
- task_distribution_time = #{taskDistributionTime},
- </if>
- <if test="taskAllocator != null and taskAllocator != ''">
- task_allocator = #{taskAllocator},
- </if>
- <if test="taskReceiver != null and taskReceiver != ''">
- task_receiver = #{taskReceiver},
- </if>
- <if test="taskComment != null and taskComment != ''">
- task_comment = #{taskComment},
- </if>
- <if test="taskStartTime != null">
- task_start_time = #{taskStartTime},
- </if>
- <if test="taskEndTime != null">
- task_end_time = #{taskEndTime},
- </if>
- <if test="attachmentUrl != null and attachmentUrl != ''">
- attachment_url = #{attachmentUrl},
- </if>
- <if test="projectStatus != null">
- project_status = #{projectStatus},
- </if>
- <if test="acceptTime != null">
- accept_time = #{acceptTime},
- </if>
- <if test="reviewTime != null">
- review_time = #{reviewTime},
- </if>
- <if test="publicityTime != null">
- publicity_time = #{publicityTime},
- </if>
- <if test="licenceTime != null">
- licence_time = #{licenceTime},
- </if>
- <if test="certificateNumber != null and certificateNumber != ''">
- certificate_number = #{certificateNumber},
- </if>
- <if test="status != null">
- status = #{status},
- </if>
- <if test="formRetrieve != null">
- form_retrieve = #{formRetrieve},
- </if>
- <if test="taskRefund != null">
- task_refund = #{taskRefund},
- </if>
- <if test="refundContent != null and refundContent != ''">
- refund_content = #{refundContent},
- </if>
- <if test="retrieveContent != null and retrieveContent != ''">
- retrieve_content = #{retrieveContent},
- </if>
- <if test="declareUser != null and declareUser != ''">
- declare_user = #{declareUser},
- </if>
- <if test="declarePwd != null and declarePwd != ''">
- declare_pwd = #{declarePwd},
- </if>
- <if test="setUpAmount != null">
- set_up_amount = #{setUpAmount},
- </if>
- <if test="arrivalMoney != null">
- arrival_money = #{arrivalMoney},
- </if>
- <if test="outsourceName != null and outsourceName != ''">
- outsource_name = #{outsourceName},
- </if>
- <if test="outsourcePrice != null">
- outsource_price = #{outsourcePrice},
- </if>
- <if test="consultantId != null and consultantId != ''">
- consultant_id = #{consultantId},
- </if>
- <if test="managerId != null and managerId != ''">
- manager_id = #{managerId},
- </if>
- <if test="outsource != null">
- outsource = #{outsource},
- </if>
- <if test="splitSuper != null">
- split_super = #{splitSuper},
- </if>
- <if test="splitStatus != null">
- split_status = #{splitStatus},
- </if>
- <if test="splitId != null">
- split_id = #{splitId},
- </if>
- <if test="splitAid != null and splitAid != ''">
- split_aid = #{splitAid},
- </if>
- <if test="splitTime != null">
- split_time = #{splitTime},
- </if>
- <if test="cname != null and cname != ''">
- cname = #{cname},
- </if>
- <if test="receiverName != null and receiverName != ''">
- receiver_name = #{receiverName},
- </if>
- <if test="declarationBatch != null">
- declaration_batch = #{declarationBatch},
- </if>
- <if test="costReduction != null">
- cost_reduction = #{costReduction},
- </if>
- <if test="officialCost != null">
- official_cost = #{officialCost},
- </if>
- <if test="setUpStatus != null">
- set_up_status = #{setUpStatus},
- </if>
- <if test="setUpTime != null">
- set_up_time = #{setUpTime},
- </if>
- <if test="spotCheckStatus != null">
- spot_check_status = #{spotCheckStatus},
- </if>
- <if test="highTechStatus != null">
- high_tech_status = #{highTechStatus},
- </if>
- <if test="specialComment != null and specialComment != ''">
- special_comment = #{specialComment},
- </if>
- <if test="ifCertificationFee != null">
- if_certification_fee = #{ifCertificationFee},
- </if>
- <if test="certificationFee != null">
- certification_fee = #{certificationFee},
- </if>
- <if test="certificationCorporate != null and certificationCorporate != ''">
- certification_corporate = #{certificationCorporate},
- </if>
- <if test="timeRecord != null and timeRecord != ''">
- time_record = #{timeRecord},
- </if>
- <if test="ifPublicity != null">
- if_publicity = #{ifPublicity},
- </if>
- <if test="checkStatus != null">
- check_status = #{checkStatus},
- </if>
- <if test="patentType != null">
- patent_type = #{patentType},
- </if>
- <if test="pubicityUrl != null and pubicityUrl != ''">
- pubicity_url = #{pubicityUrl},
- </if>
- <if test="processStatus != null">
- process_status = #{processStatus},
- </if>
- <if test="memberType != null">
- member_type = #{memberType},
- </if>
- <if test="pictureUrl != null and pictureUrl != ''">
- picture_url = #{pictureUrl},
- </if>
- <if test="satisfactionDegree != null">
- satisfaction_degree = #{satisfactionDegree},
- </if>
- <if test="satisfactionDegreeUrl != null and satisfactionDegreeUrl != ''">
- satisfaction_degree_url = #{satisfactionDegreeUrl},
- </if>
- <if test="examineType != null">
- examine_type = #{examineType},
- </if>
- <if test="approval != null">
- approval = #{approval},
- </if>
- <if test="completeDate != null">
- complete_date = #{completeDate},
- </if>
- <if test="completeStatus != null">
- complete_status = #{completeStatus},
- </if>
- <if test="scoreStatus != null">
- score_status = #{scoreStatus},
- </if>
- <if test="scoreNumber != null">
- score_number = #{scoreNumber},
- </if>
- <if test="htMember != null">
- ht_member = #{htMember},
- </if>
- <if test="additionalDeduction != null">
- additional_deduction = #{additionalDeduction},
- </if>
- <if test="rdAwardsubsidy != null">
- rd_awardsubsidy = #{rdAwardsubsidy},
- </if>
- <if test="technologyProjectType != null">
- technology_project_Type = #{technologyProjectType},
- </if>
- <if test="ordinaryRisk != null">
- ordinary_risk = #{ordinaryRisk},
- </if>
- <if test="days != null">
- days = #{days},
- </if>
- <if test="scheme != null">
- scheme = #{scheme},
- </if>
- <if test="progressTid != null">
- progress_tid = #{progressTid},
- </if>
- </set>
- where id = #{id}
- </update>
- <!--查询指定行数据-->
- <select id="findTOrderTaskList" resultMap="TOrderTaskMap">
- select
- <include refid="TOrderTaskAllSql"/>
- from t_order_task
- <where>
- <if test="id != null">
- and id = #{id}
- </if>
- <if test="orderNo != null and orderNo != ''">
- and order_no = #{orderNo}
- </if>
- <if test="main != null">
- and main = #{main}
- </if>
- <if test="superId != null and superId != ''">
- and super_id = #{superId}
- </if>
- <if test="commodityId != null and commodityId != ''">
- and commodity_id = #{commodityId}
- </if>
- <if test="commodityName != null and commodityName != ''">
- and commodity_name = #{commodityName}
- </if>
- <if test="commodityQuantity != null">
- and commodity_quantity = #{commodityQuantity}
- </if>
- <if test="commodityMode != null and commodityMode != ''">
- and commodity_mode = #{commodityMode}
- </if>
- <if test="commodityPrice != null">
- and commodity_price = #{commodityPrice}
- </if>
- <if test="taskStatus != null">
- and task_status = #{taskStatus}
- </if>
- <if test="taskDistributionTime != null">
- and task_distribution_time = #{taskDistributionTime}
- </if>
- <if test="taskAllocator != null and taskAllocator != ''">
- and task_allocator = #{taskAllocator}
- </if>
- <if test="taskReceiver != null and taskReceiver != ''">
- and task_receiver = #{taskReceiver}
- </if>
- <if test="taskComment != null and taskComment != ''">
- and task_comment = #{taskComment}
- </if>
- <if test="taskStartTime != null">
- and task_start_time = #{taskStartTime}
- </if>
- <if test="taskEndTime != null">
- and task_end_time = #{taskEndTime}
- </if>
- <if test="attachmentUrl != null and attachmentUrl != ''">
- and attachment_url = #{attachmentUrl}
- </if>
- <if test="projectStatus != null">
- and project_status = #{projectStatus}
- </if>
- <if test="acceptTime != null">
- and accept_time = #{acceptTime}
- </if>
- <if test="reviewTime != null">
- and review_time = #{reviewTime}
- </if>
- <if test="publicityTime != null">
- and publicity_time = #{publicityTime}
- </if>
- <if test="licenceTime != null">
- and licence_time = #{licenceTime}
- </if>
- <if test="certificateNumber != null and certificateNumber != ''">
- and certificate_number = #{certificateNumber}
- </if>
- <if test="status != null">
- and status = #{status}
- </if>
- <if test="formRetrieve != null">
- and form_retrieve = #{formRetrieve}
- </if>
- <if test="taskRefund != null">
- and task_refund = #{taskRefund}
- </if>
- <if test="refundContent != null and refundContent != ''">
- and refund_content = #{refundContent}
- </if>
- <if test="retrieveContent != null and retrieveContent != ''">
- and retrieve_content = #{retrieveContent}
- </if>
- <if test="declareUser != null and declareUser != ''">
- and declare_user = #{declareUser}
- </if>
- <if test="declarePwd != null and declarePwd != ''">
- and declare_pwd = #{declarePwd}
- </if>
- <if test="setUpAmount != null">
- and set_up_amount = #{setUpAmount}
- </if>
- <if test="arrivalMoney != null">
- and arrival_money = #{arrivalMoney}
- </if>
- <if test="outsourceName != null and outsourceName != ''">
- and outsource_name = #{outsourceName}
- </if>
- <if test="outsourcePrice != null">
- and outsource_price = #{outsourcePrice}
- </if>
- <if test="consultantId != null and consultantId != ''">
- and consultant_id = #{consultantId}
- </if>
- <if test="managerId != null and managerId != ''">
- and manager_id = #{managerId}
- </if>
- <if test="outsource != null">
- and outsource = #{outsource}
- </if>
- <if test="splitSuper != null">
- and split_super = #{splitSuper}
- </if>
- <if test="splitStatus != null">
- and split_status = #{splitStatus}
- </if>
- <if test="splitId != null">
- and split_id = #{splitId}
- </if>
- <if test="splitAid != null and splitAid != ''">
- and split_aid = #{splitAid}
- </if>
- <if test="splitTime != null">
- and split_time = #{splitTime}
- </if>
- <if test="cname != null and cname != ''">
- and cname = #{cname}
- </if>
- <if test="receiverName != null and receiverName != ''">
- and receiver_name = #{receiverName}
- </if>
- <if test="declarationBatch != null">
- and declaration_batch = #{declarationBatch}
- </if>
- <if test="costReduction != null">
- and cost_reduction = #{costReduction}
- </if>
- <if test="officialCost != null">
- and official_cost = #{officialCost}
- </if>
- <if test="setUpStatus != null">
- and set_up_status = #{setUpStatus}
- </if>
- <if test="setUpTime != null">
- and set_up_time = #{setUpTime}
- </if>
- <if test="spotCheckStatus != null">
- and spot_check_status = #{spotCheckStatus}
- </if>
- <if test="highTechStatus != null">
- and high_tech_status = #{highTechStatus}
- </if>
- <if test="specialComment != null and specialComment != ''">
- and special_comment = #{specialComment}
- </if>
- <if test="ifCertificationFee != null">
- and if_certification_fee = #{ifCertificationFee}
- </if>
- <if test="certificationFee != null">
- and certification_fee = #{certificationFee}
- </if>
- <if test="certificationCorporate != null and certificationCorporate != ''">
- and certification_corporate = #{certificationCorporate}
- </if>
- <if test="timeRecord != null and timeRecord != ''">
- and time_record = #{timeRecord}
- </if>
- <if test="ifPublicity != null">
- and if_publicity = #{ifPublicity}
- </if>
- <if test="checkStatus != null">
- and check_status = #{checkStatus}
- </if>
- <if test="patentType != null">
- and patent_type = #{patentType}
- </if>
- <if test="pubicityUrl != null and pubicityUrl != ''">
- and pubicity_url = #{pubicityUrl}
- </if>
- <if test="processStatus != null">
- and process_status = #{processStatus}
- </if>
- <if test="memberType != null">
- and member_type = #{memberType}
- </if>
- <if test="pictureUrl != null and pictureUrl != ''">
- and picture_url = #{pictureUrl}
- </if>
- <if test="satisfactionDegree != null">
- and satisfaction_degree = #{satisfactionDegree}
- </if>
- <if test="satisfactionDegreeUrl != null and satisfactionDegreeUrl != ''">
- and satisfaction_degree_url = #{satisfactionDegreeUrl}
- </if>
- <if test="examineType != null">
- and examine_type = #{examineType}
- </if>
- <if test="approval != null">
- and approval = #{approval}
- </if>
- <if test="completeDate != null">
- and complete_date = #{completeDate}
- </if>
- <if test="completeStatus != null">
- and complete_status = #{completeStatus}
- </if>
- <if test="scoreStatus != null">
- and score_status = #{scoreStatus}
- </if>
- <if test="scoreNumber != null">
- and score_number = #{scoreNumber}
- </if>
- <if test="htMember != null">
- and ht_member = #{htMember}
- </if>
- <if test="additionalDeduction != null">
- and additional_deduction = #{additionalDeduction}
- </if>
- <if test="rdAwardsubsidy != null">
- and rd_awardsubsidy = #{rdAwardsubsidy}
- </if>
- <if test="technologyProjectType != null">
- and technology_project_Type = #{technologyProjectType}
- </if>
- <if test="ordinaryRisk != null">
- and ordinary_risk = #{ordinaryRisk}
- </if>
- <if test="days != null">
- and days = #{days}
- </if>
- <if test="scheme != null">
- and scheme = #{scheme}
- </if>
- <if test="progressTid != null">
- and progress_tid = #{progressTid}
- </if>
- </where>
- <if test="page_sql != null">
- ${page_sql}
- </if>
- </select>
- <!--统计总行数-->
- <select id="findTOrderTaskCount" resultType="java.lang.Integer">
- select count(1)
- from t_order_task
- <where>
- <if test="id != null">
- and id = #{id}
- </if>
- <if test="orderNo != null and orderNo != ''">
- and order_no = #{orderNo}
- </if>
- <if test="main != null">
- and main = #{main}
- </if>
- <if test="superId != null and superId != ''">
- and super_id = #{superId}
- </if>
- <if test="commodityId != null and commodityId != ''">
- and commodity_id = #{commodityId}
- </if>
- <if test="commodityName != null and commodityName != ''">
- and commodity_name = #{commodityName}
- </if>
- <if test="commodityQuantity != null">
- and commodity_quantity = #{commodityQuantity}
- </if>
- <if test="commodityMode != null and commodityMode != ''">
- and commodity_mode = #{commodityMode}
- </if>
- <if test="commodityPrice != null">
- and commodity_price = #{commodityPrice}
- </if>
- <if test="taskStatus != null">
- and task_status = #{taskStatus}
- </if>
- <if test="taskDistributionTime != null">
- and task_distribution_time = #{taskDistributionTime}
- </if>
- <if test="taskAllocator != null and taskAllocator != ''">
- and task_allocator = #{taskAllocator}
- </if>
- <if test="taskReceiver != null and taskReceiver != ''">
- and task_receiver = #{taskReceiver}
- </if>
- <if test="taskComment != null and taskComment != ''">
- and task_comment = #{taskComment}
- </if>
- <if test="taskStartTime != null">
- and task_start_time = #{taskStartTime}
- </if>
- <if test="taskEndTime != null">
- and task_end_time = #{taskEndTime}
- </if>
- <if test="attachmentUrl != null and attachmentUrl != ''">
- and attachment_url = #{attachmentUrl}
- </if>
- <if test="projectStatus != null">
- and project_status = #{projectStatus}
- </if>
- <if test="acceptTime != null">
- and accept_time = #{acceptTime}
- </if>
- <if test="reviewTime != null">
- and review_time = #{reviewTime}
- </if>
- <if test="publicityTime != null">
- and publicity_time = #{publicityTime}
- </if>
- <if test="licenceTime != null">
- and licence_time = #{licenceTime}
- </if>
- <if test="certificateNumber != null and certificateNumber != ''">
- and certificate_number = #{certificateNumber}
- </if>
- <if test="status != null">
- and status = #{status}
- </if>
- <if test="formRetrieve != null">
- and form_retrieve = #{formRetrieve}
- </if>
- <if test="taskRefund != null">
- and task_refund = #{taskRefund}
- </if>
- <if test="refundContent != null and refundContent != ''">
- and refund_content = #{refundContent}
- </if>
- <if test="retrieveContent != null and retrieveContent != ''">
- and retrieve_content = #{retrieveContent}
- </if>
- <if test="declareUser != null and declareUser != ''">
- and declare_user = #{declareUser}
- </if>
- <if test="declarePwd != null and declarePwd != ''">
- and declare_pwd = #{declarePwd}
- </if>
- <if test="setUpAmount != null">
- and set_up_amount = #{setUpAmount}
- </if>
- <if test="arrivalMoney != null">
- and arrival_money = #{arrivalMoney}
- </if>
- <if test="outsourceName != null and outsourceName != ''">
- and outsource_name = #{outsourceName}
- </if>
- <if test="outsourcePrice != null">
- and outsource_price = #{outsourcePrice}
- </if>
- <if test="consultantId != null and consultantId != ''">
- and consultant_id = #{consultantId}
- </if>
- <if test="managerId != null and managerId != ''">
- and manager_id = #{managerId}
- </if>
- <if test="outsource != null">
- and outsource = #{outsource}
- </if>
- <if test="splitSuper != null">
- and split_super = #{splitSuper}
- </if>
- <if test="splitStatus != null">
- and split_status = #{splitStatus}
- </if>
- <if test="splitId != null">
- and split_id = #{splitId}
- </if>
- <if test="splitAid != null and splitAid != ''">
- and split_aid = #{splitAid}
- </if>
- <if test="splitTime != null">
- and split_time = #{splitTime}
- </if>
- <if test="cname != null and cname != ''">
- and cname = #{cname}
- </if>
- <if test="receiverName != null and receiverName != ''">
- and receiver_name = #{receiverName}
- </if>
- <if test="declarationBatch != null">
- and declaration_batch = #{declarationBatch}
- </if>
- <if test="costReduction != null">
- and cost_reduction = #{costReduction}
- </if>
- <if test="officialCost != null">
- and official_cost = #{officialCost}
- </if>
- <if test="setUpStatus != null">
- and set_up_status = #{setUpStatus}
- </if>
- <if test="setUpTime != null">
- and set_up_time = #{setUpTime}
- </if>
- <if test="spotCheckStatus != null">
- and spot_check_status = #{spotCheckStatus}
- </if>
- <if test="highTechStatus != null">
- and high_tech_status = #{highTechStatus}
- </if>
- <if test="specialComment != null and specialComment != ''">
- and special_comment = #{specialComment}
- </if>
- <if test="ifCertificationFee != null">
- and if_certification_fee = #{ifCertificationFee}
- </if>
- <if test="certificationFee != null">
- and certification_fee = #{certificationFee}
- </if>
- <if test="certificationCorporate != null and certificationCorporate != ''">
- and certification_corporate = #{certificationCorporate}
- </if>
- <if test="timeRecord != null and timeRecord != ''">
- and time_record = #{timeRecord}
- </if>
- <if test="ifPublicity != null">
- and if_publicity = #{ifPublicity}
- </if>
- <if test="checkStatus != null">
- and check_status = #{checkStatus}
- </if>
- <if test="patentType != null">
- and patent_type = #{patentType}
- </if>
- <if test="pubicityUrl != null and pubicityUrl != ''">
- and pubicity_url = #{pubicityUrl}
- </if>
- <if test="processStatus != null">
- and process_status = #{processStatus}
- </if>
- <if test="memberType != null">
- and member_type = #{memberType}
- </if>
- <if test="pictureUrl != null and pictureUrl != ''">
- and picture_url = #{pictureUrl}
- </if>
- <if test="satisfactionDegree != null">
- and satisfaction_degree = #{satisfactionDegree}
- </if>
- <if test="satisfactionDegreeUrl != null and satisfactionDegreeUrl != ''">
- and satisfaction_degree_url = #{satisfactionDegreeUrl}
- </if>
- <if test="examineType != null">
- and examine_type = #{examineType}
- </if>
- <if test="approval != null">
- and approval = #{approval}
- </if>
- <if test="completeDate != null">
- and complete_date = #{completeDate}
- </if>
- <if test="completeStatus != null">
- and complete_status = #{completeStatus}
- </if>
- <if test="scoreStatus != null">
- and score_status = #{scoreStatus}
- </if>
- <if test="scoreNumber != null">
- and score_number = #{scoreNumber}
- </if>
- <if test="htMember != null">
- and ht_member = #{htMember}
- </if>
- <if test="additionalDeduction != null">
- and additional_deduction = #{additionalDeduction}
- </if>
- <if test="rdAwardsubsidy != null">
- and rd_awardsubsidy = #{rdAwardsubsidy}
- </if>
- <if test="technologyProjectType != null">
- and technology_project_Type = #{technologyProjectType}
- </if>
- <if test="ordinaryRisk != null">
- and ordinary_risk = #{ordinaryRisk}
- </if>
- <if test="days != null">
- and days = #{days}
- </if>
- <if test="scheme != null">
- and scheme = #{scheme}
- </if>
- <if test="progressTid != null">
- and progress_tid = #{progressTid}
- </if>
- </where>
- </select>
- <!--通过主键删除-->
- <delete id="deleteById">
- delete from t_order_task where id = #{id}
- </delete>
- <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>
- <if test="examineType != null">
- examine_type,
- </if>
- <if test="approval != null">
- approval,
- </if>
- <if test="completeDate != null">
- complete_date,
- </if>
- <if test="completeStatus != null">
- complete_status ,
- </if>
- <if test="scoreStatus != null">
- score_status ,
- </if>
- <if test="scoreNumber != null">
- score_number ,
- </if>
- <if test="htMember != null">
- ht_member ,
- </if>
- <if test="additionalDeduction != null">
- additional_deduction,
- </if>
- <if test="rdAwardsubsidy != null">
- rd_awardsubsidy ,
- </if>
- <if test="technologyProjectType != null">
- technology_project_Type ,
- </if>
- <if test="ordinaryRisk != null">
- ordinary_risk,
- </if>
- <if test="days != null">
- days,
- </if>
- <if test="scheme != null">
- scheme,
- </if>
- <if test="progressTid != null">
- progress_tid,
- </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>
- <if test="examineType != null">
- #{examineType,jdbcType=INTEGER},
- </if>
- <if test="approval != null">
- #{approval,jdbcType=INTEGER},
- </if>
- <if test="completeDate != null">
- #{completeDate},
- </if>
- <if test="completeStatus != null">
- #{completeStatus},
- </if>
- <if test="scoreStatus != null">
- #{scoreStatus},
- </if>
- <if test="scoreNumber != null">
- #{scoreNumber},
- </if>
- <if test="htMember != null">
- #{htMember},
- </if>
- <if test="additionalDeduction != null">
- #{additionalDeduction},
- </if>
- <if test="rdAwardsubsidy != null">
- #{rdAwardsubsidy},
- </if>
- <if test="technologyProjectType != null">
- #{technologyProjectType},
- </if>
- <if test="ordinaryRisk != null">
- #{ordinaryRisk},
- </if>
- <if test="days != null">
- #{days},
- </if>
- <if test="scheme != null">
- #{scheme},
- </if>
- <if test="progressTid != null">
- #{progressTid},
- </if>
- </trim>
- </insert>
- <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>
- <if test="scoreStatus != null">
- score_status = #{scoreStatus},
- </if>
- <if test="scoreNumber != null">
- score_number = #{scoreNumber},
- </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,a.score_status scoreStatus,a.score_number scoreNumber,
- 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,i.project_type as projectType,
- 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,
- a.ht_member htMember,a.additional_deduction additionalDeduction,a.rd_awardsubsidy rdAwardsubsidy,
- a.technology_project_Type technologyProjectType,a.ordinary_risk ordinaryRisk,a.days,a.scheme,
- a.ht_member htMember,a.additional_deduction additionalDeduction,a.rd_awardsubsidy rdAwardsubsidy
- 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,
- a.ht_member htMember,a.additional_deduction additionalDeduction,a.rd_awardsubsidy rdAwardsubsidy
- 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,tmer.service_year serviceYear,toa.type,toa.type_explain typeExplain,c.sort cSort,
- a.ht_member as htMember,a.additional_deduction additionalDeduction,a.rd_awardsubsidy rdAwardsubsidy,b.project_type as memberProjectType,
- a.technology_project_Type as technologyProjectType,a.ordinary_risk as ordinaryRisk,a.days,a.scheme
- 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 left join t_task_member tmer on a.id=tmer.tid
- left join (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
- from t_order_approval group by order_no) toa on e.order_no=toa.order_no
- <if test="type !=null">
- inner join (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
- from t_order_approval
- where `type` in
- <foreach collection="type" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- group by order_no) toa2 on e.order_no=toa2.order_no
- </if>
- where e.delete_sign in (0,2,3) and e.order_status in (2,4)
- and a.outsource= #{outsource,jdbcType=INTEGER}
- <include refid="selectOrderTaskListSql"/>
- order by a.task_distribution_time desc
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
- <sql id="selectOrderTaskListSql">
- <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="projectName != null">
- and a.commodity_name like CONCAT('%',#{projectName,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>
- <if test="memberProjectType !=null">
- <if test="memberProjectType == 1">
- and a.ht_member= 1
- </if>
- <if test="memberProjectType == 2">
- and a.additional_deduction=1
- </if>
- <if test="memberProjectType == 3">
- and a.rd_awardsubsidy=1
- </if>
- </if>
- </sql>
- <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>
- <if test="type !=null">
- inner join
- (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
- from t_order_approval
- where `type` in
- <foreach collection="type" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- group by order_no) toa on e.order_no=toa.order_no
- </if>
- where e.delete_sign in (0,2,3) and e.order_status in (2,4)
- and a.outsource= #{outsource,jdbcType=INTEGER}
- <include refid="selectOrderTaskListSql"/>
- </select>
- <select id="selectOrderTaskListSum" resultType="java.util.Map">
- select sum(a.commodity_price) totalAmount,sum(a.commodity_quantity)totalNumber
- 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>
- <if test="type !=null">
- inner join
- (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
- from t_order_approval
- where `type` in
- <foreach collection="type" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- group by order_no) toa on e.order_no=toa.order_no
- </if>
- where e.delete_sign in (0,2,3) and e.order_status in (2,4)
- and a.outsource= #{outsource,jdbcType=INTEGER}
- <include refid="selectOrderTaskListSql"/>
- </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.score_status as scoreStatus,
- 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,ttm.contract_term contractTerm,ttm.service_year serviceYear,
- toa.type as type,toa.type_explain as typeExplain
- 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
- left join t_task_member ttm on a.id=ttm.tid
- left join (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
- from t_order_approval group by order_no) toa on e.order_no=toa.order_no
- <if test="type !=null">
- inner join
- (select distinct order_no
- from t_order_approval
- where `type` in
- <foreach collection="type" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- group by order_no) toa2 on e.order_no=toa2.order_no
- </if>
- 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
- <if test="type !=null">
- inner join
- (select distinct order_no
- from t_order_approval
- where `type` in
- <foreach collection="type" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- group by order_no) toa2 on e.order_no=toa2.order_no
- </if>
- 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
- 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,
- a.score_status scoreStatus,a.score_number scoreNumber,td.project_name projectMemberName,a.ht_member as htMember,a.additional_deduction as additionalDeduction,
- a.rd_awardsubsidy as rdAwardsubsidy
- 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
- left join task_details td on a.progress_tid=td.id
- 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 ,bc.sort cSort,
- (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,
- toa.type,toa.type_explain typeExplain,b.approval,a.score_status scoreStatus ,a.score_number scoreNumber,ts.create_time scoreTime
- 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
- left join task_score ts on a.id=ts.tid
- left join (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
- from t_order_approval group by order_no) toa on b.order_no=toa.order_no
- <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>
- <if test="type !=null">
- inner join (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
- from t_order_approval where `type` in
- <foreach collection="type" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- group by order_no) toa2 on b.order_no=toa2.order_no
- </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>
- <if test="type !=null">
- inner join
- (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
- from t_order_approval
- where `type` in
- <foreach collection="type" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- group by order_no) toa on b.order_no=toa.order_no
- </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,
- b.approval,toa.type,toa.type_explain typeExplain
- 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
- left join (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
- from t_order_approval group by order_no) toa on b.order_no=toa.order_no
- <if test="type !=null">
- inner join (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
- from t_order_approval where `type` in
- <foreach collection="type" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- group by order_no) toa on b.order_no=toa.order_no
- </if>
- 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
- <if test="type !=null">
- inner join
- (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
- from t_order_approval
- where `type` in
- <foreach collection="type" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- group by order_no) toa on b.order_no=toa.order_no
- </if>
- 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.examine_type examineType,
- a.process_status status,a.commodity_id commodityId,a.commodity_name commodityName,a.approval approvalType,
- a.commodity_quantity commodityQuantity,a.task_comment taskComment,a.picture_url pictureUrl,
- e.service_life serviceLife ,e.service_year serviceYear,e.year_sum yearSum,e.contract_term contractTerm,
- toa.type,toa.type_explain typeExplain
- 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
- left join (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
- from t_order_approval group by order_no) toa on b.order_no=toa.order_no
- <if test="shiroType ==2 or shiroType ==3">
- left join department d on b.order_dep =d.id
- </if>
- <if test="type !=null">
- inner join (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
- from t_order_approval
- where `type` in
- <foreach collection="type" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- group by order_no) toa2 on b.order_no=toa2.order_no
- </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} or d.retrial_finance_id =#{aid})
- </if>
- <if test="shiroType ==3">
- and d.approval_aid= #{aid}
- </if>
- <!-- <if test="approvalType !=null">-->
- <!-- and a.approval= #{approvalType}-->
- <!-- </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 or shiroType ==3">
- left join department d on b.order_dep =d.id
- </if>
- <if test="type !=null">
- inner join
- (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
- from t_order_approval
- where `type` in
- <foreach collection="type" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- group by order_no) toa on b.order_no=toa.order_no
- </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} or d.retrial_finance_id =#{aid})
- </if>
- <if test="shiroType ==3">
- and d.approval_aid= #{aid}
- </if>
- <!-- <if test="approvalType !=null">-->
- <!-- and a.approval= #{approvalType}-->
- <!-- </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="selectProjectStopList" resultType="com.goafanti.order.bo.OutSelectProjectStop">
- 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,tom.salesman_name salesmanName,
- 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="deps !=null">
- 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="selectProjectStopCount" 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="deps !=null">
- 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>
- <select id="selectAll" resultMap="TOrderTaskMap" >
- select
- <include refid="TOrderTaskAllSql" />
- from t_order_task
- where split_status in (0,2)
- </select>
- <select id="selectTasksByTid" resultMap="TOrderTaskMap" >
- select
- <include refid="TOrderTaskAllSql" />
- from t_order_task
- where order_no in (SELECT order_no from t_order_task where id= #{tid})
- </select>
- <select id="selectAdminTaskByTid" resultType="com.goafanti.order.bo.TOrderTaskBo">
- select a.id,a.task_receiver taskReceiver,a.score_number scoreNumber,c.sort cSort,a.score_status scoreStatus
- 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
- where c.sort in (3,6,9) and a.task_distribution_time>'2024-01-01' and a.split_status in (0,2)
- and a.task_receiver in (SELECT task_receiver from t_order_task
- where id = #{tid})
- </select>
- <select id="selectAdminTaskByAid" resultType="com.goafanti.order.bo.TOrderTaskBo">
- select a.id,a.task_receiver taskReceiver,a.score_number scoreNumber,c.sort cSort,a.score_status scoreStatus
- 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
- where c.sort in (3,6,9) and a.task_distribution_time>'2024-01-01' and a.split_status in (0,2)
- and a.task_receiver = #{aid}
- </select>
- <select id="orderNewSignToList" resultType="com.goafanti.order.bo.outStatistics.OutOrderNewSignBo">
- select a.name,department.name depName,(newCounts+counts)allCounts,(newAmount+amount) allAmount,
- newCounts,newAmount,(newCounts/(newCounts+counts)) newCountProportion,(newAmount/(newAmount+amount))newAmountProportion,
- counts,amount,(counts/(newCounts+counts)) countProportion,(amount/(newAmount+amount))amountProportion
- from (SELECT b.salesman_id,
- sum(if(b.new_sign_user=0,1,0))newCounts ,
- sum(if(b.new_sign_user=0,b.total_amount,0))newAmount,
- sum(if(b.new_sign_user=1,1,0))counts ,
- sum(if(b.new_sign_user=1,b.total_amount,0))amount
- from t_order_new b
- where b.process_status >0 and b.delete_sign in (0,2)
- and sign_time BETWEEN #{startTime} and #{endTime}
- group by b.salesman_id
- )x
- left join admin a on x.salesman_id =a.id
- left join department on a.department_id =department.id
- </select>
- </mapper>
|