TOrderTaskMapper.xml 96 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.goafanti.common.dao.TOrderTaskMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.TOrderTask">
  5. <id column="id" jdbcType="INTEGER" property="id" />
  6. <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
  7. <result column="main" jdbcType="INTEGER" property="main" />
  8. <result column="super_id" jdbcType="VARCHAR" property="superId" />
  9. <result column="commodity_id" jdbcType="VARCHAR" property="commodityId" />
  10. <result column="commodity_name" jdbcType="VARCHAR" property="commodityName" />
  11. <result column="commodity_quantity" jdbcType="INTEGER" property="commodityQuantity" />
  12. <result column="commodity_mode" jdbcType="VARCHAR" property="commodityMode" />
  13. <result column="commodity_price" jdbcType="DECIMAL" property="commodityPrice" />
  14. <result column="task_status" jdbcType="INTEGER" property="taskStatus" />
  15. <result column="task_distribution_time" jdbcType="TIMESTAMP" property="taskDistributionTime" />
  16. <result column="task_allocator" jdbcType="VARCHAR" property="taskAllocator" />
  17. <result column="task_receiver" jdbcType="VARCHAR" property="taskReceiver" />
  18. <result column="task_comment" jdbcType="VARCHAR" property="taskComment" />
  19. <result column="task_start_time" jdbcType="TIMESTAMP" property="taskStartTime" />
  20. <result column="task_end_time" jdbcType="TIMESTAMP" property="taskEndTime" />
  21. <result column="attachment_url" jdbcType="VARCHAR" property="attachmentUrl" />
  22. <result column="project_status" jdbcType="INTEGER" property="projectStatus" />
  23. <result column="accept_time" jdbcType="DATE" property="acceptTime" />
  24. <result column="review_time" jdbcType="DATE" property="reviewTime" />
  25. <result column="publicity_time" jdbcType="DATE" property="publicityTime" />
  26. <result column="licence_time" jdbcType="DATE" property="licenceTime" />
  27. <result column="certificate_number" jdbcType="VARCHAR" property="certificateNumber" />
  28. <result column="status" jdbcType="INTEGER" property="status" />
  29. <result column="form_retrieve" jdbcType="INTEGER" property="formRetrieve" />
  30. <result column="task_refund" jdbcType="INTEGER" property="taskRefund" />
  31. <result column="refund_content" jdbcType="VARCHAR" property="refundContent" />
  32. <result column="retrieve_content" jdbcType="VARCHAR" property="retrieveContent" />
  33. <result column="declare_user" jdbcType="VARCHAR" property="declareUser" />
  34. <result column="declare_pwd" jdbcType="VARCHAR" property="declarePwd" />
  35. <result column="set_up_amount" jdbcType="DECIMAL" property="setUpAmount" />
  36. <result column="arrival_money" jdbcType="INTEGER" property="arrivalMoney" />
  37. <result column="outsource_name" jdbcType="VARCHAR" property="outsourceName" />
  38. <result column="outsource_price" jdbcType="DECIMAL" property="outsourcePrice" />
  39. <result column="consultant_id" jdbcType="VARCHAR" property="consultantId" />
  40. <result column="manager_id" jdbcType="VARCHAR" property="managerId" />
  41. <result column="outsource" jdbcType="INTEGER" property="outsource" />
  42. <result column="split_super" jdbcType="INTEGER" property="splitSuper" />
  43. <result column="split_status" jdbcType="INTEGER" property="splitStatus" />
  44. <result column="split_id" jdbcType="INTEGER" property="splitId" />
  45. <result column="split_aid" jdbcType="VARCHAR" property="splitAid" />
  46. <result column="split_time" jdbcType="TIMESTAMP" property="splitTime" />
  47. <result column="cname" jdbcType="VARCHAR" property="cname" />
  48. <result column="receiver_name" jdbcType="VARCHAR" property="receiverName" />
  49. <result column="declaration_batch" jdbcType="INTEGER" property="declarationBatch" />
  50. <result column="cost_reduction" jdbcType="INTEGER" property="costReduction" />
  51. <result column="official_cost" jdbcType="INTEGER" property="officialCost" />
  52. <result column="set_up_status" jdbcType="INTEGER" property="setUpStatus" />
  53. <result column="set_up_time" jdbcType="TIMESTAMP" property="setUpTime" />
  54. <result column="spot_check_status" jdbcType="INTEGER" property="spotCheckStatus" />
  55. <result column="high_tech_status" jdbcType="INTEGER" property="highTechStatus" />
  56. <result column="special_comment" jdbcType="VARCHAR" property="specialComment" />
  57. <result column="if_certification_fee" jdbcType="INTEGER" property="ifCertificationFee" />
  58. <result column="certification_fee" jdbcType="DECIMAL" property="certificationFee" />
  59. <result column="certification_corporate" jdbcType="VARCHAR" property="certificationCorporate" />
  60. <result column="time_record" jdbcType="VARCHAR" property="timeRecord" />
  61. <result column="if_publicity" jdbcType="INTEGER" property="ifPublicity" />
  62. <result column="check_status" jdbcType="INTEGER" property="checkStatus" />
  63. <result column="patent_type" jdbcType="INTEGER" property="patentType" />
  64. <result column="pubicity_url" jdbcType="VARCHAR" property="pubicityUrl" />
  65. <result column="process_status" jdbcType="INTEGER" property="processStatus" />
  66. <result column="member_type" jdbcType="INTEGER" property="memberType" />
  67. <result column="picture_url" jdbcType="VARCHAR" property="pictureUrl" />
  68. </resultMap>
  69. <sql id="Base_Column_List">
  70. id, order_no, main, super_id, commodity_id, commodity_name, commodity_quantity, commodity_mode,
  71. commodity_price, task_status, task_distribution_time, task_allocator, task_receiver,
  72. task_comment, task_start_time, task_end_time, attachment_url, project_status, accept_time,
  73. review_time, publicity_time, licence_time, certificate_number, `status`, form_retrieve,
  74. task_refund, refund_content, retrieve_content, declare_user, declare_pwd, set_up_amount,
  75. arrival_money, outsource_name, outsource_price, consultant_id, manager_id, outsource,
  76. split_super, split_status, split_id, split_aid, split_time, cname, receiver_name,
  77. declaration_batch, cost_reduction, official_cost, set_up_status, set_up_time, spot_check_status,
  78. high_tech_status, special_comment, if_certification_fee, certification_fee, certification_corporate,
  79. time_record, if_publicity, check_status, patent_type, pubicity_url, process_status,
  80. member_type, picture_url
  81. </sql>
  82. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  83. select
  84. <include refid="Base_Column_List" />
  85. from t_order_task
  86. where id = #{id,jdbcType=INTEGER}
  87. </select>
  88. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  89. delete from t_order_task
  90. where id = #{id,jdbcType=INTEGER}
  91. </delete>
  92. <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderTask" useGeneratedKeys="true">
  93. insert into t_order_task (id, order_no, main,
  94. super_id, commodity_id, commodity_name,
  95. commodity_quantity, commodity_mode, commodity_price,
  96. task_status, task_distribution_time, task_allocator,
  97. task_receiver, task_comment, task_start_time,
  98. task_end_time, attachment_url, project_status,
  99. accept_time, review_time, publicity_time,
  100. licence_time, certificate_number, `status`,
  101. form_retrieve, task_refund, refund_content,
  102. retrieve_content, declare_user, declare_pwd,
  103. set_up_amount, arrival_money, outsource_name,
  104. outsource_price, consultant_id, manager_id,
  105. outsource, split_super, split_status,
  106. split_id, split_aid, split_time,
  107. cname, receiver_name, declaration_batch,
  108. cost_reduction, official_cost, set_up_status,
  109. set_up_time, spot_check_status, high_tech_status,
  110. special_comment, if_certification_fee, certification_fee,
  111. certification_corporate, time_record, if_publicity,
  112. check_status, patent_type, pubicity_url,
  113. process_status, member_type, picture_url
  114. )
  115. values (#{id,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{main,jdbcType=INTEGER},
  116. #{superId,jdbcType=VARCHAR}, #{commodityId,jdbcType=VARCHAR}, #{commodityName,jdbcType=VARCHAR},
  117. #{commodityQuantity,jdbcType=INTEGER}, #{commodityMode,jdbcType=VARCHAR}, #{commodityPrice,jdbcType=DECIMAL},
  118. #{taskStatus,jdbcType=INTEGER}, #{taskDistributionTime,jdbcType=TIMESTAMP}, #{taskAllocator,jdbcType=VARCHAR},
  119. #{taskReceiver,jdbcType=VARCHAR}, #{taskComment,jdbcType=VARCHAR}, #{taskStartTime,jdbcType=TIMESTAMP},
  120. #{taskEndTime,jdbcType=TIMESTAMP}, #{attachmentUrl,jdbcType=VARCHAR}, #{projectStatus,jdbcType=INTEGER},
  121. #{acceptTime,jdbcType=DATE}, #{reviewTime,jdbcType=DATE}, #{publicityTime,jdbcType=DATE},
  122. #{licenceTime,jdbcType=DATE}, #{certificateNumber,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
  123. #{formRetrieve,jdbcType=INTEGER}, #{taskRefund,jdbcType=INTEGER}, #{refundContent,jdbcType=VARCHAR},
  124. #{retrieveContent,jdbcType=VARCHAR}, #{declareUser,jdbcType=VARCHAR}, #{declarePwd,jdbcType=VARCHAR},
  125. #{setUpAmount,jdbcType=DECIMAL}, #{arrivalMoney,jdbcType=INTEGER}, #{outsourceName,jdbcType=VARCHAR},
  126. #{outsourcePrice,jdbcType=DECIMAL}, #{consultantId,jdbcType=VARCHAR}, #{managerId,jdbcType=VARCHAR},
  127. #{outsource,jdbcType=INTEGER}, #{splitSuper,jdbcType=INTEGER}, #{splitStatus,jdbcType=INTEGER},
  128. #{splitId,jdbcType=INTEGER}, #{splitAid,jdbcType=VARCHAR}, #{splitTime,jdbcType=TIMESTAMP},
  129. #{cname,jdbcType=VARCHAR}, #{receiverName,jdbcType=VARCHAR}, #{declarationBatch,jdbcType=INTEGER},
  130. #{costReduction,jdbcType=INTEGER}, #{officialCost,jdbcType=INTEGER}, #{setUpStatus,jdbcType=INTEGER},
  131. #{setUpTime,jdbcType=TIMESTAMP}, #{spotCheckStatus,jdbcType=INTEGER}, #{highTechStatus,jdbcType=INTEGER},
  132. #{specialComment,jdbcType=VARCHAR}, #{ifCertificationFee,jdbcType=INTEGER}, #{certificationFee,jdbcType=DECIMAL},
  133. #{certificationCorporate,jdbcType=VARCHAR}, #{timeRecord,jdbcType=VARCHAR}, #{ifPublicity,jdbcType=INTEGER},
  134. #{checkStatus,jdbcType=INTEGER}, #{patentType,jdbcType=INTEGER}, #{pubicityUrl,jdbcType=VARCHAR},
  135. #{processStatus,jdbcType=INTEGER}, #{memberType,jdbcType=INTEGER}, #{pictureUrl,jdbcType=VARCHAR}
  136. )
  137. </insert>
  138. <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderTask" useGeneratedKeys="true">
  139. insert into t_order_task
  140. <trim prefix="(" suffix=")" suffixOverrides=",">
  141. <if test="id != null">
  142. id,
  143. </if>
  144. <if test="orderNo != null">
  145. order_no,
  146. </if>
  147. <if test="main != null">
  148. main,
  149. </if>
  150. <if test="superId != null">
  151. super_id,
  152. </if>
  153. <if test="commodityId != null">
  154. commodity_id,
  155. </if>
  156. <if test="commodityName != null">
  157. commodity_name,
  158. </if>
  159. <if test="commodityQuantity != null">
  160. commodity_quantity,
  161. </if>
  162. <if test="commodityMode != null">
  163. commodity_mode,
  164. </if>
  165. <if test="commodityPrice != null">
  166. commodity_price,
  167. </if>
  168. <if test="taskStatus != null">
  169. task_status,
  170. </if>
  171. <if test="taskDistributionTime != null">
  172. task_distribution_time,
  173. </if>
  174. <if test="taskAllocator != null">
  175. task_allocator,
  176. </if>
  177. <if test="taskReceiver != null">
  178. task_receiver,
  179. </if>
  180. <if test="taskComment != null">
  181. task_comment,
  182. </if>
  183. <if test="taskStartTime != null">
  184. task_start_time,
  185. </if>
  186. <if test="taskEndTime != null">
  187. task_end_time,
  188. </if>
  189. <if test="attachmentUrl != null">
  190. attachment_url,
  191. </if>
  192. <if test="projectStatus != null">
  193. project_status,
  194. </if>
  195. <if test="acceptTime != null">
  196. accept_time,
  197. </if>
  198. <if test="reviewTime != null">
  199. review_time,
  200. </if>
  201. <if test="publicityTime != null">
  202. publicity_time,
  203. </if>
  204. <if test="licenceTime != null">
  205. licence_time,
  206. </if>
  207. <if test="certificateNumber != null">
  208. certificate_number,
  209. </if>
  210. <if test="status != null">
  211. `status`,
  212. </if>
  213. <if test="formRetrieve != null">
  214. form_retrieve,
  215. </if>
  216. <if test="taskRefund != null">
  217. task_refund,
  218. </if>
  219. <if test="refundContent != null">
  220. refund_content,
  221. </if>
  222. <if test="retrieveContent != null">
  223. retrieve_content,
  224. </if>
  225. <if test="declareUser != null">
  226. declare_user,
  227. </if>
  228. <if test="declarePwd != null">
  229. declare_pwd,
  230. </if>
  231. <if test="setUpAmount != null">
  232. set_up_amount,
  233. </if>
  234. <if test="arrivalMoney != null">
  235. arrival_money,
  236. </if>
  237. <if test="outsourceName != null">
  238. outsource_name,
  239. </if>
  240. <if test="outsourcePrice != null">
  241. outsource_price,
  242. </if>
  243. <if test="consultantId != null">
  244. consultant_id,
  245. </if>
  246. <if test="managerId != null">
  247. manager_id,
  248. </if>
  249. <if test="outsource != null">
  250. outsource,
  251. </if>
  252. <if test="splitSuper != null">
  253. split_super,
  254. </if>
  255. <if test="splitStatus != null">
  256. split_status,
  257. </if>
  258. <if test="splitId != null">
  259. split_id,
  260. </if>
  261. <if test="splitAid != null">
  262. split_aid,
  263. </if>
  264. <if test="splitTime != null">
  265. split_time,
  266. </if>
  267. <if test="cname != null">
  268. cname,
  269. </if>
  270. <if test="receiverName != null">
  271. receiver_name,
  272. </if>
  273. <if test="declarationBatch != null">
  274. declaration_batch,
  275. </if>
  276. <if test="costReduction != null">
  277. cost_reduction,
  278. </if>
  279. <if test="officialCost != null">
  280. official_cost,
  281. </if>
  282. <if test="setUpStatus != null">
  283. set_up_status,
  284. </if>
  285. <if test="setUpTime != null">
  286. set_up_time,
  287. </if>
  288. <if test="spotCheckStatus != null">
  289. spot_check_status,
  290. </if>
  291. <if test="highTechStatus != null">
  292. high_tech_status,
  293. </if>
  294. <if test="specialComment != null">
  295. special_comment,
  296. </if>
  297. <if test="ifCertificationFee != null">
  298. if_certification_fee,
  299. </if>
  300. <if test="certificationFee != null">
  301. certification_fee,
  302. </if>
  303. <if test="certificationCorporate != null">
  304. certification_corporate,
  305. </if>
  306. <if test="timeRecord != null">
  307. time_record,
  308. </if>
  309. <if test="ifPublicity != null">
  310. if_publicity,
  311. </if>
  312. <if test="checkStatus != null">
  313. check_status,
  314. </if>
  315. <if test="patentType != null">
  316. patent_type,
  317. </if>
  318. <if test="pubicityUrl != null">
  319. pubicity_url,
  320. </if>
  321. <if test="processStatus != null">
  322. process_status,
  323. </if>
  324. <if test="memberType != null">
  325. member_type,
  326. </if>
  327. <if test="pictureUrl != null">
  328. picture_url,
  329. </if>
  330. </trim>
  331. <trim prefix="values (" suffix=")" suffixOverrides=",">
  332. <if test="id != null">
  333. #{id,jdbcType=INTEGER},
  334. </if>
  335. <if test="orderNo != null">
  336. #{orderNo,jdbcType=VARCHAR},
  337. </if>
  338. <if test="main != null">
  339. #{main,jdbcType=INTEGER},
  340. </if>
  341. <if test="superId != null">
  342. #{superId,jdbcType=VARCHAR},
  343. </if>
  344. <if test="commodityId != null">
  345. #{commodityId,jdbcType=VARCHAR},
  346. </if>
  347. <if test="commodityName != null">
  348. #{commodityName,jdbcType=VARCHAR},
  349. </if>
  350. <if test="commodityQuantity != null">
  351. #{commodityQuantity,jdbcType=INTEGER},
  352. </if>
  353. <if test="commodityMode != null">
  354. #{commodityMode,jdbcType=VARCHAR},
  355. </if>
  356. <if test="commodityPrice != null">
  357. #{commodityPrice,jdbcType=DECIMAL},
  358. </if>
  359. <if test="taskStatus != null">
  360. #{taskStatus,jdbcType=INTEGER},
  361. </if>
  362. <if test="taskDistributionTime != null">
  363. #{taskDistributionTime,jdbcType=TIMESTAMP},
  364. </if>
  365. <if test="taskAllocator != null">
  366. #{taskAllocator,jdbcType=VARCHAR},
  367. </if>
  368. <if test="taskReceiver != null">
  369. #{taskReceiver,jdbcType=VARCHAR},
  370. </if>
  371. <if test="taskComment != null">
  372. #{taskComment,jdbcType=VARCHAR},
  373. </if>
  374. <if test="taskStartTime != null">
  375. #{taskStartTime,jdbcType=TIMESTAMP},
  376. </if>
  377. <if test="taskEndTime != null">
  378. #{taskEndTime,jdbcType=TIMESTAMP},
  379. </if>
  380. <if test="attachmentUrl != null">
  381. #{attachmentUrl,jdbcType=VARCHAR},
  382. </if>
  383. <if test="projectStatus != null">
  384. #{projectStatus,jdbcType=INTEGER},
  385. </if>
  386. <if test="acceptTime != null">
  387. #{acceptTime,jdbcType=DATE},
  388. </if>
  389. <if test="reviewTime != null">
  390. #{reviewTime,jdbcType=DATE},
  391. </if>
  392. <if test="publicityTime != null">
  393. #{publicityTime,jdbcType=DATE},
  394. </if>
  395. <if test="licenceTime != null">
  396. #{licenceTime,jdbcType=DATE},
  397. </if>
  398. <if test="certificateNumber != null">
  399. #{certificateNumber,jdbcType=VARCHAR},
  400. </if>
  401. <if test="status != null">
  402. #{status,jdbcType=INTEGER},
  403. </if>
  404. <if test="formRetrieve != null">
  405. #{formRetrieve,jdbcType=INTEGER},
  406. </if>
  407. <if test="taskRefund != null">
  408. #{taskRefund,jdbcType=INTEGER},
  409. </if>
  410. <if test="refundContent != null">
  411. #{refundContent,jdbcType=VARCHAR},
  412. </if>
  413. <if test="retrieveContent != null">
  414. #{retrieveContent,jdbcType=VARCHAR},
  415. </if>
  416. <if test="declareUser != null">
  417. #{declareUser,jdbcType=VARCHAR},
  418. </if>
  419. <if test="declarePwd != null">
  420. #{declarePwd,jdbcType=VARCHAR},
  421. </if>
  422. <if test="setUpAmount != null">
  423. #{setUpAmount,jdbcType=DECIMAL},
  424. </if>
  425. <if test="arrivalMoney != null">
  426. #{arrivalMoney,jdbcType=INTEGER},
  427. </if>
  428. <if test="outsourceName != null">
  429. #{outsourceName,jdbcType=VARCHAR},
  430. </if>
  431. <if test="outsourcePrice != null">
  432. #{outsourcePrice,jdbcType=DECIMAL},
  433. </if>
  434. <if test="consultantId != null">
  435. #{consultantId,jdbcType=VARCHAR},
  436. </if>
  437. <if test="managerId != null">
  438. #{managerId,jdbcType=VARCHAR},
  439. </if>
  440. <if test="outsource != null">
  441. #{outsource,jdbcType=INTEGER},
  442. </if>
  443. <if test="splitSuper != null">
  444. #{splitSuper,jdbcType=INTEGER},
  445. </if>
  446. <if test="splitStatus != null">
  447. #{splitStatus,jdbcType=INTEGER},
  448. </if>
  449. <if test="splitId != null">
  450. #{splitId,jdbcType=INTEGER},
  451. </if>
  452. <if test="splitAid != null">
  453. #{splitAid,jdbcType=VARCHAR},
  454. </if>
  455. <if test="splitTime != null">
  456. #{splitTime,jdbcType=TIMESTAMP},
  457. </if>
  458. <if test="cname != null">
  459. #{cname,jdbcType=VARCHAR},
  460. </if>
  461. <if test="receiverName != null">
  462. #{receiverName,jdbcType=VARCHAR},
  463. </if>
  464. <if test="declarationBatch != null">
  465. #{declarationBatch,jdbcType=INTEGER},
  466. </if>
  467. <if test="costReduction != null">
  468. #{costReduction,jdbcType=INTEGER},
  469. </if>
  470. <if test="officialCost != null">
  471. #{officialCost,jdbcType=INTEGER},
  472. </if>
  473. <if test="setUpStatus != null">
  474. #{setUpStatus,jdbcType=INTEGER},
  475. </if>
  476. <if test="setUpTime != null">
  477. #{setUpTime,jdbcType=TIMESTAMP},
  478. </if>
  479. <if test="spotCheckStatus != null">
  480. #{spotCheckStatus,jdbcType=INTEGER},
  481. </if>
  482. <if test="highTechStatus != null">
  483. #{highTechStatus,jdbcType=INTEGER},
  484. </if>
  485. <if test="specialComment != null">
  486. #{specialComment,jdbcType=VARCHAR},
  487. </if>
  488. <if test="ifCertificationFee != null">
  489. #{ifCertificationFee,jdbcType=INTEGER},
  490. </if>
  491. <if test="certificationFee != null">
  492. #{certificationFee,jdbcType=DECIMAL},
  493. </if>
  494. <if test="certificationCorporate != null">
  495. #{certificationCorporate,jdbcType=VARCHAR},
  496. </if>
  497. <if test="timeRecord != null">
  498. #{timeRecord,jdbcType=VARCHAR},
  499. </if>
  500. <if test="ifPublicity != null">
  501. #{ifPublicity,jdbcType=INTEGER},
  502. </if>
  503. <if test="checkStatus != null">
  504. #{checkStatus,jdbcType=INTEGER},
  505. </if>
  506. <if test="patentType != null">
  507. #{patentType,jdbcType=INTEGER},
  508. </if>
  509. <if test="pubicityUrl != null">
  510. #{pubicityUrl,jdbcType=VARCHAR},
  511. </if>
  512. <if test="processStatus != null">
  513. #{processStatus,jdbcType=INTEGER},
  514. </if>
  515. <if test="memberType != null">
  516. #{memberType,jdbcType=INTEGER},
  517. </if>
  518. <if test="pictureUrl != null">
  519. #{pictureUrl,jdbcType=VARCHAR},
  520. </if>
  521. </trim>
  522. </insert>
  523. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderTask">
  524. update t_order_task
  525. <set>
  526. <if test="orderNo != null">
  527. order_no = #{orderNo,jdbcType=VARCHAR},
  528. </if>
  529. <if test="main != null">
  530. main = #{main,jdbcType=INTEGER},
  531. </if>
  532. <if test="superId != null">
  533. super_id = #{superId,jdbcType=VARCHAR},
  534. </if>
  535. <if test="commodityId != null">
  536. commodity_id = #{commodityId,jdbcType=VARCHAR},
  537. </if>
  538. <if test="commodityName != null">
  539. commodity_name = #{commodityName,jdbcType=VARCHAR},
  540. </if>
  541. <if test="commodityQuantity != null">
  542. commodity_quantity = #{commodityQuantity,jdbcType=INTEGER},
  543. </if>
  544. <if test="commodityMode != null">
  545. commodity_mode = #{commodityMode,jdbcType=VARCHAR},
  546. </if>
  547. <if test="commodityPrice != null">
  548. commodity_price = #{commodityPrice,jdbcType=DECIMAL},
  549. </if>
  550. <if test="taskStatus != null">
  551. task_status = #{taskStatus,jdbcType=INTEGER},
  552. </if>
  553. <if test="taskDistributionTime != null">
  554. task_distribution_time = #{taskDistributionTime,jdbcType=TIMESTAMP},
  555. </if>
  556. <if test="taskAllocator != null">
  557. task_allocator = #{taskAllocator,jdbcType=VARCHAR},
  558. </if>
  559. <if test="taskReceiver != null">
  560. task_receiver = #{taskReceiver,jdbcType=VARCHAR},
  561. </if>
  562. <if test="taskComment != null">
  563. task_comment = #{taskComment,jdbcType=VARCHAR},
  564. </if>
  565. <if test="taskStartTime != null">
  566. task_start_time = #{taskStartTime,jdbcType=TIMESTAMP},
  567. </if>
  568. <if test="taskEndTime != null">
  569. task_end_time = #{taskEndTime,jdbcType=TIMESTAMP},
  570. </if>
  571. <if test="attachmentUrl != null">
  572. attachment_url = #{attachmentUrl,jdbcType=VARCHAR},
  573. </if>
  574. <if test="projectStatus != null">
  575. project_status = #{projectStatus,jdbcType=INTEGER},
  576. </if>
  577. <if test="acceptTime != null">
  578. accept_time = #{acceptTime,jdbcType=DATE},
  579. </if>
  580. <if test="reviewTime != null">
  581. review_time = #{reviewTime,jdbcType=DATE},
  582. </if>
  583. <if test="publicityTime != null">
  584. publicity_time = #{publicityTime,jdbcType=DATE},
  585. </if>
  586. <if test="licenceTime != null">
  587. licence_time = #{licenceTime,jdbcType=DATE},
  588. </if>
  589. <if test="certificateNumber != null">
  590. certificate_number = #{certificateNumber,jdbcType=VARCHAR},
  591. </if>
  592. <if test="status != null">
  593. `status` = #{status,jdbcType=INTEGER},
  594. </if>
  595. <if test="formRetrieve != null">
  596. form_retrieve = #{formRetrieve,jdbcType=INTEGER},
  597. </if>
  598. <if test="taskRefund != null">
  599. task_refund = #{taskRefund,jdbcType=INTEGER},
  600. </if>
  601. <if test="refundContent != null">
  602. refund_content = #{refundContent,jdbcType=VARCHAR},
  603. </if>
  604. <if test="retrieveContent != null">
  605. retrieve_content = #{retrieveContent,jdbcType=VARCHAR},
  606. </if>
  607. <if test="declareUser != null">
  608. declare_user = #{declareUser,jdbcType=VARCHAR},
  609. </if>
  610. <if test="declarePwd != null">
  611. declare_pwd = #{declarePwd,jdbcType=VARCHAR},
  612. </if>
  613. <if test="setUpAmount != null">
  614. set_up_amount = #{setUpAmount,jdbcType=DECIMAL},
  615. </if>
  616. <if test="arrivalMoney != null">
  617. arrival_money = #{arrivalMoney,jdbcType=INTEGER},
  618. </if>
  619. <if test="outsourceName != null">
  620. outsource_name = #{outsourceName,jdbcType=VARCHAR},
  621. </if>
  622. <if test="outsourcePrice != null">
  623. outsource_price = #{outsourcePrice,jdbcType=DECIMAL},
  624. </if>
  625. <if test="consultantId != null">
  626. consultant_id = #{consultantId,jdbcType=VARCHAR},
  627. </if>
  628. <if test="managerId != null">
  629. manager_id = #{managerId,jdbcType=VARCHAR},
  630. </if>
  631. <if test="outsource != null">
  632. outsource = #{outsource,jdbcType=INTEGER},
  633. </if>
  634. <if test="splitSuper != null">
  635. split_super = #{splitSuper,jdbcType=INTEGER},
  636. </if>
  637. <if test="splitStatus != null">
  638. split_status = #{splitStatus,jdbcType=INTEGER},
  639. </if>
  640. <if test="splitId != null">
  641. split_id = #{splitId,jdbcType=INTEGER},
  642. </if>
  643. <if test="splitAid != null">
  644. split_aid = #{splitAid,jdbcType=VARCHAR},
  645. </if>
  646. <if test="splitTime != null">
  647. split_time = #{splitTime,jdbcType=TIMESTAMP},
  648. </if>
  649. <if test="cname != null">
  650. cname = #{cname,jdbcType=VARCHAR},
  651. </if>
  652. <if test="receiverName != null">
  653. receiver_name = #{receiverName,jdbcType=VARCHAR},
  654. </if>
  655. <if test="declarationBatch != null">
  656. declaration_batch = #{declarationBatch,jdbcType=INTEGER},
  657. </if>
  658. <if test="costReduction != null">
  659. cost_reduction = #{costReduction,jdbcType=INTEGER},
  660. </if>
  661. <if test="officialCost != null">
  662. official_cost = #{officialCost,jdbcType=INTEGER},
  663. </if>
  664. <if test="setUpStatus != null">
  665. set_up_status = #{setUpStatus,jdbcType=INTEGER},
  666. </if>
  667. <if test="setUpTime != null">
  668. set_up_time = #{setUpTime,jdbcType=TIMESTAMP},
  669. </if>
  670. <if test="spotCheckStatus != null">
  671. spot_check_status = #{spotCheckStatus,jdbcType=INTEGER},
  672. </if>
  673. <if test="highTechStatus != null">
  674. high_tech_status = #{highTechStatus,jdbcType=INTEGER},
  675. </if>
  676. <if test="specialComment != null">
  677. special_comment = #{specialComment,jdbcType=VARCHAR},
  678. </if>
  679. <if test="ifCertificationFee != null">
  680. if_certification_fee = #{ifCertificationFee,jdbcType=INTEGER},
  681. </if>
  682. <if test="certificationFee != null">
  683. certification_fee = #{certificationFee,jdbcType=DECIMAL},
  684. </if>
  685. <if test="certificationCorporate != null">
  686. certification_corporate = #{certificationCorporate,jdbcType=VARCHAR},
  687. </if>
  688. <if test="timeRecord != null">
  689. time_record = #{timeRecord,jdbcType=VARCHAR},
  690. </if>
  691. <if test="ifPublicity != null">
  692. if_publicity = #{ifPublicity,jdbcType=INTEGER},
  693. </if>
  694. <if test="checkStatus != null">
  695. check_status = #{checkStatus,jdbcType=INTEGER},
  696. </if>
  697. <if test="patentType != null">
  698. patent_type = #{patentType,jdbcType=INTEGER},
  699. </if>
  700. <if test="pubicityUrl != null">
  701. pubicity_url = #{pubicityUrl,jdbcType=VARCHAR},
  702. </if>
  703. <if test="processStatus != null">
  704. process_status = #{processStatus,jdbcType=INTEGER},
  705. </if>
  706. <if test="memberType != null">
  707. member_type = #{memberType,jdbcType=INTEGER},
  708. </if>
  709. <if test="pictureUrl != null">
  710. picture_url = #{pictureUrl,jdbcType=VARCHAR},
  711. </if>
  712. </set>
  713. where id = #{id,jdbcType=INTEGER}
  714. </update>
  715. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TOrderTask">
  716. update t_order_task
  717. set order_no = #{orderNo,jdbcType=VARCHAR},
  718. main = #{main,jdbcType=INTEGER},
  719. super_id = #{superId,jdbcType=VARCHAR},
  720. commodity_id = #{commodityId,jdbcType=VARCHAR},
  721. commodity_name = #{commodityName,jdbcType=VARCHAR},
  722. commodity_quantity = #{commodityQuantity,jdbcType=INTEGER},
  723. commodity_mode = #{commodityMode,jdbcType=VARCHAR},
  724. commodity_price = #{commodityPrice,jdbcType=DECIMAL},
  725. task_status = #{taskStatus,jdbcType=INTEGER},
  726. task_distribution_time = #{taskDistributionTime,jdbcType=TIMESTAMP},
  727. task_allocator = #{taskAllocator,jdbcType=VARCHAR},
  728. task_receiver = #{taskReceiver,jdbcType=VARCHAR},
  729. task_comment = #{taskComment,jdbcType=VARCHAR},
  730. task_start_time = #{taskStartTime,jdbcType=TIMESTAMP},
  731. task_end_time = #{taskEndTime,jdbcType=TIMESTAMP},
  732. attachment_url = #{attachmentUrl,jdbcType=VARCHAR},
  733. project_status = #{projectStatus,jdbcType=INTEGER},
  734. accept_time = #{acceptTime,jdbcType=DATE},
  735. review_time = #{reviewTime,jdbcType=DATE},
  736. publicity_time = #{publicityTime,jdbcType=DATE},
  737. licence_time = #{licenceTime,jdbcType=DATE},
  738. certificate_number = #{certificateNumber,jdbcType=VARCHAR},
  739. `status` = #{status,jdbcType=INTEGER},
  740. form_retrieve = #{formRetrieve,jdbcType=INTEGER},
  741. task_refund = #{taskRefund,jdbcType=INTEGER},
  742. refund_content = #{refundContent,jdbcType=VARCHAR},
  743. retrieve_content = #{retrieveContent,jdbcType=VARCHAR},
  744. declare_user = #{declareUser,jdbcType=VARCHAR},
  745. declare_pwd = #{declarePwd,jdbcType=VARCHAR},
  746. set_up_amount = #{setUpAmount,jdbcType=DECIMAL},
  747. arrival_money = #{arrivalMoney,jdbcType=INTEGER},
  748. outsource_name = #{outsourceName,jdbcType=VARCHAR},
  749. outsource_price = #{outsourcePrice,jdbcType=DECIMAL},
  750. consultant_id = #{consultantId,jdbcType=VARCHAR},
  751. manager_id = #{managerId,jdbcType=VARCHAR},
  752. outsource = #{outsource,jdbcType=INTEGER},
  753. split_super = #{splitSuper,jdbcType=INTEGER},
  754. split_status = #{splitStatus,jdbcType=INTEGER},
  755. split_id = #{splitId,jdbcType=INTEGER},
  756. split_aid = #{splitAid,jdbcType=VARCHAR},
  757. split_time = #{splitTime,jdbcType=TIMESTAMP},
  758. cname = #{cname,jdbcType=VARCHAR},
  759. receiver_name = #{receiverName,jdbcType=VARCHAR},
  760. declaration_batch = #{declarationBatch,jdbcType=INTEGER},
  761. cost_reduction = #{costReduction,jdbcType=INTEGER},
  762. official_cost = #{officialCost,jdbcType=INTEGER},
  763. set_up_status = #{setUpStatus,jdbcType=INTEGER},
  764. set_up_time = #{setUpTime,jdbcType=TIMESTAMP},
  765. spot_check_status = #{spotCheckStatus,jdbcType=INTEGER},
  766. high_tech_status = #{highTechStatus,jdbcType=INTEGER},
  767. special_comment = #{specialComment,jdbcType=VARCHAR},
  768. if_certification_fee = #{ifCertificationFee,jdbcType=INTEGER},
  769. certification_fee = #{certificationFee,jdbcType=DECIMAL},
  770. certification_corporate = #{certificationCorporate,jdbcType=VARCHAR},
  771. time_record = #{timeRecord,jdbcType=VARCHAR},
  772. if_publicity = #{ifPublicity,jdbcType=INTEGER},
  773. check_status = #{checkStatus,jdbcType=INTEGER},
  774. patent_type = #{patentType,jdbcType=INTEGER},
  775. pubicity_url = #{pubicityUrl,jdbcType=VARCHAR},
  776. process_status = #{processStatus,jdbcType=INTEGER},
  777. member_type = #{memberType,jdbcType=INTEGER},
  778. picture_url = #{pictureUrl,jdbcType=VARCHAR}
  779. where id = #{id,jdbcType=INTEGER}
  780. </update>
  781. <select id="selectOrderTask" resultType="com.goafanti.order.bo.TOrderTaskBo">
  782. select a.id,e.contract_no contractNo,a.order_no as orderNo,h.nickname userName,f.name salesmanName,
  783. a.outsource_name outsourceName,a.outsource, a.outsource_price outsourcePrice,g.name depName,
  784. e.order_status orderStatus,d.name as contacts,d.contact_mobile as contactsMobile,a.main, c.cname,
  785. c.sort cSort,a.commodity_name as commodityName,a.commodity_quantity as commodityQuantity,b.patent_transfer patentTransfer ,
  786. i.price,a.certificate_number as certificateNumber, a.commodity_id as commodityId,a.manager_id managerId,
  787. a.consultant_id consultantId,a.project_status as projectStatus,a.set_up_amount setUpAmount,j.contract_term contractTerm,
  788. a.task_comment as taskComment ,a.commodity_price as commodityPrice, a.task_status as taskStatus,ttm.stop_type stopType,ttm.stop_status stopStatus,
  789. a.task_receiver as taskReceiver ,a.if_certification_fee ifCertificationFee , a.split_status splitStatus,
  790. a.cost_reduction costReduction,a.official_cost officialCost,i.`type` ,d.name ,a.declaration_batch declarationBatch,
  791. a.patent_type patentType,a.picture_url pictureUrl,j.service_life serviceLife ,j.service_year serviceYear,j.year_sum yearSum,ttm.change,
  792. ttm.last_year lastYear,ttm.last_year_capital lastYearCapital,ttm.last_year_income lastYearIncome,ttm.stop_status projectStopStatus
  793. 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
  794. 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
  795. left join business_project i on a.commodity_id=i.id left join business_category c on b.cid=c.id
  796. left join admin d on a.task_receiver=d.id left join t_task_member j on a.id =j.tid
  797. left join t_task_mid ttm on a.id=ttm.tid
  798. where a.super_id is null and a.split_status in(0,1)
  799. <if test="orderNo != null">
  800. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  801. </if>
  802. <if test="type == 1">
  803. and a.process_status in(0,3)
  804. </if>
  805. order by a.id
  806. </select>
  807. <select id="selectOrderTaskAll" resultType="com.goafanti.order.bo.TOrderTaskBo">
  808. select a.id,e.contract_no contractNo,a.order_no as orderNo,h.nickname userName,f.name salesmanName,a.outsource_name outsourceName,a.outsource,
  809. a.outsource_price outsourcePrice,g.name depName,e.order_status orderStatus,d.name as contacts,d.contact_mobile as contactsMobile,a.main, c.cname,
  810. c.sort cSort,a.commodity_name as commodityName,a.commodity_quantity as commodityQuantity,i.price,a.certificate_number as certificateNumber,a.receiver_name receiverName,
  811. a.commodity_id as commodityId,a.manager_id managerId,a.consultant_id consultantId,a.project_status as projectStatus,a.set_up_amount setUpAmount,
  812. a.task_comment as taskComment ,a.commodity_price as commodityPrice, a.task_status as taskStatus, a.task_receiver as taskReceiver ,
  813. a.split_status splitStatus,a.split_super splitSuper,a.split_aid splitAid,a.split_time splitTime,a.patent_type patentType,ttm.contract_term contractTerm,
  814. a.picture_url pictureUrl, ttm.service_life serviceLife ,ttm.service_year serviceYear,ttm.year_sum yearSum,
  815. tm.last_year lastYear,tm.last_year_capital lastYearCapital,tm.last_year_income lastYearIncome
  816. 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
  817. 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
  818. left join business_category c on i.cid=c.id left join admin d on a.task_receiver=d.id
  819. left join t_task_member ttm on a.id=ttm.tid left join t_task_mid tm on a.id=tm.tid
  820. where a.super_id is null and a.process_status in (0,3) and a.order_no= #{orderNo,jdbcType=VARCHAR}
  821. <if test="splitStatus !=null">
  822. <if test="splitStatus &lt; 3">
  823. and a.split_status= #{splitStatus}
  824. </if>
  825. <if test="splitStatus ==3">
  826. and a.split_status in(0,1)
  827. </if>
  828. <if test="splitStatus ==4">
  829. and a.split_status in(0,2)
  830. </if>
  831. </if>
  832. order by a.id
  833. </select>
  834. <select id="selectOrderTaskListByPage" resultType="com.goafanti.order.bo.TOrderTaskListBo">
  835. 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,
  836. 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,
  837. 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 ,
  838. 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 ,
  839. 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,
  840. date_format(e.create_time ,'%Y-%m-%d')creteTime,a.patent_type patentType
  841. 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
  842. 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
  843. 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
  844. on a.id=l.tid left join t_task_mid ttm on a.id=ttm.tid where e.delete_sign in (0,2,3) and e.order_status in (2,4)
  845. and a.outsource= #{outsource,jdbcType=INTEGER}
  846. <if test="role == 0 ">
  847. and a.task_receiver= #{aid,jdbcType=VARCHAR}
  848. </if>
  849. <if test="role ==1 and fids != null and fids.size() &gt; 0">
  850. and e.finance_id in
  851. <foreach close=")" collection="fids" index="" item="item" open="(" separator=",">
  852. #{item}
  853. </foreach>
  854. </if>
  855. <if test="specially == 0 ">
  856. and a.split_status in (0,2)
  857. </if>
  858. <if test="orderNo != null">
  859. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  860. </if>
  861. <if test="approval ==0">
  862. and e.approval = 0
  863. </if>
  864. <if test="approval ==1">
  865. and e.approval in(1,2)
  866. </if>
  867. <if test="approval ==2">
  868. and e.approval in (4,5)
  869. </if>
  870. <if test="cid != null">
  871. and c.id = #{cid}
  872. </if>
  873. <if test="outsourceStatus !=null">
  874. and l.refund_status = #{outsourceStatus,jdbcType=INTEGER}
  875. </if>
  876. <if test="contractNo != null">
  877. and e.contract_no like CONCAT('%',#{contractNo,jdbcType=VARCHAR},'%')
  878. </if>
  879. <if test="projectStatus != null">
  880. and a.project_status = #{projectStatus,jdbcType=INTEGER}
  881. </if>
  882. <if test="deps != null">
  883. and e.order_dep in
  884. <foreach close=")" collection="deps" item="depId" open="(" separator=",">
  885. #{depId}
  886. </foreach>
  887. </if>
  888. <if test="name != null">
  889. and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  890. </if>
  891. <if test="taskId != null">
  892. and (a.id= #{taskId,jdbcType=VARCHAR} or a.split_super= #{taskId,jdbcType=VARCHAR})
  893. </if>
  894. <if test="taskStatus != null">
  895. and a.task_status= #{taskStatus,jdbcType=INTEGER}
  896. </if>
  897. <if test="adminName != null">
  898. and a.receiver_name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
  899. </if>
  900. <if test="startTime != null and endTime != null">
  901. and e.sign_time between #{startTime} and #{endTime}
  902. </if>
  903. order by a.task_distribution_time desc
  904. <if test="page_sql!=null">
  905. ${page_sql}
  906. </if>
  907. </select>
  908. <select id="selectOrderTaskListCount" resultType="java.lang.Integer">
  909. select count(*) from t_order_task a
  910. left join t_order_new e on a.order_no=e.order_no
  911. <if test="cid != null">
  912. left join business_project b on a.commodity_id=b.id
  913. left join business_category c on b.cid=c.id
  914. </if>
  915. <if test="name != null">
  916. left join user f on e.buyer_id=f.id
  917. </if>
  918. <if test="outsourceStatus !=null">
  919. left join t_order_outsource l on a.id=l.tid
  920. </if>
  921. where e.delete_sign in (0,2,3) and e.order_status in (2,4)
  922. and a.outsource= #{outsource,jdbcType=INTEGER}
  923. <if test="role == 0 ">
  924. and a.task_receiver= #{aid,jdbcType=VARCHAR}
  925. </if>
  926. <if test="role ==1 and fids != null and fids.size() &gt; 0">
  927. and e.finance_id in
  928. <foreach close=")" collection="fids" index="" item="item" open="(" separator=",">
  929. #{item}
  930. </foreach>
  931. </if>
  932. <if test="specially == 0 ">
  933. and a.split_status in (0,2)
  934. </if>
  935. <if test="orderNo != null">
  936. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  937. </if>
  938. <if test="approval ==0">
  939. and e.approval = 0
  940. </if>
  941. <if test="approval ==1">
  942. and e.approval in(1,2)
  943. </if>
  944. <if test="approval ==2">
  945. and e.approval in (4,5)
  946. </if>
  947. <if test="cid != null">
  948. and c.id = #{cid}
  949. </if>
  950. <if test="outsourceStatus !=null">
  951. and l.refund_status = #{outsourceStatus,jdbcType=INTEGER}
  952. </if>
  953. <if test="contractNo != null">
  954. and e.contract_no like CONCAT('%',#{contractNo,jdbcType=VARCHAR},'%')
  955. </if>
  956. <if test="projectStatus != null">
  957. and a.project_status = #{projectStatus,jdbcType=INTEGER}
  958. </if>
  959. <if test="deps != null">
  960. and e.order_dep in
  961. <foreach close=")" collection="deps" item="depId" open="(" separator=",">
  962. #{depId}
  963. </foreach>
  964. </if>
  965. <if test="name != null">
  966. and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  967. </if>
  968. <if test="taskId != null">
  969. and (a.id= #{taskId,jdbcType=VARCHAR} or a.split_super= #{taskId,jdbcType=VARCHAR})
  970. </if>
  971. <if test="taskStatus != null">
  972. and a.task_status= #{taskStatus,jdbcType=INTEGER}
  973. </if>
  974. <if test="adminName != null">
  975. and a.receiver_name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
  976. </if>
  977. <if test="startTime != null and endTime != null">
  978. and e.sign_time between #{startTime} and #{endTime}
  979. </if>
  980. </select>
  981. <select id="getOrderTaskDetail" resultType="com.goafanti.order.bo.TOrderTaskDetailBo">
  982. select
  983. 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,
  984. 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,
  985. 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,
  986. 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,
  987. 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,
  988. 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 ,
  989. 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,
  990. 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,
  991. 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,
  992. a.if_certification_fee ifCertificationFee , a.certification_corporate certificationCorporate ,a.certification_fee certificationFee ,a.time_record timeRecord,
  993. 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 ,
  994. a.spot_check_status spotCheckStatus , a.special_comment specialComment ,ttm.certificates_count certificatesCount ,ttm.reject_count rejectCount ,a.check_status checkStatus,
  995. ttm.authorize_count authorizeCount ,ttm.end_count endCount,ttm.accept_count acceptCount,a.commodity_price commodityPrice,a.commodity_quantity commodityQuantity
  996. 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
  997. left join admin d on a.task_receiver=d.id left join t_order_new e on a.order_no=e.order_no
  998. 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
  999. left join admin g on e.salesman_id=g.id
  1000. where a.id= #{id,jdbcType=VARCHAR}
  1001. </select>
  1002. <select id="selectBySuperId" resultType="com.goafanti.common.model.TOrderTask">
  1003. select super_id as superId,min(task_status) as taskStatus,min(project_status) as projectStatus,max(main) as main from t_order_task
  1004. where super_id = #{superId,jdbcType=VARCHAR} group by super_id
  1005. </select>
  1006. <select id="selectTaskHoursListByPage" resultType="com.goafanti.order.bo.TOrderTaskListBo">
  1007. 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,
  1008. a.task_status as taskStatus,f.nickname as userName,ifnull(g.hours,0) as hours,a.commodity_quantity as commodityQuantity,a.commodity_price commodityPrice,
  1009. 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,
  1010. 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,
  1011. a.split_status splitStatus, a.split_super splitSuper, a.split_id splitId,ifnull(ttm.cost_amount,0) costAmount,ifnull(ttm.party_amount,0) partyAmount
  1012. 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
  1013. left join t_order_new e on a.order_no=e.order_no left join department dep on e.order_dep=dep.id
  1014. 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
  1015. left join t_order_mid tm on a.order_no=tm.order_no left join t_task_mid ttm on a.id=ttm.tid
  1016. where e.delete_sign =0 and a.super_id is null and a.split_status in(0,2)
  1017. <if test="shiroType == 1 and aid !=null">
  1018. and tm.finance_id= #{aid,jdbcType=VARCHAR}
  1019. </if>
  1020. <if test="shiroType == 2 and aid !=null">
  1021. and tm.finance_id in (select id from admin where superior_id= #{aid,jdbcType=VARCHAR})
  1022. </if>
  1023. <if test="name != null">
  1024. and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  1025. </if>
  1026. <if test="thchId != null">
  1027. and a.task_receiver = #{thchId,jdbcType=VARCHAR}
  1028. </if>
  1029. <if test="cid != null">
  1030. and b.cid = #{cid,jdbcType=VARCHAR}
  1031. </if>
  1032. <if test="outsource != null">
  1033. and a.outsource = #{outsource,jdbcType=INTEGER}
  1034. </if>
  1035. <if test="depId != null">
  1036. and e.order_dep = #{depId,jdbcType=VARCHAR}
  1037. </if>
  1038. <if test="contractNo != null">
  1039. and e.contract_no like CONCAT('%',#{contractNo,jdbcType=VARCHAR},'%')
  1040. </if>
  1041. <if test="orderNo != null">
  1042. and e.order_no like CONCAT('%',#{orderNo,jdbcType=VARCHAR},'%')
  1043. </if>
  1044. <if test="taskId != null">
  1045. and a.id= #{taskId,jdbcType=VARCHAR}
  1046. </if>
  1047. <if test="starTime !=null and endTime !=null">
  1048. and e.sign_time between #{starTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
  1049. </if>
  1050. order by a.task_start_time desc,e.create_time desc
  1051. <if test="page_sql!=null">
  1052. ${page_sql}
  1053. </if>
  1054. </select>
  1055. <select id="selectTaskHoursListCount" resultType="java.lang.Integer">
  1056. 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
  1057. 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
  1058. where e.delete_sign =0 and a.super_id is null and a.split_status in(0,2)
  1059. <if test="shiroType == 1 and aid !=null">
  1060. and tm.finance_id= #{aid,jdbcType=VARCHAR}
  1061. </if>
  1062. <if test="shiroType == 2 and aid !=null">
  1063. and tm.finance_id in (select id from admin where superior_id= #{aid,jdbcType=VARCHAR})
  1064. </if>
  1065. <if test="name != null">
  1066. and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  1067. </if>
  1068. <if test="thchId != null">
  1069. and a.task_receiver = #{thchId,jdbcType=VARCHAR}
  1070. </if>
  1071. <if test="outsource != null">
  1072. and a.outsource = #{outsource,jdbcType=INTEGER}
  1073. </if>
  1074. <if test="cid != null">
  1075. and b.cid = #{cid,jdbcType=VARCHAR}
  1076. </if>
  1077. <if test="depId != null">
  1078. and e.order_dep = #{depId,jdbcType=VARCHAR}
  1079. </if>
  1080. <if test="contractNo != null">
  1081. and e.contract_no like CONCAT('%',#{contractNo,jdbcType=VARCHAR},'%')
  1082. </if>
  1083. <if test="orderNo != null">
  1084. and e.order_no like CONCAT('%',#{orderNo,jdbcType=VARCHAR},'%')
  1085. </if>
  1086. <if test="taskId != null">
  1087. and a.id= #{taskId,jdbcType=VARCHAR}
  1088. </if>
  1089. <if test="starTime !=null and endTime !=null">
  1090. and e.sign_time between #{starTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
  1091. </if>
  1092. </select>
  1093. <select id="selectTaskListByPage" resultType="com.goafanti.order.bo.TOrderTaskListBo">
  1094. select a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,d.name as receiverName,
  1095. a.project_status as projectStatus,a.task_status as taskStatus,date_format(a.task_distribution_time,'%Y-%m-%d') as taskDate,
  1096. a.commodity_quantity as commodityQuantity,f.nickname as userName,h.name as depName,ifnull(i.alreadyNumber,0)as alreadyNumber,
  1097. a.split_status splitStatus,a.split_super splitSuper, a.split_id splitId
  1098. from (select task_id from t_task_log a where task_receiver=#{aid ,jdbcType=VARCHAR} UNION select task_id from t_task_log a
  1099. where task_allocator=#{aid ,jdbcType=VARCHAR}) x left join t_order_task a on x.task_id=a.id
  1100. left join business_project b on a.commodity_id=b.id left join business_category c on b.cid=c.id
  1101. left join admin d on a.task_receiver=d.id left join t_order_new e on a.order_no=e.order_no
  1102. left join user f on e.buyer_id=f.id left join department h on e.order_dep=h.id
  1103. left join (select task_id , sum(already_number) as alreadyNumber from task_progress group by task_id) i on a.id=i.task_id
  1104. where e.delete_sign in(0,2,3)
  1105. <if test="orderNo != null">
  1106. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  1107. </if>
  1108. <if test="name != null">
  1109. and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  1110. </if>
  1111. <if test="orderNo != null">
  1112. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  1113. </if>
  1114. <if test="depId != null">
  1115. and e.order_dep= #{depId ,jdbcType=VARCHAR}
  1116. </if>
  1117. <if test="thchId != null">
  1118. and a.task_receiver = #{thchId,jdbcType=VARCHAR}
  1119. </if>
  1120. <if test="taskId != null">
  1121. and (a.id= #{taskId,jdbcType=VARCHAR} or a.split_super= #{taskId,jdbcType=VARCHAR})
  1122. </if>
  1123. <if test="taskStatus != null">
  1124. and a.task_status= #{taskStatus,jdbcType=INTEGER}
  1125. </if>
  1126. <if test="adminName != null">
  1127. and d.name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
  1128. </if>
  1129. order by a.task_distribution_time desc
  1130. <if test="page_sql!=null">
  1131. ${page_sql}
  1132. </if>
  1133. </select>
  1134. <select id="selectTaskListCount" resultType="java.lang.Integer">
  1135. select count(*)
  1136. from (select task_id from t_task_log a where task_receiver=#{aid ,jdbcType=VARCHAR} UNION select task_id from t_task_log a
  1137. where task_allocator=#{aid ,jdbcType=VARCHAR}) x left join t_order_task a on x.task_id=a.id
  1138. left join business_project b on a.commodity_id=b.id
  1139. left join business_category c on b.cid=c.id
  1140. left join admin d on a.task_receiver=d.id
  1141. left join t_order_new e on a.order_no=e.order_no
  1142. left join user f on e.buyer_id=f.id
  1143. left join department h on e.order_dep=h.id
  1144. left join (select task_id , sum(already_number) as alreadyNumber from task_progress group by task_id) i on a.id=i.task_id
  1145. where e.delete_sign in(0,2,3)
  1146. <if test="orderNo != null">
  1147. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  1148. </if>
  1149. <if test="name != null">
  1150. and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  1151. </if>
  1152. <if test="depId != null">
  1153. and e.order_dep= #{depId ,jdbcType=VARCHAR}
  1154. </if>
  1155. <if test="thchId != null">
  1156. and a.task_receiver = #{thchId,jdbcType=VARCHAR}
  1157. </if>
  1158. <if test="orderNo != null">
  1159. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  1160. </if>
  1161. <if test="taskId != null">
  1162. and (a.id= #{taskId,jdbcType=VARCHAR} or a.split_super= #{taskId,jdbcType=VARCHAR})
  1163. </if>
  1164. <if test="taskStatus != null">
  1165. and a.task_status= #{taskStatus,jdbcType=INTEGER}
  1166. </if>
  1167. <if test="adminName != null">
  1168. and d.name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
  1169. </if>
  1170. </select>
  1171. <!-- 根据订单编号获得所有的任务负责人 -->
  1172. <select id="getReceiverByOid" resultType="com.goafanti.order.bo.TOrderTaskBo">
  1173. select distinct task_receiver, a.name, a.email, t.id, t.project_status from t_order_task t
  1174. inner join admin a on t.task_receiver = a.id
  1175. where order_no = #{orderNo,jdbcType=VARCHAR} and task_status &gt; 0 and super_id is null
  1176. </select>
  1177. <update id="updateDimissionTransfer" parameterType="java.lang.String">
  1178. update t_order_task a left join t_change_task b on a.id =b.tid
  1179. left join (select * from admin where id= #{transferId,jdbcType=VARCHAR})c on 1=1
  1180. set a.task_allocator= #{aid,jdbcType=VARCHAR},a.task_receiver= c.id,
  1181. a.receiver_name=c.name,b.receiver_name=c.name
  1182. <if test="type==0">
  1183. ,a.consultant_id=c.id
  1184. </if>
  1185. <if test="type==1">
  1186. ,a.manager_id=c.id
  1187. </if>
  1188. <if test="type==3">
  1189. ,a.consultant_id= null
  1190. ,a.manager_id=c.id
  1191. </if>
  1192. <if test="type==4">
  1193. ,a.consultant_id=c.id
  1194. ,a.manager_id= null
  1195. </if>
  1196. <if test="type==1">
  1197. ,a.manager_id= null
  1198. </if>
  1199. where task_receiver=#{aid,jdbcType=VARCHAR}
  1200. </update>
  1201. <select id="selectEstimateCost" resultType="java.lang.String">
  1202. select ifnull(sum(a.commodity_quantity * ifnull(b.price,0)),0) from t_order_task a
  1203. left join business_project b on a.commodity_id=b.id
  1204. where order_no= #{orderNo}
  1205. </select>
  1206. <select id="listNameByDepAndName" resultType="java.lang.String">
  1207. select
  1208. <if test="type ==0">
  1209. consultant_id
  1210. </if>
  1211. <if test="type ==1">
  1212. manager_id
  1213. </if>
  1214. from t_order_task
  1215. where order_no= #{orderNo}
  1216. group by
  1217. <if test="type ==0">
  1218. consultant_id
  1219. </if>
  1220. <if test="type ==1">
  1221. manager_id
  1222. </if>
  1223. </select>
  1224. <select id="splitProjectList" resultType="com.goafanti.order.bo.TOrderTaskListBo">
  1225. 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,
  1226. e.contract_no contractNo,a.task_receiver taskReceiver, a.task_status as taskStatus,date_format(a.task_distribution_time,'%Y-%m-%d') as taskDate,
  1227. a.commodity_quantity as commodityQuantity,e.approval,l.refund_status outsourceStatus, ifnull(i.alreadyNumber,0) as alreadyNumber,a.task_comment taskComment ,
  1228. 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,
  1229. 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,
  1230. ttm.service_life serviceLife,ttm.service_year serviceYear ,ttm.year_sum yearSum ,ttm.contract_term contractTerm,a.process_status processStatus
  1231. 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
  1232. 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
  1233. left join department h on e.order_dep=h.id left join (select task_id , sum(already_number) as alreadyNumber
  1234. from task_progress group by task_id) i on a.id=i.task_id left join (select order_no,max(name)as name
  1235. 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
  1236. 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
  1237. where e.order_status in (0,1,2,3,4,5)
  1238. and split_status =2 and a.split_super= #{tid}
  1239. <if test="type == 1">
  1240. and a.process_status in(0,3)
  1241. </if>
  1242. order by split_id
  1243. </select>
  1244. <select id="selectByidGetCname" resultType="java.lang.String">
  1245. select b.cname from business_project a left join business_category b on a.cid =b.id
  1246. where a.id= #{pid}
  1247. </select>
  1248. <update id="updateByOutsourceToOrderNo">
  1249. update t_order_task set outsource= #{type} where order_no= #{orderNo}
  1250. </update>
  1251. <select id="getLockId" resultType="java.lang.String">
  1252. select id from user_lock_release a left join (select commodity_id from t_order_task
  1253. where order_no = #{orderNo} GROUP by commodity_id ) b on a.business_project_id =b.commodity_id
  1254. where a.`type` =1 and a.aid = #{aid} and a.uid = #{uid}
  1255. </select>
  1256. <select id="selectProjectStatisticsListByPage" resultType="com.goafanti.order.bo.OutProjectStatistics">
  1257. select date_format( a.task_distribution_time, '%Y-%m-%d %H:%i:%S' ) distributionTime ,d.name province , c.name depName,e.salesman_name salesmanName,
  1258. b.contract_no contractNo ,b.order_no orderNo ,e.buyer_name userName,bc.cname ,a.commodity_name pname,ta.name techName,td.name techDepName,
  1259. 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 ,
  1260. a.spot_check_status spotCheckStatus ,b.contact_mobile contactMobile ,b.legal_person_tel legalPersonTel , a.certificate_number certificateNumber,
  1261. a.declaration_batch declarationBatch, date_format(a.licence_time, '%Y-%m-%d' ) licenceTime, a.commodity_quantity commodityQuantity ,
  1262. ttm.certificates_count certificatesCount,ttm.urgent_day urgentDay ,ttm.if_material ifMaterial, ttm.cost_amount costAmount ,
  1263. (a.commodity_price-ttm.cost_amount)profit, a.high_tech_status highTechStatus, tp.patent_name patentName ,tp.patent_no patentNo ,
  1264. date_format(tp.accept_time, '%Y-%m-%d ' ) acceptTime , date_format(tp.authorize_time, '%Y-%m-%d ' ) authorizeTime, ttm.reject_count rejectCount ,
  1265. tm.service_life serviceLife,tm.service_year serviceyear, tm.year_sum yearsum,tm.contract_term contractTerm, a.commodity_price commodityPrice ,
  1266. a.special_comment specialComment,a.task_comment taskComment,ttm.last_year lastYear,ttm.last_year_capital lastYearCapital,ttm.last_year_income lastYearIncome,
  1267. e.service_type serviceType,e.service_project serviceProject
  1268. 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
  1269. 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
  1270. 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
  1271. 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
  1272. <if test="screen ==6">
  1273. right join (select tid ,accept_count sls from t_task_mid where accept_count &gt; 0)tj on a.id=tj.tid
  1274. </if>
  1275. <if test="screen ==7">
  1276. right join (select tid ,end_count wjs from t_task_mid where end_count &gt; 0)tj on a.id=tj.tid
  1277. </if>
  1278. <if test="screen ==8">
  1279. right join (select tid ,authorize_count sqs from t_task_mid where authorize_count &gt; 0)tj on a.id=tj.tid
  1280. </if>
  1281. <if test="screen ==9">
  1282. right join (select tid ,reject_count bhs from t_task_mid where reject_count &gt; 0)tj on a.id=tj.tid
  1283. </if>
  1284. <if test="screen ==10">
  1285. right join (select tid ,certificates_count xzs from t_task_mid where certificates_count &gt; 0)tj on a.id=tj.tid
  1286. </if>
  1287. <if test="screen ==11">
  1288. right join (select tid ,apply_count sqs,reject_count bhs,certificates_count xzs from t_task_mid
  1289. where apply_count &gt; 0)tj on a.id=tj.tid
  1290. </if>
  1291. where a.split_status in (0,2) and b. delete_sign in (0,2)
  1292. <!-- 筛选项 0库存 1派单 2完成 3立项 4抽查 5未通过 6受理 7完结 8授权 9驳回 10下证 11申请 -->
  1293. <if test="screen ==0">
  1294. and a.project_status in(0,1,2,3)
  1295. </if>
  1296. <if test="screen ==2">
  1297. and a.project_status &gt; 3
  1298. </if>
  1299. <if test="screen ==3">
  1300. and a.set_up_status =1
  1301. </if>
  1302. <if test="screen ==4">
  1303. and a.spot_check_status in (1,2)
  1304. </if>
  1305. <if test="screen ==5">
  1306. and a.spot_check_status =1
  1307. </if>
  1308. <if test="screen ==12">
  1309. and a.publicity_time is not null
  1310. </if>
  1311. <if test="startDate != null and endDate != null">
  1312. and a.task_distribution_time between #{startDate} and #{endDate}
  1313. </if>
  1314. <if test="province !=null">
  1315. and c.province = #{province}
  1316. </if>
  1317. <if test="projectId !=null">
  1318. and a.commodity_id = #{projectId}
  1319. </if>
  1320. <if test="deps != null">
  1321. and b.order_dep in
  1322. <foreach close=")" collection="deps" item="dep" open="(" separator=",">
  1323. #{dep}
  1324. </foreach>
  1325. </if>
  1326. <if test="thchDeps != null">
  1327. and td.id in
  1328. <foreach close=")" collection="thchDeps" item="thchDep" open="(" separator=",">
  1329. #{thchDep}
  1330. </foreach>
  1331. </if>
  1332. <if test="projectStatus !=null">
  1333. and bp.cid= #{projectStatus}
  1334. </if>
  1335. <if test="taskProjectStatus !=null">
  1336. and a.project_status= #{taskProjectStatus}
  1337. </if>
  1338. <if test="projectType !=null">
  1339. and bp.type= #{projectType}
  1340. </if>
  1341. <if test="orderNo !=null">
  1342. and b.order_no = #{orderNo}
  1343. </if>
  1344. <if test="contractNo !=null">
  1345. and b.contract_no = #{contractNo}
  1346. </if>
  1347. <if test="userName !=null">
  1348. and e.buyer_name like concat('%', #{userName},'%')
  1349. </if>
  1350. <if test="thchId !=null">
  1351. and a.task_receiver = #{thchId}
  1352. </if>
  1353. <if test="declarationBatch !=null">
  1354. and a.declaration_batch = #{declarationBatch}
  1355. </if>
  1356. <if test="projectSituation !=null">
  1357. and a.status = #{projectSituation}
  1358. </if>
  1359. <if test=" projectAmount !=null and projectAmount != 9">
  1360. and a.commodity_price &gt;= #{amountStart} and a.commodity_price &lt; #{amountEnd}
  1361. </if>
  1362. <if test=" projectAmount == 9">
  1363. and a.commodity_price &gt;= #{amountStart}
  1364. </if>
  1365. <if test="page_sql!=null">
  1366. ${page_sql}
  1367. </if>
  1368. </select>
  1369. <select id="selectProjectStatisticsCount" resultType="java.lang.Integer">
  1370. select count(*)
  1371. from t_order_task a left join t_order_new b on a.order_no =b.order_no
  1372. <if test="province !=null">
  1373. left join department c on b.order_dep =c.id
  1374. </if>
  1375. <if test="userName !=null">
  1376. left join t_order_mid e on b.order_no =e.order_no
  1377. </if>
  1378. <if test="projectStatus !=null or projectType !=null">
  1379. left join business_project bp on a.commodity_id =bp.id
  1380. </if>
  1381. <if test="thchDeps !=null">
  1382. left join admin ta on a.task_receiver =ta.id
  1383. left join department td on ta.department_id =td.id
  1384. </if>
  1385. <if test="status==3 or status==4">
  1386. left join task_progress tp on a.id=tp.task_id
  1387. </if>
  1388. <if test="screen ==6">
  1389. right join (select tid ,accept_count sls from t_task_mid where accept_count &gt; 0)tj on a.id=tj.tid
  1390. </if>
  1391. <if test="screen ==7">
  1392. right join (select tid ,end_count wjs from t_task_mid where end_count &gt; 0)tj on a.id=tj.tid
  1393. </if>
  1394. <if test="screen ==8">
  1395. right join (select tid ,authorize_count sqs from t_task_mid where authorize_count &gt; 0)tj on a.id=tj.tid
  1396. </if>
  1397. <if test="screen ==9">
  1398. right join (select tid ,reject_count bhs from t_task_mid where reject_count &gt; 0)tj on a.id=tj.tid
  1399. </if>
  1400. <if test="screen ==10">
  1401. right join (select tid ,certificates_count xzs from t_task_mid where certificates_count &gt; 0)tj on a.id=tj.tid
  1402. </if>
  1403. <if test="screen ==11">
  1404. right join (select tid ,apply_count sqs,reject_count bhs,certificates_count xzs from t_task_mid
  1405. where apply_count &gt; 0)tj on a.id=tj.tid
  1406. </if>
  1407. where a.split_status in (0,2) and b. delete_sign in (0,2)
  1408. <!-- 筛选项 0库存 1派单 2完成 3立项 4抽查 5未通过 6受理 7完结 8授权 9驳回 10下证 11申请 -->
  1409. <if test="screen ==0">
  1410. and a.project_status in(0,1,2,3)
  1411. </if>
  1412. <if test="screen ==2">
  1413. and a.project_status &gt; 3
  1414. </if>
  1415. <if test="screen ==3">
  1416. and a.set_up_status =1
  1417. </if>
  1418. <if test="screen ==4">
  1419. and a.spot_check_status in (1,2)
  1420. </if>
  1421. <if test="screen ==5">
  1422. and a.spot_check_status =1
  1423. </if>
  1424. <if test="screen ==12">
  1425. and a.publicity_time is not null
  1426. </if>
  1427. <if test="startDate != null and endDate != null">
  1428. and a.task_distribution_time between #{startDate} and #{endDate}
  1429. </if>
  1430. <if test="province !=null">
  1431. and c.province = #{province}
  1432. </if>
  1433. <if test="projectId !=null">
  1434. and a.commodity_id = #{projectId}
  1435. </if>
  1436. <if test="deps != null">
  1437. and b.order_dep in
  1438. <foreach close=")" collection="deps" item="dep" open="(" separator=",">
  1439. #{dep}
  1440. </foreach>
  1441. </if>
  1442. <if test="thchDeps != null">
  1443. and td.id in
  1444. <foreach close=")" collection="thchDeps" item="thchDep" open="(" separator=",">
  1445. #{thchDep}
  1446. </foreach>
  1447. </if>
  1448. <if test="projectStatus !=null">
  1449. and bp.cid= #{projectStatus}
  1450. </if>
  1451. <if test="taskProjectStatus !=null">
  1452. and a.project_status= #{taskProjectStatus}
  1453. </if>
  1454. <if test="projectType !=null">
  1455. and bp.type= #{projectType}
  1456. </if>
  1457. <if test="orderNo !=null">
  1458. and b.order_no = #{orderNo}
  1459. </if>
  1460. <if test="contractNo !=null">
  1461. and b.contract_no = #{contractNo}
  1462. </if>
  1463. <if test="userName !=null">
  1464. and e.buyer_name like concat('%', #{userName},'%')
  1465. </if>
  1466. <if test="thchId !=null">
  1467. and a.task_receiver = #{thchId}
  1468. </if>
  1469. <if test="declarationBatch !=null">
  1470. and a.declaration_batch = #{declarationBatch}
  1471. </if>
  1472. <if test="projectSituation !=null">
  1473. and a.status = #{projectSituation}
  1474. </if>
  1475. <if test=" projectAmount !=null and projectAmount != 9">
  1476. and a.commodity_price &gt;= #{amountStart} and a.commodity_price &lt; #{amountEnd}
  1477. </if>
  1478. <if test=" projectAmount == 9">
  1479. and a.commodity_price &gt;= #{amountStart}
  1480. </if>
  1481. </select>
  1482. <select id="selectProvincialStatisticsListByPage" resultType="com.goafanti.order.bo.OutProvincialStatistics">
  1483. select z.cid bpId, bc.cname projectStatus,z.dispatch_province province,dg.name provinceName,
  1484. z.duty_dep thchDepId,d.name thchDepName,z.distributeCount,z.stockCount,z.completeCount,z.publicityCount,
  1485. z.setUpCount,z.spotCheckCount,z.failCount,z.certificatesCount,z.acceptCount,z.endCount,z.authorizeCount,
  1486. z.rejectCount,z.applyCount,z.amountCount,z.costAmount,z.profit
  1487. from ( select y.dispatch_province, y.cid, y.duty_dep, sum(y.dispatch_count)distributeCount,
  1488. sum(y.stock_count)stockCount, sum(y.complete_count)completeCount,sum(y.promulgate_count)publicityCount,
  1489. sum(y.set_up_count)setUpCount,sum(y.spot_check_count)spotCheckCount,sum(y.fail_count)failCount,
  1490. sum(y.certificates_count)certificatesCount,sum(y.accept_count)acceptCount,sum(y.end_count)endCount,
  1491. sum(y.authorize_count)authorizeCount,sum(y.reject_count)rejectCount, sum(y.apply_count)applyCount,
  1492. sum(y.commodity_price)amountCount,sum(y.cost_amount)costAmount, sum(y.commodity_price-y.cost_amount)profit
  1493. from(select b.dispatch_province, bp.cid, b.duty_dep,
  1494. b.stock_count,b.dispatch_count,b.promulgate_count, b.complete_count,b.set_up_count ,b.spot_check_count ,
  1495. b.fail_count ,b.certificates_count, b.accept_count,b.end_count,b.authorize_count,b.reject_count,b.apply_count,
  1496. a.commodity_price ,b.cost_amount, a.task_distribution_time from t_order_task a
  1497. left join t_task_mid b on a.id=b.tid left join business_project bp on a.commodity_id =bp.id
  1498. left join t_order_new ton on a.order_no =ton .order_no
  1499. where a.task_status in(1,2,3) and ton.delete_sign in (0,2)
  1500. <if test="projectId !=null">
  1501. and a.commodity_id = #{projectId}
  1502. </if>
  1503. <if test="province !=null">
  1504. and b.dispatch_province = #{province}
  1505. </if>
  1506. <if test="thchDeps !=null">
  1507. and b.duty_dep in
  1508. <foreach close=")" collection="thchDeps" item="depId" open="(" separator=",">
  1509. #{depId}
  1510. </foreach>
  1511. </if>
  1512. <if test="projectType !=null">
  1513. and bp.`type` = #{projectType}
  1514. </if>
  1515. <if test="projectStatus !=null">
  1516. and bp.cid= #{projectStatus}
  1517. </if>
  1518. <if test="startDate != null and endDate != null">
  1519. and a.task_distribution_time between #{startDate} and #{endDate}
  1520. </if>
  1521. )y
  1522. group by y.dispatch_province, y.cid, y.duty_dep )z
  1523. left join business_category bc on z.cid=bc.id left join district_glossory dg on z.dispatch_province=dg.id
  1524. left join department d on z.duty_dep=d.id
  1525. <if test="page_sql!=null">
  1526. ${page_sql}
  1527. </if>
  1528. </select>
  1529. <select id="selectProvincialStatisticsCount" resultType="java.lang.Integer">
  1530. select count(*)
  1531. from(select y.dispatch_province from (select bp.cid,
  1532. b.dispatch_province,b.duty_dep,a.cname,b.stock_count,b.dispatch_count,b.promulgate_count,
  1533. b.complete_count,b.set_up_count ,b.spot_check_count ,b.fail_count ,b.certificates_count,
  1534. b.accept_count,b.end_count,b.authorize_count,b.reject_count,b.apply_count,
  1535. a.commodity_price ,b.cost_amount, a.task_distribution_time
  1536. from t_order_task a
  1537. left join t_task_mid b on a.id=b.tid
  1538. left join business_project bp on a.commodity_id =bp.id
  1539. left join t_order_new ton on a.order_no =ton .order_no
  1540. where a.task_status in(1,2,3) and ton.delete_sign in (0,2)
  1541. <if test="projectId !=null">
  1542. and a.commodity_id = #{projectId}
  1543. </if>
  1544. <if test="province !=null">
  1545. and b.dispatch_province = #{province}
  1546. </if>
  1547. <if test="thchDeps !=null">
  1548. and b.duty_dep in
  1549. <foreach close=")" collection="thchDeps" item="depId" open="(" separator=",">
  1550. #{depId}
  1551. </foreach>
  1552. </if>
  1553. <if test="projectType !=null">
  1554. and bp.`type` = #{projectType}
  1555. </if>
  1556. <if test="projectStatus !=null">
  1557. and bp.cid= #{projectStatus}
  1558. </if>
  1559. <if test="startDate != null and endDate != null">
  1560. and a.task_distribution_time between #{startDate} and #{endDate}
  1561. </if>
  1562. )y group by y.dispatch_province, y.cid, y.duty_dep )x
  1563. </select>
  1564. <select id="managerSelectByPage" resultType="com.goafanti.order.bo.managerListBo">
  1565. select a.id,a.task_distribution_time taskDistributionTime ,tm.province_name provinceName,tm.dep_name depName,
  1566. tm.salesman_name salesmanName, b.contract_no contractNo ,b.order_no orderNo,tm.buyer_name UserName,a.cname ,
  1567. a.commodity_name commodityName,a.commodity_quantity commodityQuantity,dep.name techDepName,a.receiver_name techName,
  1568. a.project_status projectStatus ,a.commodity_price commodityPrice ,a.special_comment specialComment
  1569. from (select task_id from t_task_log a where task_receiver=#{aid}
  1570. UNION select task_id from t_task_log a where task_allocator=#{aid}) x
  1571. 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
  1572. left join t_order_mid tm on b.order_no=tm.order_no left join admin ad on a.task_receiver =ad.id
  1573. left join department dep on ad.department_id =dep.id left join business_project bp on a.commodity_id =bp.id
  1574. where 1=1
  1575. <if test="orderNo !=null">
  1576. and a.order_no = #{orderNo}
  1577. </if>
  1578. <if test="contractNo !=null">
  1579. and b.contract_no = #{contractNo}
  1580. </if>
  1581. <if test="name !=null">
  1582. and tm.buyer_name like CONCAT('%',#{name},'%')
  1583. </if>
  1584. <if test="thchId !=null">
  1585. and a.task_receiver = #{thchId}
  1586. </if>
  1587. <if test="cid !=null">
  1588. and bp.cid =#{cid}
  1589. </if>
  1590. <if test="projectType !=null">
  1591. and bp.`type` =#{projectType}
  1592. </if>
  1593. <if test="depId !=null">
  1594. and b.order_dep =#{depId}
  1595. </if>
  1596. <if test="techDepId !=null">
  1597. and ad.department_id =#{techDepId}
  1598. </if>
  1599. <if test="declarationBatch !=null">
  1600. and a.declaration_batch =#{declarationBatch}
  1601. </if>
  1602. <if test="commodityPrice !=null">
  1603. and a.commodity_price =#{commodityPrice}
  1604. </if>
  1605. <if test="startTime !=null and endTime !=null">
  1606. and a.task_distribution_time between #{startTime} and #{endTime}
  1607. </if>
  1608. <if test="page_sql!=null">
  1609. ${page_sql}
  1610. </if>
  1611. </select>
  1612. <select id="managerSelectCount" resultType="java.lang.Integer">
  1613. select count(*)
  1614. from (select task_id from t_task_log a where task_receiver= #{aid} UNION
  1615. select task_id from t_task_log a where task_allocator= #{aid}) x
  1616. 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
  1617. left join t_order_mid tm on b.order_no=tm.order_no left join admin ad on a.task_receiver =ad.id
  1618. left join department dep on ad.department_id =dep.id left join business_project bp on a.commodity_id =bp.id
  1619. where 1=1
  1620. <if test="orderNo !=null">
  1621. and a.order_no = #{orderNo}
  1622. </if>
  1623. <if test="contractNo !=null">
  1624. and b.contract_no = #{contractNo}
  1625. </if>
  1626. <if test="name !=null">
  1627. and tm.buyer_name like CONCAT('%',#{name},'%')
  1628. </if>
  1629. <if test="thchId !=null">
  1630. and a.task_receiver = #{thchId}
  1631. </if>
  1632. <if test="cid !=null">
  1633. and bp.cid =#{cid}
  1634. </if>
  1635. <if test="projectType !=null">
  1636. and bp.`type` =#{projectType}
  1637. </if>
  1638. <if test="depId !=null">
  1639. and b.order_dep =#{depId}
  1640. </if>
  1641. <if test="techDepId !=null">
  1642. and ad.department_id =#{techDepId}
  1643. </if>
  1644. <if test="declarationBatch !=null">
  1645. and a.declaration_batch =#{declarationBatch}
  1646. </if>
  1647. <if test="commodityPrice !=null">
  1648. and a.commodity_price =#{commodityPrice}
  1649. </if>
  1650. <if test="startTime !=null and endTime !=null">
  1651. and a.task_distribution_time between #{startTime} and #{endTime}
  1652. </if>
  1653. </select>
  1654. <resultMap id="userOrder" type="com.goafanti.common.bo.UserOrderTask">
  1655. <id column="orderNo" jdbcType="VARCHAR" property="orderNo" />
  1656. <collection ofType="com.goafanti.common.bo.UserTask" property="list">
  1657. <id column="id" jdbcType="VARCHAR" property="id" />
  1658. <result column="commodityName" jdbcType="VARCHAR" property="commodityName" />
  1659. </collection>
  1660. </resultMap>
  1661. <select id="selectUidByproject" resultMap="userOrder">
  1662. select a.order_no orderNo ,b.id,b.commodity_name commodityName from t_order_new a
  1663. left join t_order_task b on a.order_no =b.order_no
  1664. where a.buyer_id = #{uid}
  1665. </select>
  1666. <select id="selectProjectCheck" resultType="com.goafanti.order.bo.OutProjectCheck">
  1667. select a.id,a.commodity_name commodityName ,b.order_no orderNo,b.contract_no contractNo,a.commodity_quantity commodityQuantity,
  1668. c.buyer_name userName ,e.cname ,a.task_distribution_time taskDistributionTime,f.name depName ,a.check_status checkStatus ,
  1669. a.main ,a.commodity_price commodityPrice ,a.task_comment taskComment ,a.official_cost officialCost,a.cost_reduction costReduction,
  1670. a.patent_type patentType
  1671. from t_order_task a left join t_order_new b on a.order_no =b.order_no
  1672. left join t_order_mid c on a.order_no =c.order_no
  1673. left join business_project d on a.commodity_id =d.id
  1674. left join business_category e on d.cid =e.id
  1675. left join department f on b.order_dep =f.id
  1676. where check_status =1
  1677. <if test="aid !=null">
  1678. and b.salesman_id = #{aid}
  1679. </if>
  1680. <if test="name !=null">
  1681. and c.buyer_name like concat('%',#{name},'%')
  1682. </if>
  1683. <if test="orderNo !=null">
  1684. and a.order_no = #{orderNo}
  1685. </if>
  1686. <if test="contractNo !=null">
  1687. and b.contract_no = #{contractNo}
  1688. </if>
  1689. <if test="pname !=null">
  1690. and a.commodity_name like concat('%',#{pname},'%')
  1691. </if>
  1692. <if test="deps !=null">
  1693. and b.order_dep in
  1694. <foreach close=")" collection="deps" item="depId" open="(" separator=",">
  1695. #{depId}
  1696. </foreach>
  1697. </if>
  1698. <if test="page_sql!=null">
  1699. ${page_sql}
  1700. </if>
  1701. </select>
  1702. <select id="countProjectCheck" resultType="java.lang.Integer">
  1703. select count(*)
  1704. from t_order_task a left join t_order_new b on a.order_no =b.order_no
  1705. left join t_order_mid c on a.order_no =c.order_no
  1706. left join business_project d on a.commodity_id =d.id
  1707. left join business_category e on d.cid =e.id
  1708. left join department f on b.order_dep =f.id
  1709. where check_status =1
  1710. <if test="aid !=null">
  1711. and b.salesman_id = #{aid}
  1712. </if>
  1713. <if test="name !=null">
  1714. and c.buyer_name like concat('%',#{name},'%')
  1715. </if>
  1716. <if test="orderNo !=null">
  1717. and a.order_no = #{orderNo}
  1718. </if>
  1719. <if test="contractNo !=null">
  1720. and b.contract_no = #{contractNo}
  1721. </if>
  1722. <if test="pname !=null">
  1723. and a.commodity_name like concat('%',#{pname},'%')
  1724. </if>
  1725. <if test="deps !=null">
  1726. and b.order_dep in
  1727. <foreach close=")" collection="deps" item="depId" open="(" separator=",">
  1728. #{depId}
  1729. </foreach>
  1730. </if>
  1731. </select>
  1732. <update id="resstPayment">
  1733. update t_order_task a ,t_task_mid c
  1734. set c.party_amount =0,c.cost_amount =0
  1735. where a.id= #{id} and a.id=c.tid
  1736. </update>
  1737. <update id="updateAddCostAmount">
  1738. update t_task_mid
  1739. set cost_amount =cost_amount + #{cost}
  1740. where tid= #{tid}
  1741. </update>
  1742. <select id="selectAidByParam" resultType="com.goafanti.common.bo.OrderOperator">
  1743. select a.id tid,b.order_no orderNo ,b.salesman_id salesmanId,b.finance_id financeId ,a.task_receiver techId,
  1744. b.salesman_name salesmanName ,b.finance_name financeName ,d.name techName,b.buyer_name buyerName
  1745. from t_order_task a left join t_order_mid b on a.order_no=b.order_no
  1746. left join admin d on a.task_receiver=d.id
  1747. where 1=1
  1748. <if test="tid !=null">
  1749. and a.id= #{tid}
  1750. </if>
  1751. </select>
  1752. <select id="selectByTidGetDtails" resultType="com.goafanti.organization.bo.ProjectTypePuls">
  1753. select a.id,a.order_no orderNo,a.official_cost officialCost,a.cost_reduction costReduction ,a.commodity_quantity quantity ,a.patent_type patentType,
  1754. b.patent_name_type projectType, c.amount officialAmount,c.proportion85,b.patent_type outPatentType,d.type
  1755. 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`
  1756. left join business_project d on a.commodity_id=d.id
  1757. where a.id= #{tid}
  1758. </select>
  1759. <select id="highNewRetrialStatistics" resultType="com.goafanti.order.bo.OutHighNewRetrialStatistics">
  1760. select t1. province,dg.name provinceName ,t1.quantity,t1.pass,t1.notPass,ifnull(t1.signBacks,0) signBacks
  1761. 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,
  1762. sum(ttm.high_new_retrial)signBacks
  1763. 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
  1764. left join t_order_new c on a.order_no =c.order_no left join admin d on c.salesman_id =d.id
  1765. 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)
  1766. <if test="depId!=null">
  1767. and e.id= #{depId}
  1768. </if>
  1769. <if test="startDate!=null and endDate!=null">
  1770. and c.sign_time between #{startDate} and #{endDate}
  1771. </if>
  1772. group by e.province )t1 left join district_glossory dg on t1.province=dg.id
  1773. </select>
  1774. <select id="getHighNewRetrial" resultType="java.lang.Integer">
  1775. select count(*) from t_order_new a left join t_order_new b on a.buyer_id =b.buyer_id
  1776. left join t_order_task c on b.order_no =c.order_no left join business_project d on c.commodity_id =d.id
  1777. where a.order_no =#{orderNo} and b.create_time &lt; a.create_time and d.`type` =5
  1778. </select>
  1779. <select id="highNewRetrialList" resultType="com.goafanti.order.bo.OutHighNewRetrialList">
  1780. select t1.province,dg.name provinceName,t1.salesman_id aid,t1.name name,t1.quantity,t1.pass,t1.notPass,t1.signBacks
  1781. from (SELECT e.province,c.salesman_id,d.name ,sum(1) quantity,sum(if(a.project_status=10,1,0))pass,
  1782. sum(if(a.project_status != 10,1,0))notPass, sum(ttm.high_new_retrial)signBacks
  1783. 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
  1784. left join t_order_new c on a.order_no =c.order_no left join admin d on c.salesman_id =d.id
  1785. 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)
  1786. <if test="province!=null">
  1787. and e.province= #{province}
  1788. </if>
  1789. <if test="depId!=null">
  1790. and e.id= #{depId}
  1791. </if>
  1792. <if test="startDate!=null and endDate!=null">
  1793. and c.sign_time between #{startDate} and #{endDate}
  1794. </if>
  1795. <if test="aid !=null">
  1796. and c.salesman_id = #{aid}
  1797. </if>
  1798. <if test="depId !=null">
  1799. and d.department_id = #{depId}
  1800. </if>
  1801. group by e.province ,c.salesman_id ,d.name )t1 left join district_glossory dg on t1.province=dg.id
  1802. order by
  1803. <if test="sort==0">
  1804. t1.pass
  1805. </if>
  1806. <if test="sort==1">
  1807. t1.notPass
  1808. </if>
  1809. desc
  1810. </select>
  1811. <select id="findMemberList" resultType="com.goafanti.order.bo.OutMemberList">
  1812. select a.id,b.contract_no contractNo,c.buyer_name userName,a.order_no orderNo,b.approval ,c.dep_name depName,
  1813. c.salesman_name salesmanName,c.finance_name financeName,a.commodity_name projectName,a.member_type memberType,
  1814. b.delete_sign deleteSign ,b.total_amount totalAmount ,b.sales_type salesType ,b.other,
  1815. a.process_status status,a.commodity_id commodityId,a.commodity_name commodityName,
  1816. a.commodity_quantity commodityQuantity,a.task_comment taskComment,a.picture_url pictureUrl,
  1817. e.service_life serviceLife ,e.service_year serviceYear,e.year_sum yearSum
  1818. from t_order_task a left join t_order_new b on a.order_no =b.order_no
  1819. left join t_order_mid c on a.order_no =c.order_no
  1820. left join t_task_member e on a.id=e.tid
  1821. <if test="shiroType ==2">
  1822. left join department d on b.order_dep =d.id
  1823. </if>
  1824. where b.delete_sign in (0,2)
  1825. and a.process_status in (1,2,3,4)
  1826. <if test="shiroType ==1">
  1827. and b.salesman_id = #{aid}
  1828. </if>
  1829. <if test="shiroType ==2">
  1830. and d.finance_id = #{aid}
  1831. </if>
  1832. <if test="orderNo != null">
  1833. and a.order_no = #{orderNo}
  1834. </if>
  1835. <if test="userName != null">
  1836. and c.buyer_name like concat('%',#{userName},'%')
  1837. </if>
  1838. <if test="deps != null">
  1839. and b.order_dep in
  1840. <foreach close=")" collection="deps" item="dep" open="(" separator=",">
  1841. #{dep}
  1842. </foreach>
  1843. </if>
  1844. <if test="contractNo != null">
  1845. and b.contract_no =#{contractNo}
  1846. </if>
  1847. <if test="salesmanId != null">
  1848. and b.salesman_id =#{salesmanId}
  1849. </if>
  1850. <if test="projectName != null">
  1851. and a.commodity_name like concat('%',#{projectName},'%')
  1852. </if>
  1853. <if test="amountStatus == 0">
  1854. and b.total_amount &lt; 10
  1855. </if>
  1856. <if test="amountStatus == 1">
  1857. and b.total_amount between 10 and 20
  1858. </if>
  1859. <if test="amountStatus == 2">
  1860. and b.total_amount between 20 and 30
  1861. </if>
  1862. <if test="amountStatus == 3">
  1863. and b.total_amount between 30 and 40
  1864. </if>
  1865. <if test="amountStatus == 4">
  1866. and b.total_amount &gt; 40
  1867. </if>
  1868. <if test="approval != null and approval &lt; 3">
  1869. and b.approval = #{approval}
  1870. </if>
  1871. <if test="approval != null and approval ==4">
  1872. and b.approval in (1,2)
  1873. </if>
  1874. <if test="status != null and status !=5">
  1875. and a.process_status = #{status}
  1876. </if>
  1877. order by a.process_status
  1878. <if test="page_sql!=null">
  1879. ${page_sql}
  1880. </if>
  1881. </select>
  1882. <select id="findMemberCount" resultType="java.lang.Integer">
  1883. select count(*)
  1884. from t_order_task a left join t_order_new b on a.order_no =b.order_no
  1885. left join t_order_mid c on a.order_no =c.order_no
  1886. <if test="shiroType ==2">
  1887. left join department d on b.order_dep =d.id
  1888. </if>
  1889. where b.delete_sign in (0,2)
  1890. and a.process_status in (1,2,3,4)
  1891. <if test="shiroType ==1">
  1892. and b.salesman_id = #{aid}
  1893. </if>
  1894. <if test="shiroType ==2">
  1895. and d.finance_id = #{aid}
  1896. </if>
  1897. <if test="orderNo != null">
  1898. and a.order_no = #{orderNo}
  1899. </if>
  1900. <if test="userName != null">
  1901. and c.buyer_name like concat('%',#{userName},'%')
  1902. </if>
  1903. <if test="deps != null">
  1904. and b.order_dep in
  1905. <foreach close=")" collection="deps" item="dep" open="(" separator=",">
  1906. #{dep}
  1907. </foreach>
  1908. </if>
  1909. <if test="contractNo != null">
  1910. and b.contract_no =#{contractNo}
  1911. </if>
  1912. <if test="salesmanId != null">
  1913. and b.salesman_id =#{salesmanId}
  1914. </if>
  1915. <if test="projectName != null">
  1916. and a.commodity_name like concat('%',#{projectName},'%')
  1917. </if>
  1918. <if test="amountStatus == 1">
  1919. and b.total_amount between 10 and 20
  1920. </if>
  1921. <if test="amountStatus == 2">
  1922. and b.total_amount between 20 and 30
  1923. </if>
  1924. <if test="amountStatus == 3">
  1925. and b.total_amount between 30 and 40
  1926. </if>
  1927. <if test="amountStatus == 4">
  1928. and b.total_amount &gt; 40
  1929. </if>
  1930. <if test="approval != null and approval &lt; 3">
  1931. and b.approval = #{approval}
  1932. </if>
  1933. <if test="approval != null and approval ==4">
  1934. and b.approval in (1,2)
  1935. </if>
  1936. <if test="status != null and status !=5">
  1937. and a.process_status = #{status}
  1938. </if>
  1939. </select>
  1940. <select id="selectByAid" resultType="com.goafanti.common.model.TChangeTask">
  1941. select b.id,b.cid from t_order_task a
  1942. left join t_change_task b on a.id=b.tid
  1943. left join new_order_change noc on b.cid =noc.id
  1944. where b.id is not null and noc.process_state &lt; 4 and noc.status in (0,1,2)
  1945. and a.task_receiver = #{aid}
  1946. </select>
  1947. <select id="getSplitCount" resultType="java.lang.Integer">
  1948. select count(*) from t_order_task
  1949. where split_super = #{tid}
  1950. </select>
  1951. <select id="selectProjectSotpList" resultType="com.goafanti.order.bo.OutselectProjectSotp">
  1952. 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,
  1953. c.order_no orderNo ,tom.buyer_name userName,b.cname ,b.commodity_name projectName,b.commodity_quantity commodityQuantity ,a.annex_url annexUrl,
  1954. tom.service_type serviceType , b.receiver_name receiverName ,b.status ,b.commodity_price commodityPrice ,a.reason,a.id,b.id tid,
  1955. ttm.stop_status projectStopStatus, ttm.stop_type projectStopType
  1956. from task_stop a left join t_order_task b on a.tid=b.id
  1957. left join t_order_new c on b.order_no =c.order_no
  1958. left join t_task_mid ttm on b.id=ttm.tid
  1959. left join t_order_mid tom on c.order_no =tom.order_no
  1960. left join department d on c.order_dep =d.id
  1961. left join district_glossory dg on d.province =dg.id
  1962. where 1=1
  1963. <if test="shiro ==1">
  1964. and c.salesman_id =#{aid}
  1965. </if>
  1966. <if test="shiro ==2">
  1967. and c.order_dep in
  1968. <foreach close=")" collection="deps" item="dep" open="(" separator=",">
  1969. #{dep}
  1970. </foreach>
  1971. </if>
  1972. <if test="orderNo !=null">
  1973. and b.order_no = #{orderNo}
  1974. </if>
  1975. <if test="userName !=null">
  1976. and tom.buyer_name like CONCAT('%',#{userName},'%')
  1977. </if>
  1978. <if test="depId !=null">
  1979. and c.order_dep = #{depId}
  1980. </if>
  1981. <if test="contractNo !=null">
  1982. and c.contract_no like CONCAT('%',#{contractNo},'%')
  1983. </if>
  1984. <if test="projectName !=null">
  1985. and b.commodity_name like CONCAT('%',#{projectName},'%')
  1986. </if>
  1987. <if test="status !=null">
  1988. <if test="status==0">
  1989. and a.`type` =0 and a.status =0
  1990. </if>
  1991. <if test="status==1">
  1992. and a.`type` =1 and a.status =0
  1993. </if>
  1994. <if test="status==2">
  1995. and a.`type` =0 and a.status =1
  1996. </if>
  1997. <if test="status==3">
  1998. and a.`type` =1 and a.status =1
  1999. </if>
  2000. <if test="status==4">
  2001. and a.`type` =0 and a.status =2
  2002. </if>
  2003. <if test="status==5">
  2004. and a.`type` =1 and a.status =2
  2005. </if>
  2006. </if>
  2007. <if test="receiverId !=null">
  2008. and b.task_receiver = #{receiverId}
  2009. </if>
  2010. <if test="startTime !=null and endTime !=null">
  2011. and a.create_time BETWEEN #{startTime} and #{endTime}
  2012. </if>
  2013. order by a.create_time desc
  2014. <if test="page_sql!=null">
  2015. ${page_sql}
  2016. </if>
  2017. </select>
  2018. <select id="selectProjectSotpCount" resultType="java.lang.Integer">
  2019. select count(*)
  2020. from task_stop a left join t_order_task b on a.tid=b.id
  2021. left join t_order_new c on b.order_no =c.order_no
  2022. left join t_order_mid tom on c.order_no =tom.order_no
  2023. where 1=1
  2024. <if test="shiro ==1">
  2025. and c.salesman_id =#{aid}
  2026. </if>
  2027. <if test="shiro ==2">
  2028. and c.order_dep in
  2029. <foreach close=")" collection="deps" item="dep" open="(" separator=",">
  2030. #{dep}
  2031. </foreach>
  2032. </if>
  2033. <if test="orderNo !=null">
  2034. and b.order_no = #{orderNo}
  2035. </if>
  2036. <if test="userName !=null">
  2037. and tom.buyer_name like CONCAT('%',#{userName},'%')
  2038. </if>
  2039. <if test="depId !=null">
  2040. and c.order_dep = #{depId}
  2041. </if>
  2042. <if test="contractNo !=null">
  2043. and c.contract_no like CONCAT('%',#{contractNo},'%')
  2044. </if>
  2045. <if test="projectName !=null">
  2046. and b.commodity_name like CONCAT('%',#{projectName},'%')
  2047. </if>
  2048. <if test="status !=null">
  2049. <if test="status==0">
  2050. and a.`type` =0 and a.status =0
  2051. </if>
  2052. <if test="status==1">
  2053. and a.`type` =1 and a.status =0
  2054. </if>
  2055. <if test="status==2">
  2056. and a.`type` =0 and a.status =1
  2057. </if>
  2058. <if test="status==3">
  2059. and a.`type` =1 and a.status =1
  2060. </if>
  2061. <if test="status==4">
  2062. and a.status=2
  2063. </if>
  2064. </if>
  2065. <if test="receiverId !=null">
  2066. and b.task_receiver = #{receiverId}
  2067. </if>
  2068. <if test="startTime !=null and endTime !=null">
  2069. and a.create_time BETWEEN #{startTime} and #{endTime}
  2070. </if>
  2071. </select>
  2072. <update id="updateBySuperId">
  2073. update t_order_task
  2074. <set>
  2075. <if test="orderNo != null">
  2076. order_no = #{orderNo,jdbcType=VARCHAR},
  2077. </if>
  2078. <if test="main != null">
  2079. main = #{main,jdbcType=INTEGER},
  2080. </if>
  2081. <if test="superId != null">
  2082. super_id = #{superId,jdbcType=VARCHAR},
  2083. </if>
  2084. <if test="commodityId != null">
  2085. commodity_id = #{commodityId,jdbcType=VARCHAR},
  2086. </if>
  2087. <if test="commodityName != null">
  2088. commodity_name = #{commodityName,jdbcType=VARCHAR},
  2089. </if>
  2090. <if test="commodityQuantity != null">
  2091. commodity_quantity = #{commodityQuantity,jdbcType=INTEGER},
  2092. </if>
  2093. <if test="commodityMode != null">
  2094. commodity_mode = #{commodityMode,jdbcType=VARCHAR},
  2095. </if>
  2096. <if test="commodityPrice != null">
  2097. commodity_price = #{commodityPrice,jdbcType=DECIMAL},
  2098. </if>
  2099. <if test="taskStatus != null">
  2100. task_status = #{taskStatus,jdbcType=INTEGER},
  2101. </if>
  2102. <if test="taskDistributionTime != null">
  2103. task_distribution_time = #{taskDistributionTime,jdbcType=TIMESTAMP},
  2104. </if>
  2105. <if test="taskAllocator != null">
  2106. task_allocator = #{taskAllocator,jdbcType=VARCHAR},
  2107. </if>
  2108. <if test="taskReceiver != null">
  2109. task_receiver = #{taskReceiver,jdbcType=VARCHAR},
  2110. </if>
  2111. <if test="taskComment != null">
  2112. task_comment = #{taskComment,jdbcType=VARCHAR},
  2113. </if>
  2114. <if test="taskStartTime != null">
  2115. task_start_time = #{taskStartTime,jdbcType=TIMESTAMP},
  2116. </if>
  2117. <if test="taskEndTime != null">
  2118. task_end_time = #{taskEndTime,jdbcType=TIMESTAMP},
  2119. </if>
  2120. <if test="attachmentUrl != null">
  2121. attachment_url = #{attachmentUrl,jdbcType=VARCHAR},
  2122. </if>
  2123. <if test="projectStatus != null">
  2124. project_status = #{projectStatus,jdbcType=INTEGER},
  2125. </if>
  2126. <if test="acceptTime != null">
  2127. accept_time = #{acceptTime,jdbcType=DATE},
  2128. </if>
  2129. <if test="reviewTime != null">
  2130. review_time = #{reviewTime,jdbcType=DATE},
  2131. </if>
  2132. <if test="publicityTime != null">
  2133. publicity_time = #{publicityTime,jdbcType=DATE},
  2134. </if>
  2135. <if test="licenceTime != null">
  2136. licence_time = #{licenceTime,jdbcType=DATE},
  2137. </if>
  2138. <if test="certificateNumber != null">
  2139. certificate_number = #{certificateNumber,jdbcType=VARCHAR},
  2140. </if>
  2141. <if test="status != null">
  2142. `status` = #{status,jdbcType=INTEGER},
  2143. </if>
  2144. <if test="formRetrieve != null">
  2145. form_retrieve = #{formRetrieve,jdbcType=INTEGER},
  2146. </if>
  2147. <if test="taskRefund != null">
  2148. task_refund = #{taskRefund,jdbcType=INTEGER},
  2149. </if>
  2150. <if test="refundContent != null">
  2151. refund_content = #{refundContent,jdbcType=VARCHAR},
  2152. </if>
  2153. <if test="retrieveContent != null">
  2154. retrieve_content = #{retrieveContent,jdbcType=VARCHAR},
  2155. </if>
  2156. <if test="declareUser != null">
  2157. declare_user = #{declareUser,jdbcType=VARCHAR},
  2158. </if>
  2159. <if test="declarePwd != null">
  2160. declare_pwd = #{declarePwd,jdbcType=VARCHAR},
  2161. </if>
  2162. <if test="setUpAmount != null">
  2163. set_up_amount = #{setUpAmount,jdbcType=DECIMAL},
  2164. </if>
  2165. <if test="arrivalMoney != null">
  2166. arrival_money = #{arrivalMoney,jdbcType=INTEGER},
  2167. </if>
  2168. <if test="outsourceName != null">
  2169. outsource_name = #{outsourceName,jdbcType=VARCHAR},
  2170. </if>
  2171. <if test="outsourcePrice != null">
  2172. outsource_price = #{outsourcePrice,jdbcType=DECIMAL},
  2173. </if>
  2174. <if test="consultantId != null">
  2175. consultant_id = #{consultantId,jdbcType=VARCHAR},
  2176. </if>
  2177. <if test="managerId != null">
  2178. manager_id = #{managerId,jdbcType=VARCHAR},
  2179. </if>
  2180. <if test="outsource != null">
  2181. outsource = #{outsource,jdbcType=INTEGER},
  2182. </if>
  2183. <if test="splitStatus != null">
  2184. split_status = #{splitStatus,jdbcType=INTEGER},
  2185. </if>
  2186. <if test="splitId != null">
  2187. split_id = #{splitId,jdbcType=INTEGER},
  2188. </if>
  2189. <if test="splitAid != null">
  2190. split_aid = #{splitAid,jdbcType=VARCHAR},
  2191. </if>
  2192. <if test="splitTime != null">
  2193. split_time = #{splitTime,jdbcType=TIMESTAMP},
  2194. </if>
  2195. <if test="cname != null">
  2196. cname = #{cname,jdbcType=VARCHAR},
  2197. </if>
  2198. <if test="receiverName != null">
  2199. receiver_name = #{receiverName,jdbcType=VARCHAR},
  2200. </if>
  2201. <if test="declarationBatch != null">
  2202. declaration_batch = #{declarationBatch,jdbcType=INTEGER},
  2203. </if>
  2204. <if test="costReduction != null">
  2205. cost_reduction = #{costReduction,jdbcType=INTEGER},
  2206. </if>
  2207. <if test="officialCost != null">
  2208. official_cost = #{officialCost,jdbcType=INTEGER},
  2209. </if>
  2210. <if test="setUpStatus != null">
  2211. set_up_status = #{setUpStatus,jdbcType=INTEGER},
  2212. </if>
  2213. <if test="setUpTime != null">
  2214. set_up_time = #{setUpTime,jdbcType=TIMESTAMP},
  2215. </if>
  2216. <if test="spotCheckStatus != null">
  2217. spot_check_status = #{spotCheckStatus,jdbcType=INTEGER},
  2218. </if>
  2219. <if test="highTechStatus != null">
  2220. high_tech_status = #{highTechStatus,jdbcType=INTEGER},
  2221. </if>
  2222. <if test="specialComment != null">
  2223. special_comment = #{specialComment,jdbcType=VARCHAR},
  2224. </if>
  2225. <if test="ifCertificationFee != null">
  2226. if_certification_fee = #{ifCertificationFee,jdbcType=INTEGER},
  2227. </if>
  2228. <if test="certificationFee != null">
  2229. certification_fee = #{certificationFee,jdbcType=DECIMAL},
  2230. </if>
  2231. <if test="certificationCorporate != null">
  2232. certification_corporate = #{certificationCorporate,jdbcType=VARCHAR},
  2233. </if>
  2234. <if test="timeRecord != null">
  2235. time_record = #{timeRecord,jdbcType=VARCHAR},
  2236. </if>
  2237. <if test="ifPublicity != null">
  2238. if_publicity = #{ifPublicity,jdbcType=INTEGER},
  2239. </if>
  2240. <if test="checkStatus != null">
  2241. check_status = #{checkStatus,jdbcType=INTEGER},
  2242. </if>
  2243. <if test="patentType != null">
  2244. patent_type = #{patentType,jdbcType=INTEGER},
  2245. </if>
  2246. <if test="pubicityUrl != null">
  2247. pubicity_url = #{pubicityUrl,jdbcType=VARCHAR},
  2248. </if>
  2249. <if test="processStatus != null">
  2250. process_status = #{processStatus,jdbcType=INTEGER},
  2251. </if>
  2252. <if test="memberType != null">
  2253. member_type = #{memberType,jdbcType=INTEGER},
  2254. </if>
  2255. <if test="pictureUrl != null">
  2256. picture_url = #{pictureUrl,jdbcType=VARCHAR},
  2257. </if>
  2258. </set>
  2259. where split_super = #{splitSuper,jdbcType=INTEGER}
  2260. </update>
  2261. <delete id="deleteBySplitId" parameterType="java.lang.Integer">
  2262. delete from t_order_task
  2263. where split_super = #{id,jdbcType=INTEGER}
  2264. </delete>
  2265. <update id="updateDimissionTransferManager">
  2266. update t_order_task
  2267. set manager_id= #{transferId}
  2268. where manager_id = #{aid}
  2269. </update>
  2270. </mapper>