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