19 changed files with 1400 additions and 10 deletions
@ -0,0 +1,229 @@
|
||||
///*
|
||||
// * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
|
||||
// *
|
||||
// * Redistribution and use in source and binary forms, with or without
|
||||
// * modification, are permitted provided that the following conditions are met:
|
||||
// *
|
||||
// * Redistributions of source code must retain the above copyright notice,
|
||||
// * this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright
|
||||
// * notice, this list of conditions and the following disclaimer in the
|
||||
// * documentation and/or other materials provided with the distribution.
|
||||
// * Neither the name of the dreamlu.net developer nor the names of its
|
||||
// * contributors may be used to endorse or promote products derived from
|
||||
// * this software without specific prior written permission.
|
||||
// * Author: Chill 庄骞 (smallchill@163.com)
|
||||
// */
|
||||
//package com.logpm.warehouse.entity;
|
||||
//
|
||||
//import com.baomidou.mybatisplus.annotation.TableField;
|
||||
//import com.baomidou.mybatisplus.annotation.TableName;
|
||||
//import io.swagger.annotations.ApiModel;
|
||||
//import io.swagger.annotations.ApiModelProperty;
|
||||
//import lombok.Data;
|
||||
//import lombok.EqualsAndHashCode;
|
||||
//import org.springblade.core.tenant.mp.TenantEntity;
|
||||
//
|
||||
//import java.util.Date;
|
||||
//
|
||||
///**
|
||||
// * 在库订单包件清单 实体类
|
||||
// *
|
||||
// * @author cyz
|
||||
// * @since 2023-06-13
|
||||
// */
|
||||
//@Data
|
||||
//@TableName("logpm_distribution_parcel_list")
|
||||
//@ApiModel(value = "DistributionParcelList对象", description = "在库订单包件清单")
|
||||
//@EqualsAndHashCode(callSuper = true)
|
||||
//public class WarehouseParcelListEntity extends TenantEntity {
|
||||
//
|
||||
// /**
|
||||
// * 预留1
|
||||
// */
|
||||
// @ApiModelProperty(value = "预留1")
|
||||
// private String reserve1;
|
||||
// /**
|
||||
// * 预留2
|
||||
// */
|
||||
// @ApiModelProperty(value = "预留2")
|
||||
// private String reserve2;
|
||||
// /**
|
||||
// * 预留3
|
||||
// */
|
||||
// @ApiModelProperty(value = "预留3")
|
||||
// private String reserve3;
|
||||
// /**
|
||||
// * 预留4
|
||||
// */
|
||||
// @ApiModelProperty(value = "预留4")
|
||||
// private String reserve4;
|
||||
// /**
|
||||
// * 预留5
|
||||
// */
|
||||
// @ApiModelProperty(value = "预留5")
|
||||
// private String reserve5;
|
||||
// /**
|
||||
// * 订单自编号
|
||||
// */
|
||||
// @ApiModelProperty(value = "订单自编号")
|
||||
// private String orderCode;
|
||||
// /**
|
||||
// * 仓库
|
||||
// */
|
||||
// @ApiModelProperty(value = "仓库")
|
||||
// private String warehouse;
|
||||
//
|
||||
// @ApiModelProperty(value = "仓库ID")
|
||||
// private Long warehouseId;
|
||||
// /**
|
||||
// * 状态
|
||||
// */
|
||||
// @ApiModelProperty(value = "状态")
|
||||
// private Integer conditions;
|
||||
// /**
|
||||
// * 包条码
|
||||
// */
|
||||
// @ApiModelProperty(value = "包条码")
|
||||
// @TableField("order_package_code")
|
||||
// private String orderPackageCode;
|
||||
//
|
||||
// @ApiModelProperty(value = "货区信息")
|
||||
// private String cargoTitle;
|
||||
//
|
||||
// @ApiModelProperty(value = "货架信息")
|
||||
// private String shelfTitle;
|
||||
// /**
|
||||
// * 货位信息
|
||||
// */
|
||||
// @ApiModelProperty(value = "货位信息")
|
||||
// private String goodsAllocation;
|
||||
// /**
|
||||
// * 所在托盘
|
||||
// */
|
||||
// @ApiModelProperty(value = "所在托盘")
|
||||
// private String pallet;
|
||||
// /**
|
||||
// * 一级品
|
||||
// */
|
||||
// @ApiModelProperty(value = "一级品")
|
||||
// private String firsts;
|
||||
// /**
|
||||
// * 二级品
|
||||
// */
|
||||
// @ApiModelProperty(value = "二级品")
|
||||
// private String second;
|
||||
// /**
|
||||
// * 三级品
|
||||
// */
|
||||
// @ApiModelProperty(value = "三级品")
|
||||
// private String thirdProduct;
|
||||
// /**
|
||||
// * 入库时间
|
||||
// */
|
||||
// @ApiModelProperty(value = "入库时间")
|
||||
// private Date warehouseEntryTimeEnd;
|
||||
// /**
|
||||
// * 运单号
|
||||
// */
|
||||
// @ApiModelProperty(value = "运单号")
|
||||
// private String waybillNumber;
|
||||
// /**
|
||||
// * 运单ID
|
||||
// */
|
||||
// @ApiModelProperty(value = "运单ID")
|
||||
// private String waybillId;
|
||||
// /**
|
||||
// * 客户id
|
||||
// */
|
||||
// @ApiModelProperty(value = "客户id")
|
||||
// @TableField(exist = false)
|
||||
// private String marketId;
|
||||
// /**
|
||||
// * 物料Id
|
||||
// */
|
||||
// @ApiModelProperty(value = "物料ID")
|
||||
// private Long materialId;
|
||||
//
|
||||
// /**
|
||||
// * 物料名称
|
||||
// */
|
||||
// @ApiModelProperty(value = "物料名称")
|
||||
// private String materialName;
|
||||
// /**
|
||||
// * 物料编号
|
||||
// */
|
||||
// @ApiModelProperty(value = "物料编号")
|
||||
// private String materialCode;
|
||||
// /**
|
||||
// * 物料单位
|
||||
// */
|
||||
// @ApiModelProperty(value = "物料单位")
|
||||
// private String materialUnit;
|
||||
// /**
|
||||
// * 数量
|
||||
// */
|
||||
// @ApiModelProperty(value = "数量")
|
||||
// private Integer quantity;
|
||||
// /**
|
||||
// * 车次号
|
||||
// */
|
||||
// @ApiModelProperty(value = "车次号")
|
||||
// private String trainNumber;
|
||||
// /**
|
||||
// * 在库订单ID
|
||||
// */
|
||||
// @ApiModelProperty(value = "在库订单ID")
|
||||
// private Long stockArticleId;
|
||||
//
|
||||
// /**
|
||||
// * 服务号
|
||||
// */
|
||||
// @ApiModelProperty(value = "服务号")
|
||||
// private String serviceNumber;
|
||||
// /**
|
||||
// * 品牌ID
|
||||
// */
|
||||
// @ApiModelProperty(value = "品牌ID")
|
||||
// private Long brandId;
|
||||
// /**
|
||||
// * 品牌名称
|
||||
// */
|
||||
// @ApiModelProperty(value = "品牌名称")
|
||||
// private String brandName;
|
||||
//// /**
|
||||
//// * 配送状态
|
||||
//// */
|
||||
//// @ApiModelProperty(value = "配送状态")
|
||||
//// private String deliveryState;
|
||||
// /**
|
||||
// * 包件状态
|
||||
// */
|
||||
// @ApiModelProperty(value = "包件状态")
|
||||
// private String orderPackageStatus;
|
||||
//
|
||||
// @ApiModelProperty(value = "包件冻结状态")
|
||||
// private String orderPackageFreezeStatus;
|
||||
//
|
||||
// @ApiModelProperty(value = "包件冻结状态")
|
||||
// private String orderPackageReservationStatus;
|
||||
//
|
||||
//
|
||||
//
|
||||
// @ApiModelProperty(value = "备货状态")
|
||||
// private String orderPackageStockupStatus;
|
||||
//
|
||||
// @ApiModelProperty(value = "上架状态")
|
||||
// private String orderPackageGroundingStatus;
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//// /**
|
||||
//// * 配送状态
|
||||
//// */
|
||||
//// @ApiModelProperty(value = "配送状态")
|
||||
//// private String orderPackageStatus;
|
||||
//
|
||||
//}
|
@ -0,0 +1,53 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.warehouse.feign; |
||||
|
||||
|
||||
import org.springblade.common.constant.ModuleNameConstant; |
||||
|
||||
import org.springframework.cloud.openfeign.FeignClient; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
||||
import org.springframework.web.bind.annotation.RequestParam; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 货位与货物绑定 Feign接口类 |
||||
* |
||||
* @author lmy |
||||
* @since 2023-08-14 |
||||
*/ |
||||
@FeignClient( |
||||
value = ModuleNameConstant.APPLICATION_WAREHOUSE_NAME |
||||
) |
||||
public interface IWarehouseUpdownGoodsClient { |
||||
|
||||
String API_PREFIX = "updownGoods/client"; |
||||
String TOP = API_PREFIX + "/top"; |
||||
|
||||
// /**
|
||||
// *查询包条
|
||||
// */
|
||||
// @GetMapping(TOP + "/selectListByAllo")
|
||||
// List<WarehouseParcelListVO> selectListByAllo(@RequestParam Long alloId);
|
||||
/** |
||||
*改货位有无物品 |
||||
*/ |
||||
@GetMapping(TOP + "/selectCountByAllo") |
||||
Integer selectCountByAllo(@RequestParam Long alloId); |
||||
} |
@ -0,0 +1,64 @@
|
||||
///*
|
||||
// * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
|
||||
// *
|
||||
// * Redistribution and use in source and binary forms, with or without
|
||||
// * modification, are permitted provided that the following conditions are met:
|
||||
// *
|
||||
// * Redistributions of source code must retain the above copyright notice,
|
||||
// * this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright
|
||||
// * notice, this list of conditions and the following disclaimer in the
|
||||
// * documentation and/or other materials provided with the distribution.
|
||||
// * Neither the name of the dreamlu.net developer nor the names of its
|
||||
// * contributors may be used to endorse or promote products derived from
|
||||
// * this software without specific prior written permission.
|
||||
// * Author: Chill 庄骞 (smallchill@163.com)
|
||||
// */
|
||||
//package com.logpm.warehouse.vo;
|
||||
//
|
||||
//import com.logpm.distribution.entity.DistributionParcelListEntity;
|
||||
//import com.logpm.warehouse.entity.WarehouseParcelListEntity;
|
||||
//import lombok.Data;
|
||||
//import lombok.EqualsAndHashCode;
|
||||
//
|
||||
//import java.util.Date;
|
||||
//
|
||||
///**
|
||||
// * 在库订单包件清单 视图实体类
|
||||
// *
|
||||
// * @author cyz
|
||||
// * @since 2023-06-13
|
||||
// */
|
||||
//@Data
|
||||
//@EqualsAndHashCode(callSuper = true)
|
||||
//public class WarehouseParcelListVO extends WarehouseParcelListEntity {
|
||||
// private static final long serialVersionUID = 1L;
|
||||
//
|
||||
// private String stockupStatus;
|
||||
// private Date stockupDate;
|
||||
// private String stockupArea;
|
||||
// private String goodsAllocation;
|
||||
// /**
|
||||
// * 包件状态名称
|
||||
// */
|
||||
// private String orderPackageStatusName;
|
||||
// /**
|
||||
// * 包件冻结状态
|
||||
// */
|
||||
// private String orderPackageFreezeStatusName;
|
||||
// /**
|
||||
// * 包件上架状态
|
||||
// */
|
||||
// private String orderPackageGroundingStatusName;
|
||||
// /**
|
||||
// * 包件备货状态
|
||||
// */
|
||||
// private String orderPackageStockupStatusName;
|
||||
//
|
||||
// /**
|
||||
// * 包件预约状态
|
||||
// */
|
||||
// private String orderPackageReservationStatusName;
|
||||
//
|
||||
//
|
||||
//}
|
@ -0,0 +1,151 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.warehouse.controller; |
||||
|
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import io.swagger.annotations.ApiParam; |
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import lombok.AllArgsConstructor; |
||||
import javax.validation.Valid; |
||||
|
||||
import org.springblade.core.secure.BladeUser; |
||||
import org.springblade.core.mp.support.Condition; |
||||
import org.springblade.core.mp.support.Query; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.core.tool.utils.Func; |
||||
import org.springframework.web.bind.annotation.*; |
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.logpm.warehouse.entity.WarehouseUpdownGoodsEntity; |
||||
import com.logpm.warehouse.vo.WarehouseUpdownGoodsVO; |
||||
import com.logpm.warehouse.excel.WarehouseUpdownGoodsExcel; |
||||
import com.logpm.warehouse.wrapper.WarehouseUpdownGoodsWrapper; |
||||
import com.logpm.warehouse.service.IWarehouseUpdownGoodsService; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.tool.utils.DateUtil; |
||||
import org.springblade.core.excel.util.ExcelUtil; |
||||
import org.springblade.core.tool.constant.BladeConstant; |
||||
import springfox.documentation.annotations.ApiIgnore; |
||||
import java.util.Map; |
||||
import java.util.List; |
||||
import javax.servlet.http.HttpServletResponse; |
||||
|
||||
/** |
||||
* 货位与货物绑定表 控制器 |
||||
* |
||||
* @author lmy |
||||
* @since 2023-08-14 |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/warehouseUpdownGoods") |
||||
@Api(value = "货位与货物绑定表", tags = "货位与货物绑定表接口") |
||||
public class WarehouseUpdownGoodsController extends BladeController { |
||||
|
||||
private final IWarehouseUpdownGoodsService warehouseUpdownGoodsService; |
||||
|
||||
/** |
||||
* 货位与货物绑定表 详情 |
||||
*/ |
||||
@GetMapping("/detail") |
||||
@ApiOperationSupport(order = 1) |
||||
@ApiOperation(value = "详情", notes = "传入warehouseUpdownGoods") |
||||
public R<WarehouseUpdownGoodsVO> detail(WarehouseUpdownGoodsEntity warehouseUpdownGoods) { |
||||
WarehouseUpdownGoodsEntity detail = warehouseUpdownGoodsService.getOne(Condition.getQueryWrapper(warehouseUpdownGoods)); |
||||
return R.data(WarehouseUpdownGoodsWrapper.build().entityVO(detail)); |
||||
} |
||||
/** |
||||
* 货位与货物绑定表 分页 |
||||
*/ |
||||
@GetMapping("/list") |
||||
@ApiOperationSupport(order = 2) |
||||
@ApiOperation(value = "分页", notes = "传入warehouseUpdownGoods") |
||||
public R<IPage<WarehouseUpdownGoodsVO>> list(@ApiIgnore @RequestParam Map<String, Object> warehouseUpdownGoods, Query query) { |
||||
IPage<WarehouseUpdownGoodsEntity> pages = warehouseUpdownGoodsService.page(Condition.getPage(query), Condition.getQueryWrapper(warehouseUpdownGoods, WarehouseUpdownGoodsEntity.class)); |
||||
return R.data(WarehouseUpdownGoodsWrapper.build().pageVO(pages)); |
||||
} |
||||
|
||||
/** |
||||
* 货位与货物绑定表 自定义分页 |
||||
*/ |
||||
@GetMapping("/page") |
||||
@ApiOperationSupport(order = 3) |
||||
@ApiOperation(value = "分页", notes = "传入warehouseUpdownGoods") |
||||
public R<IPage<WarehouseUpdownGoodsVO>> page(WarehouseUpdownGoodsVO warehouseUpdownGoods, Query query) { |
||||
IPage<WarehouseUpdownGoodsVO> pages = warehouseUpdownGoodsService.selectWarehouseUpdownGoodsPage(Condition.getPage(query), warehouseUpdownGoods); |
||||
return R.data(pages); |
||||
} |
||||
|
||||
/** |
||||
* 货位与货物绑定表 新增 |
||||
*/ |
||||
@PostMapping("/save") |
||||
@ApiOperationSupport(order = 4) |
||||
@ApiOperation(value = "新增", notes = "传入warehouseUpdownGoods") |
||||
public R save(@Valid @RequestBody WarehouseUpdownGoodsEntity warehouseUpdownGoods) { |
||||
return R.status(warehouseUpdownGoodsService.save(warehouseUpdownGoods)); |
||||
} |
||||
|
||||
/** |
||||
* 货位与货物绑定表 修改 |
||||
*/ |
||||
@PostMapping("/update") |
||||
@ApiOperationSupport(order = 5) |
||||
@ApiOperation(value = "修改", notes = "传入warehouseUpdownGoods") |
||||
public R update(@Valid @RequestBody WarehouseUpdownGoodsEntity warehouseUpdownGoods) { |
||||
return R.status(warehouseUpdownGoodsService.updateById(warehouseUpdownGoods)); |
||||
} |
||||
|
||||
/** |
||||
* 货位与货物绑定表 新增或修改 |
||||
*/ |
||||
@PostMapping("/submit") |
||||
@ApiOperationSupport(order = 6) |
||||
@ApiOperation(value = "新增或修改", notes = "传入warehouseUpdownGoods") |
||||
public R submit(@Valid @RequestBody WarehouseUpdownGoodsEntity warehouseUpdownGoods) { |
||||
return R.status(warehouseUpdownGoodsService.saveOrUpdate(warehouseUpdownGoods)); |
||||
} |
||||
|
||||
/** |
||||
* 货位与货物绑定表 删除 |
||||
*/ |
||||
@PostMapping("/remove") |
||||
@ApiOperationSupport(order = 7) |
||||
@ApiOperation(value = "逻辑删除", notes = "传入ids") |
||||
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
||||
return R.status(warehouseUpdownGoodsService.deleteLogic(Func.toLongList(ids))); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* 导出数据 |
||||
*/ |
||||
@GetMapping("/export-warehouseUpdownGoods") |
||||
@ApiOperationSupport(order = 9) |
||||
@ApiOperation(value = "导出数据", notes = "传入warehouseUpdownGoods") |
||||
public void exportWarehouseUpdownGoods(@ApiIgnore @RequestParam Map<String, Object> warehouseUpdownGoods, BladeUser bladeUser, HttpServletResponse response) { |
||||
QueryWrapper<WarehouseUpdownGoodsEntity> queryWrapper = Condition.getQueryWrapper(warehouseUpdownGoods, WarehouseUpdownGoodsEntity.class); |
||||
//if (!AuthUtil.isAdministrator()) {
|
||||
// queryWrapper.lambda().eq(WarehouseUpdownGoods::getTenantId, bladeUser.getTenantId());
|
||||
//}
|
||||
queryWrapper.lambda().eq(WarehouseUpdownGoodsEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); |
||||
List<WarehouseUpdownGoodsExcel> list = warehouseUpdownGoodsService.exportWarehouseUpdownGoods(queryWrapper); |
||||
ExcelUtil.export(response, "货位与货物绑定表数据" + DateUtil.time(), "货位与货物绑定表数据表", list, WarehouseUpdownGoodsExcel.class); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,34 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.warehouse.dto; |
||||
|
||||
import com.logpm.warehouse.entity.WarehouseUpdownGoodsEntity; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
|
||||
/** |
||||
* 货位与货物绑定表 数据传输对象实体类 |
||||
* |
||||
* @author lmy |
||||
* @since 2023-08-14 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class WarehouseUpdownGoodsDTO extends WarehouseUpdownGoodsEntity { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
} |
@ -0,0 +1,172 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.warehouse.excel; |
||||
|
||||
|
||||
import lombok.Data; |
||||
|
||||
import java.util.Date; |
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
||||
import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
||||
import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
||||
import java.io.Serializable; |
||||
|
||||
|
||||
/** |
||||
* 货位与货物绑定表 Excel实体类 |
||||
* |
||||
* @author lmy |
||||
* @since 2023-08-14 |
||||
*/ |
||||
@Data |
||||
@ColumnWidth(25) |
||||
@HeadRowHeight(20) |
||||
@ContentRowHeight(18) |
||||
public class WarehouseUpdownGoodsExcel implements Serializable { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 租户号 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("租户号") |
||||
private String tenantId; |
||||
/** |
||||
* 是否已删除 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("是否已删除") |
||||
private Integer isDeleted; |
||||
/** |
||||
* 预留1 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("预留1") |
||||
private String reserve1; |
||||
/** |
||||
* 预留2 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("预留2") |
||||
private String reserve2; |
||||
/** |
||||
* 预留3 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("预留3") |
||||
private String reserve3; |
||||
/** |
||||
* 预留4 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("预留4") |
||||
private String reserve4; |
||||
/** |
||||
* 预留5 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("预留5") |
||||
private String reserve5; |
||||
/** |
||||
* 上架方式id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("上架方式id") |
||||
private Long updownTypeId; |
||||
/** |
||||
* 货区id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("货区id") |
||||
private Long areaId; |
||||
/** |
||||
* 货区名称 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("货区名称") |
||||
private String areaTitle; |
||||
/** |
||||
* 货架id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("货架id") |
||||
private Long shelfId; |
||||
/** |
||||
* 货架名称 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("货架名称") |
||||
private String shelfTitle; |
||||
/** |
||||
* 货位id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("货位id") |
||||
private Long allocationId; |
||||
/** |
||||
* 货位名称 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("货位名称") |
||||
private String allocationTitle; |
||||
/** |
||||
* 完整货位 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("完整货位") |
||||
private String positionCode; |
||||
/** |
||||
* 货物类型;1有数据 2无数据 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("货物类型;1有数据 2无数据") |
||||
private String goodsType; |
||||
/** |
||||
* 关联id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("关联id") |
||||
private Long associationId; |
||||
/** |
||||
* 关联值 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("关联值") |
||||
private String associationValue; |
||||
/** |
||||
* 关联类型;1.订单号 2运单号 3包件码 4库存品 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("关联类型;1.订单号 2运单号 3包件码 4库存品") |
||||
private String associationType; |
||||
/** |
||||
* 货物名称 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("货物名称") |
||||
private String goodsName; |
||||
/** |
||||
* 数量 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("数量") |
||||
private String num; |
||||
|
||||
|
||||
} |
@ -0,0 +1,36 @@
|
||||
package com.logpm.warehouse.feign; |
||||
|
||||
|
||||
import com.logpm.warehouse.service.IWarehouseUpdownGoodsService; |
||||
|
||||
import lombok.AllArgsConstructor; |
||||
|
||||
import org.springblade.core.tenant.annotation.NonDS; |
||||
|
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
import springfox.documentation.annotations.ApiIgnore; |
||||
|
||||
import java.util.List; |
||||
|
||||
@NonDS |
||||
@ApiIgnore |
||||
@RestController |
||||
@AllArgsConstructor |
||||
public class WarehouseUpdownGoodsClient implements IWarehouseUpdownGoodsClient { |
||||
|
||||
private final IWarehouseUpdownGoodsService warehouseUpdownGoodsService; |
||||
|
||||
|
||||
// @Override
|
||||
// @GetMapping(TOP + "/selectListByAllo")
|
||||
// public List<WarehouseParcelListVO> selectListByAllo(Long alloId) {
|
||||
// return warehouseUpdownGoodsService.selectListByAllo(alloId);
|
||||
// }
|
||||
|
||||
@Override |
||||
@GetMapping(TOP + "/selectCountByAllo") |
||||
public Integer selectCountByAllo(Long alloId) { |
||||
return warehouseUpdownGoodsService.selectCountByAllo(alloId); |
||||
} |
||||
} |
@ -0,0 +1,60 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.warehouse.mapper; |
||||
|
||||
import com.logpm.warehouse.entity.WarehouseUpdownGoodsEntity; |
||||
import com.logpm.warehouse.vo.WarehouseUpdownGoodsVO; |
||||
import com.logpm.warehouse.excel.WarehouseUpdownGoodsExcel; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.apache.ibatis.annotations.Param; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 货位与货物绑定表 Mapper 接口 |
||||
* |
||||
* @author lmy |
||||
* @since 2023-08-14 |
||||
*/ |
||||
public interface WarehouseUpdownGoodsMapper extends BaseMapper<WarehouseUpdownGoodsEntity> { |
||||
|
||||
/** |
||||
* 自定义分页 |
||||
* |
||||
* @param page |
||||
* @param warehouseUpdownGoods |
||||
* @return |
||||
*/ |
||||
List<WarehouseUpdownGoodsVO> selectWarehouseUpdownGoodsPage(IPage page, WarehouseUpdownGoodsVO warehouseUpdownGoods); |
||||
|
||||
|
||||
/** |
||||
* 获取导出数据 |
||||
* |
||||
* @param queryWrapper |
||||
* @return |
||||
*/ |
||||
List<WarehouseUpdownGoodsExcel> exportWarehouseUpdownGoods(@Param("ew") Wrapper<WarehouseUpdownGoodsEntity> queryWrapper); |
||||
// /**
|
||||
// * 根据货位查询货物
|
||||
// *
|
||||
// * @param alloId
|
||||
// * @return
|
||||
// */
|
||||
// List<WarehouseParcelListVO> selectListByAllo(@Param("alloId") Long alloId);
|
||||
} |
@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.logpm.warehouse.mapper.WarehouseUpdownGoodsMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="warehouseUpdownGoodsResultMap" type="com.logpm.warehouse.entity.WarehouseUpdownGoodsEntity"> |
||||
<result column="tenant_id" property="tenantId"/> |
||||
<result column="create_user" property="createUser"/> |
||||
<result column="create_time" property="createTime"/> |
||||
<result column="update_user" property="updateUser"/> |
||||
<result column="update_time" property="updateTime"/> |
||||
<result column="status" property="status"/> |
||||
<result column="is_deleted" property="isDeleted"/> |
||||
<result column="create_dept" property="createDept"/> |
||||
<result column="id" property="id"/> |
||||
<result column="reserve1" property="reserve1"/> |
||||
<result column="reserve2" property="reserve2"/> |
||||
<result column="reserve3" property="reserve3"/> |
||||
<result column="reserve4" property="reserve4"/> |
||||
<result column="reserve5" property="reserve5"/> |
||||
<result column="updown_type_id" property="updownTypeId"/> |
||||
<result column="area_id" property="areaId"/> |
||||
<result column="area_title" property="areaTitle"/> |
||||
<result column="shelf_id" property="shelfId"/> |
||||
<result column="shelf_title" property="shelfTitle"/> |
||||
<result column="allocation_id" property="allocationId"/> |
||||
<result column="allocation_title" property="allocationTitle"/> |
||||
<result column="position_code" property="positionCode"/> |
||||
<result column="goods_type" property="goodsType"/> |
||||
<result column="association_id" property="associationId"/> |
||||
<result column="association_value" property="associationValue"/> |
||||
<result column="association_type" property="associationType"/> |
||||
<result column="goods_name" property="goodsName"/> |
||||
<result column="num" property="num"/> |
||||
<result column="tenant_id" property="tenantId"/> |
||||
<result column="create_user" property="createUser"/> |
||||
<result column="create_time" property="createTime"/> |
||||
<result column="update_user" property="updateUser"/> |
||||
<result column="update_time" property="updateTime"/> |
||||
<result column="status" property="status"/> |
||||
<result column="is_deleted" property="isDeleted"/> |
||||
<result column="create_dept" property="createDept"/> |
||||
<result column="id" property="id"/> |
||||
<result column="reserve1" property="reserve1"/> |
||||
<result column="reserve2" property="reserve2"/> |
||||
<result column="reserve3" property="reserve3"/> |
||||
<result column="reserve4" property="reserve4"/> |
||||
<result column="reserve5" property="reserve5"/> |
||||
<result column="updown_type_id" property="updownTypeId"/> |
||||
<result column="area_id" property="areaId"/> |
||||
<result column="area_title" property="areaTitle"/> |
||||
<result column="shelf_id" property="shelfId"/> |
||||
<result column="shelf_title" property="shelfTitle"/> |
||||
<result column="allocation_id" property="allocationId"/> |
||||
<result column="allocation_title" property="allocationTitle"/> |
||||
<result column="position_code" property="positionCode"/> |
||||
<result column="goods_type" property="goodsType"/> |
||||
<result column="association_id" property="associationId"/> |
||||
<result column="association_value" property="associationValue"/> |
||||
<result column="association_type" property="associationType"/> |
||||
<result column="goods_name" property="goodsName"/> |
||||
<result column="num" property="num"/> |
||||
</resultMap> |
||||
|
||||
|
||||
<select id="selectWarehouseUpdownGoodsPage" resultMap="warehouseUpdownGoodsResultMap"> |
||||
select * from logpm_warehouse_updown_goods where is_deleted = 0 |
||||
</select> |
||||
|
||||
|
||||
<select id="exportWarehouseUpdownGoods" resultType="com.logpm.warehouse.excel.WarehouseUpdownGoodsExcel"> |
||||
SELECT * FROM logpm_warehouse_updown_goods ${ew.customSqlSegment} |
||||
</select> |
||||
<!-- <select id="selectListByAllo" resultType="com.logpm.warehouse.vo.WarehouseParcelListVO">--> |
||||
<!-- SELECT ldpl.* FROM logpm_warehouse_updown_goods lwug join logpm_distribution_parcel_list ldpl WHERE lwug.allocation_id = #{alloId}--> |
||||
<!-- </select>--> |
||||
|
||||
</mapper> |
@ -0,0 +1,65 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.warehouse.service; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.logpm.warehouse.entity.WarehouseUpdownGoodsEntity; |
||||
import com.logpm.warehouse.vo.WarehouseUpdownGoodsVO; |
||||
import com.logpm.warehouse.excel.WarehouseUpdownGoodsExcel; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 货位与货物绑定表 服务类 |
||||
* |
||||
* @author lmy |
||||
* @since 2023-08-14 |
||||
*/ |
||||
public interface IWarehouseUpdownGoodsService extends BaseService<WarehouseUpdownGoodsEntity> { |
||||
/** |
||||
* 自定义分页 |
||||
* |
||||
* @param page |
||||
* @param warehouseUpdownGoods |
||||
* @return |
||||
*/ |
||||
IPage<WarehouseUpdownGoodsVO> selectWarehouseUpdownGoodsPage(IPage<WarehouseUpdownGoodsVO> page, WarehouseUpdownGoodsVO warehouseUpdownGoods); |
||||
|
||||
|
||||
/** |
||||
* 导出数据 |
||||
* |
||||
* @param queryWrapper |
||||
* @return |
||||
*/ |
||||
List<WarehouseUpdownGoodsExcel> exportWarehouseUpdownGoods(Wrapper<WarehouseUpdownGoodsEntity> queryWrapper); |
||||
// /**
|
||||
// * 关联查询货物
|
||||
// *
|
||||
// * @param alloId
|
||||
// * @return
|
||||
// */
|
||||
// List<WarehouseParcelListVO> selectListByAllo(Long alloId);
|
||||
/** |
||||
* 关联查询货位有无货物 |
||||
* |
||||
* @param alloId |
||||
* @return |
||||
*/ |
||||
Integer selectCountByAllo(Long alloId); |
||||
} |
@ -0,0 +1,68 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.warehouse.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.logpm.warehouse.entity.WarehouseUpdownGoodsEntity; |
||||
import com.logpm.warehouse.vo.WarehouseUpdownGoodsVO; |
||||
import com.logpm.warehouse.excel.WarehouseUpdownGoodsExcel; |
||||
import com.logpm.warehouse.mapper.WarehouseUpdownGoodsMapper; |
||||
import com.logpm.warehouse.service.IWarehouseUpdownGoodsService; |
||||
import org.springframework.stereotype.Service; |
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 货位与货物绑定表 服务实现类 |
||||
* |
||||
* @author lmy |
||||
* @since 2023-08-14 |
||||
*/ |
||||
@Service |
||||
public class WarehouseUpdownGoodsServiceImpl extends BaseServiceImpl<WarehouseUpdownGoodsMapper, WarehouseUpdownGoodsEntity> implements IWarehouseUpdownGoodsService { |
||||
|
||||
@Override |
||||
public IPage<WarehouseUpdownGoodsVO> selectWarehouseUpdownGoodsPage(IPage<WarehouseUpdownGoodsVO> page, WarehouseUpdownGoodsVO warehouseUpdownGoods) { |
||||
return page.setRecords(baseMapper.selectWarehouseUpdownGoodsPage(page, warehouseUpdownGoods)); |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public List<WarehouseUpdownGoodsExcel> exportWarehouseUpdownGoods(Wrapper<WarehouseUpdownGoodsEntity> queryWrapper) { |
||||
List<WarehouseUpdownGoodsExcel> warehouseUpdownGoodsList = baseMapper.exportWarehouseUpdownGoods(queryWrapper); |
||||
//warehouseUpdownGoodsList.forEach(warehouseUpdownGoods -> {
|
||||
// warehouseUpdownGoods.setTypeName(DictCache.getValue(DictEnum.YES_NO, WarehouseUpdownGoods.getType()));
|
||||
//});
|
||||
return warehouseUpdownGoodsList; |
||||
} |
||||
//
|
||||
// @Override
|
||||
// public List<BParcelListVO> selectListByAllo(Long alloId) {
|
||||
// return baseMapper.selectListByAllo(alloId);
|
||||
// }
|
||||
|
||||
@Override |
||||
public Integer selectCountByAllo(Long alloId) { |
||||
return baseMapper.selectCount(new QueryWrapper<WarehouseUpdownGoodsEntity>().lambda() |
||||
.eq(WarehouseUpdownGoodsEntity::getIsDeleted,0) |
||||
.eq(WarehouseUpdownGoodsEntity::getAllocationId,alloId) |
||||
).intValue(); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,50 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.warehouse.wrapper; |
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper; |
||||
import org.springblade.core.tool.utils.BeanUtil; |
||||
import com.logpm.warehouse.entity.WarehouseUpdownGoodsEntity; |
||||
import com.logpm.warehouse.vo.WarehouseUpdownGoodsVO; |
||||
import java.util.Objects; |
||||
|
||||
/** |
||||
* 货位与货物绑定表 包装类,返回视图层所需的字段 |
||||
* |
||||
* @author lmy |
||||
* @since 2023-08-14 |
||||
*/ |
||||
public class WarehouseUpdownGoodsWrapper extends BaseEntityWrapper<WarehouseUpdownGoodsEntity, WarehouseUpdownGoodsVO> { |
||||
|
||||
public static WarehouseUpdownGoodsWrapper build() { |
||||
return new WarehouseUpdownGoodsWrapper(); |
||||
} |
||||
|
||||
@Override |
||||
public WarehouseUpdownGoodsVO entityVO(WarehouseUpdownGoodsEntity warehouseUpdownGoods) { |
||||
WarehouseUpdownGoodsVO warehouseUpdownGoodsVO = Objects.requireNonNull(BeanUtil.copy(warehouseUpdownGoods, WarehouseUpdownGoodsVO.class)); |
||||
|
||||
//User createUser = UserCache.getUser(warehouseUpdownGoods.getCreateUser());
|
||||
//User updateUser = UserCache.getUser(warehouseUpdownGoods.getUpdateUser());
|
||||
//warehouseUpdownGoodsVO.setCreateUserName(createUser.getName());
|
||||
//warehouseUpdownGoodsVO.setUpdateUserName(updateUser.getName());
|
||||
|
||||
return warehouseUpdownGoodsVO; |
||||
} |
||||
|
||||
|
||||
} |
Loading…
Reference in new issue