|
@@ -74,13 +74,18 @@
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="queryDriverReplenishNum" resultType="com.yr.warehouse.admin.replenish.vo.DriverGoodsOrderNumVo">
|
|
<select id="queryDriverReplenishNum" resultType="com.yr.warehouse.admin.replenish.vo.DriverGoodsOrderNumVo">
|
|
|
- select IFNULL(oas.id, roi.area_staff_id) as areaStaffId, rod.goods_id as goodsId, sum(rod.real_picking_number) as totalNum
|
|
|
|
|
|
|
+ select IFNULL(oas.id, roi.area_staff_id) as areaStaffId,
|
|
|
|
|
+ rod.goods_id as goodsId,
|
|
|
|
|
+ sum(rod.real_picking_number) as totalNum
|
|
|
from yr_replenish_order_detail as rod
|
|
from yr_replenish_order_detail as rod
|
|
|
left join yr_replenish_order_info as roi on rod.order_number = roi.order_number
|
|
left join yr_replenish_order_info as roi on rod.order_number = roi.order_number
|
|
|
- left join yr_operators_area_staff as oas on roi.replenish_user_id = oas.accountId
|
|
|
|
|
|
|
+ left join (select id, accountId
|
|
|
|
|
+ from yr_operators_area_staff
|
|
|
|
|
+ where isDelete = 'NORMAL'
|
|
|
|
|
+ group by accountId) as oas on roi.replenish_user_id = oas.accountId
|
|
|
where roi.replenish_time between #{beginTime} and #{endTime}
|
|
where roi.replenish_time between #{beginTime} and #{endTime}
|
|
|
and roi.replenish_status = 2
|
|
and roi.replenish_status = 2
|
|
|
- group by roi.area_staff_id, rod.goods_id
|
|
|
|
|
|
|
+ group by oas.id, rod.goods_id
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="queryDeviceReplenishNum" resultType="com.yr.warehouse.admin.replenish.vo.DriverGoodsOrderNumVo">
|
|
<select id="queryDeviceReplenishNum" resultType="com.yr.warehouse.admin.replenish.vo.DriverGoodsOrderNumVo">
|
|
@@ -99,6 +104,7 @@
|
|
|
left join yr_warehouse_back_order_info as wboi on wbod.backOrderId = wboi.id
|
|
left join yr_warehouse_back_order_info as wboi on wbod.backOrderId = wboi.id
|
|
|
left join (select id, accountId
|
|
left join (select id, accountId
|
|
|
from yr_operators_area_staff
|
|
from yr_operators_area_staff
|
|
|
|
|
+ where isDelete = 'NORMAL'
|
|
|
group by accountId) as oas on oas.accountId = wboi.replenishId
|
|
group by accountId) as oas on oas.accountId = wboi.replenishId
|
|
|
where wboi.backTime between #{beginTime} and #{endTime}
|
|
where wboi.backTime between #{beginTime} and #{endTime}
|
|
|
and wboi.backStatus = 'BACK_SUCCESS'
|
|
and wboi.backStatus = 'BACK_SUCCESS'
|