| <?xml version="1.0" encoding="UTF-8" ?> | 
| <!DOCTYPE mapper | 
|         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | 
|         "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 
|   | 
| <mapper namespace="com.ld.igds.inout.mapper.InoutSettleServiceMapper"> | 
|   | 
|     <!-- 基本返回信息 --> | 
|     <sql id="BASE_COLUMN"> | 
|         S.ID_ as id, | 
|         S.COMPANY_ID_ as companyId, | 
|         S.TYPE_ as type, | 
|         R.USER_NAME_ as userName, | 
|         R.PLATE_NUM_ as plateNum, | 
|         R.FOOD_VARIETY_ as foodVariety, | 
|         R.COMPLETE_TIME_ as completeTime, | 
|         R.DEPT_ID_ as deptId, | 
|         R.DEPOT_ID_ as depotId, | 
|         R.FOOD_LEVEL_ as foodLevel, | 
|         S.CUSTOMER_ID_ as customerId, | 
|         S.CUSTOMER_NAME_ as customerName, | 
|         S.PAY_PRICE_ as payPrice, | 
|         S.PAY_SUM_ as paySum, | 
|         S.PAY_TYPE_ as payType, | 
|         S.BANK_ as bank, | 
|         S.BANK_NUM_ as bankNum, | 
|         S.PAY_USER_ as payUser, | 
|         S.PAY_TIME_ as payTime, | 
|         S.FULL_WEIGHT_ as fullWeight, | 
|         S.EMPTY_WEIGHT_ as emptyWeight, | 
|         S.NET_WEIGHT_ as netWeight, | 
|         S.DE_SUM_ as deSum, | 
|         S.SETTLE_WEIGHT_ as settleWeight, | 
|         S.OTHER_SUN_ as otherSum, | 
|         S.REMARKS_ as remarks | 
|     </sql> | 
|   | 
|     <select id="pageSettleData" resultType="com.ld.igds.models.InoutSettle" | 
|             parameterType="com.ld.igds.inout.dto.InoutParam"> | 
|         select | 
|         <include refid="BASE_COLUMN"/> | 
|         from | 
|         D_INOUT_SETTLE S | 
|         LEFT JOIN D_INOUT_RECORD R | 
|         ON S.ID_ = R.ID_ | 
|         <where> | 
|             <if test="param.companyId != null and param.companyId != '' ">AND S.COMPANY_ID_ = #{param.companyId}</if> | 
|             <if test="param.type != null and param.type != '' ">AND S.TYPE_ = #{param.type}</if> | 
|             <if test="param.plateNum != null and param.plateNum != '' ">AND R.PLATE_NUM_ = #{param.plateNum}</if> | 
|             <if test="param.id != null and param.id != '' ">AND S.ID_ like #{param.id}</if> | 
|             <if test="param.end != null">AND | 
|                 S.PAY_TIME_ <![CDATA[ < ]]>#{param.end,jdbcType=TIMESTAMP} | 
|             </if> | 
|             <if test="param.start != null">AND | 
|                 S.PAY_TIME_ <![CDATA[ > ]]>#{param.start,jdbcType=TIMESTAMP} | 
|             </if> | 
|   | 
|         </where> | 
|     </select> | 
|   | 
| </mapper> |