Commit 90290cf4 authored by lanbaoming's avatar lanbaoming

Merge branch 'dev'

# Conflicts:
#	yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderBusinessServiceImpl.java
parents f46ce85e 4859b972
package cn.iocoder.yudao.framework.toolkit;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface ZTestMapper extends BaseMapper<zTest> {
}
package cn.iocoder.yudao.framework.toolkit;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
@TableName("z_test")
@Data
public class zTest {
private Long id;
private String testname;
private Date createdate;
}
...@@ -24,7 +24,12 @@ public class BmpShipmentBatchAddPriceListener extends BpmProcessInstanceResultEv ...@@ -24,7 +24,12 @@ public class BmpShipmentBatchAddPriceListener extends BpmProcessInstanceResultEv
@Override @Override
protected void onEvent(BpmProcessInstanceResultEvent event) { protected void onEvent(BpmProcessInstanceResultEvent event) {
log.info("---------------------批量加价审核回调-----------------------{},{}", event.getBusinessKey(), event.getResult()); log.info("---------------------批量加价审核回调-----------------------{},{}",
boxApprovalService.updateBoxApproveResult(WorkFlowEmus.SHIPMENT_BATCH_ADD_PRICE.getKey(), event.getBusinessKey(), event.getResult()); event.getBusinessKey(), event.getResult());
//lanbm 2024-06-18 改为空运和海运都有此逻辑点
//运费,清关费,币种,单位都要和元订单一致才能生效
boxApprovalService.updateBoxApproveResult(
WorkFlowEmus.SHIPMENT_BATCH_ADD_PRICE.getKey(),
event.getBusinessKey(), event.getResult());
} }
} }
...@@ -406,7 +406,7 @@ public class CustomerController { ...@@ -406,7 +406,7 @@ public class CustomerController {
@GetMapping("/get-wait-for-distribution") @GetMapping("/get-wait-for-distribution")
@ApiOperation("获得待分配客户列表") @ApiOperation("获得待分配客户列表")
// @PreAuthorize("@ss.hasPermission('ecw:customer:query')") //@PreAuthorize("@ss.hasPermission('ecw:customer:query')")
public CommonResult<PageResult<CustomerRespVO>> getWaitForDistributionList(@Valid CustomerPageReqDTO customerPageReqVO, PageVO page) { public CommonResult<PageResult<CustomerRespVO>> getWaitForDistributionList(@Valid CustomerPageReqDTO customerPageReqVO, PageVO page) {
//lanbm 2024-05-26 添加注释 //lanbm 2024-05-26 添加注释
PageResult<CustomerDO> pageResult = PageResult<CustomerDO> pageResult =
......
...@@ -140,7 +140,7 @@ public class RegionController { ...@@ -140,7 +140,7 @@ public class RegionController {
@GetMapping("/getListTree") @GetMapping("/getListTree")
@ApiOperation("获得区域设置列表") @ApiOperation("获得区域设置列表")
// @PreAuthorize("@ss.hasPermission('ecw:region:query')") //@PreAuthorize("@ss.hasPermission('ecw:region:query')")
public CommonResult<List<RegionRespVO>> listTree(RegionListReqVO reqVO) { public CommonResult<List<RegionRespVO>> listTree(RegionListReqVO reqVO) {
List<RegionDO> list = regionService.getSimpleDepts(reqVO); List<RegionDO> list = regionService.getSimpleDepts(reqVO);
list.sort(Comparator.comparing(RegionDO::getSort)); list.sort(Comparator.comparing(RegionDO::getSort));
...@@ -173,8 +173,10 @@ public class RegionController { ...@@ -173,8 +173,10 @@ public class RegionController {
@GetMapping("/getTradeCityList") @GetMapping("/getTradeCityList")
@ApiOperation("获得始发、目的城市列表") @ApiOperation("获得始发、目的城市列表")
// @PreAuthorize("@ss.hasPermission('ecw:region:query')") //@PreAuthorize("@ss.hasPermission('ecw:region:query')")
public CommonResult<List<RegionRespVO>> getTradeCityList(TradeRegionListReqVO reqVO) { public CommonResult<List<RegionRespVO>> getTradeCityList(
TradeRegionListReqVO reqVO) {
if (Objects.nonNull(reqVO.getChannelId())){ if (Objects.nonNull(reqVO.getChannelId())){
// 如果有渠道信息,则查询可出目的地国家下的目的地城市 // 如果有渠道信息,则查询可出目的地国家下的目的地城市
QueryChannelInfoEvent channelInfoEvent = new QueryChannelInfoEvent(); QueryChannelInfoEvent channelInfoEvent = new QueryChannelInfoEvent();
......
...@@ -1275,10 +1275,10 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl ...@@ -1275,10 +1275,10 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if (Objects.nonNull(oldCustomerService)) { if (Objects.nonNull(oldCustomerService)) {
// 如果这里的旧客户经理id不为null,说明此客户属于移交新客户经理,但是新客户经理还未接收,业绩算老客户经理的 // 如果这里的旧客户经理id不为null,说明此客户属于移交新客户经理,但是新客户经理还未接收,业绩算老客户经理的
order.setSalesmanId(oldCustomerService); order.setSalesmanId(oldCustomerService);
} else if((customerDO.getIsInOpenSea() && Objects.nonNull(customerDO.getEnterOpenSeaTime())) || !customerDO.getIsCustomerServiceConfirmed()) { //客户还在公海上,和待接收的,不做业绩归属分配,归公司 } else if ((customerDO.getIsInOpenSea() && Objects.nonNull(customerDO.getEnterOpenSeaTime())) || !customerDO.getIsCustomerServiceConfirmed()) { //客户还在公海上,和待接收的,不做业绩归属分配,归公司
order.setSalesmanId(0L); order.setSalesmanId(0L);
order.setCustomerId(0L); order.setCustomerId(0L);
}else { } else {
addOrderSalesmanCustomerService(createReqVO, order); addOrderSalesmanCustomerService(createReqVO, order);
} }
AdminUserRespDTO adminUserRespDTO = adminUserApi.getUser(order.getSalesmanId()); AdminUserRespDTO adminUserRespDTO = adminUserApi.getUser(order.getSalesmanId());
...@@ -2112,7 +2112,8 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl ...@@ -2112,7 +2112,8 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if (Objects.nonNull(orderApprovalDO) && orderApprovalDO.getStatus() == 1) { if (Objects.nonNull(orderApprovalDO) && orderApprovalDO.getStatus() == 1) {
throw exception(YOUR_APPLY_PENDING); throw exception(YOUR_APPLY_PENDING);
} }
if (Objects.equals(vo.getStatus(), OrderStatusEnum.DRAFT.getValue()) || Objects.equals(vo.getStatus(), OrderStatusEnum.ORDER_PLACED.getValue()) || Objects.equals(vo.getStatus(), OrderStatusEnum.WAREHOUSING.getValue())) { if (Objects.equals(vo.getStatus(), OrderStatusEnum.DRAFT.getValue())
|| Objects.equals(vo.getStatus(), OrderStatusEnum.ORDER_PLACED.getValue()) || Objects.equals(vo.getStatus(), OrderStatusEnum.WAREHOUSING.getValue())) {
// 是草稿、已下单、入仓中状态 直接修改 // 是草稿、已下单、入仓中状态 直接修改
this.updateOrder(updateReqVO, memberUserDO); this.updateOrder(updateReqVO, memberUserDO);
...@@ -2220,8 +2221,10 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl ...@@ -2220,8 +2221,10 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if (Objects.nonNull(consigneeContactsDO)) { if (Objects.nonNull(consigneeContactsDO)) {
this.compareConsigneeInfo(updateReqVO, consigneeContactsDO, orderConsigneeBackVO, applyInfoList, vo, dictDataRespDTO); this.compareConsigneeInfo(updateReqVO, consigneeContactsDO, orderConsigneeBackVO, applyInfoList, vo, dictDataRespDTO);
} }
if (vo.getIsCharge() || orderConsignorBackVO.getIsCharge() || orderConsigneeBackVO.getIsCharge()) { if (vo.getIsCharge() || orderConsignorBackVO.getIsCharge() ||
// TODO 收发货人有变动,则可能业绩归属有变动, 此变动不放入审批详情,是根据收发货人的变动来实时调整业绩归属 orderConsigneeBackVO.getIsCharge()) {
// TODO 收发货人有变动,则可能业绩归属有变动, 此变动不放入审批详情,
// 是根据收发货人的变动来实时调整业绩归属
// 获取最早入仓时间,当入仓时间大于三天,则不允许再修改当前客户归属 // 获取最早入仓时间,当入仓时间大于三天,则不允许再修改当前客户归属
OrderWarehouseInDO warehouseInDO = orderWarehouseInMapper.selectOne(new LambdaQueryWrapper<OrderWarehouseInDO>() OrderWarehouseInDO warehouseInDO = orderWarehouseInMapper.selectOne(new LambdaQueryWrapper<OrderWarehouseInDO>()
.eq(OrderWarehouseInDO::getOrderId, vo.getOrderId()) .eq(OrderWarehouseInDO::getOrderId, vo.getOrderId())
...@@ -2852,8 +2855,9 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl ...@@ -2852,8 +2855,9 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
} }
private void comparePerformanceAttribution(OrderBackVO private void comparePerformanceAttribution(OrderBackVO vo,
vo, List<ApplyInfoVO> applyInfoList, OrderConsignorBackVO orderConsignorBackVO, List<ApplyInfoVO> applyInfoList,
OrderConsignorBackVO orderConsignorBackVO,
OrderConsigneeBackVO orderConsigneeBackVO) { OrderConsigneeBackVO orderConsigneeBackVO) {
// TODO 客户归属变动时记录日志 // TODO 客户归属变动时记录日志
if (!Objects.equals(vo.getStatus(), OrderStatusEnum.DRAFT.getValue())) { if (!Objects.equals(vo.getStatus(), OrderStatusEnum.DRAFT.getValue())) {
...@@ -2873,16 +2877,19 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl ...@@ -2873,16 +2877,19 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
} }
} else { } else {
if (vo.getIsCargoControl()) { if (vo.getIsCargoControl()) {
if (!Objects.equals(vo.getCustomerId(), orderConsignorBackVO.getCustomerId())) { if (!Objects.equals(vo.getCustomerId(),
orderConsignorBackVO.getCustomerId())) {
// 控货订单归属发货人 // 控货订单归属发货人
customerType = 1; customerType = 1;
CustomerDO orgCustomerDO = customerService.getCustomer(vo.getCustomerId()); CustomerDO orgCustomerDO = customerService.getCustomer(vo.getCustomerId());
CustomerDO newCustomerDO = customerService.getCustomer(orderConsignorBackVO.getCustomerId()); CustomerDO newCustomerDO = customerService.getCustomer(orderConsignorBackVO.getCustomerId());
infoVO = new ApplyInfoVO(); infoVO = new ApplyInfoVO();
infoVO.setName("订单客户归属变动/Change in customer ownership for orders"); infoVO.setName("新规则,控货订单客户归属不变动/Change in customer ownership for orders");
infoVO.setOrgValue(Objects.nonNull(orgCustomerDO) ? ((StringUtils.isNotBlank(orgCustomerDO.getName()) ? orgCustomerDO.getName() : "无") + "/" + (StringUtils.isNotBlank(orgCustomerDO.getNameEn()) ? orgCustomerDO.getNameEn() : "empty")) : "无/not have"); //lanbm 2024-06-18 出掉控货改变业绩归属的逻辑点
infoVO.setNewValue(Objects.nonNull(newCustomerDO) ? ((StringUtils.isNotBlank(newCustomerDO.getName()) ? newCustomerDO.getName() : "无") + "/" + (StringUtils.isNotBlank(newCustomerDO.getNameEn()) ? newCustomerDO.getNameEn() : "empty")) : "无/not have"); //infoVO.setOrgValue(Objects.nonNull(orgCustomerDO) ? ((StringUtils.isNotBlank(orgCustomerDO.getName()) ? orgCustomerDO.getName() : "无") + "/" + (StringUtils.isNotBlank(orgCustomerDO.getNameEn()) ? orgCustomerDO.getNameEn() : "empty")) : "无/not have");
vo.setCustomerId(orderConsignorBackVO.getCustomerId()); //infoVO.setNewValue(Objects.nonNull(newCustomerDO) ? ((StringUtils.isNotBlank(newCustomerDO.getName()) ? newCustomerDO.getName() : "无") + "/" + (StringUtils.isNotBlank(newCustomerDO.getNameEn()) ? newCustomerDO.getNameEn() : "empty")) : "无/not have");
//vo.setCustomerId(orderConsignorBackVO.getCustomerId());
return;
} }
} else { } else {
// 非控货订单 + 付款人为发货人 归属发货人, 其他归属收货人 // 非控货订单 + 付款人为发货人 归属发货人, 其他归属收货人
...@@ -3465,7 +3472,9 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl ...@@ -3465,7 +3472,9 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
// //
// } // }
// 更新所属客户经理(业务员) // 更新所属客户经理(业务员)
if (!OrderStatusEnum.DRAFT.getValue().equals(updateObj.getStatus()) && Objects.nonNull(updateObj.getCustomerId()) && updateObj.getCustomerId() > 0) { if (!OrderStatusEnum.DRAFT.getValue().equals(updateObj.getStatus())
&& Objects.nonNull(updateObj.getCustomerId()) &&
updateObj.getCustomerId() > 0) {
addOrderCustomerService(updateObj, customerType); addOrderCustomerService(updateObj, customerType);
} }
} }
......
...@@ -342,7 +342,8 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI ...@@ -342,7 +342,8 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
// 判断是否有未处理的审核单 // 判断是否有未处理的审核单
throwProcessingApproval(orderDO); throwProcessingApproval(orderDO);
this.validateProdAttrAccess(createReqVO.getProdId(), orderDO.getOrderNo()); this.validateProdAttrAccess(createReqVO.getProdId(),
orderDO.getOrderNo());
validateWarehouseInItem(orderDO, validateWarehouseInItem(orderDO,
...@@ -381,7 +382,10 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI ...@@ -381,7 +382,10 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
orderService.orderInWarehouse(orderWarehouseInVO); orderService.orderInWarehouse(orderWarehouseInVO);
// 更新订单状态 - 入库中 // 更新订单状态 - 入库中
orderService.updateStatus(orderId, orderDO.getOrderNo(), OrderStatusEnum.WAREHOUSING.getValue(), null, OrderWarehouseInStatusEnum.warehousing.getValue(), null, null, null, false); orderService.updateStatus(orderId, orderDO.getOrderNo(),
OrderStatusEnum.WAREHOUSING.getValue(),
null,
OrderWarehouseInStatusEnum.warehousing.getValue(), null, null, null, false);
// 纪录操作日志 // 纪录操作日志
if (createReqVO.getIsAddOrderOperateLog()) { if (createReqVO.getIsAddOrderOperateLog()) {
......
...@@ -1219,9 +1219,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper, ...@@ -1219,9 +1219,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
//查询产品价格信息 lanbm 2024-05-31 添加注释 //查询产品价格信息 lanbm 2024-05-31 添加注释
List<ProductPriceDO> priceList = List<ProductPriceDO> priceList =
getProductPriceList(productPriceIdList); getProductPriceList(productPriceIdList);
List<ProductPriceDO> needHandleList = new ArrayList<>(); List<ProductPriceDO> needHandleList = new ArrayList<>();
Date now = new Date(); Date now = new Date();
for (ProductPriceDO productPriceDO : priceList) { for (ProductPriceDO productPriceDO : priceList) {
...@@ -1229,21 +1227,26 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper, ...@@ -1229,21 +1227,26 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
Date validateEndDate = productPriceDO.getValidateEndDate(); Date validateEndDate = productPriceDO.getValidateEndDate();
boolean hasPrice = false; boolean hasPrice = false;
if (productPriceDO.getPriceType() == 0) {
//运费和清关价 if (productPriceDO.getPriceType() != null) {
BigDecimal transportPrice = productPriceDO.getTransportPrice(); if (productPriceDO.getPriceType() == 0) {
hasPrice = transportPrice != null && //运费和清关价
transportPrice.floatValue() > 0; BigDecimal transportPrice = productPriceDO.getTransportPrice();
hasPrice = transportPrice != null &&
} else if (productPriceDO.getPriceType() == 1) { transportPrice.floatValue() > 0;
//全包价
BigDecimal allPrice = productPriceDO.getAllPrice(); } else if (productPriceDO.getPriceType() == 1) {
hasPrice = allPrice != null && allPrice.floatValue() > 0; //全包价
BigDecimal allPrice = productPriceDO.getAllPrice();
hasPrice = allPrice != null && allPrice.floatValue() > 0;
}
} }
//lanbm 2024-06-06 处理单询价问题添加的逻辑点。 //lanbm 2024-06-06 处理单询价问题添加的逻辑点。
if (productPriceDO.getNeedOrderInquiry() == 1) { if (productPriceDO.getNeedOrderInquiry() != null) {
hasPrice = true; if (productPriceDO.getNeedOrderInquiry() == 1) {
hasPrice = true;
}
} }
//没有价格信息不继续后面的处理 //没有价格信息不继续后面的处理
...@@ -3403,10 +3406,15 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper, ...@@ -3403,10 +3406,15 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void copyPriceByProductIds(CopyProductPriceDto dto) { public void copyPriceByProductIds(CopyProductPriceDto dto) {
List<Long> ids = Arrays.stream(dto.getProductPriceIds().split(StrUtil.COMMA)).map(Long::parseLong).collect(Collectors.toList()); List<Long> ids = Arrays.stream(dto.getProductPriceIds().
split(StrUtil.COMMA)).map(Long::parseLong).collect(Collectors.toList());
//列出要复制的商品价格 //列出要复制的商品价格
List<ProductPriceDO> productPriceDOList = this.productPriceMapper.selectList(new LambdaQueryWrapper<ProductPriceDO>().in(ProductPriceDO::getId, ids)); List<ProductPriceDO> productPriceDOList =
this.productPriceMapper.selectList(
new LambdaQueryWrapper<ProductPriceDO>().
in(ProductPriceDO::getId, ids));
if (productPriceDOList.size() > 0) { if (productPriceDOList.size() > 0) {
productPriceDOList.forEach(price -> { productPriceDOList.forEach(price -> {
...@@ -3568,7 +3576,8 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper, ...@@ -3568,7 +3576,8 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
//ProductDO productDO = checkUpdateStatus(lineChannelList, createReqVO.getProductId()); //ProductDO productDO = checkUpdateStatus(lineChannelList, createReqVO.getProductId());
ProductDO productDO = productService.getProduct(createReqVO.getProductId()); ProductDO productDO = productService.getProduct(createReqVO.getProductId());
WarehouseLineSearchVO searchVO = new WarehouseLineSearchVO(); WarehouseLineSearchVO searchVO = new WarehouseLineSearchVO();
List<WarehouseLineDO> warehouseLineList = warehouseService.openedRouterList(searchVO); List<WarehouseLineDO> warehouseLineList =
warehouseService.openedRouterList(searchVO);
List<ProductDO> productList = Collections.singletonList(productDO); List<ProductDO> productList = Collections.singletonList(productDO);
//商品线路保存在redis。更新成功后移除 //商品线路保存在redis。更新成功后移除
...@@ -3576,7 +3585,10 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper, ...@@ -3576,7 +3585,10 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
createReqVO.setSync(true); createReqVO.setSync(true);
createReqVO.setBatch(false); createReqVO.setBatch(false);
copyPriceUpdateAir(createReqVO, warehouseLineList, productList, price); copyPriceUpdateAir(createReqVO,
warehouseLineList,
productList,
price);
}); });
} }
...@@ -3704,7 +3716,8 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper, ...@@ -3704,7 +3716,8 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
log.info("路线处理耗时:" + (t2 - t1)); log.info("路线处理耗时:" + (t2 - t1));
deleteKey(idList, lineChannelList); deleteKey(idList, lineChannelList);
handleOrderException(productPriceIdList, createReqVO.isSync()); handleOrderException(productPriceIdList,
createReqVO.isSync());
} }
private void copyClearAndSavePriceStepList(List<Long> productPriceIdList, List<ProductPriceStepDO> stepList, Map<Long, String> priceTransportTypeMap, boolean batchUpdate) { private void copyClearAndSavePriceStepList(List<Long> productPriceIdList, List<ProductPriceStepDO> stepList, Map<Long, String> priceTransportTypeMap, boolean batchUpdate) {
......
...@@ -73,10 +73,12 @@ ...@@ -73,10 +73,12 @@
AND FIND_IN_SET(#{params.attrId}, ep.attr_id) AND FIND_IN_SET(#{params.attrId}, ep.attr_id)
</if> </if>
<!--运输方式-->
<if test="params.transportType != null and params.transportType != ''"> <if test="params.transportType != null and params.transportType != ''">
and ewl.transport_type = #{params.transportType} and ewl.transport_type = #{params.transportType}
</if> </if>
<!--出货渠道-->
<if test="params.shippingChannelId != null"> <if test="params.shippingChannelId != null">
and epp.shipping_channel_id = #{params.shippingChannelId} and epp.shipping_channel_id = #{params.shippingChannelId}
</if> </if>
...@@ -93,6 +95,7 @@ ...@@ -93,6 +95,7 @@
and epp.need_pay = #{params.needPay} and epp.need_pay = #{params.needPay}
</if> </if>
<!--价格类型 0是运费加清关费,1是全包价-->
<if test="params.priceType != null"> <if test="params.priceType != null">
and epp.price_type = #{params.priceType} and epp.price_type = #{params.priceType}
</if> </if>
...@@ -414,4 +417,4 @@ ...@@ -414,4 +417,4 @@
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -62,14 +62,16 @@ public class ProductPriceController { ...@@ -62,14 +62,16 @@ public class ProductPriceController {
@ApiOperation("创建路线产品") @ApiOperation("创建路线产品")
@PreAuthorize("@ss.hasPermission('ecw:product-price:create')") @PreAuthorize("@ss.hasPermission('ecw:product-price:create')")
@Idempotent(timeout = 5) @Idempotent(timeout = 5)
public CommonResult<Long> createProductPrice(@Valid @RequestBody ProductPriceCreateReqVO createReqVO) { public CommonResult<Long> createProductPrice(
@Valid @RequestBody ProductPriceCreateReqVO createReqVO) {
return success(productPriceService.singleCreate(createReqVO)); return success(productPriceService.singleCreate(createReqVO));
} }
@PostMapping("/createAir") @PostMapping("/createAir")
@ApiOperation("创建路线产品空运") @ApiOperation("创建路线产品空运")
@Idempotent(timeout = 5) @Idempotent(timeout = 5)
public CommonResult<Long> createProductPriceAir(@Valid @RequestBody ProductPriceAirCreateReqVO createReqVO) { public CommonResult<Long> createProductPriceAir(
@Valid @RequestBody ProductPriceAirCreateReqVO createReqVO) {
return success(productPriceService.singleCreateAir(createReqVO)); return success(productPriceService.singleCreateAir(createReqVO));
} }
...@@ -97,7 +99,8 @@ public class ProductPriceController { ...@@ -97,7 +99,8 @@ public class ProductPriceController {
@PutMapping("/updateAir") @PutMapping("/updateAir")
@ApiOperation("更新空运路线产品") @ApiOperation("更新空运路线产品")
@Idempotent(timeout = 5) @Idempotent(timeout = 5)
public CommonResult<Boolean> updateProductPriceAir(@Valid @RequestBody ProductPriceAirUpdateReqVO productPriceAirUpdateReqVO) { public CommonResult<Boolean> updateProductPriceAir(
@Valid @RequestBody ProductPriceAirUpdateReqVO productPriceAirUpdateReqVO) {
productPriceService.updateProductPriceAir(productPriceAirUpdateReqVO); productPriceService.updateProductPriceAir(productPriceAirUpdateReqVO);
return success(true); return success(true);
} }
...@@ -210,7 +213,8 @@ public class ProductPriceController { ...@@ -210,7 +213,8 @@ public class ProductPriceController {
@ApiOperation("批量拉黑") @ApiOperation("批量拉黑")
@ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class)
// @PreAuthorize("@ss.hasPermission('ecw:product-price:batchBlock')") // @PreAuthorize("@ss.hasPermission('ecw:product-price:batchBlock')")
public CommonResult<Boolean> batchBlock(@RequestParam("ids") Collection<Long> ids) { public CommonResult<Boolean> batchBlock(
@RequestParam("ids") Collection<Long> ids) {
productPriceService.batchBlock(ids); productPriceService.batchBlock(ids);
return success(true); return success(true);
} }
...@@ -218,9 +222,14 @@ public class ProductPriceController { ...@@ -218,9 +222,14 @@ public class ProductPriceController {
@GetMapping("/page") @GetMapping("/page")
@ApiOperation("获得路线产品分页") @ApiOperation("获得路线产品分页")
@PreAuthorize("@ss.hasPermission('ecw:product-price:query')") @PreAuthorize("@ss.hasPermission('ecw:product-price:query')")
public CommonResult<PageResult<ProductPriceRespVO>> getProductPricePage(@Valid ProductPricePageReqVO pageVO) { public CommonResult<PageResult<ProductPriceRespVO>> getProductPricePage(
PageResult<ProductPriceDO> pageResult = productPriceService.getProductPricePage(pageVO); @Valid ProductPricePageReqVO pageVO) {
PageResult<ProductPriceRespVO> respPageResult = ProductPriceConvert.INSTANCE.convertPage(pageResult);
PageResult<ProductPriceDO> pageResult =
productPriceService.getProductPricePage(pageVO);
PageResult<ProductPriceRespVO> respPageResult =
ProductPriceConvert.INSTANCE.convertPage(pageResult);
productPriceService.matchLineAndProduct(respPageResult.getList()); productPriceService.matchLineAndProduct(respPageResult.getList());
return success(respPageResult); return success(respPageResult);
} }
...@@ -284,6 +293,7 @@ public class ProductPriceController { ...@@ -284,6 +293,7 @@ public class ProductPriceController {
/** /**
* 从商品列表中某一商品进入复制价格 * 从商品列表中某一商品进入复制价格
* @param dto * @param dto
* lanbm 2024-06-19 添加注释
*/ */
@ApiOperation("从商品列表中某一商品进入复制价格") @ApiOperation("从商品列表中某一商品进入复制价格")
@PostMapping("/copyPriceByProductIds") @PostMapping("/copyPriceByProductIds")
......
...@@ -49,6 +49,7 @@ import cn.iocoder.yudao.module.member.api.user.dto.UserRespDTO; ...@@ -49,6 +49,7 @@ import cn.iocoder.yudao.module.member.api.user.dto.UserRespDTO;
import cn.iocoder.yudao.module.order.convert.orderLocation.OrderLocationConvert; import cn.iocoder.yudao.module.order.convert.orderLocation.OrderLocationConvert;
import cn.iocoder.yudao.module.order.dal.dataobject.approval.OrderApprovalDO; import cn.iocoder.yudao.module.order.dal.dataobject.approval.OrderApprovalDO;
import cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO; import cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO;
import cn.iocoder.yudao.module.order.dal.dataobject.order.zTest;
import cn.iocoder.yudao.module.order.dal.dataobject.orderCargoControl.OrderCargoControlDO; import cn.iocoder.yudao.module.order.dal.dataobject.orderCargoControl.OrderCargoControlDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderConsignee.OrderConsigneeDO; import cn.iocoder.yudao.module.order.dal.dataobject.orderConsignee.OrderConsigneeDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderConsignor.OrderConsignorDO; import cn.iocoder.yudao.module.order.dal.dataobject.orderConsignor.OrderConsignorDO;
...@@ -56,6 +57,7 @@ import cn.iocoder.yudao.module.order.dal.dataobject.orderItem.OrderItemDO; ...@@ -56,6 +57,7 @@ import cn.iocoder.yudao.module.order.dal.dataobject.orderItem.OrderItemDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderLocation.OrderLocationDO; import cn.iocoder.yudao.module.order.dal.dataobject.orderLocation.OrderLocationDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderSplit.OrderSplitDO; import cn.iocoder.yudao.module.order.dal.dataobject.orderSplit.OrderSplitDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderSplitItem.OrderSplitItemDO; import cn.iocoder.yudao.module.order.dal.dataobject.orderSplitItem.OrderSplitItemDO;
import cn.iocoder.yudao.module.order.dal.mysql.order.ZTestMapper2;
import cn.iocoder.yudao.module.order.dal.mysql.orderSplitItem.OrderSplitItemMapper; import cn.iocoder.yudao.module.order.dal.mysql.orderSplitItem.OrderSplitItemMapper;
import cn.iocoder.yudao.module.order.dto.ContainerNumberSummaryDto; import cn.iocoder.yudao.module.order.dto.ContainerNumberSummaryDto;
import cn.iocoder.yudao.module.order.dto.OrderRemindExceptionDto; import cn.iocoder.yudao.module.order.dto.OrderRemindExceptionDto;
...@@ -234,6 +236,9 @@ import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.DEPT_NOT_F ...@@ -234,6 +236,9 @@ import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.DEPT_NOT_F
@Slf4j @Slf4j
public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements BoxService { public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements BoxService {
@Resource
private ZTestMapper2 zTestMapper2;
@Resource @Resource
private BoxMapper boxMapper; private BoxMapper boxMapper;
...@@ -2550,7 +2555,7 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements ...@@ -2550,7 +2555,7 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
long orderExitNum = boxOrderExitService.count( long orderExitNum = boxOrderExitService.count(
new LambdaQueryWrapper<BoxOrderExitDO>() new LambdaQueryWrapper<BoxOrderExitDO>()
.eq(BoxOrderExitDO::getShipmentId, shipmentId) .eq(BoxOrderExitDO::getShipmentId, shipmentId)
); );
boxBackVO.setOrderExitNum(orderExitNum); boxBackVO.setOrderExitNum(orderExitNum);
} }
...@@ -3453,33 +3458,36 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements ...@@ -3453,33 +3458,36 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
.map(BoxAbnormalDO::getShipmentId) .map(BoxAbnormalDO::getShipmentId)
.collect(Collectors.toList()); .collect(Collectors.toList());
List<BoxDO> boxList = getBoxList(shipmentIdList); List<BoxDO> boxList = getBoxList(shipmentIdList);
Map<Long, BoxDO> boxMap = boxList.stream() if (CollectionUtil.isNotEmpty(boxList)) {
.collect(Collectors.toMap(BoxDO::getId, v -> v));
Map<Long, BoxDO> boxMap = boxList.stream()
for (BoxAbnormalDO abnormalDO : abnormalList) { .collect(Collectors.toMap(BoxDO::getId, v -> v));
String notifyUsers = abnormalDO.getNotifyUsers();
if (notifyUsers == null) continue; for (BoxAbnormalDO abnormalDO : abnormalList) {
Long shipmentId = abnormalDO.getShipmentId(); String notifyUsers = abnormalDO.getNotifyUsers();
Integer opStep = abnormalDO.getOpStep(); if (notifyUsers == null) continue;
BoxDO boxDO = boxMap.get(shipmentId); Long shipmentId = abnormalDO.getShipmentId();
String transportType = boxDO.getTransportType(); Integer opStep = abnormalDO.getOpStep();
if (CollectionUtil.isNotEmpty(transportTypeList)) { BoxDO boxDO = boxMap.get(shipmentId);
if (!transportTypeList.contains(transportType)) continue; String transportType = boxDO.getTransportType();
} if (CollectionUtil.isNotEmpty(transportTypeList)) {
if (!transportTypeList.contains(transportType)) continue;
}
String[] userArray = notifyUsers.split(","); String[] userArray = notifyUsers.split(",");
NoticeTypeEnum typeEnum = null; NoticeTypeEnum typeEnum = null;
if (opStep.equals(AbnormalStepEnum.CUSTOMS.getStep())) { if (opStep.equals(AbnormalStepEnum.CUSTOMS.getStep())) {
typeEnum = NoticeTypeEnum.ABNORMAL_CUSTOMS; typeEnum = NoticeTypeEnum.ABNORMAL_CUSTOMS;
} else if (opStep.equals(AbnormalStepEnum.SHIPPING.getStep())) { } else if (opStep.equals(AbnormalStepEnum.SHIPPING.getStep())) {
typeEnum = NoticeTypeEnum.ABNORMAL_SHIPPING; typeEnum = NoticeTypeEnum.ABNORMAL_SHIPPING;
} else if (opStep.equals(AbnormalStepEnum.ARRIVAL.getStep())) { } else if (opStep.equals(AbnormalStepEnum.ARRIVAL.getStep())) {
typeEnum = NoticeTypeEnum.ABNORMAL_ARRIVAL; typeEnum = NoticeTypeEnum.ABNORMAL_ARRIVAL;
} }
Date noticeTime = abnormalDO.getAbnEndTime(); Date noticeTime = abnormalDO.getAbnEndTime();
for (String userId : userArray) { for (String userId : userArray) {
if (!userId.equals(loginUserId.toString())) continue; if (!userId.equals(loginUserId.toString())) continue;
noticeList.add(addNotice(typeEnum, boxDO, noticeTime)); noticeList.add(addNotice(typeEnum, boxDO, noticeTime));
}
} }
} }
} }
...@@ -4948,10 +4956,21 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements ...@@ -4948,10 +4956,21 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
if (StringUtils.isEmpty(details)) { if (StringUtils.isEmpty(details)) {
throw new ServiceException(500, "加价详情不能为空"); throw new ServiceException(500, "加价详情不能为空");
} }
BoxOrderMarkUpVO boxOrderMarkUpVO = JSON.parseObject(details, BoxOrderMarkUpVO.class); BoxOrderMarkUpVO boxOrderMarkUpVO =
orderBusinessService.handleAirOrderBatchMarkup(boxOrderMarkUpVO.getOrderIds(), boxOrderMarkUpVO.getFreightFee(), JSON.parseObject(details, BoxOrderMarkUpVO.class);
boxOrderMarkUpVO.getFreightCurrencyId(), boxOrderMarkUpVO.getFreightUnitId(),
boxOrderMarkUpVO.getClearanceFee(), boxOrderMarkUpVO.getClearanceCurrencyId(), zTest z=new zTest();
z.setTestname("开始调用 handleAirOrderBatchMarkup");
z.setCreatedate(new Date());
zTestMapper2.insert(z);
orderBusinessService.handleAirOrderBatchMarkup(
boxOrderMarkUpVO.getOrderIds(),
boxOrderMarkUpVO.getFreightFee(),
boxOrderMarkUpVO.getFreightCurrencyId(),
boxOrderMarkUpVO.getFreightUnitId(),
boxOrderMarkUpVO.getClearanceFee(),
boxOrderMarkUpVO.getClearanceCurrencyId(),
boxOrderMarkUpVO.getClearanceUnitId()); boxOrderMarkUpVO.getClearanceUnitId());
} }
...@@ -4970,7 +4989,8 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements ...@@ -4970,7 +4989,8 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
@Override @Override
public void checkIsInClearance(Long shipmentId, Long orderId) { public void checkIsInClearance(Long shipmentId, Long orderId) {
BoxClearanceOrderDO clearanceOrderDO = boxClearanceOrderService.getOne(new LambdaQueryWrapper<BoxClearanceOrderDO>() BoxClearanceOrderDO clearanceOrderDO =
boxClearanceOrderService.getOne(new LambdaQueryWrapper<BoxClearanceOrderDO>()
.eq(BoxClearanceOrderDO::getShipmentId, shipmentId) .eq(BoxClearanceOrderDO::getShipmentId, shipmentId)
.eq(BoxClearanceOrderDO::getOrderId, orderId) .eq(BoxClearanceOrderDO::getOrderId, orderId)
); );
...@@ -4998,20 +5018,28 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements ...@@ -4998,20 +5018,28 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
@Override @Override
public void checkOrderPayStatus(Collection<Long> orderIds) { public void checkOrderPayStatus(Collection<Long> orderIds) {
if (CollectionUtil.isEmpty(orderIds)) return; if (CollectionUtil.isEmpty(orderIds)) return;
List<ReceivableDO> receivableList = receivableService.getOrderPayList(orderIds); List<ReceivableDO> receivableList =
List<OrderDO> orderList = orderQueryService.getOrderList(orderIds); receivableService.getOrderPayList(orderIds);
List<OrderDO> orderList =
orderQueryService.getOrderList(orderIds);
Map<Long, OrderDO> orderMap = orderList.stream() Map<Long, OrderDO> orderMap = orderList.stream()
.collect(Collectors.toMap(OrderDO::getOrderId, v -> v)); .collect(Collectors.toMap(OrderDO::getOrderId, v -> v));
List<String> payOrderNoList = new ArrayList<>(); List<String> payOrderNoList = new ArrayList<>();
if (CollectionUtil.isNotEmpty(receivableList)) { if (CollectionUtil.isNotEmpty(receivableList)) {
Map<Long, List<ReceivableDO>> receivableMap = receivableList.stream() Map<Long, List<ReceivableDO>> receivableMap = receivableList.stream()
.collect(Collectors.groupingBy(ReceivableDO::getOrderId)); .collect(Collectors.groupingBy(ReceivableDO::getOrderId));
for (Map.Entry<Long, List<ReceivableDO>> entry : receivableMap.entrySet()) {
for (Map.Entry<Long,
List<ReceivableDO>> entry : receivableMap.entrySet()) {
Long orderId = entry.getKey(); Long orderId = entry.getKey();
OrderDO orderDO = orderMap.get(orderId); OrderDO orderDO = orderMap.get(orderId);
payOrderNoList.add(orderDO.getOrderNo()); payOrderNoList.add(orderDO.getOrderNo());
} }
throw new ServiceException(500, Joiner.on(",").join(payOrderNoList) + "已预付核销,不允许修改价格"); throw new ServiceException(500,
Joiner.on(",").join(payOrderNoList) + "已预付核销,不允许修改价格");
} }
} }
......
...@@ -15,8 +15,10 @@ import cn.iocoder.yudao.module.bpm.resp.TaskResp; ...@@ -15,8 +15,10 @@ import cn.iocoder.yudao.module.bpm.resp.TaskResp;
import cn.iocoder.yudao.module.ecw.service.internalMessage.InternalMessageService; import cn.iocoder.yudao.module.ecw.service.internalMessage.InternalMessageService;
import cn.iocoder.yudao.module.ecw.vo.internalMessage.InternalMessageCreateReqVO; import cn.iocoder.yudao.module.ecw.vo.internalMessage.InternalMessageCreateReqVO;
import cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO; import cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO;
import cn.iocoder.yudao.module.order.dal.dataobject.order.zTest;
import cn.iocoder.yudao.module.order.dal.dataobject.orderItem.OrderItemDO; import cn.iocoder.yudao.module.order.dal.dataobject.orderItem.OrderItemDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderSplitItem.OrderSplitItemDO; import cn.iocoder.yudao.module.order.dal.dataobject.orderSplitItem.OrderSplitItemDO;
import cn.iocoder.yudao.module.order.dal.mysql.order.ZTestMapper2;
import cn.iocoder.yudao.module.order.enums.*; import cn.iocoder.yudao.module.order.enums.*;
import cn.iocoder.yudao.module.order.service.targetLog.TargetLogService; import cn.iocoder.yudao.module.order.service.targetLog.TargetLogService;
import cn.iocoder.yudao.module.order.vo.order.CostVO; import cn.iocoder.yudao.module.order.vo.order.CostVO;
...@@ -74,6 +76,9 @@ import static cn.iocoder.yudao.module.shipment.enums.ErrorCodeConstants.*; ...@@ -74,6 +76,9 @@ import static cn.iocoder.yudao.module.shipment.enums.ErrorCodeConstants.*;
@Validated @Validated
public class BoxApprovalServiceImpl extends AbstractService<BoxApprovalMapper, BoxApprovalDO> implements BoxApprovalService { public class BoxApprovalServiceImpl extends AbstractService<BoxApprovalMapper, BoxApprovalDO> implements BoxApprovalService {
@Resource
private ZTestMapper2 zTestMapper2;
@Resource @Resource
private BoxApprovalMapper boxApprovalMapper; private BoxApprovalMapper boxApprovalMapper;
@Resource @Resource
...@@ -604,10 +609,14 @@ public class BoxApprovalServiceImpl extends AbstractService<BoxApprovalMapper, B ...@@ -604,10 +609,14 @@ public class BoxApprovalServiceImpl extends AbstractService<BoxApprovalMapper, B
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void updateBoxApproveResult(String flowKey, String id, int result) { public void updateBoxApproveResult(String flowKey,
String id,
int result) {
BoxApprovalDO boxApprovalDO = boxApprovalMapper.selectById(id); BoxApprovalDO boxApprovalDO = boxApprovalMapper.selectById(id);
TaskResp taskResp = bpmCreateServiceFactory.getLastTaskByProcessInstanceId(boxApprovalDO.getBpmProcessId()); TaskResp taskResp =
bpmCreateServiceFactory.getLastTaskByProcessInstanceId(boxApprovalDO.getBpmProcessId());
Long shipmentId = boxApprovalDO.getShipmentId(); Long shipmentId = boxApprovalDO.getShipmentId();
BoxDO boxDO = boxService.getBox(shipmentId); BoxDO boxDO = boxService.getBox(shipmentId);
...@@ -1145,9 +1154,27 @@ public class BoxApprovalServiceImpl extends AbstractService<BoxApprovalMapper, B ...@@ -1145,9 +1154,27 @@ public class BoxApprovalServiceImpl extends AbstractService<BoxApprovalMapper, B
//======================批量加价格======================= //======================批量加价格=======================
case SHIPMENT_BATCH_ADD_PRICE: case SHIPMENT_BATCH_ADD_PRICE:
//批量加价格 //批量加价格
//lanbm 2024-06-18 添加注释 是给自编号下的订单加价
if (result == BpmProcessInstanceResultEnum.APPROVE.getResult()) { if (result == BpmProcessInstanceResultEnum.APPROVE.getResult()) {
String details = boxApprovalDO.getDetails(); String details = boxApprovalDO.getDetails();
BoxOrderMarkUpVO boxOrderMarkUpVO = JSON.parseObject(details, BoxOrderMarkUpVO.class); BoxOrderMarkUpVO boxOrderMarkUpVO =
JSON.parseObject(details, BoxOrderMarkUpVO.class);
if(boxOrderMarkUpVO.getOrderIds()!=null)
{
String s=String.valueOf(boxOrderMarkUpVO.getOrderIds());
zTest z=new zTest();
z.setTestname("订单id,"+s);
z.setCreatedate(new Date());
zTestMapper2.insert(z);
}
else
{
String s=String.valueOf(boxOrderMarkUpVO.getOrderIds());
zTest z=new zTest();
z.setTestname("批量加价申报批,订单id为空");
z.setCreatedate(new Date());
zTestMapper2.insert(z);
}
boxService.checkOrderPayStatus(boxOrderMarkUpVO.getOrderIds()); boxService.checkOrderPayStatus(boxOrderMarkUpVO.getOrderIds());
boxService.batchAddPriceSuccess(shipmentId, details); boxService.batchAddPriceSuccess(shipmentId, details);
} }
......
...@@ -675,7 +675,8 @@ public class BoxOrderCheckInfoServiceImpl extends AbstractService<BoxOrderCheckI ...@@ -675,7 +675,8 @@ public class BoxOrderCheckInfoServiceImpl extends AbstractService<BoxOrderCheckI
return tagList; return tagList;
} }
private List<BoxOrderCheckInfoDO> getOrderTagNumCaseList(OrderDO orderDO, List<OrderLabelDO> orderLabelList) { private List<BoxOrderCheckInfoDO> getOrderTagNumCaseList(
OrderDO orderDO, List<OrderLabelDO> orderLabelList) {
//从OrderLabel里面查找订单的箱号 //从OrderLabel里面查找订单的箱号
String orderNo = orderDO.getOrderNo(); String orderNo = orderDO.getOrderNo();
List<BoxOrderCheckInfoDO> tagList = new ArrayList<>(); List<BoxOrderCheckInfoDO> tagList = new ArrayList<>();
......
...@@ -855,7 +855,8 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM ...@@ -855,7 +855,8 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
} }
@Override @Override
public BoxGoodsStatistics calculationStatisticsByOrderList(Collection<OrderDO> orderDOList) { public BoxGoodsStatistics calculationStatisticsByOrderList(
Collection<OrderDO> orderDOList) {
BoxGoodsStatistics boxGoodsStatistics = new BoxGoodsStatistics(); BoxGoodsStatistics boxGoodsStatistics = new BoxGoodsStatistics();
if (CollectionUtil.isEmpty(orderDOList)) { if (CollectionUtil.isEmpty(orderDOList)) {
return boxGoodsStatistics; return boxGoodsStatistics;
...@@ -865,17 +866,19 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM ...@@ -865,17 +866,19 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
BigDecimal volumeSum = boxGoodsStatistics.getVolume(); BigDecimal volumeSum = boxGoodsStatistics.getVolume();
BigDecimal weightSum = boxGoodsStatistics.getWeight(); BigDecimal weightSum = boxGoodsStatistics.getWeight();
if (orderDO.getSumNum() != null) { if(orderDO!=null) {
numSum += orderDO.getSumNum(); if (orderDO.getSumNum() != null) {
boxGoodsStatistics.setNum(numSum); numSum += orderDO.getSumNum();
} boxGoodsStatistics.setNum(numSum);
if (orderDO.getSumVolume() != null) { }
volumeSum = volumeSum.add(orderDO.getSumVolume()).setScale(2, BigDecimal.ROUND_DOWN); if (orderDO.getSumVolume() != null) {
boxGoodsStatistics.setVolume(volumeSum); volumeSum = volumeSum.add(orderDO.getSumVolume()).setScale(2, BigDecimal.ROUND_DOWN);
} boxGoodsStatistics.setVolume(volumeSum);
if (orderDO.getSumWeight() != null) { }
weightSum = weightSum.add(orderDO.getSumWeight()).setScale(2, BigDecimal.ROUND_DOWN); if (orderDO.getSumWeight() != null) {
boxGoodsStatistics.setWeight(weightSum); weightSum = weightSum.add(orderDO.getSumWeight()).setScale(2, BigDecimal.ROUND_DOWN);
boxGoodsStatistics.setWeight(weightSum);
}
} }
} }
return boxGoodsStatistics; return boxGoodsStatistics;
...@@ -3160,6 +3163,7 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM ...@@ -3160,6 +3163,7 @@ public class BoxPreloadGoodsServiceImpl extends AbstractService<BoxPreloadGoodsM
List<Long> preloadOrderIds = boxPreloadGoodsDOS.stream().map(BoxPreloadGoodsDO::getOrderId).distinct().collect(Collectors.toList()); List<Long> preloadOrderIds = boxPreloadGoodsDOS.stream().map(BoxPreloadGoodsDO::getOrderId).distinct().collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(boxMergePkgDOS)) { if (CollectionUtil.isNotEmpty(boxMergePkgDOS)) {
for (BoxMergePkgDO boxMergePkgDO : boxMergePkgDOS) { for (BoxMergePkgDO boxMergePkgDO : boxMergePkgDOS) {
List<BoxPkgOrderDO> boxPkgOrderDOS = boxPkgOrderService.selectList(BoxPkgOrderDO::getPkgId, boxMergePkgDO.getId()); List<BoxPkgOrderDO> boxPkgOrderDOS = boxPkgOrderService.selectList(BoxPkgOrderDO::getPkgId, boxMergePkgDO.getId());
if (CollectionUtil.isNotEmpty(boxPkgOrderDOS)) { if (CollectionUtil.isNotEmpty(boxPkgOrderDOS)) {
List<Long> orderIds = boxPkgOrderDOS.stream().map(BoxPkgOrderDO::getOrderId).collect(Collectors.toList()); List<Long> orderIds = boxPkgOrderDOS.stream().map(BoxPkgOrderDO::getOrderId).collect(Collectors.toList());
......
...@@ -49,7 +49,8 @@ public class BoxMergePkgController { ...@@ -49,7 +49,8 @@ public class BoxMergePkgController {
@PostMapping("/create") @PostMapping("/create")
@ApiOperation("创建合包箱") @ApiOperation("创建合包箱")
//@PreAuthorize("@ss.hasPermission('ecw:box-merge-pkg:create')") //@PreAuthorize("@ss.hasPermission('ecw:box-merge-pkg:create')")
public CommonResult<String> createBoxMergePkg(@Valid @RequestBody BoxMergePkgCreateReqVO createReqVO) { public CommonResult<String> createBoxMergePkg(
@Valid @RequestBody BoxMergePkgCreateReqVO createReqVO) {
return success(boxMergePkgService.createBoxMergePkg(createReqVO)); return success(boxMergePkgService.createBoxMergePkg(createReqVO));
} }
...@@ -101,7 +102,8 @@ public class BoxMergePkgController { ...@@ -101,7 +102,8 @@ public class BoxMergePkgController {
@ApiOperation("获得合包箱分页") @ApiOperation("获得合包箱分页")
//@PreAuthorize("@ss.hasPermission('ecw:box-merge-pkg:query')") //@PreAuthorize("@ss.hasPermission('ecw:box-merge-pkg:query')")
public CommonResult<PageResult<BoxMergePkgPageDto>> getBoxMergePkgPage(@Valid BoxMergePkgQueryVO query, PageVO page) { public CommonResult<PageResult<BoxMergePkgPageDto>> getBoxMergePkgPage(@Valid BoxMergePkgQueryVO query, PageVO page) {
PageResult<BoxMergePkgPageDto> pageResult = boxMergePkgService.getBoxMergePkgPage(query, page); PageResult<BoxMergePkgPageDto> pageResult =
boxMergePkgService.getBoxMergePkgPage(query, page);
return success(pageResult); return success(pageResult);
} }
...@@ -109,7 +111,8 @@ public class BoxMergePkgController { ...@@ -109,7 +111,8 @@ public class BoxMergePkgController {
@ApiOperation("获得未装箱列表分页") @ApiOperation("获得未装箱列表分页")
// //@PreAuthorize("@ss.hasPermission('ecw:box-merge-pkg:query')") // //@PreAuthorize("@ss.hasPermission('ecw:box-merge-pkg:query')")
public CommonResult<PageResult<BoxMergePkgWebVO>> getUnPkgPage(PageVO page,@RequestParam("shipmentId") Long shipmentId) { public CommonResult<PageResult<BoxMergePkgWebVO>> getUnPkgPage(PageVO page,@RequestParam("shipmentId") Long shipmentId) {
PageResult<BoxMergePkgWebVO> pageResult = boxMergePkgService.getUnPkgPage(page,shipmentId); PageResult<BoxMergePkgWebVO> pageResult =
boxMergePkgService.getUnPkgPage(page,shipmentId);
return success(pageResult); return success(pageResult);
} }
......
...@@ -162,8 +162,10 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec ...@@ -162,8 +162,10 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
if (receivable.getDeleted()) { if (receivable.getDeleted()) {
throw exception(RECEIVABLE_DELETED); throw exception(RECEIVABLE_DELETED);
} }
//收款状态(0未收款,1收款中,2已收款)
if (receivable.getState() != 0) { if (receivable.getState() != 0) {
throw exception(RECEIVABLE_WRITE_OFF_ING); //lanbm 2024-06-19 取消此逻辑
//throw exception(RECEIVABLE_WRITE_OFF_ING);
} }
updateReqVO.setUpdateTime(new Date()); updateReqVO.setUpdateTime(new Date());
updateReqVO.setUpdater(String.valueOf(SecurityFrameworkUtils.getLoginUserId())); updateReqVO.setUpdater(String.valueOf(SecurityFrameworkUtils.getLoginUserId()));
......
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