仓库导出修改

liweidong
wusiyu 2 days ago
parent 9a2353edaf
commit 1ccd7a95b2
  1. 5
      blade-service/blade-wms/src/main/java/org/springblade/wms/controller/StAllotRecordController.java
  2. 7
      blade-service/blade-wms/src/main/java/org/springblade/wms/excel/StAllotRecordExcel.java
  3. 2
      blade-service/blade-wms/src/main/java/org/springblade/wms/mapper/StAllotRecordMapper.java
  4. 11
      blade-service/blade-wms/src/main/java/org/springblade/wms/mapper/StAllotRecordMapper.xml

@ -189,8 +189,9 @@ public class StAllotRecordController extends BladeController {
//} //}
//queryWrapper.lambda().eq(StAllotRecordEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); //queryWrapper.lambda().eq(StAllotRecordEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
// List<StAllotRecordExcel> list = stAllotRecordService.exportStAllotRecord(queryWrapper); // List<StAllotRecordExcel> list = stAllotRecordService.exportStAllotRecord(queryWrapper);
if (stAllotRecord.get("curStatus") == null) {
stAllotRecord.put("curStatus", StAllotRecord.STATUS_OK); if (bladeUser != null && bladeUser.getDeptId() != null) {
stAllotRecord.put("createDept", Long.valueOf(bladeUser.getDeptId()));
} }
List<StAllotRecordExcel> list = stAllotRecordService.exportStAllotRecord(stAllotRecord); List<StAllotRecordExcel> list = stAllotRecordService.exportStAllotRecord(stAllotRecord);
ExcelUtil.export(response, "库位调拨记录表数据" + DateUtil.time(), "库位调拨记录表数据表", list, StAllotRecordExcel.class); ExcelUtil.export(response, "库位调拨记录表数据" + DateUtil.time(), "库位调拨记录表数据表", list, StAllotRecordExcel.class);

@ -4,7 +4,6 @@ import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth; import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight; import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight; import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.io.Serial; import java.io.Serial;
@ -44,19 +43,19 @@ public class StAllotRecordExcel implements Serializable {
* 旧库房号 * 旧库房号
*/ */
@ColumnWidth(20) @ColumnWidth(20)
@Schema(description = "旧库位号") @ExcelProperty("旧库房号")
private String oldWarehouseName; private String oldWarehouseName;
/** /**
* 旧库位号 * 旧库位号
*/ */
@ColumnWidth(20) @ColumnWidth(20)
@ExcelProperty("旧库位号") @ExcelProperty("旧库位号")
private String oldLocation; private String oldLocation;
/** /**
* 新库房号 * 新库房号
*/ */
@ColumnWidth(20) @ColumnWidth(20)
@Schema(description = "新库房号") @ExcelProperty("新库房号")
private String newWarehouseName; private String newWarehouseName;
/** /**
* 新库位号 * 新库位号

@ -42,6 +42,6 @@ public interface StAllotRecordMapper extends BaseMapper<StAllotRecord> {
IPage<StAllotRecordVO> selectAllotWithGoods(@Param("page") IPage<StAllotRecord> page, @Param("ew") QueryWrapper<StAllotRecord> wrapper); IPage<StAllotRecordVO> selectAllotWithGoods(@Param("page") IPage<StAllotRecord> page, @Param("ew") QueryWrapper<StAllotRecord> wrapper);
List<StAllotRecordExcel> exportStAllotRecord(Map<String, Object> stAllotRecord); List<StAllotRecordExcel> exportStAllotRecord(@Param("stAllotRecord") Map<String, Object> stAllotRecord);
} }

@ -101,11 +101,12 @@
LEFT JOIN st_storage_location ol ON a.old_sl_id = ol.id LEFT JOIN st_storage_location ol ON a.old_sl_id = ol.id
LEFT JOIN st_storage_location nl ON a.new_sl_id = nl.id LEFT JOIN st_storage_location nl ON a.new_sl_id = nl.id
WHERE a.is_deleted = 0 WHERE a.is_deleted = 0
<!-- 2. 调拨单状态:前端传了用传的,没传用默认值NEW_BUILT,必生效 --> AND a.cur_status = 1
AND a.cur_status = #{param2.curStatus} <if test="stAllotRecord.createDept != null and stAllotRecord.createDept != ''">
<!-- 3. 商品编码:可选条件,传了就过滤,没传不生效(模糊查询,业务常用) --> AND a.create_dept = #{stAllotRecord.createDept}
<if test="param2.goodsCode != null and param2.goodsCode != ''"> </if>
AND g.goods_code = #{param2.goodsCode} <if test="stAllotRecord.goodsCode != null and stAllotRecord.goodsCode != ''">
AND g.goods_code = #{stAllotRecord.goodsCode}
</if> </if>
ORDER BY a.create_time DESC ORDER BY a.create_time DESC
</select> </select>

Loading…
Cancel
Save