|
|
|
@ -45,14 +45,8 @@ import com.logpm.trunkline.feign.ITrunklinePackageTrackLogClient;
|
|
|
|
|
import com.logpm.trunkline.mapper.TrunklineCarsLoadMapper; |
|
|
|
|
import com.logpm.trunkline.service.*; |
|
|
|
|
import com.logpm.trunkline.vo.*; |
|
|
|
|
import com.logpm.warehouse.entity.WarehousePackageTrackLogEntity; |
|
|
|
|
import com.logpm.warehouse.entity.WarehouseTrayTypeEntity; |
|
|
|
|
import com.logpm.warehouse.entity.WarehouseWayBillDetail; |
|
|
|
|
import com.logpm.warehouse.entity.WarehouseWaybillEntity; |
|
|
|
|
import com.logpm.warehouse.feign.IWarehouseTrayTypeClient; |
|
|
|
|
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient; |
|
|
|
|
import com.logpm.warehouse.feign.IWarehouseWaybillClient; |
|
|
|
|
import com.logpm.warehouse.feign.IWarehouseWaybillDetailClient; |
|
|
|
|
import com.logpm.warehouse.entity.*; |
|
|
|
|
import com.logpm.warehouse.feign.*; |
|
|
|
|
import com.logpm.warehouse.vo.WarehouseWaybillVO; |
|
|
|
|
import com.logpm.warehouse.vo.WaybillOrderTotalWeightAndVolumeVO; |
|
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
@ -139,6 +133,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
private final IBasicdataTripartiteMallClient tripartiteMallClient; |
|
|
|
|
private final IBasicMaterialClient basicMaterialClient; |
|
|
|
|
private final IBasicdataBrandClient basicdataBrandClient; |
|
|
|
|
private final IWarehouseConfigClient warehouseConfigClient; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -267,6 +262,20 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
// throw new CustomerException(400, "节点还未上传发车前图片");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
WarehouseConfigEntity warehouseConfig = warehouseConfigClient.getWarehouseConfig(warehouseId); |
|
|
|
|
if(!Objects.isNull(warehouseConfig)){ |
|
|
|
|
Integer isTrunklineStartPhoto = warehouseConfig.getIsTrunklineStartPhoto(); |
|
|
|
|
if(NumberUtil.equals(isTrunklineStartPhoto,1)){ |
|
|
|
|
//限制装车之前上传图片
|
|
|
|
|
Integer isStartPhoto = currentCarsLoadLineEntity.getIsStartPhoto(); |
|
|
|
|
if(NumberUtil.equals(isStartPhoto,0)){ |
|
|
|
|
log.warn("##############startCarByLoadId: 节点还未上传发车前图片 isStartPhoto={}", isStartPhoto); |
|
|
|
|
throw new CustomerException(405, "节点还未上传发车前图片"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (StringUtil.isNotBlank(fullLoadRate)) { |
|
|
|
|
carsLoadEntity.setFullLoadRate(new BigDecimal(fullLoadRate)); |
|
|
|
|
} |
|
|
|
@ -2307,174 +2316,44 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
public R findLinePhoto(LoadCarsDTO loadCarsDTO) { |
|
|
|
|
Long loadId = loadCarsDTO.getLoadId(); |
|
|
|
|
|
|
|
|
|
List<Map<String, Object>> resultList = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
List<TrunklineCarsLoadLinePhotoEntity> linePhotoEntityList = carsLoadLinePhotoService.findListByLoadIdAndWarehouseId(loadId, null, null, null); |
|
|
|
|
//把linePhotoEntityList中所有元素的loadLineId放入一个Set集合
|
|
|
|
|
Set<Long> loadLineIdSet = linePhotoEntityList.stream().map(TrunklineCarsLoadLinePhotoEntity::getLoadLineId).collect(Collectors.toSet()); |
|
|
|
|
if(CollUtil.isNotEmpty(loadLineIdSet)){ |
|
|
|
|
QueryWrapper<TrunklineCarsLoadLineEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
queryWrapper.in("id",loadLineIdSet); |
|
|
|
|
List<TrunklineCarsLoadLineEntity> carsLoadLineList = trunklineCarsLoadLineService.list(queryWrapper); |
|
|
|
|
//把carsLoadLineList转化为以id为key的map
|
|
|
|
|
Map<Long, TrunklineCarsLoadLineEntity> carsLoadLineMap = carsLoadLineList.stream().collect(Collectors.toMap(TrunklineCarsLoadLineEntity::getId, Function.identity())); |
|
|
|
|
|
|
|
|
|
//把linePhotoEntityList中所有元素以loadLineId进行分组
|
|
|
|
|
Map<Long, List<TrunklineCarsLoadLinePhotoEntity>> linePhotoMap = linePhotoEntityList.stream().collect(Collectors.groupingBy(TrunklineCarsLoadLinePhotoEntity::getLoadLineId)); |
|
|
|
|
Map<Long, List<TrunklineCarsLoadLinePhotoEntity>> linePhotoMap = linePhotoEntityList.stream().collect(Collectors.groupingBy(TrunklineCarsLoadLinePhotoEntity::getLoadLineId)); |
|
|
|
|
|
|
|
|
|
List<TrunklineCarsLoadLineEntity> loadLineEntityList = trunklineCarsLoadLineService.findListByLoadId(loadId); |
|
|
|
|
|
|
|
|
|
List<Map<String, Object>> resultList = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
linePhotoMap.keySet().forEach(loadLineId -> { |
|
|
|
|
Map<String,Object> map = new HashMap<>(); |
|
|
|
|
List<TrunklineCarsLoadLinePhotoEntity> trunklineCarsLoadLinePhotoEntities = linePhotoMap.get(loadLineId); |
|
|
|
|
TrunklineCarsLoadLineEntity trunklineCarsLoadLineEntity = carsLoadLineMap.get(loadLineId); |
|
|
|
|
map.put("carsLoadLineEntity",trunklineCarsLoadLineEntity); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<String,Object> loadingMap = new HashMap<>(); |
|
|
|
|
|
|
|
|
|
//把trunklineCarsLoadLinePhotoEntities通过type=10进行过滤
|
|
|
|
|
List<TrunklineCarsLoadLinePhotoEntity> ls = trunklineCarsLoadLinePhotoEntities.stream().filter(item -> item.getType().equals(10)).collect(Collectors.toList()); |
|
|
|
|
|
|
|
|
|
//把qualityList通过position进行分组
|
|
|
|
|
// List<TrunklineCarsLoadLinePhotoEntity> listQian = new ArrayList<>();
|
|
|
|
|
// List<TrunklineCarsLoadLinePhotoEntity> listHou = new ArrayList<>();
|
|
|
|
|
// List<TrunklineCarsLoadLinePhotoEntity> listZuo = new ArrayList<>();
|
|
|
|
|
// List<TrunklineCarsLoadLinePhotoEntity> listYou = new ArrayList<>();
|
|
|
|
|
// Map<Integer, List<TrunklineCarsLoadLinePhotoEntity>> listMap = ls.stream().collect(Collectors.groupingBy(TrunklineCarsLoadLinePhotoEntity::getPosition));
|
|
|
|
|
// listMap.keySet().forEach(key -> {
|
|
|
|
|
// List<TrunklineCarsLoadLinePhotoEntity> list = listMap.get(key);
|
|
|
|
|
// if(NumberUtil.equals(1,key)){//后
|
|
|
|
|
// listQian.addAll(list);
|
|
|
|
|
// }else if(NumberUtil.equals(2,key)){//后
|
|
|
|
|
// listHou.addAll(list);
|
|
|
|
|
// }else if(NumberUtil.equals(3,key)){
|
|
|
|
|
// listZuo.addAll(list);
|
|
|
|
|
// }else if(NumberUtil.equals(4,key)){
|
|
|
|
|
// listYou.addAll(list);
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
//
|
|
|
|
|
// loadingMap.put("listQian",listQian);
|
|
|
|
|
// loadingMap.put("listHou",listHou);
|
|
|
|
|
// loadingMap.put("listZuo",listZuo);
|
|
|
|
|
// loadingMap.put("listYou",listYou);
|
|
|
|
|
|
|
|
|
|
// Map<String,Object> loadingObject = new HashMap<>();
|
|
|
|
|
// loadingObject.put("loadingList",ls);
|
|
|
|
|
|
|
|
|
|
map.put("loadingObject",ls); |
|
|
|
|
|
|
|
|
|
//发车
|
|
|
|
|
// Map<String,Object> qualityMap = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
List<TrunklineCarsLoadLinePhotoEntity> qualityList = trunklineCarsLoadLinePhotoEntities.stream().filter(item -> item.getType().equals(20)).collect(Collectors.toList()); |
|
|
|
|
//把qualityList通过position进行分组
|
|
|
|
|
// List<TrunklineCarsLoadLinePhotoEntity> qualityListQian = new ArrayList<>();
|
|
|
|
|
// List<TrunklineCarsLoadLinePhotoEntity> qualityListHou = new ArrayList<>();
|
|
|
|
|
// List<TrunklineCarsLoadLinePhotoEntity> qualityListZuo = new ArrayList<>();
|
|
|
|
|
// List<TrunklineCarsLoadLinePhotoEntity> qualityListYou = new ArrayList<>();
|
|
|
|
|
// Map<Integer, List<TrunklineCarsLoadLinePhotoEntity>> qualityListMap = qualityList.stream().collect(Collectors.groupingBy(TrunklineCarsLoadLinePhotoEntity::getPosition));
|
|
|
|
|
// qualityListMap.keySet().forEach(key -> {
|
|
|
|
|
// List<TrunklineCarsLoadLinePhotoEntity> list = qualityListMap.get(key);
|
|
|
|
|
// if(NumberUtil.equals(1,key)){//后
|
|
|
|
|
// qualityListQian.addAll(list);
|
|
|
|
|
// }else if(NumberUtil.equals(2,key)){//后
|
|
|
|
|
// qualityListHou.addAll(list);
|
|
|
|
|
// }else if(NumberUtil.equals(3,key)){
|
|
|
|
|
// qualityListZuo.addAll(list);
|
|
|
|
|
// }else if(NumberUtil.equals(4,key)){
|
|
|
|
|
// qualityListYou.addAll(list);
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
//
|
|
|
|
|
// qualityMap.put("qualityListQian",qualityListQian);
|
|
|
|
|
// qualityMap.put("qualityListHou",qualityListHou);
|
|
|
|
|
// qualityMap.put("qualityListZuo",qualityListZuo);
|
|
|
|
|
// qualityMap.put("qualityListYou",qualityListYou);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Map<String,Object> yubuMap = new HashMap<>();
|
|
|
|
|
// List<TrunklineCarsLoadLinePhotoEntity> yubuListQian = new ArrayList<>();
|
|
|
|
|
// List<TrunklineCarsLoadLinePhotoEntity> yubuListHou = new ArrayList<>();
|
|
|
|
|
// List<TrunklineCarsLoadLinePhotoEntity> yubuListZuo = new ArrayList<>();
|
|
|
|
|
// List<TrunklineCarsLoadLinePhotoEntity> yubuListYou = new ArrayList<>();
|
|
|
|
|
List<TrunklineCarsLoadLinePhotoEntity> yubuList = trunklineCarsLoadLinePhotoEntities.stream().filter(item -> item.getType().equals(21)).collect(Collectors.toList()); |
|
|
|
|
//把qualityList通过position进行分组
|
|
|
|
|
// Map<Integer, List<TrunklineCarsLoadLinePhotoEntity>> yubuListMap = yubuList.stream().collect(Collectors.groupingBy(TrunklineCarsLoadLinePhotoEntity::getPosition));
|
|
|
|
|
// yubuListMap.keySet().forEach(key -> {
|
|
|
|
|
// List<TrunklineCarsLoadLinePhotoEntity> list = yubuListMap.get(key);
|
|
|
|
|
// if(NumberUtil.equals(1,key)){//后
|
|
|
|
|
// yubuListQian.addAll(list);
|
|
|
|
|
// }else if(NumberUtil.equals(2,key)){//后
|
|
|
|
|
// yubuListHou.addAll(list);
|
|
|
|
|
// }else if(NumberUtil.equals(3,key)){
|
|
|
|
|
// yubuListZuo.addAll(list);
|
|
|
|
|
// }else if(NumberUtil.equals(4,key)){
|
|
|
|
|
// yubuListYou.addAll(list);
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
//
|
|
|
|
|
// yubuMap.put("yubuListQian",yubuListQian);
|
|
|
|
|
// yubuMap.put("yubuListHou",yubuListHou);
|
|
|
|
|
// yubuMap.put("yubuListZuo",yubuListZuo);
|
|
|
|
|
// yubuMap.put("yubuListYou",yubuListYou);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Map<String,Object> startObject = new HashMap<>();
|
|
|
|
|
// startObject.put("qualityList",qualityList);
|
|
|
|
|
// startObject.put("yubuList",yubuList);
|
|
|
|
|
|
|
|
|
|
map.put("startObject",qualityList.addAll(yubuList)); |
|
|
|
|
|
|
|
|
|
//卸车
|
|
|
|
|
Map<String,Object> unloadQualityMap = new HashMap<>(); |
|
|
|
|
|
|
|
|
|
List<TrunklineCarsLoadLinePhotoEntity> unloadQualityList = trunklineCarsLoadLinePhotoEntities.stream().filter(item -> item.getType().equals(30)).collect(Collectors.toList()); |
|
|
|
|
//把qualityList通过position进行分组
|
|
|
|
|
// List<TrunklineCarsLoadLinePhotoEntity> unloadQualityListQian = new ArrayList<>();
|
|
|
|
|
// List<TrunklineCarsLoadLinePhotoEntity> unloadQualityListHou = new ArrayList<>();
|
|
|
|
|
// List<TrunklineCarsLoadLinePhotoEntity> unloadQualityListZuo = new ArrayList<>();
|
|
|
|
|
// List<TrunklineCarsLoadLinePhotoEntity> unloadQualityListYou = new ArrayList<>();
|
|
|
|
|
// Map<Integer, List<TrunklineCarsLoadLinePhotoEntity>> unloadQualityListMap = unloadQualityList.stream().collect(Collectors.groupingBy(TrunklineCarsLoadLinePhotoEntity::getPosition));
|
|
|
|
|
// qualityListMap.keySet().forEach(key -> {
|
|
|
|
|
// List<TrunklineCarsLoadLinePhotoEntity> list = unloadQualityListMap.get(key);
|
|
|
|
|
// if(NumberUtil.equals(1,key)){//后
|
|
|
|
|
// unloadQualityListQian.addAll(list);
|
|
|
|
|
// }else if(NumberUtil.equals(2,key)){//后
|
|
|
|
|
// unloadQualityListHou.addAll(list);
|
|
|
|
|
// }else if(NumberUtil.equals(3,key)){
|
|
|
|
|
// unloadQualityListZuo.addAll(list);
|
|
|
|
|
// }else if(NumberUtil.equals(4,key)){
|
|
|
|
|
// unloadQualityListYou.addAll(list);
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
//
|
|
|
|
|
// unloadQualityMap.put("unloadQualityListQian",unloadQualityListQian);
|
|
|
|
|
// unloadQualityMap.put("unloadQualityListHou",unloadQualityListHou);
|
|
|
|
|
// unloadQualityMap.put("unloadQualityListZuo",unloadQualityListZuo);
|
|
|
|
|
// unloadQualityMap.put("unloadQualityListYou",unloadQualityListYou);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Map<String,Object> protectionMap = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
List<TrunklineCarsLoadLinePhotoEntity> protectionList = trunklineCarsLoadLinePhotoEntities.stream().filter(item -> item.getType().equals(31)).collect(Collectors.toList()); |
|
|
|
|
if(CollUtil.isNotEmpty(loadLineEntityList)){ |
|
|
|
|
|
|
|
|
|
// protectionMap.put("protectionList",protectionList);
|
|
|
|
|
loadLineEntityList.forEach(loadLineEntity -> { |
|
|
|
|
|
|
|
|
|
Long loadLineId = loadLineEntity.getId(); |
|
|
|
|
|
|
|
|
|
// Map<String,Object> unloadObject = new HashMap<>();
|
|
|
|
|
// unloadObject.put("unloadQualityList",unloadQualityList);
|
|
|
|
|
// unloadObject.put("protectionList",protectionList);
|
|
|
|
|
Map<String,Object> map = new HashMap<>(); |
|
|
|
|
|
|
|
|
|
map.put("carsLoadLineEntity",loadLineEntity); |
|
|
|
|
|
|
|
|
|
map.put("unloadObject",unloadQualityList.addAll(protectionList)); |
|
|
|
|
List<TrunklineCarsLoadLinePhotoEntity> trunklineCarsLoadLinePhotoEntities = linePhotoMap.get(loadLineId); |
|
|
|
|
|
|
|
|
|
if(CollUtil.isNotEmpty(trunklineCarsLoadLinePhotoEntities)){ |
|
|
|
|
List<TrunklineCarsLoadLinePhotoEntity> ls = trunklineCarsLoadLinePhotoEntities.stream().filter(item -> item.getType().equals(10)).collect(Collectors.toList()); |
|
|
|
|
map.put("loadingObject",ls); |
|
|
|
|
List<TrunklineCarsLoadLinePhotoEntity> qualityList = trunklineCarsLoadLinePhotoEntities.stream().filter(item -> item.getType().equals(20)).collect(Collectors.toList()); |
|
|
|
|
List<TrunklineCarsLoadLinePhotoEntity> yubuList = trunklineCarsLoadLinePhotoEntities.stream().filter(item -> item.getType().equals(21)).collect(Collectors.toList()); |
|
|
|
|
qualityList.addAll(yubuList); |
|
|
|
|
map.put("startObject",qualityList); |
|
|
|
|
List<TrunklineCarsLoadLinePhotoEntity> unloadQualityList = trunklineCarsLoadLinePhotoEntities.stream().filter(item -> item.getType().equals(30)).collect(Collectors.toList()); |
|
|
|
|
List<TrunklineCarsLoadLinePhotoEntity> protectionList = trunklineCarsLoadLinePhotoEntities.stream().filter(item -> item.getType().equals(31)).collect(Collectors.toList()); |
|
|
|
|
unloadQualityList.addAll(protectionList); |
|
|
|
|
map.put("unloadObject",unloadQualityList); |
|
|
|
|
} |
|
|
|
|
resultList.add(map); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
return R.data(resultList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -3560,6 +3439,19 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
// return R.fail(405, "当前节点还未上传装车前照片");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
WarehouseConfigEntity warehouseConfig = warehouseConfigClient.getWarehouseConfig(warehouseId); |
|
|
|
|
if(!Objects.isNull(warehouseConfig)){ |
|
|
|
|
Integer isTrunklineLoadingPhoto = warehouseConfig.getIsTrunklineLoadingPhoto(); |
|
|
|
|
if(NumberUtil.equals(isTrunklineLoadingPhoto,1)){ |
|
|
|
|
//限制装车之前上传图片
|
|
|
|
|
Integer isLoadingPhoto = carsLoadLineEntity.getIsLoadingPhoto(); |
|
|
|
|
if(NumberUtil.equals(isLoadingPhoto,0)){ |
|
|
|
|
log.warn("##############loadingScan: 当前节点还未上传装车前照片 isLoadingPhoto={}", isLoadingPhoto); |
|
|
|
|
return R.fail(405, "当前节点还未上传装车前照片"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity basicdataWarehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); |
|
|
|
|
if (Objects.isNull(basicdataWarehouseEntity)) { |
|
|
|
|
log.warn("##################loadingScan: 仓库信息不存在 warehouseId={}", warehouseId); |
|
|
|
@ -3942,6 +3834,19 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
// return R.fail(405, "当前节点还未上传装车前照片");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
WarehouseConfigEntity warehouseConfig = warehouseConfigClient.getWarehouseConfig(warehouseId); |
|
|
|
|
if(!Objects.isNull(warehouseConfig)){ |
|
|
|
|
Integer isTrunklineLoadingPhoto = warehouseConfig.getIsTrunklineLoadingPhoto(); |
|
|
|
|
if(NumberUtil.equals(isTrunklineLoadingPhoto,1)){ |
|
|
|
|
//限制装车之前上传图片
|
|
|
|
|
Integer isLoadingPhoto = carsLoadLineEntity.getIsLoadingPhoto(); |
|
|
|
|
if(NumberUtil.equals(isLoadingPhoto,0)){ |
|
|
|
|
log.warn("##############loadingZero: 当前节点还未上传装车前照片 isLoadingPhoto={}", isLoadingPhoto); |
|
|
|
|
return R.fail(405, "当前节点还未上传装车前照片"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Long trayId = null; |
|
|
|
|
String trayName = null; |
|
|
|
|
if (!StringUtil.isBlank(trayCode)) { |
|
|
|
@ -4304,6 +4209,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
page.setCurrent(loadCarsDTO.getPageNum()); |
|
|
|
|
page.setSize(loadCarsDTO.getPageSize()); |
|
|
|
|
Integer type = loadCarsDTO.getType(); |
|
|
|
|
Long warehouseId = loadCarsDTO.getWarehouseId(); |
|
|
|
|
|
|
|
|
|
Date start = CommonUtil.getStartByDateStr(loadCarsDTO.getStartDate()); |
|
|
|
|
Date end = CommonUtil.getEndByDateStr(loadCarsDTO.getEndDate()); |
|
|
|
@ -4312,6 +4218,15 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
|
|
|
|
|
IPage<TrunklineCarsLoadVO> pageList = baseMapper.carsLoadPageList(page, loadCarsDTO); |
|
|
|
|
List<TrunklineCarsLoadVO> records = pageList.getRecords(); |
|
|
|
|
//把records中所有元素的id放入一个List
|
|
|
|
|
List<Long> idList = records.stream().map(TrunklineCarsLoadVO::getId).collect(Collectors.toList()); |
|
|
|
|
List<TrunklineCarsLoadLinePhotoEntity> carsLoadLinePhotoEntities = carsLoadLinePhotoService.findListByLoadIdListAndWarehouseId(idList,warehouseId); |
|
|
|
|
Map<Long, List<TrunklineCarsLoadLinePhotoEntity>> map = new HashMap<>(); |
|
|
|
|
if(CollUtil.isNotEmpty(carsLoadLinePhotoEntities)){ |
|
|
|
|
//把carsLoadLinePhotoEntities中所有元素通过loadId进行分组
|
|
|
|
|
map = carsLoadLinePhotoEntities.stream().collect(Collectors.groupingBy(TrunklineCarsLoadLinePhotoEntity::getLoadId)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//循环records,获取字典值
|
|
|
|
|
for (TrunklineCarsLoadVO trunklineCarsLoadVO : records) { |
|
|
|
|
String loadStatus = trunklineCarsLoadVO.getLoadStatus(); |
|
|
|
@ -4321,6 +4236,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
Integer stockCarsNum = trunklineCarsLoadVO.getStockNumber(); |
|
|
|
|
trunklineCarsLoadVO.setRealLoadingNumber(stockCarsNum); |
|
|
|
|
trunklineCarsLoadVO.setLoadStatus(value); |
|
|
|
|
|
|
|
|
|
List<TrunklineCarsLoadLinePhotoEntity> trunklineCarsLoadLinePhotoEntities = map.get(trunklineCarsLoadVO.getId()); |
|
|
|
|
trunklineCarsLoadVO.setCarsLoadLinePhotoEntities(trunklineCarsLoadLinePhotoEntities); |
|
|
|
|
} |
|
|
|
|
pageList.setRecords(records); |
|
|
|
|
return R.data(pageList); |
|
|
|
@ -7405,6 +7323,21 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
return R.fail(405, "当前网点已经卸车确认"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WarehouseConfigEntity warehouseConfig = warehouseConfigClient.getWarehouseConfig(warehouseId); |
|
|
|
|
if(!Objects.isNull(warehouseConfig)){ |
|
|
|
|
Integer isTrunklineUnloadPhoto = warehouseConfig.getIsTrunklineUnloadPhoto(); |
|
|
|
|
if(NumberUtil.equals(isTrunklineUnloadPhoto,1)){ |
|
|
|
|
//限制装车之前上传图片
|
|
|
|
|
Integer isUnloadPhoto = loadLineEntity.getIsUnloadPhoto(); |
|
|
|
|
if(NumberUtil.equals(isUnloadPhoto,0)){ |
|
|
|
|
log.warn("##############batchUnload: 节点还未上传卸车前图片 isUnloadPhoto={}", isUnloadPhoto); |
|
|
|
|
return R.fail(405, "节点还未上传卸车前图片"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Long nowWarehouseId = carsLoadEntity.getNowWarehouseId();
|
|
|
|
|
// if (!warehouseId.equals(nowWarehouseId)) {
|
|
|
|
|
// log.warn("############batchUnload: 当前节点还未到车 loadId={} warehouseId={}", loadId, warehouseId);
|
|
|
|
@ -9069,12 +9002,18 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
return R.fail(405, "配载计划节点信息不存在"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//限制装车之前上传图片
|
|
|
|
|
// Integer isLoadingPhoto = loadLineEntity.getIsLoadingPhoto();
|
|
|
|
|
// if(NumberUtil.equals(isLoadingPhoto,0)){
|
|
|
|
|
// log.warn("##############manualLoading: 当前节点还未上传装车前照片 isLoadingPhoto={}", isLoadingPhoto);
|
|
|
|
|
// return R.fail(405, "当前节点还未上传装车前照片");
|
|
|
|
|
// }
|
|
|
|
|
WarehouseConfigEntity warehouseConfig = warehouseConfigClient.getWarehouseConfig(warehouseId); |
|
|
|
|
if(!Objects.isNull(warehouseConfig)){ |
|
|
|
|
Integer isTrunklineLoadingPhoto = warehouseConfig.getIsTrunklineLoadingPhoto(); |
|
|
|
|
if(NumberUtil.equals(isTrunklineLoadingPhoto,1)){ |
|
|
|
|
//限制装车之前上传图片
|
|
|
|
|
Integer isLoadingPhoto = loadLineEntity.getIsLoadingPhoto(); |
|
|
|
|
if(NumberUtil.equals(isLoadingPhoto,0)){ |
|
|
|
|
log.warn("##############manualLoading: 当前节点还未上传装车前照片 isLoadingPhoto={}", isLoadingPhoto); |
|
|
|
|
return R.fail(405, "当前节点还未上传装车前照片"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String tenantId = AuthUtil.getTenantId(); |
|
|
|
|
Long userId = AuthUtil.getUserId(); |
|
|
|
@ -10609,6 +10548,19 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
// return R.fail(405, "当前节点还未上传装车前照片");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
WarehouseConfigEntity warehouseConfig = warehouseConfigClient.getWarehouseConfig(warehouseId); |
|
|
|
|
if(!Objects.isNull(warehouseConfig)){ |
|
|
|
|
Integer isTrunklineLoadingPhoto = warehouseConfig.getIsTrunklineLoadingPhoto(); |
|
|
|
|
if(NumberUtil.equals(isTrunklineLoadingPhoto,1)){ |
|
|
|
|
//限制装车之前上传图片
|
|
|
|
|
Integer isLoadingPhoto = carsLoadLineEntity.getIsLoadingPhoto(); |
|
|
|
|
if(NumberUtil.equals(isLoadingPhoto,0)){ |
|
|
|
|
log.warn("##############loadingTray: 当前节点还未上传装车前照片 isLoadingPhoto={}", isLoadingPhoto); |
|
|
|
|
return R.fail(405, "当前节点还未上传装车前照片"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Integer pacakagNum = 0; |
|
|
|
|
Integer zeroNum = 0; |
|
|
|
|
|
|
|
|
@ -11308,6 +11260,15 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
IPage<TrunklineCarsLoadVO> pageList = baseMapper.arriveUnloadPageList(page, loadCarsDTO); |
|
|
|
|
|
|
|
|
|
List<TrunklineCarsLoadVO> records = pageList.getRecords(); |
|
|
|
|
//把records中所有元素的id放入一个List
|
|
|
|
|
List<Long> idList = records.stream().map(TrunklineCarsLoadVO::getId).collect(Collectors.toList()); |
|
|
|
|
List<TrunklineCarsLoadLinePhotoEntity> carsLoadLinePhotoEntities = carsLoadLinePhotoService.findListByLoadIdListAndWarehouseId(idList,warehouseId); |
|
|
|
|
Map<Long, List<TrunklineCarsLoadLinePhotoEntity>> map = new HashMap<>(); |
|
|
|
|
if(CollUtil.isNotEmpty(carsLoadLinePhotoEntities)){ |
|
|
|
|
//把carsLoadLinePhotoEntities中所有元素通过loadId进行分组
|
|
|
|
|
map = carsLoadLinePhotoEntities.stream().collect(Collectors.groupingBy(TrunklineCarsLoadLinePhotoEntity::getLoadId)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for (TrunklineCarsLoadVO trunklineCarsLoadVO : records) { |
|
|
|
|
Long loadId = trunklineCarsLoadVO.getId(); |
|
|
|
|
TrunklineCarsLoadLineEntity carsLoadLineEntity = trunklineCarsLoadLineService.findEntityByLoadIdAndNodeId(loadId, warehouseId); |
|
|
|
@ -11338,6 +11299,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
Integer stockCarNumber = trunklineCarsLoadVO.getStockNumber(); |
|
|
|
|
trunklineCarsLoadVO.setRealLoadingNumber(stockCarNumber); |
|
|
|
|
trunklineCarsLoadVO.setTotalLoadingNum(realLoadingNumber); |
|
|
|
|
|
|
|
|
|
List<TrunklineCarsLoadLinePhotoEntity> trunklineCarsLoadLinePhotoEntities = map.get(loadId); |
|
|
|
|
trunklineCarsLoadVO.setCarsLoadLinePhotoEntities(trunklineCarsLoadLinePhotoEntities); |
|
|
|
|
} |
|
|
|
|
pageList.setRecords(records); |
|
|
|
|
return R.data(pageList); |
|
|
|
@ -11510,6 +11474,21 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
log.warn("############unloadPackage: 配载计划节点信息不存在 loadId={} warehouseId={}", loadId, warehouseId); |
|
|
|
|
return R.fail(405, "配载计划节点信息不存在"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
WarehouseConfigEntity warehouseConfig = warehouseConfigClient.getWarehouseConfig(warehouseId); |
|
|
|
|
if(!Objects.isNull(warehouseConfig)){ |
|
|
|
|
Integer isTrunklineUnloadPhoto = warehouseConfig.getIsTrunklineUnloadPhoto(); |
|
|
|
|
if(NumberUtil.equals(isTrunklineUnloadPhoto,1)){ |
|
|
|
|
//限制装车之前上传图片
|
|
|
|
|
Integer isUnloadPhoto = carsLoadLineEntity.getIsUnloadPhoto(); |
|
|
|
|
if(NumberUtil.equals(isUnloadPhoto,0)){ |
|
|
|
|
log.warn("##############unloadPackage: 节点还未上传卸车前图片 isUnloadPhoto={}", isUnloadPhoto); |
|
|
|
|
return R.fail(405, "节点还未上传卸车前图片"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String unloadStatus = carsLoadLineEntity.getUnloadStatus(); |
|
|
|
|
Integer unloadNumber = carsLoadLineEntity.getUnloadNumber(); |
|
|
|
|
if (!"0".equals(unloadStatus)) { |
|
|
|
|