仓库管理修改

liweidong
wusiyu 3 days ago
parent ff043b6966
commit a2f2e03a75
  1. 6
      blade-service/blade-wms/src/main/java/org/springblade/wms/controller/StStorageLocationController.java
  2. 35
      blade-service/blade-wms/src/main/java/org/springblade/wms/excel/StStorageLocationExcel.java
  3. 8
      blade-service/blade-wms/src/main/java/org/springblade/wms/mapper/StStorageLocationMapper.xml

@ -19,6 +19,7 @@ import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.annotation.IsAdmin;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.constant.BladeConstant;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.wms.excel.StStorageLocationExcel;
@ -26,6 +27,7 @@ import org.springblade.wms.pojo.entity.StStorageLocation;
import org.springblade.wms.pojo.vo.StStorageLocationVO;
import org.springblade.wms.service.IStRealtimeStockService;
import org.springblade.wms.service.IStStorageLocationService;
import org.springblade.wms.service.IStStorehouseService;
import org.springblade.wms.wrapper.StStorageLocationWrapper;
import org.springframework.web.bind.annotation.*;
@ -51,6 +53,8 @@ public class StStorageLocationController extends BladeController {
private final IStRealtimeStockService stRealtimeStockService;
private final IStStorehouseService stStorehouseService;
/**
* 库位维护表 详情
*/
@ -236,7 +240,7 @@ public class StStorageLocationController extends BladeController {
//if (!AuthUtil.isAdministrator()) {
// queryWrapper.lambda().eq(StStorageLocation::getTenantId, bladeUser.getTenantId());
//}
//queryWrapper.lambda().eq(StStorageLocationEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
queryWrapper.lambda().eq(StStorageLocation::getIsDeleted, BladeConstant.DB_NOT_DELETED);
List<StStorageLocationExcel> list = stStorageLocationService.exportStStorageLocation(queryWrapper);
ExcelUtil.export(response, "库位维护表数据" + DateUtil.time(), "库位维护表数据表", list, StStorageLocationExcel.class);
}

@ -28,29 +28,11 @@ public class StStorageLocationExcel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
* 所属库房
*/
@ColumnWidth(20)
@ExcelProperty("主键")
private Long id;
/**
* 租户ID默认值000000
*/
@ColumnWidth(20)
@ExcelProperty("租户ID(默认值:000000)")
private String tenantId;
/**
* 是否已删除默认值0
*/
@ColumnWidth(20)
@ExcelProperty("是否已删除(默认值:0)")
private Long isDeleted;
/**
* 库房ID关联st_storehouse表
*/
@ColumnWidth(20)
@ExcelProperty("库房ID(关联st_storehouse表)")
private Long shId;
@ExcelProperty("所属库房")
private String shName;
/**
* 库位号
*/
@ -58,10 +40,10 @@ public class StStorageLocationExcel implements Serializable {
@ExcelProperty("库位号")
private String location;
/**
* 物料编号关联st_goods表goods_code字段
* 物料编号
*/
@ColumnWidth(20)
@ExcelProperty("物料编号(关联st_goods表goods_code字段)")
@ExcelProperty("物料编号")
private String goodsCode;
/**
* 物料名称
@ -81,12 +63,7 @@ public class StStorageLocationExcel implements Serializable {
@ColumnWidth(20)
@ExcelProperty("型号/牌号")
private String materialModel;
/**
* 部门ID
*/
@ColumnWidth(20)
@ExcelProperty("部门ID")
private Long deptId;
}

@ -125,7 +125,13 @@
<select id="exportStStorageLocation" resultType="org.springblade.wms.excel.StStorageLocationExcel">
SELECT * FROM ST_STORAGE_LOCATION ${ew.customSqlSegment}
SELECT
sl.*,
sh.sh_name
FROM st_storage_location sl
LEFT JOIN st_storehouse sh
ON sl.sh_id = sh.id
${ew.customSqlSegment}
</select>
</mapper>

Loading…
Cancel
Save