OPC
懒羊羊
2023-12-13 21fde820e495c08cfa0ba277685468baa5bf9118
提交 | 用户 | 时间
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.em.equipmentMaintainTask.mapper.EquipmentMaintainTaskMapper">
4
5     <!-- 通用查询映射结果 -->
6     <resultMap id="BaseResultMap" type="cn.stylefeng.guns.modular.em.equipmentMaintainTask.entity.EquipmentMaintainTask">
7         <id column="id" property="id" />
8         <result column="equipment_no" property="equipmentNo" />
9         <result column="equipment_name" property="equipmentName" />
10         <result column="task_no" property="taskNo" />
11         <result column="plan_no" property="planNo" />
12         <result column="plan_name" property="planName" />
13         <result column="maintain_type" property="maintainType" />
14         <result column="maintain_state" property="maintainState" />
15         <result column="maintain_result" property="maintainResult" />
16         <result column="reason" property="reason" />
17         <result column="maintain_price" property="maintainPrice" />
18         <result column="external_maintain" property="externalMaintain" />
19         <result column="maintain_user" property="maintainUser" />
20         <result column="spare_field_1" property="spareField1" />
21         <result column="spare_field_2" property="spareField2" />
22         <result column="finish_time" property="finishTime" />
23         <result column="maintain_time" property="maintainTime" />
24         <result column="remarks" property="remarks" />
25     </resultMap>
26
27     <!-- 通用查询结果列 -->
28     <sql id="Base_Column_List">
29         id AS "id", equipment_no AS "equipmentNo", equipment_name AS "equipmentName", task_no AS "taskNo", plan_no AS "planNo", plan_name AS "planName", maintain_type AS "maintainType", maintain_state AS "maintainState", maintain_result AS "maintainResult", reason AS "reason", maintain_price AS "maintainPrice", external_maintain AS "externalMaintain", maintain_user AS "maintainUser", spare_field_1 AS "spareField1", spare_field_2 AS "spareField2", finish_time AS "finishTime", maintain_time AS "maintainTime", remarks AS "remarks"
30     </sql>
31
32
33     <select id="customList" resultType="cn.stylefeng.guns.modular.em.equipmentMaintainTask.model.result.EquipmentMaintainTaskResult" parameterType="cn.stylefeng.guns.modular.em.equipmentMaintainTask.model.params.EquipmentMaintainTaskParam">
34         select
35         <include refid="Base_Column_List"/>
36         from em_equipment_maintain_task where 1 = 1
37     </select>
38
39     <select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.em.equipmentMaintainTask.model.params.EquipmentMaintainTaskParam">
40         select
41         <include refid="Base_Column_List"/>
42         from em_equipment_maintain_task where 1 = 1
43     </select>
44
45     <select id="customPageList" resultType="cn.stylefeng.guns.modular.em.equipmentMaintainTask.model.result.EquipmentMaintainTaskResult" parameterType="cn.stylefeng.guns.modular.em.equipmentMaintainTask.model.params.EquipmentMaintainTaskParam">
46         select
47         <include refid="Base_Column_List"/>
48         from em_equipment_maintain_task where 1 = 1
49
50         <if test="paramCondition.equipmentNo != null and paramCondition.equipmentNo != ''">
51             and equipment_no like CONCAT('%',#{paramCondition.equipmentNo},'%')
52         </if>
53         <if test="paramCondition.equipmentName != null and paramCondition.equipmentName != ''">
54             and equipment_name like CONCAT('%',#{paramCondition.equipmentName},'%')
55         </if>
56         <if test="paramCondition.taskNo != null and paramCondition.taskNo != ''">
57             and task_no like CONCAT('%',#{paramCondition.taskNo},'%')
58         </if>
59         <if test="paramCondition.planNo != null and paramCondition.planNo != ''">
60             and plan_no like CONCAT('%',#{paramCondition.planNo},'%')
61         </if>
62     </select>
63
64     <select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.em.equipmentMaintainTask.model.params.EquipmentMaintainTaskParam">
65         select
66         <include refid="Base_Column_List"/>
67         from em_equipment_maintain_task where 1 = 1
68     </select>
69
70 </mapper>