admin
2024-01-08 22f70cc8b2ba603e82bba058db320dced48f9470
提交 | 用户 | 时间
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.productionOrderRecords.mapper.ProductionOrderRecordsMapper">
4
5     <!-- 通用查询映射结果 -->
6     <resultMap id="BaseResultMap" type="cn.stylefeng.guns.modular.om.productionOrderRecords.entity.ProductionOrderRecords">
7         <id column="id" property="id" />
8         <result column="product_no" property="productNo" />
9         <result column="work_order_no" property="workOrderNo" />
10         <result column="drawing_no" property="drawingNo" />
11         <result column="material_code" property="materialCode" />
12         <result column="material_name" property="materialName" />
13         <result column="location_code" property="locationCode" />
14         <result column="location_name" property="locationName" />
15         <result column="location_type" property="locationType" />
16         <result column="product_qty" property="productQty" />
17         <result column="start_time" property="startTime" />
18         <result column="end_time" property="endTime" />
19         <result column="whether_pass" property="whetherPass" />
20         <result column="not_pass_reason" property="notPassReason" />
21         <result column="operation_user" property="operationUser" />
22         <result column="spare_field_1" property="spareField1" />
23         <result column="spare_field_2" property="spareField2" />
24         <result column="spare_field_3" property="spareField3" />
25         <result column="spare_field_4" property="spareField4" />
26         <result column="remarks" property="remarks" />
27         <result column="serial_number" property="serialNumber" />
28     </resultMap>
29
30     <!-- 通用查询结果列 -->
31     <sql id="Base_Column_List">
32         id AS "id", product_no AS "productNo", work_order_no AS "workOrderNo", drawing_no AS "drawingNo", material_code AS "materialCode", material_name AS "materialName", location_code AS "locationCode", location_name AS "locationName", location_type AS "locationType", product_qty AS "productQty", start_time AS "startTime", end_time AS "endTime", whether_pass AS "whetherPass", not_pass_reason AS "notPassReason", operation_user AS "operationUser", spare_field_1 AS "spareField1", spare_field_2 AS "spareField2", spare_field_3 AS "spareField3", spare_field_4 AS "spareField4", remarks AS "remarks", serial_number AS "serialNumber"
33     </sql>
34
35
36     <select id="customList" resultType="cn.stylefeng.guns.modular.om.productionOrderRecords.model.result.ProductionOrderRecordsResult" parameterType="cn.stylefeng.guns.modular.om.productionOrderRecords.model.params.ProductionOrderRecordsParam">
37         select
38         <include refid="Base_Column_List"/>
39         from om_production_order_records where 1 = 1
40     </select>
41
42     <select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.om.productionOrderRecords.model.params.ProductionOrderRecordsParam">
43         select
44         <include refid="Base_Column_List"/>
45         from om_production_order_records where 1 = 1
46     </select>
47
48     <select id="customPageList" resultType="cn.stylefeng.guns.modular.om.productionOrderRecords.model.result.ProductionOrderRecordsResult" parameterType="cn.stylefeng.guns.modular.om.productionOrderRecords.model.params.ProductionOrderRecordsParam">
49         select
50         <include refid="Base_Column_List"/>
51         from om_production_order_records where 1 = 1
52         <if test="paramCondition.productNo != null and paramCondition.productNo != ''">
53             and product_no like CONCAT('%',#{paramCondition.productNo},'%')
54         </if>
55         <if test="paramCondition.workOrderNo != null and paramCondition.workOrderNo != ''">
56             and work_order_no like CONCAT('%',#{paramCondition.workOrderNo},'%')
57         </if>
58         <if test="paramCondition.materialCode != null and paramCondition.materialCode != ''">
59             and material_code like CONCAT('%',#{paramCondition.materialCode},'%')
60         </if>
61         <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''">
62             and location_code like CONCAT('%',#{paramCondition.locationCode},'%')
63         </if>
64     </select>
65
66     <select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.om.productionOrderRecords.model.params.ProductionOrderRecordsParam">
67         select
68         <include refid="Base_Column_List"/>
69         from om_production_order_records where 1 = 1
70     </select>
71
72 </mapper>