优化页面使用
This commit is contained in:
@@ -42,6 +42,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectBasTagVo"/>
|
||||
where tray_code = #{trayCode}
|
||||
</select>
|
||||
<select id="selectTestData" resultType="java.util.Map">
|
||||
select distinct tray_code as trayCode,dept_id as deptId
|
||||
from test_data
|
||||
where tray_code != '1' and dept_id = #{deptId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasTag" parameterType="BasTag" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into bas_tag
|
||||
@@ -66,6 +71,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="insertData">
|
||||
insert into test_data(tray_code) values ('1')
|
||||
</insert>
|
||||
|
||||
<update id="updateBasTag" parameterType="BasTag">
|
||||
update bas_tag
|
||||
|
||||
@@ -112,7 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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} or mj.department_id is null)</if>
|
||||
<if test="departmentId != null and departmentId != ''"> and (mj.department_id = #{departmentId} or mj.department_id is null or mj.department_id = '')</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>
|
||||
@@ -130,8 +130,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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'.toString "> and mj.in_or_out >=20 and mj.in_or_out not in(25,26)</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='1'.toString "> and mj.in_or_out < 20 and mj.in_or_out not in(5,6)</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='2'.toString "> and mj.in_or_out >=20 </if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='1'.toString "> and mj.in_or_out < 20 </if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='3'.toString "> and mj.in_or_out in (5,6)</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='4'.toString "> and mj.in_or_out in (25,26)</if>
|
||||
<if test = "inOutIds !=null and inOutIds.size() > 0">
|
||||
@@ -140,6 +140,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dateStart != null and dateStart != ''"> and mj.create_time >= #{dateStart}</if>
|
||||
<if test="dateEnd != null and dateEnd != ''"> and mj.create_time <= #{dateEnd}</if>
|
||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
|
||||
@@ -66,7 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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} or mj.department_id is null)</if>
|
||||
<if test="departmentId != null and departmentId != ''"> and (mj.department_id = #{departmentId} or mj.department_id is null or mj.department_id = '')</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>
|
||||
@@ -94,11 +94,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dateStart != null and dateStart != ''"> and mj.create_time >= #{dateStart}</if>
|
||||
<if test="dateEnd != null and dateEnd != ''"> and mj.create_time <= #{dateEnd}</if>
|
||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
</where>
|
||||
order by mj.create_time desc
|
||||
order by mj.status desc,mj.priority desc,mj.create_time asc
|
||||
</select>
|
||||
|
||||
<select id="selectMydoJobByJobId" parameterType="String" resultMap="MydoJobResult">
|
||||
|
||||
@@ -84,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="netWeight != null "> and net_weight = #{netWeight}</if>
|
||||
<if test="grossWeight != null "> and gross_weight = #{grossWeight}</if>
|
||||
<if test="distribution != null and distribution != ''"> and distribution = #{distribution}</if>
|
||||
<if test="model != null and model != ''"> and (model = #{model} or model is null)</if>
|
||||
<if test="model != null and model != ''"> and (model = #{model} or model is null or model = '')</if>
|
||||
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
|
||||
<if test="spare7 != null and spare7 != ''"> and spare7 = #{spare7}</if>
|
||||
<if test="spare8 != null and spare8 != ''"> and spare8 = #{spare8}</if>
|
||||
|
||||
@@ -60,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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 = #{trayCode}</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>
|
||||
@@ -93,10 +93,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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)</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 create_time >= #{dateStart}</if>
|
||||
<if test="dateEnd != null and dateEnd != ''"> and create_time <= #{dateEnd}</if>
|
||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
order by create_time asc
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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 = #{trayCode}</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="exitId != null and exitId != ''"> and exit_id = #{exitId}</if>
|
||||
@@ -93,11 +93,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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)</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 create_time >= #{dateStart}</if>
|
||||
<if test="dateEnd != null and dateEnd != ''"> and create_time <= #{dateEnd}</if>
|
||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time asc
|
||||
</select>
|
||||
|
||||
<select id="selectViewOutJobFlowByJobDetailId" parameterType="String" resultMap="ViewOutJobFlowResult">
|
||||
|
||||
@@ -88,7 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectViewStockDetailVo"/>
|
||||
<where>
|
||||
<if test="stockId != null and stockId != ''"> and bs.stock_id = #{stockId}</if>
|
||||
<if test="model != null and model != ''"> and (bs.model = #{model} or bs.model is null)</if>
|
||||
<if test="model != null and model != ''"> and (bs.model = #{model} or bs.model is null or bs.model = '')</if>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and bs.cargo_space_id = #{cargoSpaceId}</if>
|
||||
<if test="stockStatus != null and stockStatus != ''"> and bs.stock_status = #{stockStatus}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and bs.lot_no = #{lotNo}</if>
|
||||
@@ -96,7 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="backDate != null and backDate != ''"> and bs.back_date = #{backDate}</if>
|
||||
<if test="productName != null and productName != ''"> and bs.product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="quantity != null and quantity != ''"> and bs.quantity = #{quantity}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and bs.tray_code = #{trayCode}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and bs.tray_code like concat('%', #{trayCode},'%')</if>
|
||||
<if test="outQuantity != null and outQuantity != ''"> and bs.out_quantity = #{outQuantity}</if>
|
||||
<if test="stockinId != null and stockinId != ''"> and bs.stockin_id = #{stockinId}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and bs.warehouse_id = #{warehouseId}</if>
|
||||
|
||||
@@ -303,6 +303,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<update id="resetPdRecord">
|
||||
update bas_stock set spare7 = '0'
|
||||
</update>
|
||||
<update id="updateBasStockDept">
|
||||
update bas_stock
|
||||
set model = #{model}
|
||||
where warehouse_id = #{warehouseId} and tray_code = #{trayCode}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasStockByStockId" parameterType="String">
|
||||
delete from bas_stock where stock_id = #{stockId}
|
||||
@@ -326,4 +331,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
order by b.the_platoon,b.the_floor,b.the_column asc
|
||||
</select>
|
||||
<select id="selectBasStockSummary" resultType="com.ruoyi.stock.stock.domain.BasStockSummary">
|
||||
select DISTINCT bs.warehouse_id as warehouseId,
|
||||
bw.warehouse_name as warehouseName,
|
||||
bs.cargo_space_id as cargoSpaceId,
|
||||
bcs.cargo_space_name as cargoSpaceName,
|
||||
bs.tray_code as trayCode,
|
||||
bs.model as model,
|
||||
bcs.roadway_id as roadwayId,
|
||||
bcs.the_platoon as thePlatoon,
|
||||
bcs.the_column as theColumn,
|
||||
bcs.the_floor as theFloor,
|
||||
bcs.the_type as theType,
|
||||
bcs.the_type_name as theTypeName
|
||||
from bas_stock bs
|
||||
left join bas_cargo_space bcs on bs.cargo_space_id = bcs.cargo_space_id and bs.tray_code = bcs.tray_code
|
||||
left join bas_warehouse bw on bcs.warehouse_id = bw.warehouse_id
|
||||
WHERE bcs.status = '2'
|
||||
<if test="model != null and model != ''">
|
||||
and (bs.model = #{model} or bs.model is null or bs.model = '')
|
||||
</if>
|
||||
<if test="warehouseId != null and warehouseId != ''">
|
||||
and bs.warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
<if test="trayCode != null and trayCode != ''">
|
||||
and bs.tray_code like concat('%',#{trayCode},'%');
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user