Browse Source

1.修复库内作业bug

training
zhenghaoyu 1 year ago
parent
commit
751a773969
  1. 1
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/ReCheckTrayListVO.java
  2. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayGoodsMapper.xml
  3. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseTrayGoodsLogService.java
  4. 5
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayGoodsLogServiceImpl.java
  5. 63
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java
  6. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownGoodsLogServiceImpl.java
  7. 22
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java

1
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/ReCheckTrayListVO.java

@ -9,6 +9,7 @@ public class ReCheckTrayListVO implements Serializable {
private String orderCode;//订单自编码
private String code;//码值
private String waybillNumber;//运单号
private Integer goodsType;//物品类型 1包件 2零担 3库存品
private Integer num;//数量
private Long marketId;//商场id

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

@ -184,6 +184,7 @@
<select id="getReCheckZeroByTrayTypeId" resultType="com.logpm.warehouse.vo.ReCheckTrayListVO">
select ldsa.order_code orderCode,
ldsa.waybill_number waybillNumber,
2 goodsType,
lwtg.num num,
lwtg.is_fleeing isFleeing,

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

@ -16,5 +16,5 @@ public interface IWarehouseTrayGoodsLogService extends BaseService<WarehouseTray
void saveLogStock(Long materialId,Long marketId, WarehouseTrayTypeEntity trayTypeEntity,String incomingBatch,String materialCode,Integer num, String bindingType, String remark, String palletizingType);
void saveLogByTrayGoodsList(List<WarehouseTrayGoodsEntity> sourceTrayGoodsList, String bindingType, String remark, String palletizingType);
void saveLogByTrayGoodsList(List<WarehouseTrayGoodsEntity> sourceTrayGoodsList, String bindingType, String remark, String palletizingType,Long warehouseId);
}

5
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayGoodsLogServiceImpl.java

