admin
2024-01-09 66b57b7f650d7f61ac2859a2cbe652cd4becb523
提交 | 用户 | 时间
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
36     </select>
37
38     <select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.om.productionOrderBatchInfo.model.params.ProductionOrderBatchInfoParam">
39         select
40         <include refid="Base_Column_List"/>
41         from om_production_order_batch_info where 1 = 1
42     </select>
43
44     <select id="customPageList" resultType="cn.stylefeng.guns.modular.om.productionOrderBatchInfo.model.result.ProductionOrderBatchInfoResult" 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         <if test="paramCondition.workOrderNo != null and paramCondition.workOrderNo != ''">
49             and work_order_no like CONCAT('%',#{paramCondition.workOrderNo},'%')
50         </if>
51         <if test="paramCondition.productionLine != null and paramCondition.productionLine != ''">
52             and production_line like CONCAT('%',#{paramCondition.productionLine},'%')
53         </if>
54         <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''">
55             and location_code like CONCAT('%',#{paramCondition.locationCode},'%')
56         </if>
57         <if test="paramCondition.loadingCode != null and paramCondition.loadingCode != ''">
58             and loading_code like CONCAT('%',#{paramCondition.loadingCode},'%')
59         </if>
60     </select>
61
62     <select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.om.productionOrderBatchInfo.model.params.ProductionOrderBatchInfoParam">
63         select
64         <include refid="Base_Column_List"/>
65         from om_production_order_batch_info where 1 = 1
66     </select>
67
68 </mapper>