懒羊羊
2024-01-11 be26d5065b4a07123638c220c0792e9250a458e6
提交 | 用户 | 时间
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" />
be26d5 11         <result column="status" property="status" />
71e81e 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" />
be26d5 23         <result column="quantity" property="quantity" />
24         <result column="unit" property="unit" />
25         <result column="batch" property="batch" />
26         <result column="residue_quantity" property="residueQuantity" />
27
71e81e 28
29     </resultMap>
30
31     <!-- 通用查询结果列 -->
32     <sql id="Base_Column_List">
be26d5 33         residue_quantity AS "residueQuantity", quantity AS "quantity", unit AS "unit", batch AS "batch", 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", status AS "status", 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"
71e81e 34     </sql>
35
36
37     <select id="customList" resultType="cn.stylefeng.guns.modular.om.productionOrderBatchInfo.model.result.ProductionOrderBatchInfoResult" parameterType="cn.stylefeng.guns.modular.om.productionOrderBatchInfo.model.params.ProductionOrderBatchInfoParam">
38         select
39         <include refid="Base_Column_List"/>
40         from om_production_order_batch_info where 1 = 1
4a2c67 41         <if test="paramCondition.workOrderNo != null and paramCondition.workOrderNo != ''">
A 42             and work_order_no like CONCAT('%',#{paramCondition.workOrderNo},'%')
43         </if>
44         <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''">
45             and location_code = #{paramCondition.locationCode}
46         </if>
71e81e 47     </select>
48
49     <select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.om.productionOrderBatchInfo.model.params.ProductionOrderBatchInfoParam">
50         select
51         <include refid="Base_Column_List"/>
52         from om_production_order_batch_info where 1 = 1
53     </select>
54
55     <select id="customPageList" resultType="cn.stylefeng.guns.modular.om.productionOrderBatchInfo.model.result.ProductionOrderBatchInfoResult" parameterType="cn.stylefeng.guns.modular.om.productionOrderBatchInfo.model.params.ProductionOrderBatchInfoParam">
56         select
57         <include refid="Base_Column_List"/>
58         from om_production_order_batch_info where 1 = 1
59         <if test="paramCondition.workOrderNo != null and paramCondition.workOrderNo != ''">
60             and work_order_no like CONCAT('%',#{paramCondition.workOrderNo},'%')
61         </if>
62         <if test="paramCondition.productionLine != null and paramCondition.productionLine != ''">
63             and production_line like CONCAT('%',#{paramCondition.productionLine},'%')
64         </if>
65         <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''">
66             and location_code like CONCAT('%',#{paramCondition.locationCode},'%')
67         </if>
68         <if test="paramCondition.loadingCode != null and paramCondition.loadingCode != ''">
69             and loading_code like CONCAT('%',#{paramCondition.loadingCode},'%')
70         </if>
be26d5 71         <if test="paramCondition.status != null and paramCondition.status != ''">
72             and status like CONCAT('%',#{paramCondition.status},'%')
73         </if>
74         <if test="paramCondition.batch != null and paramCondition.batch != ''">
75             and batch like CONCAT('%',#{paramCondition.batch},'%')
76         </if>
71e81e 77     </select>
78
79     <select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.om.productionOrderBatchInfo.model.params.ProductionOrderBatchInfoParam">
80         select
81         <include refid="Base_Column_List"/>
82         from om_production_order_batch_info where 1 = 1
83     </select>
84
85 </mapper>