管理员可以出本仓库任意货位

This commit is contained in:
liuhanqing
2026-01-18 11:15:56 +08:00
parent bd5201e56f
commit 149a036f82
4 changed files with 87 additions and 2 deletions

View File

@@ -164,6 +164,43 @@ public class ViewHandAllotStock extends BaseEntity
@Excel(name = "货位名称")
private String cargoSpaceName;
private String roadwayId;
private String thePlatoon;
private String theColumn;
private String theFloor;
public String getRoadwayId() {
return roadwayId;
}
public void setRoadwayId(String roadwayId) {
this.roadwayId = roadwayId;
}
public String getThePlatoon() {
return thePlatoon;
}
public void setThePlatoon(String thePlatoon) {
this.thePlatoon = thePlatoon;
}
public String getTheColumn() {
return theColumn;
}
public void setTheColumn(String theColumn) {
this.theColumn = theColumn;
}
public String getTheFloor() {
return theFloor;
}
public void setTheFloor(String theFloor) {
this.theFloor = theFloor;
}
public void setStockId(String stockId)
{
this.stockId = stockId;

View File

@@ -62,11 +62,13 @@ public class ViewHandAllotStockServiceImpl implements IViewHandAllotStockService
if (first.isPresent()){
//二联合普通人员
viewHandAllotStock.setWarehouseId("02");
viewHandAllotStock.setModel(Convert.toStr(SecurityUtils.getDeptId()));
}
Optional<SysRole> first1 = roles.stream().filter(x -> "role2".equals(x.getRoleKey())).findFirst();
if (first1.isPresent()){
//三联合普通人员
viewHandAllotStock.setWarehouseId("01");
viewHandAllotStock.setModel(Convert.toStr(SecurityUtils.getDeptId()));
}
Optional<SysRole> first2 = roles.stream().filter(x -> "role3".equals(x.getRoleKey())).findFirst();
if (first2.isPresent()){
@@ -78,7 +80,6 @@ public class ViewHandAllotStockServiceImpl implements IViewHandAllotStockService
//三联合管理员
viewHandAllotStock.setWarehouseId("01");
}
viewHandAllotStock.setModel(Convert.toStr(SecurityUtils.getDeptId()));
}
return viewHandAllotStockMapper.selectViewHandAllotStockList(viewHandAllotStock);
}

View File

@@ -42,10 +42,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="spare7" column="spare7" />
<result property="spare8" column="spare8" />
<result property="cargoSpaceName" column="cargo_space_name" />
<result property="thePlatoon" column="the_platoon" />
<result property="theColumn" column="the_column" />
<result property="theFloor" column="the_floor" />
<result property="roadwayId" column="roadway_id" />
</resultMap>
<sql id="selectViewHandAllotStockVo">
select stock_id, cargo_space_id, stock_status, product_status, lot_no, in_date, back_date, product_guid, quantity, job_id, tray_code, out_quantity, stockin_detail_id, stockin_id, in_type, in_class_id, warehouse_id, stacking_id, spare1, spare2, spare3, spare4, spare5, spare6, product_id, product_name, voltage, power, phase, net_weight, gross_weight, distribution, model, order_id, spare7, spare8, cargo_space_name from view_hand_allot_stock vhat
select stock_id, cargo_space_id, stock_status, product_status, lot_no, in_date, back_date, product_guid, quantity, job_id, tray_code, out_quantity, stockin_detail_id, stockin_id, in_type, in_class_id, warehouse_id, stacking_id, spare1, spare2, spare3, spare4, spare5, spare6, product_id, product_name, voltage, power, phase, net_weight, gross_weight, distribution, model, order_id, spare7, spare8, cargo_space_name,roadway_id,
the_platoon,
the_column,
the_floor from view_hand_allot_stock vhat
</sql>
<select id="selectViewHandAllotStockList" parameterType="ViewHandAllotStock" resultMap="ViewHandAllotStockResult">
@@ -89,6 +96,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="spare7 != null and spare7 != ''"> and spare7 = #{spare7}</if>
<if test="spare8 != null and spare8 != ''"> and spare8 = #{spare8}</if>
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
<if test="roadwayId != null and roadwayId != ''"> and roadway_id = #{roadwayId}</if>
<if test="thePlatoon != null and thePlatoon != ''"> and the_platoon = #{thePlatoon}</if>
<if test="theColumn != null and theColumn != ''"> and the_column = #{theColumn}</if>
<if test="theFloor != null and theFloor != ''"> and the_floor = #{theFloor}</if>
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
</if>