|
|
@@ -2,12 +2,16 @@ package com.sckw.transport.service;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.sckw.contract.api.RemoteContractService;
|
|
|
+import com.sckw.contract.api.model.dto.res.ContractCommonInfoResDto;
|
|
|
import com.sckw.core.common.enums.NumberConstant;
|
|
|
import com.sckw.core.common.enums.StringConstant;
|
|
|
+import com.sckw.core.exception.BusinessException;
|
|
|
import com.sckw.core.model.enums.CarWaybillEnum;
|
|
|
import com.sckw.core.model.enums.LogisticsOrderEnum;
|
|
|
import com.sckw.core.utils.CollectionUtils;
|
|
|
import com.sckw.core.utils.IdWorker;
|
|
|
+import com.sckw.core.utils.StringTimeUtil;
|
|
|
import com.sckw.core.utils.StringUtils;
|
|
|
import com.sckw.core.web.context.LoginUserHolder;
|
|
|
import com.sckw.core.web.response.HttpResult;
|
|
|
@@ -16,10 +20,13 @@ import com.sckw.fleet.api.RemoteFleetService;
|
|
|
import com.sckw.fleet.api.model.vo.RTruckVo;
|
|
|
import com.sckw.mongo.enums.BusinessTypeEnum;
|
|
|
import com.sckw.mongo.model.SckwLogisticsOrder;
|
|
|
+import com.sckw.product.api.dubbo.GoodsInfoService;
|
|
|
+import com.sckw.product.api.model.KwpGoods;
|
|
|
import com.sckw.stream.model.SckwBusSum;
|
|
|
import com.sckw.system.api.RemoteSystemService;
|
|
|
import com.sckw.transport.dao.*;
|
|
|
import com.sckw.transport.model.*;
|
|
|
+import com.sckw.transport.model.dto.AddOrderDTO;
|
|
|
import com.sckw.transport.model.dto.OrderDTO;
|
|
|
import com.sckw.transport.model.dto.OrderFinishDTO;
|
|
|
import com.sckw.transport.model.vo.CarDataVO;
|
|
|
@@ -35,6 +42,7 @@ import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.ObjectUtils;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
+import java.text.ParseException;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@@ -49,6 +57,11 @@ public class ConsignOrderService {
|
|
|
|
|
|
@DubboReference(version = "2.0.0", group = "design", check = false)
|
|
|
RemoteSystemService remoteSystemService;
|
|
|
+ @DubboReference(version = "2.0.0", group = "design", check = false)
|
|
|
+ RemoteContractService remoteContractService;
|
|
|
+
|
|
|
+ @DubboReference(version = "2.0.0", group = "design", check = false, timeout = 8000)
|
|
|
+ GoodsInfoService goodsInfoService;
|
|
|
|
|
|
@DubboReference(version = "2.0.0", group = "design", check = false)
|
|
|
RemoteFleetService remoteFleetService;
|
|
|
@@ -65,12 +78,18 @@ public class ConsignOrderService {
|
|
|
@Autowired
|
|
|
public KwtLogisticsOrderAddressMapper kwtLogisticsOrderAddressMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ public KwtLogisticsOrderContractMapper logisticsOrderContractMapper;
|
|
|
+
|
|
|
@Autowired
|
|
|
public KwtLogisticsOrderUnitMapper kwtLogisticsOrderUnitMapper;
|
|
|
|
|
|
@Autowired
|
|
|
public KwtLogisticsOrderTrackMapper kwtLogisticsOrderTrackMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ public KwtLogisticsOrderGoodsMapper logisticsOrderGoodsMapper;
|
|
|
+
|
|
|
@Autowired
|
|
|
public KwtWaybillOrderMapper kwtWaybillOrderMapper;
|
|
|
|
|
|
@@ -499,11 +518,357 @@ public class ConsignOrderService {
|
|
|
|
|
|
/**
|
|
|
* 托运订单-完结订单-数据查询展示
|
|
|
- * @param orderId 物流订单id
|
|
|
+ *
|
|
|
+ * @param orderId 物流订单id
|
|
|
* @return
|
|
|
*/
|
|
|
public HttpResult consignOrderFinishDetail(String orderId) {
|
|
|
OrderFinishVO orderFinishVO = kwtLogisticsOrderMapper.selectOrderFinishData(orderId);
|
|
|
return HttpResult.ok(orderFinishVO);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 托运订单-完结订单
|
|
|
+ *
|
|
|
+ * @param addOrderDTO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public HttpResult addOrder(AddOrderDTO addOrderDTO) throws ParseException {
|
|
|
+ /**保存新建数据*/
|
|
|
+ Long lOrderId = new IdWorker(NumberConstant.ONE).nextId();
|
|
|
+ /**生成订单编号*/
|
|
|
+ String lOrderNo = com.sckw.transport.utils.StringUtils.getLOrderNo();
|
|
|
+ /**根据合同计算当前单据状态*/
|
|
|
+ /**判断生成物流订单应生成哪一种单据状态*/
|
|
|
+ List<Long> contractList = new ArrayList<>();
|
|
|
+ contractList.add(Long.parseLong(addOrderDTO.getContractId()));
|
|
|
+ Map<Long, ContractCommonInfoResDto> longContractCommonInfoResDtoMap = remoteContractService.queryContractBaseInfo(contractList);
|
|
|
+ if (CollectionUtils.isEmpty(longContractCommonInfoResDtoMap)) {
|
|
|
+ throw new RuntimeException("托运订单新建订单-并未有对应合同,应先签约合同");
|
|
|
+ }
|
|
|
+ if (longContractCommonInfoResDtoMap.get(Long.parseLong(addOrderDTO.getContractId())) == null) {
|
|
|
+ throw new RuntimeException("托运订单新建订单-并未有对应合同,应先签约合同");
|
|
|
+ }
|
|
|
+ ContractCommonInfoResDto infoResDto = longContractCommonInfoResDtoMap.get(Long.parseLong(addOrderDTO.getContractId()));
|
|
|
+ /**状态判断
|
|
|
+ * 是否是已签约合同
|
|
|
+ * */
|
|
|
+ // 0 已签约 1待签约
|
|
|
+ Integer status = infoResDto.getStatus();
|
|
|
+ Integer orderStatus = LogisticsOrderEnum.PENDING_ORDER.getCode();
|
|
|
+ if (NumberConstant.ONE == status) {
|
|
|
+ orderStatus = LogisticsOrderEnum.TO_BE_PLANNED.getCode();
|
|
|
+ } else if (NumberConstant.ZERO == status) {
|
|
|
+ orderStatus = LogisticsOrderEnum.PENDING_ORDER.getCode();
|
|
|
+ } else {
|
|
|
+ log.info("托运订单创建订单异常");
|
|
|
+ throw new RuntimeException("自建订单异常");
|
|
|
+ }
|
|
|
+ /**获取商品信息*/
|
|
|
+ KwpGoods goods = goodsInfoService.getGoodsById(Long.parseLong(addOrderDTO.getGoodsId()));
|
|
|
+ if (goods == null) {
|
|
|
+ log.info("自建订单获取商品信息失败 商品id:{},商品名称:{}", addOrderDTO.getGoodsId(), addOrderDTO.getGoodsName());
|
|
|
+ throw new BusinessException("商品信息获取失败");
|
|
|
+ }
|
|
|
+ saveConsignLogisticsOrder(addOrderDTO, lOrderId, orderStatus, lOrderNo);
|
|
|
+ saveConsignLogisticsOrderAddress(addOrderDTO, lOrderId);
|
|
|
+ saveConsignLogisticsOrderGoods(addOrderDTO, lOrderId, lOrderNo, goods);
|
|
|
+ saveConsignLogisticsOrderContract(addOrderDTO, lOrderId, status);
|
|
|
+ saveConsignLogisticsOrderTrack(lOrderId, orderStatus);
|
|
|
+ saveConsignLogisticsOrderUnit(addOrderDTO, lOrderId);
|
|
|
+ saveMongoDb(addOrderDTO, orderStatus, lOrderId, lOrderNo, infoResDto, goods);
|
|
|
+ return HttpResult.ok();
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 托运订单-页面新增订单-商品信息
|
|
|
+ *
|
|
|
+ * @param addOrderDTO 页面参数
|
|
|
+ * @param lOrderId 订单id
|
|
|
+ * @param lOrderNo 订单编号
|
|
|
+ */
|
|
|
+ private void saveConsignLogisticsOrderGoods(AddOrderDTO addOrderDTO, Long lOrderId, String lOrderNo, KwpGoods kwpGoods) {
|
|
|
+ KwtLogisticsOrderGoods goods = new KwtLogisticsOrderGoods();
|
|
|
+ goods.setId(new IdWorker(NumberConstant.ONE).nextId());
|
|
|
+ goods.setLOrderId(lOrderId);
|
|
|
+ goods.setLOrderNo(lOrderNo);
|
|
|
+ goods.setGoodsId(Long.parseLong(addOrderDTO.getGoodsId()));
|
|
|
+ goods.setGoodsName(kwpGoods.getName());
|
|
|
+ goods.setStatus(kwpGoods.getStatus());
|
|
|
+ goods.setCreateBy(LoginUserHolder.getUserId());
|
|
|
+ goods.setCreateTime(new Date());
|
|
|
+ goods.setUpdateBy(LoginUserHolder.getUserId());
|
|
|
+ goods.setUpdateTime(new Date());
|
|
|
+ logisticsOrderGoodsMapper.insert(goods);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 托运订单-页面新增订单-订单主体
|
|
|
+ *
|
|
|
+ * @param addOrderDTO 页面请求参数
|
|
|
+ * @param lOrderId 主体id
|
|
|
+ * @param orderStatus 订单状态
|
|
|
+ * @param lOrderNo 主体订单编号
|
|
|
+ */
|
|
|
+ private void saveConsignLogisticsOrder(AddOrderDTO addOrderDTO, Long lOrderId, Integer orderStatus, String lOrderNo) throws ParseException {
|
|
|
+ KwtLogisticsOrder order = new KwtLogisticsOrder();
|
|
|
+ order.setId(lOrderId);
|
|
|
+ order.setEntId(LoginUserHolder.getEntId());
|
|
|
+ order.setType(String.valueOf(NumberConstant.TWO));
|
|
|
+ order.setLOrderNo(lOrderNo);
|
|
|
+ order.setPids(lOrderId.toString());
|
|
|
+ order.setSettlementCycle(addOrderDTO.getSettlementCycle());
|
|
|
+ order.setBillingMode(addOrderDTO.getBillingMode());
|
|
|
+ order.setPrice(addOrderDTO.getPrice());
|
|
|
+ order.setPayment(addOrderDTO.getPayment());
|
|
|
+ order.setPriceType(addOrderDTO.getPriceType());
|
|
|
+ order.setAmount(addOrderDTO.getAmount());
|
|
|
+ order.setUnit(addOrderDTO.getAmountUnit());
|
|
|
+ order.setLoss(addOrderDTO.getLoss() == null ? null : addOrderDTO.getLoss());
|
|
|
+ order.setLossUnit(addOrderDTO.getLossUnit());
|
|
|
+ order.setGoodsPrice(addOrderDTO.getGoodsPrice() == null ? null : addOrderDTO.getGoodsPrice());
|
|
|
+ order.setGoodsPriceUnit(addOrderDTO.getGoodsPriceUnit());
|
|
|
+ order.setStartTime(org.apache.commons.lang3.StringUtils.isBlank(addOrderDTO.getStartTime()) ?
|
|
|
+ null : DateUtil.strToDate(StringTimeUtil.fillStart(addOrderDTO.getStartTime()), StringConstant.DEFAULT_DATE_PATTERN));
|
|
|
+ order.setEndTime(org.apache.commons.lang3.StringUtils.isBlank(addOrderDTO.getEndTime()) ?
|
|
|
+ null : DateUtil.strToDate(StringTimeUtil.fillStart(addOrderDTO.getEndTime()), StringConstant.DEFAULT_DATE_PATTERN));
|
|
|
+ BigDecimal decimal = new BigDecimal(NumberConstant.ZERO);
|
|
|
+ order.setSubcontractAmount(decimal);
|
|
|
+ order.setEntrustAmount(decimal);
|
|
|
+ order.setUnloadAmount(decimal);
|
|
|
+ order.setLoadAmount(decimal);
|
|
|
+ order.setIgnoreAmount(decimal);
|
|
|
+ order.setDeficitAmount(decimal);
|
|
|
+ order.setDeficitPrice(decimal);
|
|
|
+ order.setTaxRate(addOrderDTO.getTaxRate());
|
|
|
+ order.setRemark(addOrderDTO.getRemark());
|
|
|
+ order.setStatus(orderStatus);
|
|
|
+ order.setCreateBy(LoginUserHolder.getUserId());
|
|
|
+ order.setCreateTime(new Date());
|
|
|
+ order.setUpdateBy(LoginUserHolder.getUserId());
|
|
|
+ order.setUpdateTime(new Date());
|
|
|
+ kwtLogisticsOrderMapper.insert(order);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 托运订单-新建订单-地址信息保存
|
|
|
+ *
|
|
|
+ * @param addOrderDTO 页面请求参数
|
|
|
+ * @param lOrderId 主体id
|
|
|
+ */
|
|
|
+ private void saveConsignLogisticsOrderAddress(AddOrderDTO addOrderDTO, Long lOrderId) {
|
|
|
+ KwtLogisticsOrderAddress loadAddress = new KwtLogisticsOrderAddress();
|
|
|
+ loadAddress.setId(new IdWorker(NumberConstant.ONE).nextId());
|
|
|
+ loadAddress.setLOrderId(lOrderId);
|
|
|
+ loadAddress.setAddressType(NumberConstant.ONE);
|
|
|
+// loadAddress.setName();
|
|
|
+// loadAddress.setType();
|
|
|
+// loadAddress.setContacts();
|
|
|
+// loadAddress.setPhone();
|
|
|
+ loadAddress.setCityCode(addOrderDTO.getLoadCityCode());
|
|
|
+ loadAddress.setCityName(addOrderDTO.getLoadCityName());
|
|
|
+ loadAddress.setDetailAddress(addOrderDTO.getLoadDetailAddress());
|
|
|
+ loadAddress.setLat(addOrderDTO.getLoadLat());
|
|
|
+ loadAddress.setLng(addOrderDTO.getLoadLng());
|
|
|
+ loadAddress.setEntryType(NumberConstant.FOUR);
|
|
|
+ loadAddress.setStatus(NumberConstant.ZERO);
|
|
|
+ loadAddress.setCreateBy(LoginUserHolder.getUserId());
|
|
|
+ Date date = new Date();
|
|
|
+ loadAddress.setCreateTime(date);
|
|
|
+ loadAddress.setUpdateBy(LoginUserHolder.getUserId());
|
|
|
+ loadAddress.setUpdateTime(date);
|
|
|
+
|
|
|
+ KwtLogisticsOrderAddress unloadAddress = new KwtLogisticsOrderAddress();
|
|
|
+ unloadAddress.setId(new IdWorker(NumberConstant.TWO).nextId());
|
|
|
+ unloadAddress.setLOrderId(lOrderId);
|
|
|
+ unloadAddress.setAddressType(NumberConstant.TWO);
|
|
|
+// unloadAddress.setName();
|
|
|
+// unloadAddress.setType();
|
|
|
+// unloadAddress.setContacts();
|
|
|
+// unloadAddress.setPhone();
|
|
|
+ unloadAddress.setCityCode(addOrderDTO.getUnloadCityCode());
|
|
|
+ unloadAddress.setCityName(addOrderDTO.getUnloadCityName());
|
|
|
+ unloadAddress.setDetailAddress(addOrderDTO.getUnloadDetailAddress());
|
|
|
+ unloadAddress.setLat(addOrderDTO.getUnloadLat());
|
|
|
+ unloadAddress.setLng(addOrderDTO.getUnloadLng());
|
|
|
+ unloadAddress.setEntryType(NumberConstant.FOUR);
|
|
|
+ unloadAddress.setStatus(NumberConstant.ZERO);
|
|
|
+ unloadAddress.setCreateBy(LoginUserHolder.getUserId());
|
|
|
+ unloadAddress.setCreateTime(date);
|
|
|
+ unloadAddress.setUpdateBy(LoginUserHolder.getUserId());
|
|
|
+ unloadAddress.setUpdateTime(date);
|
|
|
+ kwtLogisticsOrderAddressMapper.insert(loadAddress);
|
|
|
+ kwtLogisticsOrderAddressMapper.insert(unloadAddress);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 托运订单-新建订单-合体主体
|
|
|
+ *
|
|
|
+ * @param addOrderDTO 页面请求参数
|
|
|
+ * @param lOrderId 主体id
|
|
|
+ * @param status 合同状态
|
|
|
+ */
|
|
|
+ private void saveConsignLogisticsOrderContract(AddOrderDTO addOrderDTO, Long lOrderId, Integer status) {
|
|
|
+ //托运
|
|
|
+ KwtLogisticsOrderContract consignContract = new KwtLogisticsOrderContract();
|
|
|
+ consignContract.setId(new IdWorker(NumberConstant.ONE).nextId());
|
|
|
+ consignContract.setContractId(Long.parseLong(addOrderDTO.getContractId()));
|
|
|
+ consignContract.setLOrderId(lOrderId);
|
|
|
+ consignContract.setStatus(status);
|
|
|
+ consignContract.setCreateBy(LoginUserHolder.getUserId());
|
|
|
+ consignContract.setCreateTime(new Date());
|
|
|
+ consignContract.setUpdateBy(LoginUserHolder.getUserId());
|
|
|
+ consignContract.setUpdateTime(new Date());
|
|
|
+ logisticsOrderContractMapper.insert(consignContract);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 托运订单-页面新增订单-订单状态
|
|
|
+ *
|
|
|
+ * @param lOrderId 主体id
|
|
|
+ * @param orderStatus 主体单据状态
|
|
|
+ */
|
|
|
+ private void saveConsignLogisticsOrderTrack(Long lOrderId, Integer orderStatus) {
|
|
|
+ KwtLogisticsOrderTrack track = new KwtLogisticsOrderTrack();
|
|
|
+ track.setId(new IdWorker(NumberConstant.ONE).nextId());
|
|
|
+ track.setLOrderId(lOrderId);
|
|
|
+ track.setStatus(orderStatus);
|
|
|
+ track.setCreateBy(LoginUserHolder.getUserId());
|
|
|
+ track.setCreateTime(new Date());
|
|
|
+ track.setUpdateBy(LoginUserHolder.getUserId());
|
|
|
+ track.setUpdateTime(new Date());
|
|
|
+ kwtLogisticsOrderTrackMapper.insert(track);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 托运订单-页面新增订单-订单对应企业单位
|
|
|
+ *
|
|
|
+ * @param addOrderDTO 页面请求参数
|
|
|
+ * @param lOrderId 主体id
|
|
|
+ */
|
|
|
+ private void saveConsignLogisticsOrderUnit(AddOrderDTO addOrderDTO, Long lOrderId) {
|
|
|
+ //托运
|
|
|
+ KwtLogisticsOrderUnit consignUnit = new KwtLogisticsOrderUnit();
|
|
|
+ consignUnit.setId(new IdWorker(NumberConstant.ONE).nextId());
|
|
|
+ consignUnit.setLOrderId(lOrderId);
|
|
|
+ consignUnit.setUnitType(NumberConstant.ONE);
|
|
|
+ consignUnit.setEntId(Long.parseLong(addOrderDTO.getConsignCompanyId()));
|
|
|
+ consignUnit.setFirmName(addOrderDTO.getConsignCompany());
|
|
|
+ consignUnit.setContacts(addOrderDTO.getConsignContacts());
|
|
|
+ consignUnit.setPhone(addOrderDTO.getConsignContactPhone());
|
|
|
+ consignUnit.setRemark(addOrderDTO.getRemark());
|
|
|
+ consignUnit.setStatus(NumberConstant.ZERO);
|
|
|
+ consignUnit.setCreateBy(LoginUserHolder.getUserId());
|
|
|
+ consignUnit.setCreateTime(new Date());
|
|
|
+ consignUnit.setUpdateBy(LoginUserHolder.getUserId());
|
|
|
+ consignUnit.setUpdateTime(new Date());
|
|
|
+ //承运
|
|
|
+ KwtLogisticsOrderUnit unit = new KwtLogisticsOrderUnit();
|
|
|
+ unit.setId(new IdWorker(NumberConstant.TWO).nextId());
|
|
|
+ unit.setLOrderId(lOrderId);
|
|
|
+ unit.setUnitType(NumberConstant.TWO);
|
|
|
+ unit.setEntId(Long.parseLong(addOrderDTO.getAcceptCompanyId()));
|
|
|
+ unit.setFirmName(addOrderDTO.getAcceptCompany());
|
|
|
+ unit.setContacts(addOrderDTO.getAcceptContacts());
|
|
|
+ unit.setPhone(addOrderDTO.getAcceptContactPhone());
|
|
|
+ unit.setRemark(addOrderDTO.getRemark());
|
|
|
+ unit.setStatus(NumberConstant.ZERO);
|
|
|
+ unit.setCreateBy(LoginUserHolder.getUserId());
|
|
|
+ unit.setCreateTime(new Date());
|
|
|
+ unit.setUpdateBy(LoginUserHolder.getUserId());
|
|
|
+ unit.setUpdateTime(new Date());
|
|
|
+ kwtLogisticsOrderUnitMapper.insert(consignUnit);
|
|
|
+ kwtLogisticsOrderUnitMapper.insert(unit);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 托运订单-新建订单-保存mongodb
|
|
|
+ *
|
|
|
+ * @param addOrderDTO 页面请求参数
|
|
|
+ * @param orderStatus 主体单据状态
|
|
|
+ * @param lOrderId 主体订单id
|
|
|
+ * @param lOrderNo 主体订单编号
|
|
|
+ * @param infoResDto 合同信息
|
|
|
+ * @param goods 商品信息
|
|
|
+ */
|
|
|
+ private void saveMongoDb(AddOrderDTO addOrderDTO, Integer orderStatus, Long lOrderId, String lOrderNo, ContractCommonInfoResDto infoResDto, KwpGoods goods) {
|
|
|
+ SckwLogisticsOrder order = new SckwLogisticsOrder();
|
|
|
+ order.set_id(lOrderId);
|
|
|
+ order.setLOrderId(lOrderId);
|
|
|
+ order.setLOrderNo(lOrderNo);
|
|
|
+ order.setLOrderPid(null);
|
|
|
+ order.setLOrderPids(String.valueOf(lOrderId));
|
|
|
+ order.setType(NumberConstant.TWO);
|
|
|
+ order.setSettlementCycle(addOrderDTO.getSettlementCycle());
|
|
|
+ order.setPrice(addOrderDTO.getPrice());
|
|
|
+ order.setPriceType(order.getPriceType());
|
|
|
+ order.setAmount(addOrderDTO.getAmount());
|
|
|
+ order.setUnit(addOrderDTO.getAmountUnit());
|
|
|
+ order.setLoss(addOrderDTO.getLoss());
|
|
|
+ order.setLossUnit(addOrderDTO.getLossUnit());
|
|
|
+ order.setGoodsPrice(addOrderDTO.getGoodsPrice() == null ? null : addOrderDTO.getGoodsPrice());
|
|
|
+ order.setGoodsPriceUnit(addOrderDTO.getGoodsPriceUnit());
|
|
|
+ BigDecimal decimal = new BigDecimal(NumberConstant.ZERO);
|
|
|
+ order.setSubcontractAmount(decimal);
|
|
|
+ order.setEntrustAmount(decimal);
|
|
|
+ order.setUnloadAmount(decimal);
|
|
|
+ order.setLoadAmount(decimal);
|
|
|
+ order.setIgnoreAmount(decimal);
|
|
|
+ order.setDeficitAmount(decimal);
|
|
|
+ order.setDeficitPrice(decimal);
|
|
|
+ order.setPayment(addOrderDTO.getPayment());
|
|
|
+ order.setTaxRate(addOrderDTO.getTaxRate());
|
|
|
+ order.setRemark(addOrderDTO.getRemark());
|
|
|
+ order.setStatus(String.valueOf(orderStatus));
|
|
|
+ order.setEntId(LoginUserHolder.getEntId());
|
|
|
+ order.setFirmName(LoginUserHolder.getEntName());
|
|
|
+ order.setGoodsId(Long.parseLong(addOrderDTO.getGoodsId()));
|
|
|
+ order.setGoodsCode(goods == null ? null : goods.getCode());
|
|
|
+ order.setGoodsName(goods == null ? null : goods.getName());
|
|
|
+ order.setGoodsType(goods == null ? null : goods.getGoodsType());
|
|
|
+// order.setGoodsIndustry(goods == null ? null : goods.get);
|
|
|
+ order.setGoodsSpec(goods == null ? null : goods.getSpec());
|
|
|
+ order.setContractId(addOrderDTO.getContractId());
|
|
|
+ order.setContractNo(infoResDto.getContractCode());
|
|
|
+ order.setContractName(infoResDto.getContactName());
|
|
|
+ order.setContractSigningWay(String.valueOf(infoResDto.getSigningWay()));
|
|
|
+ order.setCheckEntId(Long.parseLong(addOrderDTO.getConsignCompanyId()));
|
|
|
+ order.setCheckFirmName(addOrderDTO.getConsignCompany());
|
|
|
+ order.setCheckContacts(addOrderDTO.getConsignContacts());
|
|
|
+ order.setCheckPhone(addOrderDTO.getConsignContactPhone());
|
|
|
+ order.setCarrierEntId(Long.parseLong(addOrderDTO.getAcceptCompanyId()));
|
|
|
+ order.setCarrierFirmName(addOrderDTO.getAcceptCompany());
|
|
|
+ order.setCarrierContacts(addOrderDTO.getAcceptContacts());
|
|
|
+ order.setCarrierPhone(addOrderDTO.getAcceptContactPhone());
|
|
|
+// order.setLoadType();
|
|
|
+// order.setLoadContacts();
|
|
|
+// order.setLoadPhone();
|
|
|
+// order.setLoadCityCode();
|
|
|
+// order.setLoadCityName();
|
|
|
+// order.setLoadDetailAddress();
|
|
|
+// order.setLoadLat();
|
|
|
+// order.setLoadLng();
|
|
|
+// order.setUnloadType();
|
|
|
+// order.setUnloadContacts();
|
|
|
+// order.setUnloadPhone();
|
|
|
+// order.setUnloadCityCode();
|
|
|
+// order.setUnloadCityName();
|
|
|
+// order.setUnloadDetailAddress();
|
|
|
+// order.setUnloadLat();
|
|
|
+// order.setUnloadLng();
|
|
|
+ order.setCreateBy(LoginUserHolder.getUserId());
|
|
|
+ order.setCreateByName(LoginUserHolder.getUserName());
|
|
|
+ order.setCreateTime(new Date());
|
|
|
+ order.setUpdateBy(LoginUserHolder.getUserId());
|
|
|
+ order.setUpdateByName(LoginUserHolder.getUserName());
|
|
|
+ order.setUpdateTime(new Date());
|
|
|
+ order.setWOrderNo(lOrderNo);
|
|
|
+ order.setCarryingCapacity(addOrderDTO.getAmount().longValue());
|
|
|
+ order.setBillingMode(addOrderDTO.getBillingMode());
|
|
|
+ SckwBusSum busSum = new SckwBusSum();
|
|
|
+ busSum.setBusSumType(BusinessTypeEnum.LOGISTICS_ORDER_TYPE.getName());
|
|
|
+ busSum.setMethod(NumberConstant.ONE);
|
|
|
+ busSum.setObject(order);
|
|
|
+ streamBridge.send("sckw-busSum", com.alibaba.fastjson2.JSON.toJSONString(busSum));
|
|
|
+ }
|
|
|
}
|