@ -48,6 +48,7 @@ public class WarehouseTrayGoodsLogServiceImpl extends BaseServiceImpl<WarehouseT
trayGoodsLogEntity.setRemark(remark);
trayGoodsLogEntity.setPalletizingType(palletizingType);
trayGoodsLogEntity.setNum(num);
trayGoodsLogEntity.setWarehouseId(trayTypeEntity.getWarehouseId());
save(trayGoodsLogEntity);
}
@ -66,11 +67,12 @@ public class WarehouseTrayGoodsLogServiceImpl extends BaseServiceImpl<WarehouseT
trayGoodsLogEntity.setMarketId(trayTypeEntity.getMarketId());
trayGoodsLogEntity.setMarketName(trayTypeEntity.getMarketName());
trayGoodsLogEntity.setIncomingBatch(incomingBatch);
trayGoodsLogEntity.setWarehouseId(trayTypeEntity.getWarehouseId());
save(trayGoodsLogEntity);
}
@Override
public void saveLogByTrayGoodsList(List<WarehouseTrayGoodsEntity> sourceTrayGoodsList, String bindingType, String remark, String palletizingType) {
public void saveLogByTrayGoodsList(List<WarehouseTrayGoodsEntity> sourceTrayGoodsList, String bindingType, String remark, String palletizingType,Long warehouseId) {
List<WarehouseTrayGoodsLogEntity> ls = new ArrayList<>();
for (WarehouseTrayGoodsEntity trayGoodsEntity:sourceTrayGoodsList){
WarehouseTrayGoodsLogEntity trayGoodsLogEntity = new WarehouseTrayGoodsLogEntity();
@ -78,6 +80,7 @@ public class WarehouseTrayGoodsLogServiceImpl extends BaseServiceImpl<WarehouseT
trayGoodsLogEntity.setBindingType(bindingType);
trayGoodsLogEntity.setRemark(remark);
trayGoodsLogEntity.setPalletizingType(palletizingType);
trayGoodsLogEntity.setWarehouseId(warehouseId);
ls.add(trayGoodsLogEntity);
}
saveBatch(ls);

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

@ -1544,24 +1544,37 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
return R.fail(403,"该托盘已在其他仓库打托");
}
List<ReCheckTrayListVO> trayListVOS = null;
if(PalletProductTypeConstant.CUSTOMIZED.equals(type)){//订制品打托
trayListVOS = warehouseTrayGoodsService.getReCheckPackageByTrayTypeId(trayTypeId);
List<UpShelfDataVO> listByTrayTypeId = null;
if(PalletProductTypeConstant.CUSTOMIZED.equals(type)){
listByTrayTypeId = warehouseTrayGoodsService.getUpListByTrayTypeId(trayTypeId);
}else if(PalletProductTypeConstant.ARTIFICIAL.equals(type)){
trayListVOS = warehouseTrayGoodsService.getReCheckZeroByTrayTypeId(trayTypeId);
listByTrayTypeId = warehouseTrayGoodsService.getZeroUpListByTrayTypeId(trayTypeId);
}else if(PalletProductTypeConstant.STOCKDATA.equals(type)){
trayListVOS = warehouseTrayGoodsService.getReCheckStockByTrayTypeId(trayTypeId);
listByTrayTypeId = warehouseTrayGoodsService.getStockUpListByTrayTypeId(trayTypeId);
}else if(PalletProductTypeConstant.STOCKNODATA.equals(type)){
trayListVOS = warehouseTrayGoodsService.getReCheckStockByTrayTypeId(trayTypeId);
}else {
log.warn("##################getEntityByTrayCode: 未知的打托类型");
listByTrayTypeId = warehouseTrayGoodsService.getStockUpListByTrayTypeId(trayTypeId);
}
// List<ReCheckTrayListVO> trayListVOS = null;
// if(PalletProductTypeConstant.CUSTOMIZED.equals(type)){//订制品打托
// trayListVOS = warehouseTrayGoodsService.getReCheckPackageByTrayTypeId(trayTypeId);
// }else if(PalletProductTypeConstant.ARTIFICIAL.equals(type)){
// trayListVOS = warehouseTrayGoodsService.getReCheckZeroByTrayTypeId(trayTypeId);
// }else if(PalletProductTypeConstant.STOCKDATA.equals(type)){
// trayListVOS = warehouseTrayGoodsService.getReCheckStockByTrayTypeId(trayTypeId);
// }else if(PalletProductTypeConstant.STOCKNODATA.equals(type)){
// trayListVOS = warehouseTrayGoodsService.getReCheckStockByTrayTypeId(trayTypeId);
// }else {
// log.warn("##################getEntityByTrayCode: 未知的打托类型");
// }
map.put("trayCode",trayCode);
map.put("totalNum",totalNum);
map.put("orderTotalNum",orderTotalNum);
map.put("stockNum",stockNum);
map.put("stockTotalNum",stockTotalNum);
map.put("list",trayListVOS);
map.put("list",listByTrayTypeId);
return R.data(map);
}
@ -1763,24 +1776,35 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
return R.success("托盘已在其他仓库打托");
}
List<ReCheckTrayListVO> trayListVOS = null;
if(PalletProductTypeConstant.CUSTOMIZED.equals(type)){//订制品打托
trayListVOS = warehouseTrayGoodsService.getReCheckPackageByTrayTypeId(trayTypeId);
List<UpShelfDataVO> listByTrayTypeId = null;
if(PalletProductTypeConstant.CUSTOMIZED.equals(type)){
listByTrayTypeId = warehouseTrayGoodsService.getUpListByTrayTypeId(trayTypeId);
}else if(PalletProductTypeConstant.ARTIFICIAL.equals(type)){
trayListVOS = warehouseTrayGoodsService.getReCheckZeroByTrayTypeId(trayTypeId);
listByTrayTypeId = warehouseTrayGoodsService.getZeroUpListByTrayTypeId(trayTypeId);
}else if(PalletProductTypeConstant.STOCKDATA.equals(type)){
trayListVOS = warehouseTrayGoodsService.getReCheckStockByTrayTypeId(trayTypeId);
listByTrayTypeId = warehouseTrayGoodsService.getStockUpListByTrayTypeId(trayTypeId);
}else if(PalletProductTypeConstant.STOCKNODATA.equals(type)){
trayListVOS = warehouseTrayGoodsService.getReCheckStockByTrayTypeId(trayTypeId);
}else {
log.warn("##################scanTargetTrayCode: 未知的打托类型");
listByTrayTypeId = warehouseTrayGoodsService.getStockUpListByTrayTypeId(trayTypeId);
}
// List<ReCheckTrayListVO> trayListVOS = null;
// if(PalletProductTypeConstant.CUSTOMIZED.equals(type)){//订制品打托
// trayListVOS = warehouseTrayGoodsService.getReCheckPackageByTrayTypeId(trayTypeId);
// }else if(PalletProductTypeConstant.ARTIFICIAL.equals(type)){
// trayListVOS = warehouseTrayGoodsService.getReCheckZeroByTrayTypeId(trayTypeId);
// }else if(PalletProductTypeConstant.STOCKDATA.equals(type)){
// trayListVOS = warehouseTrayGoodsService.getReCheckStockByTrayTypeId(trayTypeId);
// }else if(PalletProductTypeConstant.STOCKNODATA.equals(type)){
// trayListVOS = warehouseTrayGoodsService.getReCheckStockByTrayTypeId(trayTypeId);
// }else {
// log.warn("##################scanTargetTrayCode: 未知的打托类型");
// }
map.put("trayCode",trayCode);
map.put("totalNum",totalNum);
map.put("orderTotalNum",orderTotalNum);
map.put("stockNum",stockNum);
map.put("stockTotalNum",stockTotalNum);
map.put("list",trayListVOS);
map.put("list",listByTrayTypeId);
return R.data(map);
}
}
@ -2037,7 +2061,7 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
}
//更新值
warehouseTrayGoodsService.updateBatchById(sourceTrayGoodsList);
warehouseTrayGoodsLogService.saveLogByTrayGoodsList(sourceTrayGoodsList,"1","合托:绑定","1");
warehouseTrayGoodsLogService.saveLogByTrayGoodsList(sourceTrayGoodsList,"1","合托:绑定","1",targetTrayTypeEntity.getWarehouseId());
//更新数量值
updateNumByTrayTypeId(targetTrayTypeEntity);
}
@ -2299,6 +2323,7 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
trayGoodsLogEntity.setBindingType(bindingType);
trayGoodsLogEntity.setRemark(remark);
trayGoodsLogEntity.setPalletizingType(palletizingType);
trayGoodsLogEntity.setWarehouseId(trayTypeEntity.getWarehouseId());
ls.add(trayGoodsLogEntity);
}
warehouseTrayGoodsLogService.saveBatch(ls);

