Browse Source

1.托盘

dev-warehouse
0.0 2 years ago
parent
commit
1cc696ee83
  1. 127
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseTrayEntity.java
  2. 48
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseTrayVO.java
  3. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTrayMapper.xml
  4. 36
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseGoodsAllocationController.java
  5. 6
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseGoodsAllocationMapper.java
  6. 4
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseGoodsAllocationMapper.xml
  7. 9
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseGoodsAllocationService.java
  8. 7
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseGoodsAllocationServiceImpl.java

127
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseTrayEntity.java

@ -0,0 +1,127 @@
/*
* 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.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
/**
* 托盘 实体类
*
* @author tjj
* @since 2023-05-25
*/
@Data
@TableName("logpm_warehouse_tray")
@ApiModel(value = "BasicdataTray对象", description = "托盘")
@EqualsAndHashCode(callSuper = true)
public class WarehouseTrayEntity 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 palletCode;
/**
* 托盘名称
*/
@ApiModelProperty(value = "托盘名称")
private String palletName;
/**
* 仓库编号
*/
@ApiModelProperty(value = "仓库编号")
private Long warehouseId;
/**
* 托盘状态;1-空闲2-货物3-损毁4-流通5
*/
@ApiModelProperty(value = "托盘状态;1-空闲;2-货物;3-损毁;4-流通;5")
private String trayStatus;
/**
* 类型;木托 铁托 台面托
*/
@ApiModelProperty(value = "类型;木托 铁托 台面托")
private Integer type;
/**
* 托盘旧ID
*/
@ApiModelProperty(value = "托盘旧ID")
private Integer oldId;
/**
* 托盘旧托盘码
*/
@ApiModelProperty(value = "托盘旧托盘码")
private String oldQrCode;
/**
* 破损照片
*/
@ApiModelProperty(value = "破损照片")
private String damagedPhotos;
/**
* 破损备注
*/
@ApiModelProperty(value = "破损备注")
private String damagedNote;
@ApiModelProperty(value = "目前所在仓库")
private Long nowWarehouseId;
/**
* 禁用状态1-,2-
*/
@ApiModelProperty(value = "禁用状态(1-否,2-是)")
private Integer disableType;
}

48
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseTrayVO.java

@ -0,0 +1,48 @@
/*
* 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.warehouse.entity.WarehouseTrayEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 托盘 视图实体类
*
* @author tjj
* @since 2023-05-25
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class WarehouseTrayVO extends WarehouseTrayEntity {
private static final long serialVersionUID = 1L;
/**
* 仓库名称
*/
@ApiModelProperty(value = "仓库名称")
private String warehouseName;
/**
* 禁用状态
*/
@ApiModelProperty(value = "禁用状态(值)")
private String disableTypeName;
}

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTrayMapper.xml

@ -188,7 +188,7 @@
JOIN logpm_distribution_stock_list ldsl ON lwtgl.association_id = ldsl.id
left join (logpm_warehouse_updown_goods lwug join logpm_warehouse_goods_allocation lwga on lwug.allocation_id =lwga.id) on lwug.association_id = ldsl.id
WHERE
ldsl.is_deleted = 0 and lwtgl.is_deleted = 0 = 0 and lwtgl.association_type = 4 and lwtgl.tray_id = #{param.id}
ldsl.is_deleted = 0 and lwtgl.is_deleted = 0 and lwtgl.association_type = 4 and lwtgl.tray_id = #{param.id}
</select>
<select id="selectlclListhistory" resultType="com.logpm.basicdata.vo.BasicdataStockArticleVO">
SELECT

36
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseGoodsAllocationController.java

