TOrderTaskMapper.xml 73 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739
  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. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. This element was generated on Tue Jun 09 09:38:55 CST 2020.
  9. -->
  10. <id column="id" jdbcType="INTEGER" property="id" />
  11. <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
  12. <result column="main" jdbcType="INTEGER" property="main" />
  13. <result column="super_id" jdbcType="VARCHAR" property="superId" />
  14. <result column="commodity_id" jdbcType="VARCHAR" property="commodityId" />
  15. <result column="commodity_name" jdbcType="VARCHAR" property="commodityName" />
  16. <result column="commodity_quantity" jdbcType="INTEGER" property="commodityQuantity" />
  17. <result column="commodity_mode" jdbcType="VARCHAR" property="commodityMode" />
  18. <result column="commodity_price" jdbcType="DECIMAL" property="commodityPrice" />
  19. <result column="task_status" jdbcType="INTEGER" property="taskStatus" />
  20. <result column="task_distribution_time" jdbcType="TIMESTAMP" property="taskDistributionTime" />
  21. <result column="task_allocator" jdbcType="VARCHAR" property="taskAllocator" />
  22. <result column="task_receiver" jdbcType="VARCHAR" property="taskReceiver" />
  23. <result column="task_comment" jdbcType="VARCHAR" property="taskComment" />
  24. <result column="task_start_time" jdbcType="TIMESTAMP" property="taskStartTime" />
  25. <result column="task_end_time" jdbcType="TIMESTAMP" property="taskEndTime" />
  26. <result column="project_status" jdbcType="INTEGER" property="projectStatus" />
  27. <result column="accept_time" jdbcType="DATE" property="acceptTime" />
  28. <result column="review_time" jdbcType="DATE" property="reviewTime" />
  29. <result column="publicity_time" jdbcType="DATE" property="publicityTime" />
  30. <result column="licence_time" jdbcType="DATE" property="licenceTime" />
  31. <result column="certificate_number" jdbcType="VARCHAR" property="certificateNumber" />
  32. <result column="status" jdbcType="INTEGER" property="status" />
  33. <result column="form_retrieve" jdbcType="INTEGER" property="formRetrieve" />
  34. <result column="task_refund" jdbcType="INTEGER" property="taskRefund" />
  35. <result column="refund_content" jdbcType="VARCHAR" property="refundContent" />
  36. <result column="retrieve_content" jdbcType="VARCHAR" property="retrieveContent" />
  37. <result column="declare_user" jdbcType="VARCHAR" property="declareUser" />
  38. <result column="declare_pwd" jdbcType="VARCHAR" property="declarePwd" />
  39. <result column="set_up_amount" jdbcType="DECIMAL" property="setUpAmount" />
  40. <result column="arrival_money" jdbcType="INTEGER" property="arrivalMoney" />
  41. <result column="outsource_name" jdbcType="VARCHAR" property="outsourceName" />
  42. <result column="outsource_price" jdbcType="DECIMAL" property="outsourcePrice" />
  43. <result column="consultant_id" jdbcType="VARCHAR" property="consultantId" />
  44. <result column="manager_id" jdbcType="VARCHAR" property="managerId" />
  45. <result column="outsource" jdbcType="INTEGER" property="outsource" />
  46. <result column="split_super" jdbcType="INTEGER" property="splitSuper" />
  47. <result column="split_status" jdbcType="INTEGER" property="splitStatus" />
  48. <result column="split_id" jdbcType="INTEGER" property="splitId" />
  49. <result column="split_aid" jdbcType="VARCHAR" property="splitAid" />
  50. <result column="split_time" jdbcType="TIMESTAMP" property="splitTime" />
  51. <result column="cname" jdbcType="VARCHAR" property="cname" />
  52. <result column="receiver_name" jdbcType="VARCHAR" property="receiverName" />
  53. <result column="declaration_batch" jdbcType="INTEGER" property="declarationBatch" />
  54. </resultMap>
  55. <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.goafanti.common.model.TOrderTask">
  56. <!--
  57. WARNING - @mbg.generated
  58. This element is automatically generated by MyBatis Generator, do not modify.
  59. This element was generated on Tue Jun 09 09:38:55 CST 2020.
  60. -->
  61. <result column="attachment_url" jdbcType="LONGVARCHAR" property="attachmentUrl" />
  62. </resultMap>
  63. <sql id="Example_Where_Clause">
  64. <!--
  65. WARNING - @mbg.generated
  66. This element is automatically generated by MyBatis Generator, do not modify.
  67. This element was generated on Tue Jun 09 09:38:55 CST 2020.
  68. -->
  69. <where>
  70. <foreach collection="oredCriteria" item="criteria" separator="or">
  71. <if test="criteria.valid">
  72. <trim prefix="(" prefixOverrides="and" suffix=")">
  73. <foreach collection="criteria.criteria" item="criterion">
  74. <choose>
  75. <when test="criterion.noValue">
  76. and ${criterion.condition}
  77. </when>
  78. <when test="criterion.singleValue">
  79. and ${criterion.condition} #{criterion.value}
  80. </when>
  81. <when test="criterion.betweenValue">
  82. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  83. </when>
  84. <when test="criterion.listValue">
  85. and ${criterion.condition}
  86. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  87. #{listItem}
  88. </foreach>
  89. </when>
  90. </choose>
  91. </foreach>
  92. </trim>
  93. </if>
  94. </foreach>
  95. </where>
  96. </sql>
  97. <sql id="Update_By_Example_Where_Clause">
  98. <!--
  99. WARNING - @mbg.generated
  100. This element is automatically generated by MyBatis Generator, do not modify.
  101. This element was generated on Tue Jun 09 09:38:55 CST 2020.
  102. -->
  103. <where>
  104. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  105. <if test="criteria.valid">
  106. <trim prefix="(" prefixOverrides="and" suffix=")">
  107. <foreach collection="criteria.criteria" item="criterion">
  108. <choose>
  109. <when test="criterion.noValue">
  110. and ${criterion.condition}
  111. </when>
  112. <when test="criterion.singleValue">
  113. and ${criterion.condition} #{criterion.value}
  114. </when>
  115. <when test="criterion.betweenValue">
  116. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  117. </when>
  118. <when test="criterion.listValue">
  119. and ${criterion.condition}
  120. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  121. #{listItem}
  122. </foreach>
  123. </when>
  124. </choose>
  125. </foreach>
  126. </trim>
  127. </if>
  128. </foreach>
  129. </where>
  130. </sql>
  131. <sql id="Base_Column_List">
  132. <!--
  133. WARNING - @mbg.generated
  134. This element is automatically generated by MyBatis Generator, do not modify.
  135. This element was generated on Tue Jun 09 09:38:55 CST 2020.
  136. -->
  137. id, order_no, main, super_id, commodity_id, commodity_name, commodity_quantity, commodity_mode,
  138. commodity_price, task_status, task_distribution_time, task_allocator, task_receiver,
  139. task_comment, task_start_time, task_end_time, project_status, accept_time, review_time,
  140. publicity_time, licence_time, certificate_number, status, form_retrieve, task_refund,
  141. refund_content, retrieve_content, declare_user, declare_pwd, set_up_amount, arrival_money,
  142. outsource_name, outsource_price, consultant_id, manager_id, outsource, split_super,
  143. split_status, split_id, split_aid, split_time, cname, receiver_name, declaration_batch
  144. </sql>
  145. <sql id="Blob_Column_List">
  146. <!--
  147. WARNING - @mbg.generated
  148. This element is automatically generated by MyBatis Generator, do not modify.
  149. This element was generated on Tue Jun 09 09:38:55 CST 2020.
  150. -->
  151. attachment_url
  152. </sql>
  153. <select id="selectByExampleWithBLOBs" parameterType="com.goafanti.common.model.TOrderTaskExample" resultMap="ResultMapWithBLOBs">
  154. <!--
  155. WARNING - @mbg.generated
  156. This element is automatically generated by MyBatis Generator, do not modify.
  157. This element was generated on Tue Jun 09 09:38:55 CST 2020.
  158. -->
  159. select
  160. <if test="distinct">
  161. distinct
  162. </if>
  163. <include refid="Base_Column_List" />
  164. ,
  165. <include refid="Blob_Column_List" />
  166. from t_order_task
  167. <if test="_parameter != null">
  168. <include refid="Example_Where_Clause" />
  169. </if>
  170. <if test="orderByClause != null">
  171. order by ${orderByClause}
  172. </if>
  173. </select>
  174. <select id="selectByExample" parameterType="com.goafanti.common.model.TOrderTaskExample" resultMap="BaseResultMap">
  175. <!--
  176. WARNING - @mbg.generated
  177. This element is automatically generated by MyBatis Generator, do not modify.
  178. This element was generated on Tue Jun 09 09:38:55 CST 2020.
  179. -->
  180. select
  181. <if test="distinct">
  182. distinct
  183. </if>
  184. <include refid="Base_Column_List" />
  185. from t_order_task
  186. <if test="_parameter != null">
  187. <include refid="Example_Where_Clause" />
  188. </if>
  189. <if test="orderByClause != null">
  190. order by ${orderByClause}
  191. </if>
  192. </select>
  193. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
  194. <!--
  195. WARNING - @mbg.generated
  196. This element is automatically generated by MyBatis Generator, do not modify.
  197. This element was generated on Tue Jun 09 09:38:55 CST 2020.
  198. -->
  199. select
  200. <include refid="Base_Column_List" />
  201. ,
  202. <include refid="Blob_Column_List" />
  203. from t_order_task
  204. where id = #{id,jdbcType=INTEGER}
  205. </select>
  206. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  207. <!--
  208. WARNING - @mbg.generated
  209. This element is automatically generated by MyBatis Generator, do not modify.
  210. This element was generated on Tue Jun 09 09:38:55 CST 2020.
  211. -->
  212. delete from t_order_task
  213. where id = #{id,jdbcType=INTEGER}
  214. </delete>
  215. <delete id="deleteByExample" parameterType="com.goafanti.common.model.TOrderTaskExample">
  216. <!--
  217. WARNING - @mbg.generated
  218. This element is automatically generated by MyBatis Generator, do not modify.
  219. This element was generated on Tue Jun 09 09:38:55 CST 2020.
  220. -->
  221. delete from t_order_task
  222. <if test="_parameter != null">
  223. <include refid="Example_Where_Clause" />
  224. </if>
  225. </delete>
  226. <insert id="insert" parameterType="com.goafanti.common.model.TOrderTask">
  227. <!--
  228. WARNING - @mbg.generated
  229. This element is automatically generated by MyBatis Generator, do not modify.
  230. This element was generated on Tue Jun 09 09:38:55 CST 2020.
  231. -->
  232. insert into t_order_task (id, order_no, main,
  233. super_id, commodity_id, commodity_name,
  234. commodity_quantity, commodity_mode, commodity_price,
  235. task_status, task_distribution_time, task_allocator,
  236. task_receiver, task_comment, task_start_time,
  237. task_end_time, project_status, accept_time,
  238. review_time, publicity_time, licence_time,
  239. certificate_number, status, form_retrieve,
  240. task_refund, refund_content, retrieve_content,
  241. declare_user, declare_pwd, set_up_amount,
  242. arrival_money, outsource_name, outsource_price,
  243. consultant_id, manager_id, outsource,
  244. split_super, split_status, split_id,
  245. split_aid, split_time, cname,
  246. receiver_name, declaration_batch, attachment_url
  247. )
  248. values (#{id,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{main,jdbcType=INTEGER},
  249. #{superId,jdbcType=VARCHAR}, #{commodityId,jdbcType=VARCHAR}, #{commodityName,jdbcType=VARCHAR},
  250. #{commodityQuantity,jdbcType=INTEGER}, #{commodityMode,jdbcType=VARCHAR}, #{commodityPrice,jdbcType=DECIMAL},
  251. #{taskStatus,jdbcType=INTEGER}, #{taskDistributionTime,jdbcType=TIMESTAMP}, #{taskAllocator,jdbcType=VARCHAR},
  252. #{taskReceiver,jdbcType=VARCHAR}, #{taskComment,jdbcType=VARCHAR}, #{taskStartTime,jdbcType=TIMESTAMP},
  253. #{taskEndTime,jdbcType=TIMESTAMP}, #{projectStatus,jdbcType=INTEGER}, #{acceptTime,jdbcType=DATE},
  254. #{reviewTime,jdbcType=DATE}, #{publicityTime,jdbcType=DATE}, #{licenceTime,jdbcType=DATE},
  255. #{certificateNumber,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{formRetrieve,jdbcType=INTEGER},
  256. #{taskRefund,jdbcType=INTEGER}, #{refundContent,jdbcType=VARCHAR}, #{retrieveContent,jdbcType=VARCHAR},
  257. #{declareUser,jdbcType=VARCHAR}, #{declarePwd,jdbcType=VARCHAR}, #{setUpAmount,jdbcType=DECIMAL},
  258. #{arrivalMoney,jdbcType=INTEGER}, #{outsourceName,jdbcType=VARCHAR}, #{outsourcePrice,jdbcType=DECIMAL},
  259. #{consultantId,jdbcType=VARCHAR}, #{managerId,jdbcType=VARCHAR}, #{outsource,jdbcType=INTEGER},
  260. #{splitSuper,jdbcType=INTEGER}, #{splitStatus,jdbcType=INTEGER}, #{splitId,jdbcType=INTEGER},
  261. #{splitAid,jdbcType=VARCHAR}, #{splitTime,jdbcType=TIMESTAMP}, #{cname,jdbcType=VARCHAR},
  262. #{receiverName,jdbcType=VARCHAR}, #{declarationBatch,jdbcType=INTEGER}, #{attachmentUrl,jdbcType=LONGVARCHAR}
  263. )
  264. </insert>
  265. <insert id="insertSelective" parameterType="com.goafanti.common.model.TOrderTask">
  266. <!--
  267. WARNING - @mbg.generated
  268. This element is automatically generated by MyBatis Generator, do not modify.
  269. This element was generated on Tue Jun 09 09:38:55 CST 2020.
  270. -->
  271. insert into t_order_task
  272. <trim prefix="(" suffix=")" suffixOverrides=",">
  273. <if test="id != null">
  274. id,
  275. </if>
  276. <if test="orderNo != null">
  277. order_no,
  278. </if>
  279. <if test="main != null">
  280. main,
  281. </if>
  282. <if test="superId != null">
  283. super_id,
  284. </if>
  285. <if test="commodityId != null">
  286. commodity_id,
  287. </if>
  288. <if test="commodityName != null">
  289. commodity_name,
  290. </if>
  291. <if test="commodityQuantity != null">
  292. commodity_quantity,
  293. </if>
  294. <if test="commodityMode != null">
  295. commodity_mode,
  296. </if>
  297. <if test="commodityPrice != null">
  298. commodity_price,
  299. </if>
  300. <if test="taskStatus != null">
  301. task_status,
  302. </if>
  303. <if test="taskDistributionTime != null">
  304. task_distribution_time,
  305. </if>
  306. <if test="taskAllocator != null">
  307. task_allocator,
  308. </if>
  309. <if test="taskReceiver != null">
  310. task_receiver,
  311. </if>
  312. <if test="taskComment != null">
  313. task_comment,
  314. </if>
  315. <if test="taskStartTime != null">
  316. task_start_time,
  317. </if>
  318. <if test="taskEndTime != null">
  319. task_end_time,
  320. </if>
  321. <if test="projectStatus != null">
  322. project_status,
  323. </if>
  324. <if test="acceptTime != null">
  325. accept_time,
  326. </if>
  327. <if test="reviewTime != null">
  328. review_time,
  329. </if>
  330. <if test="publicityTime != null">
  331. publicity_time,
  332. </if>
  333. <if test="licenceTime != null">
  334. licence_time,
  335. </if>
  336. <if test="certificateNumber != null">
  337. certificate_number,
  338. </if>
  339. <if test="status != null">
  340. status,
  341. </if>
  342. <if test="formRetrieve != null">
  343. form_retrieve,
  344. </if>
  345. <if test="taskRefund != null">
  346. task_refund,
  347. </if>
  348. <if test="refundContent != null">
  349. refund_content,
  350. </if>
  351. <if test="retrieveContent != null">
  352. retrieve_content,
  353. </if>
  354. <if test="declareUser != null">
  355. declare_user,
  356. </if>
  357. <if test="declarePwd != null">
  358. declare_pwd,
  359. </if>
  360. <if test="setUpAmount != null">
  361. set_up_amount,
  362. </if>
  363. <if test="arrivalMoney != null">
  364. arrival_money,
  365. </if>
  366. <if test="outsourceName != null">
  367. outsource_name,
  368. </if>
  369. <if test="outsourcePrice != null">
  370. outsource_price,
  371. </if>
  372. <if test="consultantId != null">
  373. consultant_id,
  374. </if>
  375. <if test="managerId != null">
  376. manager_id,
  377. </if>
  378. <if test="outsource != null">
  379. outsource,
  380. </if>
  381. <if test="splitSuper != null">
  382. split_super,
  383. </if>
  384. <if test="splitStatus != null">
  385. split_status,
  386. </if>
  387. <if test="splitId != null">
  388. split_id,
  389. </if>
  390. <if test="splitAid != null">
  391. split_aid,
  392. </if>
  393. <if test="splitTime != null">
  394. split_time,
  395. </if>
  396. <if test="cname != null">
  397. cname,
  398. </if>
  399. <if test="receiverName != null">
  400. receiver_name,
  401. </if>
  402. <if test="declarationBatch != null">
  403. declaration_batch,
  404. </if>
  405. <if test="attachmentUrl != null">
  406. attachment_url,
  407. </if>
  408. </trim>
  409. <trim prefix="values (" suffix=")" suffixOverrides=",">
  410. <if test="id != null">
  411. #{id,jdbcType=INTEGER},
  412. </if>
  413. <if test="orderNo != null">
  414. #{orderNo,jdbcType=VARCHAR},
  415. </if>
  416. <if test="main != null">
  417. #{main,jdbcType=INTEGER},
  418. </if>
  419. <if test="superId != null">
  420. #{superId,jdbcType=VARCHAR},
  421. </if>
  422. <if test="commodityId != null">
  423. #{commodityId,jdbcType=VARCHAR},
  424. </if>
  425. <if test="commodityName != null">
  426. #{commodityName,jdbcType=VARCHAR},
  427. </if>
  428. <if test="commodityQuantity != null">
  429. #{commodityQuantity,jdbcType=INTEGER},
  430. </if>
  431. <if test="commodityMode != null">
  432. #{commodityMode,jdbcType=VARCHAR},
  433. </if>
  434. <if test="commodityPrice != null">
  435. #{commodityPrice,jdbcType=DECIMAL},
  436. </if>
  437. <if test="taskStatus != null">
  438. #{taskStatus,jdbcType=INTEGER},
  439. </if>
  440. <if test="taskDistributionTime != null">
  441. #{taskDistributionTime,jdbcType=TIMESTAMP},
  442. </if>
  443. <if test="taskAllocator != null">
  444. #{taskAllocator,jdbcType=VARCHAR},
  445. </if>
  446. <if test="taskReceiver != null">
  447. #{taskReceiver,jdbcType=VARCHAR},
  448. </if>
  449. <if test="taskComment != null">
  450. #{taskComment,jdbcType=VARCHAR},
  451. </if>
  452. <if test="taskStartTime != null">
  453. #{taskStartTime,jdbcType=TIMESTAMP},
  454. </if>
  455. <if test="taskEndTime != null">
  456. #{taskEndTime,jdbcType=TIMESTAMP},
  457. </if>
  458. <if test="projectStatus != null">
  459. #{projectStatus,jdbcType=INTEGER},
  460. </if>
  461. <if test="acceptTime != null">
  462. #{acceptTime,jdbcType=DATE},
  463. </if>
  464. <if test="reviewTime != null">
  465. #{reviewTime,jdbcType=DATE},
  466. </if>
  467. <if test="publicityTime != null">
  468. #{publicityTime,jdbcType=DATE},
  469. </if>
  470. <if test="licenceTime != null">
  471. #{licenceTime,jdbcType=DATE},
  472. </if>
  473. <if test="certificateNumber != null">
  474. #{certificateNumber,jdbcType=VARCHAR},
  475. </if>
  476. <if test="status != null">
  477. #{status,jdbcType=INTEGER},
  478. </if>
  479. <if test="formRetrieve != null">
  480. #{formRetrieve,jdbcType=INTEGER},
  481. </if>
  482. <if test="taskRefund != null">
  483. #{taskRefund,jdbcType=INTEGER},
  484. </if>
  485. <if test="refundContent != null">
  486. #{refundContent,jdbcType=VARCHAR},
  487. </if>
  488. <if test="retrieveContent != null">
  489. #{retrieveContent,jdbcType=VARCHAR},
  490. </if>
  491. <if test="declareUser != null">
  492. #{declareUser,jdbcType=VARCHAR},
  493. </if>
  494. <if test="declarePwd != null">
  495. #{declarePwd,jdbcType=VARCHAR},
  496. </if>
  497. <if test="setUpAmount != null">
  498. #{setUpAmount,jdbcType=DECIMAL},
  499. </if>
  500. <if test="arrivalMoney != null">
  501. #{arrivalMoney,jdbcType=INTEGER},
  502. </if>
  503. <if test="outsourceName != null">
  504. #{outsourceName,jdbcType=VARCHAR},
  505. </if>
  506. <if test="outsourcePrice != null">
  507. #{outsourcePrice,jdbcType=DECIMAL},
  508. </if>
  509. <if test="consultantId != null">
  510. #{consultantId,jdbcType=VARCHAR},
  511. </if>
  512. <if test="managerId != null">
  513. #{managerId,jdbcType=VARCHAR},
  514. </if>
  515. <if test="outsource != null">
  516. #{outsource,jdbcType=INTEGER},
  517. </if>
  518. <if test="splitSuper != null">
  519. #{splitSuper,jdbcType=INTEGER},
  520. </if>
  521. <if test="splitStatus != null">
  522. #{splitStatus,jdbcType=INTEGER},
  523. </if>
  524. <if test="splitId != null">
  525. #{splitId,jdbcType=INTEGER},
  526. </if>
  527. <if test="splitAid != null">
  528. #{splitAid,jdbcType=VARCHAR},
  529. </if>
  530. <if test="splitTime != null">
  531. #{splitTime,jdbcType=TIMESTAMP},
  532. </if>
  533. <if test="cname != null">
  534. #{cname,jdbcType=VARCHAR},
  535. </if>
  536. <if test="receiverName != null">
  537. #{receiverName,jdbcType=VARCHAR},
  538. </if>
  539. <if test="declarationBatch != null">
  540. #{declarationBatch,jdbcType=INTEGER},
  541. </if>
  542. <if test="attachmentUrl != null">
  543. #{attachmentUrl,jdbcType=LONGVARCHAR},
  544. </if>
  545. </trim>
  546. </insert>
  547. <select id="countByExample" parameterType="com.goafanti.common.model.TOrderTaskExample" resultType="java.lang.Long">
  548. <!--
  549. WARNING - @mbg.generated
  550. This element is automatically generated by MyBatis Generator, do not modify.
  551. This element was generated on Tue Jun 09 09:38:55 CST 2020.
  552. -->
  553. select count(*) from t_order_task
  554. <if test="_parameter != null">
  555. <include refid="Example_Where_Clause" />
  556. </if>
  557. </select>
  558. <update id="updateByExampleSelective" parameterType="map">
  559. <!--
  560. WARNING - @mbg.generated
  561. This element is automatically generated by MyBatis Generator, do not modify.
  562. This element was generated on Tue Jun 09 09:38:55 CST 2020.
  563. -->
  564. update t_order_task
  565. <set>
  566. <if test="record.id != null">
  567. id = #{record.id,jdbcType=INTEGER},
  568. </if>
  569. <if test="record.orderNo != null">
  570. order_no = #{record.orderNo,jdbcType=VARCHAR},
  571. </if>
  572. <if test="record.main != null">
  573. main = #{record.main,jdbcType=INTEGER},
  574. </if>
  575. <if test="record.superId != null">
  576. super_id = #{record.superId,jdbcType=VARCHAR},
  577. </if>
  578. <if test="record.commodityId != null">
  579. commodity_id = #{record.commodityId,jdbcType=VARCHAR},
  580. </if>
  581. <if test="record.commodityName != null">
  582. commodity_name = #{record.commodityName,jdbcType=VARCHAR},
  583. </if>
  584. <if test="record.commodityQuantity != null">
  585. commodity_quantity = #{record.commodityQuantity,jdbcType=INTEGER},
  586. </if>
  587. <if test="record.commodityMode != null">
  588. commodity_mode = #{record.commodityMode,jdbcType=VARCHAR},
  589. </if>
  590. <if test="record.commodityPrice != null">
  591. commodity_price = #{record.commodityPrice,jdbcType=DECIMAL},
  592. </if>
  593. <if test="record.taskStatus != null">
  594. task_status = #{record.taskStatus,jdbcType=INTEGER},
  595. </if>
  596. <if test="record.taskDistributionTime != null">
  597. task_distribution_time = #{record.taskDistributionTime,jdbcType=TIMESTAMP},
  598. </if>
  599. <if test="record.taskAllocator != null">
  600. task_allocator = #{record.taskAllocator,jdbcType=VARCHAR},
  601. </if>
  602. <if test="record.taskReceiver != null">
  603. task_receiver = #{record.taskReceiver,jdbcType=VARCHAR},
  604. </if>
  605. <if test="record.taskComment != null">
  606. task_comment = #{record.taskComment,jdbcType=VARCHAR},
  607. </if>
  608. <if test="record.taskStartTime != null">
  609. task_start_time = #{record.taskStartTime,jdbcType=TIMESTAMP},
  610. </if>
  611. <if test="record.taskEndTime != null">
  612. task_end_time = #{record.taskEndTime,jdbcType=TIMESTAMP},
  613. </if>
  614. <if test="record.projectStatus != null">
  615. project_status = #{record.projectStatus,jdbcType=INTEGER},
  616. </if>
  617. <if test="record.acceptTime != null">
  618. accept_time = #{record.acceptTime,jdbcType=DATE},
  619. </if>
  620. <if test="record.reviewTime != null">
  621. review_time = #{record.reviewTime,jdbcType=DATE},
  622. </if>
  623. <if test="record.publicityTime != null">
  624. publicity_time = #{record.publicityTime,jdbcType=DATE},
  625. </if>
  626. <if test="record.licenceTime != null">
  627. licence_time = #{record.licenceTime,jdbcType=DATE},
  628. </if>
  629. <if test="record.certificateNumber != null">
  630. certificate_number = #{record.certificateNumber,jdbcType=VARCHAR},
  631. </if>
  632. <if test="record.status != null">
  633. status = #{record.status,jdbcType=INTEGER},
  634. </if>
  635. <if test="record.formRetrieve != null">
  636. form_retrieve = #{record.formRetrieve,jdbcType=INTEGER},
  637. </if>
  638. <if test="record.taskRefund != null">
  639. task_refund = #{record.taskRefund,jdbcType=INTEGER},
  640. </if>
  641. <if test="record.refundContent != null">
  642. refund_content = #{record.refundContent,jdbcType=VARCHAR},
  643. </if>
  644. <if test="record.retrieveContent != null">
  645. retrieve_content = #{record.retrieveContent,jdbcType=VARCHAR},
  646. </if>
  647. <if test="record.declareUser != null">
  648. declare_user = #{record.declareUser,jdbcType=VARCHAR},
  649. </if>
  650. <if test="record.declarePwd != null">
  651. declare_pwd = #{record.declarePwd,jdbcType=VARCHAR},
  652. </if>
  653. <if test="record.setUpAmount != null">
  654. set_up_amount = #{record.setUpAmount,jdbcType=DECIMAL},
  655. </if>
  656. <if test="record.arrivalMoney != null">
  657. arrival_money = #{record.arrivalMoney,jdbcType=INTEGER},
  658. </if>
  659. <if test="record.outsourceName != null">
  660. outsource_name = #{record.outsourceName,jdbcType=VARCHAR},
  661. </if>
  662. <if test="record.outsourcePrice != null">
  663. outsource_price = #{record.outsourcePrice,jdbcType=DECIMAL},
  664. </if>
  665. <if test="record.consultantId != null">
  666. consultant_id = #{record.consultantId,jdbcType=VARCHAR},
  667. </if>
  668. <if test="record.managerId != null">
  669. manager_id = #{record.managerId,jdbcType=VARCHAR},
  670. </if>
  671. <if test="record.outsource != null">
  672. outsource = #{record.outsource,jdbcType=INTEGER},
  673. </if>
  674. <if test="record.splitSuper != null">
  675. split_super = #{record.splitSuper,jdbcType=INTEGER},
  676. </if>
  677. <if test="record.splitStatus != null">
  678. split_status = #{record.splitStatus,jdbcType=INTEGER},
  679. </if>
  680. <if test="record.splitId != null">
  681. split_id = #{record.splitId,jdbcType=INTEGER},
  682. </if>
  683. <if test="record.splitAid != null">
  684. split_aid = #{record.splitAid,jdbcType=VARCHAR},
  685. </if>
  686. <if test="record.splitTime != null">
  687. split_time = #{record.splitTime,jdbcType=TIMESTAMP},
  688. </if>
  689. <if test="record.cname != null">
  690. cname = #{record.cname,jdbcType=VARCHAR},
  691. </if>
  692. <if test="record.receiverName != null">
  693. receiver_name = #{record.receiverName,jdbcType=VARCHAR},
  694. </if>
  695. <if test="record.declarationBatch != null">
  696. declaration_batch = #{record.declarationBatch,jdbcType=INTEGER},
  697. </if>
  698. <if test="record.attachmentUrl != null">
  699. attachment_url = #{record.attachmentUrl,jdbcType=LONGVARCHAR},
  700. </if>
  701. </set>
  702. <if test="_parameter != null">
  703. <include refid="Update_By_Example_Where_Clause" />
  704. </if>
  705. </update>
  706. <update id="updateByExampleWithBLOBs" parameterType="map">
  707. <!--
  708. WARNING - @mbg.generated
  709. This element is automatically generated by MyBatis Generator, do not modify.
  710. This element was generated on Tue Jun 09 09:38:55 CST 2020.
  711. -->
  712. update t_order_task
  713. set id = #{record.id,jdbcType=INTEGER},
  714. order_no = #{record.orderNo,jdbcType=VARCHAR},
  715. main = #{record.main,jdbcType=INTEGER},
  716. super_id = #{record.superId,jdbcType=VARCHAR},
  717. commodity_id = #{record.commodityId,jdbcType=VARCHAR},
  718. commodity_name = #{record.commodityName,jdbcType=VARCHAR},
  719. commodity_quantity = #{record.commodityQuantity,jdbcType=INTEGER},
  720. commodity_mode = #{record.commodityMode,jdbcType=VARCHAR},
  721. commodity_price = #{record.commodityPrice,jdbcType=DECIMAL},
  722. task_status = #{record.taskStatus,jdbcType=INTEGER},
  723. task_distribution_time = #{record.taskDistributionTime,jdbcType=TIMESTAMP},
  724. task_allocator = #{record.taskAllocator,jdbcType=VARCHAR},
  725. task_receiver = #{record.taskReceiver,jdbcType=VARCHAR},
  726. task_comment = #{record.taskComment,jdbcType=VARCHAR},
  727. task_start_time = #{record.taskStartTime,jdbcType=TIMESTAMP},
  728. task_end_time = #{record.taskEndTime,jdbcType=TIMESTAMP},
  729. project_status = #{record.projectStatus,jdbcType=INTEGER},
  730. accept_time = #{record.acceptTime,jdbcType=DATE},
  731. review_time = #{record.reviewTime,jdbcType=DATE},
  732. publicity_time = #{record.publicityTime,jdbcType=DATE},
  733. licence_time = #{record.licenceTime,jdbcType=DATE},
  734. certificate_number = #{record.certificateNumber,jdbcType=VARCHAR},
  735. status = #{record.status,jdbcType=INTEGER},
  736. form_retrieve = #{record.formRetrieve,jdbcType=INTEGER},
  737. task_refund = #{record.taskRefund,jdbcType=INTEGER},
  738. refund_content = #{record.refundContent,jdbcType=VARCHAR},
  739. retrieve_content = #{record.retrieveContent,jdbcType=VARCHAR},
  740. declare_user = #{record.declareUser,jdbcType=VARCHAR},
  741. declare_pwd = #{record.declarePwd,jdbcType=VARCHAR},
  742. set_up_amount = #{record.setUpAmount,jdbcType=DECIMAL},
  743. arrival_money = #{record.arrivalMoney,jdbcType=INTEGER},
  744. outsource_name = #{record.outsourceName,jdbcType=VARCHAR},
  745. outsource_price = #{record.outsourcePrice,jdbcType=DECIMAL},
  746. consultant_id = #{record.consultantId,jdbcType=VARCHAR},
  747. manager_id = #{record.managerId,jdbcType=VARCHAR},
  748. outsource = #{record.outsource,jdbcType=INTEGER},
  749. split_super = #{record.splitSuper,jdbcType=INTEGER},
  750. split_status = #{record.splitStatus,jdbcType=INTEGER},
  751. split_id = #{record.splitId,jdbcType=INTEGER},
  752. split_aid = #{record.splitAid,jdbcType=VARCHAR},
  753. split_time = #{record.splitTime,jdbcType=TIMESTAMP},
  754. cname = #{record.cname,jdbcType=VARCHAR},
  755. receiver_name = #{record.receiverName,jdbcType=VARCHAR},
  756. declaration_batch = #{record.declarationBatch,jdbcType=INTEGER},
  757. attachment_url = #{record.attachmentUrl,jdbcType=LONGVARCHAR}
  758. <if test="_parameter != null">
  759. <include refid="Update_By_Example_Where_Clause" />
  760. </if>
  761. </update>
  762. <update id="updateByExample" parameterType="map">
  763. <!--
  764. WARNING - @mbg.generated
  765. This element is automatically generated by MyBatis Generator, do not modify.
  766. This element was generated on Tue Jun 09 09:38:55 CST 2020.
  767. -->
  768. update t_order_task
  769. set id = #{record.id,jdbcType=INTEGER},
  770. order_no = #{record.orderNo,jdbcType=VARCHAR},
  771. main = #{record.main,jdbcType=INTEGER},
  772. super_id = #{record.superId,jdbcType=VARCHAR},
  773. commodity_id = #{record.commodityId,jdbcType=VARCHAR},
  774. commodity_name = #{record.commodityName,jdbcType=VARCHAR},
  775. commodity_quantity = #{record.commodityQuantity,jdbcType=INTEGER},
  776. commodity_mode = #{record.commodityMode,jdbcType=VARCHAR},
  777. commodity_price = #{record.commodityPrice,jdbcType=DECIMAL},
  778. task_status = #{record.taskStatus,jdbcType=INTEGER},
  779. task_distribution_time = #{record.taskDistributionTime,jdbcType=TIMESTAMP},
  780. task_allocator = #{record.taskAllocator,jdbcType=VARCHAR},
  781. task_receiver = #{record.taskReceiver,jdbcType=VARCHAR},
  782. task_comment = #{record.taskComment,jdbcType=VARCHAR},
  783. task_start_time = #{record.taskStartTime,jdbcType=TIMESTAMP},
  784. task_end_time = #{record.taskEndTime,jdbcType=TIMESTAMP},
  785. project_status = #{record.projectStatus,jdbcType=INTEGER},
  786. accept_time = #{record.acceptTime,jdbcType=DATE},
  787. review_time = #{record.reviewTime,jdbcType=DATE},
  788. publicity_time = #{record.publicityTime,jdbcType=DATE},
  789. licence_time = #{record.licenceTime,jdbcType=DATE},
  790. certificate_number = #{record.certificateNumber,jdbcType=VARCHAR},
  791. status = #{record.status,jdbcType=INTEGER},
  792. form_retrieve = #{record.formRetrieve,jdbcType=INTEGER},
  793. task_refund = #{record.taskRefund,jdbcType=INTEGER},
  794. refund_content = #{record.refundContent,jdbcType=VARCHAR},
  795. retrieve_content = #{record.retrieveContent,jdbcType=VARCHAR},
  796. declare_user = #{record.declareUser,jdbcType=VARCHAR},
  797. declare_pwd = #{record.declarePwd,jdbcType=VARCHAR},
  798. set_up_amount = #{record.setUpAmount,jdbcType=DECIMAL},
  799. arrival_money = #{record.arrivalMoney,jdbcType=INTEGER},
  800. outsource_name = #{record.outsourceName,jdbcType=VARCHAR},
  801. outsource_price = #{record.outsourcePrice,jdbcType=DECIMAL},
  802. consultant_id = #{record.consultantId,jdbcType=VARCHAR},
  803. manager_id = #{record.managerId,jdbcType=VARCHAR},
  804. outsource = #{record.outsource,jdbcType=INTEGER},
  805. split_super = #{record.splitSuper,jdbcType=INTEGER},
  806. split_status = #{record.splitStatus,jdbcType=INTEGER},
  807. split_id = #{record.splitId,jdbcType=INTEGER},
  808. split_aid = #{record.splitAid,jdbcType=VARCHAR},
  809. split_time = #{record.splitTime,jdbcType=TIMESTAMP},
  810. cname = #{record.cname,jdbcType=VARCHAR},
  811. receiver_name = #{record.receiverName,jdbcType=VARCHAR},
  812. declaration_batch = #{record.declarationBatch,jdbcType=INTEGER}
  813. <if test="_parameter != null">
  814. <include refid="Update_By_Example_Where_Clause" />
  815. </if>
  816. </update>
  817. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderTask">
  818. <!--
  819. WARNING - @mbg.generated
  820. This element is automatically generated by MyBatis Generator, do not modify.
  821. This element was generated on Tue Jun 09 09:38:55 CST 2020.
  822. -->
  823. update t_order_task
  824. <set>
  825. <if test="orderNo != null">
  826. order_no = #{orderNo,jdbcType=VARCHAR},
  827. </if>
  828. <if test="main != null">
  829. main = #{main,jdbcType=INTEGER},
  830. </if>
  831. <if test="superId != null">
  832. super_id = #{superId,jdbcType=VARCHAR},
  833. </if>
  834. <if test="commodityId != null">
  835. commodity_id = #{commodityId,jdbcType=VARCHAR},
  836. </if>
  837. <if test="commodityName != null">
  838. commodity_name = #{commodityName,jdbcType=VARCHAR},
  839. </if>
  840. <if test="commodityQuantity != null">
  841. commodity_quantity = #{commodityQuantity,jdbcType=INTEGER},
  842. </if>
  843. <if test="commodityMode != null">
  844. commodity_mode = #{commodityMode,jdbcType=VARCHAR},
  845. </if>
  846. <if test="commodityPrice != null">
  847. commodity_price = #{commodityPrice,jdbcType=DECIMAL},
  848. </if>
  849. <if test="taskStatus != null">
  850. task_status = #{taskStatus,jdbcType=INTEGER},
  851. </if>
  852. <if test="taskDistributionTime != null">
  853. task_distribution_time = #{taskDistributionTime,jdbcType=TIMESTAMP},
  854. </if>
  855. <if test="taskAllocator != null">
  856. task_allocator = #{taskAllocator,jdbcType=VARCHAR},
  857. </if>
  858. <if test="taskReceiver != null">
  859. task_receiver = #{taskReceiver,jdbcType=VARCHAR},
  860. </if>
  861. <if test="taskComment != null">
  862. task_comment = #{taskComment,jdbcType=VARCHAR},
  863. </if>
  864. <if test="taskStartTime != null">
  865. task_start_time = #{taskStartTime,jdbcType=TIMESTAMP},
  866. </if>
  867. <if test="taskEndTime != null">
  868. task_end_time = #{taskEndTime,jdbcType=TIMESTAMP},
  869. </if>
  870. <if test="projectStatus != null">
  871. project_status = #{projectStatus,jdbcType=INTEGER},
  872. </if>
  873. <if test="acceptTime != null">
  874. accept_time = #{acceptTime,jdbcType=DATE},
  875. </if>
  876. <if test="reviewTime != null">
  877. review_time = #{reviewTime,jdbcType=DATE},
  878. </if>
  879. <if test="publicityTime != null">
  880. publicity_time = #{publicityTime,jdbcType=DATE},
  881. </if>
  882. <if test="licenceTime != null">
  883. licence_time = #{licenceTime,jdbcType=DATE},
  884. </if>
  885. <if test="certificateNumber != null">
  886. certificate_number = #{certificateNumber,jdbcType=VARCHAR},
  887. </if>
  888. <if test="status != null">
  889. status = #{status,jdbcType=INTEGER},
  890. </if>
  891. <if test="formRetrieve != null">
  892. form_retrieve = #{formRetrieve,jdbcType=INTEGER},
  893. </if>
  894. <if test="taskRefund != null">
  895. task_refund = #{taskRefund,jdbcType=INTEGER},
  896. </if>
  897. <if test="refundContent != null">
  898. refund_content = #{refundContent,jdbcType=VARCHAR},
  899. </if>
  900. <if test="retrieveContent != null">
  901. retrieve_content = #{retrieveContent,jdbcType=VARCHAR},
  902. </if>
  903. <if test="declareUser != null">
  904. declare_user = #{declareUser,jdbcType=VARCHAR},
  905. </if>
  906. <if test="declarePwd != null">
  907. declare_pwd = #{declarePwd,jdbcType=VARCHAR},
  908. </if>
  909. <if test="setUpAmount != null">
  910. set_up_amount = #{setUpAmount,jdbcType=DECIMAL},
  911. </if>
  912. <if test="arrivalMoney != null">
  913. arrival_money = #{arrivalMoney,jdbcType=INTEGER},
  914. </if>
  915. <if test="outsourceName != null">
  916. outsource_name = #{outsourceName,jdbcType=VARCHAR},
  917. </if>
  918. <if test="outsourcePrice != null">
  919. outsource_price = #{outsourcePrice,jdbcType=DECIMAL},
  920. </if>
  921. <if test="consultantId != null">
  922. consultant_id = #{consultantId,jdbcType=VARCHAR},
  923. </if>
  924. <if test="managerId != null">
  925. manager_id = #{managerId,jdbcType=VARCHAR},
  926. </if>
  927. <if test="outsource != null">
  928. outsource = #{outsource,jdbcType=INTEGER},
  929. </if>
  930. <if test="splitSuper != null">
  931. split_super = #{splitSuper,jdbcType=INTEGER},
  932. </if>
  933. <if test="splitStatus != null">
  934. split_status = #{splitStatus,jdbcType=INTEGER},
  935. </if>
  936. <if test="splitId != null">
  937. split_id = #{splitId,jdbcType=INTEGER},
  938. </if>
  939. <if test="splitAid != null">
  940. split_aid = #{splitAid,jdbcType=VARCHAR},
  941. </if>
  942. <if test="splitTime != null">
  943. split_time = #{splitTime,jdbcType=TIMESTAMP},
  944. </if>
  945. <if test="cname != null">
  946. cname = #{cname,jdbcType=VARCHAR},
  947. </if>
  948. <if test="receiverName != null">
  949. receiver_name = #{receiverName,jdbcType=VARCHAR},
  950. </if>
  951. <if test="declarationBatch != null">
  952. declaration_batch = #{declarationBatch,jdbcType=INTEGER},
  953. </if>
  954. <if test="attachmentUrl != null">
  955. attachment_url = #{attachmentUrl,jdbcType=LONGVARCHAR},
  956. </if>
  957. </set>
  958. where id = #{id,jdbcType=INTEGER}
  959. </update>
  960. <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.goafanti.common.model.TOrderTask">
  961. <!--
  962. WARNING - @mbg.generated
  963. This element is automatically generated by MyBatis Generator, do not modify.
  964. This element was generated on Tue Jun 09 09:38:55 CST 2020.
  965. -->
  966. update t_order_task
  967. set order_no = #{orderNo,jdbcType=VARCHAR},
  968. main = #{main,jdbcType=INTEGER},
  969. super_id = #{superId,jdbcType=VARCHAR},
  970. commodity_id = #{commodityId,jdbcType=VARCHAR},
  971. commodity_name = #{commodityName,jdbcType=VARCHAR},
  972. commodity_quantity = #{commodityQuantity,jdbcType=INTEGER},
  973. commodity_mode = #{commodityMode,jdbcType=VARCHAR},
  974. commodity_price = #{commodityPrice,jdbcType=DECIMAL},
  975. task_status = #{taskStatus,jdbcType=INTEGER},
  976. task_distribution_time = #{taskDistributionTime,jdbcType=TIMESTAMP},
  977. task_allocator = #{taskAllocator,jdbcType=VARCHAR},
  978. task_receiver = #{taskReceiver,jdbcType=VARCHAR},
  979. task_comment = #{taskComment,jdbcType=VARCHAR},
  980. task_start_time = #{taskStartTime,jdbcType=TIMESTAMP},
  981. task_end_time = #{taskEndTime,jdbcType=TIMESTAMP},
  982. project_status = #{projectStatus,jdbcType=INTEGER},
  983. accept_time = #{acceptTime,jdbcType=DATE},
  984. review_time = #{reviewTime,jdbcType=DATE},
  985. publicity_time = #{publicityTime,jdbcType=DATE},
  986. licence_time = #{licenceTime,jdbcType=DATE},
  987. certificate_number = #{certificateNumber,jdbcType=VARCHAR},
  988. status = #{status,jdbcType=INTEGER},
  989. form_retrieve = #{formRetrieve,jdbcType=INTEGER},
  990. task_refund = #{taskRefund,jdbcType=INTEGER},
  991. refund_content = #{refundContent,jdbcType=VARCHAR},
  992. retrieve_content = #{retrieveContent,jdbcType=VARCHAR},
  993. declare_user = #{declareUser,jdbcType=VARCHAR},
  994. declare_pwd = #{declarePwd,jdbcType=VARCHAR},
  995. set_up_amount = #{setUpAmount,jdbcType=DECIMAL},
  996. arrival_money = #{arrivalMoney,jdbcType=INTEGER},
  997. outsource_name = #{outsourceName,jdbcType=VARCHAR},
  998. outsource_price = #{outsourcePrice,jdbcType=DECIMAL},
  999. consultant_id = #{consultantId,jdbcType=VARCHAR},
  1000. manager_id = #{managerId,jdbcType=VARCHAR},
  1001. outsource = #{outsource,jdbcType=INTEGER},
  1002. split_super = #{splitSuper,jdbcType=INTEGER},
  1003. split_status = #{splitStatus,jdbcType=INTEGER},
  1004. split_id = #{splitId,jdbcType=INTEGER},
  1005. split_aid = #{splitAid,jdbcType=VARCHAR},
  1006. split_time = #{splitTime,jdbcType=TIMESTAMP},
  1007. cname = #{cname,jdbcType=VARCHAR},
  1008. receiver_name = #{receiverName,jdbcType=VARCHAR},
  1009. declaration_batch = #{declarationBatch,jdbcType=INTEGER},
  1010. attachment_url = #{attachmentUrl,jdbcType=LONGVARCHAR}
  1011. where id = #{id,jdbcType=INTEGER}
  1012. </update>
  1013. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TOrderTask">
  1014. <!--
  1015. WARNING - @mbg.generated
  1016. This element is automatically generated by MyBatis Generator, do not modify.
  1017. This element was generated on Tue Jun 09 09:38:55 CST 2020.
  1018. -->
  1019. update t_order_task
  1020. set order_no = #{orderNo,jdbcType=VARCHAR},
  1021. main = #{main,jdbcType=INTEGER},
  1022. super_id = #{superId,jdbcType=VARCHAR},
  1023. commodity_id = #{commodityId,jdbcType=VARCHAR},
  1024. commodity_name = #{commodityName,jdbcType=VARCHAR},
  1025. commodity_quantity = #{commodityQuantity,jdbcType=INTEGER},
  1026. commodity_mode = #{commodityMode,jdbcType=VARCHAR},
  1027. commodity_price = #{commodityPrice,jdbcType=DECIMAL},
  1028. task_status = #{taskStatus,jdbcType=INTEGER},
  1029. task_distribution_time = #{taskDistributionTime,jdbcType=TIMESTAMP},
  1030. task_allocator = #{taskAllocator,jdbcType=VARCHAR},
  1031. task_receiver = #{taskReceiver,jdbcType=VARCHAR},
  1032. task_comment = #{taskComment,jdbcType=VARCHAR},
  1033. task_start_time = #{taskStartTime,jdbcType=TIMESTAMP},
  1034. task_end_time = #{taskEndTime,jdbcType=TIMESTAMP},
  1035. project_status = #{projectStatus,jdbcType=INTEGER},
  1036. accept_time = #{acceptTime,jdbcType=DATE},
  1037. review_time = #{reviewTime,jdbcType=DATE},
  1038. publicity_time = #{publicityTime,jdbcType=DATE},
  1039. licence_time = #{licenceTime,jdbcType=DATE},
  1040. certificate_number = #{certificateNumber,jdbcType=VARCHAR},
  1041. status = #{status,jdbcType=INTEGER},
  1042. form_retrieve = #{formRetrieve,jdbcType=INTEGER},
  1043. task_refund = #{taskRefund,jdbcType=INTEGER},
  1044. refund_content = #{refundContent,jdbcType=VARCHAR},
  1045. retrieve_content = #{retrieveContent,jdbcType=VARCHAR},
  1046. declare_user = #{declareUser,jdbcType=VARCHAR},
  1047. declare_pwd = #{declarePwd,jdbcType=VARCHAR},
  1048. set_up_amount = #{setUpAmount,jdbcType=DECIMAL},
  1049. arrival_money = #{arrivalMoney,jdbcType=INTEGER},
  1050. outsource_name = #{outsourceName,jdbcType=VARCHAR},
  1051. outsource_price = #{outsourcePrice,jdbcType=DECIMAL},
  1052. consultant_id = #{consultantId,jdbcType=VARCHAR},
  1053. manager_id = #{managerId,jdbcType=VARCHAR},
  1054. outsource = #{outsource,jdbcType=INTEGER},
  1055. split_super = #{splitSuper,jdbcType=INTEGER},
  1056. split_status = #{splitStatus,jdbcType=INTEGER},
  1057. split_id = #{splitId,jdbcType=INTEGER},
  1058. split_aid = #{splitAid,jdbcType=VARCHAR},
  1059. split_time = #{splitTime,jdbcType=TIMESTAMP},
  1060. cname = #{cname,jdbcType=VARCHAR},
  1061. receiver_name = #{receiverName,jdbcType=VARCHAR},
  1062. declaration_batch = #{declarationBatch,jdbcType=INTEGER}
  1063. where id = #{id,jdbcType=INTEGER}
  1064. </update>
  1065. <!-- 记得返回id -->
  1066. <!-- &amp;amp;lt;insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderTask" useGeneratedKeys="true"&amp;amp;gt;
  1067. &amp;amp;lt;selectKey keyProperty="id" order="AFTER" resultType="int"&amp;amp;gt;
  1068. SELECT LAST_INSERT_ID()
  1069. &amp;amp;lt;/selectKey&amp;amp;gt; -->
  1070. <insert id="insertSelectiveGetId" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderTask" useGeneratedKeys="true">
  1071. insert into t_order_task
  1072. <trim prefix="(" suffix=")" suffixOverrides=",">
  1073. <if test="id != null">
  1074. id,
  1075. </if>
  1076. <if test="orderNo != null">
  1077. order_no,
  1078. </if>
  1079. <if test="main != null">
  1080. main,
  1081. </if>
  1082. <if test="superId != null">
  1083. super_id,
  1084. </if>
  1085. <if test="commodityId != null">
  1086. commodity_id,
  1087. </if>
  1088. <if test="commodityName != null">
  1089. commodity_name,
  1090. </if>
  1091. <if test="commodityQuantity != null">
  1092. commodity_quantity,
  1093. </if>
  1094. <if test="commodityMode != null">
  1095. commodity_mode,
  1096. </if>
  1097. <if test="commodityPrice != null">
  1098. commodity_price,
  1099. </if>
  1100. <if test="taskStatus != null">
  1101. task_status,
  1102. </if>
  1103. <if test="taskDistributionTime != null">
  1104. task_distribution_time,
  1105. </if>
  1106. <if test="taskAllocator != null">
  1107. task_allocator,
  1108. </if>
  1109. <if test="taskReceiver != null">
  1110. task_receiver,
  1111. </if>
  1112. <if test="taskComment != null">
  1113. task_comment,
  1114. </if>
  1115. <if test="taskStartTime != null">
  1116. task_start_time,
  1117. </if>
  1118. <if test="taskEndTime != null">
  1119. task_end_time,
  1120. </if>
  1121. <if test="projectStatus != null">
  1122. project_status,
  1123. </if>
  1124. <if test="acceptTime != null">
  1125. accept_time,
  1126. </if>
  1127. <if test="reviewTime != null">
  1128. review_time,
  1129. </if>
  1130. <if test="publicityTime != null">
  1131. publicity_time,
  1132. </if>
  1133. <if test="licenceTime != null">
  1134. licence_time,
  1135. </if>
  1136. <if test="certificateNumber != null">
  1137. certificate_number,
  1138. </if>
  1139. <if test="status != null">
  1140. status,
  1141. </if>
  1142. <if test="formRetrieve != null">
  1143. form_retrieve,
  1144. </if>
  1145. <if test="taskRefund != null">
  1146. task_refund,
  1147. </if>
  1148. <if test="refundContent != null">
  1149. refund_content,
  1150. </if>
  1151. <if test="retrieveContent != null">
  1152. retrieve_content,
  1153. </if>
  1154. <if test="declareUser != null">
  1155. declare_user,
  1156. </if>
  1157. <if test="declarePwd != null">
  1158. declare_pwd,
  1159. </if>
  1160. <if test="setUpAmount != null">
  1161. set_up_amount,
  1162. </if>
  1163. <if test="arrivalMoney != null">
  1164. arrival_money,
  1165. </if>
  1166. <if test="outsourceName != null">
  1167. outsource_name,
  1168. </if>
  1169. <if test="outsourcePrice != null">
  1170. outsource_price,
  1171. </if>
  1172. <if test="consultantId != null">
  1173. consultant_id,
  1174. </if>
  1175. <if test="managerId != null">
  1176. manager_id,
  1177. </if>
  1178. <if test="outsource != null">
  1179. outsource,
  1180. </if>
  1181. <if test="splitSuper != null">
  1182. split_super,
  1183. </if>
  1184. <if test="splitStatus != null">
  1185. split_status,
  1186. </if>
  1187. <if test="splitId != null">
  1188. split_id,
  1189. </if>
  1190. <if test="splitAid != null">
  1191. split_aid,
  1192. </if>
  1193. <if test="splitTime != null">
  1194. split_time,
  1195. </if>
  1196. <if test="cname != null">
  1197. cname,
  1198. </if>
  1199. <if test="receiverName != null">
  1200. receiver_name,
  1201. </if>
  1202. <if test="attachmentUrl != null">
  1203. attachment_url,
  1204. </if>
  1205. </trim>
  1206. <trim prefix="values (" suffix=")" suffixOverrides=",">
  1207. <if test="id != null">
  1208. #{id,jdbcType=INTEGER},
  1209. </if>
  1210. <if test="orderNo != null">
  1211. #{orderNo,jdbcType=VARCHAR},
  1212. </if>
  1213. <if test="main != null">
  1214. #{main,jdbcType=INTEGER},
  1215. </if>
  1216. <if test="superId != null">
  1217. #{superId,jdbcType=VARCHAR},
  1218. </if>
  1219. <if test="commodityId != null">
  1220. #{commodityId,jdbcType=VARCHAR},
  1221. </if>
  1222. <if test="commodityName != null">
  1223. #{commodityName,jdbcType=VARCHAR},
  1224. </if>
  1225. <if test="commodityQuantity != null">
  1226. #{commodityQuantity,jdbcType=INTEGER},
  1227. </if>
  1228. <if test="commodityMode != null">
  1229. #{commodityMode,jdbcType=VARCHAR},
  1230. </if>
  1231. <if test="commodityPrice != null">
  1232. #{commodityPrice,jdbcType=DECIMAL},
  1233. </if>
  1234. <if test="taskStatus != null">
  1235. #{taskStatus,jdbcType=INTEGER},
  1236. </if>
  1237. <if test="taskDistributionTime != null">
  1238. #{taskDistributionTime,jdbcType=TIMESTAMP},
  1239. </if>
  1240. <if test="taskAllocator != null">
  1241. #{taskAllocator,jdbcType=VARCHAR},
  1242. </if>
  1243. <if test="taskReceiver != null">
  1244. #{taskReceiver,jdbcType=VARCHAR},
  1245. </if>
  1246. <if test="taskComment != null">
  1247. #{taskComment,jdbcType=VARCHAR},
  1248. </if>
  1249. <if test="taskStartTime != null">
  1250. #{taskStartTime,jdbcType=TIMESTAMP},
  1251. </if>
  1252. <if test="taskEndTime != null">
  1253. #{taskEndTime,jdbcType=TIMESTAMP},
  1254. </if>
  1255. <if test="projectStatus != null">
  1256. #{projectStatus,jdbcType=INTEGER},
  1257. </if>
  1258. <if test="acceptTime != null">
  1259. #{acceptTime,jdbcType=DATE},
  1260. </if>
  1261. <if test="reviewTime != null">
  1262. #{reviewTime,jdbcType=DATE},
  1263. </if>
  1264. <if test="publicityTime != null">
  1265. #{publicityTime,jdbcType=DATE},
  1266. </if>
  1267. <if test="licenceTime != null">
  1268. #{licenceTime,jdbcType=DATE},
  1269. </if>
  1270. <if test="certificateNumber != null">
  1271. #{certificateNumber,jdbcType=VARCHAR},
  1272. </if>
  1273. <if test="status != null">
  1274. #{status,jdbcType=INTEGER},
  1275. </if>
  1276. <if test="formRetrieve != null">
  1277. #{formRetrieve,jdbcType=INTEGER},
  1278. </if>
  1279. <if test="taskRefund != null">
  1280. #{taskRefund,jdbcType=INTEGER},
  1281. </if>
  1282. <if test="refundContent != null">
  1283. #{refundContent,jdbcType=VARCHAR},
  1284. </if>
  1285. <if test="retrieveContent != null">
  1286. #{retrieveContent,jdbcType=VARCHAR},
  1287. </if>
  1288. <if test="declareUser != null">
  1289. #{declareUser,jdbcType=VARCHAR},
  1290. </if>
  1291. <if test="declarePwd != null">
  1292. #{declarePwd,jdbcType=VARCHAR},
  1293. </if>
  1294. <if test="setUpAmount != null">
  1295. #{setUpAmount,jdbcType=DECIMAL},
  1296. </if>
  1297. <if test="arrivalMoney != null">
  1298. #{arrivalMoney,jdbcType=INTEGER},
  1299. </if>
  1300. <if test="outsourceName != null">
  1301. #{outsourceName,jdbcType=VARCHAR},
  1302. </if>
  1303. <if test="outsourcePrice != null">
  1304. #{outsourcePrice,jdbcType=DECIMAL},
  1305. </if>
  1306. <if test="consultantId != null">
  1307. #{consultantId,jdbcType=VARCHAR},
  1308. </if>
  1309. <if test="managerId != null">
  1310. #{managerId,jdbcType=VARCHAR},
  1311. </if>
  1312. <if test="outsource != null">
  1313. #{outsource,jdbcType=INTEGER},
  1314. </if>
  1315. <if test="splitSuper != null">
  1316. #{splitSuper,jdbcType=INTEGER},
  1317. </if>
  1318. <if test="splitStatus != null">
  1319. #{splitStatus,jdbcType=INTEGER},
  1320. </if>
  1321. <if test="splitId != null">
  1322. #{splitId,jdbcType=INTEGER},
  1323. </if>
  1324. <if test="splitAid != null">
  1325. #{splitAid,jdbcType=VARCHAR},
  1326. </if>
  1327. <if test="splitTime != null">
  1328. #{splitTime,jdbcType=TIMESTAMP},
  1329. </if>
  1330. <if test="cname != null">
  1331. #{cname,jdbcType=VARCHAR},
  1332. </if>
  1333. <if test="receiverName != null">
  1334. #{receiverName,jdbcType=VARCHAR},
  1335. </if>
  1336. <if test="attachmentUrl != null">
  1337. #{attachmentUrl,jdbcType=LONGVARCHAR},
  1338. </if>
  1339. </trim>
  1340. <selectKey keyProperty="id" order="AFTER" resultType="int">
  1341. SELECT LAST_INSERT_ID()
  1342. </selectKey>
  1343. </insert>
  1344. <select id="selectOrderTask" resultType="com.goafanti.order.bo.TOrderTaskBo">
  1345. select a.id,e.contract_no contractNo,a.order_no as orderNo,h.nickname userName,f.name salesmanName,a.outsource_name outsourceName,a.outsource,
  1346. a.outsource_price outsourcePrice,g.name depName,e.order_status orderStatus,d.name as contacts,d.contact_mobile as contactsMobile,a.main, c.cname,
  1347. c.sort cSort,a.commodity_name as commodityName,a.commodity_quantity as commodityQuantity,i.price,a.certificate_number as certificateNumber,
  1348. a.commodity_id as commodityId,a.manager_id managerId,a.consultant_id consultantId,a.project_status as projectStatus,a.set_up_amount setUpAmount,
  1349. a.task_comment as taskComment ,a.commodity_price as commodityPrice, a.task_status as taskStatus, a.task_receiver as taskReceiver ,a.split_status splitStatus
  1350. 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
  1351. 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
  1352. left join business_project i on a.commodity_id=i.id left join business_category c on b.cid=c.id left join admin d on a.task_receiver=d.id
  1353. where a.super_id is null and a.split_status !=2 and a.order_no= #{orderNo,jdbcType=VARCHAR} order by a.id
  1354. </select>
  1355. <select id="selectOrderTaskAll" resultType="com.goafanti.order.bo.TOrderTaskBo">
  1356. select a.id,e.contract_no contractNo,a.order_no as orderNo,h.nickname userName,f.name salesmanName,a.outsource_name outsourceName,a.outsource,
  1357. a.outsource_price outsourcePrice,g.name depName,e.order_status orderStatus,d.name as contacts,d.contact_mobile as contactsMobile,a.main, c.cname,
  1358. c.sort cSort,a.commodity_name as commodityName,a.commodity_quantity as commodityQuantity,i.price,a.certificate_number as certificateNumber,a.receiver_name receiverName,
  1359. a.commodity_id as commodityId,a.manager_id managerId,a.consultant_id consultantId,a.project_status as projectStatus,a.set_up_amount setUpAmount,
  1360. a.task_comment as taskComment ,a.commodity_price as commodityPrice, a.task_status as taskStatus, a.task_receiver as taskReceiver ,
  1361. a.split_status splitStatus,a.split_super splitSuper,a.split_aid splitAid,a.split_time splitTime
  1362. 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
  1363. 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
  1364. left join business_project i on a.commodity_id=i.id left join business_category c on b.cid=c.id left join admin d on a.task_receiver=d.id
  1365. where a.super_id is null and a.order_no= #{orderNo,jdbcType=VARCHAR} order by a.id
  1366. </select>
  1367. <select id="selectOrderTaskListByPage" resultType="com.goafanti.order.bo.TOrderTaskListBo">
  1368. select a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,a.receiver_name receiverName,a.project_status as projectStatus,e.contract_no contractNo,
  1369. a.task_receiver taskReceiver,a.task_status as taskStatus,date_format(a.task_distribution_time,'%Y-%m-%d') as taskDate, a.commodity_quantity as commodityQuantity,
  1370. e.approval,l.refund_status outsourceStatus,ifnull(i.alreadyNumber,0) as alreadyNumber,f.nickname as userName,h.name as depName, l.company_name as outsourceName ,
  1371. ifnull(k.hours,0) hours,a.split_status splitStatus,a.split_super splitSuper, a.split_id splitId
  1372. 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
  1373. left join t_order_new e on a.order_no=e.order_no left join user f on e.buyer_id=f.id
  1374. left join department h on e.order_dep=h.id left join (select task_id , sum(already_number) as alreadyNumber from task_progress
  1375. group by task_id) i on a.id=i.task_id left join task_hours_count k on a.id=k.tid and a.task_receiver=k.aid left join t_order_outsource l
  1376. on a.id=l.tid where e.delete_sign in (0,2,3) and e.order_status in (2,4)
  1377. and a.outsource= #{outsource,jdbcType=INTEGER}
  1378. <if test="role == 0 ">
  1379. and a.task_receiver= #{aid,jdbcType=VARCHAR}
  1380. </if>
  1381. <if test="role ==1 and fids != null and fids.size() &gt; 0">
  1382. and e.finance_id in
  1383. <foreach close=")" collection="fids" index="" item="item" open="(" separator=",">
  1384. #{item}
  1385. </foreach>
  1386. </if>
  1387. <if test="specially == 0 ">
  1388. and a.split_status in (0,2)
  1389. </if>
  1390. <if test="specially == 1 ">
  1391. and a.split_status in (0,1)
  1392. </if>
  1393. <if test="orderNo != null">
  1394. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  1395. </if>
  1396. <if test="approval ==0">
  1397. and e.approval = 0
  1398. </if>
  1399. <if test="approval ==1">
  1400. and e.approval = 1
  1401. </if>
  1402. <if test="approval ==2">
  1403. and e.approval &gt; 1
  1404. </if>
  1405. <if test="outsourceStatus !=null">
  1406. and l.refund_status = #{outsourceStatus,jdbcType=INTEGER}
  1407. </if>
  1408. <if test="contractNo != null">
  1409. and e.contract_no like CONCAT('%',#{contractNo,jdbcType=VARCHAR},'%')
  1410. </if>
  1411. <if test="projectStatus != null">
  1412. and e.project_status = #{projectStatus,jdbcType=INTEGER}
  1413. </if>
  1414. <if test="depId != null">
  1415. and e.order_dep= #{depId,jdbcType=VARCHAR}
  1416. </if>
  1417. <if test="name != null">
  1418. and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  1419. </if>
  1420. <if test="orderNo != null">
  1421. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  1422. </if>
  1423. <if test="taskId != null">
  1424. and (a.id= #{taskId,jdbcType=VARCHAR} or a.split_super= #{taskId,jdbcType=VARCHAR})
  1425. </if>
  1426. <if test="taskStatus != null">
  1427. and a.task_status= #{taskStatus,jdbcType=INTEGER}
  1428. </if>
  1429. <if test="adminName != null">
  1430. and a.receiver_name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
  1431. </if>
  1432. order by a.task_distribution_time desc
  1433. <if test="page_sql!=null">
  1434. ${page_sql}
  1435. </if>
  1436. </select>
  1437. <select id="selectOrderTaskListCount" resultType="java.lang.Integer">
  1438. select count(*) from t_order_task a left join t_order_new e on a.order_no=e.order_no
  1439. left join admin g on e.salesman_id=g.id left join department h on g.department_id=h.id where e.delete_sign in (0,2,3) and e.order_status in (2,4)
  1440. and a.outsource= #{outsource,jdbcType=INTEGER}
  1441. <if test="role == 0 ">
  1442. and a.task_receiver= #{aid,jdbcType=VARCHAR}
  1443. </if>
  1444. <if test="role ==1 and fids != null and fids.size() &gt; 0">
  1445. and e.finance_id in
  1446. <foreach close=")" collection="fids" index="" item="item" open="(" separator=",">
  1447. #{item}
  1448. </foreach>
  1449. </if>
  1450. <if test="specially == 0 ">
  1451. and a.split_status in (0,2)
  1452. </if>
  1453. <if test="specially == 1 ">
  1454. and a.split_status in (0,1)
  1455. </if>
  1456. <if test="orderNo != null">
  1457. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  1458. </if>
  1459. <if test="approval ==0">
  1460. and e.approval = 0
  1461. </if>
  1462. <if test="approval ==1">
  1463. and e.approval = 1
  1464. </if>
  1465. <if test="approval ==2">
  1466. and e.approval &gt; 1
  1467. </if>
  1468. <if test="outsourceStatus !=null">
  1469. and l.refund_status = #{outsourceStatus,jdbcType=INTEGER}
  1470. </if>
  1471. <if test="contractNo != null">
  1472. and e.contract_no like CONCAT('%',#{contractNo,jdbcType=VARCHAR},'%')
  1473. </if>
  1474. <if test="projectStatus != null">
  1475. and e.project_status = #{projectStatus,jdbcType=INTEGER}
  1476. </if>
  1477. <if test="depId != null">
  1478. and e.order_dep = #{depId,jdbcType=VARCHAR}
  1479. </if>
  1480. <if test="name != null">
  1481. and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  1482. </if>
  1483. <if test="orderNo != null">
  1484. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  1485. </if>
  1486. <if test="taskId != null">
  1487. and (a.id= #{taskId,jdbcType=VARCHAR} or a.split_super= #{taskId,jdbcType=VARCHAR})
  1488. </if>
  1489. <if test="taskStatus != null">
  1490. and a.task_status= #{taskStatus,jdbcType=INTEGER}
  1491. </if>
  1492. <if test="adminName != null">
  1493. and a.receiver_name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
  1494. </if>
  1495. </select>
  1496. <select id="getOrderTaskDetail" resultType="com.goafanti.order.bo.TOrderTaskDetailBo">
  1497. select
  1498. a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,d.name as receiverName,a.task_comment as taskComment,a.project_status as projectStatus,
  1499. 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,
  1500. 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,
  1501. a.certificate_number as certificateNumber, a.status,a.form_retrieve as formRetrieve, a.task_refund as taskRefund,a.task_receiver taskReceiver,
  1502. a.refund_content as refundContent, a.declare_user as declareUser, a.declare_pwd as declarePwd,e.contract_no as contractNo,e.contacts ,
  1503. 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 ,
  1504. date_format(a.review_time,'%Y-%m-%d') as reviewDate,date_format(a.publicity_time,'%Y-%m-%d') as publicityDate,a.outsource_price outsourcePrice,
  1505. date_format(a.licence_time,'%Y-%m-%d') as licenceDate,date_format(a.task_distribution_time,'%Y-%m-%d') as taskDate,e.legal_person as legalPerson,
  1506. e.legal_person_tel as legalPersonTel, a.split_status splitStatus, a.split_super splitSuper, a.split_id splitId,a.declaration_batch declarationBatch
  1507. 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
  1508. left join admin d on a.task_receiver=d.id left join t_order_new e on a.order_no=e.order_no
  1509. left join department h on e.order_dep=h.id left join user f on e.buyer_id=f.id
  1510. left join admin g on e.salesman_id=g.id
  1511. where a.id= #{id,jdbcType=VARCHAR}
  1512. </select>
  1513. <select id="selectBySuperId" resultType="com.goafanti.common.model.TOrderTask">
  1514. select super_id as superId,min(task_status) as taskStatus,min(project_status) as projectStatus,max(main) as main from t_order_task
  1515. where super_id = #{superId,jdbcType=VARCHAR} group by super_id
  1516. </select>
  1517. <select id="selectTaskHoursListByPage" resultType="com.goafanti.order.bo.TOrderTaskListBo">
  1518. 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,
  1519. a.task_status as taskStatus,f.nickname as userName,ifnull(g.hours,0) as hours,a.commodity_quantity as commodityQuantity,a.commodity_price commodityPrice,
  1520. 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,
  1521. date_format(a.task_distribution_time,'%Y-%m-%d %H:%i:%S')taskDistributionTime, date_format(a.task_end_time,'%Y-%m-%d')taskEndTime,tm.salesman_name salesmanName,
  1522. a.split_status splitStatus, a.split_super splitSuper, a.split_id splitId
  1523. 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
  1524. left join t_order_new e on a.order_no=e.order_no left join department dep on e.order_dep=dep.id
  1525. 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
  1526. left join t_order_mid tm on a.order_no=tm.order_no where e.delete_sign =0 and a.super_id is null and a.split_status in(0,2)
  1527. <if test="shiroType == 1 and aid !=null">
  1528. and tm.finance_id= #{aid,jdbcType=VARCHAR}
  1529. </if>
  1530. <if test="shiroType == 2 and aid !=null">
  1531. and tm.finance_id in (select id from admin where superior_id= #{aid,jdbcType=VARCHAR})
  1532. </if>
  1533. <if test="name != null">
  1534. and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  1535. </if>
  1536. <if test="cid != null">
  1537. and b.cid = #{cid,jdbcType=VARCHAR}
  1538. </if>
  1539. <if test="outsource != null">
  1540. and a.outsource = #{outsource,jdbcType=INTEGER}
  1541. </if>
  1542. <if test="depId != null">
  1543. and e.order_dep = #{depId,jdbcType=VARCHAR}
  1544. </if>
  1545. <if test="contractNo != null">
  1546. and e.contract_no like CONCAT('%',#{contractNo,jdbcType=VARCHAR},'%')
  1547. </if>
  1548. <if test="orderNo != null">
  1549. and e.order_no like CONCAT('%',#{orderNo,jdbcType=VARCHAR},'%')
  1550. </if>
  1551. <if test="taskId != null">
  1552. and a.id= #{taskId,jdbcType=VARCHAR}
  1553. </if>
  1554. <if test="starTime !=null and endTime !=null">
  1555. and e.sign_time between #{starTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
  1556. </if>
  1557. order by a.task_start_time desc,e.create_time desc
  1558. <if test="page_sql!=null">
  1559. ${page_sql}
  1560. </if>
  1561. </select>
  1562. <select id="selectTaskHoursListCount" resultType="java.lang.Integer">
  1563. 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
  1564. 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
  1565. where e.delete_sign =0 and a.super_id is null and a.split_status in(0,2)
  1566. <if test="shiroType == 1 and aid !=null">
  1567. and tm.finance_id= #{aid,jdbcType=VARCHAR}
  1568. </if>
  1569. <if test="shiroType == 2 and aid !=null">
  1570. and tm.finance_id in (select id from admin where superior_id= #{aid,jdbcType=VARCHAR})
  1571. </if>
  1572. <if test="name != null">
  1573. and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  1574. </if>
  1575. <if test="outsource != null">
  1576. and a.outsource = #{outsource,jdbcType=INTEGER}
  1577. </if>
  1578. <if test="cid != null">
  1579. and b.cid = #{cid,jdbcType=VARCHAR}
  1580. </if>
  1581. <if test="depId != null">
  1582. and e.order_dep = #{depId,jdbcType=VARCHAR}
  1583. </if>
  1584. <if test="contractNo != null">
  1585. and e.contract_no like CONCAT('%',#{contractNo,jdbcType=VARCHAR},'%')
  1586. </if>
  1587. <if test="orderNo != null">
  1588. and e.order_no like CONCAT('%',#{orderNo,jdbcType=VARCHAR},'%')
  1589. </if>
  1590. <if test="taskId != null">
  1591. and a.id= #{taskId,jdbcType=VARCHAR}
  1592. </if>
  1593. <if test="starTime !=null and endTime !=null">
  1594. and e.sign_time between #{starTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
  1595. </if>
  1596. </select>
  1597. <select id="selectTaskListByPage" resultType="com.goafanti.order.bo.TOrderTaskListBo">
  1598. select a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,d.name as receiverName,
  1599. a.project_status as projectStatus,a.task_status as taskStatus,date_format(a.task_distribution_time,'%Y-%m-%d') as taskDate,
  1600. a.commodity_quantity as commodityQuantity,f.nickname as userName,h.name as depName,ifnull(i.alreadyNumber,0)as alreadyNumber,
  1601. a.split_status splitStatus,a.split_super splitSuper, a.split_id splitId
  1602. from (select task_id from t_task_log a where task_receiver=#{aid ,jdbcType=VARCHAR} UNION select task_id from t_task_log a
  1603. where task_allocator=#{aid ,jdbcType=VARCHAR}) x left join t_order_task a on x.task_id=a.id
  1604. left join business_project b on a.commodity_id=b.id left join business_category c on b.cid=c.id
  1605. left join admin d on a.task_receiver=d.id left join t_order_new e on a.order_no=e.order_no
  1606. left join user f on e.buyer_id=f.id left join department h on e.order_dep=h.id
  1607. left join (select task_id , sum(already_number) as alreadyNumber from task_progress group by task_id) i on a.id=i.task_id
  1608. where e.delete_sign !=1
  1609. <if test="orderNo != null">
  1610. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  1611. </if>
  1612. <if test="name != null">
  1613. and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  1614. </if>
  1615. <if test="orderNo != null">
  1616. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  1617. </if>
  1618. <if test="depId != null">
  1619. and e.order_dep= #{depId ,jdbcType=VARCHAR}
  1620. </if>
  1621. <if test="taskId != null">
  1622. and (a.id= #{taskId,jdbcType=VARCHAR} or a.split_super= #{taskId,jdbcType=VARCHAR})
  1623. </if>
  1624. <if test="taskStatus != null">
  1625. and a.task_status= #{taskStatus,jdbcType=INTEGER}
  1626. </if>
  1627. <if test="adminName != null">
  1628. and d.name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
  1629. </if>
  1630. order by a.task_distribution_time desc
  1631. <if test="page_sql!=null">
  1632. ${page_sql}
  1633. </if>
  1634. </select>
  1635. <select id="selectTaskListCount" resultType="java.lang.Integer">
  1636. select count(*)
  1637. from (select task_id from t_task_log a where task_receiver=#{aid ,jdbcType=VARCHAR} UNION select task_id from t_task_log a
  1638. where task_allocator=#{aid ,jdbcType=VARCHAR}) x left join t_order_task a on x.task_id=a.id
  1639. left join business_project b on a.commodity_id=b.id
  1640. left join business_category c on b.cid=c.id
  1641. left join admin d on a.task_receiver=d.id
  1642. left join t_order_new e on a.order_no=e.order_no
  1643. left join user f on e.buyer_id=f.id
  1644. left join department h on e.order_dep=h.id
  1645. left join (select task_id , sum(already_number) as alreadyNumber from task_progress group by task_id) i on a.id=i.task_id
  1646. where e.delete_sign !=1
  1647. <if test="orderNo != null">
  1648. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  1649. </if>
  1650. <if test="name != null">
  1651. and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  1652. </if>
  1653. <if test="depId != null">
  1654. and e.order_dep= #{depId ,jdbcType=VARCHAR}
  1655. </if>
  1656. <if test="orderNo != null">
  1657. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  1658. </if>
  1659. <if test="taskId != null">
  1660. and (a.id= #{taskId,jdbcType=VARCHAR} or a.split_super= #{taskId,jdbcType=VARCHAR})
  1661. </if>
  1662. <if test="taskStatus != null">
  1663. and a.task_status= #{taskStatus,jdbcType=INTEGER}
  1664. </if>
  1665. <if test="adminName != null">
  1666. and d.name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
  1667. </if>
  1668. </select>
  1669. <!-- 根据订单编号获得所有的任务负责人 -->
  1670. <select id="getReceiverByOid" parameterType="java.lang.String" resultMap="BaseResultMap">
  1671. select distinct task_receiver, a.name, a.email, t.id, t.project_status from t_order_task t
  1672. inner join admin a on t.task_receiver = a.id
  1673. where order_no = #{orderNo,jdbcType=VARCHAR} and task_status &gt; 0 and super_id is null
  1674. </select>
  1675. <update id="updateDimissionTransfer" parameterType="java.lang.String">
  1676. update t_order_task set task_allocator= #{aid,jdbcType=VARCHAR},task_receiver= #{transferId,jdbcType=VARCHAR}
  1677. <if test="type==0">
  1678. ,consultant_id=#{transferId,jdbcType=VARCHAR}
  1679. </if>
  1680. <if test="type==1">
  1681. ,manager_id=#{transferId,jdbcType=VARCHAR}
  1682. </if>
  1683. where task_receiver=#{aid,jdbcType=VARCHAR}
  1684. </update>
  1685. <select id="selectEstimateCost" resultType="java.lang.String">
  1686. select ifnull(sum(a.commodity_quantity * ifnull(b.price,0)),0) from t_order_task a
  1687. left join business_project b on a.commodity_id=b.id
  1688. where order_no= #{orderNo}
  1689. </select>
  1690. <select id="listNameByDepAndName" resultType="java.lang.String">
  1691. select
  1692. <if test="type ==0">
  1693. consultant_id
  1694. </if>
  1695. <if test="type ==1">
  1696. manager_id
  1697. </if>
  1698. from t_order_task
  1699. where order_no= #{orderNo}
  1700. group by
  1701. <if test="type ==0">
  1702. consultant_id
  1703. </if>
  1704. <if test="type ==1">
  1705. manager_id
  1706. </if>
  1707. </select>
  1708. <select id="splitProjectList" resultType="com.goafanti.order.bo.TOrderTaskListBo">
  1709. select a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,d.name as receiverName,a.project_status as projectStatus,e.contract_no contractNo,a.task_receiver taskReceiver,
  1710. a.task_status as taskStatus,date_format(a.task_distribution_time,'%Y-%m-%d') as taskDate, a.commodity_quantity as commodityQuantity,e.approval,l.refund_status outsourceStatus,
  1711. ifnull(i.alreadyNumber,0) as alreadyNumber,f.nickname as userName,h.name as depName, j.name as outsourceName ,ifnull(k.hours,0) hours,a.split_status splitStatus,
  1712. a.split_super splitSuper,date_format(a.split_time,'%Y-%m-%d %H:%i:%S') splitTimes,ad.name splitAname,a.split_id splitId
  1713. 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
  1714. 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
  1715. left join department h on e.order_dep=h.id left join (select task_id , sum(already_number) as alreadyNumber from task_progress
  1716. group by task_id) i on a.id=i.task_id left join (select order_no,max(name)as name from outsource_organization group by order_no) j
  1717. on a.order_no=j.order_no left join task_hours_count k on a.id=k.tid and a.task_receiver=k.aid left join t_order_outsource l
  1718. on a.id=l.tid left join admin ad on ad.id=a.split_aid where e.order_status not in (5,7)
  1719. and split_status =2 and a.split_super= #{tid} order by split_id
  1720. </select>
  1721. <select id="selectByidGetCname" resultType="java.lang.String">
  1722. select b.cname from business_project a left join business_category b on a.cid =b.id
  1723. where a.id= #{pid}
  1724. </select>
  1725. <update id="updateByOutsourceToOrderNo">
  1726. update t_order_task set outsource= #{type} where order_no= #{orderNo}
  1727. </update>
  1728. </mapper>