1
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownGoodsLogServiceImpl.java

@ -86,6 +86,7 @@ public class WarehouseUpdownGoodsLogServiceImpl extends BaseServiceImpl<Warehous
warehouseUpdownGoodsLogEntity.setAssociationType("3");
warehouseUpdownGoodsLogEntity.setNum(parcelListEntity.getQuantity());
warehouseUpdownGoodsLogEntity.setRemark(remark);
warehouseUpdownGoodsLogEntity.setWarehouseId(updownTypeEntity.getWarehouseId());
save(warehouseUpdownGoodsLogEntity);
}

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

@ -1072,7 +1072,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
//修改库位状态为空闲
basicdataGoodsAllocationClient.updateAllocationStatus(allocationId,"1");
}
saveUpdownGoodsLog(updownGoodsList,"2",0,"下架:零担下架");
saveUpdownGoodsLog(updownGoodsList,"2",0,"下架:零担下架",updownTypeEntity.getWarehouseId());
updateUpdownTypeNum(updownTypeEntity);
}else{
if(!Objects.isNull(trayEntity)){
@ -1085,7 +1085,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
warehouseUpdownGoodsService.updeteNumByUpdownGoodsId(residue,updownGoodsId);
//存入日志
saveUpdownGoodsLogPart(updownGoodsList,enterNum,"2",0,"下架:零担部分下架");
saveUpdownGoodsLogPart(updownGoodsList,enterNum,"2",0,"下架:零担部分下架",updownTypeEntity.getWarehouseId());
}
updateZeroOrderGroundingStatus(orderCode);
updateUpdownTypeNum(updownTypeEntity);
@ -1182,7 +1182,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
//修改库位状态为空闲
basicdataGoodsAllocationClient.updateAllocationStatus(allocationId,"1");
}
saveUpdownGoodsLog(updownGoodsList,"2",0,"下架:库存品下架");
saveUpdownGoodsLog(updownGoodsList,"2",0,"下架:库存品下架",updownTypeEntity.getWarehouseId());
// updateUpdownTypeNum(updownTypeEntity);
}else{
if(!Objects.isNull(trayEntity)){
@ -1206,7 +1206,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
warehouseUpdownGoodsService.updeteNumByUpdownGoodsId(residue,updownGoodsId);
//存入日志
saveUpdownGoodsLogPart(updownGoodsList,enterNum,"2",0,"下架:库存品部分下架");
saveUpdownGoodsLogPart(updownGoodsList,enterNum,"2",0,"下架:库存品部分下架",updownTypeEntity.getWarehouseId());
}
updateUpdownTypeNum(updownTypeEntity);
allNum = allNum + enterNum;
@ -1242,7 +1242,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
return R.fail(basicdataGoodsAllocationClient.getEntityByAllocationId(allocationId).getGoodsAllocationName()+"暂无下架物品");
}
//存入下架日志
saveUpdownGoodsLog(updownGoodsList,"2",0,"下架:按库位下架");
saveUpdownGoodsLog(updownGoodsList,"2",0,"下架:按库位下架",updownTypeEntity.getWarehouseId());
//删除绑定关系
warehouseUpdownGoodsService.deleteEntityList(updownGoodsList);
//上架方式删除
@ -1575,7 +1575,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
}
private void saveUpdownGoodsLogPart(List<WarehouseUpdownGoodsEntity> updownGoodsList, int residue, String bindingType, Integer isAlltrays, String remark) {
private void saveUpdownGoodsLogPart(List<WarehouseUpdownGoodsEntity> updownGoodsList, int residue, String bindingType, Integer isAlltrays, String remark,Long warehouseId) {
List<WarehouseUpdownGoodsLogEntity> updownGoodsLogList = new ArrayList<>();
for (WarehouseUpdownGoodsEntity updownGoodsEntity:updownGoodsList){
WarehouseUpdownGoodsLogEntity updownGoodsLogEntity = new WarehouseUpdownGoodsLogEntity();
@ -1584,6 +1584,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
updownGoodsLogEntity.setBindingType(bindingType);
updownGoodsLogEntity.setIsAlltrays(isAlltrays);
updownGoodsLogEntity.setRemark(remark);
updownGoodsLogEntity.setWarehouseId(warehouseId);
updownGoodsLogList.add(updownGoodsLogEntity);
}
warehouseUpdownGoodsLogService.saveBatch(updownGoodsLogList);
@ -1656,7 +1657,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
}
warehouseUpdownGoodsService.saveOrUpdateBatch(updownGoodsList);
saveUpdownGoodsLog(updownGoodsLogList,"1",0,"扫描上架:库存品上架");
saveUpdownGoodsLog(updownGoodsLogList,"1",0,"扫描上架:库存品上架",updownTypeEntity.getWarehouseId());
return stringBuffer.toString();
}
@ -1749,7 +1750,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
}
}
warehouseUpdownGoodsService.saveOrUpdateBatch(updownGoodsList);
saveUpdownGoodsLog(updownGoodsLogList,"1",0,"扫描上架:零担上架");
saveUpdownGoodsLog(updownGoodsLogList,"1",0,"扫描上架:零担上架",updownTypeEntity.getWarehouseId());
}
private R saveTrayGoodsToAllocation(WarehouseTrayTypeEntity trayTypeEntity, BasicdataGoodsAllocationEntity goodsAllocationEntity, BasicdataGoodsShelfEntity goodsShelfEntity, BasicdataGoodsAreaEntity goodsAreaEntity,Long warehouseId) {
@ -1828,12 +1829,12 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
}
warehouseUpdownGoodsService.saveBatch(updownGoodsList);
saveUpdownGoodsLog(updownGoodsList,"1",1,"扫描上架:托盘上架");
saveUpdownGoodsLog(updownGoodsList,"1",1,"扫描上架:托盘上架",updownTypeEntity.getWarehouseId());
return updownGoodsList;
}
private void saveUpdownGoodsLog(List<WarehouseUpdownGoodsEntity> updownGoodsList, String bindingType, Integer isAlltrays, String remark) {
private void saveUpdownGoodsLog(List<WarehouseUpdownGoodsEntity> updownGoodsList, String bindingType, Integer isAlltrays, String remark,Long warehouseId) {
List<WarehouseUpdownGoodsLogEntity> updownGoodsLogList = new ArrayList<>();
for (WarehouseUpdownGoodsEntity updownGoodsEntity:updownGoodsList){
WarehouseUpdownGoodsLogEntity updownGoodsLogEntity = new WarehouseUpdownGoodsLogEntity();
@ -1842,6 +1843,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
updownGoodsLogEntity.setBindingType(bindingType);
updownGoodsLogEntity.setIsAlltrays(isAlltrays);
updownGoodsLogEntity.setRemark(remark);
updownGoodsLogEntity.setWarehouseId(warehouseId);
updownGoodsLogList.add(updownGoodsLogEntity);
}
warehouseUpdownGoodsLogService.saveBatch(updownGoodsLogList);

Loading…
Cancel
Save