oms发单
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.mhd.oms.domain.resevationOrder.entity;
|
package com.mhd.oms.domain.reservationOrder.entity;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
+96
@@ -0,0 +1,96 @@
|
|||||||
|
package com.mhd.oms.domain.reservationOrder.entity;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: brb
|
||||||
|
* @description:
|
||||||
|
* @create: 2026-01-28 16:34
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ReservationCargoInfo {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "ID")
|
||||||
|
private String id;
|
||||||
|
@ApiModelProperty(value = "组织表ID")
|
||||||
|
private Long organizationId;
|
||||||
|
@ApiModelProperty(value = "组织名称")
|
||||||
|
private String organizationName;
|
||||||
|
@ApiModelProperty(value = "一级组织表ID")
|
||||||
|
private Long topOrganizationId;
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
@ApiModelProperty(value = "创建人用户ID")
|
||||||
|
private Long createBy;
|
||||||
|
@ApiModelProperty(value = "创建人姓名")
|
||||||
|
private String createByName;
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private Date updateTime;
|
||||||
|
// @ApiModelProperty(value = "修改人用户ID")
|
||||||
|
// private Long updateBy;
|
||||||
|
@ApiModelProperty(value = "修改人姓名")
|
||||||
|
private String updateByName;
|
||||||
|
@ApiModelProperty(value = "删除标记:0-无状态,1-正常,2-已删除")
|
||||||
|
private Integer delFlag;
|
||||||
|
@ApiModelProperty(value = "货单号")
|
||||||
|
private String orderId;
|
||||||
|
@ApiModelProperty(value = "货物类型ID")
|
||||||
|
private String goodsTypeId;
|
||||||
|
@ApiModelProperty(value = "货物类型")
|
||||||
|
private String goodsType;
|
||||||
|
@ApiModelProperty(value = "货物名称ID")
|
||||||
|
private String goodsNameId;
|
||||||
|
@ApiModelProperty(value = "货物名称")
|
||||||
|
private String goodsName;
|
||||||
|
@ApiModelProperty(value = "货物数量")
|
||||||
|
private BigDecimal cargoNum;
|
||||||
|
@ApiModelProperty(value = "货物重量")
|
||||||
|
private BigDecimal cargoWeight;
|
||||||
|
|
||||||
|
@ApiModelProperty("体积")
|
||||||
|
private BigDecimal cargoVolume;
|
||||||
|
|
||||||
|
@ApiModelProperty("内容")
|
||||||
|
private String cargoContent;
|
||||||
|
@ApiModelProperty(value = "重量单位ID")
|
||||||
|
private String weightUnitId;
|
||||||
|
@ApiModelProperty(value = "重量单位名称")
|
||||||
|
private String weightUnit;
|
||||||
|
@ApiModelProperty(value = "数量单位ID")
|
||||||
|
private String quantityUnitId;
|
||||||
|
@ApiModelProperty(value = "数量单位名称")
|
||||||
|
private String quantityUnit;
|
||||||
|
|
||||||
|
@ApiModelProperty("货物名称")
|
||||||
|
private String cargoName;
|
||||||
|
|
||||||
|
@ApiModelProperty("货物单位ID")
|
||||||
|
private String cargoUnitId;
|
||||||
|
|
||||||
|
@ApiModelProperty("货物单位名字")
|
||||||
|
private String cargoUnitName;
|
||||||
|
|
||||||
|
@ApiModelProperty("整机表编号")
|
||||||
|
private String machineCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否为库存")
|
||||||
|
private boolean stockFlag;
|
||||||
|
|
||||||
|
@ApiModelProperty("货物重量 罐车运输专有字段")
|
||||||
|
private BigDecimal cargoTonnage;
|
||||||
|
|
||||||
|
@ApiModelProperty("价格")
|
||||||
|
private BigDecimal unitPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty("货物类型标识:STOCK-库存,MATERIAL-物料,MANUAL-手动输入")
|
||||||
|
private String cargoType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "删除标记:0-无状态,1-正常,2-已删除")
|
||||||
|
private Integer inventoryStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty("货物备注")
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.mhd.oms.domain.resevationOrder.entity;
|
package com.mhd.oms.domain.reservationOrder.entity;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
+3
-3
@@ -1,4 +1,4 @@
|
|||||||
package com.mhd.oms.domain.resevationOrder.entity;
|
package com.mhd.oms.domain.reservationOrder.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
@@ -21,8 +21,8 @@ import java.math.BigDecimal;
|
|||||||
public class ReservationOrder {
|
public class ReservationOrder {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@TableId(type = IdType.ID_WORKER_STR)
|
@TableId(type = IdType.AUTO)
|
||||||
private java.lang.String id;
|
private Long id;
|
||||||
@ApiModelProperty(value = "创建人")
|
@ApiModelProperty(value = "创建人")
|
||||||
@Excel(name = "创建人", width = 15)
|
@Excel(name = "创建人", width = 15)
|
||||||
private java.lang.String createBy;
|
private java.lang.String createBy;
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
package com.mhd.oms.domain.resevationOrder.repository.facade;
|
package com.mhd.oms.domain.reservationOrder.repository.facade;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.mhd.oms.domain.resevationOrder.entity.ReservationOrder;
|
import com.mhd.oms.domain.reservationOrder.entity.ReservationOrder;
|
||||||
import com.mhd.oms.interfaces.dto.resevationOrder.OmsOrderAddDTO;
|
import com.mhd.oms.interfaces.dto.resevationOrder.OmsOrderAddDTO;
|
||||||
|
|
||||||
import java.security.InvalidKeyException;
|
import java.security.InvalidKeyException;
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
package com.mhd.oms.domain.reservationOrder.repository.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.mhd.oms.domain.reservationOrder.entity.ReservationAddressMulti;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ReservationAddressMultiMapper extends BaseMapper<ReservationAddressMulti> {
|
||||||
|
void insertBatch(@Param("list") List<ReservationAddressMulti> addressMultiList);
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
package com.mhd.oms.domain.reservationOrder.repository.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.mhd.oms.domain.reservationOrder.entity.ReservationCargoInfo;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ReservationCargoInfoMapper extends BaseMapper<ReservationCargoInfo> {
|
||||||
|
void insertBatch(@Param("list") List<ReservationCargoInfo> reservationCargoInfoList);
|
||||||
|
}
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
package com.mhd.oms.domain.resevationOrder.repository.mapper;
|
package com.mhd.oms.domain.reservationOrder.repository.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.mhd.oms.domain.resevationOrder.entity.ReservationOrder;
|
import com.mhd.oms.domain.reservationOrder.entity.ReservationOrder;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
+4
@@ -0,0 +1,4 @@
|
|||||||
|
package com.mhd.oms.domain.reservationOrder.repository.mapper;
|
||||||
|
|
||||||
|
public interface SysDepartInterfaceInfoMapper {
|
||||||
|
}
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.mhd.oms.domain.resevationOrder.repository.mapper;
|
package com.mhd.oms.domain.reservationOrder.repository.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.mhd.oms.interfaces.dto.resevationOrder.OmsOrderAccount;
|
import com.mhd.oms.interfaces.dto.resevationOrder.OmsOrderAccount;
|
||||||
+1
-8
@@ -1,16 +1,9 @@
|
|||||||
package com.mhd.oms.domain.resevationOrder.repository.po;
|
package com.mhd.oms.domain.reservationOrder.repository.po;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import com.mhd.common.core.annotation.Excel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数字物流系统配置同步表
|
* 数字物流系统配置同步表
|
||||||
+70
-74
@@ -1,4 +1,4 @@
|
|||||||
package com.mhd.oms.domain.resevationOrder.service;
|
package com.mhd.oms.domain.reservationOrder.service;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
@@ -10,32 +10,24 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
||||||
import com.linke.transport.domain.warehouse.inventory.model.Inventory;
|
|
||||||
import com.linke.transport.interfaces.dto.warehouse.inBoundOrder.InboundOrderDTO;
|
import com.linke.transport.interfaces.dto.warehouse.inBoundOrder.InboundOrderDTO;
|
||||||
import com.mhd.common.core.domain.entity.R;
|
import com.mhd.common.core.domain.entity.R;
|
||||||
import com.mhd.common.core.domain.entity.SysConfigSwitch;
|
import com.mhd.oms.domain.reservationOrder.entity.ReservationAddressMulti;
|
||||||
import com.mhd.common.core.domain.dto.wlhy.TmsShipper;
|
import com.mhd.oms.domain.reservationOrder.entity.ReservationCargoInfo;
|
||||||
import com.mhd.common.core.domain.entity.TmsOrder;
|
import com.mhd.oms.domain.reservationOrder.entity.ReservationOrder;
|
||||||
import com.mhd.common.core.domain.po.SysMultistageDictPo;
|
|
||||||
import com.mhd.oms.domain.resevationOrder.entity.ReservationOrder;
|
|
||||||
import com.mhd.common.core.domain.po.thirdparty.SysDepartInterfaceInfoPo;
|
import com.mhd.common.core.domain.po.thirdparty.SysDepartInterfaceInfoPo;
|
||||||
import com.mhd.common.core.domain.thirdparty.SysDepartInterfaceInfoDTO;
|
import com.mhd.common.core.domain.thirdparty.SysDepartInterfaceInfoDTO;
|
||||||
import com.mhd.common.core.utils.AddressUtils;
|
|
||||||
import com.mhd.common.security.utils.SecurityUtils;
|
import com.mhd.common.security.utils.SecurityUtils;
|
||||||
import com.mhd.oms.domain.resevationOrder.repository.facade.IOmsAddressMultiService;
|
import com.mhd.oms.domain.reservationOrder.repository.facade.IOmsAddressMultiService;
|
||||||
import com.mhd.oms.domain.resevationOrder.repository.mapper.*;
|
import com.mhd.oms.domain.reservationOrder.repository.mapper.*;
|
||||||
import com.mhd.oms.enums.*;
|
import com.mhd.oms.enums.*;
|
||||||
import com.mhd.oms.infrastructure.feign.ThirdPartyServiceFeign;
|
import com.mhd.oms.infrastructure.feign.ThirdPartyServiceFeign;
|
||||||
import com.mhd.oms.infrastructure.feign.TransportServiceFeign;
|
import com.mhd.oms.infrastructure.feign.TransportServiceFeign;
|
||||||
import com.mhd.oms.interfaces.dto.resevationOrder.*;
|
import com.mhd.oms.interfaces.dto.resevationOrder.*;
|
||||||
import com.mhd.oms.util.DictDataUtils;
|
import com.mhd.oms.util.DictDataUtils;
|
||||||
import com.mhd.oms.util.MultistageDictUtils;
|
|
||||||
import com.mhd.oms.util.OrderSequence;
|
import com.mhd.oms.util.OrderSequence;
|
||||||
import com.mhd.system.api.domain.*;
|
import com.mhd.system.api.domain.*;
|
||||||
import com.mhd.system.api.model.LoginUser;
|
import com.mhd.system.api.model.LoginUser;
|
||||||
import com.mhd.oms.domain.resevationOrder.service.TmsOrderService;
|
|
||||||
import com.mhd.common.core.domain.thirdparty.AmapDTO;
|
|
||||||
import com.mhd.system.api.UserServiceFeign;
|
import com.mhd.system.api.UserServiceFeign;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.mhd.common.core.web.domain.AjaxResult;
|
import com.mhd.common.core.web.domain.AjaxResult;
|
||||||
@@ -43,7 +35,6 @@ import com.mhd.common.core.domain.po.UserPo;
|
|||||||
import com.mhd.user.domain.userAggregate.repository.po.UserShipperPo;
|
import com.mhd.user.domain.userAggregate.repository.po.UserShipperPo;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
@@ -55,7 +46,6 @@ import java.security.NoSuchAlgorithmException;
|
|||||||
import java.security.SignatureException;
|
import java.security.SignatureException;
|
||||||
import java.security.spec.InvalidKeySpecException;
|
import java.security.spec.InvalidKeySpecException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.Calendar;
|
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -95,6 +85,12 @@ public class OmsAddressMultiService implements IOmsAddressMultiService {
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private TmsOrderService tmsOrderServiceImpl;
|
private TmsOrderService tmsOrderServiceImpl;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ReservationCargoInfoMapper reservationCargoInfoMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ReservationAddressMultiMapper reservationAddressMultiMapper;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -577,7 +573,7 @@ public class OmsAddressMultiService implements IOmsAddressMultiService {
|
|||||||
if (ObjectUtil.isNotNull(tmsOrderAccountList) && tmsOrderAccountList.size() > 0) {
|
if (ObjectUtil.isNotNull(tmsOrderAccountList) && tmsOrderAccountList.size() > 0) {
|
||||||
for (OmsOrderAccount tmsOrderAccount : tmsOrderAccountList) {
|
for (OmsOrderAccount tmsOrderAccount : tmsOrderAccountList) {
|
||||||
tmsOrderAccount.setIsDelete(0);
|
tmsOrderAccount.setIsDelete(0);
|
||||||
tmsOrderAccount.setOrderId(resevationOrder.getId());
|
tmsOrderAccount.setOrderId(String.valueOf(resevationOrder.getId()));
|
||||||
tmsOrderAccount.setCreateBy(String.valueOf(userPo.getUserId()));
|
tmsOrderAccount.setCreateBy(String.valueOf(userPo.getUserId()));
|
||||||
tmsOrderAccount.setCreateTime(new Date());
|
tmsOrderAccount.setCreateTime(new Date());
|
||||||
// 设置组织信息
|
// 设置组织信息
|
||||||
@@ -611,9 +607,9 @@ public class OmsAddressMultiService implements IOmsAddressMultiService {
|
|||||||
}
|
}
|
||||||
//保存货物信息及地址信息
|
//保存货物信息及地址信息
|
||||||
|
|
||||||
// saveAddress2CargoInfo(resevationOrder.getId(), allCargoList, loadingAddressList, unloadAddressList);
|
saveAddress2CargoInfo(String.valueOf(resevationOrder.getId()), allCargoList, loadingAddressList, unloadAddressList);
|
||||||
|
|
||||||
tmsOrderAddDTO.setId(resevationOrder.getId());
|
tmsOrderAddDTO.setId(String.valueOf(resevationOrder.getId()));
|
||||||
// log.info("tmsOrderAddDTO.getId()==="+tmsOrderAddDTO.getId());
|
// log.info("tmsOrderAddDTO.getId()==="+tmsOrderAddDTO.getId());
|
||||||
// getBaseInfo("wxaInfo", "A03");
|
// getBaseInfo("wxaInfo", "A03");
|
||||||
// //批量货生成货源小程序二维码
|
// //批量货生成货源小程序二维码
|
||||||
@@ -1064,61 +1060,61 @@ public class OmsAddressMultiService implements IOmsAddressMultiService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// private void saveAddress2CargoInfo(String id, List<OmsCargoInfoDTO> cargoInfoList, List<OmsAddressMultiDTO> loadingAddressList, List<OmsAddressMultiDTO> unloadAddressList) {
|
private void saveAddress2CargoInfo(String id, List<OmsCargoInfoDTO> cargoInfoList, List<OmsAddressMultiDTO> loadingAddressList, List<OmsAddressMultiDTO> unloadAddressList) {
|
||||||
//
|
|
||||||
// //根据ID先删除货物、装卸货信息
|
//根据ID先删除货物、装卸货信息
|
||||||
// Snowflake snowflake = IdUtil.createSnowflake(1, 1);
|
Snowflake snowflake = IdUtil.createSnowflake(1, 1);
|
||||||
// if (ObjectUtil.isNotEmpty(cargoInfoList)&&cargoInfoList.size()>0) {
|
if (ObjectUtil.isNotEmpty(cargoInfoList)&&cargoInfoList.size()>0) {
|
||||||
// OmsCargoInfoDTO tmsCargoInfoDTO1 = cargoInfoList.get(0);
|
OmsCargoInfoDTO tmsCargoInfoDTO1 = cargoInfoList.get(0);
|
||||||
// String goodsTypeId = tmsCargoInfoDTO1.getGoodsTypeId();
|
String goodsTypeId = tmsCargoInfoDTO1.getGoodsTypeId();
|
||||||
// if (ObjectUtil.isNotEmpty(goodsTypeId)) {
|
if (ObjectUtil.isNotEmpty(goodsTypeId)) {
|
||||||
// tmsCargoInfoMapper.delete(new LambdaQueryWrapper<TmsCargoInfo>().eq(TmsCargoInfo::getOrderId, id));
|
reservationCargoInfoMapper.delete(new LambdaQueryWrapper<ReservationCargoInfo>().eq(ReservationCargoInfo::getOrderId, id));
|
||||||
// List<OmsCargoInfo> tmsCargoInfoList = new ArrayList<>();
|
List<ReservationCargoInfo> tmsCargoInfoList = new ArrayList<>();
|
||||||
// for (OmsCargoInfoDTO tmsCargoInfoDTO : cargoInfoList) {
|
for (OmsCargoInfoDTO tmsCargoInfoDTO : cargoInfoList) {
|
||||||
// OmsCargoInfo tmsCargoInfo = new TmsCargoInfo();
|
ReservationCargoInfo tmsCargoInfo = new ReservationCargoInfo();
|
||||||
// BeanUtils.copyProperties(tmsCargoInfoDTO, tmsCargoInfo);
|
BeanUtils.copyProperties(tmsCargoInfoDTO, tmsCargoInfo);
|
||||||
// log.info("<UNK>{}", tmsCargoInfo);
|
log.info("<UNK>{}", tmsCargoInfo);
|
||||||
// tmsCargoInfo.setId(snowflake.nextIdStr());
|
tmsCargoInfo.setId(snowflake.nextIdStr());
|
||||||
// tmsCargoInfo.setCreateTime(new Date());
|
tmsCargoInfo.setCreateTime(new Date());
|
||||||
// tmsCargoInfo.setUpdateTime(new Date());
|
tmsCargoInfo.setUpdateTime(new Date());
|
||||||
// tmsCargoInfo.setOrderId(id);
|
tmsCargoInfo.setOrderId(id);
|
||||||
// tmsCargoInfo.setCargoWeight(tmsCargoInfoDTO.getWeight()==null ? BigDecimal.ZERO: tmsCargoInfoDTO.getWeight());
|
tmsCargoInfo.setCargoWeight(tmsCargoInfoDTO.getWeight()==null ? BigDecimal.ZERO: tmsCargoInfoDTO.getWeight());
|
||||||
// tmsCargoInfo.setCargoVolume(tmsCargoInfoDTO.getMaterialVolume()==null ? BigDecimal.ZERO: tmsCargoInfoDTO.getMaterialVolume());
|
tmsCargoInfo.setCargoVolume(tmsCargoInfoDTO.getMaterialVolume()==null ? BigDecimal.ZERO: tmsCargoInfoDTO.getMaterialVolume());
|
||||||
// tmsCargoInfo.setCargoContent(tmsCargoInfoDTO.getMaterialContent());
|
tmsCargoInfo.setCargoContent(tmsCargoInfoDTO.getMaterialContent());
|
||||||
// tmsCargoInfo.setCargoNum(tmsCargoInfoDTO.getCargoNum()==null ? BigDecimal.ZERO: tmsCargoInfoDTO.getCargoNum());
|
tmsCargoInfo.setCargoNum(tmsCargoInfoDTO.getCargoNum()==null ? BigDecimal.ZERO: tmsCargoInfoDTO.getCargoNum());
|
||||||
// tmsCargoInfo.setRemark(tmsCargoInfoDTO.getRemark());
|
tmsCargoInfo.setRemark(tmsCargoInfoDTO.getRemark());
|
||||||
// tmsCargoInfoList.add(tmsCargoInfo);
|
tmsCargoInfoList.add(tmsCargoInfo);
|
||||||
// }
|
}
|
||||||
// tmsCargoInfoMapper.insertBatch(tmsCargoInfoList);
|
reservationCargoInfoMapper.insertBatch(tmsCargoInfoList);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// tmsAddressMultiMapper.delete(new LambdaQueryWrapper<TmsAddressMulti>().eq(TmsAddressMulti::getOrderId, id));
|
reservationAddressMultiMapper.delete(new LambdaQueryWrapper<ReservationAddressMulti>().eq(ReservationAddressMulti::getOrderId, id));
|
||||||
// List<TmsAddressMulti> addressMultiList = new ArrayList<>();
|
List<ReservationAddressMulti> addressMultiList = new ArrayList<>();
|
||||||
// for (TmsAddressMultiDTO addressMultiDTO : loadingAddressList) {
|
for (OmsAddressMultiDTO addressMultiDTO : loadingAddressList) {
|
||||||
// TmsAddressMulti tmsAddressMulti = new TmsAddressMulti();
|
ReservationAddressMulti tmsAddressMulti = new ReservationAddressMulti();
|
||||||
// BeanUtils.copyProperties(addressMultiDTO, tmsAddressMulti);
|
BeanUtils.copyProperties(addressMultiDTO, tmsAddressMulti);
|
||||||
// tmsAddressMulti.setId(snowflake.nextIdStr());
|
tmsAddressMulti.setId(snowflake.nextIdStr());
|
||||||
// tmsAddressMulti.setCreateTime(new Date());
|
tmsAddressMulti.setCreateTime(new Date());
|
||||||
// tmsAddressMulti.setUpdateTime(new Date());
|
tmsAddressMulti.setUpdateTime(new Date());
|
||||||
// tmsAddressMulti.setOrderId(id);
|
tmsAddressMulti.setOrderId(id);
|
||||||
// tmsAddressMulti.setLayType(1);
|
tmsAddressMulti.setLayType(1);
|
||||||
// tmsAddressMulti.setSort(addressMultiDTO.getSort());
|
tmsAddressMulti.setSort(addressMultiDTO.getSort());
|
||||||
// tmsAddressMulti.setShortName(tmsAddressMulti.getAreaName());
|
tmsAddressMulti.setShortName(tmsAddressMulti.getAreaName());
|
||||||
// addressMultiList.add(tmsAddressMulti);
|
addressMultiList.add(tmsAddressMulti);
|
||||||
// }
|
}
|
||||||
// for (TmsAddressMultiDTO addressMultiDTO : unloadAddressList) {
|
for (OmsAddressMultiDTO addressMultiDTO : unloadAddressList) {
|
||||||
// TmsAddressMulti tmsAddressMulti = new TmsAddressMulti();
|
ReservationAddressMulti tmsAddressMulti = new ReservationAddressMulti();
|
||||||
// BeanUtils.copyProperties(addressMultiDTO, tmsAddressMulti);
|
BeanUtils.copyProperties(addressMultiDTO, tmsAddressMulti);
|
||||||
// tmsAddressMulti.setId(snowflake.nextIdStr());
|
tmsAddressMulti.setId(snowflake.nextIdStr());
|
||||||
// tmsAddressMulti.setCreateTime(new Date());
|
tmsAddressMulti.setCreateTime(new Date());
|
||||||
// tmsAddressMulti.setUpdateTime(new Date());
|
tmsAddressMulti.setUpdateTime(new Date());
|
||||||
// tmsAddressMulti.setOrderId(id);
|
tmsAddressMulti.setOrderId(id);
|
||||||
// tmsAddressMulti.setShortName(tmsAddressMulti.getAreaName());
|
tmsAddressMulti.setShortName(tmsAddressMulti.getAreaName());
|
||||||
// addressMultiList.add(tmsAddressMulti);
|
addressMultiList.add(tmsAddressMulti);
|
||||||
// }
|
}
|
||||||
// tmsAddressMultiMapper.insertBatch(addressMultiList);
|
reservationAddressMultiMapper.insertBatch(addressMultiList);
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
|
||||||
// public void getBaseInfo(String interfaceType,String sysOrgCode) {
|
// public void getBaseInfo(String interfaceType,String sysOrgCode) {
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.mhd.oms.domain.resevationOrder.service;
|
package com.mhd.oms.domain.reservationOrder.service;
|
||||||
|
|
||||||
import com.mhd.common.core.domain.entity.SysConfigSwitch;
|
import com.mhd.common.core.domain.entity.SysConfigSwitch;
|
||||||
|
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.mhd.oms.domain.resevationOrder.service;
|
package com.mhd.oms.domain.reservationOrder.service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: TMS订单服务接口
|
* @Description: TMS订单服务接口
|
||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
package com.mhd.oms.domain.resevationOrder.service.impl;
|
package com.mhd.oms.domain.reservationOrder.service.impl;
|
||||||
|
|
||||||
import com.mhd.oms.domain.resevationOrder.service.TmsOrderService;
|
import com.mhd.oms.domain.reservationOrder.service.TmsOrderService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
+1
-1
@@ -4,7 +4,7 @@ import com.aliyun.oss.ServiceException;
|
|||||||
import com.mhd.common.core.utils.sms.CommonConstant;
|
import com.mhd.common.core.utils.sms.CommonConstant;
|
||||||
import com.mhd.common.core.utils.sms.Result;
|
import com.mhd.common.core.utils.sms.Result;
|
||||||
import com.mhd.common.security.utils.SecurityUtils;
|
import com.mhd.common.security.utils.SecurityUtils;
|
||||||
import com.mhd.oms.domain.resevationOrder.repository.facade.IOmsAddressMultiService;
|
import com.mhd.oms.domain.reservationOrder.repository.facade.IOmsAddressMultiService;
|
||||||
import com.mhd.oms.interfaces.dto.resevationOrder.OmsOrderAddDTO;
|
import com.mhd.oms.interfaces.dto.resevationOrder.OmsOrderAddDTO;
|
||||||
import com.mhd.system.api.domain.TmsTransportNote;
|
import com.mhd.system.api.domain.TmsTransportNote;
|
||||||
import com.mhd.system.api.model.LoginUser;
|
import com.mhd.system.api.model.LoginUser;
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.mhd.oms.domain.reservationOrder.repository.mapper.ReservationAddressMultiMapper">
|
||||||
|
<insert id="insertBatch">
|
||||||
|
insert into reservation_address_multi
|
||||||
|
( id,order_id , area_code , area_name , address , longitude , latitude , contact_name , contact_phone, lay_date, lay_time, lay_time_id, lay_type, sort , create_time, update_time, short_name ) values
|
||||||
|
<foreach item="item" index="index" collection="list" separator=",">
|
||||||
|
(#{item.id},#{item.orderId}, #{item.areaCode}, #{item.areaName}, #{item.address}, #{item.longitude}, #{item.latitude}, #{item.contactName}, #{item.contactPhone}, #{item.layDate},
|
||||||
|
#{item.layTime},#{item.layTimeId},#{item.layType},#{item.sort}, now(), now(), #{item.shortName})
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.mhd.oms.domain.reservationOrder.repository.mapper.ReservationCargoInfoMapper">
|
||||||
|
<!-- com.mhd.oms.domain.reservationOrder.repository.mapper.ReservationCargoInfoMapper-->
|
||||||
|
<insert id="insertBatch">
|
||||||
|
insert into reservation_cargo_info
|
||||||
|
( id,order_id , goods_type_id , goods_type , goods_name_id , goods_name , cargo_num , cargo_weight , cargo_volume , cargo_content , weight_unit_id, weight_unit, quantity_unit_id, quantity_unit,cargo_name,cargo_unit_id,cargo_unit_name,machine_code,stock_flag,cargo_tonnage,unit_price,create_time,cargo_type,remark ) values
|
||||||
|
<foreach item="item" index="index" collection="list" separator=",">
|
||||||
|
(#{item.id},#{item.orderId}, #{item.goodsTypeId},
|
||||||
|
#{item.goodsType}, #{item.goodsNameId}, #{item.goodsName},
|
||||||
|
#{item.cargoNum}, #{item.cargoWeight},#{item.cargoVolume},#{item.cargoContent}, #{item.weightUnitId},
|
||||||
|
#{item.weightUnit}, #{item.quantityUnitId},#{item.quantityUnit},
|
||||||
|
#{item.cargoName},#{item.cargoUnitId},#{item.cargoUnitName},#{item.machineCode},
|
||||||
|
#{item.stockFlag},#{item.cargoTonnage},#{item.unitPrice},#{item.createTime},#{item.cargoType},#{item.remark})
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Reference in New Issue
Block a user