Browse Source

Merge branch 'dev' into pre-production

master
zhenghaoyu 9 months ago
parent
commit
69018a4d92
  1. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ICarsLoadAsyncService.java
  2. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsUnloadLogService.java
  3. 8
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java
  4. 84
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  5. 7
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsUnloadLogServiceImpl.java

5
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ICarsLoadAsyncService.java

@ -2,6 +2,9 @@ package com.logpm.trunkline.service;
import com.logpm.trunkline.entity.TrunklineCarsLoadEntity;
import com.logpm.trunkline.entity.TrunklineCarsLoadLineEntity;
import com.logpm.trunkline.entity.TrunklineCarsUnloadLogEntity;
import java.util.List;
public interface ICarsLoadAsyncService {
@ -18,4 +21,6 @@ public interface ICarsLoadAsyncService {
void abnormalListUnloadCheckByLoadIdAndWarehouseId(Long loadId, Long warehouseId, String nodeName, String tenantId, Long userId, String nickName, Long firstLong);
void dealwithAfterAbnormalPackage(String orderPackageCode, Long warehouseId, String warehouseName, String carsNo, Long userId, Long aLong, String nickName);
void savaUnloadLogBatch(List<TrunklineCarsUnloadLogEntity> unloadLogList);
}

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsUnloadLogService.java

@ -1,7 +1,6 @@
package com.logpm.trunkline.service;
import com.logpm.trunkline.entity.TrunklineCarsUnloadLogEntity;
import com.logpm.trunkline.vo.UnloadScanOrderVO;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
@ -21,4 +20,5 @@ public interface ITrunklineCarsUnloadLogService extends BaseService<TrunklineCar
void savaUnloadLog(Long warehouseId,String warehouseName,Long loadId,String loadCode,Long waybillId,String waybillNo,String orderCode,String scanCode,Integer num,Integer type,Integer isData,Integer isAbnormal,Long trayId,String trayCode,String trayName,Long fromWarehouseId,Long loadScanId,String remark);
void savaUnloadLogBatch(List<TrunklineCarsUnloadLogEntity> unloadLogList);
}

8
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java

@ -53,6 +53,8 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
private IAftersalesAbnormalRecordClient abnormalRecordClient;
@Autowired
private IAftersalesWorkOrderClient aftersalesWorkOrderClient;
@Autowired
private ITrunklineCarsUnloadLogService trunklineCarsUnloadLogService;
@Async
@Override
@ -510,4 +512,10 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
}
@Async
@Override
public void savaUnloadLogBatch(List<TrunklineCarsUnloadLogEntity> unloadLogList) {
trunklineCarsUnloadLogService.savaUnloadLogBatch(unloadLogList);
}
}

84
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

