待盘点列表数据

main
judy 1 year ago
parent eb58395b79
commit a46836d7be
  1. 71
      shkj-wms/src/main/java/com/shkj/wms/bo/BusinStockInvQueryBo.java
  2. 2
      shkj-wms/src/main/java/com/shkj/wms/controller/business/BusinStockInvController.java
  3. 79
      shkj-wms/src/main/java/com/shkj/wms/vo/BusinStockInvVo.java
  4. 86
      shkj-wms/src/main/resources/mapper/wms/BusinStockInvMapper.xml

@ -42,80 +42,29 @@ public class BusinStockInvQueryBo extends BaseEntity {
/**
* 盘点单号
* 巷道
*/
private String invOrderNo;
private String tunnel;
/**
* 盘点方式 明盘 open 盲盘 close
*
*/
private String invWay;
/**
* 仓库库位code
*/
private String locationCode;
private String locationRow;
/**
* 盘点类型
*/
private String invType;
/**
* 物料Id
*/
private String goodId;
/**
* 物料编码
*/
private String goodCode;
/**
* 单位
*/
@Excel(name = "单位", width = 20)
private String unit;
/**
* 库存状态合格/不合格/待检/退货
*/
private String status;
/**
* 差异状态
*/
private String diffStatus;
/**
* 前端不需要传递
*
*/
private String invStatus;
/**
* 托盘号
*/
private String containerCode;
/**
* 订单类型 9盘点出库 10盘点入库
*/
private String orderType;
private String locationColumn;
/**
* 前端不需要传递
*/
private String haveDifference;
/**
* 执行盘点时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date execTime;
/**
* 完成盘点时间
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date endTime;
private String layer;
/**
* 物料Id集合
*/
private List<Long> goodIdsList;
/**
* 是否盘点中 1
* 前端不需要传递
*/
private String inProgress;
private String invStatus;
}

@ -47,7 +47,7 @@ public class BusinStockInvController extends BaseController {
/**
* 查询盘点计划列表
* 查询盘点计划列表
*/
@GetMapping("/list")
public TableDataInfo<BusinStockInvVo> list(BusinStockInvQueryBo bo) {

@ -14,95 +14,44 @@ import java.math.BigDecimal;
* @date 2022-06-10
*/
@Data
public class BusinStockInvVo extends BusinStockInv {
public class BusinStockInvVo {
private static final long serialVersionUID = 1L;
/**
* 货主名称
* 盘点单号
*/
@Excel(name = "主键", sort = 1, width = 20)
private String consignorName;
private Long invId;
/**
* 主编码
* 位ID
*/
@Excel(name = "主键", sort = 0, width = 20)
private String consignorCode;
private Long locationId;
/**
* 实际数量
*/
private BigDecimal actualQty;
/**
* 出数量
*/
private BigDecimal outQty;
/**
* 物料编码
*/
private String goodNo;
/**
* 物料名称
*/
private String goodName;
/**
* 规格
*/
private String specifications;
/**
* 批号
*/
private String batchNo;
/**
* 单位
*/
private String unit;
/**
* 货位code
* 货位编号
*/
private String locationCode;
/**
* 库区
*/
private String areaCode;
/**
* 托盘代码
* 车型
*/
private String containerCode;
/**
* 货位分组
*/
private String locationGroup;
private String vehicheModel;
/**
* 库区名
* 颜色
*/
private String areaName;
private String color;
/**
* 库别
* 货位状态
*/
private String storageCode;
private String locationStatus;
/**
* 库别名称
*/
private String storageName;
/**
* 货位名称
*/
private String locationName;
/**
* 库存Id
* 保险杠数量
*/
private String stockId;
private String goodQty;

@ -39,87 +39,29 @@
<select id="queryList" resultType="com.shkj.wms.vo.BusinStockInvVo"
parameterType="com.shkj.wms.bo.BusinStockInvQueryBo">
SELECT
g.good_no,
g.good_name,
g.specifications,
g.storage_classify,
g.storage_conditions,
g.abc_classify,
c.consignor_code,
c.consignor_name,
si.quantity AS qty,
a.taskmode,
bp.package_qty,
bp.waster,
bp.factory,
bp.unit,
b.batch_no,
b.production_date,
b.expired_date,
l.location_code,
l.location_name,
l.location_group,
b.batch_no,
bs.storage_name,
a.area_code,
si.*
si.id as invId, loc.id as locationId,loc.location_code,goods.vehiche_model,goods.color,loc.location_status,count(stock.id) goodQty
FROM
busin_stock_inv si
JOIN base_goods g ON si.good_id = g.id
JOIN base_consignor c ON si.consignor_id = c.id
JOIN base_location l ON si.location_id = l.id
JOIN sys_batch b ON b.id = si.batch_id
JOIN base_package bp ON bp.id = b.package_id
JOIN base_area a ON l.area_id = a.id
JOIN base_storage bs ON a.storage_id = bs.id
WHERE g.is_del = 0 AND l.is_del = 0
<if test="orderType!=null and orderType!=''">
and si.order_type=#{orderType}
</if>
<if test="inProgress!=null">
and si.inv_status not in('end','cancel')
</if>
JOIN base_location loc ON si.location_id = loc.id
left join sys_stock_detail stock on stock.location_id=loc.id
left join base_goods_data goods ON stock.goods_no =goods.goods_no
<if test="invStatus != null and invStatus != ''">
and si.inv_status = #{invStatus}
</if>
<if test="diffStatus != null and diffStatus != ''">
and si.diff_status = #{diffStatus}
</if>
<if test="invWay != null and invWay != ''">
and si.inv_way = #{invWay}
</if>
<if test="goodId!=null and goodId!=''">
and si.good_id=#{goodId}
<if test="tunnel != null and tunnel != ''">
AND loc.tunnel = #{tunnel}
</if>
<if test="goodIdsList!=null">
and si.good_id in
<foreach collection="goodIdsList" item="goodId" open="(" separator="," close=")">
#{goodId}
</foreach>
<if test="locationRow != null and locationRow != ''">
AND loc.location_row = #{locationRow}
</if>
<if test="invOrderNo != null and invOrderNo != ''">
and si.inv_order_no like concat('%', #{invOrderNo},'%')
<if test="locationColumn != null and locationColumn != ''">
AND loc.location_column = #{locationColumn}
</if>
<if test="locationCode != null and locationCode != ''">
AND (
l.location_code LIKE CONCAT('%', #{locationCode}, '%')
OR l.location_name LIKE CONCAT('%', #{locationCode}, '%')
)
<if test="layer !=null and layer !='' ">
and loc.layer=#{layer}
</if>
<if test="goodCode!=null and goodCode!=''">
AND (
g.good_no LIKE CONCAT('%', #{goodCode}, '%')
OR g.good_name LIKE CONCAT('%', #{goodCode}, '%')
)
</if>
<if test="execTime!=null">
and si.exec_time>=#{execTime}
</if>
<if test="endTime!=null">
and si.end_time&lt;=#{endTime}
</if>
${consignorParams.dataScopeConsignor}
group by si.id,loc.id,loc.location_code,goods.vehiche_model,goods.color,loc.location_status
ORDER BY loc.route
</select>
<select id="queryListByGoodsGroup" resultType="com.shkj.wms.vo.BusinStockInvVo"
parameterType="com.shkj.wms.bo.BusinStockInvQueryBo">

Loading…
Cancel
Save