<?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.buss.mapper.DsTaskDetailMapper">
|
|
<resultMap type="DsTaskDetail" id="DsTaskDetailResult">
|
<id property="PKID" column="PKID" />
|
<result property="taskId" column="TASK_ID" />
|
<result property="harborId" column="HARBOR_ID" />
|
<result property="harborName" column="HARBOR_NAME" />
|
<result property="berthId" column="BERTH_ID" />
|
<result property="berthName" column="BERTH_NAME" />
|
<result property="parkingType" column="PARKING_TYPE" />
|
<result property="shipNo" column="SHIP_NO" />
|
<result property="shipType" column="SHIP_TYPE" />
|
<result property="STIME" column="STIME" />
|
<result property="elecStime" column="ELEC_STIME" />
|
<result property="elecEtime" column="ELEC_ETIME" />
|
<result property="waterStime" column="WATER_STIME" />
|
<result property="waterEtime" column="WATER_ETIME" />
|
<result property="oilStime" column="OIL_STIME" />
|
<result property="oilEtime" column="OIL_ETIME" />
|
<result property="ammoStime" column="AMMO_STIME" />
|
<result property="ammoEtime" column="AMMO_ETIME" />
|
<result property="matStime" column="MAT_STIME" />
|
<result property="matEtime" column="MAT_ETIME" />
|
<result property="ETIME" column="ETIME" />
|
<result property="oilTime" column="OIL_TIME" />
|
<result property="ammoTime" column="AMMO_TIME" />
|
<result property="matTime" column="MAT_TIME" />
|
<result property="waterTime" column="WATER_TIME" />
|
<result property="totalTime" column="TOTAL_TIME" />
|
<result property="delFlag" column="DEL_FLAG" />
|
<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="t1" column="T1" />
|
<result property="supplySeq" column="SUPPLY_SEQ" />
|
<result property="carCount" column="CAR_COUNT" />
|
<result property="oilApply" column="OIL_APPLY" />
|
<result property="oilReady" column="OIL_READY" />
|
<result property="ammoTest" column="AMMO_TEST" />
|
<result property="ammoStart" column="AMMO_START" />
|
<result property="food" column="FOOD" />
|
<result property="foodW" column="FOOD_W" />
|
<result property="foodO" column="FOOD_O" />
|
<result property="workGrpId" column="WORK_GRP_ID" />
|
<result property="workGrpName" column="WORK_GRP_NAME" />
|
<result property="deptId" column="DEPT_ID" />
|
<result property="workMatGrpId" column="WORK_MAT_GRP_ID" />
|
<result property="workMatGrpName" column="WORK_MAT_GRP_NAME" />
|
<result property="path" column="PATH" />
|
</resultMap>
|
|
<sql id="selectDsTaskDetailVo">
|
select PKID, TASK_ID, HARBOR_ID, HARBOR_NAME, BERTH_ID, BERTH_NAME, PARKING_TYPE, SHIP_NO, SHIP_TYPE, STIME, ELEC_STIME, ELEC_ETIME, WATER_STIME, WATER_ETIME, OIL_STIME, OIL_ETIME, AMMO_STIME, AMMO_ETIME, MAT_STIME, MAT_ETIME, ETIME, OIL_TIME, AMMO_TIME, MAT_TIME, WATER_TIME, TOTAL_TIME, DEL_FLAG, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME, T1, SUPPLY_SEQ, CAR_COUNT, OIL_APPLY, OIL_READY, AMMO_TEST, AMMO_START, FOOD, FOOD_W, FOOD_O, WORK_GRP_ID, WORK_GRP_NAME, DEPT_ID, WORK_MAT_GRP_ID, WORK_MAT_GRP_NAME, PATH from ds_task_detail
|
</sql>
|
|
<select id="selectDsTaskDetailList" parameterType="DsTaskDetail" resultMap="DsTaskDetailResult">
|
<include refid="selectDsTaskDetailVo"/>
|
<where>
|
<if test="PKID != null "> and PKID = #{PKID}</if>
|
<if test="taskId != null "> and TASK_ID = #{taskId}</if>
|
<if test="harborId != null "> and HARBOR_ID = #{harborId}</if>
|
<if test="harborName != null and harborName != ''"> and HARBOR_NAME like concat('%', #{harborName}, '%')</if>
|
<if test="berthId != null "> and BERTH_ID = #{berthId}</if>
|
<if test="berthName != null and berthName != ''"> and BERTH_NAME like concat('%', #{berthName}, '%')</if>
|
<if test="parkingType != null and parkingType != ''"> and PARKING_TYPE = #{parkingType}</if>
|
<if test="shipNo != null and shipNo != ''"> and SHIP_NO = #{shipNo}</if>
|
<if test="shipType != null and shipType != ''"> and SHIP_TYPE = #{shipType}</if>
|
<if test="STIME != null "> and STIME = #{STIME}</if>
|
<if test="elecStime != null "> and ELEC_STIME = #{elecStime}</if>
|
<if test="elecEtime != null "> and ELEC_ETIME = #{elecEtime}</if>
|
<if test="waterStime != null "> and WATER_STIME = #{waterStime}</if>
|
<if test="waterEtime != null "> and WATER_ETIME = #{waterEtime}</if>
|
<if test="oilStime != null "> and OIL_STIME = #{oilStime}</if>
|
<if test="oilEtime != null "> and OIL_ETIME = #{oilEtime}</if>
|
<if test="ammoStime != null "> and AMMO_STIME = #{ammoStime}</if>
|
<if test="ammoEtime != null "> and AMMO_ETIME = #{ammoEtime}</if>
|
<if test="matStime != null "> and MAT_STIME = #{matStime}</if>
|
<if test="matEtime != null "> and MAT_ETIME = #{matEtime}</if>
|
<if test="ETIME != null "> and ETIME = #{ETIME}</if>
|
<if test="oilTime != null "> and OIL_TIME = #{oilTime}</if>
|
<if test="ammoTime != null "> and AMMO_TIME = #{ammoTime}</if>
|
<if test="matTime != null "> and MAT_TIME = #{matTime}</if>
|
<if test="waterTime != null "> and WATER_TIME = #{waterTime}</if>
|
<if test="delFlag != null and delFlag != ''"> and DEL_FLAG = #{delFlag}</if>
|
<if test="createBy != null and createBy != ''"> and CREATE_BY = #{createBy}</if>
|
<if test="createTime != null "> and CREATE_TIME = #{createTime}</if>
|
<if test="updateBy != null and updateBy != ''"> and UPDATE_BY = #{updateBy}</if>
|
<if test="updateTime != null "> and UPDATE_TIME = #{updateTime}</if>
|
<if test="t1 != null "> and T1 = #{t1}</if>
|
<if test="deptId != null "> and DEPT_ID = #{deptId}</if>
|
</where>
|
</select>
|
|
<select id="selectDsTaskDetailByPKID" parameterType="Long" resultMap="DsTaskDetailResult">
|
<include refid="selectDsTaskDetailVo"/>
|
where PKID = #{PKID}
|
</select>
|
|
<select id="selectAQTaskDetailList" parameterType="Long" resultMap="DsTaskDetailResult">
|
<include refid="selectDsTaskDetailVo"/>
|
where TASK_ID in (select top 1 a.pkid from DS_TASK a where a.STATUS = '2' and a.CREATE_TIME >= TRUNC(SYSDATE-1) order by a.pkid desc)
|
and harbor_id in (select c.pkid from DM_HARBOR c where c.DEPT_ID = #{deptId} )
|
</select>
|
|
<select id="selectAQCurTaskDetailList" parameterType="Long" resultMap="DsTaskDetailResult">
|
<include refid="selectDsTaskDetailVo"/>
|
where TASK_ID in (select top 1 a.task_id from DS_TASK_LIST a where a.STATUS = '2' and A.DEPT_ID = #{deptId} order by a.TASK_ID desc)
|
and harbor_id in (select c.pkid from DM_HARBOR c where c.DEPT_ID = #{deptId} )
|
</select>
|
|
<select id="selectDsTaskDetailByTaskId" resultMap="DsTaskDetailResult">
|
<include refid="selectDsTaskDetailVo"/>
|
<where>
|
<if test="taskid != null "> and TASK_ID = #{taskid}</if>
|
<if test="deptid != null "> and DEPT_ID = #{deptid}</if>
|
</where>
|
</select>
|
|
<select id="selectDsMatDispatchByDeptId" resultMap="DsTaskDetailResult">
|
<include refid="selectDsTaskDetailVo"/>
|
<where>
|
<if test="taskid != null "> and TASK_ID = #{taskid}</if>
|
<if test="deptid != null "> and DEPT_ID = #{deptid}</if>
|
</where>
|
</select>
|
|
|
<insert id="insertDsTaskDetail" parameterType="DsTaskDetail">
|
insert into ds_task_detail
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="taskId != null">TASK_ID,</if>
|
<if test="harborId != null">HARBOR_ID,</if>
|
<if test="harborName != null">HARBOR_NAME,</if>
|
<if test="berthId != null">BERTH_ID,</if>
|
<if test="berthName != null">BERTH_NAME,</if>
|
<if test="parkingType != null">PARKING_TYPE,</if>
|
<if test="shipNo != null">SHIP_NO,</if>
|
<if test="shipType != null">SHIP_TYPE,</if>
|
<if test="STIME != null">STIME,</if>
|
<if test="elecStime != null">ELEC_STIME,</if>
|
<if test="elecEtime != null">ELEC_ETIME,</if>
|
<if test="waterStime != null">WATER_STIME,</if>
|
<if test="waterEtime != null">WATER_ETIME,</if>
|
<if test="oilStime != null">OIL_STIME,</if>
|
<if test="oilEtime != null">OIL_ETIME,</if>
|
<if test="ammoStime != null">AMMO_STIME,</if>
|
<if test="ammoEtime != null">AMMO_ETIME,</if>
|
<if test="matStime != null">MAT_STIME,</if>
|
<if test="matEtime != null">MAT_ETIME,</if>
|
<if test="ETIME != null">ETIME,</if>
|
<if test="oilTime != null">OIL_TIME,</if>
|
<if test="ammoTime != null">AMMO_TIME,</if>
|
<if test="matTime != null">MAT_TIME,</if>
|
<if test="waterTime != null">WATER_TIME,</if>
|
<if test="totalTime != null "> and TOTAL_TIME = #{totalTime}</if>
|
<if test="delFlag != null">DEL_FLAG,</if>
|
<if test="createBy != null">CREATE_BY,</if>
|
<if test="createTime != null">CREATE_TIME,</if>
|
<if test="updateBy != null">UPDATE_BY,</if>
|
<if test="updateTime != null">UPDATE_TIME,</if>
|
<if test="t1 != null">T1,</if>
|
<if test="supplySeq != null">SUPPLY_SEQ,</if>
|
<if test="carCount != null">CAR_COUNT,</if>
|
<if test="oilApply != null">OIL_APPLY,</if>
|
<if test="oilReady != null">OIL_READY,</if>
|
<if test="ammoTest != null">AMMO_TEST,</if>
|
<if test="ammoStart != null">AMMO_START,</if>
|
<if test="food != null">FOOD,</if>
|
<if test="foodW != null">FOOD_W,</if>
|
<if test="foodO != null">FOOD_O,</if>
|
<if test="workGrpId != null">WORK_GRP_ID,</if>
|
<if test="workGrpName != null">WORK_GRP_NAME,</if>
|
<if test="deptId != null">DEPT_ID,</if>
|
<if test="workGrpId != null">WORK_MAT_GRP_ID,</if>
|
<if test="workGrpName != null">WORK_MAT_GRP_NAME,</if>
|
<if test="path != null">PATH,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="taskId != null">#{taskId},</if>
|
<if test="harborId != null">#{harborId},</if>
|
<if test="harborName != null">#{harborName},</if>
|
<if test="berthId != null">#{berthId},</if>
|
<if test="berthName != null">#{berthName},</if>
|
<if test="parkingType != null">#{parkingType},</if>
|
<if test="shipNo != null">#{shipNo},</if>
|
<if test="shipType != null">#{shipType},</if>
|
<if test="STIME != null">#{STIME},</if>
|
<if test="elecStime != null">#{elecStime},</if>
|
<if test="elecEtime != null">#{elecEtime},</if>
|
<if test="waterStime != null">#{waterStime},</if>
|
<if test="waterEtime != null">#{waterEtime},</if>
|
<if test="oilStime != null">#{oilStime},</if>
|
<if test="oilEtime != null">#{oilEtime},</if>
|
<if test="ammoStime != null">#{ammoStime},</if>
|
<if test="ammoEtime != null">#{ammoEtime},</if>
|
<if test="matStime != null">#{matStime},</if>
|
<if test="matEtime != null">#{matEtime},</if>
|
<if test="ETIME != null">#{ETIME},</if>
|
<if test="oilTime != null">#{oilTime},</if>
|
<if test="ammoTime != null">#{ammoTime},</if>
|
<if test="matTime != null">#{matTime},</if>
|
<if test="waterTime != null">#{waterTime},</if>
|
<if test="totalTime != null">#{totalTime},</if>
|
<if test="delFlag != null">#{delFlag},</if>
|
<if test="createBy != null">#{createBy},</if>
|
<if test="createTime != null">#{createTime},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
<if test="t1 != null">#{t1},</if>
|
<if test="supplySeq != null">#{supplySeq},</if>
|
<if test="carCount != null">#{carCount},</if>
|
<if test="oilApply != null">#{oilApply},</if>
|
<if test="oilReady != null">#{oilReady},</if>
|
<if test="ammoTest != null">#{ammoTest},</if>
|
<if test="ammoStart != null">#{ammoStart},</if>
|
<if test="food != null">#{food},</if>
|
<if test="foodW != null">#{foodW},</if>
|
<if test="foodO != null">#{foodO},</if>
|
<if test="workGrpId != null">#{workGrpId},</if>
|
<if test="workGrpName != null">#{workGrpName},</if>
|
<if test="deptId != null">#{deptId},</if>
|
<if test="workGrpId != null">#{workMatGrpId},</if>
|
<if test="workGrpName != null">#{workMatGrpName},</if>
|
<if test="path != null">#{path},</if>
|
</trim>
|
</insert>
|
|
<update id="updateDsTaskDetail" parameterType="DsTaskDetail">
|
update ds_task_detail
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="taskId != null">TASK_ID = #{taskId},</if>
|
<if test="harborId != null">HARBOR_ID = #{harborId},</if>
|
<if test="harborName != null">HARBOR_NAME = #{harborName},</if>
|
<if test="berthId != null">BERTH_ID = #{berthId},</if>
|
<if test="berthName != null">BERTH_NAME = #{berthName},</if>
|
<if test="parkingType != null">PARKING_TYPE = #{parkingType},</if>
|
<if test="shipNo != null">SHIP_NO = #{shipNo},</if>
|
<if test="shipType != null">SHIP_TYPE = #{shipType},</if>
|
<if test="STIME != null">STIME = #{STIME},</if>
|
<if test="elecStime != null">ELEC_STIME = #{elecStime},</if>
|
<if test="elecEtime != null">ELEC_ETIME = #{elecEtime},</if>
|
<if test="waterStime != null">WATER_STIME = #{waterStime},</if>
|
<if test="waterEtime != null">WATER_ETIME = #{waterEtime},</if>
|
<if test="oilStime != null">OIL_STIME = #{oilStime},</if>
|
<if test="oilEtime != null">OIL_ETIME = #{oilEtime},</if>
|
<if test="ammoStime != null">AMMO_STIME = #{ammoStime},</if>
|
<if test="ammoEtime != null">AMMO_ETIME = #{ammoEtime},</if>
|
<if test="matStime != null">MAT_STIME = #{matStime},</if>
|
<if test="matEtime != null">MAT_ETIME = #{matEtime},</if>
|
<if test="ETIME != null">ETIME = #{ETIME},</if>
|
<if test="oilTime != null">OIL_TIME = #{oilTime},</if>
|
<if test="ammoTime != null">AMMO_TIME = #{ammoTime},</if>
|
<if test="matTime != null">MAT_TIME = #{matTime},</if>
|
<if test="waterTime != null">WATER_TIME = #{waterTime},</if>
|
<if test="totalTime != null ">TOTAL_TIME = #{totalTime},</if>
|
<if test="delFlag != null">DEL_FLAG = #{delFlag},</if>
|
<if test="createBy != null">CREATE_BY = #{createBy},</if>
|
<if test="createTime != null">CREATE_TIME = #{createTime},</if>
|
<if test="updateBy != null">UPDATE_BY = #{updateBy},</if>
|
<if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
|
<if test="t1 != null">T1 = #{t1},</if>
|
<if test="supplySeq != null">SUPPLY_SEQ = #{supplySeq},</if>
|
<if test="carCount != null">CAR_COUNT = #{carCount},</if>
|
<if test="oilApply != null">OIL_APPLY = #{oilApply},</if>
|
<if test="oilReady != null">OIL_READY = #{oilReady},</if>
|
<if test="ammoTest != null">AMMO_TEST = #{ammoTest},</if>
|
<if test="ammoStart != null">AMMO_START = #{ammoStart},</if>
|
<if test="food != null">FOOD = #{food},</if>
|
<if test="foodW != null">FOOD_W = #{foodW},</if>
|
<if test="foodO != null">FOOD_O = #{foodO},</if>
|
<if test="workGrpId != null">WORK_GRP_ID = #{workGrpId},</if>
|
<if test="workGrpName != null">WORK_GRP_NAME = #{workGrpName},</if>
|
<if test="deptId != null">DEPT_ID = #{deptId},</if>
|
<if test="workMatGrpId != null">WORK_MAT_GRP_ID = #{workMatGrpId},</if>
|
<if test="workMatGrpName != null">WORK_MAT_GRP_NAME = #{workMatGrpName},</if>
|
<if test="path != null">PATH = #{path},</if>
|
</trim>
|
where PKID = #{PKID}
|
</update>
|
|
<delete id="deleteDsTaskDetailByPKID" parameterType="Long">
|
delete from ds_task_detail where PKID = #{PKID}
|
</delete>
|
|
<delete id="deleteDsTaskDetailByPKIDs" parameterType="String">
|
delete from ds_task_detail where PKID in
|
<foreach item="PKID" collection="array" open="(" separator="," close=")">
|
#{PKID}
|
</foreach>
|
</delete>
|
|
<select id="selectDsTaskDetailByTaskIdAndHarborIds" resultMap="DsTaskDetailResult">
|
<include refid="selectDsTaskDetailVo"/>
|
<where>
|
<if test="taskid != null "> and TASK_ID = #{taskid}</if>
|
<if test="harborIds != null "> and HARBOR_ID IN ${harborIds}</if>
|
</where>
|
</select>
|
</mapper>
|