|
|
|
@ -3,11 +3,13 @@ package com.logpm.warehouse.service.impl;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
|
import com.logpm.basic.entity.BasicMaterialEntity; |
|
|
|
|
import com.logpm.basic.feign.IBasicMaterialClient; |
|
|
|
|
import com.logpm.basicdata.entity.BasicdataTrayEntity; |
|
|
|
|
import com.logpm.basicdata.feign.IBasicdataTrayClient; |
|
|
|
|
import com.logpm.distribution.entity.DistributionParcelListEntity; |
|
|
|
|
import com.logpm.distribution.entity.DistributionStockArticleEntity; |
|
|
|
|
import com.logpm.distribution.entity.DistributionStockListEntity; |
|
|
|
|
import com.logpm.distribution.feign.IDistributionParcelListClient; |
|
|
|
|
import com.logpm.distribution.feign.IDistributionStockArticleClient; |
|
|
|
|
import com.logpm.distribution.feign.IDistributionStockListClient; |
|
|
|
@ -88,6 +90,12 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public TrayTypeDataVO getEntityByTrayCode(String trayCode) { |
|
|
|
|
BasicdataTrayEntity basicdataTrayEntity = basicdataTrayClient.getTrayByTrayCode(trayCode); |
|
|
|
|
Integer disableType = basicdataTrayEntity.getDisableType(); |
|
|
|
|
if(disableType == 2){ |
|
|
|
|
log.warn("###############getEntityByTrayCode: 该托盘已被禁用 trayCode={}",trayCode); |
|
|
|
|
throw new CustomerException(403,"该托盘已被禁用"); |
|
|
|
|
} |
|
|
|
|
//根据托盘编码查询是否有托盘编码存在打托数据
|
|
|
|
|
QueryWrapper<WarehouseTrayTypeEntity> queryTrayTypeWrapper = new QueryWrapper<>(); |
|
|
|
|
queryTrayTypeWrapper.eq("tray_code",trayCode) |
|
|
|
@ -99,27 +107,54 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
|
|
|
|
|
} |
|
|
|
|
String type = trayTypeEntity.getType();//类型 1扫码分拣(订制品) 2人工分拣(零担) 3库存品
|
|
|
|
|
Long trayTypeId = trayTypeEntity.getId();//打托方式id
|
|
|
|
|
String trayType = trayTypeEntity.getTrayType(); |
|
|
|
|
|
|
|
|
|
TrayTypeDataVO trayTypeDataVO = new TrayTypeDataVO(); |
|
|
|
|
trayTypeDataVO.setTrayTypeId(trayTypeEntity.getId()); |
|
|
|
|
trayTypeDataVO.setTrayTypeId(trayTypeId); |
|
|
|
|
trayTypeDataVO.setType(type); |
|
|
|
|
trayTypeDataVO.setTrayCode(trayTypeEntity.getTrayCode()); |
|
|
|
|
trayTypeDataVO.setTrayNum(trayTypeEntity.getTotalNum()); |
|
|
|
|
trayTypeDataVO.setName(trayTypeEntity.getFilterValue()); |
|
|
|
|
trayTypeDataVO.setOrderTotalNum(trayTypeEntity.getOrderTotalNum()); |
|
|
|
|
trayTypeDataVO.setTrayType(trayTypeEntity.getTrayType()); |
|
|
|
|
String trayTypeName = DictBizCache.getValue(DictBizConstant.PALLET_TYPE, trayTypeEntity.getTrayType()); |
|
|
|
|
trayTypeDataVO.setTrayTypeName(trayTypeName); |
|
|
|
|
trayTypeDataVO.setTrayType(trayType); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(PalletProductTypeConstant.CUSTOMIZED.equals(type)){//订制品打托
|
|
|
|
|
String trayTypeName = DictBizCache.getValue(DictBizConstant.PALLET_ORDER_TYPE, trayTypeEntity.getTrayType()); |
|
|
|
|
trayTypeDataVO.setTrayTypeName(trayTypeName); |
|
|
|
|
List<TrayTypeDataListVO> list = warehouseTrayGoodsService.getListByTrayTypeId(trayTypeId); |
|
|
|
|
trayTypeDataVO.setList(list); |
|
|
|
|
}else if(PalletProductTypeConstant.ARTIFICIAL.equals(type)){ |
|
|
|
|
String trayTypeName = DictBizCache.getValue(DictBizConstant.PALLET_ZERO_TYPE, trayTypeEntity.getTrayType()); |
|
|
|
|
trayTypeDataVO.setTrayTypeName(trayTypeName); |
|
|
|
|
List<TrayTypeDataListVO> list = warehouseTrayGoodsService.getZeroListByTrayTypeId(trayTypeId); |
|
|
|
|
trayTypeDataVO.setList(list); |
|
|
|
|
}else if(PalletProductTypeConstant.INVENTORY.equals(type)){ |
|
|
|
|
}else if(PalletProductTypeConstant.STOCKDATA.equals(type)){ |
|
|
|
|
String trayTypeName = DictBizCache.getValue(DictBizConstant.PALLET_STOCK_TYPE, trayTypeEntity.getTrayType()); |
|
|
|
|
trayTypeDataVO.setTrayTypeName(trayTypeName); |
|
|
|
|
List<TrayTypeDataListVO> list = warehouseTrayGoodsService.getStockListByTrayTypeId(trayTypeId); |
|
|
|
|
trayTypeDataVO.setList(list); |
|
|
|
|
QueryWrapper<WarehouseTrayGoodsEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
queryWrapper.eq("tray_type_id",trayTypeId); |
|
|
|
|
List<WarehouseTrayGoodsEntity> ls = warehouseTrayGoodsService.list(queryWrapper); |
|
|
|
|
Long stockListId = ls.get(0).getAssociationId();//库存品id
|
|
|
|
|
DistributionStockListEntity stockListEntity = distributionStockListClient.getStockListById(stockListId); |
|
|
|
|
trayTypeDataVO.setMarketId(stockListEntity.getMarketId()); |
|
|
|
|
trayTypeDataVO.setMarketCode(stockListEntity.getMarketCode()); |
|
|
|
|
trayTypeDataVO.setMarketName(stockListEntity.getMarketName()); |
|
|
|
|
}else if(PalletProductTypeConstant.STOCKNODATA.equals(type)){ |
|
|
|
|
String trayTypeName = DictBizCache.getValue(DictBizConstant.PALLET_STOCKNODATA_TYPE, trayTypeEntity.getTrayType()); |
|
|
|
|
trayTypeDataVO.setTrayTypeName(trayTypeName); |
|
|
|
|
List<TrayTypeDataListVO> list = warehouseTrayGoodsService.getStockListNoDataByTrayTypeId(trayTypeId); |
|
|
|
|
trayTypeDataVO.setList(list); |
|
|
|
|
QueryWrapper<WarehouseTrayGoodsEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
queryWrapper.eq("tray_type_id",trayTypeId); |
|
|
|
|
List<WarehouseTrayGoodsEntity> ls = warehouseTrayGoodsService.list(queryWrapper); |
|
|
|
|
Long stockListId = ls.get(0).getAssociationId();//库存品id
|
|
|
|
|
DistributionStockListEntity stockListEntity = distributionStockListClient.getStockListById(stockListId); |
|
|
|
|
trayTypeDataVO.setMarketId(stockListEntity.getMarketId()); |
|
|
|
|
trayTypeDataVO.setMarketCode(stockListEntity.getMarketCode()); |
|
|
|
|
trayTypeDataVO.setMarketName(stockListEntity.getMarketName()); |
|
|
|
|
}else { |
|
|
|
|
log.warn("##################getEntityByTrayCode: 未知的打托类型"); |
|
|
|
|
} |
|
|
|
@ -453,14 +488,14 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
|
|
|
|
|
return R.fail(403,"未找到订单信息"); |
|
|
|
|
} |
|
|
|
|
boolean flag = false; |
|
|
|
|
if("110".equals(tt)) {//运单号
|
|
|
|
|
if("10".equals(tt)) {//运单号
|
|
|
|
|
String waybillNumber = stockArticleEntity.getWaybillNumber(); |
|
|
|
|
if (!filterValue.equals(waybillNumber)) { |
|
|
|
|
flag = true; |
|
|
|
|
chuanFlag = true; |
|
|
|
|
msg = "运单号"; |
|
|
|
|
} |
|
|
|
|
}else if("120".equals(tt)){//订单自编码(零担)
|
|
|
|
|
}else if("20".equals(tt)){//订单自编码(零担)
|
|
|
|
|
if (!filterId.equals(orderId)) { |
|
|
|
|
flag = true; |
|
|
|
|
chuanFlag = true; |
|
|
|
@ -590,9 +625,9 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
|
|
|
|
|
trayTypeEntity.setCreateUser(AuthUtil.getUserId()); |
|
|
|
|
trayTypeEntity.setUpdateUser(AuthUtil.getUserId()); |
|
|
|
|
|
|
|
|
|
if("110".equals(trayType)){//运单号
|
|
|
|
|
if("10".equals(trayType)){//运单号
|
|
|
|
|
trayTypeEntity.setFilterValue(stockArticleEntity.getWaybillNumber()); |
|
|
|
|
}else if("120".equals(trayType)){//订单自编码(零担)
|
|
|
|
|
}else if("20".equals(trayType)){//订单自编码(零担)
|
|
|
|
|
trayTypeEntity.setFilterId(stockArticleEntity.getId()); |
|
|
|
|
trayTypeEntity.setFilterValue(stockArticleEntity.getOrderCode()); |
|
|
|
|
} |
|
|
|
@ -673,7 +708,7 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//--------------------------库存品分拣------------------------
|
|
|
|
|
//--------------------------有数据库存品分拣------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -683,14 +718,203 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
|
|
|
|
|
page.setSize(trayTypeDTO.getPageSize()); |
|
|
|
|
|
|
|
|
|
//存入列表类型
|
|
|
|
|
trayTypeDTO.setType(PalletProductTypeConstant.INVENTORY); |
|
|
|
|
trayTypeDTO.setType(PalletProductTypeConstant.STOCKDATA); |
|
|
|
|
|
|
|
|
|
//因为传入了打托分类,所以可以公用一个
|
|
|
|
|
IPage<WarehouseTrayTypeEntity> pageList = baseMapper.orderPageList(page,trayTypeDTO); |
|
|
|
|
|
|
|
|
|
IPage<WarehouseTrayTypeVO> warehouseTrayTypeVOIPage = WarehouseTrayTypeWrapper.build().pageVO(pageList); |
|
|
|
|
|
|
|
|
|
List<WarehouseTrayTypeVO> records = warehouseTrayTypeVOIPage.getRecords(); |
|
|
|
|
for (WarehouseTrayTypeVO warehouseTrayTypeVO:records){ |
|
|
|
|
Long trayTypeId = warehouseTrayTypeVO.getId();//打托方式id
|
|
|
|
|
QueryWrapper<WarehouseTrayGoodsEntity> trayGoodsEntityQueryWrapper = new QueryWrapper<>(); |
|
|
|
|
trayGoodsEntityQueryWrapper.eq("tray_type_id",trayTypeId); |
|
|
|
|
List<WarehouseTrayGoodsEntity> list = warehouseTrayGoodsService.list(trayGoodsEntityQueryWrapper); |
|
|
|
|
WarehouseTrayGoodsEntity trayGoodsEntity = list.get(0); |
|
|
|
|
Long stockListId = trayGoodsEntity.getAssociationId(); |
|
|
|
|
DistributionStockListEntity stockListEntity = distributionStockListClient.getStockListById(stockListId); |
|
|
|
|
Long marketId = stockListEntity.getMarketId(); |
|
|
|
|
String marketName = stockListEntity.getMarketName(); |
|
|
|
|
String marketCode = stockListEntity.getMarketCode(); |
|
|
|
|
warehouseTrayTypeVO.setMarketId(marketId); |
|
|
|
|
warehouseTrayTypeVO.setMarketName(marketName); |
|
|
|
|
warehouseTrayTypeVO.setMarketCode(marketCode); |
|
|
|
|
} |
|
|
|
|
warehouseTrayTypeVOIPage.setRecords(records); |
|
|
|
|
return warehouseTrayTypeVOIPage; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R scanStockOrderPackageCode(String trayCode, String trayType, String orderPackageCode) { |
|
|
|
|
//查询托盘信息
|
|
|
|
|
QueryWrapper<WarehouseTrayTypeEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
queryWrapper.eq("tray_code",trayCode) |
|
|
|
|
.eq("is_deleted",0); |
|
|
|
|
WarehouseTrayTypeEntity trayTypeEntity = baseMapper.selectOne(queryWrapper); |
|
|
|
|
if(Objects.isNull(trayTypeEntity)){ |
|
|
|
|
//如果为空则该托盘为空
|
|
|
|
|
//第一次存入数据
|
|
|
|
|
trayTypeEntity = saveTrayTypeByStock(trayType, trayCode, orderPackageCode); |
|
|
|
|
} |
|
|
|
|
String tt = trayTypeEntity.getTrayType(); |
|
|
|
|
Long filterId = trayTypeEntity.getFilterId(); |
|
|
|
|
String filterValue = trayTypeEntity.getFilterValue(); |
|
|
|
|
|
|
|
|
|
if(tt.equals(trayType)){ |
|
|
|
|
log.warn("##############scanStockOrderPackageCode: 打托方式不正确 {}={}",trayType,tt); |
|
|
|
|
return R.fail(403,"打托方式不正确"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//判断串货
|
|
|
|
|
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCode(orderPackageCode); |
|
|
|
|
if(Objects.isNull(parcelListEntity)){ |
|
|
|
|
log.warn("#########scanStockOrderPackageCode: 未找到包件信息 orderPackageCode={}",orderPackageCode); |
|
|
|
|
return R.fail(403,"未找到包件信息"); |
|
|
|
|
} |
|
|
|
|
Long parcelListId = parcelListEntity.getId();//包件id
|
|
|
|
|
DistributionStockListEntity distributionStockListEntity = distributionStockListClient.getStockListByParcelListId(parcelListId); |
|
|
|
|
if(Objects.isNull(distributionStockListEntity)){ |
|
|
|
|
log.warn("#########scanStockOrderPackageCode: 未找到库存品信息 parcelListId={}",parcelListId); |
|
|
|
|
return R.fail(403,"未找到库存品信息"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Long materialId = distributionStockListEntity.getMaterialId();//物料id
|
|
|
|
|
Long marketId = distributionStockListEntity.getMarketId(); |
|
|
|
|
String marketName = distributionStockListEntity.getMarketName(); |
|
|
|
|
|
|
|
|
|
BasicMaterialEntity materialEntity = basicMaterialClient.getMaterialOwnId(materialId); |
|
|
|
|
if(Objects.isNull(materialEntity)){ |
|
|
|
|
log.warn("#########scanStockOrderPackageCode: 未找到物料信息 materialId={}",materialId); |
|
|
|
|
return R.fail(403,"未找到物料信息"); |
|
|
|
|
} |
|
|
|
|
String productCode = materialEntity.getProductCode(); |
|
|
|
|
String name = materialEntity.getName(); |
|
|
|
|
|
|
|
|
|
boolean chuanFlag = false; |
|
|
|
|
String msg = ""; |
|
|
|
|
if (!filterId.equals(marketId)) { |
|
|
|
|
chuanFlag = true; |
|
|
|
|
msg = "商场"; |
|
|
|
|
}else{ |
|
|
|
|
if("10".equals(tt)) {//物料名称
|
|
|
|
|
if (!filterValue.equals(name)) { |
|
|
|
|
chuanFlag = true; |
|
|
|
|
msg = "物料名称"; |
|
|
|
|
} |
|
|
|
|
}else if("20".equals(tt)){//物料编码
|
|
|
|
|
if (!filterValue.equals(productCode)) { |
|
|
|
|
chuanFlag = true; |
|
|
|
|
msg = "物料编码"; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//修改打托方式上的值
|
|
|
|
|
changeStockTotalNumByTrayTypeId(distributionStockListEntity, trayTypeEntity.getId(), 1);//addSub 1加 2减
|
|
|
|
|
// if(chuanFlag){
|
|
|
|
|
// //存入零担与托盘绑定关系表
|
|
|
|
|
// warehouseTrayGoodsService.saveEntityStock(distributionStockListEntity, trayTypeEntity, "1");
|
|
|
|
|
// }else{
|
|
|
|
|
// //存入零担与托盘绑定关系表
|
|
|
|
|
// warehouseTrayGoodsService.saveEntityStock(distributionStockListEntity, trayTypeEntity, "0");
|
|
|
|
|
// }
|
|
|
|
|
// //添加上拖日志表
|
|
|
|
|
// warehouseTrayGoodsLogService.saveLogStock(distributionStockListEntity, trayTypeEntity, "1", "分拣打托:有数据库存品 分拣", "1");
|
|
|
|
|
|
|
|
|
|
if (chuanFlag){ |
|
|
|
|
log.warn("#########scanStockOrderPackageCode: 不属于同一个"+msg+" 串货 filterValue={} filterValue={}", filterValue, filterValue); |
|
|
|
|
return Resp.scanFail(2001, "不属于同一个"+msg, "串货"); |
|
|
|
|
}else{ |
|
|
|
|
return R.success("扫描成功"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void changeStockTotalNumByTrayTypeId(DistributionStockListEntity distributionStockListEntity, Long trayTypeId, int addSub) { |
|
|
|
|
log.info("#########changeStockTotalNumByTrayTypeId: 变更打托方式上的数量 trayTypeId={} addSub={}", trayTypeId, addSub); |
|
|
|
|
|
|
|
|
|
Integer quantityStock = distributionStockListEntity.getQuantityStock();//在库数量
|
|
|
|
|
// distributionStockListEntity.get
|
|
|
|
|
// Integer totalNumber = stockArticleEntity.getTotalNumber();
|
|
|
|
|
// String orderCode = stockArticleEntity.getOrderCode();
|
|
|
|
|
// WarehouseTrayGoodsEntity trayGoodsEntity = warehouseTrayGoodsService.getZeroByTrayTypeIdAndOrderCode(trayTypeId, orderCode);
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// if (addSub == 1) {
|
|
|
|
|
// if (Objects.isNull(trayGoodsEntity)) {
|
|
|
|
|
// //需要同时添加订单总数量到打托方式
|
|
|
|
|
// baseMapper.changeTotalNumAndOrderTotalNumByTrayTypeId(num, totalNumber, trayTypeId);
|
|
|
|
|
// } else {
|
|
|
|
|
// baseMapper.changeTotalNumByTrayTypeId(num, trayTypeId);
|
|
|
|
|
// }
|
|
|
|
|
// } else if (addSub == 2) {
|
|
|
|
|
// if (Objects.isNull(trayGoodsEntity)) {
|
|
|
|
|
// log.warn("#################changeZeroTotalNumByTrayTypeId: 未找到对应的数据 orderCode={}",orderCode);
|
|
|
|
|
// throw new CustomerException(403,"未找到对应的数据");
|
|
|
|
|
// } else {
|
|
|
|
|
// baseMapper.changeTotalNumAndOrderTotalNumByTrayTypeId(-num, -totalNumber, trayTypeId);
|
|
|
|
|
// }
|
|
|
|
|
// } else {
|
|
|
|
|
// log.warn("############changeZeroTotalNumByTrayTypeId:未知的计算类型");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private WarehouseTrayTypeEntity saveTrayTypeByStock(String trayType, String trayCode, String orderPackageCode) { |
|
|
|
|
log.info("#########saveTrayTypeByStock: 存入打托方式 trayType={},trayCode={} orderPackageCode={}",trayType,trayCode,orderPackageCode); |
|
|
|
|
BasicdataTrayEntity trayEntity = basicdataTrayClient.getTrayByTrayCode(trayCode); |
|
|
|
|
if(Objects.isNull(trayEntity)){ |
|
|
|
|
log.warn("#########saveTrayTypeByStock: 未找到托盘信息 trayCode={}",trayCode); |
|
|
|
|
throw new CustomerException(403,"未找到托盘信息"); |
|
|
|
|
} |
|
|
|
|
Long trayId = trayEntity.getId(); |
|
|
|
|
//查询库存品数据
|
|
|
|
|
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCode(orderPackageCode); |
|
|
|
|
if(Objects.isNull(parcelListEntity)){ |
|
|
|
|
log.warn("#########saveTrayTypeByStock: 未找到包件信息 orderPackageCode={}",orderPackageCode); |
|
|
|
|
throw new CustomerException(403,"未找到包件信息"); |
|
|
|
|
} |
|
|
|
|
Long parcelListId = parcelListEntity.getId();//包件id
|
|
|
|
|
DistributionStockListEntity distributionStockListEntity = distributionStockListClient.getStockListByParcelListId(parcelListId); |
|
|
|
|
if(Objects.isNull(distributionStockListEntity)){ |
|
|
|
|
log.warn("#########saveTrayTypeByStock: 未找到库存品信息 parcelListId={}",parcelListId); |
|
|
|
|
throw new CustomerException(403,"未找到库存品信息"); |
|
|
|
|
} |
|
|
|
|
Long marketId = distributionStockListEntity.getMarketId(); |
|
|
|
|
String marketName = distributionStockListEntity.getMarketName(); |
|
|
|
|
Long materialId = distributionStockListEntity.getMaterialId();//物料id
|
|
|
|
|
BasicMaterialEntity materialEntity = basicMaterialClient.getMaterialOwnId(materialId); |
|
|
|
|
if(Objects.isNull(materialEntity)){ |
|
|
|
|
log.warn("#########saveTrayTypeByStock: 未找到物料信息 materialId={}",materialId); |
|
|
|
|
throw new CustomerException(403,"未找到物料信息"); |
|
|
|
|
} |
|
|
|
|
String productCode = materialEntity.getProductCode();//物料编码
|
|
|
|
|
String name = materialEntity.getName();//物料名称
|
|
|
|
|
|
|
|
|
|
WarehouseTrayTypeEntity trayTypeEntity = new WarehouseTrayTypeEntity(); |
|
|
|
|
trayTypeEntity.setTrayId(trayId); |
|
|
|
|
trayTypeEntity.setTrayCode(trayCode); |
|
|
|
|
trayTypeEntity.setType(PalletProductTypeConstant.STOCKDATA); |
|
|
|
|
trayTypeEntity.setTrayType(trayType); |
|
|
|
|
trayTypeEntity.setOrderTotalNum(0); |
|
|
|
|
trayTypeEntity.setTotalNum(0); |
|
|
|
|
trayTypeEntity.setTenantId(AuthUtil.getTenantId()); |
|
|
|
|
trayTypeEntity.setCreateDept(Long.parseLong(AuthUtil.getDeptId())); |
|
|
|
|
trayTypeEntity.setCreateUser(AuthUtil.getUserId()); |
|
|
|
|
trayTypeEntity.setUpdateUser(AuthUtil.getUserId()); |
|
|
|
|
|
|
|
|
|
if("10".equals(trayType)){//物料名称
|
|
|
|
|
trayTypeEntity.setFilterValue(name); |
|
|
|
|
}else if("20".equals(trayType)){//物料编码
|
|
|
|
|
trayTypeEntity.setFilterId(materialId); |
|
|
|
|
trayTypeEntity.setFilterValue(productCode); |
|
|
|
|
} |
|
|
|
|
baseMapper.insert(trayTypeEntity); |
|
|
|
|
|
|
|
|
|
//修改托盘的状态
|
|
|
|
|
basicdataTrayClient.updateTrayStatus(trayId,2); |
|
|
|
|
return trayTypeEntity; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|