Browse Source

Merge remote-tracking branch 'origin/dev' into pre-production

pre-production
zhenghaoyu 3 days ago
parent
commit
061f710206
  1. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java
  2. 19
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java

4
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java

@ -1093,12 +1093,14 @@ public class CarsLoadController {
// return R.fail(405,"未知的发车类型");
// }
carsLoadService.unloadByLoadId(loadCarsDTO);
try{
//同步一次系统无编码数据
carsLoadService.syncNoSystemData(loadId, myCurrentWarehouse.getId(), myCurrentWarehouse.getName());
carsLoadService.unloadByLoadId(loadCarsDTO);
carsLoadService.sendStationArrivedEnter(loadCarsDTO);
}catch (Exception e){

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

@ -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);
}

Loading…
Cancel
Save