admin
2024-01-11 4a2c6796c89f6889bbdd3e9630fee40a93c6473e
提交 | 用户 | 时间
71e81e 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="cn.stylefeng.guns.modular.om.productionOrderBatchInfo.mapper.ProductionOrderBatchInfoMapper">
4
5     <!-- 通用查询映射结果 -->
6     <resultMap id="BaseResultMap" type="cn.stylefeng.guns.modular.om.productionOrderBatchInfo.entity.ProductionOrderBatchInfo">
7         <id column="id" property="id" />
8         <result column="work_order_no" property="workOrderNo" />
9         <result column="production_line" property="productionLine" />
10         <result column="location_code" property="locationCode" />
11         <result column="state" property="state" />
12         <result column="spare_field_1" property="spareField1" />
13         <result column="spare_field_2" property="spareField2" />
14         <result column="material_code" property="materialCode" />
15         <result column="bar_code" property="barCode" />
16
17         <result column="create_user" property="createUser" />
18         <result column="update_user" property="updateUser" />
19         <result column="create_time" property="createTime" />
20         <result column="update_time" property="updateTime" />
21
22         <result column="loading_code" property="loadingCode" />
23
24     </resultMap>
25
26     <!-- 通用查询结果列 -->
27     <sql id="Base_Column_List">
28         loading_code AS "loadingCode", bar_code AS "barCode", material_code AS "materialCode", id AS "id", work_order_no AS "workOrderNo", production_line AS "productionLine", location_code AS "locationCode", state AS "state", spare_field_1 AS "spareField1", spare_field_2 AS "spareField2", create_user AS "createUser", update_user AS "updateUser", create_time AS "createTime", update_time AS "updateTime"
29     </sql>
30
31
32     <select id="customList" resultType="cn.stylefeng.guns.modular.om.productionOrderBatchInfo.model.result.ProductionOrderBatchInfoResult" parameterType="cn.stylefeng.guns.modular.om.productionOrderBatchInfo.model.params.ProductionOrderBatchInfoParam">
33         select
34         <include refid="Base_Column_List"/>
35         from om_production_order_batch_info where 1 = 1
4a2c67 36         <if test="paramCondition.workOrderNo != null and paramCondition.workOrderNo != ''">
A 37             and work_order_no like CONCAT('%',#{paramCondition.workOrderNo},'%')
38         </if>
39         <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''">
40             and location_code = #{paramCondition.locationCode}
41         </if>
71e81e 42     </select>
43
44     <select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.om.productionOrderBatchInfo.model.params.ProductionOrderBatchInfoParam">
45         select
46         <include refid="Base_Column_List"/>
47         from om_production_order_batch_info where 1 = 1
48     </select>
49
50     <select id="customPageList" resultType="cn.stylefeng.guns.modular.om.productionOrderBatchInfo.model.result.ProductionOrderBatchInfoResult" parameterType="cn.stylefeng.guns.modular.om.productionOrderBatchInfo.model.params.ProductionOrderBatchInfoParam">
51         select
52         <include refid="Base_Column_List"/>
53         from om_production_order_batch_info where 1 = 1
54         <if test="paramCondition.workOrderNo != null and paramCondition.workOrderNo != ''">
55             and work_order_no like CONCAT('%',#{paramCondition.workOrderNo},'%')
56         </if>
57         <if test="paramCondition.productionLine != null and paramCondition.productionLine != ''">
58             and production_line like CONCAT('%',#{paramCondition.productionLine},'%')
59         </if>
60         <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''">
61             and location_code like CONCAT('%',#{paramCondition.locationCode},'%')
62         </if>
63         <if test="paramCondition.loadingCode != null and paramCondition.loadingCode != ''">
64             and loading_code like CONCAT('%',#{paramCondition.loadingCode},'%')
65         </if>
a55627 66
71e81e 67     </select>
68
69     <select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.om.productionOrderBatchInfo.model.params.ProductionOrderBatchInfoParam">
70         select
71         <include refid="Base_Column_List"/>
72         from om_production_order_batch_info where 1 = 1
73     </select>
74
75 </mapper>