提交 | 用户 | 时间
|
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.cm.paramCollection.mapper.ParamCollectionMapper"> |
|
4 |
|
|
5 |
<!-- 通用查询映射结果 --> |
|
6 |
<resultMap id="BaseResultMap" type="cn.stylefeng.guns.modular.cm.paramCollection.entity.ParamCollection"> |
|
7 |
<id column="id" property="id" /> |
|
8 |
<result column="work_order_no" property="workOrderNo" /> |
|
9 |
<result column="sfc_code" property="sfcCode" /> |
|
10 |
<result column="product_code" property="productCode" /> |
|
11 |
<result column="production_line" property="productionLine" /> |
|
12 |
<result column="location_code" property="locationCode" /> |
|
13 |
<result column="equipment_no" property="equipmentNo" /> |
|
14 |
<result column="param_code" property="paramCode" /> |
|
15 |
<result column="param_value" property="paramValue" /> |
|
16 |
<result column="param_upper" property="paramUpper" /> |
|
17 |
<result column="param_lower" property="paramLower" /> |
|
18 |
<result column="state" property="state" /> |
|
19 |
<result column="param_standard" property="paramStandard" /> |
|
20 |
<result column="collection_time" property="collectionTime" /> |
|
21 |
<result column="spare_field_1" property="spareField1" /> |
|
22 |
<result column="spare_field_2" property="spareField2" /> |
|
23 |
<result column="create_user" property="createUser" /> |
|
24 |
<result column="create_time" property="createTime" /> |
|
25 |
<result column="update_user" property="updateUser" /> |
|
26 |
<result column="update_time" property="updateTime" /> |
|
27 |
|
|
28 |
<result column="param_name" property="paramName" /> |
|
29 |
<result column="unit" property="unit" /> |
|
30 |
</resultMap> |
|
31 |
|
|
32 |
<!-- 通用查询结果列 --> |
|
33 |
<sql id="Base_Column_List"> |
|
34 |
unit AS "unit",param_name AS "paramName",state AS "state",id AS "id", work_order_no AS "workOrderNo", sfc_code AS "sfcCode", product_code AS "productCode", production_line AS "productionLine", location_code AS "locationCode", equipment_no AS "equipmentNo", param_code AS "paramCode", param_value AS "paramValue", param_upper AS "paramUpper", param_lower AS "paramLower", param_standard AS "paramStandard", collection_time AS "collectionTime", spare_field_1 AS "spareField1", spare_field_2 AS "spareField2", create_user AS "createUser", create_time AS "createTime", update_user AS "updateUser", update_time AS "updateTime" |
|
35 |
</sql> |
|
36 |
|
|
37 |
|
|
38 |
<select id="customList" resultType="cn.stylefeng.guns.modular.cm.paramCollection.model.result.ParamCollectionResult" parameterType="cn.stylefeng.guns.modular.cm.paramCollection.model.params.ParamCollectionParam"> |
|
39 |
select |
|
40 |
<include refid="Base_Column_List"/> |
|
41 |
from cm_param_collection where 1 = 1 |
|
42 |
<if test="paramCondition.workOrderNo != null and paramCondition.workOrderNo != ''"> |
|
43 |
and work_order_no like CONCAT('%',#{paramCondition.workOrderNo},'%') |
|
44 |
</if> |
|
45 |
<if test="paramCondition.productionLine != null and paramCondition.productionLine != ''"> |
|
46 |
and production_line like CONCAT('%',#{paramCondition.productionLine},'%') |
|
47 |
</if> |
|
48 |
<if test="paramCondition.sfcCode != null and paramCondition.sfcCode != ''"> |
|
49 |
and sfc_code like CONCAT('%',#{paramCondition.sfcCode},'%') |
|
50 |
</if> |
|
51 |
<if test="paramCondition.locationCode != null and paramCondition.locationCode != ''"> |
|
52 |
and location_code like CONCAT('%',#{paramCondition.locationCode},'%') |
|
53 |
</if> |
|
54 |
<if test="paramCondition.startTime != null and paramCondition.startTime != ''"> |
|
55 |
and create_time >= #{paramCondition.startTime} |
|
56 |
</if> |
|
57 |
<if test="paramCondition.endTime != null and paramCondition.endTime != ''"> |
|
58 |
and create_time <= #{paramCondition.endTime} |
|
59 |
</if> |
|
60 |
</select> |
|
61 |
|
|
62 |
<select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.cm.paramCollection.model.params.ParamCollectionParam"> |
|
63 |
select |
|
64 |
<include refid="Base_Column_List"/> |
|
65 |
from cm_param_collection where 1 = 1 |
|
66 |
</select> |
|
67 |
|
|
68 |
<select id="customPageList" resultType="cn.stylefeng.guns.modular.cm.paramCollection.model.result.ParamCollectionResult" parameterType="cn.stylefeng.guns.modular.cm.paramCollection.model.params.ParamCollectionParam"> |
|
69 |
select |
|
70 |
<include refid="Base_Column_List"/> |
|
71 |
from cm_param_collection where 1 = 1 |
|
72 |
<if test="paramCondition.workOrderNo != null and paramCondition.workOrderNo != ''"> |
|
73 |
and work_order_no like CONCAT('%',#{paramCondition.workOrderNo},'%') |
|
74 |
</if> |
|
75 |
<if test="paramCondition.productionLine != null and paramCondition.productionLine != ''"> |
|
76 |
and production_line like CONCAT('%',#{paramCondition.productionLine},'%') |
|
77 |
</if> |
|
78 |
<if test="paramCondition.sfcCode != null and paramCondition.sfcCode != ''"> |
|
79 |
and sfc_code like CONCAT('%',#{paramCondition.sfcCode},'%') |
|
80 |
</if> |
|
81 |
<if test="paramCondition.locationCode != null and paramCondition.locationCode != ''"> |
|
82 |
and location_code like CONCAT('%',#{paramCondition.locationCode},'%') |
|
83 |
</if> |
|
84 |
<if test="paramCondition.startTime != null and paramCondition.startTime != ''"> |
|
85 |
and create_time >= #{paramCondition.startTime} |
|
86 |
</if> |
|
87 |
<if test="paramCondition.endTime != null and paramCondition.endTime != ''"> |
|
88 |
and create_time <= #{paramCondition.endTime} |
|
89 |
</if> |
|
90 |
</select> |
|
91 |
|
|
92 |
<select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.cm.paramCollection.model.params.ParamCollectionParam"> |
|
93 |
select |
|
94 |
<include refid="Base_Column_List"/> |
|
95 |
from cm_param_collection where 1 = 1 |
|
96 |
</select> |
|
97 |
<update id="updateSFC"> |
|
98 |
update cm_param_collection set sfc_code = #{sfcCode} where sfc_code = #{childSfcCode} |
|
99 |
</update> |
|
100 |
</mapper> |