WorkOrderManageMapper.xml 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910
  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.huaxu.order.dao.WorkOrderManageMapper" >
  4. <resultMap id="BaseResultMap" type="com.huaxu.order.dto.WorkOrderManageDto" >
  5. <id column="id" property="id" jdbcType="INTEGER" />
  6. <result column="task_no" property="taskNo" jdbcType="VARCHAR" />
  7. <result column="task_desc" property="taskDesc" jdbcType="VARCHAR" />
  8. <result column="order_user_id" property="orderUserId" jdbcType="VARCHAR" />
  9. <result column="send_time" property="sendTime" jdbcType="TIMESTAMP" />
  10. <result column="send_by" property="sendBy" jdbcType="VARCHAR" />
  11. <result column="plan_finish_date" property="planFinishDate" jdbcType="TIMESTAMP" />
  12. <result column="finish_date" property="finishDate" jdbcType="TIMESTAMP" />
  13. <result column="date_limit" property="dateLimit" jdbcType="VARCHAR" />
  14. <result column="urgency" property="urgency" jdbcType="VARCHAR" />
  15. <result column="address" property="address" jdbcType="VARCHAR" />
  16. <result column="contact_user" property="contactUser" jdbcType="VARCHAR" />
  17. <result column="contact_phone" property="contactPhone" jdbcType="VARCHAR" />
  18. <result column="order_time" property="orderTime" jdbcType="VARCHAR" />
  19. <result column="company_org_id" property="companyOrgId" jdbcType="VARCHAR" />
  20. <result column="department_org_id" property="departmentOrgId" jdbcType="VARCHAR" />
  21. <result column="order_status" property="orderStatus" jdbcType="INTEGER" />
  22. <result column="event_type" property="eventType" jdbcType="INTEGER" />
  23. <result column="event_type_name" property="eventTypeName" jdbcType="VARCHAR" />
  24. <result column="order_type_id" property="orderTypeId" jdbcType="INTEGER" />
  25. <result column="order_pid" property="orderPid" jdbcType="VARCHAR" />
  26. <result column="tenant_id" property="tenantId" jdbcType="VARCHAR" />
  27. <result column="process_instance_id" property="processInstanceId" jdbcType="VARCHAR" />
  28. <result column="process_def_id" property="processDefId" jdbcType="VARCHAR" />
  29. <result column="current_task_id" property="currentTaskId" jdbcType="VARCHAR" />
  30. <result column="current_users" property="currentUsers" jdbcType="VARCHAR" />
  31. <result column="current_task_name" property="currentTaskName" jdbcType="VARCHAR" />
  32. <result column="create_by" property="createBy" jdbcType="VARCHAR" />
  33. <result column="date_create" property="dateCreate" jdbcType="TIMESTAMP" />
  34. <result column="update_by" property="updateBy" jdbcType="VARCHAR" />
  35. <result column="date_update" property="dateUpdate" jdbcType="TIMESTAMP" />
  36. <result column="geo" property="geo" jdbcType="VARCHAR" />
  37. <result column="videos" property="videos" jdbcType="VARCHAR" />
  38. <result column="pictures" property="pictures" jdbcType="VARCHAR" />
  39. <result column="flow_detail" property="flowDetail" jdbcType="VARCHAR" />
  40. <result column="device_id" property="deviceId" jdbcType="INTEGER" />
  41. <result column="scenes_id" property="scenesId" jdbcType="INTEGER" />
  42. <result column="device_name" property="deviceName" jdbcType="VARCHAR" />
  43. <result column="scenes_name" property="scenesName" jdbcType="VARCHAR" />
  44. <result column="order_status_name" property="orderStatusName" jdbcType="VARCHAR" />
  45. <result column="order_count" property="orderCount" jdbcType="VARCHAR" />
  46. <result column="in_process_status" property="inProcessStatus" jdbcType="INTEGER" />
  47. </resultMap>
  48. <resultMap id="workFlowLogResultMap" type="com.huaxu.order.entity.WorkFlowLog">
  49. <id column="id" property="id" jdbcType="INTEGER" />
  50. <result column="flow_id" property="flowId" jdbcType="INTEGER" />
  51. <result column="log_process_instance_id" property="processInstanceId" jdbcType="VARCHAR" />
  52. <result column="task_id" property="taskId" jdbcType="VARCHAR" />
  53. <result column="handle_user_id" property="handleUserId" jdbcType="VARCHAR" />
  54. <result column="handle_user_name" property="handleUserName" jdbcType="VARCHAR" />
  55. <result column="flow_type" property="flowType" jdbcType="INTEGER" />
  56. <result column="flow_result" property="flowResult" jdbcType="VARCHAR" />
  57. <result column="log_create_by" property="createBy" jdbcType="VARCHAR" />
  58. <result column="log_date_create" property="dateCreate" jdbcType="TIMESTAMP" />
  59. <result column="log_update_by" property="updateBy" jdbcType="VARCHAR" />
  60. <result column="log_date_update" property="dateUpdate" jdbcType="TIMESTAMP" />
  61. </resultMap>
  62. <resultMap id="OrderResultMap" type="com.huaxu.order.dto.WorkOrderManageDto" extends="BaseResultMap">
  63. <association property="workFlowDetail" javaType="com.huaxu.order.entity.WorkFlowDetail">
  64. <id column="id" property="id" jdbcType="INTEGER" />
  65. <result column="flow_id" property="flowId" jdbcType="INTEGER" />
  66. <result column="flow_type" property="flowType" jdbcType="INTEGER" />
  67. <result column="flow_detail" property="flowDetail" jdbcType="VARCHAR" />
  68. <result column="detail_create_by" property="createBy" jdbcType="VARCHAR" />
  69. <result column="detail_date_create" property="dateCreate" jdbcType="TIMESTAMP" />
  70. <result column="detail_update_by" property="updateBy" jdbcType="VARCHAR" />
  71. <result column="detail_date_update" property="dateUpdate" jdbcType="TIMESTAMP" />
  72. </association>
  73. <collection property="workFlowLogList" ofType="com.huaxu.order.entity.WorkFlowLog" javaType="java.util.List" select="getWorkFlowLog" column="{flowId=id}">
  74. <id column="id" property="id" jdbcType="INTEGER" />
  75. <result column="flow_id" property="flowId" jdbcType="INTEGER" />
  76. <result column="log_process_instance_id" property="processInstanceId" jdbcType="VARCHAR" />
  77. <result column="task_id" property="taskId" jdbcType="VARCHAR" />
  78. <result column="handle_user_id" property="handleUserId" jdbcType="VARCHAR" />
  79. <result column="handle_user_name" property="handleUserName" jdbcType="VARCHAR" />
  80. <result column="flow_type" property="flowType" jdbcType="INTEGER" />
  81. <result column="flow_result" property="flowResult" jdbcType="VARCHAR" />
  82. <result column="log_create_by" property="createBy" jdbcType="VARCHAR" />
  83. <result column="log_date_create" property="dateCreate" jdbcType="TIMESTAMP" />
  84. <result column="log_update_by" property="updateBy" jdbcType="VARCHAR" />
  85. <result column="log_date_update" property="dateUpdate" jdbcType="TIMESTAMP" />
  86. </collection>
  87. </resultMap>
  88. <sql id="Base_Column_List" >
  89. id, task_no, task_desc, order_user_id, send_time, send_by, plan_finish_date, finish_date,
  90. date_limit, urgency, address, contact_user, contact_phone, order_time, company_org_id,
  91. department_org_id, order_status, event_type, order_type_id, order_pid, tenant_id,
  92. process_instance_id, process_def_id, current_task_id, current_users, current_task_name,
  93. create_by, date_create, update_by, date_update, geo,videos, pictures, device_id, scenes_id,
  94. device_name, scenes_name,in_process_status
  95. </sql>
  96. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  97. select
  98. <include refid="Base_Column_List" />
  99. from sc_work_order_manage
  100. where id = #{id,jdbcType=INTEGER}
  101. </select>
  102. <select id="getWorkFlowLog" resultMap="workFlowLogResultMap" parameterType="map">
  103. select t3.process_instance_id log_process_instance_id,t3.task_id,t3.handle_user_id,t3.handle_user_name,t3.flow_result,t3.create_by log_create_by,
  104. t3.date_create log_date_create,t3.update_by log_update_by,t3.date_update log_date_update
  105. from sc_work_flow_log t3
  106. where t3.flow_id= #{flowId,jdbcType=INTEGER} and t3.flow_type=2
  107. </select>
  108. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  109. delete from sc_work_order_manage
  110. where id = #{id,jdbcType=INTEGER}
  111. </delete>
  112. <insert id="insert" parameterType="com.huaxu.order.entity.WorkOrderManage" >
  113. insert into sc_work_order_manage (id, task_no, task_desc,
  114. order_user_id, send_time, send_by,
  115. plan_finish_date, finish_date, date_limit,
  116. urgency, address, contact_user,
  117. contact_phone, order_time, company_org_id,
  118. department_org_id, order_status, event_type,
  119. order_type_id, order_pid, tenant_id,
  120. process_instance_id, process_def_id, current_task_id,
  121. current_users, current_task_name, create_by,
  122. date_create, update_by, date_update,
  123. geo,videos,pictures)
  124. values (#{id,jdbcType=INTEGER}, #{taskNo,jdbcType=VARCHAR}, #{taskDesc,jdbcType=VARCHAR},
  125. #{orderUserId,jdbcType=VARCHAR}, #{sendTime,jdbcType=TIMESTAMP}, #{sendBy,jdbcType=VARCHAR},
  126. #{planFinishDate,jdbcType=TIMESTAMP}, #{finishDate,jdbcType=TIMESTAMP}, #{dateLimit,jdbcType=VARCHAR},
  127. #{urgency,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{contactUser,jdbcType=VARCHAR},
  128. #{contactPhone,jdbcType=VARCHAR}, #{orderTime,jdbcType=VARCHAR}, #{companyOrgId,jdbcType=VARCHAR},
  129. #{departmentOrgId,jdbcType=VARCHAR}, #{orderStatus,jdbcType=INTEGER}, #{eventType,jdbcType=INTEGER},
  130. #{orderTypeId,jdbcType=INTEGER}, #{orderPid,jdbcType=VARCHAR}, #{tenantId,jdbcType=VARCHAR},
  131. #{processInstanceId,jdbcType=VARCHAR}, #{processDefId,jdbcType=VARCHAR}, #{currentTaskId,jdbcType=VARCHAR},
  132. #{currentUsers,jdbcType=VARCHAR}, #{currentTaskName,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR},
  133. #{dateCreate,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{dateUpdate,jdbcType=TIMESTAMP},
  134. #{geo,jdbcType=VARCHAR},#{videos,jdbcType=VARCHAR},#{pictures,jdbcType=VARCHAR})
  135. </insert>
  136. <insert id="insertSelective" parameterType="com.huaxu.order.entity.WorkOrderManage" keyProperty="id" useGeneratedKeys="true">
  137. insert into sc_work_order_manage
  138. <trim prefix="(" suffix=")" suffixOverrides="," >
  139. <if test="id != null" >
  140. id,
  141. </if>
  142. <if test="taskNo != null" >
  143. task_no,
  144. </if>
  145. <if test="taskDesc != null" >
  146. task_desc,
  147. </if>
  148. <if test="orderUserId != null" >
  149. order_user_id,
  150. </if>
  151. <if test="sendTime != null" >
  152. send_time,
  153. </if>
  154. <if test="sendBy != null" >
  155. send_by,
  156. </if>
  157. <if test="planFinishDate != null" >
  158. plan_finish_date,
  159. </if>
  160. <if test="finishDate != null" >
  161. finish_date,
  162. </if>
  163. <if test="dateLimit != null" >
  164. date_limit,
  165. </if>
  166. <if test="urgency != null" >
  167. urgency,
  168. </if>
  169. <if test="address != null" >
  170. address,
  171. </if>
  172. <if test="contactUser != null" >
  173. contact_user,
  174. </if>
  175. <if test="contactPhone != null" >
  176. contact_phone,
  177. </if>
  178. <if test="orderTime != null" >
  179. order_time,
  180. </if>
  181. <if test="companyOrgId != null" >
  182. company_org_id,
  183. </if>
  184. <if test="departmentOrgId != null" >
  185. department_org_id,
  186. </if>
  187. <if test="orderStatus != null" >
  188. order_status,
  189. </if>
  190. <if test="eventType != null" >
  191. event_type,
  192. </if>
  193. <if test="orderTypeId != null" >
  194. order_type_id,
  195. </if>
  196. <if test="orderPid != null" >
  197. order_pid,
  198. </if>
  199. <if test="tenantId != null" >
  200. tenant_id,
  201. </if>
  202. <if test="processInstanceId != null" >
  203. process_instance_id,
  204. </if>
  205. <if test="processDefId != null" >
  206. process_def_id,
  207. </if>
  208. <if test="currentTaskId != null" >
  209. current_task_id,
  210. </if>
  211. <if test="currentUsers != null" >
  212. current_users,
  213. </if>
  214. <if test="currentTaskName != null" >
  215. current_task_name,
  216. </if>
  217. <if test="createBy != null" >
  218. create_by,
  219. </if>
  220. <if test="dateCreate != null" >
  221. date_create,
  222. </if>
  223. <if test="updateBy != null" >
  224. update_by,
  225. </if>
  226. <if test="dateUpdate != null" >
  227. date_update,
  228. </if>
  229. <if test="geo != null" >
  230. geo,
  231. </if>
  232. <if test="videos != null" >
  233. videos,
  234. </if>
  235. <if test="pictures != null" >
  236. pictures,
  237. </if>
  238. <if test="deviceId != null" >
  239. device_id,
  240. </if>
  241. <if test="scenesId != null" >
  242. scenes_id,
  243. </if>
  244. <if test="deviceName != null" >
  245. device_name,
  246. </if>
  247. <if test="scenesName != null" >
  248. scenes_name,
  249. </if>
  250. </trim>
  251. <trim prefix="values (" suffix=")" suffixOverrides="," >
  252. <if test="id != null" >
  253. #{id,jdbcType=INTEGER},
  254. </if>
  255. <if test="taskNo != null" >
  256. #{taskNo,jdbcType=VARCHAR},
  257. </if>
  258. <if test="taskDesc != null" >
  259. #{taskDesc,jdbcType=VARCHAR},
  260. </if>
  261. <if test="orderUserId != null" >
  262. #{orderUserId,jdbcType=VARCHAR},
  263. </if>
  264. <if test="sendTime != null" >
  265. #{sendTime,jdbcType=TIMESTAMP},
  266. </if>
  267. <if test="sendBy != null" >
  268. #{sendBy,jdbcType=VARCHAR},
  269. </if>
  270. <if test="planFinishDate != null" >
  271. #{planFinishDate,jdbcType=TIMESTAMP},
  272. </if>
  273. <if test="finishDate != null" >
  274. #{finishDate,jdbcType=TIMESTAMP},
  275. </if>
  276. <if test="dateLimit != null" >
  277. #{dateLimit,jdbcType=VARCHAR},
  278. </if>
  279. <if test="urgency != null" >
  280. #{urgency,jdbcType=VARCHAR},
  281. </if>
  282. <if test="address != null" >
  283. #{address,jdbcType=VARCHAR},
  284. </if>
  285. <if test="contactUser != null" >
  286. #{contactUser,jdbcType=VARCHAR},
  287. </if>
  288. <if test="contactPhone != null" >
  289. #{contactPhone,jdbcType=VARCHAR},
  290. </if>
  291. <if test="orderTime != null" >
  292. #{orderTime,jdbcType=VARCHAR},
  293. </if>
  294. <if test="companyOrgId != null" >
  295. #{companyOrgId,jdbcType=VARCHAR},
  296. </if>
  297. <if test="departmentOrgId != null" >
  298. #{departmentOrgId,jdbcType=VARCHAR},
  299. </if>
  300. <if test="orderStatus != null" >
  301. #{orderStatus,jdbcType=INTEGER},
  302. </if>
  303. <if test="eventType != null" >
  304. #{eventType,jdbcType=INTEGER},
  305. </if>
  306. <if test="orderTypeId != null" >
  307. #{orderTypeId,jdbcType=INTEGER},
  308. </if>
  309. <if test="orderPid != null" >
  310. #{orderPid,jdbcType=VARCHAR},
  311. </if>
  312. <if test="tenantId != null" >
  313. #{tenantId,jdbcType=VARCHAR},
  314. </if>
  315. <if test="processInstanceId != null" >
  316. #{processInstanceId,jdbcType=VARCHAR},
  317. </if>
  318. <if test="processDefId != null" >
  319. #{processDefId,jdbcType=VARCHAR},
  320. </if>
  321. <if test="currentTaskId != null" >
  322. #{currentTaskId,jdbcType=VARCHAR},
  323. </if>
  324. <if test="currentUsers != null" >
  325. #{currentUsers,jdbcType=VARCHAR},
  326. </if>
  327. <if test="currentTaskName != null" >
  328. #{currentTaskName,jdbcType=VARCHAR},
  329. </if>
  330. <if test="createBy != null" >
  331. #{createBy,jdbcType=VARCHAR},
  332. </if>
  333. <if test="dateCreate != null" >
  334. #{dateCreate,jdbcType=TIMESTAMP},
  335. </if>
  336. <if test="updateBy != null" >
  337. #{updateBy,jdbcType=VARCHAR},
  338. </if>
  339. <if test="dateUpdate != null" >
  340. #{dateUpdate,jdbcType=TIMESTAMP},
  341. </if>
  342. <if test="geo != null" >
  343. #{geo,jdbcType=VARCHAR},
  344. </if>
  345. <if test="videos != null" >
  346. #{videos,jdbcType=VARCHAR},
  347. </if>
  348. <if test="pictures != null" >
  349. #{pictures,jdbcType=VARCHAR},
  350. </if>
  351. <if test="deviceId != null" >
  352. #{deviceId,jdbcType=INTEGER},
  353. </if>
  354. <if test="scenesId != null" >
  355. #{scenesId,jdbcType=INTEGER},
  356. </if>
  357. <if test="deviceName != null" >
  358. #{deviceName,jdbcType=VARCHAR},
  359. </if>
  360. <if test="scenesName != null" >
  361. #{scenesName,jdbcType=VARCHAR},
  362. </if>
  363. </trim>
  364. </insert>
  365. <update id="updateByPrimaryKeySelective" parameterType="com.huaxu.order.entity.WorkOrderManage" >
  366. update sc_work_order_manage
  367. <set >
  368. <if test="taskNo != null" >
  369. task_no = #{taskNo,jdbcType=VARCHAR},
  370. </if>
  371. <if test="taskDesc != null" >
  372. task_desc = #{taskDesc,jdbcType=VARCHAR},
  373. </if>
  374. <if test="orderUserId != null" >
  375. order_user_id = #{orderUserId,jdbcType=VARCHAR},
  376. </if>
  377. <if test="sendTime != null" >
  378. send_time = #{sendTime,jdbcType=TIMESTAMP},
  379. </if>
  380. <if test="sendBy != null" >
  381. send_by = #{sendBy,jdbcType=VARCHAR},
  382. </if>
  383. <if test="planFinishDate != null" >
  384. plan_finish_date = #{planFinishDate,jdbcType=TIMESTAMP},
  385. </if>
  386. <if test="finishDate != null" >
  387. finish_date = #{finishDate,jdbcType=TIMESTAMP},
  388. </if>
  389. <if test="dateLimit != null" >
  390. date_limit = #{dateLimit,jdbcType=VARCHAR},
  391. </if>
  392. <if test="urgency != null" >
  393. urgency = #{urgency,jdbcType=VARCHAR},
  394. </if>
  395. <if test="address != null" >
  396. address = #{address,jdbcType=VARCHAR},
  397. </if>
  398. <if test="contactUser != null" >
  399. contact_user = #{contactUser,jdbcType=VARCHAR},
  400. </if>
  401. <if test="contactPhone != null" >
  402. contact_phone = #{contactPhone,jdbcType=VARCHAR},
  403. </if>
  404. <if test="orderTime != null" >
  405. order_time = #{orderTime,jdbcType=VARCHAR},
  406. </if>
  407. <if test="companyOrgId != null" >
  408. company_org_id = #{companyOrgId,jdbcType=VARCHAR},
  409. </if>
  410. <if test="departmentOrgId != null" >
  411. department_org_id = #{departmentOrgId,jdbcType=VARCHAR},
  412. </if>
  413. <if test="orderStatus != null" >
  414. order_status = #{orderStatus,jdbcType=INTEGER},
  415. </if>
  416. <if test="eventType != null" >
  417. event_type = #{eventType,jdbcType=INTEGER},
  418. </if>
  419. <if test="orderTypeId != null" >
  420. order_type_id = #{orderTypeId,jdbcType=INTEGER},
  421. </if>
  422. <if test="orderPid != null" >
  423. order_pid = #{orderPid,jdbcType=VARCHAR},
  424. </if>
  425. <if test="tenantId != null" >
  426. tenant_id = #{tenantId,jdbcType=VARCHAR},
  427. </if>
  428. <if test="processInstanceId != null" >
  429. process_instance_id = #{processInstanceId,jdbcType=VARCHAR},
  430. </if>
  431. <if test="processDefId != null" >
  432. process_def_id = #{processDefId,jdbcType=VARCHAR},
  433. </if>
  434. <if test="currentTaskId != null" >
  435. current_task_id = #{currentTaskId,jdbcType=VARCHAR},
  436. </if>
  437. <if test="currentUsers != null" >
  438. current_users = #{currentUsers,jdbcType=VARCHAR},
  439. </if>
  440. <if test="currentTaskName != null" >
  441. current_task_name = #{currentTaskName,jdbcType=VARCHAR},
  442. </if>
  443. <if test="createBy != null" >
  444. create_by = #{createBy,jdbcType=VARCHAR},
  445. </if>
  446. <if test="dateCreate != null" >
  447. date_create = #{dateCreate,jdbcType=TIMESTAMP},
  448. </if>
  449. <if test="updateBy != null" >
  450. update_by = #{updateBy,jdbcType=VARCHAR},
  451. </if>
  452. <if test="dateUpdate != null" >
  453. date_update = #{dateUpdate,jdbcType=TIMESTAMP},
  454. </if>
  455. <if test="geo != null" >
  456. geo = #{geo,jdbcType=VARCHAR},
  457. </if>
  458. <if test="videos != null" >
  459. videos=#{videos,jdbcType=VARCHAR},
  460. </if>
  461. <if test="pictures != null" >
  462. pictures=#{pictures,jdbcType=VARCHAR},
  463. </if>
  464. <if test="inProcessStatus != null" >
  465. in_process_status=#{inProcessStatus,jdbcType=INTEGER},
  466. </if>
  467. </set>
  468. where id = #{id,jdbcType=INTEGER}
  469. </update>
  470. <update id="updateByPrimaryKey" parameterType="com.huaxu.order.entity.WorkOrderManage" >
  471. update sc_work_order_manage
  472. set task_no = #{taskNo,jdbcType=VARCHAR},
  473. task_desc = #{taskDesc,jdbcType=VARCHAR},
  474. order_user_id = #{orderUserId,jdbcType=VARCHAR},
  475. send_time = #{sendTime,jdbcType=TIMESTAMP},
  476. send_by = #{sendBy,jdbcType=VARCHAR},
  477. plan_finish_date = #{planFinishDate,jdbcType=TIMESTAMP},
  478. finish_date = #{finishDate,jdbcType=TIMESTAMP},
  479. date_limit = #{dateLimit,jdbcType=VARCHAR},
  480. urgency = #{urgency,jdbcType=VARCHAR},
  481. address = #{address,jdbcType=VARCHAR},
  482. contact_user = #{contactUser,jdbcType=VARCHAR},
  483. contact_phone = #{contactPhone,jdbcType=VARCHAR},
  484. order_time = #{orderTime,jdbcType=VARCHAR},
  485. company_org_id = #{companyOrgId,jdbcType=VARCHAR},
  486. department_org_id = #{departmentOrgId,jdbcType=VARCHAR},
  487. order_status = #{orderStatus,jdbcType=INTEGER},
  488. event_type = #{eventType,jdbcType=INTEGER},
  489. order_type_id = #{orderTypeId,jdbcType=INTEGER},
  490. order_pid = #{orderPid,jdbcType=VARCHAR},
  491. tenant_id = #{tenantId,jdbcType=VARCHAR},
  492. process_instance_id = #{processInstanceId,jdbcType=VARCHAR},
  493. process_def_id = #{processDefId,jdbcType=VARCHAR},
  494. current_task_id = #{currentTaskId,jdbcType=VARCHAR},
  495. current_users = #{currentUsers,jdbcType=VARCHAR},
  496. current_task_name = #{currentTaskName,jdbcType=VARCHAR},
  497. create_by = #{createBy,jdbcType=VARCHAR},
  498. date_create = #{dateCreate,jdbcType=TIMESTAMP},
  499. update_by = #{updateBy,jdbcType=VARCHAR},
  500. date_update = #{dateUpdate,jdbcType=TIMESTAMP},
  501. geo = #{geo,jdbcType=VARCHAR},
  502. videos = #{videos,jdbcType=VARCHAR},
  503. pictures = #{pictures,jdbcType=VARCHAR},
  504. in_process_status=#{inProcessStatus,jdbcType=INTEGER}
  505. where id = #{id,jdbcType=INTEGER}
  506. </update>
  507. <select id="selectAppTodo" resultMap="BaseResultMap">
  508. select id,task_no,send_time,address,order_type_id,create_by,update_by,task_desc,order_status,current_task_name,in_process_status
  509. from sc_work_order_manage
  510. where find_in_set(#{userId},current_users) and tenant_id = #{tenantId}
  511. union
  512. select id,plan_id,plan_date,task_area_name,task_type,create_by,update_by,task_content,plan_status,current_task_name,in_process_status
  513. from sc_plan_manage
  514. where find_in_set(#{userId},current_users) and tenant_id = #{tenantId}
  515. order by send_time desc
  516. </select>
  517. <select id="selectAppAll" resultMap="BaseResultMap">
  518. select distinct t1.id,task_no,send_time,address,order_type_id,current_task_name,t1.create_by,t1.update_by,task_desc,order_status,in_process_status
  519. from sc_work_order_manage t1
  520. left join sc_work_flow_log t2 ON t1.id=t2.flow_id and flow_type=2 and find_in_set(#{userId},handle_user_id) and left(flow_result,2)='拒单'
  521. where (find_in_set(#{userId},current_users)
  522. or t1.id in(select flow_id from sc_work_flow_log where flow_type=2 and find_in_set(#{userId},handle_user_id)))
  523. and tenant_id = #{tenantId}
  524. and (t2.id is null or t1.order_user_id=t2.handle_user_id)
  525. union
  526. select id,plan_id,plan_date,task_area_name,task_type,current_task_name,create_by,update_by,task_content,plan_status,in_process_status
  527. from sc_plan_manage
  528. where (find_in_set(#{userId},current_users)
  529. or id in(select flow_id from sc_work_flow_log where flow_type=1 and find_in_set(#{userId},handle_user_id)))
  530. and tenant_id = #{tenantId}
  531. order by send_time desc
  532. </select>
  533. <select id="selectOrderDetail" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  534. select t1.*,t2.flow_detail
  535. from sc_work_order_manage t1
  536. left join sc_work_flow_detail t2 on t1.id=t2.flow_id and t2.flow_type=2
  537. where t1.id = #{id,jdbcType=INTEGER} or t1.order_pid = #{orderPid,jdbcType=INTEGER}
  538. order by t1.order_pid
  539. </select>
  540. <insert id="batchInsertByAlarms" >
  541. insert into sc_work_order_manage( task_no, task_desc, address, order_time, company_org_id, department_org_id, order_status, event_type, order_pid, tenant_id, current_task_name, date_create, date_update, geo,scenes_id,scenes_name,device_id,device_name)
  542. values
  543. <foreach collection="workOrderManages" item="item" index="index" separator=",">
  544. (#{item.taskNo} , #{item.taskDesc}, #{item.address}, #{item.orderTime}, #{item.companyOrgId}, #{item.departmentOrgId}, 0, 3, 0, #{item.tenantId}, '设备报警工单', now(), now(), #{item.geo}, #{item.parentSceneId}, #{item.parentSceneName}, #{item.deviceId}, #{item.deviceName})
  545. </foreach>
  546. </insert>
  547. <delete id="batchDeleteByAlarms" >
  548. delete from sc_work_order_manage
  549. where order_status = 0 and device_id in
  550. <foreach collection="deviceIds" item="item" open="(" close=")" index="index" separator=",">
  551. #{item}
  552. </foreach>
  553. </delete>
  554. <select id="findWorkOrderByDeviceIds" resultType="com.huaxu.order.dto.WorkOrderManageByAlarmDto">
  555. select
  556. id
  557. ,device_id as "deviceId"
  558. , task_desc as "taskDesc"
  559. , order_status as "orderStatus"
  560. from sc_work_order_manage
  561. where (order_status = 0 or order_status = 1)
  562. and device_id in
  563. <foreach collection="deviceIds" item="item" open="(" close=")" index="index" separator=",">
  564. #{item}
  565. </foreach>
  566. </select>
  567. <update id="updateByAlarms">
  568. update sc_work_order_manage set task_desc =#{workOrderManage.taskDesc} ,date_update = now() where id=#{workOrderManage.id}
  569. </update>
  570. <select id="findByNo" resultMap="OrderResultMap">
  571. select
  572. t1.id, t1.task_no, t1.task_desc, t1.order_user_id, t1.send_time, t1.send_by, t1.plan_finish_date, t1.finish_date,
  573. t1.date_limit, t1.urgency, t1.address, t1.contact_user, t1.contact_phone, t1.order_time, t1.company_org_id,
  574. t1.department_org_id, t1.order_status, t1.event_type,case when t1.event_type=1 then '运维上报' when t1.event_type=2 then '用户上报' when t1.event_type=3 then '设备告警' end event_type_name,
  575. t1.order_type_id, t1.order_pid, t1.tenant_id,
  576. t1.process_instance_id, t1.process_def_id, t1.current_task_id, t1.current_users, t1.current_task_name,
  577. t1.create_by, t1.date_create, t1.update_by, t1.date_update, t1.geo,t1.videos,t1.pictures,
  578. t1.device_id, t1.scenes_id, t1.device_name, t1.scenes_name,
  579. t2.flow_detail,t2.create_by detail_create_by,t2.date_create detail_date_create,t2.update_by detail_update_by,t2.date_update detail_date_update
  580. from sc_work_order_manage t1 left join sc_work_flow_detail t2
  581. on t1.id = t2.flow_id and t2.flow_type=2
  582. <where>
  583. <if test="order.taskNo != null and order.taskNo != ''">
  584. and t1.task_no = #{order.taskNo}
  585. </if>
  586. </where>
  587. </select>
  588. <!--分页查询-->
  589. <select id="findPage" resultMap="OrderResultMap">
  590. select
  591. t1.id, t1.task_no, t1.task_desc, t1.order_user_id, t1.send_time, t1.send_by, t1.plan_finish_date, t1.finish_date,
  592. t1.date_limit, t1.urgency, t1.address, t1.contact_user, t1.contact_phone, t1.order_time, t1.company_org_id,
  593. t1.department_org_id, t1.order_status, t1.event_type,case when t1.event_type=1 then '运维上报' when t1.event_type=2 then '用户上报' when t1.event_type=3 then '设备告警' end event_type_name,
  594. t1.order_type_id, t1.order_pid, t1.tenant_id,
  595. t1.process_instance_id, t1.process_def_id, t1.current_task_id, t1.current_users, t1.current_task_name,
  596. t1.create_by, t1.date_create, t1.update_by, t1.date_update, t1.geo,t1.videos,t1.pictures,
  597. t1.device_id, t1.scenes_id, t1.device_name, t1.scenes_name,
  598. t2.flow_detail,t2.create_by detail_create_by,t2.date_create detail_date_create,t2.update_by detail_update_by,t2.date_update detail_date_update
  599. from sc_work_order_manage t1 left join sc_work_flow_detail t2
  600. on t1.id = t2.flow_id and t2.flow_type=2
  601. <where>
  602. <if test="order.tenantId != null and order.tenantId != ''">
  603. and t1.tenant_id = #{order.tenantId}
  604. </if>
  605. <if test="order.taskNo != null and order.taskNo != ''">
  606. and t1.task_no like CONCAT('%',#{order.taskNo},'%')
  607. </if>
  608. <if test="order.orderPid != null">
  609. and t1.order_pid = #{order.orderPid,jdbcType=INTEGER}
  610. </if>
  611. <if test="order.userType!=null and order.userType!=-999 and order.userType!=-9999 and order.programItems != null and order.programItems.size() > 0">
  612. <if test="order.permissonType == 5 or order.permissonType == 2">
  613. and ( t1.department_org_id in
  614. <foreach collection="order.programItems" item="item" open="(" close=")" separator=",">
  615. #{item.orgId}
  616. </foreach>
  617. or
  618. t1.COMPANY_ORG_ID in
  619. <foreach collection="order.programItems" item="item" open="(" close=")" separator=",">
  620. #{item.orgId}
  621. </foreach>
  622. )
  623. </if>
  624. <if test="order.permissonType == 4 or order.permissonType == 3">
  625. and t1.department_org_id in
  626. <foreach collection="order.programItems" item="item" open="(" close=")" separator=",">
  627. #{item.orgId}
  628. </foreach>
  629. </if>
  630. <if test="order.permissonType == 1">
  631. and t1.COMPANY_ORG_ID in
  632. <foreach collection="order.programItems" item="item" open="(" close=")" separator=",">
  633. #{item.orgId}
  634. </foreach>
  635. and (t1.department_org_id is null or t1.department_org_id =0)
  636. </if>
  637. </if>
  638. <if test="order.orderStatus != null">
  639. and t1.order_status = #{order.orderStatus,jdbcType=INTEGER}
  640. </if>
  641. <if test="order.orderStatus == null">
  642. and t1.order_status != 0
  643. </if>
  644. <if test="order.orderTypeId != null">
  645. and t1.order_type_id = #{order.orderTypeId,jdbcType=INTEGER}
  646. </if>
  647. <if test="order.eventType != null">
  648. and t1.event_type = #{order.eventType,jdbcType=INTEGER}
  649. </if>
  650. <if test="order.currentUsers != null">
  651. and FIND_IN_SET(#{order.currentUsers,jdbcType=VARCHAR},t1.current_users)
  652. </if>
  653. <if test="order.startDate != null and order.endDate != null">
  654. <if test="order.orderStatus == 0">
  655. and t1.date_create &gt;= date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%c-%d')
  656. and t1.date_create &lt;= DATE_ADD(date_format(#{order.endDate,jdbcType=VARCHAR},'%Y-%c-%d'),INTERVAL 1 DAY)
  657. order by t1.date_create desc
  658. </if>
  659. <if test="order.orderStatus != 0">
  660. and t1.send_time &gt;= date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%c-%d')
  661. and t1.send_time &lt;= DATE_ADD(date_format(#{order.endDate,jdbcType=VARCHAR},'%Y-%c-%d'),INTERVAL 1 DAY)
  662. order by t1.send_time desc
  663. </if>
  664. </if>
  665. <if test="order.startDate == null and order.endDate == null">
  666. order by t1.send_time desc
  667. </if>
  668. </where>
  669. </select>
  670. <!--删除-->
  671. <delete id="batchDelete">
  672. delete from sc_work_order_manage
  673. where order_status = 0
  674. and id in
  675. <foreach collection="ids" item="item" open="(" close=")" separator=",">
  676. #{item}
  677. </foreach>
  678. </delete>
  679. <!--根据orderPid 查询工单-->
  680. <select id="selectByPId" parameterType="map" resultMap="BaseResultMap">
  681. select
  682. <include refid="Base_Column_List"></include>
  683. from sc_work_order_manage
  684. where order_pid = #{orderPid,jdbcType=VARCHAR}
  685. </select>
  686. <!--查询工单派单时的用户状态-->
  687. <select id="selectOrderUserStatus" parameterType="java.lang.String" resultType="map">
  688. SELECT DISTINCT X, Y,
  689. CASE WHEN S IS NULL THEN '空闲' WHEN S='0' THEN '空闲' ELSE '执行中' END S ,
  690. CASE WHEN offlinetime IS NULL THEN '离线' WHEN offlinetime>10 THEN '离线' WHEN offlinetime &lt;= 10 THEN '在线' END L
  691. FROM
  692. (
  693. select order_user_id,longtitude X, latitude Y, TIMESTAMPDIFF(second,upload_date, now()) offlinetime from sc_work_order_manage t1 left join sc_gps_data t2
  694. on t1.order_user_id = t2.user_id
  695. group by order_user_id,longtitude, latitude,upload_date
  696. ) a
  697. left join
  698. (
  699. select count(*) S,order_user_id from sc_work_order_manage
  700. where order_status = 1
  701. group by order_user_id
  702. ) b
  703. on a.order_user_id=b.order_user_id
  704. where a.order_user_id= #{userId,jdbcType=INTEGER}
  705. </select>
  706. <!--查询任务单派单时的用户状态-->
  707. <select id="selectPlanUserStatus" parameterType="java.lang.String" resultType="map">
  708. SELECT
  709. CASE WHEN S IS NULL THEN '空闲' WHEN S='0' THEN '空闲' ELSE '执行中' END S
  710. FROM (
  711. select count(*) S,user_id from sc_plan_manage
  712. where plan_status = 1
  713. group by user_id
  714. ) a
  715. where a.user_id= #{userId,jdbcType=INTEGER}
  716. </select>
  717. <!--查询维修列表的用户状态-->
  718. <select id="selectMaintainUserStatus" parameterType="java.lang.String" resultType="map">
  719. select distinct X, Y,
  720. case when offlinetime is null then '离线' when offlinetime>10 then '离线' when offlinetime &lt;= 10 THEN '在线' END L
  721. from (
  722. select longtitude X, latitude Y, TIMESTAMPDIFF(second,upload_date, now()) offlinetime from sc_gps_data
  723. where user_id= #{userId,jdbcType=INTEGER}
  724. ) a
  725. </select>
  726. <!--待处理权限-->
  727. <select id="selectPendingPower" resultType="java.lang.Integer" parameterType="map">
  728. select count(1) from sc_work_order_manage
  729. where id = #{id,jdbcType=INTEGER} and FIND_IN_SET(#{currentUsers,jdbcType=VARCHAR},current_users)
  730. </select>
  731. <!--综合展示-查询工单执行情况-->
  732. <select id="selectOrderStatus" resultMap="BaseResultMap" >
  733. select order_status_name,sum(order_count) order_count
  734. from(
  735. select order_status,count(1) order_count ,
  736. case when order_status=0 then '未派单' when order_status=1 or order_status=4 then '处理中' else '已完结' end order_status_name
  737. from sc_work_order_manage t1
  738. where
  739. <if test="statsType == null or statsType == 0">
  740. t1.date_create>=date_format(curdate(), '%Y-%m' )
  741. </if>
  742. <if test="statsType == 1">
  743. t1.date_create>=date_format(curdate(), '%Y-1-1' )
  744. </if>
  745. <if test="statsType == 2">
  746. t1.date_create>=date_sub(date_format(curdate(), '%Y-%m-1' ), interval 11 month)
  747. </if>
  748. <if test="tenantId != null and tenantId != ''">
  749. and t1.tenant_id=#{tenantId}
  750. </if>
  751. <if test="companyOrgId != null and companyOrgId !=''">
  752. and t1.company_org_id=#{companyOrgId}
  753. </if>
  754. <if test="userType!=null and userType!=-999 and userType!=-9999 and programItems != null and programItems.size() > 0">
  755. <if test="permissonType == 5 or permissonType == 2">
  756. and ( t1.department_org_id in
  757. <foreach collection="programItems" item="item" open="(" close=")" separator=",">
  758. #{item.orgId}
  759. </foreach>
  760. or
  761. t1.COMPANY_ORG_ID in
  762. <foreach collection="programItems" item="item" open="(" close=")" separator=",">
  763. #{item.orgId}
  764. </foreach>
  765. )
  766. </if>
  767. <if test="permissonType == 4 or permissonType == 3">
  768. and t1.department_org_id in
  769. <foreach collection="programItems" item="item" open="(" close=")" separator=",">
  770. #{item.orgId}
  771. </foreach>
  772. </if>
  773. <if test="permissonType == 1">
  774. and t1.COMPANY_ORG_ID in
  775. <foreach collection="programItems" item="item" open="(" close=")" separator=",">
  776. #{item.orgId}
  777. </foreach>
  778. and (t1.department_org_id is null or t1.department_org_id =0)
  779. </if>
  780. </if>
  781. group by order_status
  782. )tab1
  783. group by order_status_name
  784. </select>
  785. <!--维修列表-工单情况(未派单,处理中)-->
  786. <select id="selectMaintainOrder" resultMap="BaseResultMap" >
  787. select t1.id ,t1.task_no, t1.address, t1.task_desc, t1.plan_finish_date, t1.date_create, t1.order_user_id, t2.flow_detail,
  788. case when t1.order_status=0 then '未派单' when t1.order_status =1 or t1.order_status=4 then '处理中' end order_status_name,
  789. case when t1.event_type=1 then '运维上报' when t1.event_type=2 then '用户上报' when t1.event_type=3 then '设备告警' end event_type_name,
  790. geo
  791. from sc_work_order_manage t1 left join sc_work_flow_detail t2 on t1.id=t2.flow_id and t2.flow_type=2
  792. <where>
  793. t1.order_status !=2 and t1.order_status !=3
  794. <if test="order.tenantId != null and order.tenantId != ''">
  795. and t1.tenant_id = #{order.tenantId}
  796. </if>
  797. <if test="order.userType!=null and order.userType!=-999 and order.userType!=-9999 and order.programItems != null and order.programItems.size() > 0">
  798. <if test="order.permissonType == 5 or order.permissonType == 2">
  799. and ( t1.department_org_id in
  800. <foreach collection="order.programItems" item="item" open="(" close=")" separator=",">
  801. #{item.orgId}
  802. </foreach>
  803. or
  804. t1.COMPANY_ORG_ID in
  805. <foreach collection="order.programItems" item="item" open="(" close=")" separator=",">
  806. #{item.orgId}
  807. </foreach>
  808. )
  809. </if>
  810. <if test="order.permissonType == 4 or order.permissonType == 3">
  811. and t1.department_org_id in
  812. <foreach collection="order.programItems" item="item" open="(" close=")" separator=",">
  813. #{item.orgId}
  814. </foreach>
  815. </if>
  816. <if test="order.permissonType == 1">
  817. and t1.COMPANY_ORG_ID in
  818. <foreach collection="order.programItems" item="item" open="(" close=")" separator=",">
  819. #{item.orgId}
  820. </foreach>
  821. and (t1.department_org_id is null or t1.department_org_id =0)
  822. </if>
  823. </if>
  824. </where>
  825. order by t1.date_create desc
  826. </select>
  827. <!--App事件列表-->
  828. <select id="findEventListPage" resultMap="OrderResultMap">
  829. select
  830. t1.id, t1.task_no, t1.task_desc, t1.order_user_id, t1.send_time, t1.send_by, t1.plan_finish_date, t1.finish_date,
  831. t1.date_limit, t1.urgency, t1.address, t1.contact_user, t1.contact_phone, t1.order_time, t1.company_org_id,
  832. t1.department_org_id, t1.order_status, t1.event_type,case when t1.event_type=1 then '运维上报' when t1.event_type=2 then '用户上报' when t1.event_type=3 then '设备告警' end event_type_name,
  833. t1.order_type_id, t1.order_pid, t1.tenant_id,
  834. t1.process_instance_id, t1.process_def_id, t1.current_task_id, t1.current_users, t1.current_task_name,
  835. t1.create_by, t1.date_create, t1.update_by, t1.date_update, t1.geo,t1.videos,t1.pictures,
  836. t1.device_id, t1.scenes_id, t1.device_name, t1.scenes_name,
  837. t2.flow_detail,t2.create_by detail_create_by,t2.date_create detail_date_create,t2.update_by detail_update_by,t2.date_update detail_date_update
  838. from sc_work_order_manage t1 left join sc_work_flow_detail t2
  839. on t1.id = t2.flow_id and t2.flow_type=2
  840. <where>
  841. t1.event_type = 1 and t1.create_by = #{order.createBy}
  842. <if test="order.tenantId != null and order.tenantId != ''">
  843. and t1.tenant_id = #{order.tenantId}
  844. </if>
  845. <if test="order.departmentOrgId != null and order.departmentOrgId != ''">
  846. and t1.department_org_id = #{order.departmentOrgId}
  847. </if>
  848. order by t1.date_create desc
  849. </where>
  850. </select>
  851. <!--工单完成情况统计-->
  852. <select id="workOrderStatistics" resultType="map">
  853. select total '工单总数', finished '工单完成数', finished/total '工单完成率' from
  854. (
  855. select count(1) total,sum(case when order_status=2 then 1 when order_status =3 then 1 else 0 end) finished
  856. from sc_work_order_manage t1
  857. <where>
  858. t1.order_status != 0
  859. and t1.date_create &gt;= date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%c-%d')
  860. and t1.date_create &lt; date_format(#{order.endDate,jdbcType=VARCHAR},'%Y-%c-%d')
  861. <if test="order.tenantId != null and order.tenantId != ''">
  862. and t1.tenant_id = #{order.tenantId}
  863. </if>
  864. <if test="order.userType!=null and order.userType!=-999 and order.userType!=-9999 and order.programItems != null and order.programItems.size() > 0">
  865. <if test="order.permissonType == 5 or order.permissonType == 2">
  866. and ( t1.department_org_id in
  867. <foreach collection="order.programItems" item="item" open="(" close=")" separator=",">
  868. #{item.orgId}
  869. </foreach>
  870. or
  871. t1.COMPANY_ORG_ID in
  872. <foreach collection="order.programItems" item="item" open="(" close=")" separator=",">
  873. #{item.orgId}
  874. </foreach>
  875. )
  876. </if>
  877. <if test="order.permissonType == 4 or order.permissonType == 3">
  878. and t1.department_org_id in
  879. <foreach collection="order.programItems" item="item" open="(" close=")" separator=",">
  880. #{item.orgId}
  881. </foreach>
  882. </if>
  883. <if test="order.permissonType == 1">
  884. and t1.COMPANY_ORG_ID in
  885. <foreach collection="order.programItems" item="item" open="(" close=")" separator=",">
  886. #{item.orgId}
  887. </foreach>
  888. and (t1.department_org_id is null or t1.department_org_id =0)
  889. </if>
  890. </if>
  891. </where>
  892. ) a
  893. </select>
  894. </mapper>