库存维护记录
This commit is contained in:
@@ -30,46 +30,65 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="classId" column="class_id" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="faultFlag" column="fault_flag" />
|
||||
<result property="supplierName" column="supplier_name" />
|
||||
<result property="customerName" column="customer_name" />
|
||||
<result property="cargoSpaceName" column="cargo_space_name" />
|
||||
<result property="targetCargoSpaceName" column="target_cargo_space_name" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
</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
|
||||
select mj.job_id, mj.status, mj.on_line_type, mj.task_no, mj.supplier_id,
|
||||
mj.customer_id, mj.department_id, mj.tray_code, mj.roadway_id, mj.cargo_space_id,
|
||||
mj.target_roadway_id, mj.target_cargo_space_id, mj.line_id, mj.workshop_id, mj.priority,
|
||||
mj.execution_phase, mj.in_or_out, mj.create_time, mj.start_time, mj.finish_time, mj.entrance_id,
|
||||
mj.exit_id, mj.class_id, mj.warehouse_id, mj.fault_flag,
|
||||
bs.supplier_name as supplier_name, bc.customer_name as customer_name,
|
||||
bcs.cargo_space_name as cargo_space_name, bcst.cargo_space_name as target_cargo_space_name,
|
||||
bw.warehouse_name as warehouse_name
|
||||
from mydo_job mj
|
||||
left join bas_supplier bs on mj.supplier_id = bs.id
|
||||
left join bas_customer bc on mj.customer_id = bc.id
|
||||
left join bas_cargo_space bcs on mj.cargo_space_id = bcs.cargo_space_id
|
||||
left join bas_cargo_space bcst on mj.target_cargo_space_id = bcst.cargo_space_id
|
||||
left join bas_warehouse bw on mj.warehouse_id = bw.warehouse_id
|
||||
|
||||
</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>
|
||||
<if test="inOut != null and inOut != '' and inOut ='2' "> and in_or_out >=20</if>
|
||||
<if test="jobId != null and jobId != ''"> and mj.job_id = #{jobId}</if>
|
||||
<if test="status != null and status != ''"> and mj.status = #{status}</if>
|
||||
<if test="onLineType != null and onLineType != ''"> and mj.on_line_type = #{onLineType}</if>
|
||||
<if test="taskNo != null and taskNo != ''"> and mj.task_no = #{taskNo}</if>
|
||||
<if test="supplierId != null and supplierId != ''"> and mj.supplier_id = #{supplierId}</if>
|
||||
<if test="customerId != null and customerId != ''"> and mj.customer_id = #{customerId}</if>
|
||||
<if test="departmentId != null and departmentId != ''"> and mj.department_id = #{departmentId}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and mj.tray_code = #{trayCode}</if>
|
||||
<if test="roadwayId != null and roadwayId != ''"> and mj.roadway_id = #{roadwayId}</if>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and mj.cargo_space_id = #{cargoSpaceId}</if>
|
||||
<if test="targetRoadwayId != null and targetRoadwayId != ''"> and mj.target_roadway_id = #{targetRoadwayId}</if>
|
||||
<if test="targetCargoSpaceId != null and targetCargoSpaceId != ''"> and mj.target_cargo_space_id = #{targetCargoSpaceId}</if>
|
||||
<if test="lineId != null and lineId != ''"> and mj.line_id = #{lineId}</if>
|
||||
<if test="workshopId != null and workshopId != ''"> and mj.workshop_id = #{workshopId}</if>
|
||||
<if test="priority != null "> and mj.priority = #{priority}</if>
|
||||
<if test="executionPhase != null and executionPhase != ''"> and mj.execution_phase = #{executionPhase}</if>
|
||||
<if test="inOrOut != null and inOrOut != ''"> and mj.in_or_out = #{inOrOut}</if>
|
||||
<if test="startTime != null and startTime != ''"> and mj.start_time = #{startTime}</if>
|
||||
<if test="finishTime != null and finishTime != ''"> and mj.finish_time = #{finishTime}</if>
|
||||
<if test="entranceId != null and entranceId != ''"> and mj.entrance_id = #{entranceId}</if>
|
||||
<if test="exitId != null and exitId != ''"> and mj.exit_id = #{exitId}</if>
|
||||
<if test="classId != null and classId != ''"> and mj.class_id = #{classId}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and mj.warehouse_id = #{warehouseId}</if>
|
||||
<if test="faultFlag != null and faultFlag != ''"> and mj.fault_flag = #{faultFlag}</if>
|
||||
<if test="inOut != null and inOut != '' and inOut ='2' "> and mj.in_or_out >=20</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMydoJobByJobId" parameterType="String" resultMap="MydoJobResult">
|
||||
<include refid="selectMydoJobVo"/>
|
||||
where job_id = #{jobId}
|
||||
where mj.job_id = #{jobId}
|
||||
</select>
|
||||
|
||||
<insert id="insertMydoJob" parameterType="MydoJob">
|
||||
|
||||
Reference in New Issue
Block a user