Browse Source

1.托盘解除限制,进行所有数据分拣

training
zhenghaoyu 12 months ago
parent
commit
e355dca201
  1. 2
      blade-biz-common/src/main/java/org/springblade/common/constant/ModuleNameConstant.java
  2. 1
      blade-biz-common/src/main/java/org/springblade/common/constant/apiwarehouse/PalletProductTypeConstant.java
  3. 3
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseUpdownTypeClient.java
  4. 10
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/TrayTypeDataVO.java
  5. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/UpdownTypeDTO.java
  6. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseTrayTypeClient.java
  7. 5
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseUpdownTypeClient.java
  8. 9
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayGoodsMapper.xml
  9. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayTypeMapper.xml
  10. 3
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownTypeService.java
  11. 772
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java
  12. 286
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java

2
blade-biz-common/src/main/java/org/springblade/common/constant/ModuleNameConstant.java

@ -8,7 +8,7 @@ public interface ModuleNameConstant {
/**
* 如果不需要 ""
*/
public static final String DEVAUTH ="-pref";
public static final String DEVAUTH ="";
/**
* 工厂对接服务名称

1
blade-biz-common/src/main/java/org/springblade/common/constant/apiwarehouse/PalletProductTypeConstant.java

@ -6,5 +6,6 @@ public interface PalletProductTypeConstant {
String ARTIFICIAL = "2";
String STOCKDATA = "3";
String STOCKNODATA = "4";
String OTHER = "100";
}

3
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseUpdownTypeClient.java

@ -49,4 +49,7 @@ public interface IWarehouseUpdownTypeClient {
@PostMapping(TOP + "/downStock")
R downStock(@RequestBody List<JSONObject> stockLists);
@PostMapping(TOP + "/packageChangeStock")
boolean packageChangeStock(@RequestBody List<String> orderPackageCodes);
}

10
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/TrayTypeDataVO.java

@ -24,7 +24,11 @@ public class TrayTypeDataVO implements Serializable {
private String marketCode;//商场编码
private String marketName;//商场名称
private Integer orderTotalNum;//总件数
private Integer orderTotalNum;//订单总件数
private Integer orderlNum;//托盘订单件数
private Integer stockNum;//库存品件数
private Integer stockTotalNum;//库存品总件数
private String trayType;//打托方式
@ -34,7 +38,9 @@ public class TrayTypeDataVO implements Serializable {
private Long warehosueId;
private String warehosueName;
private List<TrayTypeDataListVO> list = new ArrayList<>();
private List<TrayTypeDataListVO> packageList = new ArrayList<>();
private List<TrayTypeDataListVO> zeroList = new ArrayList<>();
private List<TrayTypeDataListVO> stockList = new ArrayList<>();
private List<WarehouseTrayGoodsEntity> goodsLsit = new ArrayList<>();

2
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/UpdownTypeDTO.java

@ -53,4 +53,6 @@ public class UpdownTypeDTO implements Serializable {
private String orderCode;//订单号
private List<String> orderPackageCodes;
}

1
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseTrayTypeClient.java

@ -70,4 +70,5 @@ public class WarehouseTrayTypeClient implements IWarehouseTrayTypeClient {
}
}
}

5
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseUpdownTypeClient.java

@ -102,4 +102,9 @@ public class WarehouseUpdownTypeClient implements IWarehouseUpdownTypeClient {
return R.fail(403,"处理失败");
}
}
@Override
public boolean packageChangeStock(List<String> orderPackageCodes) {
return warehouseUpdownTypeService.packageChangeStock(orderPackageCodes);
}
}

9
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayGoodsMapper.xml

@ -5,6 +5,7 @@
<select id="getListByTrayTypeId" resultType="com.logpm.warehouse.vo.TrayTypeDataListVO">
select ldsa.id dataId,
ldsa.order_code dataCode,
1 goodsType,
sum(lwtg.num) scanNum,
MAX(ldsa.total_number) orderTotalNum,
max(IF(lwtg.is_fleeing='1', 1, 0)) isFleeing
@ -13,6 +14,7 @@
left join logpm_distribution_stock_article ldsa on ldsa.id = ldpl.stock_article_id and ldsa.is_deleted = 0
where 1=1
and lwtg.is_deleted = 0
and lwtg.association_type = 3
and lwtg.tray_type_id = #{trayTypeId}
and ldpl.warehouse_id = #{warehouseId}
and ldsa.warehouse_id = #{warehouseId}
@ -32,6 +34,7 @@
left join logpm_distribution_parcel_list ldpl on ldpl.id = lwtg.association_id and ldpl.is_deleted = 0
left join logpm_distribution_stock_article ldsa on ldpl.order_code = ldsa.order_code and ldsa.is_deleted = 0
where 1=1
and lwtg.association_type = 3
and lwtg.is_deleted = 0
and lwtg.tray_type_id = #{trayTypeId}
group by ldpl.order_code,
@ -54,6 +57,7 @@
select lwtg.id trayGoodsId,
ldsa.id dataId,
ldsa.waybill_number waybillNo,
2 goodsType,
ldsa.order_code dataCode,
lwtg.num scanNum,
ldsa.total_number orderTotalNum,
@ -77,6 +81,7 @@
left join logpm_warehouse_tray lwt on lwt.id = lwtg.tray_id and lwt.is_deleted = 0
left join logpm_distribution_stock_article ldsa on ldsa.id = lwtg.association_id and ldsa.is_zero = 1 and ldsa.is_deleted = 0
where lwtg.is_deleted = 0
and lwtg.association_type = 1
and lwtg.tray_type_id = #{trayTypeId}
</select>
@ -99,8 +104,9 @@
from logpm_warehouse_tray_goods lwtg
left join logpm_warehouse_tray_type lwtt on lwtt.id = lwtg.tray_type_id and lwtt.is_deleted = 0
left join logpm_basicdata_material lbm on lwtg.association_id = lbm.id and lbm.is_deleted = 0
left join logpm_distribution_stock_list ldsl on ldsl.material_id = lbm.id and lwtt.market_id = ldsl.market_id and ldsl.incoming_batch = lwtg.incoming_batch and ldsl.is_deleted = 0
left join logpm_distribution_stock_list ldsl on ldsl.material_id = lwtg.association_id and lwtg.market_id = ldsl.market_id and ldsl.incoming_batch = lwtg.incoming_batch and ldsl.is_deleted = 0
where lwtg.is_deleted = 0
and lwtg.association_type = 4
and lwtg.tray_type_id = #{trayTypeId}
and ldsl.warehouse_id = #{warehouseId}
</select>
@ -135,6 +141,7 @@
left join logpm_warehouse_tray lwt on lwt.id = lwtg.tray_id and lwt.is_deleted = 0
left join logpm_distribution_stock_list ldsl on ldsl.material_id = lwtg.association_id and lwtg.market_id = ldsl.market_id and lwtg.incoming_batch = ldsl.incoming_batch and lwtg.warehouse_id = ldsl.warehouse_id and ldsl.is_deleted = 0
where lwtg.is_deleted = 0
and lwtg.association_type = 4
and lwtg.tray_type_id = #{trayTypeId}
</select>

1
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayTypeMapper.xml

@ -8,7 +8,6 @@
left join logpm_warehouse_tray lwt on lwt.id = lwtt.tray_id
where 1=1
and lwtt.is_deleted = 0
and lwtt.type = #{param.type}
and lwtt.warehouse_id = #{warehouseId}
<if test="param.trayCode != null and param.trayCode != '' ">
and lwtt.tray_code = #{param.trayCode}

3
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownTypeService.java

@ -66,4 +66,7 @@ public interface IWarehouseUpdownTypeService extends BaseService<WarehouseUpdown
R moveAllocationByAllocation(Long allocationId, Long targetAllocationId, Long warehouseId);
UpShelfAllocationVO moveAllocationScanSourceAllocation(Long allocationId, Long warehouseId);
boolean packageChangeStock(List<String> orderPackageCodes);
}

772
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java

File diff suppressed because it is too large Load Diff

286
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java

@ -18,7 +18,6 @@ import com.logpm.warehouse.service.*;
import com.logpm.warehouse.vo.*;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springblade.common.constant.apiwarehouse.PalletProductTypeConstant;
import org.springblade.common.exception.CustomerException;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.api.R;
@ -48,6 +47,116 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
private final IWarehouseTrayGoodsService warehouseTrayGoodsService;
private final IWarehouseUpdownGoodsService warehouseUpdownGoodsService;
private final IWarehouseUpdownGoodsLogService warehouseUpdownGoodsLogService;
private final IBasicdataWarehouseClient warehouseClient;
@Override
public boolean packageChangeStock(List<String> orderPackageCodes) {
log.info("####################已上架 打托的包件转库存品 ");
for (String orderPackageCode:orderPackageCodes){
log.info("####################当前处理的包件 orderPackageCode={}",orderPackageCode);
QueryWrapper<WarehouseUpdownGoodsEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("association_value",orderPackageCode);
WarehouseUpdownGoodsEntity one = warehouseUpdownGoodsService.getOne(queryWrapper);
if(!Objects.isNull(one)){
packageChangeStockByAllocaton(one);
}else{
//判断包件在哪个托盘上
packageChangeStockByTray(orderPackageCode);
}
}
return true;
}
private void packageChangeStockByAllocaton(WarehouseUpdownGoodsEntity one) {
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn("################packageChangeStockByTray: 仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return;
}
Long warehouseId = myCurrentWarehouse.getId();
if(!Objects.isNull(one)){
//包件已打托,需要处理
Long updownTypeId = one.getUpdownTypeId();
String orderPackageCode = one.getAssociationValue();
Long allocationId = one.getAllocationId();
Long updownGoodsId = one.getId();
//查询包件的物料信息
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCode(orderPackageCode);
if(Objects.isNull(parcelListEntity)){
log.error("#############packageChangeStockByTray: 包件信息不存在 orderPackageCode={}",orderPackageCode);
return;
}
String orderCode = parcelListEntity.getOrderCode();//订单自编码
String materialCode = parcelListEntity.getMaterialCode();//物料编码
Long marketId = parcelListEntity.getMarketId();//商场id
//先删除包件的打托
List<UpShelfPackageDTO> upShelfPackageList = new ArrayList<>();
UpShelfPackageDTO upShelfPackageDTO = new UpShelfPackageDTO();
upShelfPackageDTO.setOrderPackageCode(orderPackageCode);
upShelfPackageList.add(upShelfPackageDTO);
downPackage(upShelfPackageList,warehouseId);
List<UpShelfStockDTO> upShelfStockList = new ArrayList<>();
UpShelfStockDTO upShelfStockDTO = new UpShelfStockDTO();
upShelfStockDTO.setIncomingBatch(orderCode);
upShelfStockDTO.setMaterialCode(materialCode);
upShelfStockDTO.setMarketId(marketId);
upShelfStockDTO.setEnterNum(1);
upShelfStockList.add(upShelfStockDTO);
upShelfStockList(upShelfStockList,allocationId,warehouseId);
}
}
private void packageChangeStockByTray(String orderPackageCode) {
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn("################packageChangeStockByTray: 仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return;
}
Long warehouseId = myCurrentWarehouse.getId();
//先查询包件是否在托
QueryWrapper<WarehouseTrayGoodsEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("association_value",orderPackageCode);
WarehouseTrayGoodsEntity one = warehouseTrayGoodsService.getOne(queryWrapper);
if(!Objects.isNull(one)){
//包件已打托,需要处理
Long trayTypeId = one.getTrayTypeId();
String trayCode = one.getTrayCode();
Long trayGoodsId = one.getId();
//查询包件的物料信息
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCode(orderPackageCode);
if(Objects.isNull(parcelListEntity)){
log.error("#############packageChangeStockByTray: 包件信息不存在 orderPackageCode={}",orderPackageCode);
return;
}
String orderCode = parcelListEntity.getOrderCode();//订单自编码
String materialCode = parcelListEntity.getMaterialCode();//物料编码
Long marketId = parcelListEntity.getMarketId();//商场id
//先删除包件的打托
warehouseTrayTypeService.downPackageByOrderPackageCode(orderPackageCode,"包件解托:包件转库存品",warehouseId);
warehouseTrayTypeService.scanStockOrderPackageCode(trayCode,"100",orderPackageCode,warehouseId);
}
}
@Override
public TragetAllocationVO findGoodsByAllocation(Long allocationId) {
@ -282,17 +391,21 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
throw new CustomerException(403,"托盘在其他仓库打托");
}
List<UpShelfDataVO> listByTrayTypeId = null;
if(PalletProductTypeConstant.CUSTOMIZED.equals(type)){
listByTrayTypeId = warehouseTrayGoodsService.getUpListByTrayTypeId(trayTypeId);
}else if(PalletProductTypeConstant.ARTIFICIAL.equals(type)){
listByTrayTypeId = warehouseTrayGoodsService.getZeroUpListByTrayTypeId(trayTypeId);
}else if(PalletProductTypeConstant.STOCKDATA.equals(type)){
listByTrayTypeId = warehouseTrayGoodsService.getStockUpListByTrayTypeId(trayTypeId);
}else if(PalletProductTypeConstant.STOCKNODATA.equals(type)){
listByTrayTypeId = warehouseTrayGoodsService.getStockUpListByTrayTypeId(trayTypeId);
}
return listByTrayTypeId;
List<UpShelfDataVO> packageList = warehouseTrayGoodsService.getUpListByTrayTypeId(trayTypeId);
List<UpShelfDataVO> zeroList = warehouseTrayGoodsService.getZeroUpListByTrayTypeId(trayTypeId);
List<UpShelfDataVO> stockList = warehouseTrayGoodsService.getStockUpListByTrayTypeId(trayTypeId);
// if(PalletProductTypeConstant.CUSTOMIZED.equals(type)){
// listByTrayTypeId = warehouseTrayGoodsService.getUpListByTrayTypeId(trayTypeId);
// }else if(PalletProductTypeConstant.ARTIFICIAL.equals(type)){
// listByTrayTypeId = warehouseTrayGoodsService.getZeroUpListByTrayTypeId(trayTypeId);
// }else if(PalletProductTypeConstant.STOCKDATA.equals(type)){
// listByTrayTypeId = warehouseTrayGoodsService.getStockUpListByTrayTypeId(trayTypeId);
// }else if(PalletProductTypeConstant.STOCKNODATA.equals(type)){
// listByTrayTypeId = warehouseTrayGoodsService.getStockUpListByTrayTypeId(trayTypeId);
// }
packageList.addAll(zeroList);
packageList.addAll(stockList);
return packageList;
}
return null;
}
@ -397,11 +510,11 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
upShelfAllocationVO.setOrderTotalnum(trayTypeEntity.getOrderTotalNum());
upShelfAllocationVO.setStockNum(trayTypeEntity.getStockNum());
upShelfAllocationVO.setStockTotalNum(trayTypeEntity.getStockTotalNum());
if("1".equals(type) || "2".equals(type)){
upShelfAllocationVO.setTrayNum(trayTypeEntity.getTotalNum());
}else if("3".equals(type) || "4".equals(type)){
upShelfAllocationVO.setTrayNum(trayTypeEntity.getStockNum());
}
// if("1".equals(type) || "2".equals(type)){
// upShelfAllocationVO.setTrayNum(trayTypeEntity.getTotalNum());
// }else if("3".equals(type) || "4".equals(type)){
// upShelfAllocationVO.setTrayNum(trayTypeEntity.getStockNum());
// }
}
return upShelfAllocationVO;
@ -489,11 +602,11 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
//如果有托盘
TrayTypeDataVO entityByTrayCode = warehouseTrayTypeService.getEntityByTrayCodeWithUpdown(trayCode);
trayType = entityByTrayCode.getTrayType();
String type = entityByTrayCode.getType();//数据类型 1订制品 2零担 3 4 库存品
if(!"1".equals(type)){
log.warn("##############upShelfOrder: 库位上的托盘是定制品类型 allocationId={}",allocationId);
return R.fail(403,"库位上的托盘是定制品类型");
}
// String type = entityByTrayCode.getType();//数据类型 1订制品 2零担 3 4 库存品
// if(!"1".equals(type)){
// log.warn("##############upShelfOrder: 库位上的托盘是定制品类型 allocationId={}",allocationId);
// return R.fail(403,"库位上的托盘是定制品类型");
// }
}
@ -543,13 +656,15 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
try{
String orderPackageCode = parcelListEntity.getOrderPackageCode();
Integer quantity = parcelListEntity.getQuantity();
//包件级别的上架
upShelfPackageNoTray(parcelListEntity,goodsAllocationEntity,goodsShelfEntity,goodsAreaEntity,warehouseId);
if(StringUtil.hasLength(trayCode)){
//存入托盘信息
warehouseTrayTypeService.orderScanOrderPackageCode(trayType,trayCode,orderPackageCode,warehouseId);
}
//包件级别的上架
upShelfPackageNoTray(parcelListEntity,goodsAllocationEntity,goodsShelfEntity,goodsAreaEntity,warehouseId);
num = num + quantity;
}catch (CustomerException e){
log.warn(e.message);
@ -578,11 +693,11 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
.eq("is_deleted",0);
WarehouseTrayTypeEntity trayTypeEntity = warehouseTrayTypeService.getOne(queryWrapper);
trayType = trayTypeEntity.getTrayType();
String type = trayTypeEntity.getType();//数据类型 1订制品 2零担 3 4 库存品
if(!"1".equals(type)){
log.warn("##############upShelfOrder: 库位上的托盘是定制品类型 allocationId={}",allocationId);
return R.fail(403,"库位上的托盘是定制品类型");
}
// String type = trayTypeEntity.getType();//数据类型 1订制品 2零担 3 4 库存品
// if(!"1".equals(type)){
// log.warn("##############upShelfOrder: 库位上的托盘是定制品类型 allocationId={}",allocationId);
// return R.fail(403,"库位上的托盘是定制品类型");
// }
}
BasicdataGoodsAllocationEntity goodsAllocationEntity = basicdataGoodsAllocationClient.getEntityByAllocationId(allocationId);
if(Objects.isNull(goodsAllocationEntity)){
@ -644,7 +759,12 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
}
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(orderPackageCode,warehouseId);
Integer conditions = parcelListEntity.getConditions();
Integer quantity = parcelListEntity.getQuantity();
if(conditions != 1){
log.warn("##############upShelfPackage: 包件已转库存品 orderPackageCode={}",orderPackageCode);
continue;
}
if(StringUtil.hasLength(trayCode)){
//存入托盘信息
warehouseTrayTypeService.orderScanOrderPackageCode(trayType,trayCode,orderPackageCode,warehouseId);
@ -743,11 +863,11 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
//如果有托盘
TrayTypeDataVO entityByTrayCode = warehouseTrayTypeService.getEntityByTrayCodeWithUpdown(trayCode);
trayType = entityByTrayCode.getTrayType();
String type = entityByTrayCode.getType();//数据类型 1订制品 2零担 3 4 库存品
if(!"2".equals(type)){
log.warn("##############upShelfOrder: 库位上的托盘是零担类型 allocationId={}",allocationId);
return R.fail(403,"库位上的托盘是零担类型");
}
// String type = entityByTrayCode.getType();//数据类型 1订制品 2零担 3 4 库存品
// if(!"2".equals(type)){
// log.warn("##############upShelfOrder: 库位上的托盘是零担类型 allocationId={}",allocationId);
// return R.fail(403,"库位上的托盘是零担类型");
// }
}
BasicdataGoodsAllocationEntity goodsAllocationEntity = basicdataGoodsAllocationClient.getEntityByAllocationId(allocationId);
if(Objects.isNull(goodsAllocationEntity)){
@ -871,10 +991,11 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
}
@Override
public R upShelfStockList(List<UpShelfStockDTO> upShelfStockList, Long allocationId,Long warehouseId) {
public R upShelfStockList(List<UpShelfStockDTO> allList, Long allocationId,Long warehouseId) {
int num = 0;
String trayCode = null;
String trayType = null;
List<UpShelfStockDTO> upShelfStockList = new ArrayList<>();
//判断货位是否有托盘
BasicdataTrayEntity trayEntity = warehouseTaryAllocationService.getTrayByAllocationId(allocationId);
if(!Objects.isNull(trayEntity)){
@ -882,11 +1003,21 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
//如果有托盘
TrayTypeDataVO entityByTrayCode = warehouseTrayTypeService.getEntityByTrayCodeWithUpdown(trayCode);
trayType = entityByTrayCode.getTrayType();
String type = entityByTrayCode.getType();//数据类型 1订制品 2零担 3 4 库存品
if(!"3".equals(type) && !"4".equals(type) ){
log.warn("##############upShelfOrder: 库位上的托盘是库存品类型 allocationId={}",allocationId);
return R.fail(403,"库位上的托盘是库存品类型");
Long marketId = entityByTrayCode.getMarketId();
String marketName = entityByTrayCode.getMarketName();
//先去除不是该商场的库存品
for (UpShelfStockDTO upShelfStockDTO:allList){
Long mid = upShelfStockDTO.getMarketId();
if(mid.equals(marketId)){
upShelfStockList.add(upShelfStockDTO);
}
}
// String type = entityByTrayCode.getType();//数据类型 1订制品 2零担 3 4 库存品
// if(!"3".equals(type) && !"4".equals(type) ){
// log.warn("##############upShelfOrder: 库位上的托盘是库存品类型 allocationId={}",allocationId);
// return R.fail(403,"库位上的托盘是库存品类型");
// }
}
BasicdataGoodsAllocationEntity goodsAllocationEntity = basicdataGoodsAllocationClient.getEntityByAllocationId(allocationId);
if(Objects.isNull(goodsAllocationEntity)){
@ -1467,16 +1598,20 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
return R.fail(403,"托盘没有货物信息");
}
List<UpShelfDataVO> listByTrayTypeId = null;
if(PalletProductTypeConstant.CUSTOMIZED.equals(type)){
listByTrayTypeId = warehouseTrayGoodsService.getUpListByTrayTypeId(trayTypeId);
}else if(PalletProductTypeConstant.ARTIFICIAL.equals(type)){
listByTrayTypeId = warehouseTrayGoodsService.getZeroUpListByTrayTypeId(trayTypeId);
}else if(PalletProductTypeConstant.STOCKDATA.equals(type)){
listByTrayTypeId = warehouseTrayGoodsService.getStockUpListByTrayTypeId(trayTypeId);
}else if(PalletProductTypeConstant.STOCKNODATA.equals(type)){
listByTrayTypeId = warehouseTrayGoodsService.getStockUpListByTrayTypeId(trayTypeId);
}
List<UpShelfDataVO> packageList = warehouseTrayGoodsService.getUpListByTrayTypeId(trayTypeId);
List<UpShelfDataVO> zeroList = warehouseTrayGoodsService.getZeroUpListByTrayTypeId(trayTypeId);
List<UpShelfDataVO> stockList = warehouseTrayGoodsService.getStockUpListByTrayTypeId(trayTypeId);
packageList.addAll(zeroList);
packageList.addAll(stockList);
// if(PalletProductTypeConstant.CUSTOMIZED.equals(type)){
// listByTrayTypeId = warehouseTrayGoodsService.getUpListByTrayTypeId(trayTypeId);
// }else if(PalletProductTypeConstant.ARTIFICIAL.equals(type)){
// listByTrayTypeId = warehouseTrayGoodsService.getZeroUpListByTrayTypeId(trayTypeId);
// }else if(PalletProductTypeConstant.STOCKDATA.equals(type)){
// listByTrayTypeId = warehouseTrayGoodsService.getStockUpListByTrayTypeId(trayTypeId);
// }else if(PalletProductTypeConstant.STOCKNODATA.equals(type)){
// listByTrayTypeId = warehouseTrayGoodsService.getStockUpListByTrayTypeId(trayTypeId);
// }
Map<String,Object> map = new HashMap<>();
map.put("warehouseId",warehouseId);
map.put("warehouseName",warehouseEntity.getName());
@ -1486,7 +1621,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
map.put("shelfName",goodsShelfEntity.getGoodsShelfName());
map.put("allocationId",allocationId);
map.put("allocationName",goodsAllocationEntity.getGoodsAllocationName());
map.put("list",listByTrayTypeId);
map.put("list",packageList);
return R.data(map);
}
@ -1573,28 +1708,39 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
upShelfAllocationVO.setTrayId(trayTypeEntity.getTrayId());
upShelfAllocationVO.setTrayCode(trayTypeEntity.getTrayCode());
upShelfAllocationVO.setTrayName(trayEntity.getPalletName());
upShelfAllocationVO.setTotalNum(trayTypeEntity.getTotalNum());
upShelfAllocationVO.setOrderTotalnum(trayTypeEntity.getOrderTotalNum());
upShelfAllocationVO.setStockNum(trayTypeEntity.getStockNum());
upShelfAllocationVO.setStockTotalNum(trayTypeEntity.getStockTotalNum());
Long trayTypeId = trayTypeEntity.getId();//打托方式id
String type = trayTypeEntity.getType();//打托分类
List<UpShelfDataVO> listByTrayTypeId = null;
if(PalletProductTypeConstant.CUSTOMIZED.equals(type)){
upShelfAllocationVO.setTotalNum(trayTypeEntity.getTotalNum());
upShelfAllocationVO.setOrderTotalnum(trayTypeEntity.getOrderTotalNum());
listByTrayTypeId = warehouseTrayGoodsService.getUpListByTrayTypeId(trayTypeId);
}else if(PalletProductTypeConstant.ARTIFICIAL.equals(type)){
upShelfAllocationVO.setTotalNum(trayTypeEntity.getTotalNum());
upShelfAllocationVO.setOrderTotalnum(trayTypeEntity.getOrderTotalNum());
listByTrayTypeId = warehouseTrayGoodsService.getZeroUpListByTrayTypeId(trayTypeId);
}else if(PalletProductTypeConstant.STOCKDATA.equals(type)){
upShelfAllocationVO.setStockNum(trayTypeEntity.getStockNum());
upShelfAllocationVO.setStockTotalNum(trayTypeEntity.getStockTotalNum());
listByTrayTypeId = warehouseTrayGoodsService.getStockUpListByTrayTypeId(trayTypeId);
}else if(PalletProductTypeConstant.STOCKNODATA.equals(type)){
upShelfAllocationVO.setStockNum(trayTypeEntity.getStockNum());
upShelfAllocationVO.setStockTotalNum(trayTypeEntity.getStockTotalNum());
listByTrayTypeId = warehouseTrayGoodsService.getStockUpListByTrayTypeId(trayTypeId);
}
upShelfAllocationVO.setList(listByTrayTypeId);
List<UpShelfDataVO> packageList = warehouseTrayGoodsService.getUpListByTrayTypeId(trayTypeId);
List<UpShelfDataVO> zeroList = warehouseTrayGoodsService.getZeroUpListByTrayTypeId(trayTypeId);
List<UpShelfDataVO> stockList = warehouseTrayGoodsService.getStockUpListByTrayTypeId(trayTypeId);
upShelfAllocationVO.getList().addAll(packageList);
upShelfAllocationVO.getList().addAll(zeroList);
upShelfAllocationVO.getList().addAll(stockList);
// String type = trayTypeEntity.getType();//打托分类
// List<UpShelfDataVO> listByTrayTypeId = warehouseTrayGoodsService.getUpListByTrayTypeId(trayTypeId);
// if(PalletProductTypeConstant.CUSTOMIZED.equals(type)){
// upShelfAllocationVO.setTotalNum(trayTypeEntity.getTotalNum());
// upShelfAllocationVO.setOrderTotalnum(trayTypeEntity.getOrderTotalNum());
// listByTrayTypeId = warehouseTrayGoodsService.getUpListByTrayTypeId(trayTypeId);
// }else if(PalletProductTypeConstant.ARTIFICIAL.equals(type)){
// upShelfAllocationVO.setTotalNum(trayTypeEntity.getTotalNum());
// upShelfAllocationVO.setOrderTotalnum(trayTypeEntity.getOrderTotalNum());
// listByTrayTypeId = warehouseTrayGoodsService.getZeroUpListByTrayTypeId(trayTypeId);
// }else if(PalletProductTypeConstant.STOCKDATA.equals(type)){
// upShelfAllocationVO.setStockNum(trayTypeEntity.getStockNum());
// upShelfAllocationVO.setStockTotalNum(trayTypeEntity.getStockTotalNum());
// listByTrayTypeId = warehouseTrayGoodsService.getStockUpListByTrayTypeId(trayTypeId);
// }else if(PalletProductTypeConstant.STOCKNODATA.equals(type)){
// upShelfAllocationVO.setStockNum(trayTypeEntity.getStockNum());
// upShelfAllocationVO.setStockTotalNum(trayTypeEntity.getStockTotalNum());
// listByTrayTypeId = warehouseTrayGoodsService.getStockUpListByTrayTypeId(trayTypeId);
// }
// upShelfAllocationVO.setList(listByTrayTypeId);
return R.data(upShelfAllocationVO);
}

Loading…
Cancel
Save