Commit 7badfe68 authored by zhengyi's avatar zhengyi

已入仓订单修改审批时检查是否需要重新匹配优惠活动

parent 214a0d72
......@@ -4,13 +4,13 @@ import cn.iocoder.yudao.framework.apollo.core.event.Customer.ReceiveCustomerCalT
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.delivery.entity.EcwVz;
import cn.iocoder.yudao.module.delivery.entity.EcwVzPageReq;
import cn.iocoder.yudao.module.delivery.entity.deptex.zTest;
//import cn.iocoder.yudao.module.delivery.entity.deptex.zTest;
import cn.iocoder.yudao.module.delivery.listener.TestEvent;
import cn.iocoder.yudao.module.delivery.service.EcwVzService;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.delivery.service.OrderServiceExt;
import cn.iocoder.yudao.module.delivery.service.ZTestService;
//import cn.iocoder.yudao.module.delivery.service.ZTestService;
import cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO;
import cn.iocoder.yudao.module.order.service.order.OrderService;
import com.alibaba.fastjson.JSON;
......@@ -47,9 +47,9 @@ public class EcwVzController {
*/
@Resource
private EcwVzService ecwVzService;
@Resource
private ZTestService zTestService;
//
// @Resource
// private ZTestService zTestService;
@Autowired
private OrderService orderService;
......@@ -160,7 +160,7 @@ public class EcwVzController {
*/
zTest m = new zTest();
// zTest m = new zTest();
orderService.UpdateOrderYeJiType((long) 1, 1);
......@@ -168,15 +168,15 @@ public class EcwVzController {
ReceiveCustomerCalTypeEvent e = new ReceiveCustomerCalTypeEvent();
e.setCustomerId((long) 49345);
if (orderServiceExt.IsHavingOrder(e) == 0) {
m.setTestname("无业绩");
m.setCreatedate(new Date());
zTestService.save(m);
} else {
m.setTestname("有业绩");
m.setCreatedate(new Date());
zTestService.save(m);
}
// if (orderServiceExt.IsHavingOrder(e) == 0) {
// m.setTestname("无业绩");
// m.setCreatedate(new Date());
// zTestService.save(m);
// } else {
// m.setTestname("有业绩");
// m.setCreatedate(new Date());
// zTestService.save(m);
// }
return success(true);
}
......
package cn.iocoder.yudao.module.delivery.entity.deptex;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
@TableName("z_test")
@Data
public class zTest {
private Long id;
private String testname;
private Date createdate;
}
//package cn.iocoder.yudao.module.delivery.entity.deptex;
//
//import com.baomidou.mybatisplus.annotation.TableName;
//import lombok.Data;
//import lombok.EqualsAndHashCode;
//
//import java.util.Date;
//
//@TableName("z_test")
//@Data
//public class zTest {
//
// private Long id;
// private String testname;
//
// private Date createdate;
//}
......@@ -2,9 +2,9 @@ package cn.iocoder.yudao.module.delivery.listener;
import cn.iocoder.yudao.framework.apollo.core.event.Customer.CalculateCustomerTypeEvent;
import cn.iocoder.yudao.module.customer.service.customer.CustomerService;
import cn.iocoder.yudao.module.delivery.entity.deptex.zTest;
//import cn.iocoder.yudao.module.delivery.entity.deptex.zTest;
import cn.iocoder.yudao.module.delivery.service.OrderServiceExt;
import cn.iocoder.yudao.module.delivery.service.ZTestService;
//import cn.iocoder.yudao.module.delivery.service.ZTestService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
......@@ -23,8 +23,8 @@ public class CalculateCustomerType {
@Resource
private CustomerService customerService;
@Resource
private ZTestService zTestService;
// @Resource
// private ZTestService zTestService;
@Resource
......@@ -37,7 +37,7 @@ public class CalculateCustomerType {
@EventListener(CalculateCustomerTypeEvent.class)
public void CalculateCustomerTypePushEvent(
CalculateCustomerTypeEvent event) {
zTest m=new zTest();
// zTest m=new zTest();
String sMsg="计算开始"+event.getCustomerId();
if (event.getNewCustomerService() == event.getOldCustomerService()) {
//新客户经理和老客户经理是同一客户经理
......@@ -66,9 +66,9 @@ public class CalculateCustomerType {
sMsg+=",新老不一致";
customerService.updateCustomerNewOrOld(event.getCustomerId(), true);
}
m.setTestname(sMsg);
m.setCreatedate(new Date());
zTestService.save(m);
// m.setTestname(sMsg);
// m.setCreatedate(new Date());
// zTestService.save(m);
}
/*
......
......@@ -3,9 +3,9 @@ package cn.iocoder.yudao.module.delivery.listener;
import cn.iocoder.yudao.framework.apollo.core.event.Order.CalculateOrderVValueEvent;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.delivery.entity.EcwVz;
import cn.iocoder.yudao.module.delivery.entity.deptex.zTest;
//import cn.iocoder.yudao.module.delivery.entity.deptex.zTest;
import cn.iocoder.yudao.module.delivery.service.EcwVzService;
import cn.iocoder.yudao.module.delivery.service.ZTestService;
//import cn.iocoder.yudao.module.delivery.service.ZTestService;
import cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO;
import cn.iocoder.yudao.module.order.service.order.OrderService;
import lombok.AllArgsConstructor;
......@@ -35,26 +35,26 @@ public class CalculateOrderVValueListener {
@Autowired
private EcwVzService ecwVzService;
@Resource
private ZTestService zTestService;
// @Resource
// private ZTestService zTestService;
@EventListener(CalculateOrderVValueEvent.class)
public void CalculateOrderVValuePushEvent(
CalculateOrderVValueEvent event) {
zTest m = new zTest();
// zTest m = new zTest();
String sMsg = "计算V值";
OrderDO orderDO = orderService.getById(event.getOrderId());
if (orderDO == null) {
throw exception(ORDER_NOT_EXISTS);
}
if (orderDO.getRucangTime() == null) {
sMsg += ",订单入仓时间为空,暂不处理。";
m.setTestname(sMsg);
m.setCreatedate(new Date());
zTestService.save(m);
return;
}
// if (orderDO.getRucangTime() == null) {
// sMsg += ",订单入仓时间为空,暂不处理。";
// m.setTestname(sMsg);
// m.setCreatedate(new Date());
// zTestService.save(m);
// return;
// }
//订单状态为已入仓之后的状态,其他状态是否排除,后续和客户确认,先按此逻辑处理
int nS = orderDO.getStatus();
......@@ -103,9 +103,9 @@ public class CalculateOrderVValueListener {
sMsg += ",未入仓";
}
m.setTestname(sMsg);
m.setCreatedate(new Date());
zTestService.save(m);
// m.setTestname(sMsg);
// m.setCreatedate(new Date());
// zTestService.save(m);
}
}
......@@ -4,8 +4,8 @@ import cn.iocoder.yudao.framework.apollo.core.event.Customer.CalculateCustomerTy
import cn.iocoder.yudao.framework.apollo.core.event.Order.CalculateOrderYeJiTypeEvent;
import cn.iocoder.yudao.module.customer.dal.dataobject.customer.CustomerDO;
import cn.iocoder.yudao.module.customer.service.customer.CustomerService;
import cn.iocoder.yudao.module.delivery.entity.deptex.zTest;
import cn.iocoder.yudao.module.delivery.service.ZTestService;
//import cn.iocoder.yudao.module.delivery.entity.deptex.zTest;
//import cn.iocoder.yudao.module.delivery.service.ZTestService;
import cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO;
import cn.iocoder.yudao.module.order.service.order.OrderService;
import lombok.AllArgsConstructor;
......@@ -35,15 +35,15 @@ public class CalculateOrderYeJiTypeListener {
@Autowired
private CustomerService customerService;
@Resource
private ZTestService zTestService;
//
// @Resource
// private ZTestService zTestService;
@EventListener(CalculateOrderYeJiTypeEvent.class)
public void CalculateOrderYeJiTypePushEvent(
CalculateOrderYeJiTypeEvent event) {
zTest m=new zTest();
// zTest m=new zTest();
String sMsg="计算业绩类型"+event.getCustomerId();
OrderDO orderDO = orderService.getById(event.getOrderId());
......@@ -55,10 +55,10 @@ public class CalculateOrderYeJiTypeListener {
CustomerDO customerDO = customerService.getById(event.getCustomerId());
if (customerDO == null) {
//throw exception(CUSTOMER_NOT_EXISTS);
sMsg+=",客户不存在先不计算业绩类型";
m.setTestname(sMsg);
m.setCreatedate(new Date());
zTestService.save(m);
// sMsg+=",客户不存在先不计算业绩类型";
// m.setTestname(sMsg);
// m.setCreatedate(new Date());
// zTestService.save(m);
return;
}
......@@ -74,9 +74,9 @@ public class CalculateOrderYeJiTypeListener {
orderService.UpdateOrderYeJiType(event.getOrderId(), isNew);
m.setTestname(sMsg);
m.setCreatedate(new Date());
zTestService.save(m);
// m.setTestname(sMsg);
// m.setCreatedate(new Date());
// zTestService.save(m);
}
}
......@@ -2,10 +2,10 @@ package cn.iocoder.yudao.module.delivery.listener;
import cn.iocoder.yudao.framework.apollo.core.event.Customer.ReceiveCustomerCalTypeEvent;
import cn.iocoder.yudao.module.customer.service.customer.CustomerService;
import cn.iocoder.yudao.module.delivery.entity.deptex.zTest;
//import cn.iocoder.yudao.module.delivery.entity.deptex.zTest;
import cn.iocoder.yudao.module.delivery.service.Impl.OrderServiceExtImpl;
import cn.iocoder.yudao.module.delivery.service.OrderServiceExt;
import cn.iocoder.yudao.module.delivery.service.ZTestService;
//import cn.iocoder.yudao.module.delivery.service.ZTestService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
......@@ -28,8 +28,8 @@ public class ReceiveCustomerCalTypeListener {
@Resource
private OrderServiceExt orderServiceExt;
@Resource
private ZTestService zTestService;
// @Resource
// private ZTestService zTestService;
@EventListener(ReceiveCustomerCalTypeEvent.class)
public void CalculateCustomerTypePushEvent(
......@@ -37,7 +37,7 @@ public class ReceiveCustomerCalTypeListener {
//CustomerServiceImpl confirmCustomer 函数中触发事件 客户经理直接确认接收
//CustomerServiceImpl receiveCustomer 函数中触发,移交,系统分配,接收时判断
//CustomerServiceImpl updateCustomer 函数中触发,完善客户信息
zTest m=new zTest();
// zTest m=new zTest();
String sMsg="接收客户"+event.getCustomerId();
if (event.getIsNew() == true) {
//移交接收前是新客户
......@@ -58,9 +58,9 @@ public class ReceiveCustomerCalTypeListener {
//维持老客户不变,可不做任何逻辑操作
sMsg+=",老客户";
}
m.setTestname(sMsg);
m.setCreatedate(new Date());
zTestService.save(m);
// m.setTestname(sMsg);
// m.setCreatedate(new Date());
// zTestService.save(m);
}
/*
......
package cn.iocoder.yudao.module.delivery.mapper;
import cn.iocoder.yudao.module.delivery.entity.deptex.zTest;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import java.util.List;
/*
用注解实现简单的功能
*/
public interface MyTest {
// 查询所有商品类型
@Select("select * from z_test")
public List<zTest> selectAll();
// 根据类型编号查询商品类型
@Select("select * from z_test where id = #{id}")
zTest selectById(int id);
// 添加商品类型
@Insert("insert into z_test(name) values(#{name})")
@Options(useGeneratedKeys = true, keyProperty = "id")
public int add(zTest type);
// 更新商品类型
@Update("update z_test set name = #{name} where id = #{id}")
public int update(zTest type);
}
//package cn.iocoder.yudao.module.delivery.mapper;
//
//import cn.iocoder.yudao.module.delivery.entity.deptex.zTest;
//import org.apache.ibatis.annotations.Insert;
//import org.apache.ibatis.annotations.Options;
//import org.apache.ibatis.annotations.Select;
//import org.apache.ibatis.annotations.Update;
//
//import java.util.List;
//
///*
// 用注解实现简单的功能
// */
//public interface MyTest {
// // 查询所有商品类型
// @Select("select * from z_test")
// public List<zTest> selectAll();
//
// // 根据类型编号查询商品类型
// @Select("select * from z_test where id = #{id}")
// zTest selectById(int id);
//
// // 添加商品类型
// @Insert("insert into z_test(name) values(#{name})")
// @Options(useGeneratedKeys = true, keyProperty = "id")
// public int add(zTest type);
//
// // 更新商品类型
// @Update("update z_test set name = #{name} where id = #{id}")
// public int update(zTest type);
//}
package cn.iocoder.yudao.module.delivery.mapper;
import cn.iocoder.yudao.module.delivery.entity.deptex.zTest;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface ZTestMapper extends BaseMapper<zTest> {
}
//package cn.iocoder.yudao.module.delivery.mapper;
//
//import cn.iocoder.yudao.module.delivery.entity.deptex.zTest;
//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
//import org.apache.ibatis.annotations.Mapper;
//
//@Mapper
//public interface ZTestMapper extends BaseMapper<zTest> {
//}
package cn.iocoder.yudao.module.delivery.service.Impl;
import cn.iocoder.yudao.module.delivery.entity.deptex.zTest;
import cn.iocoder.yudao.module.delivery.mapper.ZTestMapper;
import cn.iocoder.yudao.module.delivery.service.ZTestService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
@Service("ZTestService")
public class ZTestImpl extends ServiceImpl<ZTestMapper, zTest> implements ZTestService {
}
//package cn.iocoder.yudao.module.delivery.service.Impl;
//
////import cn.iocoder.yudao.module.delivery.entity.deptex.zTest;
//import cn.iocoder.yudao.module.delivery.mapper.ZTestMapper;
////import cn.iocoder.yudao.module.delivery.service.ZTestService;
//import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
//import org.springframework.stereotype.Service;
//
//@Service("ZTestService")
//public class ZTestImpl extends ServiceImpl<ZTestMapper, zTest> implements ZTestService {
//
//
//}
package cn.iocoder.yudao.module.delivery.service;
import cn.iocoder.yudao.module.delivery.entity.deptex.zTest;
import com.baomidou.mybatisplus.extension.service.IService;
public interface ZTestService extends IService<zTest> {
}
//package cn.iocoder.yudao.module.delivery.service;
//
//import cn.iocoder.yudao.module.delivery.entity.deptex.zTest;
//import com.baomidou.mybatisplus.extension.service.IService;
//
//public interface ZTestService extends IService<zTest> {
//}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.iocoder.yudao.module.delivery.mapper.ZTestMapper">
</mapper>
......@@ -11,9 +11,9 @@ import cn.iocoder.yudao.module.order.service.order.OrderBusinessService;
import cn.iocoder.yudao.module.order.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.service.orderException.OrderExceptionService;
import cn.iocoder.yudao.module.order.vo.orderException.OrderExceptionResultHandlerVo;
import cn.iocoder.yudao.module.product.dal.dataobject.coupon.zTest3;
//import cn.iocoder.yudao.module.product.dal.dataobject.coupon.zTest3;
import cn.iocoder.yudao.module.product.dal.dataobject.product.ProductPriceDO;
import cn.iocoder.yudao.module.product.dal.mysql.coupon.ZTestMapper3;
//import cn.iocoder.yudao.module.product.dal.mysql.coupon.ZTestMapper3;
import cn.iocoder.yudao.module.product.vo.productPrice.ClearancePriceEvent;
import cn.iocoder.yudao.module.product.vo.productPrice.HandleData;
import cn.iocoder.yudao.module.product.vo.productPrice.HandleExceptionEvent;
......@@ -44,8 +44,8 @@ public class ProductPriceExceptionHandleListener {
private final OrderExceptionService orderExceptionService;
private final OrderBusinessService orderBusinessService;
@Resource
private ZTestMapper3 zTestMapper;
// @Resource
// private ZTestMapper3 zTestMapper;
@EventListener(HandleExceptionEvent.class)
@Async
......@@ -65,10 +65,10 @@ public class ProductPriceExceptionHandleListener {
public void orderOtherFeeEvent(HandleData event) {
List<ProductPriceDO> priceList = event.getNeedHandleList();
zTest3 m=new zTest3();
m.setTestname("开始处理价格异常。");
m.setCreatedate(new Date());
zTestMapper.insert(m);
// zTest3 m=new zTest3();
// m.setTestname("开始处理价格异常。");
// m.setCreatedate(new Date());
// zTestMapper.insert(m);
//ecw_product_price
//找出符合条件的订单
......@@ -125,10 +125,10 @@ public class ProductPriceExceptionHandleListener {
}
else
{
m=new zTest3();
m.setTestname("exceptionDOList 为空");
m.setCreatedate(new Date());
zTestMapper.insert(m);
// m=new zTest3();
// m.setTestname("exceptionDOList 为空");
// m.setCreatedate(new Date());
// zTestMapper.insert(m);
}
//只要有价格就处理清关费未报价异常
......
......@@ -77,6 +77,7 @@ import cn.iocoder.yudao.module.product.enums.FeeTypeEnum;
import cn.iocoder.yudao.module.product.param.ProdConditionParam;
import cn.iocoder.yudao.module.product.service.product.ProductAttrService;
import cn.iocoder.yudao.module.product.service.product.ProductService;
import cn.iocoder.yudao.module.product.vo.coupon.CouponInfoVO;
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
import cn.iocoder.yudao.module.wealth.dal.dataobject.receivable.ReceivableDO;
......@@ -2307,9 +2308,9 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
OrderConsigneeDO orderConsigneeDO = orderConsigneeService.getOne(new LambdaQueryWrapper<OrderConsigneeDO>().eq(OrderConsigneeDO::getOrderId, orderDO.getOrderId()).orderByDesc(OrderConsigneeDO::getId).last("limit 1"));
this.costCalculation(userId, orderDO,
orderConsignorDO.getCustomerId(),
Objects.isNull(orderConsigneeDO)? 0L : orderConsigneeDO.getCustomerId(),
Objects.isNull(orderConsigneeDO) ? 0L : orderConsigneeDO.getCustomerId(),
orderConsignorDO.getCustomerContactsId(),
Objects.isNull(orderConsigneeDO)? 0L : orderConsigneeDO.getCustomerContactsId(),
Objects.isNull(orderConsigneeDO) ? 0L : orderConsigneeDO.getCustomerContactsId(),
orderItemDOList, 50);
this.addOrderOperateLog(orderDO.getOrderId(),
"有活动更新订单计价", null);
......@@ -3448,6 +3449,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
* 20 强制重订价格 30 空运订单每日定时更新价格
* 40 订单异常处理完成更新计价
* 50 更新订单优惠信息
* 51 检查订单优惠信息,并在当前优惠信息不满足条件后匹配新的优惠信息
* @return 该运输方式下的报价商品列表信息
*/
private CalculationItemFeeDto insertOrderItemDOList(String userId,
......@@ -3730,7 +3732,15 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
param.setOrgClearanceFeePrice(orderItemDO.getOriginalClearanceFreight());
param.setClearanceFeeCurrency(Objects.isNull(orderItemDO.getClearanceFreightCurrency()) ? null : Integer.valueOf(String.valueOf(orderItemDO.getClearanceFreightCurrency())));
param.setClearanceFeeVolume(orderItemDO.getClearanceFreightVolume());
if (type == 50) {
if (type == 51) {
param.setCalculationType(7);
if (StringUtils.isNotBlank(orderItemDO.getCouponInfo())) {
List<CouponInfoVO> couponInfoVOList = JSONObject.parseArray(orderItemDO.getCouponInfo(), CouponInfoVO.class);
if (CollectionUtil.isNotEmpty(couponInfoVOList)) {
param.setCouponInfoVOList(JSONObject.parseArray(orderItemDO.getCouponInfo(), CouponInfoVO.class));
}
}
} else if (type == 50) {
param.setCalculationType(6);
} else if (type == 14) {
// 批量加价
......@@ -3749,8 +3759,10 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
!Objects.equals(orderDO.getStatus(), OrderStatusEnum.DRAFT.getValue())) {
isWarehouseIn = true;
}
List<ProdConditionParam> prodConditionParams = null;
// 定单价费用
List<ProdConditionParam> prodConditionParams =
if (type != 51) {
prodConditionParams =
prodCostCalculation.obtainProdLineOnePrice(
prodConditionParamList,
orderDO.getOrderNo(),
......@@ -3759,6 +3771,7 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
orderDO.getTransportId(),
orderDO.getLineId(),
orderDO.getChannelId(), isWarehouseIn);
// 对订单品名的收费数据进行误差补全,单价最低的品名加上误差值
if (type != 1 && type != 2 && !Objects.equals(orderDO.getStatus(),
OrderStatusEnum.ORDER_PLACED.getValue()) && !Objects.equals(orderDO.getStatus(), OrderStatusEnum.DRAFT.getValue())) {
......@@ -3767,6 +3780,10 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
orderDO,
prodConditionParams);
}
} else {
prodConditionParams = new ArrayList<>();
prodConditionParams.addAll(prodConditionParamList);
}
// 计算小计费用
CalculationCostResultDto resultDto =
prodCostCalculation.calculationProdCost(prodConditionParams,
......
......@@ -2669,6 +2669,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
infoVO.setOrgValue(vo.getIsCargoControl() ? "是/yes" : "否/no");
infoVO.setNewValue(updateReqVO.getIsCargoControl() ? "是/yes" : "否/no");
vo.setIsCargoControl(updateReqVO.getIsCargoControl());
vo.setIsCheckCoupon(Boolean.TRUE);
applyInfoList.add(infoVO);
}
Map<Integer, CurrencyRespDTO> currencyMap = currencyApi.getAllCurrency();
......@@ -2715,6 +2716,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
infoVO.setOrgValue(vo.getCustomsType() == 1 ? "我司全代/Our full representative" : (vo.getCustomsType() == 2 ? "自单代报/Self reporting" : "混合报关/Mixed customs declaration"));
infoVO.setNewValue(updateReqVO.getCustomsType() == 1 ? "我司全代/Our full representative" : (updateReqVO.getCustomsType() == 2 ? "自单代报/Self reporting" : "混合报关/Mixed customs declaration"));
vo.setCustomsType(updateReqVO.getCustomsType());
vo.setIsCheckCoupon(Boolean.TRUE);
applyInfoList.add(infoVO);
}
// 出单方式
......@@ -5556,38 +5558,6 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
descZh, descEn);
orderExceptionService.createOrderException(orderExceptionCreateReqVO);
}
// TODO 业绩变动逻辑判断已经放入申请时进行判断,此处业务后面删除
// Date expireTime = DateUtil.offsetDay(warehouseInDO.getInTime(), 3);
// if (expireTime.compareTo(new Date()) >= 0) {
// int customerType = 1; // 发货人 1 收货人 2
// if (Objects.nonNull(orderDO.getType()) && orderDO.getType().contains("2")) {
// // 海外仓归属发货人
// orderDO.setCustomerId(consignorDO.getCustomerId());
// } else {
// // 控货订单归属发货人 / 非控货订单归属收货人
// if (orderDO.getIsCargoControl()) {
// orderDO.setCustomerId(consignorDO.getCustomerId());
// } else {
// customerType = 2;
// orderDO.setCustomerId(consigneeDO.getCustomerId());
// }
// }
// // 拆单子订单不执行客户经理分配规则,以原单为主
// if (Objects.isNull(orderDO.getParentOrderId()) || orderDO.getParentOrderId() == 0) {
// // 更新所属客户经理(业务员)
//// if (Objects.nonNull(orderDO.getCustomerId()) && orderDO.getCustomerId() > 0) {
// addOrderCustomerService(orderDO, customerType);
//// }
// }
// }
// 判断是否需要生成单证异常
// if (!Objects.equals(oldOrder.getCustomsType(), orderDO.getCustomsType())) {
// if ((orderDO.getCustomsType().equals(2) || orderDO.getCustomsType().equals(3)) && StringUtils.isEmpty(orderDO.getDocumentsFile())) {
// OrderExceptionCreateReqVO orderExceptionCreateReqVO = this.genOrderException(orderDO.getOrderId(), orderDO, null, null, OrderExceptionEnum.ORDER_DOC_EXCEPTION,
// OrderExceptionEnum.ORDER_DOC_EXCEPTION.getZhValueDesc(), OrderExceptionEnum.ORDER_DOC_EXCEPTION.getEnValueDesc());
// orderExceptionService.createOrderException(orderExceptionCreateReqVO);
// }
// }
// 这里可能因为修改内容不触发计价业务,而提交审批内容的同时,提交了不用审批的修改货值,导致费用清单变更,所以这里需要同步当前数据库的费用清单
orderDO.setCost(oldOrder.getCost());
// 在这中间可能有订单的入仓子状态变更,例如调仓等操作,需要同步当前数据库订单状态,因为订单审批同时只能有一个,所以审批状态肯定是实时的,只需要同步其他状态
......@@ -5624,6 +5594,12 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
// 强制重新定价, 则需要将特价属性都重置
orderBusinessService.costCalculation(String.valueOf(userId), orderDO, consignorDO.getCustomerId(), Objects.isNull(consigneeDO) ? 0L : consigneeDO.getCustomerId(),
consignorDO.getCustomerContactsId(), Objects.isNull(consigneeDO) ? 0L : consigneeDO.getCustomerContactsId(), orderItemDOList, 10);
}else if (orderBackVO.getIsCheckCoupon()){
// 如果没有重新计价,这里就需要对订单优惠活动进行检查,是否需要重新匹配新的优惠
List<OrderItemDO> orderItemDOList = orderItemMapper.selectList(new LambdaQueryWrapper<OrderItemDO>().eq(OrderItemDO::getOrderId, orderDO.getOrderId()));
// 是否需要检查优惠卷(如果满足当前优惠卷,则继续使用(即使过期也可以),如果不满足则匹配最新的优惠(排除过期))
orderBusinessService.costCalculation(String.valueOf(userId), orderDO, consignorDO.getCustomerId(), Objects.isNull(consigneeDO) ? 0L : consigneeDO.getCustomerId(),
consignorDO.getCustomerContactsId(), Objects.isNull(consigneeDO) ? 0L : consigneeDO.getCustomerContactsId(), orderItemDOList, 51);
}
orderBusinessService.addOrderTimeLog(orderDO.getStatus(), orderDO, 7, now, now);
// 空运相关订单处理业务
......
......@@ -544,6 +544,9 @@ public class OrderBackVO {
@ApiModelProperty(value = "是否需要重新计价")
private Boolean isResetPrice = Boolean.FALSE;
@ApiModelProperty(value = "是否需要检查优惠卷(如果满足当前优惠卷,则继续使用(即使过期也可以),如果不满足则匹配最新的优惠(排除过期))")
private Boolean isCheckCoupon = Boolean.FALSE;
// 物流信息
@ApiModelProperty(value = "物流信息相关")
......
package cn.iocoder.yudao.module.product.dal.dataobject.coupon;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
@TableName("z_test")
@Data
public class zTest3 {
private Long id;
private String testname;
private Date createdate;
}
//package cn.iocoder.yudao.module.product.dal.dataobject.coupon;
//
//import com.baomidou.mybatisplus.annotation.TableName;
//import lombok.Data;
//
//import java.util.Date;
//
//@TableName("z_test")
//@Data
//public class zTest3 {
//
// private Long id;
// private String testname;
// private Date createdate;
//}
package cn.iocoder.yudao.module.product.dal.mysql.coupon;
import cn.iocoder.yudao.framework.mybatis.core.mapper.AbstractMapper;
import cn.iocoder.yudao.module.product.dal.dataobject.coupon.zTest3;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface ZTestMapper3 extends AbstractMapper<zTest3> {
}
//package cn.iocoder.yudao.module.product.dal.mysql.coupon;
//
//import cn.iocoder.yudao.framework.mybatis.core.mapper.AbstractMapper;
////import cn.iocoder.yudao.module.product.dal.dataobject.coupon.zTest3;
//import org.apache.ibatis.annotations.Mapper;
//
//@Mapper
//public interface ZTestMapper3 extends AbstractMapper<zTest3> {
//}
//
......@@ -322,7 +322,7 @@ public class ProdConditionParam {
@ApiModelProperty(value = "货值货币id")
private Integer worthCurrency;
@ApiModelProperty(value = "类型:1 正常计算 2 特价申请已传入的商品单价计算 3 指定重泡货标准计算 4 佣金设置 5 批量加价 6 订单优惠更新")
@ApiModelProperty(value = "类型:1 正常计算 2 特价申请已传入的商品单价计算 3 指定重泡货标准计算 4 佣金设置 5 批量加价 6 订单优惠更新 7 检查优惠(如果满足当前优惠卷,则继续使用(即使过期也可以),如果不满足则匹配最新的优惠(排除过期))")
private Integer calculationType = 1;
@ApiModelProperty(value = "上次计价使用的优惠信息")
......
......@@ -24,10 +24,10 @@ import cn.iocoder.yudao.module.ecw.api.currency.dto.ExchangeRateRespDTO;
import cn.iocoder.yudao.module.ecw.api.internalMessage.InternalMessageApi;
import cn.iocoder.yudao.module.ecw.api.internalMessage.dto.InternalMessageCreateDto;
import cn.iocoder.yudao.module.product.convert.product.ProductPriceConvert;
import cn.iocoder.yudao.module.product.dal.dataobject.coupon.zTest3;
//import cn.iocoder.yudao.module.product.dal.dataobject.coupon.zTest3;
import cn.iocoder.yudao.module.product.dal.dataobject.product.*;
import cn.iocoder.yudao.module.product.dal.dataobject.productPriceSnapshot.ProductPriceSnapshotDO;
import cn.iocoder.yudao.module.product.dal.mysql.coupon.ZTestMapper3;
//import cn.iocoder.yudao.module.product.dal.mysql.coupon.ZTestMapper3;
import cn.iocoder.yudao.module.product.dal.mysql.product.*;
import cn.iocoder.yudao.module.product.dal.mysql.productPriceSnapshot.ProductPriceSnapshotMapper;
import cn.iocoder.yudao.module.product.dto.AirClearancePriceResultDto;
......@@ -129,8 +129,8 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
@Resource
private ProductPriceStepClearanceService productPriceStepClearanceService;
@Resource
private ZTestMapper3 zTestMapper;
// @Resource
// private ZTestMapper3 zTestMapper;
private static final String PREFIX = "price_batch_update_";
......@@ -1259,10 +1259,10 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
//没有价格信息不继续后面的处理
if (!hasPrice) {
zTest3 m = new zTest3();
m.setTestname("没有价格信息,不后续处理");
m.setCreatedate(new Date());
zTestMapper.insert(m);
// zTest3 m = new zTest3();
// m.setTestname("没有价格信息,不后续处理");
// m.setCreatedate(new Date());
// zTestMapper.insert(m);
continue;
}
......@@ -1298,10 +1298,10 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
handleData.setNeedHandleList(needHandleList);
applicationContext.publishEvent(handleData);
} else {
zTest3 m = new zTest3();
m.setTestname("needHandleList 为空");
m.setCreatedate(new Date());
zTestMapper.insert(m);
// zTest3 m = new zTest3();
// m.setTestname("needHandleList 为空");
// m.setCreatedate(new Date());
// zTestMapper.insert(m);
}
}
......
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