Browse Source

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

dev
陈龙 3 days ago
parent
commit
b60750eaa7
  1. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java
  2. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java
  3. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java
  4. 1
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml
  5. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java
  6. 19
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java
  7. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java
  8. 26
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java

@ -93,12 +93,12 @@ public class DistributionStockArticleClient implements IDistributionStockArticle
bladeRedis.setEx(key,"1",30L);
DistributionStockArticleEntity distributionStockArticle = distributionStockArticleService.findStockArticleByOrderCodeAndWarehouseId(orderCode, warehouseId);
if(ObjectUtils.isNotEmpty(distributionStockArticle)){
bladeRedis.setEx(key,distributionStockArticle.getId(),30L);
bladeRedis.setEx(key,distributionStockArticle.getId().toString(),30L);
return distributionStockArticle.getId();
}else{
boolean saveFlag = distributionStockArticleService.save(distributionStockArticleEntity);
if(saveFlag){
bladeRedis.setEx(key,distributionStockArticleEntity.getId(),30L);
bladeRedis.setEx(key,distributionStockArticle.getId().toString(),30L);
return distributionStockArticleEntity.getId();
}else{
return 0L;

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){

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

@ -206,5 +206,5 @@ public interface TrunklineCarsLoadScanMapper extends BaseMapper<TrunklineCarsLoa
String findBrandNameByCarLoadCode(@Param("loadCode") String loadCode);
int findEntityByOrderPackageCodeAndUnloadTime(@Param("orderPackageCode") String orderPackageCode, @Param("unloadTime") Date unloadTime);
int findEntityByOrderPackageCodeAndUnloadTime(@Param("orderPackageCode") String orderPackageCode, @Param("unloadTime") Date unloadTime, @Param("warehouseId") Long warehouseId);
}

1
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml

@ -1233,6 +1233,7 @@
from logpm_trunkline_cars_load_scan ltcls
where ltcls.scan_code = #{orderPackageCode}
and ltcls.unload_time > #{unloadTime}
and ltcls.unload_node_id != #{warehouseId}
</select>

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

@ -213,5 +213,5 @@ public interface ITrunklineCarsLoadScanService extends BaseService<TrunklineCars
*/
String findBrandNameByCarLoadCode(String loadCode);
int findEntityByOrderPackageCodeAndUnloadTime(String orderPackageCode, Date unloadTime);
int findEntityByOrderPackageCodeAndUnloadTime(String orderPackageCode, Date unloadTime, Long warehouseId);
}

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

4
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java

@ -515,7 +515,7 @@ public class TrunklineCarsLoadScanServiceImpl extends BaseServiceImpl<TrunklineC
}
@Override
public int findEntityByOrderPackageCodeAndUnloadTime(String orderPackageCode, Date unloadTime) {
return baseMapper.findEntityByOrderPackageCodeAndUnloadTime(orderPackageCode,unloadTime);
public int findEntityByOrderPackageCodeAndUnloadTime(String orderPackageCode, Date unloadTime, Long warehouseId) {
return baseMapper.findEntityByOrderPackageCodeAndUnloadTime(orderPackageCode,unloadTime,warehouseId);
}
}

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

@ -13541,6 +13541,16 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
List<String> scanCodeList = new ArrayList<>(scanCodeSet);
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()));
List<TrunklineAdvanceDetailEntity> allAdvanceDetailList = new ArrayList<>();
int packageBatchSize = 500;
@ -13641,7 +13651,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
orderPackageCodeList.add(orderPackageCode);
//查询是否有在系统无编码后进行卸车的数据
int unloadNum = trunklineCarsLoadScanService.findEntityByOrderPackageCodeAndUnloadTime(orderPackageCode,unloadTime);
int unloadNum = trunklineCarsLoadScanService.findEntityByOrderPackageCodeAndUnloadTime(orderPackageCode,unloadTime,warehouseId);
if(unloadNum > 0){
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(orderPackageCode, warehouseId);
if(!Objects.isNull(parcelListEntity)){
@ -13664,11 +13674,15 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
updateParceList.add(updateEntity);
});
}
TrunklineAdvanceDetailEntity updateEntity = new TrunklineAdvanceDetailEntity();
updateEntity.setId(trunklineAdvanceDetailEntity.getId());
updateEntity.setNowWarehouseId(warehouseId);
updateEntity.setNowWarehouseName(warehouseName);
updateNowWarehouseList.add(updateEntity);
DistributionParcelListEntity parcelList = parcelMap.get(orderPackageCode);
if(Objects.isNull(parcelList)){
TrunklineAdvanceDetailEntity updateEntity = new TrunklineAdvanceDetailEntity();
updateEntity.setId(trunklineAdvanceDetailEntity.getId());
updateEntity.setNowWarehouseId(warehouseId);
updateEntity.setNowWarehouseName(warehouseName);
updateNowWarehouseList.add(updateEntity);
}
}
});

Loading…
Cancel
Save