TOrderTaskMapper.xml 62 KB

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