TOrderTaskMapper.xml 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927
  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 Sun May 05 08:49:10 CST 2019.
  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. </resultMap>
  33. <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.goafanti.common.model.TOrderTask">
  34. <!--
  35. WARNING - @mbg.generated
  36. This element is automatically generated by MyBatis Generator, do not modify.
  37. This element was generated on Sun May 05 08:49:10 CST 2019.
  38. -->
  39. <result column="attachment_url" jdbcType="LONGVARCHAR" property="attachmentUrl" />
  40. </resultMap>
  41. <sql id="Example_Where_Clause">
  42. <!--
  43. WARNING - @mbg.generated
  44. This element is automatically generated by MyBatis Generator, do not modify.
  45. This element was generated on Sun May 05 08:49:10 CST 2019.
  46. -->
  47. <where>
  48. <foreach collection="oredCriteria" item="criteria" separator="or">
  49. <if test="criteria.valid">
  50. <trim prefix="(" prefixOverrides="and" suffix=")">
  51. <foreach collection="criteria.criteria" item="criterion">
  52. <choose>
  53. <when test="criterion.noValue">
  54. and ${criterion.condition}
  55. </when>
  56. <when test="criterion.singleValue">
  57. and ${criterion.condition} #{criterion.value}
  58. </when>
  59. <when test="criterion.betweenValue">
  60. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  61. </when>
  62. <when test="criterion.listValue">
  63. and ${criterion.condition}
  64. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  65. #{listItem}
  66. </foreach>
  67. </when>
  68. </choose>
  69. </foreach>
  70. </trim>
  71. </if>
  72. </foreach>
  73. </where>
  74. </sql>
  75. <sql id="Update_By_Example_Where_Clause">
  76. <!--
  77. WARNING - @mbg.generated
  78. This element is automatically generated by MyBatis Generator, do not modify.
  79. This element was generated on Sun May 05 08:49:10 CST 2019.
  80. -->
  81. <where>
  82. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  83. <if test="criteria.valid">
  84. <trim prefix="(" prefixOverrides="and" suffix=")">
  85. <foreach collection="criteria.criteria" item="criterion">
  86. <choose>
  87. <when test="criterion.noValue">
  88. and ${criterion.condition}
  89. </when>
  90. <when test="criterion.singleValue">
  91. and ${criterion.condition} #{criterion.value}
  92. </when>
  93. <when test="criterion.betweenValue">
  94. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  95. </when>
  96. <when test="criterion.listValue">
  97. and ${criterion.condition}
  98. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  99. #{listItem}
  100. </foreach>
  101. </when>
  102. </choose>
  103. </foreach>
  104. </trim>
  105. </if>
  106. </foreach>
  107. </where>
  108. </sql>
  109. <sql id="Base_Column_List">
  110. <!--
  111. WARNING - @mbg.generated
  112. This element is automatically generated by MyBatis Generator, do not modify.
  113. This element was generated on Sun May 05 08:49:10 CST 2019.
  114. -->
  115. id, order_no, main, super_id, commodity_id, commodity_name, commodity_quantity, commodity_mode,
  116. commodity_price, task_status, task_distribution_time, task_allocator, task_receiver,
  117. task_comment, task_start_time, task_end_time, project_status, accept_time, review_time,
  118. publicity_time, licence_time, certificate_number
  119. </sql>
  120. <sql id="Blob_Column_List">
  121. <!--
  122. WARNING - @mbg.generated
  123. This element is automatically generated by MyBatis Generator, do not modify.
  124. This element was generated on Sun May 05 08:49:10 CST 2019.
  125. -->
  126. attachment_url
  127. </sql>
  128. <select id="selectByExampleWithBLOBs" parameterType="com.goafanti.common.model.TOrderTaskExample" resultMap="ResultMapWithBLOBs">
  129. <!--
  130. WARNING - @mbg.generated
  131. This element is automatically generated by MyBatis Generator, do not modify.
  132. This element was generated on Sun May 05 08:49:10 CST 2019.
  133. -->
  134. select
  135. <if test="distinct">
  136. distinct
  137. </if>
  138. <include refid="Base_Column_List" />
  139. ,
  140. <include refid="Blob_Column_List" />
  141. from t_order_task
  142. <if test="_parameter != null">
  143. <include refid="Example_Where_Clause" />
  144. </if>
  145. <if test="orderByClause != null">
  146. order by ${orderByClause}
  147. </if>
  148. </select>
  149. <select id="selectByExample" parameterType="com.goafanti.common.model.TOrderTaskExample" resultMap="BaseResultMap">
  150. <!--
  151. WARNING - @mbg.generated
  152. This element is automatically generated by MyBatis Generator, do not modify.
  153. This element was generated on Sun May 05 08:49:10 CST 2019.
  154. -->
  155. select
  156. <if test="distinct">
  157. distinct
  158. </if>
  159. <include refid="Base_Column_List" />
  160. from t_order_task
  161. <if test="_parameter != null">
  162. <include refid="Example_Where_Clause" />
  163. </if>
  164. <if test="orderByClause != null">
  165. order by ${orderByClause}
  166. </if>
  167. </select>
  168. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
  169. <!--
  170. WARNING - @mbg.generated
  171. This element is automatically generated by MyBatis Generator, do not modify.
  172. This element was generated on Sun May 05 08:49:10 CST 2019.
  173. -->
  174. select
  175. <include refid="Base_Column_List" />
  176. ,
  177. <include refid="Blob_Column_List" />
  178. from t_order_task
  179. where id = #{id,jdbcType=INTEGER}
  180. </select>
  181. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  182. <!--
  183. WARNING - @mbg.generated
  184. This element is automatically generated by MyBatis Generator, do not modify.
  185. This element was generated on Sun May 05 08:49:10 CST 2019.
  186. -->
  187. delete from t_order_task
  188. where id = #{id,jdbcType=INTEGER}
  189. </delete>
  190. <delete id="deleteByExample" parameterType="com.goafanti.common.model.TOrderTaskExample">
  191. <!--
  192. WARNING - @mbg.generated
  193. This element is automatically generated by MyBatis Generator, do not modify.
  194. This element was generated on Sun May 05 08:49:10 CST 2019.
  195. -->
  196. delete from t_order_task
  197. <if test="_parameter != null">
  198. <include refid="Example_Where_Clause" />
  199. </if>
  200. </delete>
  201. <insert id="insert" parameterType="com.goafanti.common.model.TOrderTask">
  202. <!--
  203. WARNING - @mbg.generated
  204. This element is automatically generated by MyBatis Generator, do not modify.
  205. This element was generated on Sun May 05 08:49:10 CST 2019.
  206. -->
  207. insert into t_order_task (id, order_no, main,
  208. super_id, commodity_id, commodity_name,
  209. commodity_quantity, commodity_mode, commodity_price,
  210. task_status, task_distribution_time, task_allocator,
  211. task_receiver, task_comment, task_start_time,
  212. task_end_time, project_status, accept_time,
  213. review_time, publicity_time, licence_time,
  214. certificate_number, attachment_url)
  215. values (#{id,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{main,jdbcType=INTEGER},
  216. #{superId,jdbcType=VARCHAR}, #{commodityId,jdbcType=VARCHAR}, #{commodityName,jdbcType=VARCHAR},
  217. #{commodityQuantity,jdbcType=INTEGER}, #{commodityMode,jdbcType=VARCHAR}, #{commodityPrice,jdbcType=DECIMAL},
  218. #{taskStatus,jdbcType=INTEGER}, #{taskDistributionTime,jdbcType=TIMESTAMP}, #{taskAllocator,jdbcType=VARCHAR},
  219. #{taskReceiver,jdbcType=VARCHAR}, #{taskComment,jdbcType=VARCHAR}, #{taskStartTime,jdbcType=TIMESTAMP},
  220. #{taskEndTime,jdbcType=TIMESTAMP}, #{projectStatus,jdbcType=INTEGER}, #{acceptTime,jdbcType=DATE},
  221. #{reviewTime,jdbcType=DATE}, #{publicityTime,jdbcType=DATE}, #{licenceTime,jdbcType=DATE},
  222. #{certificateNumber,jdbcType=VARCHAR}, #{attachmentUrl,jdbcType=LONGVARCHAR})
  223. </insert>
  224. <insert id="insertSelective" parameterType="com.goafanti.common.model.TOrderTask">
  225. <!--
  226. WARNING - @mbg.generated
  227. This element is automatically generated by MyBatis Generator, do not modify.
  228. This element was generated on Sun May 05 08:49:10 CST 2019.
  229. -->
  230. insert into t_order_task
  231. <trim prefix="(" suffix=")" suffixOverrides=",">
  232. <if test="id != null">
  233. id,
  234. </if>
  235. <if test="orderNo != null">
  236. order_no,
  237. </if>
  238. <if test="main != null">
  239. main,
  240. </if>
  241. <if test="superId != null">
  242. super_id,
  243. </if>
  244. <if test="commodityId != null">
  245. commodity_id,
  246. </if>
  247. <if test="commodityName != null">
  248. commodity_name,
  249. </if>
  250. <if test="commodityQuantity != null">
  251. commodity_quantity,
  252. </if>
  253. <if test="commodityMode != null">
  254. commodity_mode,
  255. </if>
  256. <if test="commodityPrice != null">
  257. commodity_price,
  258. </if>
  259. <if test="taskStatus != null">
  260. task_status,
  261. </if>
  262. <if test="taskDistributionTime != null">
  263. task_distribution_time,
  264. </if>
  265. <if test="taskAllocator != null">
  266. task_allocator,
  267. </if>
  268. <if test="taskReceiver != null">
  269. task_receiver,
  270. </if>
  271. <if test="taskComment != null">
  272. task_comment,
  273. </if>
  274. <if test="taskStartTime != null">
  275. task_start_time,
  276. </if>
  277. <if test="taskEndTime != null">
  278. task_end_time,
  279. </if>
  280. <if test="projectStatus != null">
  281. project_status,
  282. </if>
  283. <if test="acceptTime != null">
  284. accept_time,
  285. </if>
  286. <if test="reviewTime != null">
  287. review_time,
  288. </if>
  289. <if test="publicityTime != null">
  290. publicity_time,
  291. </if>
  292. <if test="licenceTime != null">
  293. licence_time,
  294. </if>
  295. <if test="certificateNumber != null">
  296. certificate_number,
  297. </if>
  298. <if test="attachmentUrl != null">
  299. attachment_url,
  300. </if>
  301. </trim>
  302. <trim prefix="values (" suffix=")" suffixOverrides=",">
  303. <if test="id != null">
  304. #{id,jdbcType=INTEGER},
  305. </if>
  306. <if test="orderNo != null">
  307. #{orderNo,jdbcType=VARCHAR},
  308. </if>
  309. <if test="main != null">
  310. #{main,jdbcType=INTEGER},
  311. </if>
  312. <if test="superId != null">
  313. #{superId,jdbcType=VARCHAR},
  314. </if>
  315. <if test="commodityId != null">
  316. #{commodityId,jdbcType=VARCHAR},
  317. </if>
  318. <if test="commodityName != null">
  319. #{commodityName,jdbcType=VARCHAR},
  320. </if>
  321. <if test="commodityQuantity != null">
  322. #{commodityQuantity,jdbcType=INTEGER},
  323. </if>
  324. <if test="commodityMode != null">
  325. #{commodityMode,jdbcType=VARCHAR},
  326. </if>
  327. <if test="commodityPrice != null">
  328. #{commodityPrice,jdbcType=DECIMAL},
  329. </if>
  330. <if test="taskStatus != null">
  331. #{taskStatus,jdbcType=INTEGER},
  332. </if>
  333. <if test="taskDistributionTime != null">
  334. #{taskDistributionTime,jdbcType=TIMESTAMP},
  335. </if>
  336. <if test="taskAllocator != null">
  337. #{taskAllocator,jdbcType=VARCHAR},
  338. </if>
  339. <if test="taskReceiver != null">
  340. #{taskReceiver,jdbcType=VARCHAR},
  341. </if>
  342. <if test="taskComment != null">
  343. #{taskComment,jdbcType=VARCHAR},
  344. </if>
  345. <if test="taskStartTime != null">
  346. #{taskStartTime,jdbcType=TIMESTAMP},
  347. </if>
  348. <if test="taskEndTime != null">
  349. #{taskEndTime,jdbcType=TIMESTAMP},
  350. </if>
  351. <if test="projectStatus != null">
  352. #{projectStatus,jdbcType=INTEGER},
  353. </if>
  354. <if test="acceptTime != null">
  355. #{acceptTime,jdbcType=DATE},
  356. </if>
  357. <if test="reviewTime != null">
  358. #{reviewTime,jdbcType=DATE},
  359. </if>
  360. <if test="publicityTime != null">
  361. #{publicityTime,jdbcType=DATE},
  362. </if>
  363. <if test="licenceTime != null">
  364. #{licenceTime,jdbcType=DATE},
  365. </if>
  366. <if test="certificateNumber != null">
  367. #{certificateNumber,jdbcType=VARCHAR},
  368. </if>
  369. <if test="attachmentUrl != null">
  370. #{attachmentUrl,jdbcType=LONGVARCHAR},
  371. </if>
  372. </trim>
  373. </insert>
  374. <select id="countByExample" parameterType="com.goafanti.common.model.TOrderTaskExample" resultType="java.lang.Long">
  375. <!--
  376. WARNING - @mbg.generated
  377. This element is automatically generated by MyBatis Generator, do not modify.
  378. This element was generated on Sun May 05 08:49:10 CST 2019.
  379. -->
  380. select count(*) from t_order_task
  381. <if test="_parameter != null">
  382. <include refid="Example_Where_Clause" />
  383. </if>
  384. </select>
  385. <update id="updateByExampleSelective" parameterType="map">
  386. <!--
  387. WARNING - @mbg.generated
  388. This element is automatically generated by MyBatis Generator, do not modify.
  389. This element was generated on Sun May 05 08:49:10 CST 2019.
  390. -->
  391. update t_order_task
  392. <set>
  393. <if test="record.id != null">
  394. id = #{record.id,jdbcType=INTEGER},
  395. </if>
  396. <if test="record.orderNo != null">
  397. order_no = #{record.orderNo,jdbcType=VARCHAR},
  398. </if>
  399. <if test="record.main != null">
  400. main = #{record.main,jdbcType=INTEGER},
  401. </if>
  402. <if test="record.superId != null">
  403. super_id = #{record.superId,jdbcType=VARCHAR},
  404. </if>
  405. <if test="record.commodityId != null">
  406. commodity_id = #{record.commodityId,jdbcType=VARCHAR},
  407. </if>
  408. <if test="record.commodityName != null">
  409. commodity_name = #{record.commodityName,jdbcType=VARCHAR},
  410. </if>
  411. <if test="record.commodityQuantity != null">
  412. commodity_quantity = #{record.commodityQuantity,jdbcType=INTEGER},
  413. </if>
  414. <if test="record.commodityMode != null">
  415. commodity_mode = #{record.commodityMode,jdbcType=VARCHAR},
  416. </if>
  417. <if test="record.commodityPrice != null">
  418. commodity_price = #{record.commodityPrice,jdbcType=DECIMAL},
  419. </if>
  420. <if test="record.taskStatus != null">
  421. task_status = #{record.taskStatus,jdbcType=INTEGER},
  422. </if>
  423. <if test="record.taskDistributionTime != null">
  424. task_distribution_time = #{record.taskDistributionTime,jdbcType=TIMESTAMP},
  425. </if>
  426. <if test="record.taskAllocator != null">
  427. task_allocator = #{record.taskAllocator,jdbcType=VARCHAR},
  428. </if>
  429. <if test="record.taskReceiver != null">
  430. task_receiver = #{record.taskReceiver,jdbcType=VARCHAR},
  431. </if>
  432. <if test="record.taskComment != null">
  433. task_comment = #{record.taskComment,jdbcType=VARCHAR},
  434. </if>
  435. <if test="record.taskStartTime != null">
  436. task_start_time = #{record.taskStartTime,jdbcType=TIMESTAMP},
  437. </if>
  438. <if test="record.taskEndTime != null">
  439. task_end_time = #{record.taskEndTime,jdbcType=TIMESTAMP},
  440. </if>
  441. <if test="record.projectStatus != null">
  442. project_status = #{record.projectStatus,jdbcType=INTEGER},
  443. </if>
  444. <if test="record.acceptTime != null">
  445. accept_time = #{record.acceptTime,jdbcType=DATE},
  446. </if>
  447. <if test="record.reviewTime != null">
  448. review_time = #{record.reviewTime,jdbcType=DATE},
  449. </if>
  450. <if test="record.publicityTime != null">
  451. publicity_time = #{record.publicityTime,jdbcType=DATE},
  452. </if>
  453. <if test="record.licenceTime != null">
  454. licence_time = #{record.licenceTime,jdbcType=DATE},
  455. </if>
  456. <if test="record.certificateNumber != null">
  457. certificate_number = #{record.certificateNumber,jdbcType=VARCHAR},
  458. </if>
  459. <if test="record.attachmentUrl != null">
  460. attachment_url = #{record.attachmentUrl,jdbcType=LONGVARCHAR},
  461. </if>
  462. </set>
  463. <if test="_parameter != null">
  464. <include refid="Update_By_Example_Where_Clause" />
  465. </if>
  466. </update>
  467. <update id="updateByExampleWithBLOBs" parameterType="map">
  468. <!--
  469. WARNING - @mbg.generated
  470. This element is automatically generated by MyBatis Generator, do not modify.
  471. This element was generated on Sun May 05 08:49:10 CST 2019.
  472. -->
  473. update t_order_task
  474. set id = #{record.id,jdbcType=INTEGER},
  475. order_no = #{record.orderNo,jdbcType=VARCHAR},
  476. main = #{record.main,jdbcType=INTEGER},
  477. super_id = #{record.superId,jdbcType=VARCHAR},
  478. commodity_id = #{record.commodityId,jdbcType=VARCHAR},
  479. commodity_name = #{record.commodityName,jdbcType=VARCHAR},
  480. commodity_quantity = #{record.commodityQuantity,jdbcType=INTEGER},
  481. commodity_mode = #{record.commodityMode,jdbcType=VARCHAR},
  482. commodity_price = #{record.commodityPrice,jdbcType=DECIMAL},
  483. task_status = #{record.taskStatus,jdbcType=INTEGER},
  484. task_distribution_time = #{record.taskDistributionTime,jdbcType=TIMESTAMP},
  485. task_allocator = #{record.taskAllocator,jdbcType=VARCHAR},
  486. task_receiver = #{record.taskReceiver,jdbcType=VARCHAR},
  487. task_comment = #{record.taskComment,jdbcType=VARCHAR},
  488. task_start_time = #{record.taskStartTime,jdbcType=TIMESTAMP},
  489. task_end_time = #{record.taskEndTime,jdbcType=TIMESTAMP},
  490. project_status = #{record.projectStatus,jdbcType=INTEGER},
  491. accept_time = #{record.acceptTime,jdbcType=DATE},
  492. review_time = #{record.reviewTime,jdbcType=DATE},
  493. publicity_time = #{record.publicityTime,jdbcType=DATE},
  494. licence_time = #{record.licenceTime,jdbcType=DATE},
  495. certificate_number = #{record.certificateNumber,jdbcType=VARCHAR},
  496. attachment_url = #{record.attachmentUrl,jdbcType=LONGVARCHAR}
  497. <if test="_parameter != null">
  498. <include refid="Update_By_Example_Where_Clause" />
  499. </if>
  500. </update>
  501. <update id="updateByExample" parameterType="map">
  502. <!--
  503. WARNING - @mbg.generated
  504. This element is automatically generated by MyBatis Generator, do not modify.
  505. This element was generated on Sun May 05 08:49:10 CST 2019.
  506. -->
  507. update t_order_task
  508. set id = #{record.id,jdbcType=INTEGER},
  509. order_no = #{record.orderNo,jdbcType=VARCHAR},
  510. main = #{record.main,jdbcType=INTEGER},
  511. super_id = #{record.superId,jdbcType=VARCHAR},
  512. commodity_id = #{record.commodityId,jdbcType=VARCHAR},
  513. commodity_name = #{record.commodityName,jdbcType=VARCHAR},
  514. commodity_quantity = #{record.commodityQuantity,jdbcType=INTEGER},
  515. commodity_mode = #{record.commodityMode,jdbcType=VARCHAR},
  516. commodity_price = #{record.commodityPrice,jdbcType=DECIMAL},
  517. task_status = #{record.taskStatus,jdbcType=INTEGER},
  518. task_distribution_time = #{record.taskDistributionTime,jdbcType=TIMESTAMP},
  519. task_allocator = #{record.taskAllocator,jdbcType=VARCHAR},
  520. task_receiver = #{record.taskReceiver,jdbcType=VARCHAR},
  521. task_comment = #{record.taskComment,jdbcType=VARCHAR},
  522. task_start_time = #{record.taskStartTime,jdbcType=TIMESTAMP},
  523. task_end_time = #{record.taskEndTime,jdbcType=TIMESTAMP},
  524. project_status = #{record.projectStatus,jdbcType=INTEGER},
  525. accept_time = #{record.acceptTime,jdbcType=DATE},
  526. review_time = #{record.reviewTime,jdbcType=DATE},
  527. publicity_time = #{record.publicityTime,jdbcType=DATE},
  528. licence_time = #{record.licenceTime,jdbcType=DATE},
  529. certificate_number = #{record.certificateNumber,jdbcType=VARCHAR}
  530. <if test="_parameter != null">
  531. <include refid="Update_By_Example_Where_Clause" />
  532. </if>
  533. </update>
  534. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderTask">
  535. <!--
  536. WARNING - @mbg.generated
  537. This element is automatically generated by MyBatis Generator, do not modify.
  538. This element was generated on Sun May 05 08:49:10 CST 2019.
  539. -->
  540. update t_order_task
  541. <set>
  542. <if test="orderNo != null">
  543. order_no = #{orderNo,jdbcType=VARCHAR},
  544. </if>
  545. <if test="main != null">
  546. main = #{main,jdbcType=INTEGER},
  547. </if>
  548. <if test="superId != null">
  549. super_id = #{superId,jdbcType=VARCHAR},
  550. </if>
  551. <if test="commodityId != null">
  552. commodity_id = #{commodityId,jdbcType=VARCHAR},
  553. </if>
  554. <if test="commodityName != null">
  555. commodity_name = #{commodityName,jdbcType=VARCHAR},
  556. </if>
  557. <if test="commodityQuantity != null">
  558. commodity_quantity = #{commodityQuantity,jdbcType=INTEGER},
  559. </if>
  560. <if test="commodityMode != null">
  561. commodity_mode = #{commodityMode,jdbcType=VARCHAR},
  562. </if>
  563. <if test="commodityPrice != null">
  564. commodity_price = #{commodityPrice,jdbcType=DECIMAL},
  565. </if>
  566. <if test="taskStatus != null">
  567. task_status = #{taskStatus,jdbcType=INTEGER},
  568. </if>
  569. <if test="taskDistributionTime != null">
  570. task_distribution_time = #{taskDistributionTime,jdbcType=TIMESTAMP},
  571. </if>
  572. <if test="taskAllocator != null">
  573. task_allocator = #{taskAllocator,jdbcType=VARCHAR},
  574. </if>
  575. <if test="taskReceiver != null">
  576. task_receiver = #{taskReceiver,jdbcType=VARCHAR},
  577. </if>
  578. <if test="taskComment != null">
  579. task_comment = #{taskComment,jdbcType=VARCHAR},
  580. </if>
  581. <if test="taskStartTime != null">
  582. task_start_time = #{taskStartTime,jdbcType=TIMESTAMP},
  583. </if>
  584. <if test="taskEndTime != null">
  585. task_end_time = #{taskEndTime,jdbcType=TIMESTAMP},
  586. </if>
  587. <if test="projectStatus != null">
  588. project_status = #{projectStatus,jdbcType=INTEGER},
  589. </if>
  590. <if test="acceptTime != null">
  591. accept_time = #{acceptTime,jdbcType=DATE},
  592. </if>
  593. <if test="reviewTime != null">
  594. review_time = #{reviewTime,jdbcType=DATE},
  595. </if>
  596. <if test="publicityTime != null">
  597. publicity_time = #{publicityTime,jdbcType=DATE},
  598. </if>
  599. <if test="licenceTime != null">
  600. licence_time = #{licenceTime,jdbcType=DATE},
  601. </if>
  602. <if test="certificateNumber != null">
  603. certificate_number = #{certificateNumber,jdbcType=VARCHAR},
  604. </if>
  605. <if test="attachmentUrl != null">
  606. attachment_url = #{attachmentUrl,jdbcType=LONGVARCHAR},
  607. </if>
  608. <if test="certificateNumber != null">
  609. certificate_number = #{certificateNumber,jdbcType=VARCHAR},
  610. </if>
  611. </set>
  612. where id = #{id,jdbcType=INTEGER}
  613. </update>
  614. <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.goafanti.common.model.TOrderTask">
  615. <!--
  616. WARNING - @mbg.generated
  617. This element is automatically generated by MyBatis Generator, do not modify.
  618. This element was generated on Sun May 05 08:49:10 CST 2019.
  619. -->
  620. update t_order_task
  621. set order_no = #{orderNo,jdbcType=VARCHAR},
  622. main = #{main,jdbcType=INTEGER},
  623. super_id = #{superId,jdbcType=VARCHAR},
  624. commodity_id = #{commodityId,jdbcType=VARCHAR},
  625. commodity_name = #{commodityName,jdbcType=VARCHAR},
  626. commodity_quantity = #{commodityQuantity,jdbcType=INTEGER},
  627. commodity_mode = #{commodityMode,jdbcType=VARCHAR},
  628. commodity_price = #{commodityPrice,jdbcType=DECIMAL},
  629. task_status = #{taskStatus,jdbcType=INTEGER},
  630. task_distribution_time = #{taskDistributionTime,jdbcType=TIMESTAMP},
  631. task_allocator = #{taskAllocator,jdbcType=VARCHAR},
  632. task_receiver = #{taskReceiver,jdbcType=VARCHAR},
  633. task_comment = #{taskComment,jdbcType=VARCHAR},
  634. task_start_time = #{taskStartTime,jdbcType=TIMESTAMP},
  635. task_end_time = #{taskEndTime,jdbcType=TIMESTAMP},
  636. project_status = #{projectStatus,jdbcType=INTEGER},
  637. accept_time = #{acceptTime,jdbcType=DATE},
  638. review_time = #{reviewTime,jdbcType=DATE},
  639. publicity_time = #{publicityTime,jdbcType=DATE},
  640. licence_time = #{licenceTime,jdbcType=DATE},
  641. certificate_number = #{certificateNumber,jdbcType=VARCHAR},
  642. attachment_url = #{attachmentUrl,jdbcType=LONGVARCHAR}
  643. where id = #{id,jdbcType=INTEGER}
  644. </update>
  645. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TOrderTask">
  646. <!--
  647. WARNING - @mbg.generated
  648. This element is automatically generated by MyBatis Generator, do not modify.
  649. This element was generated on Sun May 05 08:49:10 CST 2019.
  650. -->
  651. update t_order_task
  652. set order_no = #{orderNo,jdbcType=VARCHAR},
  653. main = #{main,jdbcType=INTEGER},
  654. super_id = #{superId,jdbcType=VARCHAR},
  655. commodity_id = #{commodityId,jdbcType=VARCHAR},
  656. commodity_name = #{commodityName,jdbcType=VARCHAR},
  657. commodity_quantity = #{commodityQuantity,jdbcType=INTEGER},
  658. commodity_mode = #{commodityMode,jdbcType=VARCHAR},
  659. commodity_price = #{commodityPrice,jdbcType=DECIMAL},
  660. task_status = #{taskStatus,jdbcType=INTEGER},
  661. task_distribution_time = #{taskDistributionTime,jdbcType=TIMESTAMP},
  662. task_allocator = #{taskAllocator,jdbcType=VARCHAR},
  663. task_receiver = #{taskReceiver,jdbcType=VARCHAR},
  664. task_comment = #{taskComment,jdbcType=VARCHAR},
  665. task_start_time = #{taskStartTime,jdbcType=TIMESTAMP},
  666. task_end_time = #{taskEndTime,jdbcType=TIMESTAMP},
  667. project_status = #{projectStatus,jdbcType=INTEGER},
  668. accept_time = #{acceptTime,jdbcType=DATE},
  669. review_time = #{reviewTime,jdbcType=DATE},
  670. publicity_time = #{publicityTime,jdbcType=DATE},
  671. licence_time = #{licenceTime,jdbcType=DATE},
  672. certificate_number = #{certificateNumber,jdbcType=VARCHAR}
  673. where id = #{id,jdbcType=INTEGER}
  674. </update>
  675. <select id="selectOrderTask" resultType="com.goafanti.order.bo.TOrderTaskBo">
  676. select
  677. a.id,a.order_no as orderNo,a.commodity_name as commodityName,a.commodity_id as commodityId,
  678. a.commodity_quantity as commodityQuantity,a.commodity_price as commodityPrice,a.task_comment as taskComment,
  679. a.task_status as taskStatus,a.project_status as projectStatus,a.main,a.task_receiver as taskReceiver ,a.certificate_number as certificateNumber,
  680. d.name as contacts,d.contact_mobile as contactsMobile,c.cname
  681. from t_order_task a left join business_project b on a.commodity_id=b.id
  682. left join business_category c on b.cid=c.id left join admin d on a.task_receiver=d.id
  683. where a.super_id is null and a.order_no= #{orderNo,jdbcType=VARCHAR}
  684. </select>
  685. <select id="selectOrderTaskListByPage" resultType="com.goafanti.order.bo.TOrderTaskListBo">
  686. select a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,d.name as receiverName,
  687. a.project_status as projectStatus,a.task_status as taskStatus,date_format(a.task_distribution_time,'%Y-%m-%d') as taskDate,
  688. a.commodity_quantity as commodityQuantity,f.nickname as userName,h.name as depName
  689. from t_order_task a left join business_project b on a.commodity_id=b.id
  690. left join business_category c on b.cid=c.id
  691. left join admin d on a.task_receiver=d.id
  692. left join t_order_new e on a.order_no=e.order_no
  693. left join user f on e.buyer_id=f.id
  694. left join admin g on e.salesman_id=g.id
  695. left join department h on g.department_id=h.id
  696. where e.delete_sign=0 and e.order_status not in (5,7)
  697. <if test="specially == 0">
  698. and a.task_receiver= #{aid,jdbcType=VARCHAR}
  699. and a.commodity_quantity =1
  700. </if>
  701. <if test="specially == 1">
  702. and a.task_receiver= #{aid,jdbcType=VARCHAR}
  703. and a.super_id is null
  704. </if>
  705. <if test="specially == 2">
  706. and d.superior_id= (select department_id from admin where id= #{aid,jdbcType=VARCHAR})
  707. </if>
  708. <if test="orderNo != null">
  709. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  710. </if>
  711. <if test="depId != null">
  712. and g.department_id= #{depId,jdbcType=VARCHAR}
  713. </if>
  714. <if test="name != null">
  715. and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  716. </if>
  717. <if test="orderNo != null">
  718. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  719. </if>
  720. <if test="taskId != null">
  721. and a.id= #{taskId,jdbcType=VARCHAR}
  722. </if>
  723. <if test="taskStatus != null">
  724. and a.task_status= #{taskStatus,jdbcType=INTEGER}
  725. </if>
  726. <if test="adminName != null">
  727. and d.name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
  728. </if>
  729. order by a.task_distribution_time desc
  730. <if test="page_sql!=null">
  731. ${page_sql}
  732. </if>
  733. </select>
  734. <select id="selectOrderTaskListCount" resultType="java.lang.Integer">
  735. select count(*)
  736. from t_order_task a
  737. left join admin d on a.task_receiver=d.id
  738. left join t_order_new e on a.order_no=e.order_no
  739. left join admin g on e.salesman_id=g.id
  740. left join department h on g.department_id=h.id
  741. where e.delete_sign=0 and e.order_status not in (5,7)
  742. <if test="specially == 0">
  743. and a.task_receiver= #{aid,jdbcType=VARCHAR}
  744. and a.commodity_quantity =1
  745. </if>
  746. <if test="specially == 1">
  747. and a.task_receiver= #{aid,jdbcType=VARCHAR}
  748. and a.super_id is null
  749. </if>
  750. <if test="specially == 2">
  751. and d.superior_id= (select department_id from admin where id= #{aid,jdbcType=VARCHAR})
  752. </if>
  753. <if test="orderNo != null">
  754. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  755. </if>
  756. <if test="depId != null">
  757. and g.department_id= #{depId,jdbcType=VARCHAR}
  758. </if>
  759. <if test="name != null">
  760. and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  761. </if>
  762. <if test="orderNo != null">
  763. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  764. </if>
  765. <if test="taskId != null">
  766. and a.id= #{taskId,jdbcType=VARCHAR}
  767. </if>
  768. <if test="taskStatus != null">
  769. and a.task_status= #{taskStatus,jdbcType=INTEGER}
  770. </if>
  771. <if test="adminName != null">
  772. and d.name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
  773. </if>
  774. </select>
  775. <select id="getOrderTaskDetail" resultType="com.goafanti.order.bo.TOrderTaskDetailBo">
  776. select
  777. a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,d.name as receiverName,a.task_comment as taskComment,
  778. a.project_status as projectStatus,a.task_status as taskStatus,e.contacts,a.attachment_url as attachmentUrl,
  779. f.nickname as userName,g.name as salesmanName,date_format(a.task_start_time,'%Y-%m-%d') as startDate,a.certificate_number as certificateNumber,
  780. date_format(a.task_end_time,'%Y-%m-%d') as endDate,date_format(a.accept_time,'%Y-%m-%d') as acceptDate,
  781. date_format(a.review_time,'%Y-%m-%d') as reviewDate,date_format(a.publicity_time,'%Y-%m-%d') as publicityDate,
  782. date_format(a.licence_time,'%Y-%m-%d') as licenceDate,date_format(a.task_distribution_time,'%Y-%m-%d') as taskDate,
  783. e.contacts ,e.contact_mobile as contactMobile ,e.legal_person as legalPerson,e.legal_person_tel as legalPersonTel
  784. from t_order_task a left join business_project b on a.commodity_id=b.id
  785. left join business_category c on b.cid=c.id
  786. left join admin d on a.task_receiver=d.id
  787. left join t_order_new e on a.order_no=e.order_no
  788. left join user f on e.buyer_id=f.id
  789. left join admin g on e.salesman_id=g.id
  790. where a.id= #{id,jdbcType=VARCHAR}
  791. </select>
  792. <select id="selectBySuperId" resultType="com.goafanti.common.model.TOrderTask">
  793. select super_id as superId,min(task_status) as taskStatus,min(project_status) as projectStatus,max(main) as main from t_order_task
  794. where super_id = #{superId,jdbcType=VARCHAR} group by super_id
  795. </select>
  796. <select id="selectTaskHoursListByPage" resultType="com.goafanti.order.bo.TOrderTaskListBo">
  797. select a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,d.name as receiverName,dep.name as depName,
  798. a.task_status as taskStatus,f.nickname as userName,ifnull(g.hours,0) as hours,a.commodity_quantity as commodityQuantity,
  799. 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
  800. from t_order_task a left join business_project b on a.commodity_id=b.id
  801. left join business_category c on b.cid=c.id
  802. left join admin d on a.task_receiver=d.id
  803. left join department dep on d.department_id=dep.id
  804. left join t_order_new e on a.order_no=e.order_no
  805. left join user f on e.buyer_id=f.id
  806. left join (select task_id,sum(hours) as hours from t_task_hours group by task_id) g on a.id=g.task_id
  807. where e.delete_sign=0 and a.super_id is null
  808. <if test="name != null">
  809. and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  810. </if>
  811. <if test="taskId != null">
  812. and a.id= #{taskId,jdbcType=VARCHAR}
  813. </if>
  814. <if test="starTime !=null and endTime !=null">
  815. and a.task_start_time between #{starTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
  816. </if>
  817. order by a.task_start_time desc
  818. <if test="page_sql!=null">
  819. ${page_sql}
  820. </if>
  821. </select>
  822. <select id="selectTaskHoursListCount" resultType="java.lang.Integer">
  823. select count(*)
  824. from t_order_task a left join business_project b on a.commodity_id=b.id
  825. left join business_category c on b.cid=c.id
  826. left join admin d on a.task_receiver=d.id
  827. left join t_order_new e on a.order_no=e.order_no
  828. left join user f on e.buyer_id=f.id
  829. where e.delete_sign=0 and a.super_id is null
  830. <if test="name != null">
  831. and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  832. </if>
  833. <if test="taskId != null">
  834. and a.id= #{taskId,jdbcType=VARCHAR}
  835. </if>
  836. <if test="starTime !=null and endTime !=null">
  837. and a.task_start_time between #{starTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
  838. </if>
  839. </select>
  840. <select id="selectTaskListByPage" resultType="com.goafanti.order.bo.TOrderTaskListBo">
  841. select a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,d.name as receiverName,
  842. a.project_status as projectStatus,a.task_status as taskStatus,date_format(a.task_distribution_time,'%Y-%m-%d') as taskDate,
  843. a.commodity_quantity as commodityQuantity,f.nickname as userName,h.name as depName
  844. from t_task_log x left join t_order_task a on x.task_id=a.id
  845. left join business_project b on a.commodity_id=b.id
  846. left join business_category c on b.cid=c.id
  847. left join admin d on a.task_receiver=d.id
  848. left join t_order_new e on a.order_no=e.order_no
  849. left join user f on e.buyer_id=f.id
  850. left join admin g on e.salesman_id=g.id
  851. left join department h on g.department_id=h.id
  852. where e.delete_sign=0
  853. and x.task_receiver= #{aid,jdbcType=VARCHAR}
  854. <if test="orderNo != null">
  855. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  856. </if>
  857. <if test="name != null">
  858. and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  859. </if>
  860. <if test="orderNo != null">
  861. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  862. </if>
  863. <if test="depId != null">
  864. and g.department_id= #{depId ,jdbcType=VARCHAR}
  865. </if>
  866. <if test="taskId != null">
  867. and a.id= #{taskId,jdbcType=VARCHAR}
  868. </if>
  869. <if test="taskStatus != null">
  870. and a.task_status= #{taskStatus,jdbcType=INTEGER}
  871. </if>
  872. <if test="adminName != null">
  873. and d.name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
  874. </if>
  875. order by a.task_distribution_time desc
  876. <if test="page_sql!=null">
  877. ${page_sql}
  878. </if>
  879. </select>
  880. <select id="selectTaskListCount" resultType="java.lang.Integer">
  881. select count(*)
  882. from t_task_log x left join t_order_task a on x.task_id=a.id
  883. left join admin d on a.task_receiver=d.id
  884. left join t_order_new e on a.order_no=e.order_no
  885. left join user f on e.buyer_id=f.id
  886. where e.delete_sign=0
  887. and x.task_receiver= #{aid,jdbcType=VARCHAR}
  888. <if test="orderNo != null">
  889. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  890. </if>
  891. <if test="name != null">
  892. and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  893. </if>
  894. <if test="depId != null">
  895. and g.department_id= #{depId ,jdbcType=VARCHAR}
  896. </if>
  897. <if test="orderNo != null">
  898. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  899. </if>
  900. <if test="taskId != null">
  901. and a.id= #{taskId,jdbcType=VARCHAR}
  902. </if>
  903. <if test="taskStatus != null">
  904. and a.task_status= #{taskStatus,jdbcType=INTEGER}
  905. </if>
  906. <if test="adminName != null">
  907. and d.name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
  908. </if>
  909. </select>
  910. <!-- 根据订单编号获得所有的任务负责人 -->
  911. <select id="getReceiverByOid" parameterType="java.lang.String" resultMap="BaseResultMap">
  912. select distinct task_receiver, a.name, a.email, t.id, t.project_status from t_order_task t
  913. inner join admin a on t.task_receiver = a.id
  914. where order_no = #{orderNo,jdbcType=VARCHAR} and task_status &gt; 0 and super_id is null
  915. </select>
  916. <update id="updateDimissionTransfer" parameterType="java.lang.String">
  917. update t_order_task set task_allocator= #{aid,jdbcType=VARCHAR},task_receiver= #{transferId,jdbcType=VARCHAR}
  918. where task_receiver=#{aid,jdbcType=VARCHAR}
  919. </update>
  920. </mapper>