Commit 675de447 authored by liuzeheng's avatar liuzeheng

Merge branch 'master' into dev

# Conflicts:
#	yudao-module-customer/yudao-module-customer-rest/src/main/java/cn/iocoder/yudao/module/customer/controller/admin/customer/CustomerController.java
#	yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/listener/CalculateOrderVValueListener.java
#	yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/listener/CalculateOrderYeJiTypeListener.java
#	yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderServiceImpl.java
#	yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/orderWarehouseIn/OrderWarehouseInServiceImpl.java
parents 4529299b 9cbc7658
......@@ -1360,7 +1360,6 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, Custome
@Override
public PageResult<CustomerDO> getWaitToConfirmCustomerPage(CustomerPageReqVO pageReqVO) {
IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(pageReqVO);
LambdaQueryWrapper<CustomerDO> customerDOLambdaQueryWrapperX = new LambdaQueryWrapperX<CustomerDO>()
......
......@@ -365,10 +365,11 @@ public class CustomerController {
@ApiOperation("获得待接收列表")
// @PreAuthorize("@ss.hasPermission('ecw:customer:query')")
public CommonResult<PageResult<CustomerRespVO>> getWaitConfirmList(@Valid CustomerPageReqVO customerPageReqVO) {
//lanbm 2024-05-26 添加注释
customerPageReqVO.setCustomerService(WebFrameworkUtils.getLoginUserId());
PageResult<CustomerDO> pageResult = customerService.getWaitToConfirmCustomerPage(customerPageReqVO);
PageResult<CustomerDO> pageResult =
customerService.getWaitToConfirmCustomerPage(customerPageReqVO);
return success(CustomerConvert.INSTANCE.convertPage(pageResult));
}
......@@ -398,9 +399,10 @@ public class CustomerController {
@GetMapping("/get-wait-for-distribution")
@ApiOperation("获得待分配客户列表")
// @PreAuthorize("@ss.hasPermission('ecw:customer:query')")
public CommonResult<PageResult<CustomerRespVO>> getWaitForDistributionList(@Valid CustomerPageReqDTO customerPageReqVO,PageVO page) {
PageResult<CustomerDO> pageResult = customerService.getWaitToAssignedCustomerPageReq(customerPageReqVO,page);
public CommonResult<PageResult<CustomerRespVO>> getWaitForDistributionList(@Valid CustomerPageReqVO customerPageReqVO) {
//lanbm 2024-05-26 添加注释
PageResult<CustomerDO> pageResult =
customerService.getWaitToAssignedCustomerPage(customerPageReqVO);
return success(CustomerConvert.INSTANCE.convertPage(pageResult));
}
......
......@@ -24,7 +24,7 @@ import static cn.iocoder.yudao.module.delivery.enums.ErrorCodeConstants.VCONFIG_
/*
计算订单V值计算 海运已装柜,空运已入仓 计算V值
lanbm 2024-05-13 add
lanbm 2024-05-26 update
*/
@Component("CalculateOrderVValueListener")
@AllArgsConstructor
......@@ -65,7 +65,7 @@ public class CalculateOrderVValueListener {
EcwVz temp = null;
BigDecimal CalVvalue = new BigDecimal(0);
if (orderDO.getTransportId() == 1) {
//海运计算V值
//海运计算V值 修改查询条件
temp = ecwVzService.getOne(new LambdaQueryWrapperX<EcwVz>()
.eqIfPresent(EcwVz::getFuhao, "M3"));
if (temp == null) {
......@@ -78,7 +78,7 @@ public class CalculateOrderVValueListener {
CalVvalue = new BigDecimal(temp.getVz()).divide(orderDO.getSumVolume());
}
} else if (orderDO.getTransportId() == 3) {
//空运计算V值
//空运计算V值,修改查询条件
temp = ecwVzService.getOne(new LambdaQueryWrapperX<EcwVz>()
.eqIfPresent(EcwVz::getFuhao, "KG"));
if (temp == null) {
......
......@@ -44,33 +44,37 @@ public class CalculateOrderYeJiTypeListener {
public void CalculateOrderYeJiTypePushEvent(
CalculateOrderYeJiTypeEvent event) {
zTest m=new zTest();
String sMsg="计算业绩类型"+event.getCustomerId();
zTest m = new zTest();
String sMsg = "计算业绩类型" + event.getCustomerId();
OrderDO orderDO = orderService.getById(event.getOrderId());
if (orderDO == null) {
throw exception(ORDER_NOT_EXISTS);
}
//获取订单中计算号的业绩归属客户ID
event.setCustomerId(orderDO.getCustomerId());
CustomerDO customerDO = customerService.getById(event.getCustomerId());
if (customerDO == null) {
//throw exception(CUSTOMER_NOT_EXISTS);
sMsg+=",客户不存在先不计算业绩类型";
//lanbm 2024-05-27 添加的逻辑细化
orderService.UpdateOrderYeJiType(event.getOrderId(), 0);
sMsg += ",客户不存,订单业绩属于公司,订单算老业绩";
m.setTestname(sMsg);
m.setCreatedate(new Date());
zTestService.save(m);
return;
}
int isNew = 0;
if (customerDO.getIsNew() == true) {
isNew = 1;//新客户业绩类型
sMsg+=",新业绩";
}
else {
sMsg += ",新业绩";
} else {
isNew = 0;//老客户业绩类型
sMsg+=",老业绩";
sMsg += ",老业绩";
}
orderService.UpdateOrderYeJiType(event.getOrderId(), isNew);
......
......@@ -1358,10 +1358,13 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
}
//入仓完成,计算V值 lanbm 2024-05-13 add
CalculateOrderVValueEvent event = new CalculateOrderVValueEvent();
/*27号注释掉
CalculateOrderVValueEvent event=new CalculateOrderVValueEvent();
event.setOrderId(orderId);
applicationContext.publishEvent(event);
//end 入仓完成,计算V值 lanbm 2024-05-13 add
*/
// end 入仓完成,计算V值 lanbm 2024-05-13 add
// 返回是否包含异常
return exceptionNum > 0;
......
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