|
|
|
@ -17,6 +17,7 @@ import com.logpm.factory.snm.service.IPanFactoryOrderService;
|
|
|
|
|
import com.logpm.factory.snm.service.IPanOrderStatusLogService; |
|
|
|
|
import com.logpm.factory.snm.service.IPanPackageInfoService; |
|
|
|
|
import com.logpm.oldproject.feign.IAdvanceDetailClient; |
|
|
|
|
import com.logpm.oldproject.feign.IWarehouseClient; |
|
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
import org.slf4j.Logger; |
|
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
@ -45,6 +46,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
|
|
|
|
|
private final IPanPackageInfoService panPackageInfoService; |
|
|
|
|
private final IPanFactoryOrderService panFactoryOrderService; |
|
|
|
|
private final IAdvanceDetailClient advanceDetailClient; |
|
|
|
|
private final IWarehouseClient warehouseClient; |
|
|
|
|
|
|
|
|
|
// @Override
|
|
|
|
|
// public FactoryTokenVO getToken(String corpId, String appKey, String appSecret) throws NoSuchAlgorithmException {
|
|
|
|
@ -179,6 +181,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
|
|
|
|
|
|
|
|
|
|
//通过包件码查询是否是要推送的订单
|
|
|
|
|
String unitNo = orderStatusDTO.getUnitNo();//包件码
|
|
|
|
|
String currentWarehouse = orderStatusDTO.getCurrentWarehouse(); |
|
|
|
|
QueryWrapper<PanPackageInfo> packageInfoQueryWrapper = new QueryWrapper<>(); |
|
|
|
|
packageInfoQueryWrapper.eq("unit_no",unitNo); |
|
|
|
|
PanPackageInfo one = panPackageInfoService.getOne(packageInfoQueryWrapper); |
|
|
|
@ -189,7 +192,12 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
|
|
|
|
|
String plantId = one.getPlantId(); |
|
|
|
|
//查询destinationWarehouse logiBillNo plantId数据
|
|
|
|
|
Map<String,String> supplyData = advanceDetailClient.getSupplyData(unitNo); |
|
|
|
|
|
|
|
|
|
//根据仓库ID查询仓库名字
|
|
|
|
|
currentWarehouse = warehouseClient.selectNameById(Integer.parseInt(currentWarehouse)); |
|
|
|
|
|
|
|
|
|
orderStatusDTO.setPlantId(plantId); |
|
|
|
|
orderStatusDTO.setCurrentWarehouse(currentWarehouse); |
|
|
|
|
orderStatusDTO.setDestinationWarehouse(supplyData.get("destinationWarehouse")); |
|
|
|
|
// orderStatusDTO.setDestinationWarehouse("南充市");
|
|
|
|
|
orderStatusDTO.setLogiBillNo(supplyData.get("logiBillNo")); |
|
|
|
|