@ -20,15 +20,13 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.warehouse.dto.UpShelfOrderDTO;
import com.logpm.warehouse.dto.UpShelfPackageDTO;
import com.logpm.warehouse.dto.UpdownTypeDTO;
import com.logpm.warehouse.entity.WarehouseGoodsAllocationEntity;
import com.logpm.warehouse.excel.WarehouseGoodsAllocationExcel;
import com.logpm.warehouse.service.IWarehouseGoodsAllocationService;
import com.logpm.warehouse.service.IWarehouseUpdownTypeService;
import com.logpm.warehouse.vo.WarehouseGoodsAllocationVO;
import com.logpm.warehouse.vo.WarehouseStockArticleCopyVO;
import com.logpm.warehouse.vo.WarehouseVisCargo;
import com.logpm.warehouse.vo.WarehouseVisualizationVO;
import com.logpm.warehouse.vo.*;
import com.logpm.warehouse.wrapper.WarehouseGoodsAllocationWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -146,10 +144,23 @@ public class WarehouseGoodsAllocationController extends BladeController {
return R.data(pages);
}
/**
* 货位上架 查询托盘
*/
@GetMapping("/tray")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "货位上架 查询托盘", notes = "传入warehouseGoodsAllocation")
public R<IPage <WarehouseTrayVO>> tray(WarehouseTrayVO warehouseTrayVO, Query query) {
IPage <WarehouseTrayVO> pages = warehouseGoodsAllocationService.selectTray(warehouseTrayVO,Condition.getPage(query));
return R.data(pages);
}
/**
* 货位上架 订单上架
*/
@PostMapping("/uporder")
@PostMapping("/upOrder")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "货位上架 订单上架", notes = "传入updownTypeDTO")
public R uporder(@RequestBody UpdownTypeDTO updownTypeDTO) {
@ -165,7 +176,7 @@ public class WarehouseGoodsAllocationController extends BladeController {
/**
* 货位上架 服务号上架
*/
@PostMapping("/upservice")
@PostMapping("/upService")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "货位上架 服务号上架", notes = "传入warehouseGoodsAllocation")
public R upservice(@RequestBody UpdownTypeDTO updownTypeDTO) {
@ -190,18 +201,13 @@ public class WarehouseGoodsAllocationController extends BladeController {
@ApiOperationSupport(order = 3)
@ApiOperation(value = "货位上架 包条上架", notes = "传入warehouseGoodsAllocation")
public R upPackage(@RequestBody UpdownTypeDTO updownTypeDTO) {
//取出服务号
List<UpShelfOrderDTO> upShelfOrderList = updownTypeDTO.getUpShelfOrderList();
//取出包条Id
List<UpShelfPackageDTO> upShelfPackageList = updownTypeDTO.getUpShelfPackageList();
Long allocationId = updownTypeDTO.getAllocationId();
if (upShelfOrderList.size()==0 || Objects.isNull(allocationId)){
if (upShelfPackageList.size()==0 || Objects.isNull(allocationId)){
return R.fail("参数不全");
}else {
List<String> ServiceNumberList = upShelfOrderList.stream().map(UpShelfOrderDTO::getServiceNumber).collect(Collectors.toList());
//将改服务号的所有订单查出
upShelfOrderList = warehouseGoodsAllocationService.selectorderByServiceNumber(ServiceNumberList);
}
return warehouseUpdownTypeService.upShelfOrder(upShelfOrderList,allocationId);
return warehouseUpdownTypeService.upShelfPackage(upShelfPackageList,allocationId);
}
/**

6
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseGoodsAllocationMapper.java

@ -109,4 +109,10 @@ public interface WarehouseGoodsAllocationMapper extends BaseMapper<WarehouseGood
* @return
*/
List<WarehouseVisualizationVO> selectwrap(IPage<WarehouseVisualizationVO> page,@Param("param") WarehouseGoodsAllocationVO warehouseGoodsAllocation);
/**
* 查询托盘
*
* @return
*/
List<WarehouseTrayVO> selectTray(IPage<WarehouseTrayVO> page,@Param("param") WarehouseTrayVO warehouseTrayVO);
}

4
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseGoodsAllocationMapper.xml

@ -66,5 +66,9 @@
<select id="selectwrap" resultType="com.logpm.warehouse.vo.WarehouseVisualizationVO">
select ldpl.* from logpm_distribution_parcel_list ldpl WHERE ldpl.order_package_grounding_status ='10' and ldpl.is_deleted = 0
</select>
<select id="selectTray" resultType="com.logpm.warehouse.vo.WarehouseTrayVO">
</select>
</mapper>

9
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseGoodsAllocationService.java

@ -19,12 +19,9 @@ package com.logpm.warehouse.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.logpm.warehouse.dto.UpShelfOrderDTO;
import com.logpm.warehouse.entity.WarehouseGoodsAllocationEntity;
import com.logpm.warehouse.vo.WarehouseGoodsAllocationVO;
import com.logpm.warehouse.vo.*;
import com.logpm.warehouse.excel.WarehouseGoodsAllocationExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.warehouse.vo.WarehouseStockArticleCopyVO;
import com.logpm.warehouse.vo.WarehouseVisCargo;
import com.logpm.warehouse.vo.WarehouseVisualizationVO;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.mp.support.Query;
@ -79,4 +76,8 @@ public interface IWarehouseGoodsAllocationService extends BaseService<WarehouseG
* 货位 查询包件
*/
IPage<WarehouseVisualizationVO> selectwrap(WarehouseGoodsAllocationVO warehouseGoodsAllocation, IPage<WarehouseVisualizationVO> page);
/**
* 货位 查询托盘
*/
IPage<WarehouseTrayVO> selectTray(WarehouseTrayVO warehouseGoodsAllocation, IPage<WarehouseTrayVO> page);
}

7
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseGoodsAllocationServiceImpl.java

@ -146,4 +146,11 @@ public class WarehouseGoodsAllocationServiceImpl extends BaseServiceImpl<Warehou
return page.setRecords(warehouseVisualizationVOList);
}
@Override
public IPage<WarehouseTrayVO> selectTray(WarehouseTrayVO warehouseTrayVO, IPage<WarehouseTrayVO> page) {
//查询未在货位的托盘
List<WarehouseTrayVO> list = baseMapper.selectTray(page,warehouseTrayVO);
return page.setRecords(list);
}
}

Loading…
Cancel
Save