|
|
@@ -9,10 +9,7 @@ import com.sckw.core.utils.CollectionUtils;
|
|
|
import com.sckw.core.utils.IdWorker;
|
|
|
import com.sckw.core.utils.OrderGenerateUtils;
|
|
|
import com.sckw.payment.dao.KwpLedgerLogisticsMapper;
|
|
|
-import com.sckw.payment.model.KwpLedgerLogistics;
|
|
|
-import com.sckw.payment.model.KwpLedgerLogisticsTrack;
|
|
|
-import com.sckw.payment.model.KwpLedgerLogisticsUnit;
|
|
|
-import com.sckw.payment.model.KwpSettlementLogistics;
|
|
|
+import com.sckw.payment.model.*;
|
|
|
import com.sckw.payment.model.constant.LedgerEnum;
|
|
|
import com.sckw.payment.model.constant.LedgerTrackEnum;
|
|
|
import com.sckw.payment.model.constant.LogisticsUnitType;
|
|
|
@@ -21,6 +18,8 @@ import com.sckw.payment.model.dto.LedgerLogisticsDto;
|
|
|
import com.sckw.payment.model.vo.req.*;
|
|
|
import com.sckw.system.api.RemoteSystemService;
|
|
|
import com.sckw.system.api.model.dto.res.SysDictResDto;
|
|
|
+import com.sckw.transport.api.dubbo.TransportDubboService;
|
|
|
+import com.sckw.transport.api.model.dto.vo.KwtLogisticsOrderVO;
|
|
|
import jakarta.annotation.Resource;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.dubbo.config.annotation.DubboReference;
|
|
|
@@ -51,6 +50,8 @@ public class KwpLedgerLogisticsService extends AbsLedger {
|
|
|
private KwpLedgerLogisticsMapper logisticsMapper;
|
|
|
@DubboReference(version = "2.0.0", group = "design", check = false)
|
|
|
private RemoteSystemService remoteSystemService;
|
|
|
+ @DubboReference(version = "2.0.0", group = "design", check = false)
|
|
|
+ private TransportDubboService transportDubboService;
|
|
|
|
|
|
private void changeDict(List<LedgerLogisticsDto> list) {
|
|
|
List<SysDictResDto> taxRateDict = remoteSystemService.queryDictByType(DictTypeEnum.TAX_RATE.getType());
|
|
|
@@ -157,8 +158,28 @@ public class KwpLedgerLogisticsService extends AbsLedger {
|
|
|
} else {
|
|
|
logisticsMapper.updateById(kwpLedgerLogistics);
|
|
|
}
|
|
|
- /*报错物流订单关联数据*/
|
|
|
- List<Long> ids = logisticsSendReq.getIds();
|
|
|
+ /*保存物流订单关联数据*/
|
|
|
+ List<String> ids = logisticsSendReq.getIds();
|
|
|
+ List<KwtLogisticsOrderVO> acceptCarriageOrderDetail = transportDubboService.getAcceptCarriageOrderDetail(ids);
|
|
|
+ if (CollectionUtils.isEmpty(acceptCarriageOrderDetail)) {
|
|
|
+ throw new BusinessException("未找到物流订单!");
|
|
|
+ }
|
|
|
+ List<KwpLedgerLogisticsOrder> collect = acceptCarriageOrderDetail.stream().map(a -> {
|
|
|
+ KwpLedgerLogisticsOrder logisticsOrder = new KwpLedgerLogisticsOrder();
|
|
|
+ logisticsOrder.setId(new IdWorker(1).nextId());
|
|
|
+ logisticsOrder.setLLedgerId(kwpLedgerLogistics.getId());
|
|
|
+ logisticsOrder.setLOrderId(a.getId());
|
|
|
+ logisticsOrder.setRemark("");
|
|
|
+ logisticsOrder.setStatus(0);
|
|
|
+ logisticsOrder.setCreateBy(0L);
|
|
|
+ logisticsOrder.setCreateTime(LocalDateTime.now());
|
|
|
+ logisticsOrder.setUpdateBy(0L);
|
|
|
+ logisticsOrder.setUpdateTime(LocalDateTime.now());
|
|
|
+ logisticsOrder.setDelFlag(0);
|
|
|
+ return logisticsOrder;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+
|
|
|
+ logisticsOrderService.saveList(collect);
|
|
|
/*保存企业相关信息*/
|
|
|
Long checkEntId = logisticsSendReq.getCheckEntId();
|
|
|
|