259 lines
16 KiB
XML
259 lines
16 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.search.ViewInJobFlow.mapper.ViewInJobFlowMapper">
|
|
|
|
<resultMap type="ViewInJobFlow" id="ViewInJobFlowResult">
|
|
<result property="jobDetailId" column="job_detail_id" />
|
|
<result property="jobId" column="job_id" />
|
|
<result property="taskNo" column="task_no" />
|
|
<result property="status" column="status" />
|
|
<result property="inOrOut" column="in_or_out" />
|
|
<result property="trayCode" column="tray_code" />
|
|
<result property="cargoSpaceId" column="cargo_space_id" />
|
|
<result property="cargoSpaceName" column="cargo_space_name" />
|
|
<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="warehouseId" column="warehouse_id" />
|
|
<result property="productId" column="product_id" />
|
|
<result property="productName" column="product_name" />
|
|
<result property="parentId" column="parent_id" />
|
|
<result property="price" column="price" />
|
|
<result property="cargoNo" column="cargo_no" />
|
|
<result property="unit" column="unit" />
|
|
<result property="spec" column="spec" />
|
|
<result property="remark" column="remark" />
|
|
<result property="productType" column="productType" />
|
|
<result property="systemItem" column="systemItem" />
|
|
<result property="productCtm" column="productCtm" />
|
|
<result property="productCtu" column="productCtu" />
|
|
<result property="upperNum" column="upperNum" />
|
|
<result property="limitNum" column="limitNum" />
|
|
<result property="enableFlag" column="enableFlag" />
|
|
<result property="quantity" column="quantity" />
|
|
<result property="lotNo" column="lot_no" />
|
|
<result property="inOrOutId" column="in_or_out_id" />
|
|
<result property="inOrOutDId" column="in_or_out_d_id" />
|
|
<result property="priceTotal" column="priceTotal" />
|
|
<result property="origin" column="origin" />
|
|
<result property="turnovertype" column="turnovertype" />
|
|
<result property="account" column="account" />
|
|
<result property="purpose" column="purpose" />
|
|
<result property="units" column="units" />
|
|
<result property="contract" column="contract" />
|
|
<result property="cases" column="cases" />
|
|
<result property="quality" column="quality" />
|
|
<result property="managementNo" column="managementNo" />
|
|
<result property="departmentId" column="department_id" />
|
|
<result property="deptName" column="dept_name" />
|
|
</resultMap>
|
|
|
|
<sql id="selectViewInJobFlowVo">
|
|
select job_detail_id, job_id, task_no, status, in_or_out, tray_code,cargo_space_id,cargo_space_name, create_time, start_time, finish_time, entrance_id, warehouse_id, product_id, product_name, parent_id, price, cargo_no, unit, spec, remark, productType, systemItem, productCtm, productCtu, upperNum, limitNum, enableFlag, quantity, lot_no, in_or_out_id, in_or_out_d_id, priceTotal, origin, turnovertype, account, purpose, units, contract, cases, quality, managementNo,department_id,dept_name from view_in_job_flow vijf
|
|
</sql>
|
|
|
|
<select id="selectViewInJobFlowList" parameterType="ViewInJobFlow" resultMap="ViewInJobFlowResult">
|
|
<include refid="selectViewInJobFlowVo"/>
|
|
where 1=1
|
|
<if test="jobDetailId != null and jobDetailId != ''"> and job_detail_id = #{jobDetailId}</if>
|
|
<if test="jobId != null and jobId != ''"> and job_id = #{jobId}</if>
|
|
<if test="taskNo != null and taskNo != ''"> and task_no = #{taskNo}</if>
|
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
|
<if test="inOrOut != null "> and in_or_out = #{inOrOut}</if>
|
|
<if test="trayCode != null and trayCode != ''"> and tray_code like concat('%',#{trayCode}, '%')</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="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
|
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
|
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
|
<if test="parentId != null and parentId != ''"> and parent_id = #{parentId}</if>
|
|
<if test="price != null and price != ''"> and price = #{price}</if>
|
|
<if test="cargoNo != null and cargoNo != ''"> and cargo_no = #{cargoNo}</if>
|
|
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
|
|
<if test="spec != null and spec != ''"> and spec = #{spec}</if>
|
|
<if test="productType != null and productType != ''"> and productType = #{productType}</if>
|
|
<if test="systemItem != null and systemItem != ''"> and systemItem = #{systemItem}</if>
|
|
<if test="productCtm != null and productCtm != ''"> and productCtm = #{productCtm}</if>
|
|
<if test="productCtu != null and productCtu != ''"> and productCtu = #{productCtu}</if>
|
|
<if test="upperNum != null and upperNum != ''"> and upperNum = #{upperNum}</if>
|
|
<if test="limitNum != null and limitNum != ''"> and limitNum = #{limitNum}</if>
|
|
<if test="enableFlag != null and enableFlag != ''"> and enableFlag = #{enableFlag}</if>
|
|
<if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>
|
|
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
|
|
<if test="inOrOutId != null and inOrOutId != ''"> and in_or_out_id = #{inOrOutId}</if>
|
|
<if test="inOrOutDId != null and inOrOutDId != ''"> and in_or_out_d_id = #{inOrOutDId}</if>
|
|
<if test="priceTotal != null and priceTotal != ''"> and priceTotal = #{priceTotal}</if>
|
|
<if test="origin != null and origin != ''"> and origin = #{origin}</if>
|
|
<if test="turnovertype != null and turnovertype != ''"> and turnovertype = #{turnovertype}</if>
|
|
<if test="account != null and account != ''"> and account = #{account}</if>
|
|
<if test="purpose != null and purpose != ''"> and purpose = #{purpose}</if>
|
|
<if test="units != null and units != ''"> and units = #{units}</if>
|
|
<if test="contract != null and contract != ''"> and contract = #{contract}</if>
|
|
<if test="cases != null and cases != ''"> and cases = #{cases}</if>
|
|
<if test="quality != null and quality != ''"> and quality = #{quality}</if>
|
|
<if test="managementNo != null and managementNo != ''"> and managementNo = #{managementNo}</if>
|
|
<if test="departmentId != null and departmentId != ''"> and (department_id = #{departmentId} or department_id is null or department_id = '')</if>
|
|
<if test="dateStart != null and dateStart != ''"> and finish_time >= #{dateStart}</if>
|
|
<if test="dateEnd != null and dateEnd != ''"> and finish_time <= #{dateEnd}</if>
|
|
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and cargo_space_id = #{cargoSpaceId}</if>
|
|
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
|
${params.warehouseDataScope}
|
|
</if>
|
|
order by create_time asc
|
|
</select>
|
|
|
|
<select id="selectViewInJobFlowByJobDetailId" parameterType="String" resultMap="ViewInJobFlowResult">
|
|
<include refid="selectViewInJobFlowVo"/>
|
|
where job_detail_id = #{jobDetailId}
|
|
</select>
|
|
|
|
<insert id="insertViewInJobFlow" parameterType="ViewInJobFlow">
|
|
insert into view_in_job_flow
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="jobDetailId != null">job_detail_id,</if>
|
|
<if test="jobId != null">job_id,</if>
|
|
<if test="taskNo != null and taskNo != ''">task_no,</if>
|
|
<if test="status != null and status != ''">status,</if>
|
|
<if test="inOrOut != null">in_or_out,</if>
|
|
<if test="trayCode != null">tray_code,</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="warehouseId != null">warehouse_id,</if>
|
|
<if test="productId != null">product_id,</if>
|
|
<if test="productName != null">product_name,</if>
|
|
<if test="parentId != null">parent_id,</if>
|
|
<if test="price != null">price,</if>
|
|
<if test="cargoNo != null">cargo_no,</if>
|
|
<if test="unit != null">unit,</if>
|
|
<if test="spec != null">spec,</if>
|
|
<if test="remark != null">remark,</if>
|
|
<if test="productType != null">productType,</if>
|
|
<if test="systemItem != null">systemItem,</if>
|
|
<if test="productCtm != null">productCtm,</if>
|
|
<if test="productCtu != null">productCtu,</if>
|
|
<if test="upperNum != null">upperNum,</if>
|
|
<if test="limitNum != null">limitNum,</if>
|
|
<if test="enableFlag != null">enableFlag,</if>
|
|
<if test="inQuantity != null">in_quantity,</if>
|
|
<if test="lotNo != null">lot_no,</if>
|
|
<if test="inOrOutId != null">in_or_out_id,</if>
|
|
<if test="inOrOutDId != null">in_or_out_d_id,</if>
|
|
<if test="priceTotal != null">priceTotal,</if>
|
|
<if test="origin != null">origin,</if>
|
|
<if test="turnovertype != null">turnovertype,</if>
|
|
<if test="account != null">account,</if>
|
|
<if test="purpose != null">purpose,</if>
|
|
<if test="units != null">units,</if>
|
|
<if test="contract != null">contract,</if>
|
|
<if test="cases != null">cases,</if>
|
|
<if test="quality != null">quality,</if>
|
|
<if test="managementNo != null">managementNo,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="jobDetailId != null">#{jobDetailId},</if>
|
|
<if test="jobId != null">#{jobId},</if>
|
|
<if test="taskNo != null and taskNo != ''">#{taskNo},</if>
|
|
<if test="status != null and status != ''">#{status},</if>
|
|
<if test="inOrOut != null">#{inOrOut},</if>
|
|
<if test="trayCode != null">#{trayCode},</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="warehouseId != null">#{warehouseId},</if>
|
|
<if test="productId != null">#{productId},</if>
|
|
<if test="productName != null">#{productName},</if>
|
|
<if test="parentId != null">#{parentId},</if>
|
|
<if test="price != null">#{price},</if>
|
|
<if test="cargoNo != null">#{cargoNo},</if>
|
|
<if test="unit != null">#{unit},</if>
|
|
<if test="spec != null">#{spec},</if>
|
|
<if test="remark != null">#{remark},</if>
|
|
<if test="productType != null">#{productType},</if>
|
|
<if test="systemItem != null">#{systemItem},</if>
|
|
<if test="productCtm != null">#{productCtm},</if>
|
|
<if test="productCtu != null">#{productCtu},</if>
|
|
<if test="upperNum != null">#{upperNum},</if>
|
|
<if test="limitNum != null">#{limitNum},</if>
|
|
<if test="enableFlag != null">#{enableFlag},</if>
|
|
<if test="inQuantity != null">#{inQuantity},</if>
|
|
<if test="lotNo != null">#{lotNo},</if>
|
|
<if test="inOrOutId != null">#{inOrOutId},</if>
|
|
<if test="inOrOutDId != null">#{inOrOutDId},</if>
|
|
<if test="priceTotal != null">#{priceTotal},</if>
|
|
<if test="origin != null">#{origin},</if>
|
|
<if test="turnovertype != null">#{turnovertype},</if>
|
|
<if test="account != null">#{account},</if>
|
|
<if test="purpose != null">#{purpose},</if>
|
|
<if test="units != null">#{units},</if>
|
|
<if test="contract != null">#{contract},</if>
|
|
<if test="cases != null">#{cases},</if>
|
|
<if test="quality != null">#{quality},</if>
|
|
<if test="managementNo != null">#{managementNo},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateViewInJobFlow" parameterType="ViewInJobFlow">
|
|
update view_in_job_flow
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="jobId != null">job_id = #{jobId},</if>
|
|
<if test="taskNo != null and taskNo != ''">task_no = #{taskNo},</if>
|
|
<if test="status != null and status != ''">status = #{status},</if>
|
|
<if test="inOrOut != null">in_or_out = #{inOrOut},</if>
|
|
<if test="trayCode != null">tray_code = #{trayCode},</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="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
|
<if test="productId != null">product_id = #{productId},</if>
|
|
<if test="productName != null">product_name = #{productName},</if>
|
|
<if test="parentId != null">parent_id = #{parentId},</if>
|
|
<if test="price != null">price = #{price},</if>
|
|
<if test="cargoNo != null">cargo_no = #{cargoNo},</if>
|
|
<if test="unit != null">unit = #{unit},</if>
|
|
<if test="spec != null">spec = #{spec},</if>
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
<if test="productType != null">productType = #{productType},</if>
|
|
<if test="systemItem != null">systemItem = #{systemItem},</if>
|
|
<if test="productCtm != null">productCtm = #{productCtm},</if>
|
|
<if test="productCtu != null">productCtu = #{productCtu},</if>
|
|
<if test="upperNum != null">upperNum = #{upperNum},</if>
|
|
<if test="limitNum != null">limitNum = #{limitNum},</if>
|
|
<if test="enableFlag != null">enableFlag = #{enableFlag},</if>
|
|
<if test="inQuantity != null">in_quantity = #{inQuantity},</if>
|
|
<if test="lotNo != null">lot_no = #{lotNo},</if>
|
|
<if test="inOrOutId != null">in_or_out_id = #{inOrOutId},</if>
|
|
<if test="inOrOutDId != null">in_or_out_d_id = #{inOrOutDId},</if>
|
|
<if test="priceTotal != null">priceTotal = #{priceTotal},</if>
|
|
<if test="origin != null">origin = #{origin},</if>
|
|
<if test="turnovertype != null">turnovertype = #{turnovertype},</if>
|
|
<if test="account != null">account = #{account},</if>
|
|
<if test="purpose != null">purpose = #{purpose},</if>
|
|
<if test="units != null">units = #{units},</if>
|
|
<if test="contract != null">contract = #{contract},</if>
|
|
<if test="cases != null">cases = #{cases},</if>
|
|
<if test="quality != null">quality = #{quality},</if>
|
|
<if test="managementNo != null">managementNo = #{managementNo},</if>
|
|
</trim>
|
|
where job_detail_id = #{jobDetailId}
|
|
</update>
|
|
|
|
<delete id="deleteViewInJobFlowByJobDetailId" parameterType="String">
|
|
delete from view_in_job_flow where job_detail_id = #{jobDetailId}
|
|
</delete>
|
|
|
|
<delete id="deleteViewInJobFlowByJobDetailIds" parameterType="String">
|
|
delete from view_in_job_flow where job_detail_id in
|
|
<foreach item="jobDetailId" collection="array" open="(" separator="," close=")">
|
|
#{jobDetailId}
|
|
</foreach>
|
|
</delete>
|
|
</mapper>
|