You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
4.2 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.dromara.dms.mapper.DmsPlanLubeMapper">
<resultMap type="DmsPlanLube" id="DmsPlanLubeResult">
<result property="planLubeId" column="plan_lube_id" />
<result property="planLubeCode" column="plan_lube_code" />
<result property="lubeLevel" column="lube_level" />
<result property="lubeGroup" column="lube_group" />
<result property="lubeSupervisor" column="lube_supervisor" />
<result property="lubeTime" column="lube_time" />
<result property="timeLimit" column="time_limit" />
<result property="jobId" column="job_id" />
<result property="cyclePeriod" column="cycle_period" />
<result property="createMethod" column="create_method" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="cronExpression" column="cron_expression" />
</resultMap>
<resultMap id="DmsPlanLubeDmsPlanLubeDetailResult" type="DmsPlanLube" extends="DmsPlanLubeResult">
<collection property="dmsPlanLubeDetailList" notNullColumn="sub_plan_lube_detail_id" javaType="java.util.List" resultMap="DmsPlanLubeDetailResult" />
</resultMap>
<resultMap type="DmsPlanLubeDetail" id="DmsPlanLubeDetailResult">
<result property="planLubeDetailId" column="sub_plan_lube_detail_id" />
<result property="planLubeId" column="sub_plan_lube_id" />
<result property="deviceId" column="sub_machine_id" />
<result property="lubeStationId" column="sub_lube_station_id" />
<result property="lubeStandardId" column="sub_lube_standard_id" />
<result property="operationDescription" column="sub_operation_description" />
<result property="activeFlag" column="sub_active_flag" />
<result property="remark" column="sub_remark" />
<result property="createBy" column="sub_create_by" />
<result property="createTime" column="sub_create_time" />
<result property="updateBy" column="sub_update_by" />
<result property="updateTime" column="sub_update_time" />
</resultMap>
<select id="selectDmsPlanLubeJoinByPlanLubeCode" parameterType="String" resultMap="DmsPlanLubeDmsPlanLubeDetailResult">
select a.plan_lube_id, a.plan_lube_code, a.lube_level, a.lube_group, a.lube_supervisor, a.lube_time, a.time_limit, a.job_id, a.cycle_period, a.create_method, a.active_flag, a.remark, a.create_by, a.create_time, a.update_by, a.update_time,
/* b.plan_lube_detail_id as sub_plan_lube_detail_id,
b.plan_lube_id as sub_plan_lube_id,
b.device_id as sub_machine_id,
b.lube_station_id as sub_lube_station_id,
b.lube_standard_id as sub_lube_standard_id,
b.operation_description as sub_operation_description,
b.active_flag as sub_active_flag,
b.remark as sub_remark,
b.create_by as sub_create_by,
b.create_time as sub_create_time,
b.update_by as sub_update_by,
b.update_time as sub_update_time*/
from dms_plan_lube a
/* left join dms_plan_lube_detail b on b.plan_lube_id = a.plan_lube_id*/
where a.plan_lube_code = #{planLubeCode}
</select>
<select id="selectPlanLubeJoinJobByPlanLubeId" parameterType="Long" resultMap="DmsPlanLubeResult">
select a.plan_lube_id, a.plan_lube_code, a.lube_level, a.lube_group, a.lube_supervisor, a.lube_time, a.time_limit, a.job_id, a.cycle_period, a.create_method, a.remark, a.create_by, a.create_time,
sj.cron_expression
from dms_plan_lube a
left join hwmom-job.sys_job sj on a.job_id = sj.job_id
where a.plan_lube_id = #{planLubeId}
</select>
</mapper>