|
|
|
@ -18,6 +18,7 @@ import com.logpm.basic.entity.BasicCarModelEntity;
|
|
|
|
|
import com.logpm.basic.feign.IBasicCarModelClient; |
|
|
|
|
import com.logpm.basicdata.entity.BasicdataWarehouseEntity; |
|
|
|
|
import com.logpm.basicdata.feign.IBasicdataWarehouseClient; |
|
|
|
|
import com.logpm.distribution.dto.FindParamterDTO; |
|
|
|
|
import com.logpm.distribution.entity.DistributionParcelListEntity; |
|
|
|
|
import com.logpm.distribution.entity.DistributionStockArticleEntity; |
|
|
|
|
import com.logpm.distribution.feign.IDistributionParcelListClient; |
|
|
|
@ -548,6 +549,16 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
|
|
|
|
|
|
|
|
|
|
List<AftersalesAbnormalRecordEntity> addList = new ArrayList<>(); |
|
|
|
|
List<TrunklineCarsLoadScanEntity> noUnloadList = trunklineCarsLoadScanService.findUnloadCheckAbnormalNoUnloadList(loadId, warehouseId); |
|
|
|
|
//把noUnloadList中所有元素的scanCode放入一个List
|
|
|
|
|
List<String> scanCodeList = noUnloadList.stream().map(TrunklineCarsLoadScanEntity::getScanCode).collect(Collectors.toList()); |
|
|
|
|
FindParamterDTO findParamterDTO = new FindParamterDTO(); |
|
|
|
|
findParamterDTO.setOrderPackageCodeList(scanCodeList); |
|
|
|
|
findParamterDTO.setWarehouseId(warehouseId); |
|
|
|
|
List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListClient.findListByOrderPackageCodeList(findParamterDTO); |
|
|
|
|
//把parcelListEntityList转化成以orderPackageCode作为key的Map
|
|
|
|
|
Map<String, DistributionParcelListEntity> parcelMap = parcelListEntityList.stream() |
|
|
|
|
.collect(Collectors.toMap(DistributionParcelListEntity::getOrderPackageCode, Function.identity())); |
|
|
|
|
|
|
|
|
|
for (TrunklineCarsLoadScanEntity trunklineCarsLoadScanEntity : noUnloadList) { |
|
|
|
|
String loadCode = trunklineCarsLoadScanEntity.getLoadCode(); |
|
|
|
|
String waybillNo = trunklineCarsLoadScanEntity.getWaybillNo(); |
|
|
|
@ -579,6 +590,14 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
|
|
|
|
|
abnormalRecordEntity.setRemark("无卸车记录"); |
|
|
|
|
abnormalRecordEntity.setIsZero(0); |
|
|
|
|
abnormalRecordEntity.setNum(1); |
|
|
|
|
DistributionParcelListEntity distributionParcel = parcelMap.get(scanCode); |
|
|
|
|
if(!Objects.isNull(distributionParcel)){ |
|
|
|
|
abnormalRecordEntity.setAbnormalStatus(1); |
|
|
|
|
abnormalRecordEntity.setDealTime(new Date()); |
|
|
|
|
abnormalRecordEntity.setDealUserId(userId); |
|
|
|
|
abnormalRecordEntity.setDealUserName(nickName); |
|
|
|
|
abnormalRecordEntity.setRemark("无卸车记录,已入库,系统判定自动完结"); |
|
|
|
|
} |
|
|
|
|
addList.add(abnormalRecordEntity); |
|
|
|
|
// abnormalRecordClient.addAbnormalRecord(abnormalRecordEntity);
|
|
|
|
|
} |
|
|
|
|