Commit 4859b972 authored by lanbaoming's avatar lanbaoming

2024-06-19提交

parent e23ba12e
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;
}
......@@ -27,6 +27,7 @@ public class BmpShipmentBatchAddPriceListener extends BpmProcessInstanceResultEv
log.info("---------------------批量加价审核回调-----------------------{},{}",
event.getBusinessKey(), event.getResult());
//lanbm 2024-06-18 改为空运和海运都有此逻辑点
//运费,清关费,币种,单位都要和元订单一致才能生效
boxApprovalService.updateBoxApproveResult(
WorkFlowEmus.SHIPMENT_BATCH_ADD_PRICE.getKey(),
event.getBusinessKey(), event.getResult());
......
......@@ -1219,9 +1219,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
//查询产品价格信息 lanbm 2024-05-31 添加注释
List<ProductPriceDO> priceList =
getProductPriceList(productPriceIdList);
List<ProductPriceDO> needHandleList = new ArrayList<>();
Date now = new Date();
for (ProductPriceDO productPriceDO : priceList) {
......@@ -1229,6 +1227,8 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
Date validateEndDate = productPriceDO.getValidateEndDate();
boolean hasPrice = false;
if (productPriceDO.getPriceType() != null) {
if (productPriceDO.getPriceType() == 0) {
//运费和清关价
BigDecimal transportPrice = productPriceDO.getTransportPrice();
......@@ -1240,11 +1240,14 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
BigDecimal allPrice = productPriceDO.getAllPrice();
hasPrice = allPrice != null && allPrice.floatValue() > 0;
}
}
//lanbm 2024-06-06 处理单询价问题添加的逻辑点。
if (productPriceDO.getNeedOrderInquiry() != null) {
if (productPriceDO.getNeedOrderInquiry() == 1) {
hasPrice = true;
}
}
//没有价格信息不继续后面的处理
if (!hasPrice) continue;
......@@ -3403,10 +3406,15 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
@Override
@Transactional(rollbackFor = Exception.class)
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) {
productPriceDOList.forEach(price -> {
......@@ -3568,7 +3576,8 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
//ProductDO productDO = checkUpdateStatus(lineChannelList, createReqVO.getProductId());
ProductDO productDO = productService.getProduct(createReqVO.getProductId());
WarehouseLineSearchVO searchVO = new WarehouseLineSearchVO();
List<WarehouseLineDO> warehouseLineList = warehouseService.openedRouterList(searchVO);
List<WarehouseLineDO> warehouseLineList =
warehouseService.openedRouterList(searchVO);
List<ProductDO> productList = Collections.singletonList(productDO);
//商品线路保存在redis。更新成功后移除
......@@ -3576,7 +3585,10 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
createReqVO.setSync(true);
createReqVO.setBatch(false);
copyPriceUpdateAir(createReqVO, warehouseLineList, productList, price);
copyPriceUpdateAir(createReqVO,
warehouseLineList,
productList,
price);
});
}
......@@ -3704,7 +3716,8 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
log.info("路线处理耗时:" + (t2 - t1));
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) {
......
......@@ -62,14 +62,16 @@ public class ProductPriceController {
@ApiOperation("创建路线产品")
@PreAuthorize("@ss.hasPermission('ecw:product-price:create')")
@Idempotent(timeout = 5)
public CommonResult<Long> createProductPrice(@Valid @RequestBody ProductPriceCreateReqVO createReqVO) {
public CommonResult<Long> createProductPrice(
@Valid @RequestBody ProductPriceCreateReqVO createReqVO) {
return success(productPriceService.singleCreate(createReqVO));
}
@PostMapping("/createAir")
@ApiOperation("创建路线产品空运")
@Idempotent(timeout = 5)
public CommonResult<Long> createProductPriceAir(@Valid @RequestBody ProductPriceAirCreateReqVO createReqVO) {
public CommonResult<Long> createProductPriceAir(
@Valid @RequestBody ProductPriceAirCreateReqVO createReqVO) {
return success(productPriceService.singleCreateAir(createReqVO));
}
......@@ -211,7 +213,8 @@ public class ProductPriceController {
@ApiOperation("批量拉黑")
@ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class)
// @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);
return success(true);
}
......@@ -290,6 +293,7 @@ public class ProductPriceController {
/**
* 从商品列表中某一商品进入复制价格
* @param dto
* lanbm 2024-06-19 添加注释
*/
@ApiOperation("从商品列表中某一商品进入复制价格")
@PostMapping("/copyPriceByProductIds")
......
......@@ -162,8 +162,10 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
if (receivable.getDeleted()) {
throw exception(RECEIVABLE_DELETED);
}
//收款状态(0未收款,1收款中,2已收款)
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.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