Merge remote-tracking branch 'origin/dev_drug' into dev_drug
						commit
						4977273cd0
					
				| @ -1,68 +1,79 @@ | ||||
| <?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.glxp.api.dao.collect.RelCodeDetailMapper"> | ||||
|   <resultMap id="BaseResultMap" type="com.glxp.api.entity.collect.RelCodeDetail"> | ||||
|     <!--@mbg.generated--> | ||||
|     <!--@Table udi_wms_ywj.rel_code_detail--> | ||||
|     <id column="id" jdbcType="INTEGER" property="id" /> | ||||
|     <result column="curCode" jdbcType="VARCHAR" property="curCode" /> | ||||
|     <result column="packLayer" jdbcType="TINYINT" property="packLayer" /> | ||||
|     <result column="parentCode" jdbcType="VARCHAR" property="parentCode" /> | ||||
|     <result column="flag" jdbcType="TINYINT" property="flag" /> | ||||
|     <result column="batchIdFk" jdbcType="INTEGER" property="batchIdFk" /> | ||||
|   </resultMap> | ||||
|   <sql id="Base_Column_List"> | ||||
|     <!--@mbg.generated--> | ||||
|     id, curCode, packLayer, parentCode, flag, batchIdFk | ||||
|   </sql> | ||||
|     <resultMap id="BaseResultMap" type="com.glxp.api.entity.collect.RelCodeDetail"> | ||||
|         <!--@mbg.generated--> | ||||
|         <!--@Table udi_wms_ywj.rel_code_detail--> | ||||
|         <id column="id" jdbcType="INTEGER" property="id"/> | ||||
|         <result column="curCode" jdbcType="VARCHAR" property="curCode"/> | ||||
|         <result column="packLayer" jdbcType="TINYINT" property="packLayer"/> | ||||
|         <result column="parentCode" jdbcType="VARCHAR" property="parentCode"/> | ||||
|         <result column="flag" jdbcType="TINYINT" property="flag"/> | ||||
|         <result column="batchIdFk" jdbcType="INTEGER" property="batchIdFk"/> | ||||
|     </resultMap> | ||||
|     <sql id="Base_Column_List"> | ||||
|         <!--@mbg.generated--> | ||||
|         id, | ||||
|         curCode, | ||||
|         packLayer, | ||||
|         parentCode, | ||||
|         flag, | ||||
|         batchIdFk | ||||
|     </sql> | ||||
| 
 | ||||
|   <select id="filterList" parameterType="com.glxp.api.req.collect.RelCodeDetailRequest" resultType="com.glxp.api.res.collect.RelCodeDetailResponse"> | ||||
|     select | ||||
|       rcd.id, | ||||
|       rcd.curCode, | ||||
|       rcd.packLayer, | ||||
|       rcd.parentCode, | ||||
|       rcd.flag, | ||||
|       rcd.batchIdFk, | ||||
|       rcb.productCode, | ||||
|       rcb.subTypeNo, | ||||
|       rcb.cascadeRatio, | ||||
|       rcb.packageSpec, | ||||
|       rcb.comment, | ||||
|       rcb.batchNo, | ||||
|       rcb.madeDate, | ||||
|       rcb.validateDate, | ||||
|       rcb.workShop, | ||||
|       rcb.lineName, | ||||
|       rcb.lineManager, | ||||
|       rcb.createTime, | ||||
|       rcb.createUser, | ||||
|       rcb.updateTime, | ||||
|       rcb.updateUser | ||||
|     from rel_code_detail rcd | ||||
|     left join rel_code_batch rcb on rcb.id = rcd.batchIdFk | ||||
|     <where> | ||||
|       <if test="productCode != '' and productCode != null"> | ||||
|         AND rcb.productCode LIKE concat('%', #{productCode}, '%') | ||||
|       </if> | ||||
|       <if test=" batchIdFk != null"> | ||||
|         AND rcb.id = #{batchIdFk} | ||||
|       </if> | ||||
|       <if test="batchNo != null and batchNo != ''"> | ||||
|         AND rcb.batchNo = #{batchNo} | ||||
|       </if> | ||||
|       <if test="keyWords != '' and keyWords != null"> | ||||
|         and ( | ||||
|         rcb.productCode LIKE concat('%', #{keyWords}, '%') | ||||
|         or rcb.subTypeNo LIKE concat('%', #{keyWords}, '%') | ||||
|         or rcb.packageSpec LIKE concat('%', #{keyWords}, '%')) | ||||
|       </if> | ||||
|       <if test="lineName != '' and lineName != null"> | ||||
|         AND rcb.lineName LIKE concat('%', #{lineName}, '%') | ||||
|       </if> | ||||
|       <if test="lineManager != '' and lineManager != null"> | ||||
|         AND rcb.lineManager LIKE concat('%', #{lineManager}, '%') | ||||
|       </if> | ||||
|     </where> | ||||
|   </select> | ||||
|     <select id="filterList" parameterType="com.glxp.api.req.collect.RelCodeDetailRequest" | ||||
|             resultType="com.glxp.api.res.collect.RelCodeDetailResponse"> | ||||
|         select rcd.id, | ||||
|                rcd.curCode, | ||||
|                rcd.packLayer, | ||||
|                rcd.parentCode, | ||||
|                rcd.flag, | ||||
|                rcd.batchIdFk, | ||||
|                rcb.productCode, | ||||
|                rcb.subTypeNo, | ||||
|                rcb.cascadeRatio, | ||||
|                rcb.packageSpec, | ||||
|                rcb.comment, | ||||
|                rcb.batchNo, | ||||
|                rcb.madeDate, | ||||
|                rcb.validateDate, | ||||
|                rcb.workShop, | ||||
|                rcb.lineName, | ||||
|                rcb.lineManager, | ||||
|                rcb.createTime, | ||||
|                rcb.createUser, | ||||
|                rcb.updateTime, | ||||
|                rcb.updateUser | ||||
|         from rel_code_detail rcd | ||||
|                  left join rel_code_batch rcb on rcb.id = rcd.batchIdFk | ||||
|         <where> | ||||
|             <if test="productCode != '' and productCode != null"> | ||||
|                 AND rcb.productCode LIKE concat('%', #{productCode}, '%') | ||||
|             </if> | ||||
|             <if test="batchIdFk != null"> | ||||
|                 AND rcb.id = #{batchIdFk} | ||||
|             </if> | ||||
|             <if test="curCode != null"> | ||||
|                 AND rcd.curCode = #{curCode} | ||||
|             </if> | ||||
|             <if test="parentCode != null"> | ||||
|                 AND rcd.parentCode = #{parentCode} | ||||
|             </if> | ||||
|             <if test="batchNo != null and batchNo != ''"> | ||||
|                 AND rcb.batchNo = #{batchNo} | ||||
|             </if> | ||||
|             <if test="keyWords != '' and keyWords != null"> | ||||
|                 and ( | ||||
|                         rcb.productCode LIKE concat('%', #{keyWords}, '%') | ||||
|                         or rcb.subTypeNo LIKE concat('%', #{keyWords}, '%') | ||||
|                         or rcb.packageSpec LIKE concat('%', #{keyWords}, '%')) | ||||
|             </if> | ||||
|             <if test="lineName != '' and lineName != null"> | ||||
|                 AND rcb.lineName LIKE concat('%', #{lineName}, '%') | ||||
|             </if> | ||||
|             <if test="lineManager != '' and lineManager != null"> | ||||
|                 AND rcb.lineManager LIKE concat('%', #{lineManager}, '%') | ||||
|             </if> | ||||
|         </where> | ||||
|     </select> | ||||
| </mapper> | ||||
|  | ||||
					Loading…
					
					
				
		Reference in New Issue