178 lines
11 KiB
XML
178 lines
11 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="com.ruoyi.job.mydojob.mapper.MydoJobMapper">
|
|
|
|
<resultMap type="MydoJob" id="MydoJobResult">
|
|
<result property="jobId" column="job_id" />
|
|
<result property="status" column="status" />
|
|
<result property="onLineType" column="on_line_type" />
|
|
<result property="taskNo" column="task_no" />
|
|
<result property="supplierId" column="supplier_id" />
|
|
<result property="customerId" column="customer_id" />
|
|
<result property="departmentId" column="department_id" />
|
|
<result property="trayCode" column="tray_code" />
|
|
<result property="roadwayId" column="roadway_id" />
|
|
<result property="cargoSpaceId" column="cargo_space_id" />
|
|
<result property="targetRoadwayId" column="target_roadway_id" />
|
|
<result property="targetCargoSpaceId" column="target_cargo_space_id" />
|
|
<result property="lineId" column="line_id" />
|
|
<result property="workshopId" column="workshop_id" />
|
|
<result property="priority" column="priority" />
|
|
<result property="executionPhase" column="execution_phase" />
|
|
<result property="inOrOut" column="in_or_out" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="startTime" column="start_time" />
|
|
<result property="finishTime" column="finish_time" />
|
|
<result property="entranceId" column="entrance_id" />
|
|
<result property="exitId" column="exit_id" />
|
|
<result property="classId" column="class_id" />
|
|
<result property="warehouseId" column="warehouse_id" />
|
|
<result property="faultFlag" column="fault_flag" />
|
|
</resultMap>
|
|
|
|
<sql id="selectMydoJobVo">
|
|
select job_id, status, on_line_type, task_no, supplier_id, customer_id, department_id, tray_code, roadway_id, cargo_space_id, target_roadway_id, target_cargo_space_id, line_id, workshop_id, priority, execution_phase, in_or_out, create_time, start_time, finish_time, entrance_id, exit_id, class_id, warehouse_id, fault_flag from mydo_job
|
|
</sql>
|
|
|
|
<select id="selectMydoJobList" parameterType="MydoJob" resultMap="MydoJobResult">
|
|
<include refid="selectMydoJobVo"/>
|
|
<where>
|
|
<if test="jobId != null and jobId != ''"> and job_id = #{jobId}</if>
|
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
|
<if test="onLineType != null and onLineType != ''"> and on_line_type = #{onLineType}</if>
|
|
<if test="taskNo != null and taskNo != ''"> and task_no = #{taskNo}</if>
|
|
<if test="supplierId != null and supplierId != ''"> and supplier_id = #{supplierId}</if>
|
|
<if test="customerId != null and customerId != ''"> and customer_id = #{customerId}</if>
|
|
<if test="departmentId != null and departmentId != ''"> and department_id = #{departmentId}</if>
|
|
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
|
<if test="roadwayId != null and roadwayId != ''"> and roadway_id = #{roadwayId}</if>
|
|
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and cargo_space_id = #{cargoSpaceId}</if>
|
|
<if test="targetRoadwayId != null and targetRoadwayId != ''"> and target_roadway_id = #{targetRoadwayId}</if>
|
|
<if test="targetCargoSpaceId != null and targetCargoSpaceId != ''"> and target_cargo_space_id = #{targetCargoSpaceId}</if>
|
|
<if test="lineId != null and lineId != ''"> and line_id = #{lineId}</if>
|
|
<if test="workshopId != null and workshopId != ''"> and workshop_id = #{workshopId}</if>
|
|
<if test="priority != null "> and priority = #{priority}</if>
|
|
<if test="executionPhase != null and executionPhase != ''"> and execution_phase = #{executionPhase}</if>
|
|
<if test="inOrOut != null and inOrOut != ''"> and in_or_out = #{inOrOut}</if>
|
|
<if test="startTime != null and startTime != ''"> and start_time = #{startTime}</if>
|
|
<if test="finishTime != null and finishTime != ''"> and finish_time = #{finishTime}</if>
|
|
<if test="entranceId != null and entranceId != ''"> and entrance_id = #{entranceId}</if>
|
|
<if test="exitId != null and exitId != ''"> and exit_id = #{exitId}</if>
|
|
<if test="classId != null and classId != ''"> and class_id = #{classId}</if>
|
|
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
|
<if test="faultFlag != null and faultFlag != ''"> and fault_flag = #{faultFlag}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectMydoJobByJobId" parameterType="String" resultMap="MydoJobResult">
|
|
<include refid="selectMydoJobVo"/>
|
|
where job_id = #{jobId}
|
|
</select>
|
|
|
|
<insert id="insertMydoJob" parameterType="MydoJob">
|
|
insert into mydo_job
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="jobId != null and jobId != ''">job_id,</if>
|
|
<if test="status != null and status != ''">status,</if>
|
|
<if test="onLineType != null">on_line_type,</if>
|
|
<if test="taskNo != null and taskNo != ''">task_no,</if>
|
|
<if test="supplierId != null">supplier_id,</if>
|
|
<if test="customerId != null">customer_id,</if>
|
|
<if test="departmentId != null">department_id,</if>
|
|
<if test="trayCode != null">tray_code,</if>
|
|
<if test="roadwayId != null">roadway_id,</if>
|
|
<if test="cargoSpaceId != null">cargo_space_id,</if>
|
|
<if test="targetRoadwayId != null">target_roadway_id,</if>
|
|
<if test="targetCargoSpaceId != null">target_cargo_space_id,</if>
|
|
<if test="lineId != null">line_id,</if>
|
|
<if test="workshopId != null">workshop_id,</if>
|
|
<if test="priority != null">priority,</if>
|
|
<if test="executionPhase != null">execution_phase,</if>
|
|
<if test="inOrOut != null">in_or_out,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="startTime != null">start_time,</if>
|
|
<if test="finishTime != null">finish_time,</if>
|
|
<if test="entranceId != null">entrance_id,</if>
|
|
<if test="exitId != null">exit_id,</if>
|
|
<if test="classId != null">class_id,</if>
|
|
<if test="warehouseId != null">warehouse_id,</if>
|
|
<if test="faultFlag != null">fault_flag,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="jobId != null and jobId != ''">#{jobId},</if>
|
|
<if test="status != null and status != ''">#{status},</if>
|
|
<if test="onLineType != null">#{onLineType},</if>
|
|
<if test="taskNo != null and taskNo != ''">#{taskNo},</if>
|
|
<if test="supplierId != null">#{supplierId},</if>
|
|
<if test="customerId != null">#{customerId},</if>
|
|
<if test="departmentId != null">#{departmentId},</if>
|
|
<if test="trayCode != null">#{trayCode},</if>
|
|
<if test="roadwayId != null">#{roadwayId},</if>
|
|
<if test="cargoSpaceId != null">#{cargoSpaceId},</if>
|
|
<if test="targetRoadwayId != null">#{targetRoadwayId},</if>
|
|
<if test="targetCargoSpaceId != null">#{targetCargoSpaceId},</if>
|
|
<if test="lineId != null">#{lineId},</if>
|
|
<if test="workshopId != null">#{workshopId},</if>
|
|
<if test="priority != null">#{priority},</if>
|
|
<if test="executionPhase != null">#{executionPhase},</if>
|
|
<if test="inOrOut != null">#{inOrOut},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="startTime != null">#{startTime},</if>
|
|
<if test="finishTime != null">#{finishTime},</if>
|
|
<if test="entranceId != null">#{entranceId},</if>
|
|
<if test="exitId != null">#{exitId},</if>
|
|
<if test="classId != null">#{classId},</if>
|
|
<if test="warehouseId != null">#{warehouseId},</if>
|
|
<if test="faultFlag != null">#{faultFlag},</if>
|
|
</trim>
|
|
</insert>
|
|
<insert id="insertHistory">
|
|
insert into mydo_job_finish
|
|
select * from mydo_job where job_id = #{jobId}
|
|
</insert>
|
|
|
|
<update id="updateMydoJob" parameterType="MydoJob">
|
|
update mydo_job
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="status != null and status != ''">status = #{status},</if>
|
|
<if test="onLineType != null">on_line_type = #{onLineType},</if>
|
|
<if test="taskNo != null and taskNo != ''">task_no = #{taskNo},</if>
|
|
<if test="supplierId != null">supplier_id = #{supplierId},</if>
|
|
<if test="customerId != null">customer_id = #{customerId},</if>
|
|
<if test="departmentId != null">department_id = #{departmentId},</if>
|
|
<if test="trayCode != null">tray_code = #{trayCode},</if>
|
|
<if test="roadwayId != null">roadway_id = #{roadwayId},</if>
|
|
<if test="cargoSpaceId != null">cargo_space_id = #{cargoSpaceId},</if>
|
|
<if test="targetRoadwayId != null">target_roadway_id = #{targetRoadwayId},</if>
|
|
<if test="targetCargoSpaceId != null">target_cargo_space_id = #{targetCargoSpaceId},</if>
|
|
<if test="lineId != null">line_id = #{lineId},</if>
|
|
<if test="workshopId != null">workshop_id = #{workshopId},</if>
|
|
<if test="priority != null">priority = #{priority},</if>
|
|
<if test="executionPhase != null">execution_phase = #{executionPhase},</if>
|
|
<if test="inOrOut != null">in_or_out = #{inOrOut},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="startTime != null">start_time = #{startTime},</if>
|
|
<if test="finishTime != null">finish_time = #{finishTime},</if>
|
|
<if test="entranceId != null">entrance_id = #{entranceId},</if>
|
|
<if test="exitId != null">exit_id = #{exitId},</if>
|
|
<if test="classId != null">class_id = #{classId},</if>
|
|
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
|
<if test="faultFlag != null">fault_flag = #{faultFlag},</if>
|
|
</trim>
|
|
where job_id = #{jobId}
|
|
</update>
|
|
|
|
<delete id="deleteMydoJobByJobId" parameterType="String">
|
|
delete from mydo_job where job_id = #{jobId}
|
|
</delete>
|
|
|
|
<delete id="deleteMydoJobByJobIds" parameterType="String">
|
|
delete from mydo_job where job_id in
|
|
<foreach item="jobId" collection="array" open="(" separator="," close=")">
|
|
#{jobId}
|
|
</foreach>
|
|
</delete>
|
|
</mapper>
|