Commit 5a9423a2 by zhangtw

入库明细统计修改

parent b5531cfe
...@@ -51,9 +51,10 @@ export function delInbound_items(id) { ...@@ -51,9 +51,10 @@ export function delInbound_items(id) {
} }
// 统计入库单明细 // 统计入库单明细
export function inbound_details(){ export function inbound_details(query){
return request({ return request({
url: '/inventory/inbound_items/details', url: '/inventory/inbound_items/details',
method: 'get' method: 'get',
params: query
}) })
} }
...@@ -468,11 +468,11 @@ export default { ...@@ -468,11 +468,11 @@ export default {
// 根据字典类型和值,获取对应的listClass(标签样式) // 根据字典类型和值,获取对应的listClass(标签样式)
getDictListClass(dictType, value) { getDictListClass(dictType, value) {
const dictList = this.dict.type[dictType] || [] const dictList = this.dict.type[dictType] || []
if (!value) return 'info' if (!value) return ''
const dictItem = dictList.find(item => item.value === value+"") const dictItem = dictList.find(item => item.value === value+"")
// 兼容raw和直接属性两种写法 // 兼容raw和直接属性两种写法
return dictItem?.raw?.listClass || 'info' return dictItem?.raw?.listClass
}, },
// 根据字典类型和值,获取对应的显示标签 // 根据字典类型和值,获取对应的显示标签
......
...@@ -141,7 +141,8 @@ public class InboundOrderItemsController extends BaseController ...@@ -141,7 +141,8 @@ public class InboundOrderItemsController extends BaseController
public TableDataInfo itemDetails(InboundDetailsVO inboundDetailsVO) throws Exception public TableDataInfo itemDetails(InboundDetailsVO inboundDetailsVO) throws Exception
{ {
startPage(); startPage();
List<InboundDetailsVO> list = inboundOrderItemsService.selectInboundDetailsVOBySapNo(); System.out.println(inboundDetailsVO);
List<InboundDetailsVO> list = inboundOrderItemsService.selectInboundDetailsVOBySapNo(inboundDetailsVO);
return getDataTable(list); return getDataTable(list);
} }
} }
...@@ -72,5 +72,5 @@ public interface InboundOrderItemsMapper ...@@ -72,5 +72,5 @@ public interface InboundOrderItemsMapper
* 统计入库单明细 * 统计入库单明细
* @return 结果 * @return 结果
*/ */
public List<InboundDetailsVO> selectInboundDetailsVOBySapNo(); public List<InboundDetailsVO> selectInboundDetailsVOBySapNo(InboundDetailsVO inboundDetailsVO);
} }
...@@ -74,5 +74,5 @@ public interface IInboundOrderItemsService ...@@ -74,5 +74,5 @@ public interface IInboundOrderItemsService
* 统计入库单明细 * 统计入库单明细
* @return 结果 * @return 结果
*/ */
public List<InboundDetailsVO> selectInboundDetailsVOBySapNo(); public List<InboundDetailsVO> selectInboundDetailsVOBySapNo(InboundDetailsVO inboundDetailsVO);
} }
...@@ -176,7 +176,7 @@ public class InboundOrderItemsServiceImpl implements IInboundOrderItemsService ...@@ -176,7 +176,7 @@ public class InboundOrderItemsServiceImpl implements IInboundOrderItemsService
} }
@Override @Override
public List<InboundDetailsVO> selectInboundDetailsVOBySapNo() { public List<InboundDetailsVO> selectInboundDetailsVOBySapNo(InboundDetailsVO inboundDetailsVO) {
return inboundOrderItemsMapper.selectInboundDetailsVOBySapNo(); return inboundOrderItemsMapper.selectInboundDetailsVOBySapNo(inboundDetailsVO);
} }
} }
...@@ -336,7 +336,7 @@ ...@@ -336,7 +336,7 @@
<result column="inbound_date" property="inboundDate"/> <result column="inbound_date" property="inboundDate"/>
</resultMap> </resultMap>
<select id="selectInboundDetailsVOBySapNo" resultMap="InboundDetailsResultMap"> <select id="selectInboundDetailsVOBySapNo" resultMap="InboundDetailsResultMap" parameterType="com.ruoyi.inventory.domain.vo.InboundDetailsVO">
SELECT SELECT
ioi.material_id, ioi.material_id,
ms.material_name, ms.material_name,
...@@ -358,7 +358,30 @@ ...@@ -358,7 +358,30 @@
INNER JOIN materials ms ON ms.sap_no = ioi.material_id INNER JOIN materials ms ON ms.sap_no = ioi.material_id
inner join warehouses w on ioi.warehouse_id = w.id inner join warehouses w on ioi.warehouse_id = w.id
inner join storage_locations sl on ioi.location_id = sl.id inner join storage_locations sl on ioi.location_id = sl.id
WHERE io.order_status = 2 <where>
io.order_status = 2
<if test="materialId != null and materialId != ''">
AND ioi.material_id = #{materialId}
</if>
<if test="materialName != null and materialName != ''">
AND ms.material_name LIKE CONCAT('%', #{materialName}, '%')
</if>
<if test="orderId != null and orderId != ''">
AND ioi.order_id = #{orderId}
</if>
<if test="batchId != null and batchId != ''">
AND ioi.batch_id = #{batchId}
</if>
<if test="warehouseId != null and warehouseId != ''">
AND ioi.warehouse_id = #{warehouseId}
</if>
<if test="locationId != null and locationId != ''">
AND ioi.location_id = #{locationId}
</if>
<if test="labelColor != null and labelColor != ''">
AND ioi.label_color = #{labelColor}
</if>
</where>
GROUP BY GROUP BY
ioi.material_id, ioi.material_id,
ioi.batch_id, ioi.batch_id,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论