@ -3440,6 +3440,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
if(!carsLoadScanIds.isEmpty()){
Date date = new Date();
List<TrunklineCarsLoadScanEntity> loadScanEntityList = trunklineCarsLoadScanService.findListByIdsNoPackage(carsLoadScanIds,warehouseId);
List<DistributionParcelListEntity> parcelListEntities = trunklineCarsLoadScanService.findParceListByCarsLoadScanIds(carsLoadScanIds);
//把parcelListEntities转成orderPackageCode为键值的map
@ -3483,6 +3484,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
//需要修改仓库信息的打托数据
List<String> trayCodes = new ArrayList<>();
List<String> orderPackageCodes = new ArrayList<>();
List<TrunklineCarsUnloadLogEntity> unloadLogList = new ArrayList<>();
@ -3505,6 +3507,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
DistributionStockArticleEntity newStockArticleEntity = new DistributionStockArticleEntity();
BeanUtil.copy(stockArticleEntity,newStockArticleEntity);
newStockArticleEntity.setId(null);
newStockArticleEntity.setCreateUser(userId);
newStockArticleEntity.setUpdateUser(userId);
newStockArticleEntity.setWarehouseId(warehouseId);
newStockArticleEntity.setWarehouse(warehouseName);
newStockArticleEntity.setHandQuantity(0);
@ -3530,6 +3534,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
DistributionParcelListEntity newNoOrderPackage = new DistributionParcelListEntity();
BeanUtil.copy(parcelListEntity,newNoOrderPackage);
newNoOrderPackage.setId(null);
newNoOrderPackage.setCreateUser(userId);
newNoOrderPackage.setUpdateUser(userId);
newNoOrderPackage.setWarehouseId(warehouseId);
newNoOrderPackage.setWarehouse(warehouseName);
newNoOrderPackage.setStockArticleId(finalOrderId);
@ -3556,13 +3562,45 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
}
unbingTrayAndDelAllocationPackages.put(fromWarehouseId,list);
Integer isAbnormal = 0;
String remark = "正常卸车";
p.setScanStatus("2");
p.setUnloadNodeId(warehouseId);
p.setUnloadNodeName(warehouseName);
p.setUnloadAbnormal(0);
Long finalNodeId = p.getFinalNodeId();
if(!finalNodeId.equals(warehouseId)){
isAbnormal = 1;
remark = "卸车仓库与目的仓不一致,异常卸车";
}
p.setUnloadAbnormal(isAbnormal);
p.setUnloadNum(1);
p.setUnloadUserName(nickName);
updateScanEntityList.add(p);
TrunklineCarsUnloadLogEntity entity = new TrunklineCarsUnloadLogEntity();
entity.setTenantId(tenantId);
entity.setCreateUser(userId);
entity.setUpdateUser(userId);
entity.setCreateDept(deptId);
entity.setCreateTime(date);
entity.setUpdateTime(date);
entity.setWarehouseId(warehouseId);
entity.setWarehouseName(warehouseName);
entity.setLoadId(loadId);
entity.setLoadCode(carsLoadEntity.getCarsNo());
entity.setWaybillId(p.getWaybillId());
entity.setWaybillNo(p.getWaybillNo());
entity.setOrderCode(p.getOrderCode());
entity.setScanCode(p.getScanCode());
entity.setNum(p.getUnloadNum());
entity.setType(p.getType());
entity.setIsData(p.getIsData());
entity.setIsAbnormal(isAbnormal);
entity.setFromWarehouseId(fromWarehouseId);
entity.setLoadScanId(p.getId());
entity.setRemark(remark);
unloadLogList.add(entity);
});
});
@ -3586,6 +3624,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
DistributionStockArticleEntity newStockArticleEntity = new DistributionStockArticleEntity();
BeanUtil.copy(stockArticleEntity,newStockArticleEntity);
newStockArticleEntity.setId(null);
newStockArticleEntity.setCreateUser(userId);
newStockArticleEntity.setUpdateUser(userId);
newStockArticleEntity.setWarehouseId(warehouseId);
newStockArticleEntity.setWarehouse(warehouseName);
newStockArticleEntity.setHandQuantity(0);
@ -3609,6 +3649,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
DistributionParcelListEntity newNoOrderPackage = new DistributionParcelListEntity();
BeanUtil.copy(parcelListEntity,newNoOrderPackage);
newNoOrderPackage.setId(null);
newNoOrderPackage.setCreateUser(userId);
newNoOrderPackage.setUpdateUser(userId);
newNoOrderPackage.setWarehouseId(warehouseId);
newNoOrderPackage.setWarehouse(warehouseName);
newNoOrderPackage.setStockArticleId(finalOrderId);
@ -3626,13 +3668,48 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
newParcelListEntities.add(newNoOrderPackage);
orderPackageCodes.add(p.getScanCode());
Integer isAbnormal = 0;
String remark = "正常卸车";
p.setScanStatus("2");
p.setUnloadNodeId(warehouseId);
p.setUnloadNodeName(warehouseName);
p.setUnloadAbnormal(0);
Long finalNodeId = p.getFinalNodeId();
if(!finalNodeId.equals(warehouseId)){
isAbnormal = 1;
remark = "卸车仓库与目的仓不一致,异常卸车";
}
p.setUnloadAbnormal(isAbnormal);
p.setUnloadNum(1);
p.setUnloadUserName(nickName);
p.setRemark(remark);
updateScanEntityList.add(p);
TrunklineCarsUnloadLogEntity entity = new TrunklineCarsUnloadLogEntity();
entity.setTenantId(tenantId);
entity.setCreateUser(userId);
entity.setUpdateUser(userId);
entity.setCreateDept(deptId);
entity.setCreateTime(date);
entity.setUpdateTime(date);
entity.setWarehouseId(warehouseId);
entity.setWarehouseName(warehouseName);
entity.setLoadId(loadId);
entity.setLoadCode(carsLoadEntity.getCarsNo());
entity.setWaybillId(p.getWaybillId());
entity.setWaybillNo(p.getWaybillNo());
entity.setOrderCode(p.getOrderCode());
entity.setScanCode(p.getScanCode());
entity.setNum(p.getUnloadNum());
entity.setType(p.getType());
entity.setIsData(p.getIsData());
entity.setIsAbnormal(isAbnormal);
entity.setFromWarehouseId(p.getFromWarehouseId());
entity.setLoadScanId(p.getId());
entity.setRemark(remark);
unloadLogList.add(entity);
});
});
});
@ -3642,6 +3719,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
trunklineCarsLoadScanService.updateBatchById(updateScanEntityList);
carsLoadAsyncService.savaUnloadLogBatch(unloadLogList);
// trunklineCarsUnloadLogService.savaUnloadLogBatch(unloadLogList);
//需要解托下架的包件嘛
unbingTrayAndDelAllocationPackages.keySet().forEach(w -> {
List<String> list = unbingTrayAndDelAllocationPackages.get(w);

7
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsUnloadLogServiceImpl.java

@ -8,6 +8,8 @@ import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import java.util.List;
@Slf4j
@AllArgsConstructor
@Service
@ -62,4 +64,9 @@ public class TrunklineCarsUnloadLogServiceImpl extends BaseServiceImpl<Trunkline
entity.setRemark(remark);
save(entity);
}
@Override
public void savaUnloadLogBatch(List<TrunklineCarsUnloadLogEntity> unloadLogList) {
saveBatch(unloadLogList);
}
}

Loading…
Cancel
Save