fix(bin): 调整库存VO字段与SQL映射
- 移除BinInventoryVO中的id和materialNo字段 - 在SQL查询中为sum数量添加别名num以匹配VO字段 - 保持接口与数据库字段的一致性,修正映射错误
This commit is contained in:
parent
73c835f7ff
commit
c9cc53b9cd
|
|
@ -7,18 +7,11 @@ import java.math.BigDecimal;
|
||||||
@Data
|
@Data
|
||||||
public class BinInventoryVO {
|
public class BinInventoryVO {
|
||||||
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 储位编码
|
* 储位编码
|
||||||
*/
|
*/
|
||||||
private String no;
|
private String no;
|
||||||
|
|
||||||
/**
|
|
||||||
* 物料编码
|
|
||||||
*/
|
|
||||||
private String materialNo;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数量
|
* 数量
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getInventory" resultType="com.nflg.wms.common.pojo.vo.BinInventoryVO">
|
<select id="getInventory" resultType="com.nflg.wms.common.pojo.vo.BinInventoryVO">
|
||||||
SELECT b."no",COALESCE(SUM(i.num),0)
|
SELECT b."no",COALESCE(SUM(i.num),0) as num
|
||||||
FROM wms_bin b
|
FROM wms_bin b
|
||||||
LEFT JOIN wms_storage_bin sb ON sb.bin_id=b."id"
|
LEFT JOIN wms_storage_bin sb ON sb.bin_id=b."id"
|
||||||
LEFT JOIN wms_storage s ON s."id"=sb.storage_id
|
LEFT JOIN wms_storage s ON s."id"=sb.storage_id
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue