KwtWaybillOrderMapper.xml 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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.sckw.transport.dao.KwtWaybillOrderMapper">
  4. <resultMap id="BaseResultMap" type="com.sckw.transport.model.KwtWaybillOrder">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="ent_id" jdbcType="BIGINT" property="entId" />
  7. <result column="l_order_id" jdbcType="BIGINT" property="lOrderId" />
  8. <result column="w_order_no" jdbcType="VARCHAR" property="wOrderNo" />
  9. <result column="truck_no" jdbcType="VARCHAR" property="truckNo" />
  10. <result column="type" jdbcType="VARCHAR" property="type" />
  11. <result column="driver_id" jdbcType="BIGINT" property="driverId" />
  12. <result column="entrust_amount" jdbcType="DECIMAL" property="entrustAmount" />
  13. <result column="unload_amount" jdbcType="DECIMAL" property="unloadAmount" />
  14. <result column="load_amount" jdbcType="DECIMAL" property="loadAmount" />
  15. <result column="deficit_amount" jdbcType="DECIMAL" property="deficitAmount" />
  16. <result column="remark" jdbcType="VARCHAR" property="remark" />
  17. <result column="status" jdbcType="INTEGER" property="status" />
  18. <result column="create_by" jdbcType="BIGINT" property="createBy" />
  19. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  20. <result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
  21. <result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
  22. <result column="update_by" jdbcType="BIGINT" property="updateBy" />
  23. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  24. <result column="del_flag" jdbcType="INTEGER" property="delFlag" />
  25. </resultMap>
  26. <sql id="Base_Column_List">
  27. id, ent_id, l_order_id, w_order_no, truck_no, driver_id, entrust_amount, unload_amount,
  28. load_amount, deficit_amount, remark, `status`, create_by, create_time, update_by,
  29. update_time, del_flag,start_time,end_time
  30. </sql>
  31. <select id="selectWaybillOrderCarList" resultType="com.sckw.transport.model.dto.OrderCarDTO">
  32. SELECT a.id as wOrderId,
  33. a.w_order_no as wOrderNo,
  34. a.l_order_id as lOrderId,
  35. b.l_order_no as lOrderNo,
  36. b.t_order_id as tOrderId,
  37. b.t_order_no as tOrderNo
  38. FROM kwt_waybill_order a
  39. LEFT JOIN kwt_logistics_order b ON a.l_order_id = b.id
  40. WHERE a.del_flag = '0'
  41. and b.del_flag = '0'
  42. and b.t_order_id = #{id,jdbcType=VARCHAR}
  43. limit #{page},#{pageSize}
  44. </select>
  45. <select id="selectWaybillOrderCarCount" resultType="java.lang.Long">
  46. SELECT count(a.id)
  47. FROM kwt_waybill_order a
  48. LEFT JOIN kwt_logistics_order b ON a.l_order_id = b.id
  49. WHERE a.del_flag = '0'
  50. and b.del_flag = '0'
  51. and b.t_order_id = #{id,jdbcType=VARCHAR}
  52. </select>
  53. </mapper>