Commit 453d0100 authored by 332784038@qq.com's avatar 332784038@qq.com

订单相关业务逻辑变动

parent b1b1b70d
......@@ -9,6 +9,6 @@ alter table `ecw_order_consignee`
alter table `ecw_order`
add column `pick_state` tinyint DEFAULT 0 COMMENT '提货状态:0 未提货 1 部分提货 2 已提货';
alter table `ecw_order`
add column `pick_ratio` VARCHAR(50) DEFAULT '0' COMMENT '提货率';
add column `pick_ratio` int DEFAULT 0 COMMENT '提货率';
alter table `ecw_order`
add column `pick_num` int DEFAULT 0 COMMENT '提货箱数';
\ No newline at end of file
......@@ -533,9 +533,15 @@ public class OrderDO extends BaseDO {
@ApiModelProperty(value = "放货锁定收货人天数")
private Integer lockConsigneeDay;
//
// @ApiModelProperty(value = "拆单子订单是否变更运输方式")
// private Boolean splitChangeTransport = false;
@ApiModelProperty(value = "提货状态:0 未提货 1 部分提货 2 已提货")
private Integer pickState;
@ApiModelProperty(value = "'提货率'")
private String pickRatio;
@ApiModelProperty(value = "'提货箱数'")
private Integer pickNum;
@TableField(exist = false)
@ApiModelProperty(value = "订单商品项列表")
......
......@@ -92,6 +92,10 @@ public class OrderConsigneeDO extends BaseDO {
* 客户id
*/
private Long customerId;
/**
* 客户编号
*/
private String customerNumber;
/**
* 客户联系人id
*/
......
......@@ -75,6 +75,10 @@ public class OrderConsignorDO extends BaseDO {
*
*/
private Long customerId;
/**
* 客户编号
*/
private String customerNumber;
/**
*
*/
......
......@@ -530,6 +530,15 @@ public class OrderBackInfoDto {
@ApiModelProperty(value = "是否在公海")
private Boolean isInOpenSea;
@ApiModelProperty(value = "提货状态:0 未提货 1 部分提货 2 已提货")
private Integer pickState;
@ApiModelProperty(value = "'提货率'")
private Integer pickRatio;
@ApiModelProperty(value = "'提货箱数'")
private Integer pickNum;
public void setExceptionReason(String exceptionReason) {
this.exceptionReason = exceptionReason;
if (StringUtils.isNotBlank(exceptionReason) && Objects.nonNull(this.lang)) {
......
......@@ -526,6 +526,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if (consignorCustomerDO != null) {
orderConsignorDO.setCompany(consignorCustomerDO.getCompany());
orderConsignorDO.setCompanyEn(consignorCustomerDO.getCompanyEn());
orderConsignorDO.setCustomerNumber(consignorCustomerDO.getNumber());
CountryDO consignorCountryDO = countryService.getById(consignorCustomerDO.getCountry());
if (consignorCountryDO != null) {
orderConsignorDO.setCountryAbbreviation(consignorCountryDO.getNameShort());
......@@ -648,6 +649,10 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderConsigneeDO.setCustomerId(consignee.getCustomerId());
orderConsigneeDO.setCustomerContactsId(consignee.getId());
CustomerDO consigneeDO = customerService.getCustomer(consignee.getCustomerId());
if (Objects.nonNull(consigneeDO)) {
orderConsignorDO.setCustomerNumber(consigneeDO.getNumber());
}
} else {
// 客户不存在,新增客户联系人信息 orderConsigneeDO中有值
// 20230511 收货人无客户档案时 判断发货人有无客户经理,没有 生成客户档案,进入待分配。
......@@ -710,6 +715,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderConsignorDO.setCountryAbbreviation(consignorCountryDO.getNameShort());
}
noConsignee = consignorDO.getNoConsignee();
orderConsignorDO.setCustomerNumber(consignorDO.getNumber());
}
CustomerContactsDO consignorContactsDO =
customerContactsService.getCustomerContacts(
......@@ -822,6 +828,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderConsigneeDO.setCompanyEn(consigneeDO.getCompanyEn());
orderConsigneeDO.setAddress(consigneeDO.getAddress());
orderConsigneeDO.setCustomerId(consigneeDO.getId());
orderConsigneeDO.setCustomerNumber(consigneeDO.getNumber());
CountryDO consigneeCountryDO = countryService.getById(consigneeDO.getCountry());
if (consigneeCountryDO != null) {
orderConsignorDO.setCountryAbbreviation(consigneeCountryDO.getNameShort());
......@@ -1848,6 +1855,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
// 发货人控货无收货人属性设置变动,需要变动客户业绩
vo.setIsCharge(true);
}
orderConsignorBackVO.setCustomerNumber(consignorDO.getNumber());
}
this.compareConsignorInfo(updateReqVO, consignorContactsDO, orderConsignorBackVO, applyInfoList, vo);
}
......@@ -1856,6 +1864,9 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
CustomerContactsDO consigneeContactsDO = customerContactsService.getCustomerContacts(updateReqVO.getConsigneeContactsId());
OrderConsigneeBackVO orderConsigneeBackVO = vo.getConsigneeVO();
CustomerDO consigneeDO = customerService.getById(updateReqVO.getConsigneeId());
if (Objects.nonNull(consigneeDO)) {
orderConsigneeBackVO.setCustomerNumber(consigneeDO.getNumber());
}
if (vo.getIsCargoControl() && !noConsignee) {
if (Objects.isNull(consigneeContactsDO)) {
//todo 需要判断手机号唯一性,判断规则:1.区号相同,2.先判断手机号码是否存在,然后再判断:a.如果是0开头,判断是否存在非0开头号码;b.如果非0开头,判断是否存在0开头号码
......@@ -2937,6 +2948,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if (consignorCustomerDO != null) {
orderConsignorDO.setCompany(consignorCustomerDO.getCompany());
orderConsignorDO.setCompanyEn(consignorCustomerDO.getCompanyEn());
orderConsignorDO.setCustomerNumber(consignorCustomerDO.getNumber());
CountryDO consignorCountryDO = countryService.getById(consignorCustomerDO.getCountry());
if (consignorCountryDO != null) {
orderConsignorDO.setCountryAbbreviation(consignorCountryDO.getNameShort());
......@@ -3077,6 +3089,10 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if (Objects.nonNull(consignee) && Objects.nonNull(consignee.getCustomerId())) {
orderConsigneeDO.setCustomerId(consignee.getCustomerId());
orderConsigneeDO.setCustomerContactsId(consignee.getId());
CustomerDO consigneeDO = customerService.getCustomer(consignee.getCustomerId());
if (Objects.nonNull(consigneeDO)) {
orderConsignorDO.setCustomerNumber(consigneeDO.getNumber());
}
} else {
// 客户不存在,新增客户联系人信息 orderConsigneeDO中有值
// 20230511 收货人无客户档案时 判断发货人有无客户经理,没有 生成客户档案,进入待分配。 有客户经理,则暂时不生成客户档案。(放在入仓时处理)
......@@ -3086,6 +3102,10 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if (consigeeCustomer != null) {
orderConsigneeDO.setCustomerId(consigeeCustomer.getCustomerId());
orderConsigneeDO.setCustomerContactsId(consigeeCustomer.getId());
CustomerDO consigneeDO = customerService.getCustomer(consigeeCustomer.getCustomerId());
if (Objects.nonNull(consigneeDO)) {
orderConsignorDO.setCustomerNumber(consigneeDO.getNumber());
}
}
}
}
......@@ -3136,6 +3156,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if (Objects.nonNull(consignorDO)) {
orderConsignorDO.setCompany(consignorDO.getCompany());
orderConsignorDO.setCompanyEn(consignorDO.getCompanyEn());
orderConsignorDO.setCustomerNumber(consignorDO.getNumber());
CountryDO consignorCountryDO = countryService.getById(consignorDO.getCountry());
orderConsignorDO.setCountryAbbreviation(Objects.isNull(consignorCountryDO) ? null : consignorCountryDO.getNameShort());
noConsignee = consignorDO.getNoConsignee();
......@@ -3258,6 +3279,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderConsigneeDO.setCompany(consigneeDO.getCompany());
orderConsigneeDO.setCompanyEn(consigneeDO.getCompanyEn());
orderConsigneeDO.setAddress(consigneeDO.getAddress());
orderConsigneeDO.setCustomerNumber(consigneeDO.getNumber());
CountryDO consigneeCountryDO = countryService.getById(consigneeDO.getCountry());
if (consigneeCountryDO != null) {
orderConsignorDO.setCountryAbbreviation(consigneeCountryDO.getNameShort());
......
......@@ -345,6 +345,15 @@ public class OrderBackPageVO {
@ApiModelProperty(value = "放货锁定收货人天数")
private Integer lockConsigneeDay;
@ApiModelProperty(value = "提货状态:0 未提货 1 部分提货 2 已提货")
private Integer pickState;
@ApiModelProperty(value = "'提货率'")
private Integer pickRatio;
@ApiModelProperty(value = "'提货箱数'")
private Integer pickNum;
/**
* 渠道名称
*/
......@@ -488,9 +497,6 @@ public class OrderBackPageVO {
@ApiModelProperty(value = "业绩归属客户名称")
private String customerName;
@ApiModelProperty(value = "提货数量")
private Integer pickNum;
// -----------end -----------
......
......@@ -627,6 +627,15 @@ public class OrderBackVO {
*/
private BigDecimal calVValue;
@ApiModelProperty(value = "提货状态:0 未提货 1 部分提货 2 已提货")
private Integer pickState;
@ApiModelProperty(value = "'提货率'")
private Integer pickRatio;
@ApiModelProperty(value = "'提货箱数'")
private Integer pickNum;
public void setExternalWarehouseJson(String externalWarehouseJson) {
this.externalWarehouseJson = externalWarehouseJson;
......
......@@ -355,6 +355,15 @@ public class OrderBaseVO {
@ApiModelProperty(value = "是否在公海")
private Boolean isInOpenSea;
@ApiModelProperty(value = "提货状态:0 未提货 1 部分提货 2 已提货")
private Integer pickState;
@ApiModelProperty(value = "'提货率'")
private Integer pickRatio;
@ApiModelProperty(value = "'提货箱数'")
private Integer pickNum;
public void setExceptionReason(String exceptionReason) {
this.exceptionReason = StringUtils.isNotBlank(exceptionReason) ? I18nMessage.getMessage(exceptionReason) : exceptionReason;
}
......
......@@ -538,6 +538,23 @@ public class OrderQueryVO {
@ApiModelProperty(value = "内部转换状态字段")
private Integer asStatus;
@ApiModelProperty(value = "提货状态:0 未提货 1 部分提货 2 已提货")
private Integer pickState;
@ApiModelProperty(value = "'提货率'")
private Integer pickRatio;
@ApiModelProperty(value = "小于等于提货率")
private String lePickRatio;
@ApiModelProperty(value = "等于提货率")
private String eqPickRatio;
@ApiModelProperty(value = "大于等于提货率")
private String gePickRatio;
@ApiModelProperty(value = "'提货箱数'")
private Integer pickNum;
@ApiModelProperty(value = "是否在公海")
private Boolean isInOpenSea;
......@@ -548,7 +565,6 @@ public class OrderQueryVO {
@ApiModelProperty(value = "订单异常状态(字典 order_abnormal_state)")
private List<Long> objectiveIds;
@ApiModelProperty(value = "始发仓IDs")
private List<Long> startWarehouseIds;
......@@ -578,6 +594,10 @@ public class OrderQueryVO {
@ApiModelProperty(value = "审核类型(字典 order_approval_type) 0 为正常")
private List<Integer> auditTypeList;
@ApiModelProperty(value = "订单状态详情见字典:pick_state 提货状态:0 未提货 1 部分提货 2 已提货")
private List<Integer> pickStateList;
@ApiModelProperty(value = "订单状态详情见字典:order_status")
private List<Integer> statusList;
......@@ -599,7 +619,6 @@ public class OrderQueryVO {
@ApiModelProperty(value = "0 控货中;1 已放完货;2 部分控货 3 放货中(此状态值为组合状态,当已放完货,但未全部复核完毕时为此状态,仅供查询条件传参使用)")
private List<Integer> cargoControlStatusList;
@ApiModelProperty(value = "内部转换状态字段")
private List<Integer> asStatusList;
......
......@@ -91,6 +91,10 @@ public class OrderConsigneeBackVO {
@ApiModelProperty(value = "客户id", required = true)
private Long customerId;
@ExcelProperty("客户编号")
@ApiModelProperty(value = "客户编号")
private String customerNumber;
@ExcelProperty("客户联系人id")
@ApiModelProperty(value = "客户联系人id", required = true)
private Long customerContactsId;
......
......@@ -61,6 +61,9 @@ public class OrderConsigneeBaseVO {
@NotNull(message = "客户id不能为空")
private Long customerId;
@ApiModelProperty(value = "客户编号")
private String customerNumber;
@ApiModelProperty(value = "客户联系人id", required = true)
@NotNull(message = "客户联系人id不能为空")
private Long customerContactsId;
......
......@@ -61,6 +61,9 @@ public class OrderConsigneeQueryVO {
@ApiModelProperty(value = "客户id")
private Long customerId;
@ApiModelProperty(value = "客户编号")
private String customerNumber;
@ApiModelProperty(value = "客户联系人id")
private Long customerContactsId;
......
......@@ -64,10 +64,15 @@ public class OrderConsignorBackVO {
@ApiModelProperty(value = "国家区号", required = true)
private String countryCode;
@ExcelProperty("")
@ApiModelProperty(value = "", required = true)
@ExcelProperty("客户id")
@ApiModelProperty(value = "客户id", required = true)
private Long customerId;
@ExcelProperty("客户编号")
@ApiModelProperty(value = "客户编号")
private String customerNumber;
@ExcelProperty("")
@ApiModelProperty(value = "", required = true)
private Long customerContactsId;
......
package cn.iocoder.yudao.module.order.vo.orderConsignor;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.*;
import java.util.*;
import io.swagger.annotations.*;
......@@ -51,6 +52,9 @@ public class OrderConsignorBaseVO {
@NotNull(message = "不能为空")
private Long customerId;
@ApiModelProperty(value = "客户编号")
private String customerNumber;
@ApiModelProperty(value = "发货客户联系人ID", required = true)
@NotNull(message = "不能为空")
private Long customerContactsId;
......
package cn.iocoder.yudao.module.order.vo.orderConsignor;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.*;
import java.util.*;
import io.swagger.annotations.*;
......@@ -46,9 +47,12 @@ public class OrderConsignorQueryVO {
@ApiModelProperty(value = "国家区号")
private String countryCode;
@ApiModelProperty(value = "")
@ApiModelProperty(value = "客户id")
private Long customerId;
@ApiModelProperty(value = "客户编号")
private String customerNumber;
@ApiModelProperty(value = "")
private Long customerContactsId;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment