cl
2024-01-19 e0fac38b26845f25de479783e0c76cf12a5311e0
提交 | 用户 | 时间
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.bs.batchCodeStorage.mapper.BatchCodeStorageMapper">
4
5     <!-- 通用查询映射结果 -->
6     <resultMap id="BaseResultMap" type="cn.stylefeng.guns.modular.bs.batchCodeStorage.entity.BatchCodeStorage">
7         <id column="id" property="id" />
8         <result column="material_code" property="materialCode" />
9         <result column="material_name" property="materialName" />
10         <result column="batch_code" property="batchCode" />
11         <result column="work_order_no" property="workOrderNo" />
12         <result column="production_line" property="productionLine" />
13         <result column="location_code" property="locationCode" />
14         <result column="is_scan" property="isScan" />
15         <result column="quantity" property="quantity" />
16         <result column="spare_field_1" property="spareField1" />
17         <result column="spare_field_2" property="spareField2" />
18         <result column="remarks" property="remarks" />
19         <result column="create_user" property="createUser" />
20         <result column="create_time" property="createTime" />
21         <result column="erp_spec" property="erpSpec" />
22     </resultMap>
23
24     <!-- 通用查询结果列 -->
25     <sql id="Base_Column_List">
26         id AS "id", material_code AS "materialCode", material_name AS "materialName", batch_code AS "batchCode", work_order_no AS "workOrderNo", production_line AS "productionLine", location_code AS "locationCode", is_scan AS "isScan", quantity AS "quantity", spare_field_1 AS "spareField1", spare_field_2 AS "spareField2", remarks AS "remarks", create_user AS "createUser", create_time AS "createTime", erp_spec AS "erpSpec"
27     </sql>
28
29
30     <select id="customList" resultType="cn.stylefeng.guns.modular.bs.batchCodeStorage.model.result.BatchCodeStorageResult" parameterType="cn.stylefeng.guns.modular.bs.batchCodeStorage.model.params.BatchCodeStorageParam">
31         select
32         <include refid="Base_Column_List"/>
33         from bs_batch_code_storage where 1 = 1
34     </select>
35
36     <select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.bs.batchCodeStorage.model.params.BatchCodeStorageParam">
37         select
38         <include refid="Base_Column_List"/>
39         from bs_batch_code_storage where 1 = 1
40     </select>
41
42     <select id="customPageList" resultType="cn.stylefeng.guns.modular.bs.batchCodeStorage.model.result.BatchCodeStorageResult" parameterType="cn.stylefeng.guns.modular.bs.batchCodeStorage.model.params.BatchCodeStorageParam">
43         select
44         <include refid="Base_Column_List"/>
45         from bs_batch_code_storage where 1 = 1
46
47         <if test="paramCondition.materialCode != null and paramCondition.materialCode != ''">
48             and material_code like CONCAT('%',#{paramCondition.materialCode},'%')
49         </if>
50         <if test="paramCondition.materialName != null and paramCondition.materialName != ''">
51             and material_name like CONCAT('%',#{paramCondition.materialName},'%')
52         </if>
53         <if test="paramCondition.workOrderNo != null and paramCondition.workOrderNo != ''">
54             and work_order_no like CONCAT('%',#{paramCondition.workOrderNo},'%')
55         </if>
56         <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''">
57             and production_line like CONCAT('%',#{paramCondition.locationCode},'%')
58         </if>
59     </select>
60
61     <select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.bs.batchCodeStorage.model.params.BatchCodeStorageParam">
62         select
63         <include refid="Base_Column_List"/>
64         from bs_batch_code_storage where 1 = 1
65     </select>
66
67 </mapper>