仓库管理修改

liweidong
wusiyu 3 days ago
parent f9206c28e8
commit 8bfcc55c9b
  1. 20
      blade-service/blade-wms/src/main/java/org/springblade/wms/controller/StStorehouseController.java
  2. 57
      blade-service/blade-wms/src/main/java/org/springblade/wms/excel/StStorehouseExcel.java
  3. 7
      blade-service/blade-wms/src/main/java/org/springblade/wms/mapper/StStorehouseMapper.xml

@ -1,5 +1,6 @@
package org.springblade.wms.controller;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
@ -337,6 +338,25 @@ public class StStorehouseController extends BladeController {
//if (!AuthUtil.isAdministrator()) {
// queryWrapper.lambda().eq(StStorehouse::getTenantId, bladeUser.getTenantId());
//}
String shCode = Func.toStr(stStorehouse.get("shCode"));
if (StrUtil.isNotBlank(shCode)) {
queryWrapper.lambda().like(StStorehouse::getShCode, shCode);
}
// 库房名称模糊查询
String shName = Func.toStr(stStorehouse.get("shName"));
if (StrUtil.isNotBlank(shName)) {
queryWrapper.lambda().like(StStorehouse::getShName, shName);
}
// 所属工装类型精准匹配
String toolingType = Func.toStr(stStorehouse.get("toolingType"));
if (StrUtil.isNotBlank(toolingType)) {
queryWrapper.lambda().eq(StStorehouse::getToolingType, toolingType);
}
// 保管员ID精准匹配(下拉框传ID)
Long saveUser = Func.toLong(stStorehouse.get("saveUser"));
if (saveUser != null) {
queryWrapper.lambda().eq(StStorehouse::getSaveUser, saveUser);
}
//queryWrapper.lambda().eq(StStorehouseEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
List<StStorehouseExcel> list = stStorehouseService.exportStStorehouse(queryWrapper);
ExcelUtil.export(response, "库房维护表数据" + DateUtil.time(), "库房维护表数据表", list, StStorehouseExcel.class);

@ -28,28 +28,10 @@ public class StStorehouseExcel 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;
/**
* 库房编号
*/
@ColumnWidth(20)
@ExcelProperty("库房编号")
@ExcelProperty("库房编码")
private String shCode;
/**
* 库房名称
@ -58,41 +40,36 @@ public class StStorehouseExcel implements Serializable {
@ExcelProperty("库房名称")
private String shName;
/**
* 所属分
* 别说明
*/
@ColumnWidth(20)
@ExcelProperty("所属分类")
private Long houseType;
@ExcelProperty("类别说明")
private String memo;
/**
* 工装
* 所属工装类
*/
@ColumnWidth(20)
@ExcelProperty("工装类")
@ExcelProperty("所属工装类")
private Long toolingType;
/**
* 库房层级
* 所属类别
*/
@ColumnWidth(20)
@ExcelProperty("库房层级")
private String shLevel;
/**
* 部门ID
*/
@ColumnWidth(20)
@ExcelProperty("部门ID")
private String deptId;
@ExcelProperty("所属类别")
private Long type;
/**
* 保管员ID
* 库房层级
*/
@ColumnWidth(20)
@ExcelProperty("保管员ID")
private Long saveUser;
@ExcelProperty("库房层级")
private String shLevel;
/**
* 类别说明
* 保管员
*/
@ColumnWidth(20)
@ExcelProperty("类别说明")
private String memo;
@ExcelProperty("保管员")
private String saveUserName;
}

@ -94,7 +94,12 @@
</select>
<select id="exportStStorehouse" resultType="org.springblade.wms.excel.StStorehouseExcel">
SELECT * FROM ST_STOREHOUSE ${ew.customSqlSegment}
SELECT
sh.*,
su.real_name AS saveUserName
FROM ST_STOREHOUSE sh
LEFT JOIN BLADE_USER su ON sh.save_user = su.id
${ew.customSqlSegment}
</select>
<!-- 校验名称是否重复 -->

Loading…
Cancel
Save