Commit dbaf91ed by 胡懿

入库明细统计接口增加返回单价信息

parent 437f11c7
...@@ -22,7 +22,8 @@ public class CountStorageInfo extends DataEntity<StorageInfo> { ...@@ -22,7 +22,8 @@ public class CountStorageInfo extends DataEntity<StorageInfo> {
private GoodsInfo goodsInfo; // 货品明细id private GoodsInfo goodsInfo; // 货品明细id
private Shelves shelves; // 货架id private Shelves shelves; // 货架id
private Warehouse warehouse; // 仓库外键 private Warehouse warehouse; // 仓库外键
private BigDecimal sum; // 单价 private BigDecimal sum; // 总价
private BigDecimal amount; // 单价
private int num; // 数量 private int num; // 数量
private String state; // 入库状态 private String state; // 入库状态
...@@ -132,4 +133,12 @@ public class CountStorageInfo extends DataEntity<StorageInfo> { ...@@ -132,4 +133,12 @@ public class CountStorageInfo extends DataEntity<StorageInfo> {
public void setState(String state) { public void setState(String state) {
this.state = state; this.state = state;
} }
public BigDecimal getAmount() {
return amount;
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
} }
...@@ -202,6 +202,7 @@ ...@@ -202,6 +202,7 @@
type.name AS "type.name", type.name AS "type.name",
a.model AS "model", a.model AS "model",
sum(a.amount) AS "sum", sum(a.amount) AS "sum",
a.amount AS "amount",
a.goods_info_id AS "goodsInfo.id", a.goods_info_id AS "goodsInfo.id",
a.shelves_id AS "shelves.id", a.shelves_id AS "shelves.id",
s.name AS "shelves.name", s.name AS "shelves.name",
...@@ -221,7 +222,7 @@ ...@@ -221,7 +222,7 @@
AND a.storage_id = #{storage.id} AND a.storage_id = #{storage.id}
</if> </if>
</where> </where>
GROUP BY a.goods_info_id,a.shelves_id,qr.state GROUP BY a.goods_info_id,a.shelves_id,qr.state,a.amount
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -90,6 +90,7 @@ public class StorageService extends CrudService<StorageMapper, Storage> { ...@@ -90,6 +90,7 @@ public class StorageService extends CrudService<StorageMapper, Storage> {
csi.setName(c.getName()); csi.setName(c.getName());
csi.setType(c.getType()); csi.setType(c.getType());
csi.setState(c.getState()); csi.setState(c.getState());
csi.setAmount(c.getAmount());
} }
if (i != list.size() - 1) { if (i != list.size() - 1) {
shelvesNames = shelvesNames + c.getShelves().getName() + ","; shelvesNames = shelvesNames + c.getShelves().getName() + ",";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment