From e26dc853d51ec37c80ec8f76ca63651adbedb4b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E8=BE=89?= <2830717623@qq.com> Date: Wed, 28 Jan 2026 13:20:09 +0800 Subject: [PATCH] =?UTF-8?q?oms=E5=8F=91=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/mhd/system/api/UserServiceFeign.java | 4 + .../com/mhd/system/api/domain/UserDTO.java | 2 + .../RemoteUserFeignFallbackFactory.java | 5 + .../UserShipperApplicationService.java | 16 + .../interfaces/facade/UserShipperAPI.java | 30 + .../resources/mapper/UserShipperMapper.xml | 2 + .../entity/ReservationAddressMulti.java | 67 + .../entity/ReservationCargoMulti.java | 35 + .../entity/ReservationOrder.java | 695 ++++++++++ .../facade/IOmsAddressMultiService.java | 15 + .../mapper/ReservationOrderMapper.java | 14 + .../mapper/TmsOrderAccountMapper.java | 9 + .../repository/po/SzwlConfigSwitchVO.java | 183 +++ .../service/OmsAddressMultiService.java | 1199 +++++++++++++++++ .../service/SysConfigSwitchService.java | 18 + .../service/TmsOrderService.java | 25 + .../impl/SysConfigSwitchServiceImpl.java | 111 ++ .../service/impl/TmsOrderServiceImpl.java | 26 + .../java/com/mhd/oms/enums/CargoTypeEnum.java | 38 + .../java/com/mhd/oms/enums/DictTypeEnum.java | 21 + .../com/mhd/oms/enums/OrderOperateEnum.java | 63 + .../com/mhd/oms/enums/OrderStatusEnum.java | 63 + .../java/com/mhd/oms/enums/OrderType.java | 29 + .../feign/ProductServiceFeign.java | 115 ++ .../feign/SystemServiceFeign.java | 277 ++++ .../feign/ThirdPartyServiceFeign.java | 144 ++ .../feign/TransportServiceFeign.java | 51 + .../feign/dto/AbnormalAddressBookDTO.java | 101 ++ .../feign/dto/AuroraPushDTO.java | 55 + .../feign/dto/InboundOrderDTO.java | 51 + .../feign/dto/NoticeMessageLoggingDto.java | 144 ++ .../feign/dto/QueryExpenseAccountDTO.java | 38 + .../infrastructure/feign/po/Inventory.java | 61 + .../feign/po/NoticeMessageLoggingPo.java | 129 ++ .../dto/resevationOrder/NamedCarrierDTO.java | 14 + .../dto/resevationOrder/OmsAddressDTO.java | 61 + .../resevationOrder/OmsAddressMultiDTO.java | 49 + .../dto/resevationOrder/OmsCargoInfoDTO.java | 82 ++ .../resevationOrder/OmsLoadingAddressDTO.java | 61 + .../dto/resevationOrder/OmsOrderAccount.java | 103 ++ .../dto/resevationOrder/OmsOrderAddDTO.java | 481 +++++++ .../dto/resevationOrder/OmsOrderDTO.java | 477 +++++++ .../resevationOrder/OmsUnLoadAddressDTO.java | 51 + .../resevationOrder/ResevationOrderApi.java | 82 ++ .../com/mhd/oms/util/MultistageDictUtils.java | 13 + .../java/com/mhd/oms/util/OrderSequence.java | 145 ++ 46 files changed, 5455 insertions(+) create mode 100644 mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/entity/ReservationAddressMulti.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/entity/ReservationCargoMulti.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/entity/ReservationOrder.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/repository/facade/IOmsAddressMultiService.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/repository/mapper/ReservationOrderMapper.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/repository/mapper/TmsOrderAccountMapper.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/repository/po/SzwlConfigSwitchVO.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/service/OmsAddressMultiService.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/service/SysConfigSwitchService.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/service/TmsOrderService.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/service/impl/SysConfigSwitchServiceImpl.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/service/impl/TmsOrderServiceImpl.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/enums/CargoTypeEnum.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/enums/DictTypeEnum.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/enums/OrderOperateEnum.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/enums/OrderStatusEnum.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/enums/OrderType.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ProductServiceFeign.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/SystemServiceFeign.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/TransportServiceFeign.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/dto/AbnormalAddressBookDTO.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/dto/AuroraPushDTO.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/dto/InboundOrderDTO.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/dto/NoticeMessageLoggingDto.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/dto/QueryExpenseAccountDTO.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/po/Inventory.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/po/NoticeMessageLoggingPo.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/NamedCarrierDTO.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsAddressDTO.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsAddressMultiDTO.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsCargoInfoDTO.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsLoadingAddressDTO.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsOrderAccount.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsOrderAddDTO.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsOrderDTO.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsUnLoadAddressDTO.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/interfaces/facade/resevationOrder/ResevationOrderApi.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/util/MultistageDictUtils.java create mode 100644 mhd_oms/src/main/java/com/mhd/oms/util/OrderSequence.java diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/UserServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/UserServiceFeign.java index b96ef49b3..977accfd1 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/UserServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/UserServiceFeign.java @@ -180,4 +180,8 @@ public interface UserServiceFeign { @ApiOperation("查询承运人汇总数据") @GetMapping("/userShipperApi/getShipperSummaryData/{userId}") public AjaxResult getShipperSummaryData(@PathVariable("userId") Long userId); + + @ApiOperation("根据用户ID查询货主信息") + @GetMapping("/userShipperApi/getShipperByUserId/{userId}") + public AjaxResult getShipperByUserId(@PathVariable("userId") Long userId); } diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/domain/UserDTO.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/domain/UserDTO.java index 21d45fb4d..9a4332ec3 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/domain/UserDTO.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/domain/UserDTO.java @@ -37,5 +37,7 @@ public class UserDTO extends BaseVOEntity { private Integer userStatus; @ApiModelProperty(name = "业务类型:0.无状态,1.托运业务,2.承运业务,3.托运、承运业务,4.无业务,5.不确定业务默认为托运业务") private Integer businessType; + @ApiModelProperty(name = "用户角色") + private String userRole; } diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteUserFeignFallbackFactory.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteUserFeignFallbackFactory.java index 77bfe8859..94590b91d 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteUserFeignFallbackFactory.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteUserFeignFallbackFactory.java @@ -169,6 +169,11 @@ public class RemoteUserFeignFallbackFactory implements FallbackFactory getShipperByUserId(Long userId) { + return AjaxResult.error("查询失败" + throwable.getMessage()); + } }; } } diff --git a/mhd-user-center/src/main/java/com/mhd/user/application/service/UserShipperApplicationService.java b/mhd-user-center/src/main/java/com/mhd/user/application/service/UserShipperApplicationService.java index 6c438f14a..b896aafa7 100644 --- a/mhd-user-center/src/main/java/com/mhd/user/application/service/UserShipperApplicationService.java +++ b/mhd-user-center/src/main/java/com/mhd/user/application/service/UserShipperApplicationService.java @@ -1161,4 +1161,20 @@ public class UserShipperApplicationService { public com.mhd.common.core.domain.po.UserShipperPo getShipperSummaryData(Long userId) { return userShipperDomainService.getShipperSummaryData(userId); } + + /** + * 根据用户ID查询货主信息 + * + * @param userId 用户ID + * @return 货主信息 + */ + public UserShipperPo getShipperByUserId(Long userId) { + // 参数校验 + if (userId == null || userId <= 0) { + throw new IllegalArgumentException("用户ID不能为空"); + } + + // 根据userId查询货主信息 + return userShipperDomainService.selectByUserId(userId); + } } diff --git a/mhd-user-center/src/main/java/com/mhd/user/interfaces/facade/UserShipperAPI.java b/mhd-user-center/src/main/java/com/mhd/user/interfaces/facade/UserShipperAPI.java index ed73b8d5a..863b63d10 100644 --- a/mhd-user-center/src/main/java/com/mhd/user/interfaces/facade/UserShipperAPI.java +++ b/mhd-user-center/src/main/java/com/mhd/user/interfaces/facade/UserShipperAPI.java @@ -205,4 +205,34 @@ public class UserShipperAPI extends BaseController { public AjaxResult getShipperSummaryData(@PathVariable Long userId) { return AjaxResult.success(userShipperApplicationService.getShipperSummaryData(userId)); } + + /** + * 根据用户ID查询货主信息 + * + * @param userId 用户ID + * @return 货主信息 + */ + @ApiOperation("根据用户ID查询货主信息") + @GetMapping("/getShipperByUserId/{userId}") + public AjaxResult getShipperByUserId(@PathVariable("userId") Long userId) { + try { + // 参数校验 + if (userId == null || userId <= 0) { + return AjaxResult.error("用户ID不能为空"); + } + + // 调用服务层方法查询货主信息 + UserShipperPo userShipperPo = userShipperApplicationService.getShipperByUserId(userId); + + if (userShipperPo != null) { + return AjaxResult.success(userShipperPo); + } else { + return AjaxResult.error("未找到对应的货主信息"); + } + } catch (Exception e) { + log.error("根据用户ID查询货主信息异常,userId:{}", userId, e); + return AjaxResult.error("查询货主信息失败:" + e.getMessage()); + } + } + } diff --git a/mhd-user-center/src/main/resources/mapper/UserShipperMapper.xml b/mhd-user-center/src/main/resources/mapper/UserShipperMapper.xml index 1c76e8153..6d096e8b7 100644 --- a/mhd-user-center/src/main/resources/mapper/UserShipperMapper.xml +++ b/mhd-user-center/src/main/resources/mapper/UserShipperMapper.xml @@ -42,6 +42,8 @@ a.shipper_enterprise_fill_time, a.shipper_fill_remark, a.shipper_enterprise_fill_remark, + a.monthly_settlement_flag, + a.is_auto_audit_order, b.user_phone, b.user_name, b.role_name, diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/entity/ReservationAddressMulti.java b/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/entity/ReservationAddressMulti.java new file mode 100644 index 000000000..b72907447 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/entity/ReservationAddressMulti.java @@ -0,0 +1,67 @@ +package com.mhd.oms.domain.resevationOrder.entity; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * @author: brb + * @description: + * @create: 2026-01-27 09:09 + */ +@Data +public class ReservationAddressMulti { + + + @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 = "货源单ID") + private String orderId; + @ApiModelProperty(value = "装卸货地县区编码") + private String areaCode; + @ApiModelProperty(value = "装卸货地名称") + private String areaName; + @ApiModelProperty(value = "装卸货详细地址") + private String address; + @ApiModelProperty(value = "装卸货地经度") + private String longitude; + @ApiModelProperty(value = "装货地纬度") + private String latitude; + @ApiModelProperty(value = "装卸货联系人") + private String contactName; + @ApiModelProperty(value = "装卸货联系人电话") + private String contactPhone; + @ApiModelProperty(value = "装卸货日期(年月日)") + private Date layDate; + @ApiModelProperty(value = "装卸货时间(上午、下午、24小时)") + private String layTime; + @ApiModelProperty(value = "装卸货时间id") + private String layTimeId; + @ApiModelProperty(value = "装卸货类型:0无状态1装货地址2卸货地址") + private Integer layType; + @ApiModelProperty(value = "序号") + private Integer sort; + @ApiModelProperty(value = "简称") + private String shortName; +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/entity/ReservationCargoMulti.java b/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/entity/ReservationCargoMulti.java new file mode 100644 index 000000000..b3c4dedc0 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/entity/ReservationCargoMulti.java @@ -0,0 +1,35 @@ +package com.mhd.oms.domain.resevationOrder.entity; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * @author: brb + * @description: + * @create: 2026-01-27 09:11 + */ +@Data +public class ReservationCargoMulti { + + @ApiModelProperty(value = "主键ID") + private String id; + @ApiModelProperty(value = "创建时间") + private Date createTime; + @ApiModelProperty(value = "修改时间") + private Date updateTime; + @ApiModelProperty(value = "装卸货ID") + private String layInfoId; + @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 cargoWeight; +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/entity/ReservationOrder.java b/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/entity/ReservationOrder.java new file mode 100644 index 000000000..ea48080e6 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/entity/ReservationOrder.java @@ -0,0 +1,695 @@ +package com.mhd.oms.domain.resevationOrder.entity; + +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 lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; + +/** + * @author: brb + * @description: + * @create: 2026-01-26 13:39 + */ +@Data +@TableName("reservation_order") +public class ReservationOrder { + private static final long serialVersionUID = 1L; + + @TableId(type = IdType.ID_WORKER_STR) + private java.lang.String id; + @ApiModelProperty(value = "创建人") + @Excel(name = "创建人", width = 15) + private java.lang.String createBy; + @ApiModelProperty(value = "创建日期") + @Excel(name = "创建日期", width = 20) + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private java.util.Date createTime; + @ApiModelProperty(value = "货源单创建企业ID") + @Excel(name = "货源单创建企业ID", width = 15) + private java.lang.String createCompanyId; + @ApiModelProperty(value = "更新人") + @Excel(name = "更新人", width = 15) + private java.lang.String updateBy; + @ApiModelProperty(value = "更新日期") + @Excel(name = "更新日期", width = 20) + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private java.util.Date updateTime; + @ApiModelProperty(value = "所属部门") + @Excel(name = "所属部门", width = 15) + private java.lang.String sysOrgCode; + @ApiModelProperty(value = "货源单号") + @Excel(name = "货源单号", width = 15) + private java.lang.String goodsNumber; + // @ApiModelProperty(value = "线路名称ID") +// @Excel(name = "线路名称ID", width = 15) +// private java.lang.String lineNameId; +// @ApiModelProperty(value = "线路名称") +// @Excel(name = "线路名称", width = 15) +// private java.lang.String lineName; +// @ApiModelProperty(value = "运距,距离,里程(千米)") +// @Excel(name = "运距(千米)", width = 15) +// private BigDecimal haulDistance; + @ApiModelProperty(value = "装货地名称") + @Excel(name = "装货地名称", width = 15) + private java.lang.String loadingName; + @ApiModelProperty(value = "装货地县区编码") + @Excel(name = "装货地县区编码", width = 15) + private java.lang.String loadingAreaId; + @ApiModelProperty(value = "装货地详细地址") + @Excel(name = "装货地详细地址", width = 15) + private java.lang.String loadingAddress; + @ApiModelProperty(value = "装货地经度") + @Excel(name = "装货地经度", width = 15) + private java.lang.String loadingLongitude; + @ApiModelProperty(value = "装货地纬度") + @Excel(name = "装货地纬度", width = 15) + private java.lang.String loadingLatitude; + @ApiModelProperty(value = "装货单位") + private java.lang.String loadingUnit; + @ApiModelProperty(value = "发货人姓名") + @Excel(name = "发货人姓名", width = 15) + private java.lang.String freighterName; + @ApiModelProperty(value = "装货电话") + @Excel(name = "装货电话", width = 15) + private java.lang.String loadingPhone; + @ApiModelProperty(value = "装货时间日期(年月日)") + @Excel(name = "装货时间日期(年月日)", width = 15) + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private java.util.Date loadingDate; + // @ApiModelProperty(value = "装货时间(上午、下午、24小时)") +// @Excel(name = "装货时间(上午、下午、24小时)", width = 15) +// private java.lang.String loadingTime; +// @ApiModelProperty(value = "装货时间id") +// @Excel(name = "装货时间id", width = 15) +// private java.lang.String loadingTimeId; + @ApiModelProperty(value = "卸货地名称") + @Excel(name = "卸货地名称", width = 15) + private java.lang.String unloadName; + @ApiModelProperty(value = "卸货地县区编码") + @Excel(name = "卸货地县区编码", width = 15) + private java.lang.String unloadAreaId; + @ApiModelProperty(value = "卸货地详细地址") + @Excel(name = "卸货地详细地址", width = 15) + private java.lang.String unloadAddress; + @ApiModelProperty(value = "卸货地经度") + @Excel(name = "卸货地经度", width = 15) + private java.lang.String unloadLongitude; + @ApiModelProperty(value = "卸货地纬度") + @Excel(name = "卸货地纬度", width = 15) + private java.lang.String unloadLatitude; + // @ApiModelProperty(value = "卸货单位") +// private java.lang.String unloadUnit ; +// @ApiModelProperty(value = "收货人身份证号") +// private java.lang.String unloadIdentificationNumber; + @ApiModelProperty(value = "收货人姓名") + @Excel(name = "收货人姓名", width = 15) + private java.lang.String dischargerName ; + @ApiModelProperty(value = "卸货电话") + @Excel(name = "卸货电话", width = 15) + private java.lang.String unloadPhone ; + @ApiModelProperty(value = "卸货时间日期(年月日)") + @Excel(name = "卸货时间日期(年月日)", width = 15) + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private java.util.Date unloadingData; + // @ApiModelProperty(value = "卸货时间(上午、下午、24小时)") +// @Excel(name = "卸货时间(上午、下午、24小时)", width = 15) +// private java.lang.String unloadingTime; +// @ApiModelProperty(value = "卸货时间id") +// @Excel(name = "卸货时间id", width = 15) +// private java.lang.String unloadingTimeId ; + @ApiModelProperty(value = "货物名称ID") + @Excel(name = "货物名称ID", width = 15) + private java.lang.String goodsNameId ; + @ApiModelProperty(value = "货物大类型") + @Excel(name = "货物大类型", width = 15) + private java.lang.String goodsType ; + @ApiModelProperty(value = "货物小类型") + @Excel(name = "货物小类型", width = 15) + private java.lang.String goodsName ; + @ApiModelProperty(value = "重量小(吨)") + @Excel(name = "重量小(吨)", width = 15) + private java.math.BigDecimal weightMin; + // @ApiModelProperty(value = "货物重量") +// private BigDecimal goodsWeight; + @ApiModelProperty(value = "货物数量单位(吨/方/件)") + @Excel(name = "货物数量单位(吨/方/件)", width = 15) + private java.lang.String goodsUntis ; + @ApiModelProperty(value = "货物数量单位(吨/方/件)id",required = true) + private String goodsUntisId ; + @ApiModelProperty(value = "配载方式ID(0-数量,1-车次)") + @Excel(name = "配载方式ID(0-数量,1-车次)", width = 15) + private java.lang.Integer transportationModeId; + @ApiModelProperty(value = "配载方式名称") + @Excel(name = "配载方式名称", width = 15) + private java.lang.String transportationName ; + @ApiModelProperty(value = "车型车长ID") + @Excel(name = "车型车长ID", width = 15) + private java.lang.String carType ; + @ApiModelProperty(value = "车型车长名称") + @Excel(name = "车型车长名称", width = 15) + private java.lang.String carTypeName ; + @ApiModelProperty(value = "承运方ID") + @Excel(name = "承运方ID", width = 15) + private java.lang.String appointDriverEnterpriseId; + @ApiModelProperty(value = "承运方名称") + @Excel(name = "承运方名称", width = 15) + private java.lang.String appointDriverEnterprise; + // @ApiModelProperty(value = "指定司机ID") +// @Excel(name = "指定司机ID", width = 15) +// private java.lang.String appointDriverId; +// @ApiModelProperty(value = "指定司机姓名") +// @Excel(name = "指定司机姓名", width = 15) +// private java.lang.String appointDriver ; +// @ApiModelProperty(value = "指定司机电话") +// @Excel(name = "指定司机电话", width = 15) +// private java.lang.String appointDriverPhone ; +// @ApiModelProperty(value = "指定司机车牌号") +// @Excel(name = "指定司机车牌号", width = 15) +// private java.lang.String appointDriverLicense ; + @ApiModelProperty(value = "服务要求ID") + @Excel(name = "服务要求ID", width = 15) + private java.lang.String serviceRequireId ; + @ApiModelProperty(value = "服务要求名称") + @Excel(name = "服务要求名称", width = 15) + private java.lang.String serviceRequire ; + @ApiModelProperty(value = "备注") + @Excel(name = "备注", width = 15) + private java.lang.String remarks ; + // @ApiModelProperty(value = "上游客户ID") +// @Excel(name = "上游客户ID", width = 15) +// private java.lang.String upstreamCustomersId ; +// @ApiModelProperty(value = "上游客户姓名") +// @Excel(name = "上游客户姓名", width = 15) +// private java.lang.String upstreamCustomersName ; +// @ApiModelProperty(value = "上游客户电话") +// @Excel(name = "上游客户电话", width = 15) +// private java.lang.String upstreamCustomersPhone ; +// @ApiModelProperty(value = "运单类型(0-普货、1-批量货、2-撮合货、3-客服运单,4-线下运单)") +// @Excel(name = "运单类型(0-普货、1-批量货、2-撮合货、3-客服运单,4-线下运单)", width = 15) +// private java.lang.Integer waybillType; + @ApiModelProperty(value = "运单来源(0-后台发布、1-app发布、2-导入)") + @Excel(name = "运单来源(0-后台发布、1-app发布、2-导入)", width = 15) + private java.lang.Integer waybillFrom; + // @ApiModelProperty(value = "期望运费") +// @Excel(name = "期望运费", width = 15) +// private java.math.BigDecimal freightHope; + @ApiModelProperty(value = "货源是否关闭(0-否,1-是)") + @Excel(name = "货源是否关闭(0-否,1-是)", width = 15) + private java.lang.Integer isSource; + // @ApiModelProperty(value = "货源是否被接单(0-否,1-是)") +// @Excel(name = "货源是否被接单(0-否,1-是)", width = 15) +// private java.lang.Integer isOrder; + @ApiModelProperty(value = "货源关闭时间") + @Excel(name = "货源关闭时间", width = 15) + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private java.util.Date sourceCloseTime; + @ApiModelProperty(value = "货源关闭人用户ID") + @Excel(name = "货源关闭人用户ID", width = 15) + private java.lang.String executorId; + @ApiModelProperty(value = "是否删除(0-否,1-是)") + @Excel(name = "是否删除(0-否,1-是)", width = 15) + private java.lang.Integer isDelete; + @ApiModelProperty(value = "货物类型ID") + @Excel(name = "货物类型ID", width = 15) + private java.lang.String goodsTypeId ; + @ApiModelProperty(value = "货运线路(装货市县)") + private java.lang.String lineTitleLeft ; + @ApiModelProperty(value = "货运线路(卸货市县)") + private java.lang.String lineTitleRight ; + @ApiModelProperty(value = "是否为常发货源(0-否,1-是)") + @Excel(name = "是否为常发货源(0-否,1-是)", width = 15) + private java.lang.Integer isCommon; + // @ApiModelProperty(value = "占用车长") +// @Excel(name = "占用车长", width = 15) +// private String occupyConductor ; +// @ApiModelProperty(value = " 货源信息上报:0-未上报,1-已上报,2-上报失败") +// private Integer isOrderReporting; +// @ApiModelProperty(value = "货源信息上报时间") +// @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") +// @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") +// private java.util.Date orderReportingTime; +// @ApiModelProperty(value = "货源信息上报失败原因") +// private java.lang.String orderReportingErr ; + @ApiModelProperty(value = "审核状态") + private java.lang.Integer auditStatus; + @ApiModelProperty(value = "运单模式(0-普通模式,1-竞价模式)") + private java.lang.Integer waybillMode; + @ApiModelProperty(value = "竞价截止时间") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private java.util.Date latestBiddingTime; + @ApiModelProperty(value = "竞价单位(元/车,元/吨)") + private String biddingUnit; + @ApiModelProperty(value = "审核人") + @Excel(name = "审核人", width = 15) + private java.lang.String auditBy; + @ApiModelProperty(value = "发货运费") + private java.math.BigDecimal deliveryFreight; + @ApiModelProperty(value = "审核时间") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private java.util.Date auditTime; + @ApiModelProperty(value = "业务类型") + private java.lang.String businessType ; + @ApiModelProperty(value = "运费单价(元/吨)") + private BigDecimal transportationUnitPrice ; + @ApiModelProperty(value = "结算方式,1-按趟结算,2-按数量结算") + private Integer radioValue; + @ApiModelProperty(value = "创建人姓名") + private String createrName ; + @ApiModelProperty(value = "创建人电话") + private String createrPhone ; + // @ApiModelProperty(value = "赫达订单号") +// private String orderNumber ; +// @ApiModelProperty(value = "是否长期货源:0-否,1-是") +// private Integer isLongOrder; + @ApiModelProperty(value = "是否使用电子围栏:0-否,1-是") + private Integer isElectricFence; + + @ApiModelProperty(value = "微信小程序图片地址") + private String wxaQrcode ; + +// @ApiModelProperty(value = "运单服务费率") +// private java.math.BigDecimal serviceRate; + + // @ApiModelProperty(value = "代运营人员用户ID") +// private String orderAgentUserId ; + @ApiModelProperty(value = "委托方编号") + private String appointShipperId; + // @ApiModelProperty(value = "指定平台公司") +// private String appointCompanyId; +// @ApiModelProperty(value = "指定平台公司名称") +// private String appointCompanyName; + @ApiModelProperty(value = "平台员工创建人id") + private String createUserId; + @ApiModelProperty(value = "委托方") + private String appointShipper; +// @ApiModelProperty(value = "指定车辆ID") +// private String appointVehicleId; +// @ApiModelProperty(value = "是否卸货完成(0:否,1:是)") +// private Integer isUnload; +// @ApiModelProperty(value = "指定车辆设备号") +// private String appointVehicleDevice; + +// @ApiModelProperty(value = "发布货源方式 0-未指定;1-企业货源;2-平台货源") +// private Integer publishOrderType; + +// /**是否开启路耗(0-否 1-是)*/ +// @ApiModelProperty(value = "是否开启路耗(0-否 1-是)") +// @Excel(name = "是否开启路耗(0-否 1-是)", width = 15) +// private Integer isRoadLoss; +// /**货物价值(元/吨)*/ +// @ApiModelProperty(value = "货物价值(元/吨)") +// @Excel(name = "货物价值(元/吨)", width = 15) +// private BigDecimal goodsValue ; +// /**路耗模式(0-按比例% 1-按数量(吨))*/ +// @ApiModelProperty(value = "路耗模式(0-按比例% 1-按数量(吨))") +// @Excel(name = "路耗模式(0-按比例% 1-按数量(吨))", width = 15) +// private Integer roadLossMode; +// /**路耗结算方式(0-无 1-取装货重量 2-取卸货重量 3-装卸货取大 4-装卸货取小)*/ +// @ApiModelProperty(value = "路耗结算方式(0-无 1-取装货重量 2-取卸货重量 3-装卸货取大 4-装卸货取小)") +// @Excel(name = "路耗结算方式(0-无 1-取装货重量 2-取卸货重量 3-装卸货取大 4-装卸货取小)", width = 15) +// private Integer roadLossSettlementMethod; + +// /**允许货物亏损*/ +// @ApiModelProperty(value = "允许货物亏损(吨或%)") +// @Excel(name = "允许货物亏损(吨或%)", width = 15) +// private BigDecimal allowableLoss ; + +// /**超出亏损扣除金额(元/吨)*/ +// @ApiModelProperty(value = "超出亏损扣除金额(元/吨)") +// @Excel(name = "超出亏损扣除金额(元/吨)", width = 15) +// private BigDecimal lossDeductionAmount ; +// @ApiModelProperty(value = "上游客户id") +// @Excel(name = "上游客户id", width = 15) +// private String upClientId; + + @ApiModelProperty(value = "货单二维码图片地址") + private java.lang.String qrCodeImgUrl; + +// @ApiModelProperty(value = "运费抹零 0-不抹零 ,1-抹零小数位,2-抹零个位,3-抹零十位") +// private Integer isFreightNullification ; + +// /**回单付金额*/ +// @ApiModelProperty(value = "回单付金额") +// @Excel(name = "回单付金额", width = 15) +// private BigDecimal receiptPaymentAmount ; +// /**预付运费金额*/ +// @ApiModelProperty(value = "预付现金金额") +// @Excel(name = "预付现金金额", width = 15) +// private BigDecimal cashAdvance ; +// /**到付运费金额*/ +// @ApiModelProperty(value = "到付运费金额") +// @Excel(name = "到付运费金额", width = 15) +// private BigDecimal freightAmount ; +// /**预付平台油卡金额*/ +// @ApiModelProperty(value = "预付平台油卡金额") +// @Excel(name = "预付平台油卡金额", width = 15) +// +// +// private BigDecimal oilCardOnline ; +// @ApiModelProperty(value = "是否协议费用生成:0否 1是") +// private Integer isAutoGenerateProtocol; + +// /**单车重量*/ +// @ApiModelProperty(value = "单车重量",required = true) +// private java.math.BigDecimal singleVehicleWeight; +// +// /**单车总费用*/ +// @ApiModelProperty(value = "单车总费用") +// @Excel(name = "单车总费用", width = 15) +// private BigDecimal freightGross ; +// +// @ApiModelProperty(value = "是否允许接多单:0否 1是") +// private Integer isMultipleOrdersAllowed; + + @ApiModelProperty(value = "发货备注") + private String shippingNote; + + @ApiModelProperty(value = "运单事实创建人ID(创建运单时的当前登录人USER-ID)") + private String realCreateBy; + + @ApiModelProperty(value = "运单事实创建人名称(创建运单时的当前登录人REAL-NAME)") + private String realCreateName; + +// @ApiModelProperty(value = "涨吨是否计算费用 0-否 1-是 ") +// private Integer isTonnageIncreaseCharge; + + @ApiModelProperty("应收结算类型:1-月结,2-现结") + private Integer receivableType; +// +// @ApiModelProperty(value = "订单类型:0-自有订单,1-tms订单") +// private Integer orderType; + + @ApiModelProperty(value = "第三方订单号") + private String thirdPartyOrderNumber; + + @ApiModelProperty(value = "调度单单号") + private String dispatchOrderNumber; + + @ApiModelProperty(value = "作废订单备注") + private String cancelOrderRemark; + +// @ApiModelProperty("项目表ID") +// private Long projectManagementId; + + @ApiModelProperty(value = "接单司机ID") + private String orderDriverId; + + @ApiModelProperty(value = "货物数量") + private String goodsQuantity; + @ApiModelProperty(value = "货物数量单位code") + private String goodsQuantityUnitId; + @ApiModelProperty(value = "货物数量单位") + private String goodsQuantityUnit; + + @ApiModelProperty(value = "拼单类型(0-不拼单(主单),1-拼单-子单,2-拼单-合单)") + private Integer splicingOrderType; + + @ApiModelProperty(value = "拼单发布状态(0-否,1-是)") + private Integer splicingStatus; + + @ApiModelProperty(value = "拼单主单id") + private String mainOrderId; + + @ApiModelProperty(value = "拼单主单号") + private String mainOrderNum; + + @ApiModelProperty(value = "拼单合单id") + private String mergeOrderId; + + @ApiModelProperty(value = "拼单合单号") + private String mergeOrderNum; + + + //=================批量货派单相关============================= +// @ApiModelProperty(value = "需求车次") +// private Integer demandTrainNumber; +// @ApiModelProperty(value = "承运车次默认0") +// private Integer carriageNumber; +// @ApiModelProperty(value = "剩余需求车次") +// private Integer remainingDemandTrainNumber; + + /**货物重量*/ + @ApiModelProperty(value = "重量大(吨)") + private java.math.BigDecimal weightMax; +// @ApiModelProperty(value = "货源剩余货物数量") +// private BigDecimal residueGoodsWeight; +// @ApiModelProperty(value = "承运货物数量") +// private BigDecimal transportGoodsWeight; + + @ApiModelProperty(value = "订单状态(1-未审核,2-未通过,3-进行中,4-已完成,5-已关闭)") + //新逻辑:1-未调度、2-未派车、3-未入厂、4-已入厂、5-已装车、6-已卸车、7-已上传、8-已签收、9-已关闭 + private Integer orderStatus; + +// @ApiModelProperty(value = "多装多卸类型") +// private String layType; +// @ApiModelProperty(value = "来源系统") +// private String orderSource; + +// @ApiModelProperty(value = "通知单号") +// private String noticeNumber; +// +// @ApiModelProperty(value = "司机税率") +// private BigDecimal driverTaxRate; +// +// @ApiModelProperty(value = "tms到付运费金额") +// private BigDecimal tmsFreightAmount; + + + + + + //========================================新增字段========================================== + @ApiModelProperty(value = "付款方类型(0-委托方,1-收货方)") + @Excel(name = "付款方类型(0-委托方,1-收货方)", width = 15) + private java.lang.Integer payerType; + + @ApiModelProperty(value = "收货方编码") + private String recipientId; + @ApiModelProperty(value = "收货方") + private String recipientName; + + @ApiModelProperty(value = "整机编号") + private String machineNumber; + + @ApiModelProperty(value = "是否库存(0-是,1-否)") + @Excel(name = "是否库存(0-是,1-否)", width = 15) + private java.lang.Integer stockFlag; + + @ApiModelProperty(value = "信息费") + private java.math.BigDecimal infoFee; + @ApiModelProperty(value = "信息费收款方方式") + private Integer infoFeePayeeType; + @ApiModelProperty(value = "信息费收款方") + private String infoFeePayee; + @ApiModelProperty(value = "信息费支付状态:PayStatusEnum") + private Integer infoFeeStatus; + @ApiModelProperty(value = "信息费应付单据号") + private String infoFeeDocumentNumber; + @ApiModelProperty(value = "订单类型(1-普货运输,2-危化运输,3-罐车运输,4-济南专线,5-江西专线)") + private Integer orderShippingType; + + @ApiModelProperty(value = "订单结算状态:1未出账、2已出账、3部分结算、4已结算") + private Integer settlementStatus; + + @ApiModelProperty(value = "订单运费结算时间") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private java.util.Date settlementTime; + + @ApiModelProperty(value = "出账时间") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private java.util.Date paymentTime; + + @ApiModelProperty(value = "应收对账单-单号") + private String reconciliationInnerNumber; + + @ApiModelProperty(value = "已收运费") + private java.math.BigDecimal collectedFreight; + @ApiModelProperty(value = "未收运费") + private java.math.BigDecimal uncollectedFreight; + @ApiModelProperty(value = "少收运费") + private java.math.BigDecimal collectLessFreight; + + @ApiModelProperty(value = "运单发票开具状态(0-未索取,1-已索取,2-已开票,3-部分索取)") + private Integer isInvoice; + + + @ApiModelProperty(value = "发票表ID") + private String invoiceId; + + @ApiModelProperty(value = "车辆类型Id") + private String vehicleTypeId; + + @ApiModelProperty(value = "车辆类型名称") + private String vehicleTypeName; + + @ApiModelProperty(value = "承运人Id(订单为济南专线使用)") + private String carrier; + + @ApiModelProperty(value = "承运人姓名(订单为济南专线使用)") + private String carrierName; + + @ApiModelProperty(value = "数字物流平台用户Id") + private Long szwlUserId; + + @ApiModelProperty("运费单价") + private BigDecimal freightUnitPrice; + + @ApiModelProperty(value = "竞价状态 0-竞价中,1-已完成,2-已关闭") + private Integer biddingStatus; + + @ApiModelProperty(value = "竞价备注") + private String biddingRemarks; + + @ApiModelProperty(value = "货物保险金额") + private BigDecimal cargoInsuranceAmount; + + @ApiModelProperty(value = "目的地") + private String destination; + + @ApiModelProperty("运费") + private BigDecimal freightCharges; + + @ApiModelProperty(value = "付款方名称") + private String payer; + + @ApiModelProperty("业务员ID") + private String salesmanId; + + @ApiModelProperty("业务员") + private String salesmanName; + + @ApiModelProperty("是否报关(0:否,1:是)") + private Integer isDeclare; + + @ApiModelProperty("线路") + private String route; + + @ApiModelProperty("柜类型") + private String containerType; + + @ApiModelProperty("柜类型名称") + private String containerTypeName; + + @ApiModelProperty("卡类型") + private String cardType; + + @ApiModelProperty("卡类型名称") + private String cardTypeName; + + @ApiModelProperty("外来柜号") + private String externalContainerNo; + + @ApiModelProperty("中转地") + private String transitPlace; + + @ApiModelProperty("托运人ID") + private String shipper; + + @ApiModelProperty("托运人ID") + private String customsShipper; + + @ApiModelProperty("托运人电话") + private String customsShipperTel; + + @ApiModelProperty("卸货单位") + private String unloadingCompany; + + @ApiModelProperty("合同编号") + private String contractNo; + + @ApiModelProperty("运费") + private BigDecimal freightFee; + + @ApiModelProperty("卸货费") + private BigDecimal unloadingFee; + + @ApiModelProperty("报关费") + private BigDecimal customsFee; + + @ApiModelProperty("差货费") + private BigDecimal shortageFee; + + @ApiModelProperty("杂费") + private BigDecimal miscellaneousFee; + + @ApiModelProperty("其他费用") + private BigDecimal otherFee; + + @ApiModelProperty("滞车费") + private BigDecimal detentionFee; + + @ApiModelProperty("税率") + private BigDecimal taxRate; + + @ApiModelProperty("结算币种") + private String settlementCurrency; + + @ApiModelProperty("体积") + private BigDecimal volume; + + @ApiModelProperty("内容详情") + private String detailContent; + + @ApiModelProperty("报关线路") + private String customsRoute; + + @ApiModelProperty("报关关口") + private String customsPort; + + @ApiModelProperty("报关联系人") + private String customsContact; + + @ApiModelProperty("报关联系人电话") + private String customsContactPhone; + + @ApiModelProperty("报关备注") + private String customsRemark; + + @ApiModelProperty(value = "组织ID") + private String orgId; + + @ApiModelProperty(value = "所属组织") + @Excel(name = "所属组织", width = 15) + private String orgName; + + @ApiModelProperty(value = "组织ID") + private Long organizationId; + + @ApiModelProperty(value = "组织名称") + private String organizationName; + + @ApiModelProperty(value = "上级组织ID") + private Long topOrganizationId; + + @ApiModelProperty("货物类型") + private String goodsCategory; + + @ApiModelProperty("客户编码nc") + private String customerCodeNc; + + @ApiModelProperty("制单人编码nc") + private String makerCodeNc; + + @ApiModelProperty("业务员编码nc") + private String salesmanCodeNc; + + @ApiModelProperty(value = "单据日期") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private java.util.Date documentDate; +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/repository/facade/IOmsAddressMultiService.java b/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/repository/facade/IOmsAddressMultiService.java new file mode 100644 index 000000000..4be2ac481 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/repository/facade/IOmsAddressMultiService.java @@ -0,0 +1,15 @@ +package com.mhd.oms.domain.resevationOrder.repository.facade; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.mhd.oms.domain.resevationOrder.entity.ReservationOrder; +import com.mhd.oms.interfaces.dto.resevationOrder.OmsOrderAddDTO; + +import java.security.InvalidKeyException; +import java.security.NoSuchAlgorithmException; +import java.security.SignatureException; +import java.security.spec.InvalidKeySpecException; + +public interface IOmsAddressMultiService extends IService { + + void save(OmsOrderAddDTO tmsOrderAddDTO) throws InvalidKeySpecException, NoSuchAlgorithmException, InvalidKeyException, SignatureException; +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/repository/mapper/ReservationOrderMapper.java b/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/repository/mapper/ReservationOrderMapper.java new file mode 100644 index 000000000..73572153a --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/repository/mapper/ReservationOrderMapper.java @@ -0,0 +1,14 @@ +package com.mhd.oms.domain.resevationOrder.repository.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.mhd.oms.domain.resevationOrder.entity.ReservationOrder; +import org.apache.ibatis.annotations.Mapper; + +/** + * @author: + * @description: ResevationOrder数据访问层 + * @create: + */ +@Mapper +public interface ReservationOrderMapper extends BaseMapper { +} \ No newline at end of file diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/repository/mapper/TmsOrderAccountMapper.java b/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/repository/mapper/TmsOrderAccountMapper.java new file mode 100644 index 000000000..fa89994e2 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/repository/mapper/TmsOrderAccountMapper.java @@ -0,0 +1,9 @@ +package com.mhd.oms.domain.resevationOrder.repository.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.mhd.oms.interfaces.dto.resevationOrder.OmsOrderAccount; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface TmsOrderAccountMapper extends BaseMapper { +} \ No newline at end of file diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/repository/po/SzwlConfigSwitchVO.java b/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/repository/po/SzwlConfigSwitchVO.java new file mode 100644 index 000000000..e5be311c2 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/repository/po/SzwlConfigSwitchVO.java @@ -0,0 +1,183 @@ +package com.mhd.oms.domain.resevationOrder.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 lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.Date; + +/** + * 数字物流系统配置同步表 + */ +@Data +public class SzwlConfigSwitchVO implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "是否使用支付宝充值(0-否,1-是)") + private Integer isAlipayRecharge; + + @ApiModelProperty(value = "申请运费是否需要审核(0-否,1-是)") + private Integer isNeedToBeApproved; + + @ApiModelProperty(value = "线下油卡/加油审核通过即支付(0-否,1-是)") + private Integer isApprovedPayment; + + @ApiModelProperty(value = "系统支付方式:0-无,1-网商,2-通联,3-网商+通联,4-农行, 5-微信支付,6-平安银行") + private Integer paymentType; + + @ApiModelProperty(value = "是否自动提现 0-否 1-是") + private Integer isAutomaticWithdrawal; + + @ApiModelProperty(value = "是否允许车队司机接单(0-否,1-是)") + private Integer isMotorcadeDriverReceiving; + + @ApiModelProperty(value = "自动审核用户信息(0-否,1-是)") + private Integer automaticCheckUserInfo; + + @ApiModelProperty(value = "是否允许司机未认证接单(0-否,1-是)") + private Integer isUncertifiedOrders; + + @ApiModelProperty(value = "司机默认审核通过(0-否,1-是)") + private Integer isAutomaticAuditDriver; + + @ApiModelProperty(value = "是否允许未认证绑卡:0-否,1-是") + private Integer isBindcardUnauth; + + @ApiModelProperty(value = "车队长邀请司机自动加入:0-否,1-是") + private Integer isInviteTeamAuth; + + @ApiModelProperty(value = "证件信息到期提醒:0-否,1-是") + private Integer isInfoUpdate; + + @ApiModelProperty(value = "是否必须是营运车辆:0-否,1-是") + private Integer isOperationVehicle; + + @ApiModelProperty(value = "客户投诉弹框(0-否,1-是)") + private Integer isComplaintAlert; + + @ApiModelProperty(value = "登录页验证码登录(0-否,1-是)") + private Integer isVerifiedCode; + + @ApiModelProperty(value = "是否校验车辆信息(0-否,1-是)") + private Integer isVehicleInformation; + + @ApiModelProperty(value = "是否使用小额打款(0-使用,1-不使用)") + private Integer isSmallAmountPayment; + + @ApiModelProperty(value = "ETC是否自动上报:0-否,1-是") + private Integer isEtcAutoReport; + + @ApiModelProperty(value = "短信默认发送平台(0-乐信通,1-网上行,腾讯云)") + private Integer smsSendingPlatform; + + @ApiModelProperty(value = "OCR识别与签章默认方式(0-E签宝,1-放心签1,2-放心签2,3-E签宝saas)") + private Integer ocrDefault; + + @ApiModelProperty(value = "保险使用类型(0-平安.默认,1-永诚,2-华泰)") + private Integer isInsuranceType; + + @ApiModelProperty(value = "ETC使用类型:0-万金油,1-路耘") + private Integer etcType; + + @ApiModelProperty(value = "使用地图类型:0-高德地图,1-百度地图") + private Integer mapType; + + @ApiModelProperty(value = "是否使用电子围栏:0-否,1-是") + private Integer isElectricFence; + + @ApiModelProperty(value = "网络货运位置信息上报平台:0-不上报、1-部平台") + private Integer uploadLocationPlatform; + + @ApiModelProperty(value = "网络货运接入环境:0-部平台测试,1-部平台正式,2-江苏") + private Integer networkFreightEnvironment; + + @ApiModelProperty(value = "单点登录:0-否,1-是") + private Integer isSingleSign; + + @ApiModelProperty(value = "实名认证人脸识别(1-开启,2-关闭)") + private Integer faceRecognitionSwitch; + + @ApiModelProperty(value = "实名认证人脸识别服务方(1-)") + private Integer faceRecognitionProvider; + + @ApiModelProperty("营业执照OCR识别(1-开启,2-关闭)") + private Integer businessOcrSwitch; + + @ApiModelProperty("营业执照OCR识别服务方(1-E签宝)") + private Integer businessOcrProvider; + + @ApiModelProperty("身份证OCR识别") + private Integer idcardOcrSwitch; + + @ApiModelProperty("身份证OCR服务方(1-E签宝)") + private Integer idcardOcrProvider; + + @ApiModelProperty("驾驶证OCR识别(1-开启,2-关闭)") + private Integer driversOcrSwitch; + + @ApiModelProperty("驾驶证OCR识别服务方(1-E签宝)") + private Integer driversOcrProvider; + + @ApiModelProperty("行驶证OCR识别(1-开启,2-关闭)") + private Integer drivingOcrSwitch; + + @ApiModelProperty("行驶证OCR识别服务方(1-E签宝)") + private Integer drivingOcrProvider; + + @ApiModelProperty(value = "银行卡OCR识别(1-关闭,2-开启)") + private Integer bankCardOcrSwitch; + + @ApiModelProperty(value = "银行卡OCR识别服务方(1-E签宝)") + private Integer bankCardOcrProvider; + + @ApiModelProperty("从业资格证核验(1-开启,2-关闭)") + private Integer certificateVerificationSwitch; + + @ApiModelProperty("从业资格证核验服务方(1-E签宝)") + private Integer certificateVerificationProvider; + + @ApiModelProperty("道路运输经营许可证核验(1-开启,2-关闭)") + private Integer roadTransportVerification; + + @ApiModelProperty("道路运输经营许可证核验服务方(1-E签宝)") + private Integer roadTransportVerificationProvider; + + @ApiModelProperty("道路运输证核验(1-开启,2-关闭)") + private Integer transportVerificationSwitch; + + @ApiModelProperty("道路运输证核验服务方(1-)") + private Integer transportVerificationProvider; + + @ApiModelProperty(name = "组织表ID") + private Long organizationId; + + @ApiModelProperty(name = "组织表name") + private String organizationName; + + @ApiModelProperty(name = "一级组织表ID") + private Long topOrganizationId; + + @ApiModelProperty(value = "开启推广码(1-开启,2-关闭)") + private Integer isPromoCode; + + @ApiModelProperty(value = "是否推送网货上报数据(1-开启,2-关闭)") + private Integer isPushReportData; + + @ApiModelProperty(value = "是否拍照上传磅单(1-开启,2-关闭)") + private Integer takePhotoPound; + + @ApiModelProperty(value = "承运人和承运企业并存(1-开启,2-关闭)") + private Integer coexistenceRoleSwitch; + + @ApiModelProperty(value = "代收款协议生成开关(1-开启,2-关闭)") + private Integer motorcadeCollectionSwitch; + + @ApiModelProperty(value = "是否开启拼单(1-开启,2-关闭)") + private Integer splicingOrderSwitch; +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/service/OmsAddressMultiService.java b/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/service/OmsAddressMultiService.java new file mode 100644 index 000000000..f1245aa65 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/service/OmsAddressMultiService.java @@ -0,0 +1,1199 @@ +package com.mhd.oms.domain.resevationOrder.service; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.IdUtil; +import cn.hutool.core.util.ObjectUtil; +import com.aliyun.oss.ServiceException; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +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.mhd.common.core.domain.entity.R; +import com.mhd.common.core.domain.entity.SysConfigSwitch; +import com.mhd.common.core.domain.dto.wlhy.TmsShipper; +import com.mhd.common.core.domain.entity.TmsOrder; +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.thirdparty.SysDepartInterfaceInfoDTO; +import com.mhd.common.core.utils.AddressUtils; +import com.mhd.common.security.utils.SecurityUtils; +import com.mhd.oms.domain.resevationOrder.repository.facade.IOmsAddressMultiService; +import com.mhd.oms.domain.resevationOrder.repository.mapper.*; +import com.mhd.oms.enums.*; +import com.mhd.oms.infrastructure.feign.ThirdPartyServiceFeign; +import com.mhd.oms.infrastructure.feign.TransportServiceFeign; +import com.mhd.oms.interfaces.dto.resevationOrder.*; +import com.mhd.oms.util.DictDataUtils; +import com.mhd.oms.util.MultistageDictUtils; +import com.mhd.oms.util.OrderSequence; +import com.mhd.system.api.domain.*; +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.fasterxml.jackson.databind.ObjectMapper; +import com.mhd.common.core.web.domain.AjaxResult; +import com.mhd.common.core.domain.po.UserPo; +import com.mhd.user.domain.userAggregate.repository.po.UserShipperPo; +import org.apache.commons.lang.StringUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import javax.annotation.Resource; +import java.math.BigDecimal; +import java.security.InvalidKeyException; +import java.security.NoSuchAlgorithmException; +import java.security.SignatureException; +import java.security.spec.InvalidKeySpecException; +import java.util.*; +import java.util.Calendar; +import java.util.function.Function; +import java.util.stream.Collectors; + +import static org.reflections.Reflections.log; + +/** + * @author: brb + * @description: OMS发货服务实现类 + * @create: 2026-01-26 13:44 + */ +@Service +public class OmsAddressMultiService implements IOmsAddressMultiService { + + + @Resource + private ReservationOrderMapper resevationOrderMapper; + + + + + @Resource + private UserServiceFeign userServiceFeign; + + @Resource + private TransportServiceFeign transportServiceFeign; + + + @Resource + private TmsOrderAccountMapper tmsOrderAccountMapper; + + @Resource + private ThirdPartyServiceFeign thirdPartyServiceFeign; + + + @Resource + private DictDataUtils dictDataUtils; + + @Resource + private TmsOrderService tmsOrderServiceImpl; + + + + + @Transactional(rollbackFor = Exception.class) + @Override + public void save(OmsOrderAddDTO tmsOrderAddDTO) throws InvalidKeySpecException, NoSuchAlgorithmException, InvalidKeyException, SignatureException { + if (StringUtils.isBlank(tmsOrderAddDTO.getGoodsQuantity())) { + tmsOrderAddDTO.setGoodsQuantity("0"); + } + + LoginUser loginUser = SecurityUtils.getLoginUser(); + //获取登录人 +// SysUser loginUser = SecurityUtils.getLoginUser().getSysUser(); + // 从UserCenter服务获取用户信息 + AjaxResult userInfoResult = userServiceFeign.getInfo(Long.valueOf(loginUser.getUserid())); + if (!userInfoResult.get("code").toString().equals("200")) { + throw new ServiceException("获取用户信息失败"); + } + ObjectMapper objectMapper = new ObjectMapper(); + UserPo userPo = objectMapper.convertValue(userInfoResult.get("data"), UserPo.class); + + // 从UserCenter服务获取货主信息 + AjaxResult shipperInfoResult = userServiceFeign.getShipperByUserId(Long.valueOf(loginUser.getUserid())); + if (!shipperInfoResult.get("code").toString().equals("200")) { + throw new ServiceException("获取货主信息失败"); + } + UserShipperPo userShipperPo = objectMapper.convertValue(shipperInfoResult.get("data"), UserShipperPo.class); + + //2022-01-15增加代运营人根据货主id查询 + + //处理费用默认值 + handFee(tmsOrderAddDTO); +// SysConfigSwitch sysConfigSwitch = sysConfigSwitchService.queryBySysOrgCode(); //获取配置状态 + + //组织赋值 + Long organizationId = tmsOrderAddDTO.getOrganizationId(); + if (ObjectUtil.isNotEmpty(organizationId)) { + tmsOrderAddDTO.setOrgId(String.valueOf(organizationId)); + tmsOrderAddDTO.setOrgName(tmsOrderAddDTO.getOrganizationName()); + } +// if (ObjectUtil.isEmpty(sysConfigSwitch)) { +// throw new ServiceException("未获取到配置信息"); +// } +// if(1 == sysConfigSwitch.getIsTypeInsuranceUse()){ +// if(StringUtils.isEmpty(tmsOrderAddDTO.getAppointCompanyId())){ +// throw new ServiceException("未传输指定平台公司"); +// } +// } + // 获取一份副本等一会需要存储到数据库 + String swzlUserId = String.valueOf(loginUser.getUserid()); + // 使用登录用户ID作为货主ID + String appointShipperId = String.valueOf(loginUser.getUserid()); + // 使用登录用户信息作为货主信息,不再依赖appointShipperId + UserPo userPoInfo = userPo; // 直接使用已获取的登录用户信息 + + // 从UserCenter服务获取当前登录用户的货主信息 + AjaxResult shipperResult = userServiceFeign.getShipperByUserId(Long.valueOf(loginUser.getUserid())); + if (!shipperResult.get("code").toString().equals("200")) { + throw new ServiceException("您非货主角色或账号已被删除!"); + } + UserShipperPo userShipperPoInfo = objectMapper.convertValue(shipperResult.get("data"), UserShipperPo.class); + + if (userShipperPoInfo == null) { + throw new ServiceException("您非货主角色或账号已被删除!"); + } + + String orderRemark = tmsOrderAddDTO.getOrderRemark(); + tmsOrderAddDTO.setRemarks(orderRemark); + + tmsOrderAddDTO.setAppointShipperId(String.valueOf(userShipperPoInfo.getShipperId())); + // 分类处理货物列表 + List allCargoList = tmsOrderAddDTO.getCargoInfoList(); + + //获取货主月结标识, + int receivableType; + int autoAuditOrder; + if (userShipperPoInfo.getShipperType() == 2) { + // 从UserCenter服务获取企业货主信息 + AjaxResult companyShipperResult = userServiceFeign.getShipperByUserId(userShipperPoInfo.getUserId()); + if (!companyShipperResult.get("code").toString().equals("200")) { + throw new ServiceException("获取企业货主信息失败"); + } + UserShipperPo companyUserShipperPo = objectMapper.convertValue(companyShipperResult.get("data"), UserShipperPo.class); + receivableType = companyUserShipperPo.getMonthlySettlementFlag(); + autoAuditOrder = companyUserShipperPo.getIsAutoAuditOrder(); + } else { + receivableType = userShipperPoInfo.getMonthlySettlementFlag(); + autoAuditOrder = userShipperPoInfo.getIsAutoAuditOrder(); + } + tmsOrderAddDTO.setReceivableType(receivableType); + //非企业员工判断个人信息审核状态x + if (userShipperPoInfo.getShipperType() != 2 && userShipperPoInfo.getShipperFill() != 3) { // 假设3代表审核通过 + throw new ServiceException("未提交个人信息认证或认证未通过,请先认证!"); + } + //企业员工判断企业货主审核状态 + if (userShipperPoInfo.getShipperType() == 2) { + // 从UserCenter服务获取企业用户信息 + AjaxResult companyUserResult = userServiceFeign.getInfo(userShipperPoInfo.getUserId()); + if (!companyUserResult.get("code").toString().equals("200")) { + throw new ServiceException("获取企业用户信息失败"); + } + userPoInfo = objectMapper.convertValue(companyUserResult.get("data"), UserPo.class); + } + + //企业员工判断企业货主审核状态 + if (userShipperPoInfo.getShipperType() == 2) { + // 从UserCenter服务获取企业货主信息 + AjaxResult companyShipperResult = userServiceFeign.getShipperByUserId(userShipperPoInfo.getUserId()); + if (!companyShipperResult.get("code").toString().equals("200")) { + throw new ServiceException("获取企业货主信息失败"); + } + UserShipperPo companyUserShipperPo = objectMapper.convertValue(companyShipperResult.get("data"), UserShipperPo.class); + if (companyUserShipperPo.getShipperFill() != 3) { // 假设3代表审核通过 + throw new ServiceException("未提交个人信息认证或认证未通过,请先认证!"); + } + } + /** + * 生成货源单信息 + */ + ReservationOrder resevationOrder = new ReservationOrder(); + BeanUtils.copyProperties(tmsOrderAddDTO, resevationOrder, "id"); + resevationOrder.setSettlementStatus(1);//未出账 + resevationOrder.setAuditStatus(0);//未审核 + resevationOrder.setSzwlUserId(Long.valueOf(swzlUserId)); + if (resevationOrder.getLoadingDate() != null && resevationOrder.getUnloadingData() != null) { + if (resevationOrder.getUnloadingData().before(resevationOrder.getLoadingDate())) { + throw new ServiceException("装货日期不能大于卸货日期!"); + } + } + //赋值信息费收款方信息 +// if (tmsOrderAddDTO.getOrderShippingType() == 3 && tmsOrderAddDTO.getInfoFeePayeeType() != null) { +// String infoFeePayee = ""; +// if (tmsOrderAddDTO.getInfoFeePayeeType() == 0) { +// infoFeePayee = tmsOrderAddDTO.getAppointShipper();//委托方 +// } else if (tmsOrderAddDTO.getInfoFeePayeeType() == 1) { +// infoFeePayee = tmsOrderAddDTO.getRecipientName();//收货方 +// } else if (tmsOrderAddDTO.getInfoFeePayeeType() == 2) { +// infoFeePayee = tmsOrderAddDTO.getInfoFeePayee();//第三方 +// if (StringUtils.isBlank(tmsOrderAddDTO.getInfoFeePayee())) { +// throw new ServiceException("请填写信息费第三方收款方信息!"); +// } +// } +// resevationOrder.setInfoFeePayeeType(tmsOrderAddDTO.getInfoFeePayeeType()); +// if (infoFeePayee != "") { +// resevationOrder.setInfoFeePayee(infoFeePayee); +// } +// } + //根据货物重量大小赋值 + BigDecimal weightMin = new BigDecimal(0); + + // 如果订单类型不是罐车运输需要累加重量并且从千克转为吨重 + // 计算总重量并设置到订单中 + // BigDecimal totalCargoWeight = calculateTotalWeight(allCargoList, tmsOrderAddDTO.getOrderShippingType()); + // resevationOrder.setWeightMax(totalCargoWeight); + + resevationOrder.setWeightMin(weightMin); + resevationOrder.setUncollectedFreight(resevationOrder.getDeliveryFreight()); + //存入对应创建人 + resevationOrder.setCreateBy(String.valueOf(userShipperPoInfo.getShipperId())); + if (1 == userShipperPoInfo.getShipperType() || 2 == userShipperPoInfo.getShipperType()) { + resevationOrder.setCreateCompanyId(String.valueOf(userShipperPoInfo.getUserId())); + } + resevationOrder.setCreateTime(new Date()); + resevationOrder.setCreaterName(userPoInfo.getUserName());//保存创建人姓名 + resevationOrder.setCreaterPhone(userPoInfo.getUserPhone());//保存创建人电话 + resevationOrder.setRealCreateBy(String.valueOf(userPo.getUserId())); + resevationOrder.setRealCreateName(userPo.getUserName()); + resevationOrder.setAppointShipper(userShipperPoInfo.getShipperEnterpriseName());//20250-07-29修改:订单表委托方保存公司名字,而不是姓名 + String salesmanCodeNc = tmsOrderAddDTO.getSalesmanId(); + if (salesmanCodeNc != null) { + String makerCodeNc = tmsOrderServiceImpl.selectByMakerCodeNc(salesmanCodeNc); + String makerCodeNc1 = tmsOrderServiceImpl.selectByMakerCodeNc1(salesmanCodeNc); + resevationOrder.setMakerCodeNc(makerCodeNc); + resevationOrder.setSalesmanCodeNc(makerCodeNc1); + } + + String orderCode = null; + int maxRetryCount = 100; + int retryCount = 0; + + while (retryCount < maxRetryCount) { + orderCode = OrderSequence.getOrderCodeByDate(resevationOrder.getDocumentDate()); + retryCount++; + + List checkOrderCodes = resevationOrderMapper.selectList( + new QueryWrapper().eq("goods_number", orderCode) + ); + + if (CollectionUtils.isEmpty(checkOrderCodes)) { + break; + } + + if (retryCount >= maxRetryCount) { + throw new ServiceException("生成唯一订单编号失败,已达到最大重试次数:" + maxRetryCount); + } + } + + //生成货源单号 + resevationOrder.setGoodsNumber(orderCode); + List machineNumberList = new ArrayList<>(); + List goodsNameList = new ArrayList<>(); + if (ObjectUtil.isNotEmpty(allCargoList) && allCargoList.size() > 0) { + OmsCargoInfoDTO tmsCargoInfoDTO1 = allCargoList.get(0); + String goodsTypeId = tmsCargoInfoDTO1.getGoodsTypeId(); + if (ObjectUtil.isNotEmpty(goodsTypeId)) { + for (OmsCargoInfoDTO tmsCargoInfoDTO : allCargoList) { + // 处理货物名称信息 + String goodsName = buildCargoNameInfo(tmsCargoInfoDTO, tmsOrderAddDTO); + if (goodsName != null) { + goodsNameList.add(goodsName); + } + + // 处理机械编号信息 + String machineCode = extractMachineCode(tmsCargoInfoDTO); + if (machineCode != null) { + machineNumberList.add(machineCode); + } + } + } + } + List loadingAddressList = tmsOrderAddDTO.getLoadingAddressList();//装货地信息集合 + List unloadAddressList = tmsOrderAddDTO.getUnloadAddressList();//卸货地信息集合 + + /*if (CollUtil.isEmpty(loadingAddressList)) { + throw new ServiceException("请传入装货地址!"); + } + + if (CollUtil.isEmpty(unloadAddressList)) { + throw new ServiceException("请传入卸货地址!"); + }*/ + + String loadCityCounty = "", unloadCityCounty = ""; + //当是短驳的时候不走这个逻辑 + /*for (int i = 0; i < loadingAddressList.size(); i++) { + //根据行政区划代码获取省市县名称 + String areaName= sysComboService.getLoadOrUnloadName(loadingAddressList.get(i).getAreaCode()); + loadingAddressList.get(i).setAreaName(areaName); + // 简称 + String shortName= sysComboService.getCityCountyName(loadingAddressList.get(i).getAreaCode()); + loadingAddressList.get(i).setShortName(shortName); + //获取装卸货地经纬度 + String[] lng2Lat = setLngAndLat(loadingAddressList.get(i).getAreaCode(), loadingAddressList.get(i).getLongitude(), + loadingAddressList.get(i).getLatitude(), loadingAddressList.get(i).getAddress()); + if (null != lng2Lat) { + loadingAddressList.get(i).setLongitude(lng2Lat[0]); + loadingAddressList.get(i).setLatitude(lng2Lat[1]); + } + //获取装货时间 + SysDictData sysDictData = getLayTime(loadingAddressList.get(i).getLayTimeId()); + if (sysDictData != null) { + loadingAddressList.get(i).setLayTimeId(sysDictData.getDictValue()); + loadingAddressList.get(i).setLayTime(sysDictData.getDictLabel()); + } + + loadingAddressList.get(i).setSort(i); + } + for (int i = 0; i < unloadAddressList.size(); i++) { + //根据行政区划代码获取省市县名称 + //String areaName= sysComboService.getLoadOrUnloadName(unloadAddressList.get(i).getAreaCode()); + //unloadAddressList.get(i).setAreaName(areaName); + // 简称 + //String shortName= sysComboService.getCityCountyName(unloadAddressList.get(i).getAreaCode()); + //unloadAddressList.get(i).setShortName(shortName); + //获取装卸货地经纬度 + String[] lng2Lat = setLngAndLat(unloadAddressList.get(i).getAreaCode(), unloadAddressList.get(i).getLongitude(), + unloadAddressList.get(i).getLatitude(), unloadAddressList.get(i).getAddress()); + if (null != lng2Lat) { + unloadAddressList.get(i).setLongitude(lng2Lat[0]); + unloadAddressList.get(i).setLatitude(lng2Lat[1]); + } + //获取装货时间 + SysDictData sysDictData = getLayTime(unloadAddressList.get(i).getLayTimeId()); + if (sysDictData != null) { + unloadAddressList.get(i).setLayTimeId(sysDictData.getDictValue()); + unloadAddressList.get(i).setLayTime(sysDictData.getDictLabel()); + } + + + unloadAddressList.get(i).setSort(i); +// } + //多装多卸获取第一个装货地址和最后一个卸货地址 获取省市县简称 + loadCityCounty = sysComboService.getCityCountyName(loadingAddressList.get(0).getAreaCode()); + unloadCityCounty = sysComboService.getCityCountyName(unloadAddressList.get(unloadAddressList.size() - 1).getAreaCode()); + resevationOrder.setLineTitleLeft(loadCityCounty); + resevationOrder.setLineTitleRight(unloadCityCounty); + }*/ + //获取第一条装货地址和获取最后一条卸货地址 + OmsAddressMultiDTO firstAddress = loadingAddressList.get(0); + OmsAddressMultiDTO lastAddress = unloadAddressList.get(unloadAddressList.size() - 1); + resevationOrder.setLoadingAreaId(firstAddress.getAreaCode()); + resevationOrder.setLoadingName(firstAddress.getAreaCode()); + resevationOrder.setLoadingAddress(firstAddress.getAddress()); + String area = firstAddress.getAreaCode() + firstAddress.getAddress(); + /*String geo = amapService.geo(area); + String loadingLatitude = geo.substring(geo.indexOf(",") + 1); + String loadingLongitude = geo.substring(0,geo.indexOf(",")); + resevationOrder.setLoadingLongitude(loadingLongitude); + resevationOrder.setLoadingLatitude(loadingLatitude); + firstAddress.setLatitude(loadingLatitude); + firstAddress.setLongitude(loadingLongitude);*/ + resevationOrder.setLineTitleLeft(firstAddress.getAreaCode()); + resevationOrder.setLineTitleRight(lastAddress.getAreaCode()); + resevationOrder.setFreighterName(firstAddress.getContactName()); + resevationOrder.setLoadingPhone(firstAddress.getContactPhone()); + resevationOrder.setLoadingDate(firstAddress.getLayDate()); + + resevationOrder.setUnloadAreaId(lastAddress.getAreaCode()); + resevationOrder.setUnloadName(lastAddress.getAreaCode()); + resevationOrder.setUnloadAddress(lastAddress.getAddress()); + String unarea = lastAddress.getAreaCode() + lastAddress.getAddress(); + /*String ungeo = amapService.geo(unarea); + String unloadingLatitude = ungeo.substring(ungeo.indexOf(",") + 1); + String unloadingLongitude = ungeo.substring(0,ungeo.indexOf(",")); + lastAddress.setLatitude(unloadingLatitude); + lastAddress.setLongitude(unloadingLongitude); + resevationOrder.setUnloadLongitude(unloadingLongitude); + resevationOrder.setUnloadLatitude(unloadingLatitude);*/ + resevationOrder.setDischargerName(lastAddress.getContactName()); + resevationOrder.setUnloadPhone(lastAddress.getContactPhone()); + resevationOrder.setUnloadingData(lastAddress.getLayDate()); + resevationOrder.setMachineNumber(String.join(",", machineNumberList)); + // 设置货物名称,将所有货物信息用逗号连接 + resevationOrder.setGoodsName(String.join(",", goodsNameList)); + //服务要求 + SysDictData sysDictItem = new SysDictData(); + if (StringUtils.isNotBlank(tmsOrderAddDTO.getServiceRequireId())) { + String[] serviceRequireId = tmsOrderAddDTO.getServiceRequireId().split(","); + StringBuilder serviceRequire = new StringBuilder(); +// resevationOrder.setServiceRequire(findName(serviceRequireId, sysDictItem, serviceRequire)); + } + //车长车型 + if (StringUtils.isNotEmpty(tmsOrderAddDTO.getCarType())) { + String[] carType = tmsOrderAddDTO.getCarType().split(","); + StringBuilder carTypeName = new StringBuilder(); +// resevationOrder.setCarTypeName(findName(carType, sysDictItem, carTypeName)); + } + if (ObjectUtil.isNotEmpty(allCargoList) && allCargoList.size() > 0) { + OmsCargoInfoDTO tmsCargoInfoDTO1 = allCargoList.get(0); + String goodsTypeId = tmsCargoInfoDTO1.getGoodsTypeId(); + if (ObjectUtil.isNotEmpty(goodsTypeId)) { + for (OmsCargoInfoDTO tmsCargoInfoDTO : allCargoList) { + //货物重量单位id + if (StringUtils.isNotBlank(tmsCargoInfoDTO.getWeightUnitId())) { + SysDictData sysDictItem3 = dictDataUtils.getDictDataByValue(DictTypeEnum.GOODSUNIT.getTypeCode(), tmsCargoInfoDTO.getWeightUnitId()); + if (sysDictItem3 != null) { + resevationOrder.setGoodsUntis(sysDictItem3.getDictLabel()); + } + } else { + resevationOrder.setGoodsUntisId("1"); + resevationOrder.setGoodsUntis("吨"); + } + //货物数量单位id + if (StringUtils.isNotBlank(tmsCargoInfoDTO.getQuantityUnitId())) { + SysDictData sysDictItem33 = dictDataUtils.getDictDataByValue(DictTypeEnum.GOODSUNIT.getTypeCode(), tmsCargoInfoDTO.getQuantityUnitId()); + if (sysDictItem33 != null) { + tmsCargoInfoDTO.setQuantityUnit(sysDictItem33.getDictLabel()); + } + } + } + } + } + + ///是否使用电子围栏:0-否,1-是 +// Integer isElectricFence = sysConfigSwitch.getIsElectricFence(); +// if (isElectricFence != null && isElectricFence == 1) { +//// getBaseInfo("openapi", "A03"); +// String origins = resevationOrder.getLoadingLongitude() + "," + resevationOrder.getLoadingLatitude(); +// String destination = resevationOrder.getUnloadLongitude() + "," + resevationOrder.getUnloadLatitude(); +// Integer distance = AddressUtils.getDistanceBylnglat(origins, destination); +// if (distance != 0) { +// distance = distance / 1000; +// } +// //使用电子围栏时,如果装卸货地址直线距离相差5公里以上,才允许使用电子围栏 +// String electronicFenceRadius = getElectronicFenceRadius(); +// if (StringUtils.isNotBlank(electronicFenceRadius)) { +// Integer radius = Integer.parseInt(electronicFenceRadius); +// if (distance > radius) { +// //是否使用电子围栏:0-否,1-是 +// resevationOrder.setIsElectricFence(1); +// } +// } +// } + + + //配载方式名称 + if (tmsOrderAddDTO.getTransportationModeId() != null && StringUtils.isNotEmpty(tmsOrderAddDTO.getTransportationModeId() + "")) { + if (tmsOrderAddDTO.getTransportationModeId() == 0) { + resevationOrder.setTransportationName("数量配载"); + resevationOrder.setRadioValue(2); + //wxy 23-12-15日修改,数量配载时不重置需求车次为1 +// resevationOrder.setDemandTrainNumber(1); + } else if (tmsOrderAddDTO.getTransportationModeId() == 1) { + resevationOrder.setTransportationName("车次配载"); + resevationOrder.setRadioValue(1); + } + } + if (tmsOrderAddDTO.getOrderShippingType() == 3) { + resevationOrder.setTransportationName("数量配载"); + resevationOrder.setRadioValue(2); + resevationOrder.setTransportationModeId(0); + } else { + resevationOrder.setTransportationName("车次配载"); + resevationOrder.setRadioValue(1); + resevationOrder.setTransportationModeId(1); + } + //设置是否自动审核 + //自动审核用户信息(0否1是) +// SysConfigSwitch configSwitch = sysConfigSwitchService.queryBySysOrgCode(); + //查询平台业务员 + // 从UserCenter服务获取平台业务员信息 + UserDTO userDTO = new UserDTO(); + userDTO.setUserRole("platAuther"); + AjaxResult platAutherResult = AjaxResult.success(userServiceFeign.getUserByTopOrganizationUserAccount(userDTO, "oms")); + List platAutherUserList = new ArrayList<>(); + if (platAutherResult.get("code").toString().equals("200")) { + platAutherUserList.add(objectMapper.convertValue(platAutherResult.get("data"), UserPo.class)); + } + + + if (autoAuditOrder == 1) { + resevationOrder.setAuditStatus(1); + + if (platAutherUserList != null && platAutherUserList.size() > 0) { + resevationOrder.setAuditBy(String.valueOf(platAutherUserList.get(0).getUserId())); + } + } else if (autoAuditOrder == 2) { + resevationOrder.setAuditStatus(0); + if (platAutherUserList != null && platAutherUserList.size() > 0) { + resevationOrder.setAuditBy(String.valueOf(platAutherUserList.get(0).getUserId())); + } + } else { + resevationOrder.setAuditStatus(0); + } + + if (userShipperPoInfo.getShipperType() == 2) { + // 从UserCenter服务获取企业货主信息 + AjaxResult companyShipperResult = userServiceFeign.getShipperByUserId(userShipperPoInfo.getUserId()); + if (!companyShipperResult.get("code").toString().equals("200")) { + throw new ServiceException("获取企业货主信息失败"); + } + UserShipperPo companyUserShipperPo = objectMapper.convertValue(companyShipperResult.get("data"), UserShipperPo.class); + // 保持appointShipperId使用登录用户ID,与前面逻辑一致 + // appointShipperId = String.valueOf(companyUserShipperPo.getShipperId()); + } + + //货源单保存 + resevationOrder.setCreateUserId(String.valueOf(userPo.getUserId())); + resevationOrder.setOrderStatus(OrderStatusEnum.ORDER_NOT_DEPLOY.getKey()); + + // 表单验证完成后,处理物料货物自动入库(防止错误入库) + if (ObjectUtil.isNotEmpty(allCargoList) && allCargoList.size() > 0) { + OmsCargoInfoDTO tmsCargoInfoDTO = allCargoList.get(0); + String goodsTypeId = tmsCargoInfoDTO.getGoodsTypeId(); + if (ObjectUtil.isNotEmpty(goodsTypeId)) { + processMaterialInventoryInbound(Long.valueOf(swzlUserId), orderCode, allCargoList); + } + } + //保存付款方 + if (tmsOrderAddDTO.getPayerType() == 0) {//委托方 + resevationOrder.setPayer(resevationOrder.getAppointShipper()); + } else if (tmsOrderAddDTO.getPayerType() == 1) {//收货方 + resevationOrder.setPayer(resevationOrder.getRecipientName()); + } + + // 设置组织信息 + if (tmsOrderAddDTO.getOrganizationId() != null) { + resevationOrder.setOrganizationId(tmsOrderAddDTO.getOrganizationId()); + } + if (tmsOrderAddDTO.getOrganizationName() != null) { + resevationOrder.setOrganizationName(tmsOrderAddDTO.getOrganizationName()); + } + if (tmsOrderAddDTO.getTopOrganizationId() != null) { + resevationOrder.setTopOrganizationId(tmsOrderAddDTO.getTopOrganizationId()); + } + + resevationOrderMapper.insert(resevationOrder); + //保存费用科目信息 + List tmsOrderAccountList = tmsOrderAddDTO.getTmsOrderAccountList(); + if (ObjectUtil.isNotNull(tmsOrderAccountList) && tmsOrderAccountList.size() > 0) { + for (OmsOrderAccount tmsOrderAccount : tmsOrderAccountList) { + tmsOrderAccount.setIsDelete(0); + tmsOrderAccount.setOrderId(resevationOrder.getId()); + tmsOrderAccount.setCreateBy(String.valueOf(userPo.getUserId())); + tmsOrderAccount.setCreateTime(new Date()); + // 设置组织信息 + if (tmsOrderAddDTO.getOrganizationId() != null) { + tmsOrderAccount.setOrganizationId(tmsOrderAddDTO.getOrganizationId()); + } + if (tmsOrderAddDTO.getOrganizationName() != null) { + tmsOrderAccount.setOrganizationName(tmsOrderAddDTO.getOrganizationName()); + } + if (tmsOrderAddDTO.getTopOrganizationId() != null) { + tmsOrderAccount.setTopOrganizationId(tmsOrderAddDTO.getTopOrganizationId()); + } + tmsOrderAccountMapper.insert(tmsOrderAccount); + } + } + //货主增加已用额度 + if (userShipperPoInfo.getShipperType() == 2) { + // 从UserCenter服务获取企业货主信息 + AjaxResult companyShipperResult = userServiceFeign.getShipperByUserId(userShipperPoInfo.getUserId()); + if (!companyShipperResult.get("code").toString().equals("200")) { + throw new ServiceException("获取企业货主信息失败"); + } + UserShipperPo companyUserShipperPo = objectMapper.convertValue(companyShipperResult.get("data"), UserShipperPo.class); + // 更新企业货主额度信息 + // 注意:这里可能需要调用特定的API来更新额度,而不是直接修改对象 + // 可能需要通过Finance服务或其他服务来更新额度 + } else { + // 更新个人货主额度信息 + // 注意:这里可能需要调用特定的API来更新额度,而不是直接修改对象 + // 可能需要通过Finance服务或其他服务来更新额度 + } + //保存货物信息及地址信息 + +// saveAddress2CargoInfo(resevationOrder.getId(), allCargoList, loadingAddressList, unloadAddressList); + + tmsOrderAddDTO.setId(resevationOrder.getId()); + // log.info("tmsOrderAddDTO.getId()==="+tmsOrderAddDTO.getId()); +// getBaseInfo("wxaInfo", "A03"); +// //批量货生成货源小程序二维码 +// if (StringUtils.isNotBlank(wxaAppID) && StringUtils.isNotBlank(wxaAppSecret)) { +// String wxaToken = getWxaToken(); +// String wxaQrcode = getWxaQrCode(resevationOrder.getId(), wxaToken); +// if (StringUtils.isNotBlank(wxaQrcode)) { +// resevationOrder.setWxaQrcode(wxaQrcode); +// resevationOrderMapper.updateById(resevationOrder); +// } +// } + + //判断是否使用常发货物功能 +// if (null != configSwitch && 1 == configSwitch.getIsFrequentGoods()) { +// //常发货物管理 +// TmsFrequentGoodsDTO tmsFrequentGoodsDTO = new TmsFrequentGoodsDTO(); +// tmsFrequentGoodsDTO.setCarType(resevationOrder.getCarType()); +// tmsFrequentGoodsDTO.setCarTypeName(resevationOrder.getCarTypeName()); +// tmsFrequentGoodsDTO.setCreateBy(resevationOrder.getCreateBy()); +// tmsFrequentGoodsDTO.setCreateCompanyId(resevationOrder.getCreateCompanyId()); +// tmsFrequentGoodsDTO.setGoodsName(resevationOrder.getGoodsName()); +// tmsFrequentGoodsDTO.setGoodsNameId(resevationOrder.getGoodsNameId()); +// tmsFrequentGoodsDTO.setServiceRequireId(resevationOrder.getServiceRequireId()); +// tmsFrequentGoodsDTO.setServiceRequire(resevationOrder.getServiceRequire()); +// tmsFrequentGoodsDTO.setGoodsType(resevationOrder.getGoodsType()); +// tmsFrequentGoodsDTO.setGoodsTypeId(resevationOrder.getGoodsTypeId()); +// tmsFrequentGoodsDTO.setCreateTime(new Date()); +// Integer i = tmsFrequentGoodsService.check(tmsFrequentGoodsDTO); +// //如果常用无该货物则添加至常用货物 +// if (0 == i) { +// // tmsFrequentGoodsService.save(tmsFrequentGoodsDTO); +// } +// } + // getQrCodeUrl(resevationOrder.getId()); + //添加订单日志 +// List logList = new ArrayList<>(); +// TmsOperationTrack orderLogTrack = new TmsOperationTrack(); +// orderLogTrack.setWaybillId(resevationOrder.getId()); +// orderLogTrack.setOrderType(1); +// orderLogTrack.setCreateBy(userPo.getUserId()); +// orderLogTrack.setCreateByName(userPo.getUserName()); +// orderLogTrack.setCreateTime(new Date()); +// orderLogTrack.setSysOrgCode(userPo.getOrgCode()); +// orderLogTrack.setOperateType(OrderOperateEnum.create_order.getKey()); +// orderLogTrack.setOperate(OrderOperateEnum.create_order.getValue()); +// orderLogTrack.setContent("订单号:" + resevationOrder.getGoodsNumber()); +// logList.add(orderLogTrack); +// boolean logSave = tmsOperationTrackService.saveBatch(logList); +// if (!logSave) { +// throw new ServiceException("操作日志记录异常!"); +// } + + //查询运单号编码前缀 + //TmsInformationPlatform transporPreCode = tmsInformationPlatformMapper.selectAgreementByCode("freightPreCode"); + /** + * 发布货源,自动生成运输单信息,企业批量货不指定司机时,不生成运单, + * 即下方运单信息保存时,未指定司机的批量货不保存运单信息 + */ + //2024年2月3日 接单拒单功能:此处指定承运人后无需生成运单 + //2024年4月3日 接单拒单功能修改:改为正常生成运单但接单状态为未接单 + //2024年4月22日 更新逻辑,普通单和竞价单都需要走货原单生成,但是竞价单此处不生成运单 + //当是短驳的时候不走这个逻辑 +// if (null != tmsOrderAddDTO.getWaybillType() && 5 != tmsOrderAddDTO.getWaybillType() && 7 != tmsOrderAddDTO.getWaybillType() && tmsOrderAddDTO.getWaybillMode()!=1) { +// saveTransportNote(tmsOrderAddDTO, tmsOrder, taxactionEntity, user, orderCode, tmsShipper); +// +// } +//// } +// if (tmsOrderAddDTO.getWaybillMode() == 1) { +// //**20210617brb*/* +// //货源类型是批量货和竞价模式 +// TmsBidingDocument tmsBidingDocument = new TmsBidingDocument(); +// tmsBidingDocument.setCreateBy(userPoInfo.getUserId()); +// tmsBidingDocument.setCreateTime(new Date()); +// tmsBidingDocument.setHighestPrice(tmsOrderAddDTO.getHighestPrice()); +// tmsBidingDocument.setBidingDocumentName(loadCityCounty + unloadCityCounty);//标书名称——需更改 +// tmsBidingDocument.setContractLogistics(0); +// tmsBidingDocument.setBidEvaluationType(tmsOrderAddDTO.getBidEvaluationType()); +// tmsBidingDocument.setDeadlineForBidding(tmsOrderAddDTO.getLatestBiddingTime()); + +// String loadingTime = resevationOrder.getLoadingTime(); +// Date loadingDate = resevationOrder.getLoadingDate(); +// String unloadingTime = resevationOrder.getUnloadingTime(); +// Date unloadingDate = resevationOrder.getUnloadingData(); +// if (StringUtils.isNotBlank(loadingTime)){ +// Calendar cal = Calendar.getInstance(); +// cal.setTime(loadingDate); +// if ("全天".equals(loadingTime) || "下午".equals(loadingTime)){ +// loadingDate = setDate(cal, 24); +// }else if ("上午".equals(loadingTime)){ +// loadingDate = setDate(cal, 12); +// } +// } +// if (StringUtils.isNotBlank(unloadingTime)){ +// Calendar cal = Calendar.getInstance(); +// cal.setTime(unloadingDate); +// if ("全天".equals(unloadingTime) || "下午".equals(unloadingTime)){ +// loadingDate = setDate(cal, 24); +// }else if ("上午".equals(unloadingTime)){ +// loadingDate = setDate(cal, 12); +// } +// } + + //判断竞价截止时间不能大于当前订单装卸货时间 +// if (tmsOrderAddDTO.getLatestBiddingTime() != null +// && (tmsOrderAddDTO.getLatestBiddingTime().compareTo(loadingDate) > 0 +// || tmsOrderAddDTO.getLatestBiddingTime().compareTo(unloadingDate) > 0)) { +// throw new ServiceException("竞价时间不能晚于装货时间/卸货时间"); +// } + +// tmsBidingDocument.setPresetPrice(tmsOrderAddDTO.getPresetPrice()); +// if (userShipperPoInfo.getShipperType() != 0) { +// tmsBidingDocument.setCreateCompanyId(userShipperPoInfo.getUserId()); +// } +// tmsBidingDocument.setOrderId(resevationOrder.getId()); +// // tmsBidingDocumentMapper.insert(tmsBidingDocument); +// TmsBidingDocumentLine tmsBidingDocumentLine = new TmsBidingDocumentLine(); +// tmsBidingDocumentLine.setOrderId(resevationOrder.getId()); +// tmsBidingDocumentLine.setGoodsNumber(resevationOrder.getGoodsNumber()); +// tmsBidingDocumentLine.setBidingDocumentId(tmsBidingDocument.getId()); +// tmsBidingDocumentLine.setCreateCompanyId(tmsBidingDocument.getCreateCompanyId()); +// tmsBidingDocumentLine.setCreateBy(userPoInfo.getUserId()); +// tmsBidingDocumentLine.setLineName(loadCityCounty + unloadCityCounty); +// //(0-企业货源、1-撮合货(普通货)、2-短驳 +//// tmsBidingDocumentLine.setWaybillType(tmsOrderAddDTO.getWaybillType()); +// if (tmsOrderAddDTO.getTransportationModeId() != null) { +// if (tmsOrderAddDTO.getTransportationModeId() == 0) { +// tmsBidingDocumentLine.setTransportationModeId(0); +// tmsBidingDocumentLine.setTransportationName("数量配载"); +// } else if (tmsOrderAddDTO.getTransportationModeId() == 1) { +// tmsBidingDocumentLine.setTransportationModeId(1); +// tmsBidingDocumentLine.setTransportationName("车次配载"); +// } +// } +//// tmsBidingDocumentLine.setDemandTrainNumber(tmsOrderAddDTO.getDemandTrainNumber()); +// tmsBidingDocumentLine.setLoadingAddress(tmsOrderAddDTO.getLoadingAddress()); +// tmsBidingDocumentLine.setUnloadAddress(tmsOrderAddDTO.getUnloadAddress()); +// tmsBidingDocumentLine.setDischargerName(tmsOrderAddDTO.getDischargerName()); +// tmsBidingDocumentLine.setFreighterName(tmsOrderAddDTO.getFreighterName()); +// tmsBidingDocumentLine.setUnloadPhone(tmsOrderAddDTO.getUnloadPhone()); +// tmsBidingDocumentLine.setLoadingPhone(tmsOrderAddDTO.getLoadingPhone()); +// if (StringUtils.isNotBlank(tmsOrderAddDTO.getGoodsTypeId())) { +// SysMultistageDictPo goodsType = multistageDictUtils.getMultistageDictByCode("goods_name", tmsOrderAddDTO.getGoodsTypeId()); +// if (goodsType != null) { +// tmsBidingDocumentLine.setGoodsName(goodsType.getMultistageDictName()); +// } +// tmsBidingDocumentLine.setGoodsNameId(tmsOrderAddDTO.getGoodsTypeId()); +// } +// if (StringUtils.isNotEmpty(tmsOrderAddDTO.getGoodsName())) { +// if (StringUtils.isNotEmpty(tmsBidingDocumentLine.getGoodsName())) { +// tmsBidingDocumentLine.setGoodsName(tmsBidingDocumentLine.getGoodsName() + tmsOrderAddDTO.getGoodsName()); +// } else { +// tmsBidingDocumentLine.setGoodsName(tmsOrderAddDTO.getGoodsName()); +// } +// } +// if (tmsOrderAddDTO.getWeightMin() != null && tmsOrderAddDTO.getWeightMin().compareTo(BigDecimal.ZERO) > 0) { +// tmsBidingDocumentLine.setGoodsWeight(Double.parseDouble(tmsOrderAddDTO.getWeightMin().toString())); +// } else if (tmsOrderAddDTO.getWeightMax() != null && tmsOrderAddDTO.getWeightMax().compareTo(BigDecimal.ZERO) > 0) { +// tmsBidingDocumentLine.setGoodsWeight(Double.parseDouble(tmsOrderAddDTO.getWeightMax().toString())); +// } +// +// //货物重量单位id +// SysDictData sysDictItemTwo = dictDataUtils.getDictDataByValue(DictTypeEnum.GOODSUNIT.getTypeCode(), tmsOrderAddDTO.getGoodsUntisId()); +// if (sysDictItemTwo != null) { +// tmsBidingDocumentLine.setGoodsUntis(sysDictItemTwo.getDictLabel()); +// } +// tmsBidingDocumentLine.setGoodsUntisId(tmsOrderAddDTO.getGoodsUntisId()); +// +// tmsBidingDocumentLine.setRemarks(tmsOrderAddDTO.getRemarks());// +// +// tmsBidingDocumentLine.setLoadingDate(tmsOrderAddDTO.getLoadingDate());// +// +// tmsBidingDocumentLine.setUnloadingData(tmsOrderAddDTO.getUnloadingData()); +// //获取装货地省市县名称 +// tmsBidingDocumentLine.setLoadingAreaId(tmsOrderAddDTO.getLoadingAreaId()); +// //String loadingName = sysComboService.getLoadOrUnloadName(tmsOrderAddDTO.getLoadingAreaId()); +// String loadingName = tmsOrderAddDTO.getLoadingAreaId(); +// tmsBidingDocumentLine.setLoadingName(loadingName); +// //获取卸货地省市县名称 +// tmsBidingDocumentLine.setUnloadAreaId(tmsOrderAddDTO.getUnloadAreaId()); +// //String unloadName = sysComboService.getLoadOrUnloadName(tmsOrderAddDTO.getUnloadAreaId()); +// String unloadName = tmsOrderAddDTO.getUnloadAreaId(); +// tmsBidingDocumentLine.setUnloadName(unloadName); +// /* 计算运距 */ +// if (StringUtils.isNotEmpty(loadingName) && StringUtils.isNotEmpty(unloadName)) { +// AmapDTO amapDTO = new AmapDTO(); +// amapDTO.setLoadingAddress(tmsBidingDocumentLine.getLoadingName() + tmsBidingDocumentLine.getLoadingAddress()); +// amapDTO.setLoadingAreaId(tmsBidingDocumentLine.getLoadingAreaId()); +// amapDTO.setUnloadAddress(tmsBidingDocumentLine.getUnloadName() + tmsBidingDocumentLine.getUnloadAddress()); +// amapDTO.setUnloadAreaId(tmsBidingDocumentLine.getUnloadAreaId()); +// //String haulDistance = amapService.queryDistance(amapDTO); +// //tmsBidingDocumentLine.setHaulDistance(new BigDecimal(haulDistance).multiply(new BigDecimal("0.001"))); +// } +// tmsBidingDocumentLine.setMaximumBidPrice(tmsOrderAddDTO.getMaximumBidPrice()); +// tmsBidingDocumentLine.setHighestPrice(tmsOrderAddDTO.getHighestPrice()); +// +// //自动生成协议费用 +// if (null != sysConfigSwitch.getIsAutoGenerateProtocol() && sysConfigSwitch.getIsAutoGenerateProtocol() == 1) { +//// BigDecimal receiptPaymentAmount = tmsOrderAddDTO.getReceiptPaymentAmount(); +//// BigDecimal cashAdvance = tmsOrderAddDTO.getCashAdvance(); +//// BigDecimal freightAmount = tmsOrderAddDTO.getFreightAmount(); +//// BigDecimal oilCardOnline = tmsOrderAddDTO.getOilCardOnline(); +//// if (freightAmount == null) { +//// throw new ServiceException("请输入到付运费!"); +//// } +//// tmsBidingDocumentLine.setFreightAmount(freightAmount); +//// tmsBidingDocumentLine.setCashAdvance(cashAdvance); +//// tmsBidingDocumentLine.setReceiptPaymentAmount(receiptPaymentAmount); +//// tmsBidingDocumentLine.setOilCardOnline(oilCardOnline); +// tmsBidingDocumentLine.setIsAutoGenerateProtocol(sysConfigSwitch.getIsAutoGenerateProtocol()); +//// tmsBidingDocumentLine.setFreightGross(tmsOrderAddDTO.getFreightGross()); +//// if (null != tmsOrderAddDTO.getOilValue() && tmsOrderAddDTO.getOilValue() == 0) { +//// if (null != tmsOrderAddDTO.getFreightGross()) { +//// oilCardOnline = tmsOrderAddDTO.getFreightGross().multiply(tmsOrderAddDTO.getOilCardOnline().divide(BigDecimal.valueOf(100))).setScale(2, BigDecimal.ROUND_HALF_UP); +//// tmsBidingDocumentLine.setOilCardOnline(oilCardOnline); +//// +//// } else { +//// throw new ServiceException("单车总运费不能为空!"); +//// } +//// } +// } else if (null != sysConfigSwitch.getIsAutoGenerateProtocol() && sysConfigSwitch.getIsAutoGenerateProtocol() == 0) { +// tmsBidingDocumentLine.setFreightAmount(BigDecimal.ZERO); +// tmsBidingDocumentLine.setCashAdvance(BigDecimal.ZERO); +// tmsBidingDocumentLine.setReceiptPaymentAmount(BigDecimal.ZERO); +// tmsBidingDocumentLine.setOilCardOnline(BigDecimal.ZERO); +// tmsBidingDocumentLine.setIsAutoGenerateProtocol(sysConfigSwitch.getIsAutoGenerateProtocol()); +// } + +// tmsBidingDocumentLine.setServiceRate(tmsOrderAddDTO.getServiceRate()); +// tmsBidingDocumentLine.setSingleVehicleWeight(tmsOrderAddDTO.getSingleVehicleWeight()); + + // tmsBidingDocumentLineMapper.insert(tmsBidingDocumentLine); +// } + + + } + + /** + * 处理前端费用为null的情况 + * @param tmsOrderAddDTO + */ + private void handFee (OmsOrderAddDTO tmsOrderAddDTO) { + tmsOrderAddDTO.setWeightMin( tmsOrderAddDTO.getWeightMin() == null ? BigDecimal.ZERO : tmsOrderAddDTO.getWeightMin()); + tmsOrderAddDTO.setWeightMax( tmsOrderAddDTO.getWeightMax() == null ? BigDecimal.ZERO : tmsOrderAddDTO.getWeightMax()); +// tmsOrderAddDTO.setFreightHope( tmsOrderAddDTO.getFreightHope() == null ? BigDecimal.ZERO : tmsOrderAddDTO.getFreightHope()); + tmsOrderAddDTO.setDeliveryFreight( tmsOrderAddDTO.getDeliveryFreight() == null ? BigDecimal.ZERO : tmsOrderAddDTO.getDeliveryFreight()); + tmsOrderAddDTO.setTransportationUnitPrice( tmsOrderAddDTO.getTransportationUnitPrice() == null ? BigDecimal.ZERO : tmsOrderAddDTO.getTransportationUnitPrice()); +// tmsOrderAddDTO.setCarriageNumber( tmsOrderAddDTO.getCarriageNumber() == null ? 0 : tmsOrderAddDTO.getCarriageNumber()); +// tmsOrderAddDTO.setGoodsValue( tmsOrderAddDTO.getGoodsValue() == null ? BigDecimal.ZERO : tmsOrderAddDTO.getGoodsValue()); +// tmsOrderAddDTO.setAllowableLoss( tmsOrderAddDTO.getAllowableLoss() == null ? BigDecimal.ZERO : tmsOrderAddDTO.getAllowableLoss()); +// tmsOrderAddDTO.setLossDeductionAmount( tmsOrderAddDTO.getLossDeductionAmount() == null ? BigDecimal.ZERO : tmsOrderAddDTO.getLossDeductionAmount()); + tmsOrderAddDTO.setHighestPrice( tmsOrderAddDTO.getHighestPrice() == null ? BigDecimal.ZERO : tmsOrderAddDTO.getHighestPrice()); + tmsOrderAddDTO.setMaximumBidPrice( tmsOrderAddDTO.getMaximumBidPrice() == null ? BigDecimal.ZERO : tmsOrderAddDTO.getMaximumBidPrice()); +// tmsOrderAddDTO.setServiceRate( tmsOrderAddDTO.getServiceRate() == null ? BigDecimal.ZERO : tmsOrderAddDTO.getServiceRate()); +// tmsOrderAddDTO.setFreightGross( tmsOrderAddDTO.getFreightGross() == null ? BigDecimal.ZERO : tmsOrderAddDTO.getFreightGross()); +// tmsOrderAddDTO.setReceiptPaymentAmount( tmsOrderAddDTO.getReceiptPaymentAmount() == null ? BigDecimal.ZERO : tmsOrderAddDTO.getReceiptPaymentAmount()); +// tmsOrderAddDTO.setCashAdvance( tmsOrderAddDTO.getCashAdvance() == null ? BigDecimal.ZERO : tmsOrderAddDTO.getCashAdvance()); +// tmsOrderAddDTO.setFreightAmount( tmsOrderAddDTO.getFreightAmount() == null ? BigDecimal.ZERO : tmsOrderAddDTO.getFreightAmount()); +// tmsOrderAddDTO.setOilCardOnline( tmsOrderAddDTO.getOilCardOnline() == null ? BigDecimal.ZERO : tmsOrderAddDTO.getOilCardOnline()); +// tmsOrderAddDTO.setSingleVehicleWeight( tmsOrderAddDTO.getSingleVehicleWeight() == null ? BigDecimal.ZERO : tmsOrderAddDTO.getSingleVehicleWeight()); + } + + /** + * 构建货物名称信息 + * @param tmsCargoInfoDTO 货物信息 + * @param tmsOrderAddDTO 订单信息 + * @return 格式化的货物名称字符串,如果货物名称为空则返回null + */ + private String buildCargoNameInfo(OmsCargoInfoDTO tmsCargoInfoDTO, OmsOrderAddDTO tmsOrderAddDTO) { + // 早期返回:如果货物名称为空,返回null + if (tmsCargoInfoDTO.getCargoName() == null || StringUtils.isEmpty(tmsCargoInfoDTO.getCargoName())) { + return null; + } + + StringBuilder goodsInfo = new StringBuilder(); + goodsInfo.append(tmsCargoInfoDTO.getCargoName()); + + // 根据订单类型处理不同的拼接逻辑 + boolean isTankTransport = Objects.equals(tmsOrderAddDTO.getOrderShippingType(), OrderType.TANK_TRANSPORT.getCode()); + + if (isTankTransport) { + // 罐车运输:使用cargoTonnage + goodsInfo.append("*").append(tmsCargoInfoDTO.getCargoTonnage()).append("吨"); + } else { + // 非罐车运输:使用cargoNum和cargoUnitName + if (tmsCargoInfoDTO.getCargoNum() != null) { + goodsInfo.append("*").append(tmsCargoInfoDTO.getCargoNum()); + } + + if (tmsCargoInfoDTO.getCargoUnitName() != null && StringUtils.isNotEmpty(tmsCargoInfoDTO.getCargoUnitName())) { + goodsInfo.append(tmsCargoInfoDTO.getCargoUnitName()); + } + } + + return goodsInfo.toString(); + } + + /** + * 提取机械编号信息 + * @param tmsCargoInfoDTO 货物信息 + * @return 机械编号字符串,如果机械编号为空则返回null + */ + private String extractMachineCode(OmsCargoInfoDTO tmsCargoInfoDTO) { + // 早期返回:如果机械编号为空,返回null + if (tmsCargoInfoDTO.getMachineCode() == null || StringUtils.isEmpty(tmsCargoInfoDTO.getMachineCode())) { + return null; + } + + return tmsCargoInfoDTO.getMachineCode(); + } + /** + * 查询电子围栏的半径信息 + */ + public String getElectronicFenceRadius(){ + SysDepartInterfaceInfoDTO sysDepartInterfaceInfoDTO = new SysDepartInterfaceInfoDTO(); + sysDepartInterfaceInfoDTO.setInterfaceType("electronic_fence"); + sysDepartInterfaceInfoDTO.setInterfaceTypeKey("electronic_fence"); + List sysDepartInterfaceInfoPos = thirdPartyServiceFeign.queryListByFeign(sysDepartInterfaceInfoDTO); + if (CollUtil.isEmpty(sysDepartInterfaceInfoPos) || sysDepartInterfaceInfoPos.size() > 1) { + throw new ServiceException("电子围栏业务参数配置获取失败"); + } + return sysDepartInterfaceInfoPos.get(0).getInterfaceTypeValue(); + } + + private void processMaterialInventoryInbound(Long swzlUserId, String tmsOrderNo, List allCargoList) { + // 1. 库存货物:cargoType = STOCK + List stockCargoList = allCargoList.stream() + .filter(cargoInfo -> CargoTypeEnum.STOCK.getCode().equals(cargoInfo.getCargoType())) + .collect(Collectors.toList()); + + // 2. 物料货物:cargoType = MATERIAL + List materialCargoList = allCargoList.stream() + .filter(cargoInfo -> CargoTypeEnum.MATERIAL.getCode().equals(cargoInfo.getCargoType())) + .collect(Collectors.toList()); + + // 3. 手动输入货物:cargoType = MANUAL + List manualCargoList = allCargoList.stream() + .filter(cargoInfo -> CargoTypeEnum.MANUAL.getCode().equals(cargoInfo.getCargoType())) + .collect(Collectors.toList()); + + log.info("货物分类统计 - 总数: {}, 库存货物: {}, 物料货物: {}, 手动输入货物: {}", + allCargoList.size(), stockCargoList.size(), materialCargoList.size(), manualCargoList.size()); + + // 只对物料货物执行自动入库逻辑 + if (!materialCargoList.isEmpty()) { + log.info("开始处理物料货物入库,物料数量: {}", materialCargoList.size()); + + InboundOrderDTO.Create stockCreateDTO = new InboundOrderDTO.Create(); + stockCreateDTO.setOwnerId(swzlUserId); + stockCreateDTO.setTmsOrderNo(tmsOrderNo); + stockCreateDTO.setRemarks("TMS自动入库"); + stockCreateDTO.setDetails(getStockCreateDetailForMaterials(materialCargoList)); + + R r = transportServiceFeign.createInboundOrder(stockCreateDTO); + if (r.getCode() != 200 || Objects.isNull(r.getData())) { + throw new ServiceException(r.getMsg()); + } + + R> inventoryResult = transportServiceFeign.getInventoryItemByInboundOrderId( + r.getData()); + if (inventoryResult.getCode() != 200 || CollectionUtil.isEmpty(inventoryResult.getData())) { + throw new ServiceException(r.getMsg()); + } + + Map materialToInventoryMap = inventoryResult + .getData() + .stream() + .collect(Collectors.toMap(com.mhd.oms.infrastructure.feign.po.Inventory::getMaterialId, com.mhd.oms.infrastructure.feign.po.Inventory::getId)); + + // 更新物料货物的goodsTypeId + for (OmsCargoInfoDTO cargoInfo : materialCargoList) { + if (Objects.nonNull(cargoInfo.getGoodsTypeId())) { + Long materialId = Long.valueOf(cargoInfo.getGoodsTypeId()); + Long inventoryId = materialToInventoryMap.get(materialId); + if (Objects.nonNull(inventoryId)) { + cargoInfo.setGoodsTypeId(String.valueOf(inventoryId)); + log.info("物料货物goodsTypeId已更新: 物料ID {} -> 库存ID {}", materialId, inventoryId); + } else { + log.warn("未找到物料ID {} 对应的库存ID", materialId); + } + } + } + + log.info("物料货物入库处理完成,并已更新goodsTypeId为对应的inventoryId"); + } + + // 手动输入货物直接跳过入库操作,后续会直接保存到数据库 + if (!manualCargoList.isEmpty()) { + log.info("发现 {} 个手动输入的货物条目,将跳过入库操作直接保存", manualCargoList.size()); + } + } + + /** + * 为物料货物创建入库单明细 + * @param materialCargoList 物料货物列表 + * @return 入库单明细列表 + */ + private static List getStockCreateDetailForMaterials(List materialCargoList) { + return materialCargoList + .stream() + .map((item) -> { + InboundOrderDTO.Detail detail = new InboundOrderDTO.Detail(); + detail.setMaterialId(Long.valueOf(item.getGoodsTypeId())); + detail.setQuantity(item.getCargoNum()); + detail.setMachineSerialNo(item.getMachineCode()); + return detail; + }) + .collect(Collectors.toList()); + } + + @Override + public boolean saveBatch(Collection entityList, int batchSize) { + return false; + } + + @Override + public boolean saveOrUpdateBatch(Collection entityList, int batchSize) { + return false; + } + + @Override + public boolean updateBatchById(Collection entityList, int batchSize) { + return false; + } + + @Override + public boolean saveOrUpdate(ReservationOrder entity) { + return false; + } + + @Override + public ReservationOrder getOne(Wrapper queryWrapper, boolean throwEx) { + return null; + } + + @Override + public Map getMap(Wrapper queryWrapper) { + return Collections.emptyMap(); + } + + @Override + public V getObj(Wrapper queryWrapper, Function mapper) { + return null; + } + + @Override + public BaseMapper getBaseMapper() { + return null; + } + + +// private void saveAddress2CargoInfo(String id, List cargoInfoList, List loadingAddressList, List unloadAddressList) { +// +// //根据ID先删除货物、装卸货信息 +// Snowflake snowflake = IdUtil.createSnowflake(1, 1); +// if (ObjectUtil.isNotEmpty(cargoInfoList)&&cargoInfoList.size()>0) { +// OmsCargoInfoDTO tmsCargoInfoDTO1 = cargoInfoList.get(0); +// String goodsTypeId = tmsCargoInfoDTO1.getGoodsTypeId(); +// if (ObjectUtil.isNotEmpty(goodsTypeId)) { +// tmsCargoInfoMapper.delete(new LambdaQueryWrapper().eq(TmsCargoInfo::getOrderId, id)); +// List tmsCargoInfoList = new ArrayList<>(); +// for (OmsCargoInfoDTO tmsCargoInfoDTO : cargoInfoList) { +// OmsCargoInfo tmsCargoInfo = new TmsCargoInfo(); +// BeanUtils.copyProperties(tmsCargoInfoDTO, tmsCargoInfo); +// log.info("{}", tmsCargoInfo); +// tmsCargoInfo.setId(snowflake.nextIdStr()); +// tmsCargoInfo.setCreateTime(new Date()); +// tmsCargoInfo.setUpdateTime(new Date()); +// tmsCargoInfo.setOrderId(id); +// tmsCargoInfo.setCargoWeight(tmsCargoInfoDTO.getWeight()==null ? BigDecimal.ZERO: tmsCargoInfoDTO.getWeight()); +// tmsCargoInfo.setCargoVolume(tmsCargoInfoDTO.getMaterialVolume()==null ? BigDecimal.ZERO: tmsCargoInfoDTO.getMaterialVolume()); +// tmsCargoInfo.setCargoContent(tmsCargoInfoDTO.getMaterialContent()); +// tmsCargoInfo.setCargoNum(tmsCargoInfoDTO.getCargoNum()==null ? BigDecimal.ZERO: tmsCargoInfoDTO.getCargoNum()); +// tmsCargoInfo.setRemark(tmsCargoInfoDTO.getRemark()); +// tmsCargoInfoList.add(tmsCargoInfo); +// } +// tmsCargoInfoMapper.insertBatch(tmsCargoInfoList); +// } +// } +// +// tmsAddressMultiMapper.delete(new LambdaQueryWrapper().eq(TmsAddressMulti::getOrderId, id)); +// List addressMultiList = new ArrayList<>(); +// for (TmsAddressMultiDTO addressMultiDTO : loadingAddressList) { +// TmsAddressMulti tmsAddressMulti = new TmsAddressMulti(); +// BeanUtils.copyProperties(addressMultiDTO, tmsAddressMulti); +// tmsAddressMulti.setId(snowflake.nextIdStr()); +// tmsAddressMulti.setCreateTime(new Date()); +// tmsAddressMulti.setUpdateTime(new Date()); +// tmsAddressMulti.setOrderId(id); +// tmsAddressMulti.setLayType(1); +// tmsAddressMulti.setSort(addressMultiDTO.getSort()); +// tmsAddressMulti.setShortName(tmsAddressMulti.getAreaName()); +// addressMultiList.add(tmsAddressMulti); +// } +// for (TmsAddressMultiDTO addressMultiDTO : unloadAddressList) { +// TmsAddressMulti tmsAddressMulti = new TmsAddressMulti(); +// BeanUtils.copyProperties(addressMultiDTO, tmsAddressMulti); +// tmsAddressMulti.setId(snowflake.nextIdStr()); +// tmsAddressMulti.setCreateTime(new Date()); +// tmsAddressMulti.setUpdateTime(new Date()); +// tmsAddressMulti.setOrderId(id); +// tmsAddressMulti.setShortName(tmsAddressMulti.getAreaName()); +// addressMultiList.add(tmsAddressMulti); +// } +// tmsAddressMultiMapper.insertBatch(addressMultiList); +// } + + +// public void getBaseInfo(String interfaceType,String sysOrgCode) { +// //获取网上行短信发送平台信息 +// List sysDepartInterfaceInfoList = sysDepartInterfaceInfoMapper.queryListByInterfaceTypeSysOrgCode(interfaceType,sysOrgCode); +// for (SysDepartInterfaceInfo sysDepartInterfaceInfo : sysDepartInterfaceInfoList) { +// String interfaceTypeKey = sysDepartInterfaceInfo.getInterfaceTypeKey();//接口参数 +// String interfaceTypeValue = sysDepartInterfaceInfo.getInterfaceTypeValue();//接口参数值 +// switch (interfaceTypeKey) { +// case "wxaAppID": +// wxaAppID = interfaceTypeValue; +// break; +// case "wxaAppSecret": +// wxaAppSecret = interfaceTypeValue; +// break; +// case "wxaToPage": +// wxaToPage = interfaceTypeValue; +// break; +// case "requestHyb": +// requestHyb = interfaceTypeValue; +// break; +// case "apiSecret": +// apiSecret = interfaceTypeValue; +// break; +// case "agentId": +// agentId = interfaceTypeValue; +// break; +// case "url": +// url = interfaceTypeValue; +// break; +// default: +// break; +// } +// } +// } + +// /** +// * 查询编码对应名称 +// * +// * @param serviceRequireId +// * @param sysDictItem +// * @param serviceRequire +// * @return +// */ +// private String findName(String[] serviceRequireId, SysDictData sysDictItem, StringBuilder serviceRequire) { +// List dictDataList = dictDataUtils.getDictDataList(); +// Map> map = dictDataList.stream().collect(Collectors.groupingBy(SysDictData::getDictType)); +// List dictData = new ArrayList<>(); +// if (map != null){ +// if (map.get(DictTypeEnum.SERVICE_REQUIREMENT.getTypeCode()) != null){ +// dictData.addAll(map.get(DictTypeEnum.SERVICE_REQUIREMENT.getTypeCode())); +// } +// if (map.get(DictTypeEnum.VEHICLE_LENGTH.getTypeCode()) != null){ +// dictData.addAll(map.get(DictTypeEnum.VEHICLE_LENGTH.getTypeCode())); +// } +// if (map.get(DictTypeEnum.VEHICLE_TYPE.getTypeCode()) != null){ +// dictData.addAll(map.get(DictTypeEnum.VEHICLE_TYPE.getTypeCode())); +// } +// } +// if(dictData != null && dictData.size()>0){ +// for (int i = 0; i < serviceRequireId.length; i++) { +// if (serviceRequireId[i].length() > 0) { +// sysDictItem = dictDataUtils.getDictData(dictData, serviceRequireId[i]); +// if (sysDictItem != null){ +// serviceRequire.append(sysDictItem.getDictLabel()); +// if (i < serviceRequireId.length - 1) { +// serviceRequire.append(","); +// } +// } +// } +// } +// } +// return serviceRequire.toString(); +// } + + + +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/service/SysConfigSwitchService.java b/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/service/SysConfigSwitchService.java new file mode 100644 index 000000000..e9bc165c2 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/service/SysConfigSwitchService.java @@ -0,0 +1,18 @@ +package com.mhd.oms.domain.resevationOrder.service; + +import com.mhd.common.core.domain.entity.SysConfigSwitch; + +/** + * @Description: 系统配置开关服务接口 + * @Author: + * @Date: 2026-01-26 + * @Version: V1.0 + */ +public interface SysConfigSwitchService { + /** + * 根据系统组织代码查询配置 + * + * @return 系统配置开关对象 + */ + SysConfigSwitch queryBySysOrgCode(); +} \ No newline at end of file diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/service/TmsOrderService.java b/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/service/TmsOrderService.java new file mode 100644 index 000000000..2f8f4575e --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/service/TmsOrderService.java @@ -0,0 +1,25 @@ +package com.mhd.oms.domain.resevationOrder.service; + +/** + * @Description: TMS订单服务接口 + * @Author: + * @Date: 2026-01-26 + * @Version: V1.0 + */ +public interface TmsOrderService { + /** + * 根据销售员代码查询制单人代码 + * + * @param salesmanCode 销售员代码 + * @return 制单人代码 + */ + String selectByMakerCodeNc(String salesmanCode); + + /** + * 根据销售员代码查询制单人代码1 + * + * @param salesmanCode 销售员代码 + * @return 制单人代码1 + */ + String selectByMakerCodeNc1(String salesmanCode); +} \ No newline at end of file diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/service/impl/SysConfigSwitchServiceImpl.java b/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/service/impl/SysConfigSwitchServiceImpl.java new file mode 100644 index 000000000..dba13640b --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/service/impl/SysConfigSwitchServiceImpl.java @@ -0,0 +1,111 @@ +//package com.mhd.oms.domain.resevationOrder.service.impl; +// +//import cn.hutool.core.collection.CollUtil; +//import cn.hutool.core.util.ObjectUtil; +//import cn.hutool.json.JSONUtil; +//import com.alibaba.fastjson.JSON; +//import com.alibaba.fastjson2.JSONObject; +//import com.mhd.common.core.domain.entity.SysConfigSwitch; +//import com.mhd.common.core.domain.po.thirdparty.SysDepartInterfaceInfoPo; +//import com.mhd.common.core.domain.thirdparty.SysDepartInterfaceInfoDTO; +//import com.mhd.common.core.exception.ServiceException; +//import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException; +//import com.mhd.common.core.exception.digitalLogisticsException.UserError; +//import com.mhd.common.core.utils.IgnoreNullUtil; +//import com.mhd.common.core.web.domain.AjaxResult; +//import com.mhd.common.security.utils.SecurityUtils; +//import com.mhd.oms.domain.resevationOrder.service.SysConfigSwitchService; +//import com.mhd.system.api.domain.WlhyLoginUser; +//import com.mhd.system.api.model.LoginUser; +//import org.springframework.beans.BeanUtils; +//import org.springframework.stereotype.Service; +// +//import java.math.BigDecimal; +//import java.util.ArrayList; +//import java.util.List; +// +///** +// * @Description: 系统配置开关服务实现类 +// * @Author: +// * @Date: 2026-01-26 +// * @Version: V1.0 +// */ +//@Service +//public class SysConfigSwitchServiceImpl implements SysConfigSwitchService { +// +// @Override +// public SysConfigSwitch queryBySysOrgCode() { +// //开关配置改造方案,使用组织和租户,租户即一级组织,默认查询当前登录用户组织下的配置信息,如果没有,则查询一级组织 +// LoginUser loginUser = SecurityUtils.getLoginUser(); +// if (ObjectUtil.isNull(loginUser)) { +// throw new DigitalLogisticsException(UserError.TIMEOUT); +// } +// Long organizationId = loginUser.getUserPo().getTopOrganizationId(); +// SysConfigSwitch sysConfigSwitch = sysConfigSwitchMapper.queryBySysOrgCode(organizationId.toString()); +// if(null == sysConfigSwitch) { +// //继续查询该组织的上级组织,如果上级组织没有,则继续查询上级组织的上级组织,直到一级组织 +// List orgList = new ArrayList<>(); +// AjaxResult ajaxResult = productServiceFeign.selectTopOrganizationList(organizationId); +// if ("200".equals(String.valueOf(ajaxResult.get("code")))) { +// orgList = JSON.parseArray(JSONObject.toJSONString(ajaxResult.get("data")), Long.class); +// } +// if(null != orgList && orgList.size()>0){ +// for (Long aLong : orgList) { +// sysConfigSwitch = sysConfigSwitchMapper.queryBySysOrgCode(aLong.toString()); +// if(null != sysConfigSwitch){ +// break; +// } +// } +// } +// } +// +// if (ObjectUtil.isNull(sysConfigSwitch)){ +// throw new ServiceException("未获取到系统配置"); +// } +// //获取数字物流配置 +// SzwlConfigSwitchVO szwlConfigSwitch = new SzwlConfigSwitchVO(); +// AjaxResult userConfigSwitchInfoByFeign = systemServiceFeign.getUserConfigSwitchInfoByFeign(loginUser); +// if ("200".equals(String.valueOf(userConfigSwitchInfoByFeign.get("code")))) { +// szwlConfigSwitch = JSONUtil.toBean(JSONObject.toJSONString(userConfigSwitchInfoByFeign.get("data")), SzwlConfigSwitchVO.class); +// } else { +// throw new ServiceException("获取公共配置失败"); +// } +// if (ObjectUtil.isNotNull(szwlConfigSwitch)){ +// BeanUtils.copyProperties(szwlConfigSwitch, sysConfigSwitch, IgnoreNullUtil.getNullPropertyNames(szwlConfigSwitch)); +// } +// +// //查询电子围栏的半径信息 +// SysDepartInterfaceInfoDTO sysDepartInterfaceInfoDTO = new SysDepartInterfaceInfoDTO(); +// sysDepartInterfaceInfoDTO.setInterfaceType("electronic_fence"); +// sysDepartInterfaceInfoDTO.setInterfaceTypeKey("electronic_fence"); +// List sysDepartInterfaceInfoPos = thirdPartyServiceFeign.queryListByFeign(sysDepartInterfaceInfoDTO); +// if (CollUtil.isEmpty(sysDepartInterfaceInfoPos) || sysDepartInterfaceInfoPos.size() < 1) { +// sysConfigSwitch.setElectronicFence(BigDecimal.ZERO); +// } else { +// String interfaceTypeValue = sysDepartInterfaceInfoPos.get(0).getInterfaceTypeValue(); +// BigDecimal electronicFence = new BigDecimal(interfaceTypeValue); +// sysConfigSwitch.setElectronicFence(electronicFence); +// } +// +// sysDepartInterfaceInfoDTO.setInterfaceType("electronic_fence"); +// sysDepartInterfaceInfoDTO.setInterfaceTypeKey("electronic_fence_load"); +// List sysDepartInterfaceInfoPosLoad = thirdPartyServiceFeign.queryListByFeign(sysDepartInterfaceInfoDTO); +// if (CollUtil.isEmpty(sysDepartInterfaceInfoPosLoad) || sysDepartInterfaceInfoPosLoad.size() < 1) { +// sysConfigSwitch.setElectronicFenceLoad(BigDecimal.ZERO); +// } else { +// String interfaceTypeValue = sysDepartInterfaceInfoPosLoad.get(0).getInterfaceTypeValue(); +// BigDecimal electronicFenceLoad = new BigDecimal(interfaceTypeValue); +// sysConfigSwitch.setElectronicFenceLoad(electronicFenceLoad); +// } +// +// //当前用户竞价权限 +// WlhyLoginUser wlhyLoginUser = SecurityUtils.getLoginUser().getWlhyLoginUser(); +// TmsDriver tmsDriver = tmsDriverMapper.getByDriverId(wlhyLoginUser.getId()); +// if (ObjectUtil.isNotNull(tmsDriver)) { +// sysConfigSwitch.setIsDriverBidding(tmsDriver.getIsDriverBidding()); +// } else { +// sysConfigSwitch.setIsDriverBidding(0); +// } +// return sysConfigSwitch; +// } +//} \ No newline at end of file diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/service/impl/TmsOrderServiceImpl.java b/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/service/impl/TmsOrderServiceImpl.java new file mode 100644 index 000000000..a45637a2b --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/resevationOrder/service/impl/TmsOrderServiceImpl.java @@ -0,0 +1,26 @@ +package com.mhd.oms.domain.resevationOrder.service.impl; + +import com.mhd.oms.domain.resevationOrder.service.TmsOrderService; +import org.springframework.stereotype.Service; + +/** + * @Description: TMS订单服务实现类 + * @Author: + * @Date: 2026-01-26 + * @Version: V1.0 + */ +@Service +public class TmsOrderServiceImpl implements TmsOrderService { + + @Override + public String selectByMakerCodeNc(String salesmanCode) { + + return ""; + } + + @Override + public String selectByMakerCodeNc1(String salesmanCode) { + + return ""; + } +} \ No newline at end of file diff --git a/mhd_oms/src/main/java/com/mhd/oms/enums/CargoTypeEnum.java b/mhd_oms/src/main/java/com/mhd/oms/enums/CargoTypeEnum.java new file mode 100644 index 000000000..5d2c9e094 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/enums/CargoTypeEnum.java @@ -0,0 +1,38 @@ +package com.mhd.oms.enums; + +import lombok.Getter; + +/** + * 货物类型枚举 + * @author System + * @date 2024 + */ +@Getter +public enum CargoTypeEnum { + + STOCK("STOCK", "库存货物"), + MATERIAL("MATERIAL", "物料货物"), + MANUAL("MANUAL", "手动输入货物"); + + private final String code; + private final String description; + + CargoTypeEnum(String code, String description) { + this.code = code; + this.description = description; + } + + /** + * 根据代码获取枚举 + * @param code 代码 + * @return 货物类型枚举 + */ + public static CargoTypeEnum fromCode(String code) { + for (CargoTypeEnum type : values()) { + if (type.getCode().equals(code)) { + return type; + } + } + throw new IllegalArgumentException("无效的货物类型代码: " + code); + } +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/enums/DictTypeEnum.java b/mhd_oms/src/main/java/com/mhd/oms/enums/DictTypeEnum.java new file mode 100644 index 000000000..79563ae55 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/enums/DictTypeEnum.java @@ -0,0 +1,21 @@ +package com.mhd.oms.enums; + +public enum DictTypeEnum { + GOODSUNIT("goods_unit", "货物单位"); + + private final String typeCode; + private final String typeName; + + DictTypeEnum(String typeCode, String typeName) { + this.typeCode = typeCode; + this.typeName = typeName; + } + + public String getTypeCode() { + return typeCode; + } + + public String getTypeName() { + return typeName; + } +} \ No newline at end of file diff --git a/mhd_oms/src/main/java/com/mhd/oms/enums/OrderOperateEnum.java b/mhd_oms/src/main/java/com/mhd/oms/enums/OrderOperateEnum.java new file mode 100644 index 000000000..8be8263c6 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/enums/OrderOperateEnum.java @@ -0,0 +1,63 @@ +package com.mhd.oms.enums; + +/** + * 订单操作枚举 + * + * @author + */ +public enum OrderOperateEnum { + /** + * 创建订单 + */ + create_order(1, "创建订单"), + + /** + * 修改订单 + */ + update_order(2, "修改订单"), + + /** + * 删除订单 + */ + delete_order(3, "删除订单"), + + /** + * 审核订单 + */ + audit_order(4, "审核订单"), + + /** + * 取消订单 + */ + cancel_order(5, "取消订单"), + + /** + * 完成订单 + */ + complete_order(6, "完成订单"); + + private final Integer key; + private final String value; + + OrderOperateEnum(Integer key, String value) { + this.key = key; + this.value = value; + } + + public Integer getKey() { + return key; + } + + public String getValue() { + return value; + } + + public static String findByKey(Integer key) { + for (OrderOperateEnum operate : values()) { + if (operate.key.equals(key)) { + return operate.value; + } + } + return null; + } +} \ No newline at end of file diff --git a/mhd_oms/src/main/java/com/mhd/oms/enums/OrderStatusEnum.java b/mhd_oms/src/main/java/com/mhd/oms/enums/OrderStatusEnum.java new file mode 100644 index 000000000..69eca2fad --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/enums/OrderStatusEnum.java @@ -0,0 +1,63 @@ +package com.mhd.oms.enums; + +/** + * 订单状态枚举 + * + * @author + */ +public enum OrderStatusEnum { + /** + * 订单未部署 + */ + ORDER_NOT_DEPLOY(1, "未调度"), + + /** + * 订单未审核 + */ + ORDER_NOT_AUDIT(2, "未审核"), + + /** + * 订单已审核 + */ + ORDER_AUDITED(3, "已审核"), + + /** + * 订单进行中 + */ + ORDER_IN_PROGRESS(4, "进行中"), + + /** + * 订单已完成 + */ + ORDER_COMPLETED(5, "已完成"), + + /** + * 订单已关闭 + */ + ORDER_CLOSED(6, "已关闭"); + + private final Integer key; + private final String value; + + OrderStatusEnum(Integer key, String value) { + this.key = key; + this.value = value; + } + + public Integer getKey() { + return key; + } + + public String getValue() { + return value; + } + + public static String findByKey(Integer key) { + for (OrderStatusEnum status : values()) { + if (status.key.equals(key)) { + return status.value; + } + } + return null; + } +} \ No newline at end of file diff --git a/mhd_oms/src/main/java/com/mhd/oms/enums/OrderType.java b/mhd_oms/src/main/java/com/mhd/oms/enums/OrderType.java new file mode 100644 index 000000000..e0a87edbd --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/enums/OrderType.java @@ -0,0 +1,29 @@ +package com.mhd.oms.enums; + +import lombok.Getter; + +@Getter +public enum OrderType { + MECHANICAL_TRANSPORT(1, "普货运输"), + OVERSIZE_TRANSPORT(2, "危化运输"), + TANK_TRANSPORT(3, "罐车运输"), + JINAN_SPECIAL_LINE(4, "济南专线"), + JIANGXI_SPECIAL_LINE(5, "江西专线"); + + private final Integer code; + private final String description; + + OrderType(Integer code, String description) { + this.code = code; + this.description = description; + } + + public static OrderType fromCode(Integer code) { + for (OrderType type : OrderType.values()) { + if (type.getCode().equals(code)) { + return type; + } + } + throw new IllegalArgumentException("无效的订单类型代码: " + code); + } +} \ No newline at end of file diff --git a/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ProductServiceFeign.java b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ProductServiceFeign.java new file mode 100644 index 000000000..4c77e96d9 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ProductServiceFeign.java @@ -0,0 +1,115 @@ +package com.mhd.oms.infrastructure.feign; + +import com.mhd.common.core.constant.ServiceNameConstants; +import com.mhd.common.core.domain.entity.R; +import com.mhd.common.core.domain.po.OrganizationPo; +import com.mhd.common.core.domain.po.SysTenantsPo; +import com.mhd.common.core.web.domain.AjaxResult; +import com.mhd.system.api.feign.FeignAutoConfiguration; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +@FeignClient(contextId = "productServiceFeign", name = ServiceNameConstants.PRODUCT_CENTER,configuration = FeignAutoConfiguration.class) +public interface ProductServiceFeign { + + /** + * @Description 获取一级组织 + * @Author Alex + * @Date 2022/12/2 13:37 + */ + @GetMapping("/organization/selectTopId/{id}") + public AjaxResult selectTopId(@PathVariable("id") Long id); + + /** + * @Description 根据组织id获取所有的上级组织id + * @Author Alex + * @Date 2022/12/2 13:37 + */ + @GetMapping("/organization/selectTopOrganizationList/{id}") + public AjaxResult selectTopOrganizationList(@PathVariable("id") Long id); + + /** + * 查询当前组织所有的组织id + */ + @GetMapping(value = "/organization/getOrganizationIdsByOrganizationId/{organizationId}") + public AjaxResult getOrganizationIdsByOrganizationId(@PathVariable("organizationId") Long organizationId); + + /** + * 查询所有的组织id + */ + @GetMapping(value = "/organization/selectAllOrganizationId") + public AjaxResult selectAllOrganizationId(); + + /** + * 根据id查询组织信息 + */ + @GetMapping(value = "/organization/getInfo/{id}") + public AjaxResult getOrganizationInfo(@PathVariable("id") Long id); + + /** + * 根据applicationName查询定时任务集合 + */ + @GetMapping(value = "/elasticJob/elasticJobList/{applicationName}") + public AjaxResult elasticJobList(@PathVariable("applicationName") String applicationName); + + + /** + * 根据applicationName查询定时任务集合 + */ + @GetMapping(value = "/organization/selectAllOrganizationById") + public AjaxResult selectAllOrganizationById(@RequestParam("organizationId") Long organizationId); + + /** + * 根据域名查询租户信息 + */ + @GetMapping("/organization/selectTopIdByTenantsDomainName/{tenantsDomainName}") + public AjaxResult selectTopIdByTenantsDomainName(@PathVariable("tenantsDomainName") String tenantsDomainName); + + /** + * @Description 根据id查询组织信息(包含所有的子组织id) + * @Author Alex + * @Date 2022/12/6 22:11 + */ + @GetMapping("/organization/getInfoForIdList/{id}") + R getInfoForIdList(@PathVariable("id") Long id); + + /** + * 根据组织id查询租户信息 + * @param organizationId + * @return + */ + @GetMapping("/tenants/getTenantsByOrgan") + public R getTenantsByOrgan(@RequestParam("organizationId") Long organizationId); + + + /** + * 开放接口-获取配置的组织信息 + * + * @return + */ + @GetMapping(value = "/tenants/getTenantsInfoByOpen") + public R getTenantsInfoByOpen(); + + /** + * 根据组织idList查询组织列表 + */ + @PostMapping("/organization/getByIdList") + public R> getByIdList(@RequestBody List organizationIdList); + + /** + * 文件上传到oss(base64)批量 + */ + @PostMapping("/menu/uploadBatchByBase64") + public AjaxResult uploadBatchByBase64(@RequestBody List base64); + + /** + * 根据ID查询项目信息 + * @param projectManagementId + * @return + */ + @GetMapping(value = "/projectManagementApi/getProjectById") + public AjaxResult getProjectById(@RequestParam("projectManagementId") Long projectManagementId); + +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/SystemServiceFeign.java b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/SystemServiceFeign.java new file mode 100644 index 000000000..9dcfdb450 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/SystemServiceFeign.java @@ -0,0 +1,277 @@ +package com.mhd.oms.infrastructure.feign; + +import com.mhd.common.core.constant.ServiceNameConstants; +import com.mhd.common.core.domain.dto.BasicAgreementDTO; +import com.mhd.common.core.domain.dto.SysMultistageDictDto; +import com.mhd.common.core.domain.dto.SysProvinceCityCountyDTO; +import com.mhd.common.core.domain.dto.open.SystemOpenApiLogDTO; +import com.mhd.common.core.domain.dto.open.ThirdPartyServiceReqLogDTO; +import com.mhd.common.core.domain.entity.R; +import com.mhd.common.core.domain.po.SysMultistageDictPo; +import com.mhd.common.core.web.domain.AjaxResult; +import com.mhd.common.core.web.page.TableDataInfo; +import com.mhd.oms.infrastructure.feign.dto.AbnormalAddressBookDTO; +import com.mhd.oms.infrastructure.feign.dto.NoticeMessageLoggingDto; +import com.mhd.oms.infrastructure.feign.dto.QueryExpenseAccountDTO; +import com.mhd.oms.infrastructure.feign.po.NoticeMessageLoggingPo; +import com.mhd.system.api.domain.SysDictData; +import com.mhd.system.api.feign.FeignAutoConfiguration; +import com.mhd.system.api.model.LoginUser; +import io.swagger.annotations.ApiOperation; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @Description + * @Author zg + * @Version 1.0 + * @Date 2023/11/1 13:40 + */ +@FeignClient(contextId = "SystemServiceFeign", value = ServiceNameConstants.SYSTEM_SERVICE, configuration = FeignAutoConfiguration.class) +public interface SystemServiceFeign { + + /** + * 多级分类字典,根据code查询字典信息 + * 此接口查询多级分类字典,如果是一级字典,则只需传入字典code,如果是二级或三级字典,则还需要传入父类code,否则会查询失败 + * + * @param multistageDictCode 本级code + * @param parentDictCode 父级code + * @return + */ + @GetMapping("/basicApi/getMultistageDictInfoByCode") + public AjaxResult getMultistageDictInfoByCode(@RequestParam("multistageDictCode") String multistageDictCode, @RequestParam("parentDictCode") String parentDictCode); + + + /** + * 查询多级分类字典 + * + * @param sysMultistageDictDto + * @return + */ + @GetMapping("/basicApi/selectMultistageDictList") + public AjaxResult selectMultistageDictList(SysMultistageDictDto sysMultistageDictDto); + + /** + * 根据字典类型查询字典数据信息 + * + * @param dictType + * @return + */ + @GetMapping("/dict/data/type/{dictType}") + public AjaxResult selectListByDictType(@PathVariable("dictType") String dictType); + + + /** + * 根据县级编码,查询省市县信息 + * + * @param sysProvinceDTO + * @return + */ + @PostMapping("/basicApi/findAreaInfo") + public AjaxResult selectFindAreaInfoList(@RequestBody SysProvinceCityCountyDTO sysProvinceDTO); + + /** + * 根据市区编码查询市区信息 + * + * @param sysProvinceDTO + * @return + */ + @PostMapping("/basicApi/findAreaInfoByCityCode") + public AjaxResult findAreaInfoByCityCode(@RequestBody SysProvinceCityCountyDTO sysProvinceDTO); + + /** + * 根据省份编码查询省份信息 + * + * @param sysProvinceDTO + * @return + */ + @PostMapping("/basicApi/findAreaInfoByProvince") + public AjaxResult findAreaInfoByProvince(@RequestBody SysProvinceCityCountyDTO sysProvinceDTO); + + + //================================= + + /** + * 查询字典数据详细 + * + * @param dictCode + * @return + */ + @GetMapping("/dict/data/{dictCode}") + public AjaxResult getTopOrganization(@PathVariable("dictCode") Long dictCode); + + /** + * 根据条件查询字典数据列表 + * @param sysDictData + * @return + */ + @PostMapping("/dict/data/findDatalist") + public AjaxResult findDatalist(@RequestBody SysDictData sysDictData); + + /** + * 根据条件查询分类字典数据列表 + * @param + * @return + */ + @PostMapping("/basicApi/getMultistageDictList") + public R> getMultistageDictList(@RequestBody SysMultistageDictDto sysMultistageDictDto); + + /** + * 根据条件查询分类字典数据列表 + * @param + * @return + */ + @PostMapping("/basicApi/getMultistageDictTreeList") + public R> getMultistageDictTreeList(@RequestBody SysMultistageDictDto sysMultistageDictDto); + + + /** + * 根据条件查询分类字典数据列表 + * @param + * @return + */ + @PostMapping("/dict/data/getDictDataList") + public R> getDictDataList(@RequestBody SysDictData sysDictData); + + /** + * 查询省市县三级 + * + * @param sysProvinceDTO + * @return + */ + @PostMapping("/basicApi/selectAreaChildrenList") + public TableDataInfo selectAreaChildrenList(@RequestBody SysProvinceCityCountyDTO sysProvinceDTO); + + /** + * 根据code查询分类字典信息 + * + * @param multistageDictCode + * @return + */ + @GetMapping(value = "/basicApi/getMultistageDictInfoByCode/{multistageDictCode}") + public AjaxResult getMultistageDictInfoByCode(@PathVariable(value = "multistageDictCode", required = true) String multistageDictCode); + + /** + * 根据code查询多级分类字典集合 + * + * @param code + * @return + */ + @GetMapping(value = "/basicApi/getSysMultistageDictList/{code}") + public AjaxResult getSysMultistageDictList(@PathVariable(value = "code") String code); + + /** + * 根据topCode查询多级分类字典集合(同一父级字典下所有) + * + * @param topCode + * @return + */ + @GetMapping(value = "/basicApi/getTopMultistageDictList/{topCode}") + public AjaxResult getTopMultistageDictList(@PathVariable(value = "topCode") String topCode); + + /** + * 新增消息通知 单条 + * + * @param noticeMessageLoggingDto + * @return + */ + @PostMapping("/messageManageApi/addMessageLogging") + public AjaxResult addMessageLogging(@RequestBody NoticeMessageLoggingDto noticeMessageLoggingDto); + + /** + * 消息记录列表查询-feign + * + * @return + */ + @ApiOperation("消息记录列表查询-feign") + @PostMapping("/messageManageApi/noticeMessageLoggingListByFeign") + public List noticeMessageLoggingListByFeign(@RequestBody NoticeMessageLoggingDto noticeMessageLoggingDto); + + /** + * 新增消息通知 批量 + * + * @param noticeMessageLoggingDto + * @return + */ + @PostMapping("/messageManageApi/addMessageLoggingList") + public AjaxResult addMessageLoggingList(@RequestBody NoticeMessageLoggingDto noticeMessageLoggingDto); + + /** + * 根据协议code和租户查询系统协议 + */ + @GetMapping("/basicApi/findAgreementByCodeAndOrg") + public AjaxResult findAgreementByCodeAndOrg(BasicAgreementDTO basicAgreementDTO); + + /** + * 获取指定组织的开关按钮配置-feign + */ + @ApiOperation("获取指定组织的开关按钮配置") + @GetMapping("/userConfigSwitchApi/getUserConfigSwitchInfoByOrgId") + public AjaxResult getUserConfigSwitchInfoByOrgId(@RequestParam("organizationId") Long organizationId); + + /** + * 获取当前租户开关按钮配置-feign + */ + @ApiOperation("获取当前租户开关配置信息") + @PostMapping("/userConfigSwitchApi/getUserConfigSwitchInfoByFeign") + public AjaxResult getUserConfigSwitchInfoByFeign(@RequestBody LoginUser loginUser); + + @ApiOperation("根据code、一级组织ID查询多级分类字典集合") + @GetMapping(value = "/basicApi/getSysMultistageDictByCodeAndTopOrgId") + public AjaxResult getSysMultistageDictByCodeAndTopOrgId(@RequestParam("code") String code, @RequestParam("topOrgId") Long topOrgId); + + @ApiOperation("根据topCode、一级组织ID查询多级分类字典集合(同一父级字典下所有)") + @GetMapping(value = "/basicApi/getMultistageDictListByTopCodeAndTopOrgId") + public AjaxResult getMultistageDictListByTopCodeAndTopOrgId(@RequestParam("topCode") String topCode, @RequestParam("topOrgId") Long topOrgId); + + @ApiOperation("新增多级分类字典-开放接口") + @PostMapping("/basicApi/addMultistageDictByOpen") + public AjaxResult addMultistageDictByOpen(@RequestBody SysMultistageDictDto sysMultistageDictDto); + + /** + * @description 保存请求服务日志 + * @author ZhouGY + * @date 2024/1/26 17:03 + * @param systemOpenApiLogDTO + */ + @PostMapping(value = "/systemOpenApiLogApi/save") + public AjaxResult saveLog(@RequestBody SystemOpenApiLogDTO systemOpenApiLogDTO); + + /** + * @description 保存三方服务日志 + * @author ZhouGY + * @date 2024/1/26 17:03 + * @param thirdPartyServiceReqLogDTO + */ + @PostMapping(value = "/thirdPartyServiceReqLogApi/save") + public AjaxResult saveThirdPartyServiceReqLog(@RequestBody ThirdPartyServiceReqLogDTO thirdPartyServiceReqLogDTO); + + /** + * 获取用户所在租户的开关配置信息 + * @return + */ + @GetMapping("/userConfigSwitchApi/getUserConfigSwitchInfo") + public AjaxResult getUserConfigSwitchInfo(); + + /** + * 编辑异常匹配地址簿 + * @return + */ + @PostMapping("/abnormalAddressBookApi/saveBatchAddressBook") + public AjaxResult saveBatchAddressBook(@RequestBody List abnormalAddressBookDTOList); + + /** + * 匹配地址簿 + * @return + */ + @PostMapping("/abnormalAddressBookApi/matchAddressBook") + public AjaxResult matchAddressBook(@RequestBody AbnormalAddressBookDTO abnormalAddressBookDTO); + /** + * 查询社会车辆-费用科目 + * @return + */ + @GetMapping("/expenseAccountApi/selectSocialVehicleExpenseAccount") + public R> selectSocialVehicleExpenseAccount(); +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java new file mode 100644 index 000000000..97a45ed49 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/ThirdPartyServiceFeign.java @@ -0,0 +1,144 @@ +package com.mhd.oms.infrastructure.feign; + +import com.mhd.common.core.constant.ServiceNameConstants; +import com.mhd.common.core.domain.entity.R; +import com.mhd.common.core.domain.po.thirdparty.RegeocodesAddressPo; +import com.mhd.common.core.domain.po.thirdparty.SysDepartInterfaceInfoPo; +import com.mhd.common.core.domain.thirdparty.*; +import com.mhd.common.core.domain.thirdparty.esignsaas.EsignSaasFillTemplateDTO; +import com.mhd.common.core.domain.thirdparty.esignsaas.EsignSaasGetSignByFlowIdDTO; +import com.mhd.common.core.domain.thirdparty.esignsaas.EsignSaasSignContractV3DTO; +import com.mhd.common.core.web.domain.AjaxResult; +import com.mhd.system.api.feign.FeignAutoConfiguration; +import io.swagger.annotations.ApiOperation; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; + +import java.util.List; +import java.util.Map; + +/** + * 三方服务 Feign + */ +@FeignClient(contextId = "thirdPartyServiceFeign", value = ServiceNameConstants.THIRDPARTY_CENTER, configuration = FeignAutoConfiguration.class) +public interface ThirdPartyServiceFeign { + + //查询当前组织所有三方接口信息 + @PostMapping("/sysDepartInterfaceInfo/queryListByFeign") + public List queryListByFeign(@RequestBody SysDepartInterfaceInfoDTO sysDepartInterfaceInfoDTO); + + /** + * 极光消息推送 + */ + @PostMapping(value = "/jiguang/auroraPush") + public AjaxResult auroraPush(@RequestBody AuroraPushDTO auroraPushDTO); + + /** + * 极光消息推送(合并版) + * + * @param auroraPushDTO + * @return + */ + @ApiOperation(value = "极光消息推送(合并版)", notes = "极光消息推送(合并版)") + @PostMapping(value = "/jiguang/auroraPushT") + public AjaxResult auroraPushT(@RequestBody AuroraPushDTO auroraPushDTO); + + /** + * 消息发送 + */ + @PostMapping(value = "/sms/sendMessage") + public AjaxResult sendMessage(@RequestBody SmsMessageDTO smsMessageDTO); + + /** + * @description 逆地理编码 + * @author ZhouGY + * @date 2024/1/29 15:02 + * @param lnglat + * @return R> + */ + @PostMapping("/Amap/regeo") + R> regeo(@RequestParam(name = "lnglat") String lnglat); + + /** + * @description 地理编码 + * @author ZhouGY + * @date 2024/1/29 15:03 + * @param address + * @return AjaxResult + */ + @PostMapping("/Amap/geo") + public AjaxResult geo(@RequestParam(name = "address") String address); + + /** + * 文件上传到oss(base64)批量 + */ + @PostMapping("/ossApi/uploadBatchByBase64") + public AjaxResult uploadBatchByBase64(@RequestBody List base64); + + /** + * @description 获取距离 + * @author ZhouGY + * @date 2024/1/29 15:03 + * @param amapDTO + * @return AjaxResult + */ + @PostMapping("/Amap/queryDistance") + public AjaxResult queryDistance(@RequestBody AmapDTO amapDTO); + + + /** + * @description 车辆入网验证 + * @author ZhouGY + * @date 2024/3/29 10:53 + * @param checkTruckExistDTO + * @return AjaxResult + */ + @PostMapping(value = "/openapi/checkTruckExist") + public AjaxResult checkTruckExist(@RequestBody CheckTruckExistDTO checkTruckExistDTO); + + /** + * @description 企业道路运输经营许可证验证 V3 + * @author ZhouGY + * @date 2024/3/29 10:53 + * @param enterpriseRoadLicenseDTO + * @return AjaxResult + */ + @PostMapping(value = "/openapi/enterpriseRoadLicenseV3") + public AjaxResult enterpriseRoadLicenseV3(@RequestBody EnterpriseRoadLicenseDTO enterpriseRoadLicenseDTO); + + /** + * @description 车辆道路运输证核验 V3 + * @author ZhouGY + * @date 2024/3/29 10:53 + * @param checkRTCNoDTO + * @return AjaxResult + */ + @PostMapping(value = "/openapi/vehicleRoadLicenseV3") + public AjaxResult vehicleRoadLicenseV3(@RequestBody CheckRTCNoDTO checkRTCNoDTO); + + /** + * @description 人员从业资格证核验 V3 + * @author ZhouGY + * @date 2024/3/29 16:13 + * @param queryQualificationInfo + * @return AjaxResult + */ + @PostMapping(value = "/openapi/queryQualificationInfoV3") + public AjaxResult queryQualificationInfoV3(@RequestBody QueryQualificationInfoDTO queryQualificationInfo); + + //填充模板 + @PostMapping("/esignSaasV3/filltemplate") + R filltemplate(@RequestBody EsignSaasFillTemplateDTO esignSaasFillTemplateDTO); + //基于文件发起签署 + @PostMapping("/esignSaasV3/signContractByFile") + R signContractByFile(@RequestBody EsignSaasSignContractV3DTO signatureDTO); + //获取签署页面链接 + @PostMapping("/esignSaasV3/getSignByFlowId") + R getSignByFlowId(@RequestBody EsignSaasGetSignByFlowIdDTO signatureDTO); + //下载已签署文件 + @PostMapping("/esignSaasV3/downloadSignContract") + R downloadSignContract(@RequestBody Map mapResult); + +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/TransportServiceFeign.java b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/TransportServiceFeign.java new file mode 100644 index 000000000..1a85cb2a7 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/TransportServiceFeign.java @@ -0,0 +1,51 @@ +package com.mhd.oms.infrastructure.feign; + + +import com.linke.transport.interfaces.dto.warehouse.inBoundOrder.InboundOrderDTO; +import com.linke.transport.interfaces.dto.warehouse.outBoundOrder.OutboundOrderDTO; +import com.mhd.common.core.constant.ServiceNameConstants; +import com.mhd.common.core.domain.entity.R; +import com.mhd.common.core.web.domain.AjaxResult; +import com.mhd.oms.infrastructure.feign.po.Inventory; +import com.mhd.system.api.feign.FeignAutoConfiguration; +import io.swagger.annotations.ApiParam; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; +import java.util.List; + +@FeignClient(contextId = "transportServiceFeign", value = ServiceNameConstants.TRANSPORT_CENTER, configuration = FeignAutoConfiguration.class) +public interface TransportServiceFeign { + + /** + * 创建入库单。 + * + * @param createDTO 入库单信息,包括货主名称、备注、以及入库物料明细列表。 + * @return 返回一个包含入库单据ID的包装对象。 + */ + @PostMapping("/inboundOrders") + R createInboundOrder(@ApiParam(value = "入库单信息") @RequestBody InboundOrderDTO.Create createDTO); + + + /** + * Retrieves a list of inventory items associated with the specified inbound order ID. + * + * @param inboundOrderId the ID of the inbound order used to lookup the inventory items + * @return a response object containing a list of inventory items linked to the given inbound order ID + */ + @GetMapping("/inventory/getInventoryByInboundOrderId/{inboundOrderId}") + R> getInventoryItemByInboundOrderId(@PathVariable("inboundOrderId") Long inboundOrderId); + + @GetMapping("/vehicleApi/getVehicleInfoById") + AjaxResult getVehicleInfoById(@RequestParam(value = "vehicleId" ,required = true) Long vehicleId); + + /** + * 仓储出库接口 + * + * @param createDTO 出库单参数 + * @return 出库单据ID + */ + @PostMapping("/outboundOrders") + R createOutboundOrder(@ApiParam(value = "出库单创建信息", required = true) @Valid @RequestBody OutboundOrderDTO.Create createDTO); +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/dto/AbnormalAddressBookDTO.java b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/dto/AbnormalAddressBookDTO.java new file mode 100644 index 000000000..e71bc4760 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/dto/AbnormalAddressBookDTO.java @@ -0,0 +1,101 @@ +package com.mhd.oms.infrastructure.feign.dto; + +import com.mhd.common.core.annotation.Excel; +import lombok.Data; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import java.math.BigDecimal; +import io.swagger.annotations.ApiModelProperty; +import com.mhd.common.core.web.domain.BaseVOEntity; + +import java.util.List; + +/** + * 异常匹配地址簿对象 abnormal_address_book + * + * @author gen + * @date 2024-07-23 + */ + +@Data +public class AbnormalAddressBookDTO extends BaseVOEntity{ + private static final long serialVersionUID = 1L; + + @ApiModelProperty("异常匹配地址簿id") + private Long abnormalAddressBookId; + + @ApiModelProperty("一级组织表id") + @Excel(name = "一级组织表id") + private Long topOrganizationId; + + @ApiModelProperty("id") + @Excel(name = "id") + private Long organizationId; + + @ApiModelProperty("组织表name") + @Excel(name = "组织表name") + private String organizationName; + + @ApiModelProperty("用户ID") + @Excel(name = "用户ID") + private Long userId; + + @ApiModelProperty("地址类型(1-装货签到,2-卸货签到)") + @Excel(name = "地址类型", readConverterExp = "1=-装货签到,2-卸货签到,3-装货,4-卸货") + private Integer addressSignType; + + @ApiModelProperty("货源单id") + @Excel(name = "货源单id") + private String orderId; + + @ApiModelProperty("运单id") + @Excel(name = "运单id") + private String transportationId; + + @ApiModelProperty("运输单号") + @Excel(name = "运输单号") + private String transportationNumber; + + @ApiModelProperty("货源单号") + @Excel(name = "货源单号") + private String goodsNumber; + + @ApiModelProperty("省市区编码") + @Excel(name = "省市区编码") + private String actualAreaId; + + @ApiModelProperty("省市区名称") + @Excel(name = "省市区名称") + private String actualAreaName; + + @ApiModelProperty("原地址") + @Excel(name = "原地址") + private String originalAddress; + + @ApiModelProperty("实际签到地址") + @Excel(name = "实际签到地址") + private String actualAddress; + + @ApiModelProperty("实际签到地经度") + @Excel(name = "实际签到地经度") + private String actualLongitude; + + @ApiModelProperty("实际签到地纬度") + @Excel(name = "实际签到地纬度") + private String actualLatitude; + + @ApiModelProperty("审核人用户ID") + @Excel(name = "审核人用户ID") + private Long auditBy; + + @ApiModelProperty("审核人名称") + @Excel(name = "审核人名称") + private String auditByName; + + + @ApiModelProperty(name = "组织ID集合") + private List organizationIdList; + + @ApiModelProperty(name = "权限菜单ID") + private Long permissionMenuId; +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/dto/AuroraPushDTO.java b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/dto/AuroraPushDTO.java new file mode 100644 index 000000000..eff7f3e51 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/dto/AuroraPushDTO.java @@ -0,0 +1,55 @@ +package com.mhd.oms.infrastructure.feign.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * @author lfs + * @description 极光推送 + * @date 2020/3/19 + **/ +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class AuroraPushDTO { + + @ApiModelProperty(value = "标题") + private String title; + + @ApiModelProperty(value = "内容") + private String content; + + @ApiModelProperty(value = "别名") + private List alias; + + @ApiModelProperty(value = "设备id") + private List registrationIds; + + @ApiModelProperty(value = "推送类型(0-tag全部推送,1-alias根据别名推送,2-registrationId根据应用id推送)") + private String type; + + @ApiModelProperty(value = "推送平台(0-全部推送,1-Android,2-IOS)") + private String platForm; + + @ApiModelProperty(value = "标签") + private List tag; + + @ApiModelProperty(value = "接收人信息,0-司机,1-货主") + private Integer userType; + + @ApiModelProperty(value = "部门编码,tag") + private String sysOrgCode; + + @ApiModelProperty(value = "设备id") + private String registrationId; + + @ApiModelProperty(value = "消息类型") + private String messageType; + +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/dto/InboundOrderDTO.java b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/dto/InboundOrderDTO.java new file mode 100644 index 000000000..7bdc6b1eb --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/dto/InboundOrderDTO.java @@ -0,0 +1,51 @@ +package com.mhd.oms.infrastructure.feign.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.Valid; +import javax.validation.constraints.DecimalMin; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.math.BigDecimal; +import java.util.List; + +public class InboundOrderDTO { + + @Data + public static class Create { + + @ApiModelProperty(value = "货主ID", required = true, example = "1001") + @NotNull(message = "货主ID不能为空") + private Long ownerId; + + @ApiModelProperty(value = "备注", example = "首批入库") + private String remarks; + + @ApiModelProperty(value = "关联的TMS运输订单号") + private String tmsOrderNo; + + @ApiModelProperty(value = "入库物料明细列表", required = true) + @NotEmpty(message = "入库物料明细不能为空") + @NotNull + @Valid + private List details; + } + + @Data + @ApiModel(value = "InboundOrderDetailCreateDTO", description = "入库单物料明细") + public static class Detail { + @ApiModelProperty(value = "物料ID", required = true, example = "101") + @NotNull(message = "物料ID不能为空") + private Long materialId; + + @ApiModelProperty(value = "入库数量", required = true, example = "20") + @NotNull(message = "入库数量不能为空") + @DecimalMin(value = "0.01", message = "入库数量必须大于0") // 或者根据业务调整精度和最小值 + private BigDecimal quantity; + + @ApiModelProperty(value = "整机编号 (当物料需要编号管理时必填)", example = "ZJ0000000001") + private String machineSerialNo; + } +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/dto/NoticeMessageLoggingDto.java b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/dto/NoticeMessageLoggingDto.java new file mode 100644 index 000000000..a5b4d5035 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/dto/NoticeMessageLoggingDto.java @@ -0,0 +1,144 @@ +package com.mhd.oms.infrastructure.feign.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.mhd.common.core.web.domain.BaseVOEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; +import java.util.List; + +/** + * 消息记录对象 notice_message_logging + * + * @author mhd + * @date 2023-03-30 + */ +@Data +public class NoticeMessageLoggingDto extends BaseVOEntity +{ + private static final long serialVersionUID = 1L; + + /** 消息记录表ID */ + @ApiModelProperty(name = "消息记录表ID") + private Long noticeMessageLoggingId; + + @ApiModelProperty(name = "消息记录表IDs") + private Long[] noticeMessageLoggingIds; + + /** 消息类型(1-物流助手,2-服务通知,3-活动通知,4-系统通知) */ + @ApiModelProperty(name = "消息类型code") + private String noticeMessageType; + + @ApiModelProperty(name = "消息类型name") + private String noticeMessageName; + + /** 消息标题 */ + @ApiModelProperty(name = "消息标题") + private String noticeMessageTitle; + + /** 消息内容 */ + @ApiModelProperty(name = "消息内容") + private String noticeMessageContent; + + /** 接收时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(name = "接收时间") + private Date messageReceivingTime; + + /** 接收用户姓名 */ + @ApiModelProperty(name = "接收用户姓名") + private String userName; + + /** 用户id */ + @ApiModelProperty(name = "用户id") + private Long userId; + + /** 用户账号 */ + @ApiModelProperty(name = "用户账号") + private String userAccount; + + /** 用户电话 */ + @ApiModelProperty(name = "用户电话") + private String userPhone; + + /** 已读状态(1-已读,2-未读) */ + @ApiModelProperty(name = "已读状态") + private Integer messageReadStatus; + + /** 已读时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(name = "已读时间") + private Date messageReadTime; + + @ApiModelProperty(name = "更新时间查询条件开始日期") + private String updateTimeStart; + + @ApiModelProperty(name = "更新时间查询条件结束日期") + private String updateTimeEnd; + + @ApiModelProperty(name = "权限菜单ID") + private Long permissionMenuId; + + @ApiModelProperty(name = "操作类型(1-批量已读,2-全部已读)") + private Integer operateType; + + @ApiModelProperty(name = "消息列表") + private List noticeList; + + @ApiModelProperty(name = "物流消息关联运单ID") + private Long waybillId; + + @ApiModelProperty(name = "物流消息关联运单号") + private String waybillNumber; + + @ApiModelProperty(value = "消息推送时间") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern = "yyyy-MM-dd") + private Date messagePushTime; + + @ApiModelProperty(value = "消息来源(0-司机端,1-货主端,2-pc端)") + private Integer messageSource; + + @ApiModelProperty(name = "一级组织表ID") + private Long topOrganizationId; + + @ApiModelProperty(name = "组织表ID") + private Long organizationId; + + @ApiModelProperty(name = "消息链接主键") + private String linkPrimaryKey; + + @ApiModelProperty(value = "问题截图地址") + private String problemScreenshotsAddress; + + @ApiModelProperty(value = "所属部门") + private String sysOrgCode; + + @ApiModelProperty(value = "回复内容") + private String replyContent; + + @ApiModelProperty(value = "回复人id") + private String replyBy; + + @ApiModelProperty(value = "回复人名称") + private String replyByName; + + @ApiModelProperty(value = "回复时间") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date replyTime; + + @ApiModelProperty(value = "数据来源系统(1-数字物流 2-网络货运)") + private Integer dataSourceSystem; + + @ApiModelProperty(value = "查询司机今日是否申请竞价 1-是 2-否") + private Integer isApplyBidding; + + @ApiModelProperty(value = "跳转页面:0-不跳转,1-个人中心,2-司机,3-车队长,4-承运企业,5-车队," + + "6-车辆,7-货主,8-企业货主,9-支付审核成功,10-支付审核失败") + private Integer jumpPage; + @ApiModelProperty("所属业务id") + private String businessId; +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/dto/QueryExpenseAccountDTO.java b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/dto/QueryExpenseAccountDTO.java new file mode 100644 index 000000000..0a60fc1cb --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/dto/QueryExpenseAccountDTO.java @@ -0,0 +1,38 @@ +package com.mhd.oms.infrastructure.feign.dto; + +import com.mhd.common.core.annotation.Excel; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + + +/** + * 费用科目对象 + */ + +@Data +@ApiModel(value = "费用科目对象", description = "费用科目响应对象") +public class QueryExpenseAccountDTO { + + @ApiModelProperty("科目编码") + @Excel(name = "科目编码") + private String subjectCode; + + @ApiModelProperty("科目名称") + @Excel(name = "科目名称") + private String subjectName; + + @ApiModelProperty("显示顺序") + @Excel(name = "显示顺序") + private String showSeq; + + @ApiModelProperty("上级科目编码") + @Excel(name = "上级科目编码") + private String upperSubjectCode; + + @ApiModelProperty("上级科目名称") + @Excel(name = "上级科目名称") + private String upperSubject; + + +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/po/Inventory.java b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/po/Inventory.java new file mode 100644 index 000000000..8af166139 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/po/Inventory.java @@ -0,0 +1,61 @@ +package com.mhd.oms.infrastructure.feign.po; + +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@ApiModel(value="Inventory对象", description="库存信息表") +public class Inventory implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "主键ID") + private Long id; + + @ApiModelProperty(value = "入库单表主键ID") + private Long inBoundOrderId; + + @ApiModelProperty("库存单号") + private String inventoryOrderNo; + + @ApiModelProperty(value = "货主名称") + private String ownerName; + + @ApiModelProperty(value = "关联物料ID") + private Long materialId; + + @ApiModelProperty(value = "当前库存数量") + private BigDecimal quantity; + + @ApiModelProperty(value = "整机编号 (当物料需要编号管理时存储,否则为NULL)") + private String machineSerialNo; + + @ApiModelProperty(value = "创建时间") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + private Date createdAt; + + @ApiModelProperty(value = "最后更新时间") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + private Date updatedAt; + + @ApiModelProperty(value = "创建人") + private String createdBy; + + @ApiModelProperty(value = "更新人") + private String updatedBy; + + @ApiModelProperty(value = "逻辑删除标志 (0:未删除, 1:已删除)") + @TableLogic + private Boolean deleted; +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/po/NoticeMessageLoggingPo.java b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/po/NoticeMessageLoggingPo.java new file mode 100644 index 000000000..308361382 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/infrastructure/feign/po/NoticeMessageLoggingPo.java @@ -0,0 +1,129 @@ +package com.mhd.oms.infrastructure.feign.po; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.mhd.common.core.annotation.DateNullToStringSerializer; +import com.mhd.common.core.web.domain.BaseVOEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +/** + * 消息记录对象 notice_message_logging + * + * @author mhd + * @date 2023-03-30 + */ +@Data +public class NoticeMessageLoggingPo extends BaseVOEntity +{ + private static final long serialVersionUID = 1L; + + /** 消息记录表ID */ + @ApiModelProperty(name = "消息记录表ID") + private Long noticeMessageLoggingId; + + /** 消息类型(1-物流助手,2-服务通知,3-活动通知,4-系统通知) */ + @ApiModelProperty(name = "消息类型code") + private String noticeMessageType; + + @ApiModelProperty(name = "消息类型name") + private String noticeMessageName; + + /** 消息标题 */ + @ApiModelProperty(name = "消息标题") + private String noticeMessageTitle; + + /** 消息内容 */ + @ApiModelProperty(name = "消息内容") + private String noticeMessageContent; + + /** 接收时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(name = "接收时间") + @JsonSerialize(nullsUsing = DateNullToStringSerializer.class) + private Date messageReceivingTime; + + /** 接收用户姓名 */ + @ApiModelProperty(name = "接收用户姓名") + private String userName; + + /** 用户id */ + @ApiModelProperty(name = "用户id") + private Long userId; + + /** 用户账号 */ + @ApiModelProperty(name = "用户账号") + private String userAccount; + + /** 用户电话 */ + @ApiModelProperty(name = "用户电话") + private String userPhone; + + /** 已读状态(1-已读,2-未读) */ + @ApiModelProperty(name = "已读状态") + private Integer messageReadStatus; + + @ApiModelProperty(name = "已读状态名称") + private String messageReadName; + + /** 已读时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(name = "已读时间") + @JsonSerialize(nullsUsing = DateNullToStringSerializer.class) + private Date messageReadTime; + + @ApiModelProperty(name = "一级组织表ID") + private Long topOrganizationId; + @ApiModelProperty(name = "组织表ID") + private Long organizationId; + + @ApiModelProperty(name = "消息链接主键") + private String linkPrimaryKey = ""; + + @ApiModelProperty(name = "物流消息关联运单ID") + private Long waybillId; + + @ApiModelProperty(name = "物流消息关联运单号") + private String waybillNumber; + + @ApiModelProperty(value = "消息推送时间") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern = "yyyy-MM-dd") + private Date messagePushTime; + + @ApiModelProperty(value = "消息来源(0-司机端,1-货主端,2-pc端)") + private Integer messageSource; + + @ApiModelProperty(value = "问题截图地址") + private String problemScreenshotsAddress; + + @ApiModelProperty(value = "所属部门") + private String sysOrgCode; + + @ApiModelProperty(value = "回复内容") + private String replyContent; + + @ApiModelProperty(value = "回复人id") + private String replyBy; + + @ApiModelProperty(value = "回复人名称") + private String replyByName; + + @ApiModelProperty(value = "回复时间") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date replyTime; + + @ApiModelProperty(value = "数据来源系统(1-数字物流 2-网络货运)") + private Integer dataSourceSystem; + + @ApiModelProperty(value = "跳转页面:0-不跳转,1-个人中心,2-司机,3-车队长,4-承运企业,5-车队," + + "6-车辆,7-货主,8-企业货主,9-支付审核成功,10-支付审核失败") + private Integer jumpPage; + @ApiModelProperty("所属业务id") + private String businessId; + +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/NamedCarrierDTO.java b/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/NamedCarrierDTO.java new file mode 100644 index 000000000..53d6e1ff0 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/NamedCarrierDTO.java @@ -0,0 +1,14 @@ +package com.mhd.oms.interfaces.dto.resevationOrder; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +@Data +public class NamedCarrierDTO { + @ApiModelProperty(value = "指定司机ID") + private String appointDriverId; + @ApiModelProperty(value = "承运吨数/车次") + private BigDecimal agreementWeight; +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsAddressDTO.java b/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsAddressDTO.java new file mode 100644 index 000000000..d2ef7ed32 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsAddressDTO.java @@ -0,0 +1,61 @@ +package com.mhd.oms.interfaces.dto.resevationOrder; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import com.mhd.common.core.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +/** + * TODO 多装多卸地址DTO + * + * @author LianZhijian + * @version 1.0 + * @date 2022-12-16 14:23:22 + */ +@Data +public class OmsAddressDTO { + + @ApiModelProperty(value = "装卸货地名称") + @Excel(name = "装卸货地名称", width = 15) + private String loadingUnloadName=""; + @ApiModelProperty(value = "装卸货地县区编码") + @Excel(name = "装卸货地县区编码", width = 15) + private String loadingUnloadAreaId=""; + @ApiModelProperty(value = "装卸货地详细地址") + @Excel(name = "装卸货地详细地址", width = 15) + private String loadingUnloadAddress=""; + @ApiModelProperty(value = "装卸货地经度") + @Excel(name = "装卸货地经度", width = 15) + private String loadingUnloadLongitude=""; + @ApiModelProperty(value = "装卸货地纬度") + @Excel(name = "装卸货地纬度", width = 15) + private String loadingUnloadLatitude=""; + @ApiModelProperty(value = "发收货人姓名") + @Excel(name = "发收货人姓名", width = 15) + private String freighterName=""; + @ApiModelProperty(value = "装卸货电话") + @Excel(name = "装卸货电话", width = 15) + private String loadingUnloadPhone=""; + @ApiModelProperty(value = "装卸货时间日期(年月日)") + @Excel(name = "装卸货时间日期(年月日)", width = 15) + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private Date loadingUnloadDate; + @ApiModelProperty(value = "装卸货时间(上午、下午、24小时)") + @Excel(name = "装卸货时间(上午、下午、24小时)", width = 15) + private String loadingUnloadTime=""; + @ApiModelProperty(value = "装卸货时间id") + @Excel(name = "装卸货时间id", width = 15) + private String loadingUnloadTimeId=""; + @ApiModelProperty(value = "围栏半径,米") + @Excel(name = "围栏半径,米", width = 15) + private Integer fenceRadius; + @ApiModelProperty(value = "围栏类型: 1 装货围栏 3 卸货围栏") + @Excel(name = "围栏类型: 1 装货围栏 3 卸货围栏", width = 15) + private Integer fenceType; + + +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsAddressMultiDTO.java b/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsAddressMultiDTO.java new file mode 100644 index 000000000..f7f0b3fd6 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsAddressMultiDTO.java @@ -0,0 +1,49 @@ +package com.mhd.oms.interfaces.dto.resevationOrder; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +/** + * TODO 多装多卸地址DTO + * + * @author LianZhijian + * @version 1.0 + * @date 2022-12-16 14:23:22 + */ +@Data +public class OmsAddressMultiDTO { + + @ApiModelProperty(value = "装卸货地县区编码") + private String areaCode; + @ApiModelProperty(value = "装卸货地名称") + private String areaName; + @ApiModelProperty(value = "装卸货详细地址") + private String address; + @ApiModelProperty(value = "装卸货地经度") + private String longitude; + @ApiModelProperty(value = "装货地纬度") + private String latitude; + @ApiModelProperty(value = "装卸货联系人") + private String contactName; + @ApiModelProperty(value = "装卸货联系人电话") + private String contactPhone; + @ApiModelProperty(value = "装卸货日期(年月日)") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private Date layDate; + @ApiModelProperty(value = "装卸货时间(上午、下午、24小时)") + private String layTime; + @ApiModelProperty(value = "装卸货时间id") + private String layTimeId; + @ApiModelProperty(value = "装卸货类型:0无状态1装货地址2卸货地址") + private Integer layType; + @ApiModelProperty(value = "序号") + private Integer sort; + @ApiModelProperty(value = "简称") + private String shortName; + +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsCargoInfoDTO.java b/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsCargoInfoDTO.java new file mode 100644 index 000000000..a6306233a --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsCargoInfoDTO.java @@ -0,0 +1,82 @@ +package com.mhd.oms.interfaces.dto.resevationOrder; + + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + + +/** + * @Description: 货源表 + * @Author: lfs + * @Date: 2020-02-14 09:49:27 + * @Version: V1.0 + */ +@Data +public class OmsCargoInfoDTO implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "货单号") + private String orderId; + @ApiModelProperty(value = "物料ID 库存ID 货物类型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; + private BigDecimal weight; + @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 String materialCode; + + @ApiModelProperty("体积") + private BigDecimal materialVolume; + + @ApiModelProperty("内容") + private String materialContent; + + @ApiModelProperty("是否为库存") + private boolean stockFlag; + + @ApiModelProperty("货物重量 罐车运输专有字段") + private BigDecimal cargoTonnage; + + @ApiModelProperty("价格") + private BigDecimal unitPrice; + + @ApiModelProperty("货物类型标识:STOCK-库存,MATERIAL-物料,MANUAL-手动输入") + private String cargoType; + + @ApiModelProperty("货物备注") + private String remark; +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsLoadingAddressDTO.java b/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsLoadingAddressDTO.java new file mode 100644 index 000000000..0088654e1 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsLoadingAddressDTO.java @@ -0,0 +1,61 @@ +package com.mhd.oms.interfaces.dto.resevationOrder; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.util.List; + +/** + * TODO 装货地址信息 + * + * @author LianZhijian + * @version 1.0 + * @date 2022-10-13 11:10:43 + */ +@Data +public class OmsLoadingAddressDTO { + @ApiModelProperty(value = "装货地名称") + + private String loadingName=""; + @ApiModelProperty(value = "装货地县区编码") + + private String loadingAreaId=""; + @ApiModelProperty(value = "装货地详细地址") + + private String loadingAddress=""; + @ApiModelProperty(value = "装货地经度") + + private String loadingLongitude=""; + @ApiModelProperty(value = "装货地纬度") + + private String loadingLatitude=""; + @ApiModelProperty(value = "发货人姓名") + + private String freighterName=""; + @ApiModelProperty(value = "装货电话") + + private String loadingPhone=""; + @ApiModelProperty(value = "装货时间日期(年月日)") + + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private java.util.Date loadingDate; + @ApiModelProperty(value = "装货时间(上午、下午、24小时)") + + private String loadingTime=""; + @ApiModelProperty(value = "装货时间id") + + private String loadingTimeId=""; + @ApiModelProperty(value = "运距,距离,里程(千米)") + + private BigDecimal haulDistance; + @ApiModelProperty(value = "围栏半径,米") + private Integer fenceRadius; + + @ApiModelProperty(value = "卸货地址list") + private List tmsUnLoadAddressDTOList; + +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsOrderAccount.java b/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsOrderAccount.java new file mode 100644 index 000000000..8150fcb93 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsOrderAccount.java @@ -0,0 +1,103 @@ +package com.mhd.oms.interfaces.dto.resevationOrder; + +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 io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import com.mhd.common.core.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * @Description: 订单费用科目表 + * @Author: Alex + * @Date: 2026-01-14 10:19:57 + * @Version: V1.0 + */ +@Data +@TableName("tms_order_account") +public class OmsOrderAccount implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ID_WORKER_STR) + private String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + @Excel(name = "创建人", width = 15) + private String createBy; + /**创建日期*/ + @ApiModelProperty(value = "创建日期") + @Excel(name = "创建日期", width = 20) + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + @Excel(name = "更新人", width = 15) + private String updateBy; + /**更新日期*/ + @ApiModelProperty(value = "更新日期") + @Excel(name = "更新日期", width = 20) + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private Date updateTime; + /**所属部门*/ + @ApiModelProperty(value = "所属部门") + @Excel(name = "所属部门", width = 15) + private String sysOrgCode; + /**删除标识*/ + @ApiModelProperty(value = "删除标识") + @Excel(name = "删除标识", width = 15) + private Integer isDelete; + /**所属组织*/ + @ApiModelProperty(value = "所属组织") + @Excel(name = "所属组织", width = 15) + private String orgName; + /**组织ID*/ + @ApiModelProperty(value = "组织ID") + @Excel(name = "组织ID", width = 15) + private Long organizationId; + /**一级组织ID*/ + @ApiModelProperty(value = "一级组织ID") + @Excel(name = "一级组织ID", width = 15) + private Long topOrganizationId; + /**组织名称*/ + @ApiModelProperty(value = "组织名称") + @Excel(name = "组织名称", width = 15) + private String organizationName; + /**订单id*/ + @ApiModelProperty(value = "订单id") + @Excel(name = "订单id", width = 15) + private String orderId; + /**科目id*/ + @ApiModelProperty(value = "科目id") + @Excel(name = "科目id", width = 15) + private Long accountId; + /**科目收支类型(1-应收,2-应付*/ + @ApiModelProperty(value = "科目收支类型(1-应收,2-应付") + @Excel(name = "科目收支类型(1-应收,2-应付", width = 15) + private Long accountType; + /**科目编码*/ + @ApiModelProperty(value = "科目编码") + @Excel(name = "科目编码", width = 15) + private String subjectCode; + /**科目名称*/ + @ApiModelProperty(value = "科目名称") + @Excel(name = "科目名称", width = 15) + private String subjectName; + /**科目费率*/ + @ApiModelProperty(value = "科目费率") + @Excel(name = "科目费率", width = 15) + private BigDecimal rate; + + /**金额*/ + @ApiModelProperty(value = "金额") + @Excel(name = "金额", width = 15) + private BigDecimal amount; +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsOrderAddDTO.java b/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsOrderAddDTO.java new file mode 100644 index 000000000..6c5ab5158 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsOrderAddDTO.java @@ -0,0 +1,481 @@ +package com.mhd.oms.interfaces.dto.resevationOrder; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import com.mhd.common.core.annotation.Excel; + +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.List; + +/** + * @Description: 货源表 + * @Author: lfs + * @Date: 2020-02-14 09:49:27 + * @Version: V1.0 + */ +@Data +public class OmsOrderAddDTO implements Serializable { + private static final long serialVersionUID = 1L; + @TableId(type = IdType.ID_WORKER_STR) + private String id; +// @ApiModelProperty(value = "线路名称ID") +// private java.lang.String lineNameId=""; +// @ApiModelProperty(value = "线路名称") +// private java.lang.String lineName=""; +// +// @ApiModelProperty(value = "运距(千米)") +// private BigDecimal haulDistance; + @ApiModelProperty(value = "装货地县区编码",required = true) + private String loadingAreaId=""; + @ApiModelProperty(value = "装货地详细地址") + private String loadingAddress=""; + + @ApiModelProperty(value = "发货人姓名") + private String freighterName=""; + @ApiModelProperty(value = "装货电话") + private String loadingPhone=""; + @ApiModelProperty(value = "装货时间日期(年月日)",required = true) + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private java.util.Date loadingDate; +// @ApiModelProperty(value = "装货时间(上午、下午、24小时)") +// private String loadingTime=""; + @ApiModelProperty(value = "卸货地县区编码",required = true) + private String unloadAreaId=""; + @ApiModelProperty(value = "卸货地详细地址") + private String unloadAddress=""; + @ApiModelProperty(value = "收货人姓名") + private String dischargerName=""; + @ApiModelProperty(value = "卸货电话") + private String unloadPhone=""; + @ApiModelProperty(value = "卸货时间日期(年月日)",required = true) + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private java.util.Date unloadingData; + +// @ApiModelProperty(value = "装货时间id",required = true) +// private String loadingTimeId; +// @ApiModelProperty(value = "卸货时间id",required = true) +// private String unloadingTimeId; +// @ApiModelProperty(value = "卸货时间(上午、下午、24小时)") +// private java.lang.String unloadingTime; + @ApiModelProperty(value = "货物名称ID") + private String goodsNameId; + @ApiModelProperty(value = "货物名称") + private String goodsName; + @ApiModelProperty(value = "货物名称ID",required = true) + private String goodsTypeId; + @ApiModelProperty(value = "货物大类型") + private String goodsType=""; + @ApiModelProperty(value = "重量小(吨)",required = true) + private BigDecimal weightMin; + @ApiModelProperty(value = "重量大(吨)",required = true) + private BigDecimal weightMax; + + @ApiModelProperty(value = "货物数量单位(吨/方/件)id",required = true) + private String goodsUntisId; + @ApiModelProperty(value = "配载方式ID(0-数量,1-车次)",required = true) + private Integer transportationModeId = 1; + @ApiModelProperty(value = "车型车长ID") + private String carType; +// @ApiModelProperty(value = "指定司机ID") +// private String appointDriverId; +// @ApiModelProperty(value = "司机姓名") +// private String appointDriver; +// @ApiModelProperty(value = "司机手机号") +// private String appointDriverPhone; +// @ApiModelProperty(value = "司机车牌号") +// private String appointDriverLicense; + @ApiModelProperty(value = "服务要求ID") + private String serviceRequireId; + @ApiModelProperty(value = "备注") + private String remarks; + + @ApiModelProperty(value = "备注") + private String orderRemark; +// @ApiModelProperty(value = "运单类型(0-企业普货、1-企业批量货、2-撮合货(普通货源)、3-客服运单,4-线下运单)") +// private Integer waybillType ; + @ApiModelProperty(value = "运单类型:0-pc端发货,1-pc端导入,2-货主端app发货") + private Integer waybillFrom = 2 ; +// @ApiModelProperty(value = "期望运费") +// private java.math.BigDecimal freightHope; +// @ApiModelProperty(value = "占用车长") +// private String occupyConductor; + @ApiModelProperty(value = "运单模式(0-普通模式,1-竞价模式)") + private Integer waybillMode = 0; + @ApiModelProperty(value = "竞价截止时间") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private java.util.Date latestBiddingTime; + @ApiModelProperty(value = "发货运费") + private BigDecimal deliveryFreight; + @ApiModelProperty(value = "运费单价(元/吨)") + private BigDecimal transportationUnitPrice; + @ApiModelProperty(value = "结算方式,1-按趟结算,2-按数量结算") + private Integer radioValue; + @ApiModelProperty(value = "合同物流导入(0-默认,1-合同,2-普通导入)") + private Integer isContract = 0; + +// @ApiModelProperty(value = "是否长期货源:0-否,1-是") +// private Integer isLongOrder=0; + +// @ApiModelProperty(value = "卸货单位") +// private java.lang.String unloadUnit; +// @ApiModelProperty(value = "收货人身份证号") +// private String unloadIdentificationNumber; +// @ApiModelProperty(value = "代运营人员用户ID") +// private String orderAgentUserId; + + @ApiModelProperty(value = "指定货主编号") + private String appointShipperId; + @ApiModelProperty(value = "指定货主") + private String appointShipper; +// @ApiModelProperty(value = "指定平台公司") +// private String appointCompanyId; +// @ApiModelProperty(value = "指定平台公司名称") +// private String appointCompanyName; +// @ApiModelProperty(value = "指定车辆ID") +// private String appointVehicleId; +// @ApiModelProperty(value = "指定车辆设备号") +// private String appointVehicleDevice; + + @ApiModelProperty(value = "一装多卸地址") + private List tmsLoadingAddressDTOList; + + @ApiModelProperty(value = "多装多卸地址") + private List tmsAddressDTOList; + +// @ApiModelProperty(value = "发布货源方式 0-未指定;1-企业货源;2-平台货源") +// private Integer publishOrderType; + + @ApiModelProperty(value = "批量指定承运人") + private List namedCarrierDTOList; + + /**是否开启路耗(0-否 1-是)*/ +// @ApiModelProperty(value = "是否开启路耗(0-否 1-是)") +// @Excel(name = "是否开启路耗(0-否 1-是)", width = 15) +// private Integer isRoadLoss=0; + /**货物价值(元/吨)*/ +// @ApiModelProperty(value = "货物价值(元/吨)") +// @Excel(name = "货物价值(元/吨)", width = 15) +// private BigDecimal goodsValue=BigDecimal.ZERO; + /**路耗模式( 0-按比例% 1-按数量(吨))*/ +// @ApiModelProperty(value = "路耗模式( 0-按比例% 1-按数量(吨))") +// @Excel(name = "路耗模式( 0-按比例% 1-按数量(吨))", width = 15) +// private Integer roadLossMode; +// /**路耗结算方式( 1-取装货重量 2-取卸货重量 3-装卸货取大 4-装卸货取小)*/ +// @ApiModelProperty(value = "路耗结算方式(0-无 1-取装货重量 2-取卸货重量 3-装卸货取大 4-装卸货取小)") +// @Excel(name = "路耗结算方式( 1-取装货重量 2-取卸货重量 3-装卸货取大 4-装卸货取小)", width = 15) +// private Integer roadLossSettlementMethod; + /**允许货物亏损*/ +// @ApiModelProperty(value = "允许货物亏损(吨或%)") +// @Excel(name = "允许货物亏损(吨或%)", width = 15) +// private BigDecimal allowableLoss=BigDecimal.ZERO; + + /**超出亏损扣除金额(元/吨)*/ +// @ApiModelProperty(value = "超出亏损扣除金额(元/吨)") +// @Excel(name = "超出亏损扣除金额(元/吨)", width = 15) +// private BigDecimal lossDeductionAmount=BigDecimal.ZERO; + +// @ApiModelProperty(value = "上游客户id") +// @Excel(name = "上游客户id", width = 15) +// private String upClientId; + +// @ApiModelProperty(value = "运费抹零 0-不抹零 ,1-抹零小数位,2-抹零个位,3-抹零十位") +// private Integer isFreightNullification ; + + @ApiModelProperty(value = "加油宝计算模式 0-按比例 1-按数值") + private Integer oilValue ; + +// @ApiModelProperty(value = "是否允许接多单:0否 1是") +// private Integer isMultipleOrdersAllowed; + + @ApiModelProperty(value = "发货备注") + private String shippingNote; + +// @ApiModelProperty(value = "涨吨是否计算费用 0-否 1-是 ") +// private Integer isTonnageIncreaseCharge; + @ApiModelProperty(value = "装货地经度") + private String loadingLongitude; + @ApiModelProperty(value = "装货地纬度") + private String loadingLatitude; + + @ApiModelProperty(value = "卸货地经度") + private String unloadLongitude; + @ApiModelProperty(value = "卸货地纬度") + private String unloadLatitude; + + @ApiModelProperty(value = "预设竞标价") + @Excel(name = "预设竞标价", width = 15) + private BigDecimal highestPrice; + + @ApiModelProperty(value = "预设竞标价") + private BigDecimal presetPrice; + + @ApiModelProperty(value = "竞价单位(元/车,元/吨)") + private String biddingUnit; + + @ApiModelProperty(value = "竞价最高可输入价格") + @Excel(name = "竞价最高可输入价格", width = 15) + private BigDecimal maximumBidPrice; + + @ApiModelProperty(value = "评标类型(0-自动评标,1-手动评标)") + private Integer bidEvaluationType = 1; + + @ApiModelProperty("应收结算类型:1-月结,2-现结") + private Integer receivableType; + + @ApiModelProperty(value = "货物数量") + private String goodsQuantity; + @ApiModelProperty(value = "货物数量单位code") + private String goodsQuantityUnitId; + @ApiModelProperty(value = "货物数量单位") + private String goodsQuantityUnit; + +// @ApiModelProperty("项目表ID") +// private Long projectManagementId; + +// @ApiModelProperty(value = "服务费率") +// private BigDecimal serviceRate; + + @ApiModelProperty("是否自动生成协议 0-否 1-是") + @Excel(name = "是否自动生成协议 0-否 1-是") + private Integer isAutoGenerateProtocol; + +// @ApiModelProperty(value = "单车总费用") +// @Excel(name = "单车总费用", width = 15) +// private BigDecimal freightGross = BigDecimal.ZERO; + +// @ApiModelProperty(value = "协议费用:回单付金额") +// @Excel(name = "协议费用:回单付金额", width = 15) +// private BigDecimal receiptPaymentAmount = BigDecimal.ZERO; +// +// @ApiModelProperty(value = "协议费用:预付现金金额") +// @Excel(name = "协议费用:预付现金金额", width = 15) +// private BigDecimal cashAdvance = BigDecimal.ZERO; +// +// @ApiModelProperty(value = "协议费用:到付运费金额") +// @Excel(name = "协议费用:到付运费金额", width = 15) +// private BigDecimal freightAmount = BigDecimal.ZERO; +// +// @ApiModelProperty(value = "协议费用:预付平台油卡金额") +// @Excel(name = "协议费用:预付平台油卡金额", width = 15) +// private BigDecimal oilCardOnline = BigDecimal.ZERO; + +// @ApiModelProperty(value = "单车重量", required = true) +// private BigDecimal singleVehicleWeight; + + + + //=================批量货派单相关============================= +// @ApiModelProperty(value = "需求车次") +// private Integer demandTrainNumber; +// @ApiModelProperty(value = "承运车次默认0") +// private Integer carriageNumber; +// @ApiModelProperty(value = "剩余需求车次") +// private Integer remainingDemandTrainNumber; + + /**货物重量*/ +// @ApiModelProperty(value = "货物重量") +// private BigDecimal goodsWeight; +// @ApiModelProperty(value = "货源剩余货物数量") +// private BigDecimal residueGoodsWeight; +// @ApiModelProperty(value = "承运货物数量") +// private BigDecimal transportGoodsWeight; + + @ApiModelProperty(value = "货物信息表") + private List cargoInfoList; + @ApiModelProperty(value = "装货地址集合") + private List loadingAddressList; + @ApiModelProperty(value = "卸货地址集合") + private List unloadAddressList; + + + + +// @ApiModelProperty(value = "来源系统") +// private String orderSource; + + //========================================新增字段========================================== + @ApiModelProperty(value = "付款方类型(0-委托方,1-收货方)") + @Excel(name = "付款方类型(0-委托方,1-收货方)", width = 15) + private Integer payerType; + + @ApiModelProperty(value = "收货方编码") + private String recipientId; + @ApiModelProperty(value = "收货方") + private String recipientName; + + @ApiModelProperty(value = "整机编号") + private String machineNumber; + + @ApiModelProperty(value = "是否库存(0-是,1-否)") + @Excel(name = "是否库存(0-是,1-否)", width = 15) + private Integer stockFlag; + + @ApiModelProperty(value = "信息费") + private BigDecimal infoFee; + + @ApiModelProperty(value = "订单类型(1-普货运输,2-危化运输,3-罐车运输,4-济南专线,5-江西专线)") + private Integer orderShippingType; + + @ApiModelProperty(value = "单号") + private String thirdPartyOrderNumber; + + @ApiModelProperty(value = "车辆类型Id") + private String vehicleTypeId; + + @ApiModelProperty(value = "车辆类型名称") + private String vehicleTypeName; + + @ApiModelProperty(value = "承运人Id(订单为济南专线使用)") + private String carrier; + + @ApiModelProperty(value = "承运人姓名(订单为济南专线使用)") + private String carrierName; + + @ApiModelProperty("运费单价") + private BigDecimal freightUnitPrice; + + @ApiModelProperty("数字物流平台用户id") + private Long szwlUserId; + + @ApiModelProperty(value = "信息费收款方") + private String infoFeePayee; + + @ApiModelProperty(value = "信息费收款方方式(0-委托方,1-收货方,2-第三方)") + private Integer infoFeePayeeType; + + @ApiModelProperty("业务员ID") + private String salesmanId; + + @ApiModelProperty("业务员ID") + private String salesmanName; + + @ApiModelProperty("是否报关(0:否,1:是)") + private Integer isDeclare; + + @ApiModelProperty("线路") + private String route; + + @ApiModelProperty("柜类型") + private String containerType; + + @ApiModelProperty("柜类型名称") + private String containerTypeName; + + @ApiModelProperty("卡类型") + private String cardType; + + @ApiModelProperty("卡类型名称") + private String cardTypeName; + + @ApiModelProperty("外来柜号") + private String externalContainerNo; + + @ApiModelProperty("中转地") + private String transitPlace; + + @ApiModelProperty("托运人ID") + private String shipper; + + @ApiModelProperty("托运人ID") + private String customsShipper; + + @ApiModelProperty("托运人电话") + private String customsShipperTel; + + @ApiModelProperty("卸货单位") + private String unloadingCompany; + + @ApiModelProperty("合同编号") + private String contractNo; + + @ApiModelProperty("运费") + private BigDecimal freightFee; + + @ApiModelProperty("卸货费") + private BigDecimal unloadingFee; + + @ApiModelProperty("报关费") + private BigDecimal customsFee; + + @ApiModelProperty("差货费") + private BigDecimal shortageFee; + + @ApiModelProperty("杂费") + private BigDecimal miscellaneousFee; + + @ApiModelProperty("其他费用") + private BigDecimal otherFee; + + @ApiModelProperty("滞车费") + private BigDecimal detentionFee; + + @ApiModelProperty("税率") + private BigDecimal taxRate; + + @ApiModelProperty("结算币种") + private String settlementCurrency; + + @ApiModelProperty("体积") + private BigDecimal volume; + + @ApiModelProperty("内容详情") + private String detailContent; + + @ApiModelProperty("报关线路") + private String customsRoute; + + @ApiModelProperty("报关关口") + private String customsPort; + + @ApiModelProperty("报关联系人") + private String customsContact; + + @ApiModelProperty("报关联系人电话") + private String customsContactPhone; + + @ApiModelProperty("报关备注") + private String customsRemark; + + @ApiModelProperty(value = "组织ID") + private String orgId; + + @ApiModelProperty(value = "所属组织") + @Excel(name = "所属组织", width = 15) + private String orgName; + + @ApiModelProperty(value = "组织ID") + private Long organizationId; + + @ApiModelProperty(value = "组织名称") + private String organizationName; + + @ApiModelProperty(value = "上级组织ID") + private Long topOrganizationId; + + @ApiModelProperty("客户编码nc") + private String customerCodeNc; + + @ApiModelProperty("制单人编码nc") + private String makerCodeNc; + + @ApiModelProperty("业务员编码nc") + private String salesmanCodeNc; + + @ApiModelProperty(value = "单据日期") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private java.util.Date documentDate; + + + @ApiModelProperty("费用科目明细") + private List tmsOrderAccountList; +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsOrderDTO.java b/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsOrderDTO.java new file mode 100644 index 000000000..25bf65931 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsOrderDTO.java @@ -0,0 +1,477 @@ +package com.mhd.oms.interfaces.dto.resevationOrder; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.mhd.common.core.annotation.Excel; +import io.swagger.annotations.ApiModelProperty; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.util.List; + +/** + * @author: brb + * @description: + * @create: 2026-01-26 10:50 + */ +public class OmsOrderDTO { + private static final long serialVersionUID = 1L; + @TableId(type = IdType.ID_WORKER_STR) + private String id; + // @ApiModelProperty(value = "线路名称ID") +// private java.lang.String lineNameId=""; +// @ApiModelProperty(value = "线路名称") +// private java.lang.String lineName=""; +// +// @ApiModelProperty(value = "运距(千米)") +// private BigDecimal haulDistance; + @ApiModelProperty(value = "装货地县区编码",required = true) + private String loadingAreaId=""; + @ApiModelProperty(value = "装货地详细地址") + private String loadingAddress=""; + + @ApiModelProperty(value = "发货人姓名") + private String freighterName=""; + @ApiModelProperty(value = "装货电话") + private String loadingPhone=""; + @ApiModelProperty(value = "装货时间日期(年月日)",required = true) + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private java.util.Date loadingDate; + // @ApiModelProperty(value = "装货时间(上午、下午、24小时)") +// private String loadingTime=""; + @ApiModelProperty(value = "卸货地县区编码",required = true) + private String unloadAreaId=""; + @ApiModelProperty(value = "卸货地详细地址") + private String unloadAddress=""; + @ApiModelProperty(value = "收货人姓名") + private String dischargerName=""; + @ApiModelProperty(value = "卸货电话") + private String unloadPhone=""; + @ApiModelProperty(value = "卸货时间日期(年月日)",required = true) + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private java.util.Date unloadingData; + + // @ApiModelProperty(value = "装货时间id",required = true) +// private String loadingTimeId; +// @ApiModelProperty(value = "卸货时间id",required = true) +// private String unloadingTimeId; +// @ApiModelProperty(value = "卸货时间(上午、下午、24小时)") +// private java.lang.String unloadingTime; + @ApiModelProperty(value = "货物名称ID") + private String goodsNameId; + @ApiModelProperty(value = "货物名称") + private String goodsName; + @ApiModelProperty(value = "货物名称ID",required = true) + private String goodsTypeId; + @ApiModelProperty(value = "货物大类型") + private java.lang.String goodsType=""; + @ApiModelProperty(value = "重量小(吨)",required = true) + private java.math.BigDecimal weightMin; + @ApiModelProperty(value = "重量大(吨)",required = true) + private java.math.BigDecimal weightMax; + + @ApiModelProperty(value = "货物数量单位(吨/方/件)id",required = true) + private String goodsUntisId; + @ApiModelProperty(value = "配载方式ID(0-数量,1-车次)",required = true) + private Integer transportationModeId = 1; + @ApiModelProperty(value = "车型车长ID") + private String carType; + // @ApiModelProperty(value = "指定司机ID") +// private String appointDriverId; +// @ApiModelProperty(value = "司机姓名") +// private String appointDriver; +// @ApiModelProperty(value = "司机手机号") +// private String appointDriverPhone; +// @ApiModelProperty(value = "司机车牌号") +// private String appointDriverLicense; + @ApiModelProperty(value = "服务要求ID") + private String serviceRequireId; + @ApiModelProperty(value = "备注") + private String remarks; + + @ApiModelProperty(value = "备注") + private String orderRemark; + // @ApiModelProperty(value = "运单类型(0-企业普货、1-企业批量货、2-撮合货(普通货源)、3-客服运单,4-线下运单)") +// private Integer waybillType ; + @ApiModelProperty(value = "运单类型:0-pc端发货,1-pc端导入,2-货主端app发货") + private Integer waybillFrom = 2 ; + // @ApiModelProperty(value = "期望运费") +// private java.math.BigDecimal freightHope; +// @ApiModelProperty(value = "占用车长") +// private String occupyConductor; + @ApiModelProperty(value = "运单模式(0-普通模式,1-竞价模式)") + private java.lang.Integer waybillMode = 0; + @ApiModelProperty(value = "竞价截止时间") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private java.util.Date latestBiddingTime; + @ApiModelProperty(value = "发货运费") + private java.math.BigDecimal deliveryFreight; + @ApiModelProperty(value = "运费单价(元/吨)") + private BigDecimal transportationUnitPrice; + @ApiModelProperty(value = "结算方式,1-按趟结算,2-按数量结算") + private Integer radioValue; + @ApiModelProperty(value = "合同物流导入(0-默认,1-合同,2-普通导入)") + private Integer isContract = 0; + +// @ApiModelProperty(value = "是否长期货源:0-否,1-是") +// private Integer isLongOrder=0; + +// @ApiModelProperty(value = "卸货单位") +// private java.lang.String unloadUnit; +// @ApiModelProperty(value = "收货人身份证号") +// private String unloadIdentificationNumber; +// @ApiModelProperty(value = "代运营人员用户ID") +// private String orderAgentUserId; + + @ApiModelProperty(value = "指定货主编号") + private String appointShipperId; + @ApiModelProperty(value = "指定货主") + private String appointShipper; +// @ApiModelProperty(value = "指定平台公司") +// private String appointCompanyId; +// @ApiModelProperty(value = "指定平台公司名称") +// private String appointCompanyName; +// @ApiModelProperty(value = "指定车辆ID") +// private String appointVehicleId; +// @ApiModelProperty(value = "指定车辆设备号") +// private String appointVehicleDevice; + + @ApiModelProperty(value = "一装多卸地址") + private List tmsLoadingAddressDTOList; + + @ApiModelProperty(value = "多装多卸地址") + private List tmsAddressDTOList; + +// @ApiModelProperty(value = "发布货源方式 0-未指定;1-企业货源;2-平台货源") +// private Integer publishOrderType; + + @ApiModelProperty(value = "批量指定承运人") + private List namedCarrierDTOList; + + /**是否开启路耗(0-否 1-是)*/ +// @ApiModelProperty(value = "是否开启路耗(0-否 1-是)") +// @Excel(name = "是否开启路耗(0-否 1-是)", width = 15) +// private Integer isRoadLoss=0; + /**货物价值(元/吨)*/ +// @ApiModelProperty(value = "货物价值(元/吨)") +// @Excel(name = "货物价值(元/吨)", width = 15) +// private BigDecimal goodsValue=BigDecimal.ZERO; + /**路耗模式( 0-按比例% 1-按数量(吨))*/ +// @ApiModelProperty(value = "路耗模式( 0-按比例% 1-按数量(吨))") +// @Excel(name = "路耗模式( 0-按比例% 1-按数量(吨))", width = 15) +// private Integer roadLossMode; +// /**路耗结算方式( 1-取装货重量 2-取卸货重量 3-装卸货取大 4-装卸货取小)*/ +// @ApiModelProperty(value = "路耗结算方式(0-无 1-取装货重量 2-取卸货重量 3-装卸货取大 4-装卸货取小)") +// @Excel(name = "路耗结算方式( 1-取装货重量 2-取卸货重量 3-装卸货取大 4-装卸货取小)", width = 15) +// private Integer roadLossSettlementMethod; + /**允许货物亏损*/ +// @ApiModelProperty(value = "允许货物亏损(吨或%)") +// @Excel(name = "允许货物亏损(吨或%)", width = 15) +// private BigDecimal allowableLoss=BigDecimal.ZERO; + + /**超出亏损扣除金额(元/吨)*/ +// @ApiModelProperty(value = "超出亏损扣除金额(元/吨)") +// @Excel(name = "超出亏损扣除金额(元/吨)", width = 15) +// private BigDecimal lossDeductionAmount=BigDecimal.ZERO; + +// @ApiModelProperty(value = "上游客户id") +// @Excel(name = "上游客户id", width = 15) +// private String upClientId; + +// @ApiModelProperty(value = "运费抹零 0-不抹零 ,1-抹零小数位,2-抹零个位,3-抹零十位") +// private Integer isFreightNullification ; + + @ApiModelProperty(value = "加油宝计算模式 0-按比例 1-按数值") + private Integer oilValue ; + +// @ApiModelProperty(value = "是否允许接多单:0否 1是") +// private Integer isMultipleOrdersAllowed; + + @ApiModelProperty(value = "发货备注") + private String shippingNote; + + // @ApiModelProperty(value = "涨吨是否计算费用 0-否 1-是 ") +// private Integer isTonnageIncreaseCharge; + @ApiModelProperty(value = "装货地经度") + private java.lang.String loadingLongitude; + @ApiModelProperty(value = "装货地纬度") + private java.lang.String loadingLatitude; + + @ApiModelProperty(value = "卸货地经度") + private java.lang.String unloadLongitude; + @ApiModelProperty(value = "卸货地纬度") + private java.lang.String unloadLatitude; + + @ApiModelProperty(value = "预设竞标价") + + private BigDecimal highestPrice; + + @ApiModelProperty(value = "预设竞标价") + private BigDecimal presetPrice; + + @ApiModelProperty(value = "竞价单位(元/车,元/吨)") + private String biddingUnit; + + @ApiModelProperty(value = "竞价最高可输入价格") + + private BigDecimal maximumBidPrice; + + @ApiModelProperty(value = "评标类型(0-自动评标,1-手动评标)") + private Integer bidEvaluationType = 1; + + @ApiModelProperty("应收结算类型:1-月结,2-现结") + private Integer receivableType; + + @ApiModelProperty(value = "货物数量") + private String goodsQuantity; + @ApiModelProperty(value = "货物数量单位code") + private String goodsQuantityUnitId; + @ApiModelProperty(value = "货物数量单位") + private String goodsQuantityUnit; + +// @ApiModelProperty("项目表ID") +// private Long projectManagementId; + +// @ApiModelProperty(value = "服务费率") +// private BigDecimal serviceRate; + + @ApiModelProperty("是否自动生成协议 0-否 1-是") + + private Integer isAutoGenerateProtocol; + +// @ApiModelProperty(value = "单车总费用") +// @Excel(name = "单车总费用", width = 15) +// private BigDecimal freightGross = BigDecimal.ZERO; + +// @ApiModelProperty(value = "协议费用:回单付金额") +// @Excel(name = "协议费用:回单付金额", width = 15) +// private BigDecimal receiptPaymentAmount = BigDecimal.ZERO; +// +// @ApiModelProperty(value = "协议费用:预付现金金额") +// @Excel(name = "协议费用:预付现金金额", width = 15) +// private BigDecimal cashAdvance = BigDecimal.ZERO; +// +// @ApiModelProperty(value = "协议费用:到付运费金额") +// @Excel(name = "协议费用:到付运费金额", width = 15) +// private BigDecimal freightAmount = BigDecimal.ZERO; +// +// @ApiModelProperty(value = "协议费用:预付平台油卡金额") +// @Excel(name = "协议费用:预付平台油卡金额", width = 15) +// private BigDecimal oilCardOnline = BigDecimal.ZERO; + +// @ApiModelProperty(value = "单车重量", required = true) +// private BigDecimal singleVehicleWeight; + + + + //=================批量货派单相关============================= +// @ApiModelProperty(value = "需求车次") +// private Integer demandTrainNumber; +// @ApiModelProperty(value = "承运车次默认0") +// private Integer carriageNumber; +// @ApiModelProperty(value = "剩余需求车次") +// private Integer remainingDemandTrainNumber; + + /**货物重量*/ +// @ApiModelProperty(value = "货物重量") +// private BigDecimal goodsWeight; +// @ApiModelProperty(value = "货源剩余货物数量") +// private BigDecimal residueGoodsWeight; +// @ApiModelProperty(value = "承运货物数量") +// private BigDecimal transportGoodsWeight; + + @ApiModelProperty(value = "货物信息表") + private List cargoInfoList; + @ApiModelProperty(value = "装货地址集合") + private List loadingAddressList; + @ApiModelProperty(value = "卸货地址集合") + private List unloadAddressList; + + + + +// @ApiModelProperty(value = "来源系统") +// private String orderSource; + + //========================================新增字段========================================== + @ApiModelProperty(value = "付款方类型(0-委托方,1-收货方)") + + private java.lang.Integer payerType; + + @ApiModelProperty(value = "收货方编码") + private String recipientId; + @ApiModelProperty(value = "收货方") + private String recipientName; + + @ApiModelProperty(value = "整机编号") + private String machineNumber; + + @ApiModelProperty(value = "是否库存(0-是,1-否)") + @Excel(name = "是否库存(0-是,1-否)", width = 15) + private java.lang.Integer stockFlag; + + @ApiModelProperty(value = "信息费") + private java.math.BigDecimal infoFee; + + @ApiModelProperty(value = "订单类型(1-普货运输,2-危化运输,3-罐车运输,4-济南专线,5-江西专线)") + private Integer orderShippingType; + + @ApiModelProperty(value = "单号") + private String thirdPartyOrderNumber; + + @ApiModelProperty(value = "车辆类型Id") + private String vehicleTypeId; + + @ApiModelProperty(value = "车辆类型名称") + private String vehicleTypeName; + + @ApiModelProperty(value = "承运人Id(订单为济南专线使用)") + private String carrier; + + @ApiModelProperty(value = "承运人姓名(订单为济南专线使用)") + private String carrierName; + + @ApiModelProperty("运费单价") + private BigDecimal freightUnitPrice; + + @ApiModelProperty("数字物流平台用户id") + private Long szwlUserId; + + @ApiModelProperty(value = "信息费收款方") + private String infoFeePayee; + + @ApiModelProperty(value = "信息费收款方方式(0-委托方,1-收货方,2-第三方)") + private Integer infoFeePayeeType; + + @ApiModelProperty("业务员ID") + private String salesmanId; + + @ApiModelProperty("业务员ID") + private String salesmanName; + + @ApiModelProperty("是否报关(0:否,1:是)") + private Integer isDeclare; + + @ApiModelProperty("线路") + private String route; + + @ApiModelProperty("柜类型") + private String containerType; + + @ApiModelProperty("柜类型名称") + private String containerTypeName; + + @ApiModelProperty("卡类型") + private String cardType; + + @ApiModelProperty("卡类型名称") + private String cardTypeName; + + @ApiModelProperty("外来柜号") + private String externalContainerNo; + + @ApiModelProperty("中转地") + private String transitPlace; + + @ApiModelProperty("托运人ID") + private String shipper; + + @ApiModelProperty("托运人ID") + private String customsShipper; + + @ApiModelProperty("托运人电话") + private String customsShipperTel; + + @ApiModelProperty("卸货单位") + private String unloadingCompany; + + @ApiModelProperty("合同编号") + private String contractNo; + + @ApiModelProperty("运费") + private BigDecimal freightFee; + + @ApiModelProperty("卸货费") + private BigDecimal unloadingFee; + + @ApiModelProperty("报关费") + private BigDecimal customsFee; + + @ApiModelProperty("差货费") + private BigDecimal shortageFee; + + @ApiModelProperty("杂费") + private BigDecimal miscellaneousFee; + + @ApiModelProperty("其他费用") + private BigDecimal otherFee; + + @ApiModelProperty("滞车费") + private BigDecimal detentionFee; + + @ApiModelProperty("税率") + private BigDecimal taxRate; + + @ApiModelProperty("结算币种") + private String settlementCurrency; + + @ApiModelProperty("体积") + private BigDecimal volume; + + @ApiModelProperty("内容详情") + private String detailContent; + + @ApiModelProperty("报关线路") + private String customsRoute; + + @ApiModelProperty("报关关口") + private String customsPort; + + @ApiModelProperty("报关联系人") + private String customsContact; + + @ApiModelProperty("报关联系人电话") + private String customsContactPhone; + + @ApiModelProperty("报关备注") + private String customsRemark; + + @ApiModelProperty(value = "组织ID") + private String orgId; + + @ApiModelProperty(value = "所属组织") + @Excel(name = "所属组织", width = 15) + private String orgName; + + @ApiModelProperty(value = "组织ID") + private Long organizationId; + + @ApiModelProperty(value = "组织名称") + private String organizationName; + + @ApiModelProperty(value = "上级组织ID") + private Long topOrganizationId; + + @ApiModelProperty("客户编码nc") + private String customerCodeNc; + + @ApiModelProperty("制单人编码nc") + private String makerCodeNc; + + @ApiModelProperty("业务员编码nc") + private String salesmanCodeNc; + + @ApiModelProperty(value = "单据日期") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private java.util.Date documentDate; + + + @ApiModelProperty("费用科目明细") + private List tmsOrderAccountList; +} + diff --git a/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsUnLoadAddressDTO.java b/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsUnLoadAddressDTO.java new file mode 100644 index 000000000..ac29d54e4 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/interfaces/dto/resevationOrder/OmsUnLoadAddressDTO.java @@ -0,0 +1,51 @@ +package com.mhd.oms.interfaces.dto.resevationOrder; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * TODO 卸货地址信息 + * + * @author LianZhijian + * @version 1.0 + * @date 2022-10-13 11:10:43 + */ +@Data +public class OmsUnLoadAddressDTO { + @ApiModelProperty(value = "卸货地名称") + + private String unloadName=""; + @ApiModelProperty(value = "卸货地县区编码") + + private String unloadAreaId=""; + @ApiModelProperty(value = "卸货地详细地址") + + private String unloadAddress=""; + @ApiModelProperty(value = "卸货地经度") + + private String unloadLongitude=""; + @ApiModelProperty(value = "卸货地纬度") + + private String unloadLatitude=""; + @ApiModelProperty(value = "收货人姓名") + + private String dischargerName=""; + @ApiModelProperty(value = "卸货电话") + + private String unloadPhone=""; + @ApiModelProperty(value = "卸货时间日期(年月日)") + + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private java.util.Date unloadingDate; + @ApiModelProperty(value = "卸货时间(上午、下午、24小时)") + + private String unloadingTime; + @ApiModelProperty(value = "卸货时间id") + + private String unloadingTimeId=""; + + +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/interfaces/facade/resevationOrder/ResevationOrderApi.java b/mhd_oms/src/main/java/com/mhd/oms/interfaces/facade/resevationOrder/ResevationOrderApi.java new file mode 100644 index 000000000..6020db06f --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/interfaces/facade/resevationOrder/ResevationOrderApi.java @@ -0,0 +1,82 @@ +package com.mhd.oms.interfaces.facade.resevationOrder; + +import com.aliyun.oss.ServiceException; +import com.mhd.common.core.utils.sms.CommonConstant; +import com.mhd.common.core.utils.sms.Result; +import com.mhd.common.security.utils.SecurityUtils; +import com.mhd.oms.domain.resevationOrder.repository.facade.IOmsAddressMultiService; +import com.mhd.oms.interfaces.dto.resevationOrder.OmsOrderAddDTO; +import com.mhd.system.api.domain.TmsTransportNote; +import com.mhd.system.api.model.LoginUser; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; + +/** + * @author: brb + * @description: + * @create: 2026-01-26 11:38 + */ +@RestController +@RequestMapping("/resevationOrderApi") +@Slf4j +public class ResevationOrderApi { + + @Resource + private IOmsAddressMultiService omsAddressMultiService; + + + + /** + * 发货 + * + * @param tmsOrderAddDTO + * @return +*/ + @ApiOperation(value = "货源表-发货", notes = "货源表-发货") + @PostMapping(value = "/add") + public Result add(@RequestBody OmsOrderAddDTO tmsOrderAddDTO) { + Result result = new Result(); + //TmsTransportNote transportNote = new TmsTransportNote(); + try { + // 获取当前登录用户的组织信息 + LoginUser loginUser = SecurityUtils.getLoginUser(); + if (loginUser != null && loginUser.getUserPo() != null) { + // 设置组织ID + if (loginUser.getUserPo().getOrganizationId() != null) { + tmsOrderAddDTO.setOrganizationId(loginUser.getUserPo().getOrganizationId()); + } + // 设置组织名称 + if (loginUser.getUserPo().getOrganizationName() != null) { + tmsOrderAddDTO.setOrganizationName(loginUser.getUserPo().getOrganizationName()); + } + // 设置上级组织ID + if (loginUser.getUserPo().getTopOrganizationId() != null) { + tmsOrderAddDTO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId()); + } + } + + //transportNote = tmsOrderService.save(tmsOrderAddDTO); + //tmsOrderService.save(tmsOrderAddDTO); + omsAddressMultiService.save(tmsOrderAddDTO); + + result.success("发货成功"); + //result.setResult(transportNote); + result.setCode(CommonConstant.SC_OK_200); + } catch (ServiceException e) { + e.printStackTrace(); + result.error500("发货失败:"+e.getErrorMessage()); + } catch (Exception e) { + e.printStackTrace(); + result.error500("发货失败"); + } + return result; + } + + +} diff --git a/mhd_oms/src/main/java/com/mhd/oms/util/MultistageDictUtils.java b/mhd_oms/src/main/java/com/mhd/oms/util/MultistageDictUtils.java new file mode 100644 index 000000000..84b32f79b --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/util/MultistageDictUtils.java @@ -0,0 +1,13 @@ +package com.mhd.oms.util; + +import com.mhd.common.core.domain.po.SysMultistageDictPo; +import org.springframework.stereotype.Component; + +@Component +public class MultistageDictUtils { + + public SysMultistageDictPo getMultistageDictByCode(String type, String code) { + // 实现多级字典获取逻辑 + return null; + } +} \ No newline at end of file diff --git a/mhd_oms/src/main/java/com/mhd/oms/util/OrderSequence.java b/mhd_oms/src/main/java/com/mhd/oms/util/OrderSequence.java new file mode 100644 index 000000000..3b8e37503 --- /dev/null +++ b/mhd_oms/src/main/java/com/mhd/oms/util/OrderSequence.java @@ -0,0 +1,145 @@ +package com.mhd.oms.util; + +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.RandomUtil; + +import java.text.SimpleDateFormat; +import java.util.Date; + +/** + * @Author Alex + * @Description 运单号生成规则 + * @Date 2020/2/2 11:06 + * @Param + * @return + */ +public class OrderSequence { + + /** + * @Author Alex + * @Description 生成唯一运单号 + * @Date 2020/2/2 11:06 + * @Param + * @return + */ + public static String getOrderCode(){ + return new StringBuffer() + .append(getSecondPart()) + .append(getThreePart()) + .toString(); + } + + /** + * @Author Alex + * @Description 生成唯一运单号 + * @Date 2020/2/2 11:06 + * @Param + * @return + */ + public static String getOrderCodeByDate(Date date){ + return new StringBuffer() + .append(getSecondPartByDate(date)) + .append(getThreePart()) + .toString(); + } + + /** + * @Author Alex + * @Description 生成唯一运单号(带前缀) + * @Date 2020/2/2 11:06 + * @Param + * @return + */ + public static String getOrderCode(String prefix){ + return new StringBuffer().append(getFirstPart(prefix)) + .append(getSecondPart()) + .append(getThreePart()) + .toString(); + } + + /** + * @Author Alex + * @Description 带前缀 + * @Date 2020/2/2 11:06 + * @Param + * @return + */ + private static String getFirstPart(String prefix) { + return prefix.toUpperCase(); + } + + /** + * @Author Alex + * @Description 生成时间戳 + * @Date 2020/2/2 11:06 + * @Param + * @return + */ + private static String getSecondPart() { + String temp_current_time = DateUtil.format(new Date(), datePattern()); + return temp_current_time.substring(2, temp_current_time.length()); + } + + private static String getSecondPartByDate(Date date) { + if (date == null) { + date = new Date(); + } + String temp_current_time = DateUtil.format(date, datePattern()); + return temp_current_time.substring(2, temp_current_time.length()); + } + + /** + * @Author Alex + * @Description 生成4为随机数字 + * @Date 2020/2/2 11:06 + * @Param + * @return + */ + private static String getThreePart() { + return RandomUtil.randomNumbers(4); + } + + private static String datePattern() { + return "yyyyMMddHHmmss"; + } + + public static void main(String[] args) { + for( int i=0; i<10; i++ ){ + System.out.println(OrderSequence.getOrderCode()); + } + } + /*** + * 生成单号 + * @param letter 需要传入的字母开头和时间 + * @return + */ + public static String createOddNum(Date createTime,String letter, Integer length){ + if( null == createTime ){ + createTime = new Date(); + } + SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String createTimestr = sf.format(createTime); + String timeCode = createTimestr.substring(2,4)+ + createTimestr.substring(5,7); + + String randomCode = RandomUtil.randomNumbers(length); + String oddNumber = letter + timeCode+randomCode; + return oddNumber; + } + /*** + * 生成单号 + * @param letter 需要传入的字母开头 + * @return + */ + public static String createOddNum(String letter, Integer length){ + Date createTime = new Date(); + SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String createTimestr = sf.format(createTime); + String timeCode = createTimestr.substring(2,4)+ + createTimestr.substring(5,7) + createTimestr.substring(8,10); + + String randomCode = RandomUtil.randomNumbers(length); + return letter + timeCode+randomCode + "/00-01-01"; + } + +} \ No newline at end of file