frist commit
This commit is contained in:
parent
2500067e4a
commit
58126e7773
@ -48,13 +48,26 @@ public class BizInquiryRequestController extends BaseController {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据目的地仓库和渠道创建物流报价列表
|
* 根据目的地仓库和渠道创建物流询价单
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("amz:inquiryRequest:list")
|
@SaCheckPermission("amz:inquiryRequest:list")
|
||||||
@GetMapping("/create/{destination}/{channelId}")
|
@GetMapping("/query/{destination}/{channelId}/{date}")
|
||||||
|
public TableDataInfo<BizInquiryRequestVo> queryWithDesAndChannel(@PathVariable("destination") @NotNull(message = "目的地不能为空") String destination,
|
||||||
|
@PathVariable("channelId") @NotNull(message = "渠道不能为空") String channelId,
|
||||||
|
@PathVariable("date") @NotNull(message = "日期不能为空") String date) {
|
||||||
|
return bizInquiryRequestService.queryWithDesAndChannel(destination, channelId,date);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据目的地仓库和渠道创建物流询价单
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("amz:inquiryRequest:list")
|
||||||
|
@GetMapping("/create/{destination}/{channelId}/{date}")
|
||||||
public R<Void> createWithDesAndChannel(@PathVariable("destination") @NotNull(message = "目的地不能为空") String destination,
|
public R<Void> createWithDesAndChannel(@PathVariable("destination") @NotNull(message = "目的地不能为空") String destination,
|
||||||
@PathVariable("channelId") @NotNull(message = "渠道不能为空") String channelId) {
|
@PathVariable("channelId") @NotNull(message = "渠道不能为空") String channelId,
|
||||||
return bizInquiryRequestService.createWithDesAndChannel(destination, channelId);
|
@PathVariable("date") @NotNull(message = "日期不能为空") String date) {
|
||||||
|
return bizInquiryRequestService.createWithDesAndChannel(destination, channelId,date);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -0,0 +1,120 @@
|
|||||||
|
package org.asinkj.amz.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.asinkj.amz.domain.bo.BizLogisticsCreateOrderBo;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.asinkj.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.asinkj.common.log.annotation.Log;
|
||||||
|
import org.asinkj.common.web.core.BaseController;
|
||||||
|
import org.asinkj.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.asinkj.common.core.domain.R;
|
||||||
|
import org.asinkj.common.core.validate.AddGroup;
|
||||||
|
import org.asinkj.common.core.validate.EditGroup;
|
||||||
|
import org.asinkj.common.log.enums.BusinessType;
|
||||||
|
import org.asinkj.common.excel.utils.ExcelUtil;
|
||||||
|
import org.asinkj.amz.domain.vo.BizLogisticsOrderVo;
|
||||||
|
import org.asinkj.amz.domain.bo.BizLogisticsOrderBo;
|
||||||
|
import org.asinkj.amz.service.IBizLogisticsOrderService;
|
||||||
|
import org.asinkj.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流订单
|
||||||
|
* 前端访问路由地址为:/amz/logisticsOrder
|
||||||
|
*
|
||||||
|
* @author shuo hu
|
||||||
|
* @date 2025-03-24
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/logisticsOrder")
|
||||||
|
public class BizLogisticsOrderController extends BaseController {
|
||||||
|
|
||||||
|
private final IBizLogisticsOrderService bizLogisticsOrderService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物流订单列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("amz:logisticsOrder:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<BizLogisticsOrderVo> list(BizLogisticsOrderBo bo, PageQuery pageQuery) {
|
||||||
|
return bizLogisticsOrderService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出物流订单列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("amz:logisticsOrder:export")
|
||||||
|
@Log(title = "物流订单", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(BizLogisticsOrderBo bo, HttpServletResponse response) {
|
||||||
|
List<BizLogisticsOrderVo> list = bizLogisticsOrderService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "物流订单", BizLogisticsOrderVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取物流订单详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("amz:logisticsOrder:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BizLogisticsOrderVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(bizLogisticsOrderService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增物流订单
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("amz:logisticsOrder:add")
|
||||||
|
@Log(title = "物流订单", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody BizLogisticsOrderBo bo) {
|
||||||
|
return toAjax(bizLogisticsOrderService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增物流订单
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("amz:logisticsOrder:add")
|
||||||
|
@Log(title = "物流订单", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping("/createOrder")
|
||||||
|
public R<Void> createOrder(@Validated(AddGroup.class) @RequestBody BizLogisticsCreateOrderBo bo) {
|
||||||
|
bizLogisticsOrderService.createByBo(bo);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改物流订单
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("amz:logisticsOrder:edit")
|
||||||
|
@Log(title = "物流订单", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BizLogisticsOrderBo bo) {
|
||||||
|
return toAjax(bizLogisticsOrderService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除物流订单
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("amz:logisticsOrder:remove")
|
||||||
|
@Log(title = "物流订单", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(bizLogisticsOrderService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,106 @@
|
|||||||
|
package org.asinkj.amz.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.asinkj.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.asinkj.common.log.annotation.Log;
|
||||||
|
import org.asinkj.common.web.core.BaseController;
|
||||||
|
import org.asinkj.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.asinkj.common.core.domain.R;
|
||||||
|
import org.asinkj.common.core.validate.AddGroup;
|
||||||
|
import org.asinkj.common.core.validate.EditGroup;
|
||||||
|
import org.asinkj.common.log.enums.BusinessType;
|
||||||
|
import org.asinkj.common.excel.utils.ExcelUtil;
|
||||||
|
import org.asinkj.amz.domain.vo.BizLogisticsOrderDetailVo;
|
||||||
|
import org.asinkj.amz.domain.bo.BizLogisticsOrderDetailBo;
|
||||||
|
import org.asinkj.amz.service.IBizLogisticsOrderDetailService;
|
||||||
|
import org.asinkj.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流订单明细(按箱子维度存储)
|
||||||
|
* 前端访问路由地址为:/amz/logisticsOrderDetail
|
||||||
|
*
|
||||||
|
* @author shuo hu
|
||||||
|
* @date 2025-03-24
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/logisticsOrderDetail")
|
||||||
|
public class BizLogisticsOrderDetailController extends BaseController {
|
||||||
|
|
||||||
|
private final IBizLogisticsOrderDetailService bizLogisticsOrderDetailService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物流订单明细(按箱子维度存储)列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("amz:logisticsOrderDetail:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<BizLogisticsOrderDetailVo> list(BizLogisticsOrderDetailBo bo, PageQuery pageQuery) {
|
||||||
|
return bizLogisticsOrderDetailService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出物流订单明细(按箱子维度存储)列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("amz:logisticsOrderDetail:export")
|
||||||
|
@Log(title = "物流订单明细(按箱子维度存储)", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(BizLogisticsOrderDetailBo bo, HttpServletResponse response) {
|
||||||
|
List<BizLogisticsOrderDetailVo> list = bizLogisticsOrderDetailService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "物流订单明细(按箱子维度存储)", BizLogisticsOrderDetailVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取物流订单明细(按箱子维度存储)详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("amz:logisticsOrderDetail:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BizLogisticsOrderDetailVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(bizLogisticsOrderDetailService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增物流订单明细(按箱子维度存储)
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("amz:logisticsOrderDetail:add")
|
||||||
|
@Log(title = "物流订单明细(按箱子维度存储)", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody BizLogisticsOrderDetailBo bo) {
|
||||||
|
return toAjax(bizLogisticsOrderDetailService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改物流订单明细(按箱子维度存储)
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("amz:logisticsOrderDetail:edit")
|
||||||
|
@Log(title = "物流订单明细(按箱子维度存储)", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BizLogisticsOrderDetailBo bo) {
|
||||||
|
return toAjax(bizLogisticsOrderDetailService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除物流订单明细(按箱子维度存储)
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("amz:logisticsOrderDetail:remove")
|
||||||
|
@Log(title = "物流订单明细(按箱子维度存储)", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(bizLogisticsOrderDetailService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
@ -6,6 +6,7 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import jakarta.validation.constraints.*;
|
import jakarta.validation.constraints.*;
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.asinkj.amz.domain.bo.BizLogisticsQuoteMostBo;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.asinkj.common.idempotent.annotation.RepeatSubmit;
|
import org.asinkj.common.idempotent.annotation.RepeatSubmit;
|
||||||
@ -50,10 +51,11 @@ public class BizLogisticsQuoteController extends BaseController {
|
|||||||
* 根据目的地仓库和渠道查询物流报价列表
|
* 根据目的地仓库和渠道查询物流报价列表
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("amz:logisticsQuote:list")
|
@SaCheckPermission("amz:logisticsQuote:list")
|
||||||
@GetMapping("/query/{destination}/{channelId}")
|
@GetMapping("/query/{destination}/{channelId}/{date}")
|
||||||
public TableDataInfo<BizLogisticsQuoteVo> queryWithDesAndChannel(@PathVariable("destination") @NotNull(message = "目的地不能为空") String destination,
|
public TableDataInfo<BizLogisticsQuoteVo> queryWithDesAndChannel(@PathVariable("destination") @NotNull(message = "目的地不能为空") String destination,
|
||||||
@PathVariable("channelId") @NotNull(message = "渠道不能为空") String channelId) {
|
@PathVariable("channelId") @NotNull(message = "渠道不能为空") String channelId,
|
||||||
return bizLogisticsQuoteService.listWithDesAndChannel(destination, channelId);
|
@PathVariable("date") @NotNull(message = "日期不能为空") String date) {
|
||||||
|
return bizLogisticsQuoteService.listWithDesAndChannel(destination, channelId,date);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -93,6 +95,18 @@ public class BizLogisticsQuoteController extends BaseController {
|
|||||||
return toAjax(bizLogisticsQuoteService.insertByBo(bo));
|
return toAjax(bizLogisticsQuoteService.insertByBo(bo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增物流报价
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("amz:logisticsQuote:add")
|
||||||
|
@Log(title = "生成多日期的物流报价", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping("/most")
|
||||||
|
public R<Void> addMostQuote(@Validated(AddGroup.class) @RequestBody BizLogisticsQuoteMostBo bo) {
|
||||||
|
bizLogisticsQuoteService.insertMostQuoteByBo(bo);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改物流报价
|
* 修改物流报价
|
||||||
*/
|
*/
|
||||||
|
@ -8,6 +8,7 @@ import lombok.EqualsAndHashCode;
|
|||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
|
|
||||||
@ -91,5 +92,11 @@ public class BizInquiryRequest extends TenantEntity {
|
|||||||
*/
|
*/
|
||||||
private Date effectiveEndTime;
|
private Date effectiveEndTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报价目标日期
|
||||||
|
*/
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date quoteDate;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,88 @@
|
|||||||
|
package org.asinkj.amz.domain;
|
||||||
|
|
||||||
|
import org.asinkj.common.tenant.core.TenantEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流订单对象 biz_logistics_order
|
||||||
|
*
|
||||||
|
* @author shuo hu
|
||||||
|
* @date 2025-03-24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("biz_logistics_order")
|
||||||
|
public class BizLogisticsOrder extends TenantEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键(应用层生成的全局唯一ID,如雪花算法)
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FBA货件编号(亚马逊系统生成的唯一标识)
|
||||||
|
*/
|
||||||
|
private String fbaShipmentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单编号(应用层生成的唯一业务流水号)
|
||||||
|
*/
|
||||||
|
private String orderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流商ID(关联物流商信息表)
|
||||||
|
*/
|
||||||
|
private Long logisticsProviderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流商名称(冗余存储,避免高频联表查询)
|
||||||
|
*/
|
||||||
|
private String logisticsProviderName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流渠道(如空运/海运/快递等)
|
||||||
|
*/
|
||||||
|
private String channelName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地仓库名称或编码
|
||||||
|
*/
|
||||||
|
private String destination;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总箱子数量(此订单包含的箱子总数)
|
||||||
|
*/
|
||||||
|
private Long boxQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总货件数量(商品件数总和)
|
||||||
|
*/
|
||||||
|
private Long shipmentQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 亚马逊仓库实际上架日期
|
||||||
|
*/
|
||||||
|
private Date amazonShelfDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上架时效(单位:天,从发货到上架的总天数)
|
||||||
|
*/
|
||||||
|
private Long shelfTimeliness;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标记(0=正常,1=删除)
|
||||||
|
*/
|
||||||
|
@TableLogic
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,144 @@
|
|||||||
|
package org.asinkj.amz.domain;
|
||||||
|
|
||||||
|
import org.asinkj.common.tenant.core.TenantEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流订单明细(按箱子维度存储)对象 biz_logistics_order_detail
|
||||||
|
*
|
||||||
|
* @author shuo hu
|
||||||
|
* @date 2025-03-24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("biz_logistics_order_detail")
|
||||||
|
public class BizLogisticsOrderDetail extends TenantEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键(应用层生成的全局唯一ID)
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联主表ID(biz_logistics_order.id)
|
||||||
|
*/
|
||||||
|
private String orderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FBA货件编号(冗余存储,避免联表查询)
|
||||||
|
*/
|
||||||
|
private String fbaShipmentId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FBA箱号(亚马逊系统中箱子的唯一标识)
|
||||||
|
*/
|
||||||
|
private String fbaBoxNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流商ID(冗余存储)
|
||||||
|
*/
|
||||||
|
private Long logisticsProviderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流商名称(冗余存储)
|
||||||
|
*/
|
||||||
|
private String logisticsProviderName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流渠道(与主表一致)
|
||||||
|
*/
|
||||||
|
private String channelName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地仓库(冗余存储)
|
||||||
|
*/
|
||||||
|
private String destination;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划数量(该箱子预计装载的商品数量)
|
||||||
|
*/
|
||||||
|
private Long plannedQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际货件数量(该箱子实际装载的商品数量)
|
||||||
|
*/
|
||||||
|
private Long shipmentQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流追踪号(物流商提供的唯一包裹标识)
|
||||||
|
*/
|
||||||
|
private String trackingNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商称重(单位:KG,由供应商提供)
|
||||||
|
*/
|
||||||
|
private Long supplierWeight;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流商计重(单位:KG,物流商实际测量值)
|
||||||
|
*/
|
||||||
|
private Long logisticsWeight;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 称重差异(应用层计算:物流商计重 - 供应商称重)
|
||||||
|
*/
|
||||||
|
private Long weightDiff;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流单价(单位:元/KG,由合同或报价确定)
|
||||||
|
*/
|
||||||
|
private Long pricePerKg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流计价重量(应用层根据业务规则计算)
|
||||||
|
*/
|
||||||
|
private Long logisticsCalculationPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 其他物流费用(如报关费、保险费等)
|
||||||
|
*/
|
||||||
|
private Long otherFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 费用合计(应用层计算:物流计价 + 其他费用)
|
||||||
|
*/
|
||||||
|
private Long totalFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流状态(pending:待发运/in_transit:运输中/delivered:已签收)
|
||||||
|
*/
|
||||||
|
private String logisticsStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预计签收日期(物流商提供的预估日期)
|
||||||
|
*/
|
||||||
|
private Date estimatedDeliveryDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际签收日期(物流商回传的实际日期)
|
||||||
|
*/
|
||||||
|
private Date actualDeliveryDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运输时效(单位:天,实际签收日期 - 发货日期)
|
||||||
|
*/
|
||||||
|
private Long timeliness;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标记(0=正常,1=删除)
|
||||||
|
*/
|
||||||
|
@TableLogic
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -6,6 +6,7 @@ import lombok.Data;
|
|||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
|
|
||||||
@ -13,7 +14,7 @@ import java.io.Serial;
|
|||||||
* 物流报价对象 biz_logistics_quote
|
* 物流报价对象 biz_logistics_quote
|
||||||
*
|
*
|
||||||
* @author shuo hu
|
* @author shuo hu
|
||||||
* @date 2025-03-20
|
* @date 2025-03-22
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ -41,7 +42,7 @@ public class BizLogisticsQuote extends TenantEntity {
|
|||||||
/**
|
/**
|
||||||
* 渠道名称(冗余存储,保证查询效率)
|
* 渠道名称(冗余存储,保证查询效率)
|
||||||
*/
|
*/
|
||||||
private String transportChannel;
|
private String channelName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基础价格
|
* 基础价格
|
||||||
@ -61,6 +62,7 @@ public class BizLogisticsQuote extends TenantEntity {
|
|||||||
/**
|
/**
|
||||||
* 报价生效日期
|
* 报价生效日期
|
||||||
*/
|
*/
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date quoteDate;
|
private Date quoteDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -89,5 +91,15 @@ public class BizLogisticsQuote extends TenantEntity {
|
|||||||
*/
|
*/
|
||||||
private Long channelId;
|
private Long channelId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否双清包税(N不是 Y是)
|
||||||
|
*/
|
||||||
|
private String isDdp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位
|
||||||
|
*/
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ public class BizShipmentPlan extends TenantEntity {
|
|||||||
/**
|
/**
|
||||||
* 物流中心编码
|
* 物流中心编码
|
||||||
*/
|
*/
|
||||||
private String destinationFulfillmentCenterId;
|
private String destination;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 运输模式
|
* 运输模式
|
||||||
|
@ -93,4 +93,10 @@ public class BizInquiryRequestBo extends BaseEntity {
|
|||||||
private Date effectiveEndTime;
|
private Date effectiveEndTime;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报价目标日期
|
||||||
|
*/
|
||||||
|
private Date quoteDate;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,37 @@
|
|||||||
|
package org.asinkj.amz.domain.bo;
|
||||||
|
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.asinkj.amz.domain.BizLogisticsOrder;
|
||||||
|
import org.asinkj.common.core.validate.AddGroup;
|
||||||
|
import org.asinkj.common.core.validate.EditGroup;
|
||||||
|
import org.asinkj.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流订单业务对象 biz_logistics_order
|
||||||
|
*
|
||||||
|
* @author shuo hu
|
||||||
|
* @date 2025-03-24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = BizLogisticsOrder.class, reverseConvertGenerate = false)
|
||||||
|
public class BizLogisticsCreateOrderBo extends BaseEntity {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FBA货件编号(亚马逊系统生成的唯一标识)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "FBA货件编号(亚马逊系统生成的唯一标识)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String fbaShipmentId;
|
||||||
|
|
||||||
|
@NotBlank(message = "物流商报价唯一ID号 不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String logicQuoteId;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,88 @@
|
|||||||
|
package org.asinkj.amz.domain.bo;
|
||||||
|
|
||||||
|
import org.asinkj.amz.domain.BizLogisticsOrder;
|
||||||
|
import org.asinkj.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import org.asinkj.common.core.validate.AddGroup;
|
||||||
|
import org.asinkj.common.core.validate.EditGroup;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流订单业务对象 biz_logistics_order
|
||||||
|
*
|
||||||
|
* @author shuo hu
|
||||||
|
* @date 2025-03-24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = BizLogisticsOrder.class, reverseConvertGenerate = false)
|
||||||
|
public class BizLogisticsOrderBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键(应用层生成的全局唯一ID,如雪花算法)
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FBA货件编号(亚马逊系统生成的唯一标识)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "FBA货件编号(亚马逊系统生成的唯一标识)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String fbaShipmentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单编号(应用层生成的唯一业务流水号)
|
||||||
|
*/
|
||||||
|
private String orderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流商ID(关联物流商信息表)
|
||||||
|
*/
|
||||||
|
@NotNull(message = "物流商ID(关联物流商信息表)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long logisticsProviderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流商名称(冗余存储,避免高频联表查询)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "物流商名称(冗余存储,避免高频联表查询)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String logisticsProviderName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流渠道
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "物流渠道(如空运/海运/快递等)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String channelName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地仓库名称或编码
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "目的地仓库名称或编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String destination;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总箱子数量(此订单包含的箱子总数)
|
||||||
|
*/
|
||||||
|
@NotNull(message = "总箱子数量(此订单包含的箱子总数)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long boxQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总货件数量(商品件数总和)
|
||||||
|
*/
|
||||||
|
@NotNull(message = "总货件数量(商品件数总和)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long shipmentQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 亚马逊仓库实际上架日期
|
||||||
|
*/
|
||||||
|
private Date amazonShelfDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上架时效(单位:天,从发货到上架的总天数)
|
||||||
|
*/
|
||||||
|
private Long shelfTimeliness;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,160 @@
|
|||||||
|
package org.asinkj.amz.domain.bo;
|
||||||
|
|
||||||
|
import org.asinkj.amz.domain.BizLogisticsOrderDetail;
|
||||||
|
import org.asinkj.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import org.asinkj.common.core.validate.AddGroup;
|
||||||
|
import org.asinkj.common.core.validate.EditGroup;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流订单明细(按箱子维度存储)业务对象 biz_logistics_order_detail
|
||||||
|
*
|
||||||
|
* @author shuo hu
|
||||||
|
* @date 2025-03-24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = BizLogisticsOrderDetail.class, reverseConvertGenerate = false)
|
||||||
|
public class BizLogisticsOrderDetailBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键(应用层生成的全局唯一ID)
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键(应用层生成的全局唯一ID)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联主表ID(biz_logistics_order.id)
|
||||||
|
*/
|
||||||
|
@NotNull(message = "关联主表ID(biz_logistics_order.id)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String orderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FBA货件编号(冗余存储,避免联表查询)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "FBA货件编号(冗余存储,避免联表查询)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String fbaShipmentId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FBA箱号(亚马逊系统中箱子的唯一标识)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "FBA箱号(亚马逊系统中箱子的唯一标识)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String fbaBoxNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流商ID(冗余存储)
|
||||||
|
*/
|
||||||
|
@NotNull(message = "物流商ID(冗余存储)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long logisticsProviderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流商名称(冗余存储)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "物流商名称(冗余存储)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String logisticsProviderName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流渠道(与主表一致)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "物流渠道(与主表一致)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String channelName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地仓库(冗余存储)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "目的地仓库(冗余存储)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String destination;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划数量(该箱子预计装载的商品数量)
|
||||||
|
*/
|
||||||
|
@NotNull(message = "计划数量(该箱子预计装载的商品数量)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long plannedQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际货件数量(该箱子实际装载的商品数量)
|
||||||
|
*/
|
||||||
|
@NotNull(message = "实际货件数量(该箱子实际装载的商品数量)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long shipmentQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流追踪号(物流商提供的唯一包裹标识)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "物流追踪号(物流商提供的唯一包裹标识)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String trackingNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商称重(单位:KG,由供应商提供)
|
||||||
|
*/
|
||||||
|
@NotNull(message = "供应商称重(单位:KG,由供应商提供)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long supplierWeight;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流商计重(单位:KG,物流商实际测量值)
|
||||||
|
*/
|
||||||
|
@NotNull(message = "物流商计重(单位:KG,物流商实际测量值)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long logisticsWeight;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 称重差异(应用层计算:物流商计重 - 供应商称重)
|
||||||
|
*/
|
||||||
|
@NotNull(message = "称重差异(应用层计算:物流商计重 - 供应商称重)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long weightDiff;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流单价(单位:元/KG,由合同或报价确定)
|
||||||
|
*/
|
||||||
|
@NotNull(message = "物流单价(单位:元/KG,由合同或报价确定)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long pricePerKg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流计价重量(应用层根据业务规则计算)
|
||||||
|
*/
|
||||||
|
@NotNull(message = "物流计价重量(应用层根据业务规则计算)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long logisticsCalculationPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 其他物流费用(如报关费、保险费等)
|
||||||
|
*/
|
||||||
|
@NotNull(message = "其他物流费用(如报关费、保险费等)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long otherFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 费用合计(应用层计算:物流计价 + 其他费用)
|
||||||
|
*/
|
||||||
|
@NotNull(message = "费用合计(应用层计算:物流计价 + 其他费用)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long totalFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流状态(pending:待发运/in_transit:运输中/delivered:已签收)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "物流状态(pending:待发运/in_transit:运输中/delivered:已签收)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String logisticsStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预计签收日期(物流商提供的预估日期)
|
||||||
|
*/
|
||||||
|
@NotNull(message = "预计签收日期(物流商提供的预估日期)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Date estimatedDeliveryDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际签收日期(物流商回传的实际日期)
|
||||||
|
*/
|
||||||
|
@NotNull(message = "实际签收日期(物流商回传的实际日期)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Date actualDeliveryDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运输时效(单位:天,实际签收日期 - 发货日期)
|
||||||
|
*/
|
||||||
|
@NotNull(message = "运输时效(单位:天,实际签收日期 - 发货日期)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long timeliness;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -8,6 +8,8 @@ import io.github.linpeilie.annotations.AutoMapper;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import jakarta.validation.constraints.*;
|
import jakarta.validation.constraints.*;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
@ -15,13 +17,15 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
|||||||
* 物流报价业务对象 biz_logistics_quote
|
* 物流报价业务对象 biz_logistics_quote
|
||||||
*
|
*
|
||||||
* @author shuo hu
|
* @author shuo hu
|
||||||
* @date 2025-03-20
|
* @date 2025-03-22
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@AutoMapper(target = BizLogisticsQuote.class, reverseConvertGenerate = false)
|
@AutoMapper(target = BizLogisticsQuote.class, reverseConvertGenerate = false)
|
||||||
public class BizLogisticsQuoteBo extends BaseEntity {
|
public class BizLogisticsQuoteBo extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -8065228533338642055L;
|
||||||
/**
|
/**
|
||||||
* 主键ID
|
* 主键ID
|
||||||
*/
|
*/
|
||||||
@ -44,7 +48,7 @@ public class BizLogisticsQuoteBo extends BaseEntity {
|
|||||||
* 渠道名称(冗余存储,保证查询效率)
|
* 渠道名称(冗余存储,保证查询效率)
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "渠道名称(冗余存储,保证查询效率)不能为空", groups = { AddGroup.class, EditGroup.class })
|
@NotBlank(message = "渠道名称(冗余存储,保证查询效率)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
private String transportChannel;
|
private String channelName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基础价格
|
* 基础价格
|
||||||
@ -94,5 +98,17 @@ public class BizLogisticsQuoteBo extends BaseEntity {
|
|||||||
@NotNull(message = "渠道ID(system=dict_code,custom=自定义渠道ID)不能为空", groups = { AddGroup.class, EditGroup.class })
|
@NotNull(message = "渠道ID(system=dict_code,custom=自定义渠道ID)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
private Long channelId;
|
private Long channelId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否双清包税(N不是 Y是)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "是否双清包税(N不是 Y是)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String isDdp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "单位不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,122 @@
|
|||||||
|
package org.asinkj.amz.domain.bo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.asinkj.amz.domain.BizLogisticsQuote;
|
||||||
|
import org.asinkj.common.core.validate.AddGroup;
|
||||||
|
import org.asinkj.common.core.validate.EditGroup;
|
||||||
|
import org.asinkj.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流报价业务对象 biz_logistics_quote
|
||||||
|
*
|
||||||
|
* @author shuo hu
|
||||||
|
* @date 2025-03-22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = BizLogisticsQuote.class, reverseConvertGenerate = false)
|
||||||
|
public class BizLogisticsQuoteMostBo extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -8065228533338642055L;
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
// @NotNull(message = "主键ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流商用户ID(关联sys_user表)
|
||||||
|
*/
|
||||||
|
// @NotNull(message = "物流商用户ID(关联sys_user表)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地(建议使用ISO国家代码如CN/US/GB)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "目的地(建议使用ISO国家代码如CN/US/GB)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String destination;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 渠道名称(冗余存储,保证查询效率)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "渠道名称(冗余存储,保证查询效率)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String channelName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 基础价格
|
||||||
|
*/
|
||||||
|
@NotNull(message = "基础价格不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时效(单位:天)
|
||||||
|
*/
|
||||||
|
@NotNull(message = "时效(单位:天)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long leadTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附加费
|
||||||
|
*/
|
||||||
|
@NotNull(message = "附加费不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long surcharge;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报价生效起始日期
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX", timezone = "UTC")
|
||||||
|
private Date quoteStartDate;
|
||||||
|
/**
|
||||||
|
* 报价生效结束日期
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX", timezone = "UTC")
|
||||||
|
private Date quoteEndDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交状态(Y已提交 N未提交)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "提交状态(Y已提交 N未提交)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String isSubmitted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报价备注
|
||||||
|
*/
|
||||||
|
// @NotBlank(message = "报价备注不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 渠道类型(system=系统/custom=自定义)
|
||||||
|
*/
|
||||||
|
// @NotBlank(message = "渠道类型(system=系统/custom=自定义)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String channelType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 渠道ID(system=dict_code,custom=自定义渠道ID)
|
||||||
|
*/
|
||||||
|
@NotNull(message = "渠道ID(system=dict_code,custom=自定义渠道ID)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long channelId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否双清包税(N不是 Y是)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "是否双清包税(N不是 Y是)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String isDdp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "单位不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -63,7 +63,7 @@ public class BizShipmentPlanBo extends BaseEntity {
|
|||||||
* 物流中心编码
|
* 物流中心编码
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "物流中心编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
@NotBlank(message = "物流中心编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
private String destinationFulfillmentCenterId;
|
private String destination;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 运输模式
|
* 运输模式
|
||||||
|
@ -111,5 +111,10 @@ public class BizInquiryRequestVo implements Serializable {
|
|||||||
@ExcelProperty(value = "报价有效的结束日期")
|
@ExcelProperty(value = "报价有效的结束日期")
|
||||||
private Date effectiveEndTime;
|
private Date effectiveEndTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报价目标日期
|
||||||
|
*/
|
||||||
|
private Date quoteDate;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,190 @@
|
|||||||
|
package org.asinkj.amz.domain.vo;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.asinkj.amz.domain.BizLogisticsOrderDetail;
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import org.asinkj.common.excel.annotation.ExcelDictFormat;
|
||||||
|
import org.asinkj.common.excel.convert.ExcelDictConvert;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流订单明细(按箱子维度存储)视图对象 biz_logistics_order_detail
|
||||||
|
*
|
||||||
|
* @author shuo hu
|
||||||
|
* @date 2025-03-24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = BizLogisticsOrderDetail.class)
|
||||||
|
public class BizLogisticsOrderDetailVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键(应用层生成的全局唯一ID)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "主键", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "应=用层生成的全局唯一ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联主表ID(biz_logistics_order.id)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "关联主表ID", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "b=iz_logistics_order.id")
|
||||||
|
private String orderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FBA货件编号(冗余存储,避免联表查询)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "FBA货件编号", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "冗=余存储,避免联表查询")
|
||||||
|
private String fbaShipmentId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FBA箱号(亚马逊系统中箱子的唯一标识)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "FBA箱号", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "亚=马逊系统中箱子的唯一标识")
|
||||||
|
private String fbaBoxNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流商ID(冗余存储)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "物流商ID", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "冗=余存储")
|
||||||
|
private Long logisticsProviderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流商名称(冗余存储)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "物流商名称", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "冗=余存储")
|
||||||
|
private String logisticsProviderName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流渠道(与主表一致)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "物流渠道", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "与=主表一致")
|
||||||
|
private String logisticsChannel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地仓库(冗余存储)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "目的地仓库", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "冗=余存储")
|
||||||
|
private String destination;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划数量(该箱子预计装载的商品数量)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "计划数量", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "该=箱子预计装载的商品数量")
|
||||||
|
private Long plannedQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际货件数量(该箱子实际装载的商品数量)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "实际货件数量", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "该=箱子实际装载的商品数量")
|
||||||
|
private Long shipmentQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流追踪号(物流商提供的唯一包裹标识)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "物流追踪号", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "物=流商提供的唯一包裹标识")
|
||||||
|
private String trackingNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商称重(单位:KG,由供应商提供)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "供应商称重", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "单=位:KG,由供应商提供")
|
||||||
|
private Long supplierWeight;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流商计重(单位:KG,物流商实际测量值)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "物流商计重", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "单=位:KG,物流商实际测量值")
|
||||||
|
private Long logisticsWeight;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 称重差异(应用层计算:物流商计重 - 供应商称重)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "称重差异", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "应=用层计算:物流商计重,-=,供=应商称重")
|
||||||
|
private Long weightDiff;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流单价(单位:元/KG,由合同或报价确定)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "物流单价", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "单=位:元/KG,由合同或报价确定")
|
||||||
|
private Long pricePerKg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流计价重量(应用层根据业务规则计算)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "物流计价重量", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "应=用层根据业务规则计算")
|
||||||
|
private Long logisticsCalculationPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 其他物流费用(如报关费、保险费等)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "其他物流费用", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "如=报关费、保险费等")
|
||||||
|
private Long otherFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 费用合计(应用层计算:物流计价 + 其他费用)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "费用合计", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "应=用层计算:物流计价,+=,其=他费用")
|
||||||
|
private Long totalFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流状态(pending:待发运/in_transit:运输中/delivered:已签收)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "物流状态", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "p=ending:待发运/in_transit:运输中/delivered:已签收")
|
||||||
|
private String logisticsStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预计签收日期(物流商提供的预估日期)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "预计签收日期", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "物=流商提供的预估日期")
|
||||||
|
private Date estimatedDeliveryDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际签收日期(物流商回传的实际日期)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "实际签收日期", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "物=流商回传的实际日期")
|
||||||
|
private Date actualDeliveryDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运输时效(单位:天,实际签收日期 - 发货日期)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "运输时效", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "单=位:天,实际签收日期,-=,发=货日期")
|
||||||
|
private Long timeliness;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,109 @@
|
|||||||
|
package org.asinkj.amz.domain.vo;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.asinkj.amz.domain.BizLogisticsOrder;
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import org.asinkj.common.excel.annotation.ExcelDictFormat;
|
||||||
|
import org.asinkj.common.excel.convert.ExcelDictConvert;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流订单视图对象 biz_logistics_order
|
||||||
|
*
|
||||||
|
* @author shuo hu
|
||||||
|
* @date 2025-03-24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = BizLogisticsOrder.class)
|
||||||
|
public class BizLogisticsOrderVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键(应用层生成的全局唯一ID,如雪花算法)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "主键", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "应=用层生成的全局唯一ID,如雪花算法")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FBA货件编号(亚马逊系统生成的唯一标识)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "FBA货件编号", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "亚=马逊系统生成的唯一标识")
|
||||||
|
private String fbaShipmentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单编号(应用层生成的唯一业务流水号)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "订单编号", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "应=用层生成的唯一业务流水号")
|
||||||
|
private String orderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流商ID(关联物流商信息表)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "物流商ID", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "关=联物流商信息表")
|
||||||
|
private Long logisticsProviderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流商名称(冗余存储,避免高频联表查询)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "物流商名称", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "冗=余存储,避免高频联表查询")
|
||||||
|
private String logisticsProviderName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流渠道(如空运/海运/快递等)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "物流渠道", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "如=空运/海运/快递等")
|
||||||
|
private String logisticsChannel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目的地仓库名称或编码
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "目的地仓库名称或编码")
|
||||||
|
private String destination;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总箱子数量(此订单包含的箱子总数)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "总箱子数量", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "此=订单包含的箱子总数")
|
||||||
|
private Long boxQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总货件数量(商品件数总和)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "总货件数量", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "商=品件数总和")
|
||||||
|
private Long shipmentQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 亚马逊仓库实际上架日期
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "亚马逊仓库实际上架日期")
|
||||||
|
private Date amazonShelfDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上架时效(单位:天,从发货到上架的总天数)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "上架时效", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "单=位:天,从发货到上架的总天数")
|
||||||
|
private Long shelfTimeliness;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -20,7 +20,7 @@ import java.util.Date;
|
|||||||
* 物流报价视图对象 biz_logistics_quote
|
* 物流报价视图对象 biz_logistics_quote
|
||||||
*
|
*
|
||||||
* @author shuo hu
|
* @author shuo hu
|
||||||
* @date 2025-03-20
|
* @date 2025-03-22
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@ExcelIgnoreUnannotated
|
@ExcelIgnoreUnannotated
|
||||||
@ -55,7 +55,7 @@ public class BizLogisticsQuoteVo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "渠道名称", converter = ExcelDictConvert.class)
|
@ExcelProperty(value = "渠道名称", converter = ExcelDictConvert.class)
|
||||||
@ExcelDictFormat(readConverterExp = "冗=余存储,保证查询效率")
|
@ExcelDictFormat(readConverterExp = "冗=余存储,保证查询效率")
|
||||||
private String transportChannel;
|
private String channelName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基础价格
|
* 基础价格
|
||||||
@ -109,5 +109,18 @@ public class BizLogisticsQuoteVo implements Serializable {
|
|||||||
@ExcelDictFormat(readConverterExp = "s=ystem=dict_code,custom=自定义渠道ID")
|
@ExcelDictFormat(readConverterExp = "s=ystem=dict_code,custom=自定义渠道ID")
|
||||||
private Long channelId;
|
private Long channelId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否双清包税(N不是 Y是)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "是否双清包税", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "N=不是,Y=是")
|
||||||
|
private String isDdp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "单位")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ public class BizShipmentPlanVo implements Serializable {
|
|||||||
* 物流中心编码
|
* 物流中心编码
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "物流中心编码")
|
@ExcelProperty(value = "物流中心编码")
|
||||||
private String destinationFulfillmentCenterId;
|
private String destination;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 运输模式
|
* 运输模式
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
package org.asinkj.amz.mapper;
|
||||||
|
|
||||||
|
import org.asinkj.amz.domain.BizLogisticsOrderDetail;
|
||||||
|
import org.asinkj.amz.domain.vo.BizLogisticsOrderDetailVo;
|
||||||
|
import org.asinkj.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流订单明细(按箱子维度存储)Mapper接口
|
||||||
|
*
|
||||||
|
* @author shuo hu
|
||||||
|
* @date 2025-03-24
|
||||||
|
*/
|
||||||
|
public interface BizLogisticsOrderDetailMapper extends BaseMapperPlus<BizLogisticsOrderDetail, BizLogisticsOrderDetailVo> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package org.asinkj.amz.mapper;
|
||||||
|
|
||||||
|
import org.asinkj.amz.domain.BizLogisticsOrder;
|
||||||
|
import org.asinkj.amz.domain.vo.BizLogisticsOrderVo;
|
||||||
|
import org.asinkj.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流订单Mapper接口
|
||||||
|
*
|
||||||
|
* @author shuo hu
|
||||||
|
* @date 2025-03-24
|
||||||
|
*/
|
||||||
|
public interface BizLogisticsOrderMapper extends BaseMapperPlus<BizLogisticsOrder, BizLogisticsOrderVo> {
|
||||||
|
|
||||||
|
}
|
@ -69,5 +69,7 @@ public interface IBizInquiryRequestService {
|
|||||||
*/
|
*/
|
||||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
|
||||||
R<Void> createWithDesAndChannel(@NotNull(message = "目的地不能为空") String destination, @NotNull(message = "渠道不能为空") String channelId);
|
R<Void> createWithDesAndChannel(@NotNull(message = "目的地不能为空") String destination, @NotNull(message = "渠道不能为空") String channelId, @NotNull(message = "日期不能为空") String date);
|
||||||
|
|
||||||
|
TableDataInfo<BizInquiryRequestVo> queryWithDesAndChannel(@NotNull(message = "目的地不能为空") String destination, @NotNull(message = "渠道不能为空") String channelId, @NotNull(message = "日期不能为空") String date);
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,69 @@
|
|||||||
|
package org.asinkj.amz.service;
|
||||||
|
|
||||||
|
import org.asinkj.amz.domain.BizLogisticsOrderDetail;
|
||||||
|
import org.asinkj.amz.domain.vo.BizLogisticsOrderDetailVo;
|
||||||
|
import org.asinkj.amz.domain.bo.BizLogisticsOrderDetailBo;
|
||||||
|
import org.asinkj.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.asinkj.common.mybatis.core.page.PageQuery;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流订单明细(按箱子维度存储)Service接口
|
||||||
|
*
|
||||||
|
* @author shuo hu
|
||||||
|
* @date 2025-03-24
|
||||||
|
*/
|
||||||
|
public interface IBizLogisticsOrderDetailService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物流订单明细(按箱子维度存储)
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 物流订单明细(按箱子维度存储)
|
||||||
|
*/
|
||||||
|
BizLogisticsOrderDetailVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询物流订单明细(按箱子维度存储)列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 物流订单明细(按箱子维度存储)分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<BizLogisticsOrderDetailVo> queryPageList(BizLogisticsOrderDetailBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的物流订单明细(按箱子维度存储)列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 物流订单明细(按箱子维度存储)列表
|
||||||
|
*/
|
||||||
|
List<BizLogisticsOrderDetailVo> queryList(BizLogisticsOrderDetailBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增物流订单明细(按箱子维度存储)
|
||||||
|
*
|
||||||
|
* @param bo 物流订单明细(按箱子维度存储)
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(BizLogisticsOrderDetailBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改物流订单明细(按箱子维度存储)
|
||||||
|
*
|
||||||
|
* @param bo 物流订单明细(按箱子维度存储)
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(BizLogisticsOrderDetailBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除物流订单明细(按箱子维度存储)信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
@ -0,0 +1,72 @@
|
|||||||
|
package org.asinkj.amz.service;
|
||||||
|
|
||||||
|
import org.asinkj.amz.domain.BizLogisticsOrder;
|
||||||
|
import org.asinkj.amz.domain.bo.BizLogisticsCreateOrderBo;
|
||||||
|
import org.asinkj.amz.domain.vo.BizLogisticsOrderVo;
|
||||||
|
import org.asinkj.amz.domain.bo.BizLogisticsOrderBo;
|
||||||
|
import org.asinkj.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.asinkj.common.mybatis.core.page.PageQuery;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流订单Service接口
|
||||||
|
*
|
||||||
|
* @author shuo hu
|
||||||
|
* @date 2025-03-24
|
||||||
|
*/
|
||||||
|
public interface IBizLogisticsOrderService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物流订单
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 物流订单
|
||||||
|
*/
|
||||||
|
BizLogisticsOrderVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询物流订单列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 物流订单分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<BizLogisticsOrderVo> queryPageList(BizLogisticsOrderBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的物流订单列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 物流订单列表
|
||||||
|
*/
|
||||||
|
List<BizLogisticsOrderVo> queryList(BizLogisticsOrderBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增物流订单
|
||||||
|
*
|
||||||
|
* @param bo 物流订单
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(BizLogisticsOrderBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改物流订单
|
||||||
|
*
|
||||||
|
* @param bo 物流订单
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(BizLogisticsOrderBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除物流订单信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
|
||||||
|
void createByBo(BizLogisticsCreateOrderBo bo);
|
||||||
|
}
|
@ -1,10 +1,9 @@
|
|||||||
package org.asinkj.amz.service;
|
package org.asinkj.amz.service;
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import org.asinkj.amz.domain.BizLogisticsQuote;
|
import org.asinkj.amz.domain.bo.BizLogisticsQuoteMostBo;
|
||||||
import org.asinkj.amz.domain.vo.BizLogisticsQuoteVo;
|
import org.asinkj.amz.domain.vo.BizLogisticsQuoteVo;
|
||||||
import org.asinkj.amz.domain.bo.BizLogisticsQuoteBo;
|
import org.asinkj.amz.domain.bo.BizLogisticsQuoteBo;
|
||||||
import org.asinkj.common.core.domain.R;
|
|
||||||
import org.asinkj.common.mybatis.core.page.TableDataInfo;
|
import org.asinkj.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.asinkj.common.mybatis.core.page.PageQuery;
|
import org.asinkj.common.mybatis.core.page.PageQuery;
|
||||||
|
|
||||||
@ -72,6 +71,7 @@ public interface IBizLogisticsQuoteService {
|
|||||||
|
|
||||||
List<BizLogisticsQuoteVo> queryQuoteWithDestination(String destination, String channel);
|
List<BizLogisticsQuoteVo> queryQuoteWithDestination(String destination, String channel);
|
||||||
|
|
||||||
TableDataInfo<BizLogisticsQuoteVo> listWithDesAndChannel(@NotNull(message = "目的地不能为空") String destination, @NotNull(message = "渠道不能为空") String channel);
|
TableDataInfo<BizLogisticsQuoteVo> listWithDesAndChannel(@NotNull(message = "目的地不能为空") String destination, @NotNull(message = "渠道不能为空") String channel, @NotNull(message = "日期不能为空") String date);
|
||||||
|
|
||||||
|
void insertMostQuoteByBo(BizLogisticsQuoteMostBo bo);
|
||||||
}
|
}
|
||||||
|
@ -66,4 +66,7 @@ public interface IBizShipmentItemService {
|
|||||||
* @return 是否删除成功
|
* @return 是否删除成功
|
||||||
*/
|
*/
|
||||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
|
||||||
|
|
||||||
|
List<BizShipmentItem> queryByPlanId(String shipmentId);
|
||||||
}
|
}
|
||||||
|
@ -70,4 +70,6 @@ public interface IBizShipmentPlanService {
|
|||||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
|
||||||
List<BizLogisticsQuoteVo> getQuote(@NotNull(message = "主键不能为空") String destination, String channel);
|
List<BizLogisticsQuoteVo> getQuote(@NotNull(message = "主键不能为空") String destination, String channel);
|
||||||
|
|
||||||
|
BizShipmentPlanVo queryByfbaShipmentId(String fbaShipmentId);
|
||||||
}
|
}
|
||||||
|
@ -66,4 +66,6 @@ public interface IBizShipmentTrackingService {
|
|||||||
* @return 是否删除成功
|
* @return 是否删除成功
|
||||||
*/
|
*/
|
||||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
|
||||||
|
List<BizShipmentTracking> queryByPlanId(String shipmentId);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package org.asinkj.amz.service.impl;
|
package org.asinkj.amz.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateTime;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.NumberUtil;
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.asinkj.amz.domain.vo.BizLogisticsChannelVo;
|
import org.asinkj.amz.domain.vo.BizLogisticsChannelVo;
|
||||||
@ -14,6 +16,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.asinkj.common.satoken.utils.LoginHelper;
|
import org.asinkj.common.satoken.utils.LoginHelper;
|
||||||
|
import org.asinkj.utils.SerialNoGenerator;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.asinkj.amz.domain.bo.BizInquiryRequestBo;
|
import org.asinkj.amz.domain.bo.BizInquiryRequestBo;
|
||||||
import org.asinkj.amz.domain.vo.BizInquiryRequestVo;
|
import org.asinkj.amz.domain.vo.BizInquiryRequestVo;
|
||||||
@ -157,7 +160,7 @@ public class BizInquiryRequestServiceImpl implements IBizInquiryRequestService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R<Void> createWithDesAndChannel(String destination, String channelId) {
|
public R<Void> createWithDesAndChannel(String destination, String channelId,String date) {
|
||||||
BizInquiryRequest bizInquiryRequest = new BizInquiryRequest();
|
BizInquiryRequest bizInquiryRequest = new BizInquiryRequest();
|
||||||
bizInquiryRequest.setDestination(destination);
|
bizInquiryRequest.setDestination(destination);
|
||||||
bizInquiryRequest.setChannelId(NumberUtil.parseLong(channelId));
|
bizInquiryRequest.setChannelId(NumberUtil.parseLong(channelId));
|
||||||
@ -168,7 +171,7 @@ public class BizInquiryRequestServiceImpl implements IBizInquiryRequestService {
|
|||||||
return R.fail("目的地不能为空");
|
return R.fail("目的地不能为空");
|
||||||
}
|
}
|
||||||
//询价单号(规则:INQ+年月+6位序列)
|
//询价单号(规则:INQ+年月+6位序列)
|
||||||
bizInquiryRequest.setInquiryNo(generateInquiryNo());
|
bizInquiryRequest.setInquiryNo(SerialNoGenerator.generateInquiryNo());
|
||||||
//查询出渠道信息
|
//查询出渠道信息
|
||||||
|
|
||||||
BizLogisticsChannelVo bizLogisticsChannelVo = bizLogisticsChannelService.queryById(bizInquiryRequest.getChannelId());
|
BizLogisticsChannelVo bizLogisticsChannelVo = bizLogisticsChannelService.queryById(bizInquiryRequest.getChannelId());
|
||||||
@ -194,12 +197,26 @@ public class BizInquiryRequestServiceImpl implements IBizInquiryRequestService {
|
|||||||
bizInquiryRequest.setDeadline(LocalDate.now()
|
bizInquiryRequest.setDeadline(LocalDate.now()
|
||||||
.atTime(11, 0));
|
.atTime(11, 0));
|
||||||
bizInquiryRequest.setRequesterId(LoginHelper.getUserId());
|
bizInquiryRequest.setRequesterId(LoginHelper.getUserId());
|
||||||
|
DateTime dateTime = DateUtil.parseDate(date);
|
||||||
|
bizInquiryRequest.setQuoteDate(dateTime);
|
||||||
|
|
||||||
billingRequestMapper.insert(bizInquiryRequest);
|
billingRequestMapper.insert(bizInquiryRequest);
|
||||||
|
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<BizInquiryRequestVo> queryWithDesAndChannel(String destination, String channelId, String date) {
|
||||||
|
LambdaQueryWrapper<BizInquiryRequest> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(BizInquiryRequest::getDestination, destination);
|
||||||
|
queryWrapper.eq(BizInquiryRequest::getChannelId, NumberUtil.parseLong(channelId));
|
||||||
|
queryWrapper.eq(BizInquiryRequest::getQuoteDate, date);
|
||||||
|
|
||||||
|
List<BizInquiryRequestVo> bizInquiryRequestVos = baseMapper.selectVoList(queryWrapper);
|
||||||
|
return TableDataInfo.build(bizInquiryRequestVos);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private String generateInquiryNo() {
|
private String generateInquiryNo() {
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMM");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMM");
|
||||||
String datePart = sdf.format(new Date());
|
String datePart = sdf.format(new Date());
|
||||||
|
@ -0,0 +1,150 @@
|
|||||||
|
package org.asinkj.amz.service.impl;
|
||||||
|
|
||||||
|
import org.asinkj.common.core.utils.MapstructUtils;
|
||||||
|
import org.asinkj.common.core.utils.StringUtils;
|
||||||
|
import org.asinkj.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.asinkj.common.mybatis.core.page.PageQuery;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.asinkj.amz.domain.bo.BizLogisticsOrderDetailBo;
|
||||||
|
import org.asinkj.amz.domain.vo.BizLogisticsOrderDetailVo;
|
||||||
|
import org.asinkj.amz.domain.BizLogisticsOrderDetail;
|
||||||
|
import org.asinkj.amz.mapper.BizLogisticsOrderDetailMapper;
|
||||||
|
import org.asinkj.amz.service.IBizLogisticsOrderDetailService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流订单明细(按箱子维度存储)Service业务层处理
|
||||||
|
*
|
||||||
|
* @author shuo hu
|
||||||
|
* @date 2025-03-24
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class BizLogisticsOrderDetailServiceImpl implements IBizLogisticsOrderDetailService {
|
||||||
|
|
||||||
|
private final BizLogisticsOrderDetailMapper baseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物流订单明细(按箱子维度存储)
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 物流订单明细(按箱子维度存储)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BizLogisticsOrderDetailVo queryById(Long id){
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询物流订单明细(按箱子维度存储)列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 物流订单明细(按箱子维度存储)分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<BizLogisticsOrderDetailVo> queryPageList(BizLogisticsOrderDetailBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<BizLogisticsOrderDetail> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<BizLogisticsOrderDetailVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的物流订单明细(按箱子维度存储)列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 物流订单明细(按箱子维度存储)列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BizLogisticsOrderDetailVo> queryList(BizLogisticsOrderDetailBo bo) {
|
||||||
|
LambdaQueryWrapper<BizLogisticsOrderDetail> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<BizLogisticsOrderDetail> buildQueryWrapper(BizLogisticsOrderDetailBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<BizLogisticsOrderDetail> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.eq(bo.getOrderId() != null, BizLogisticsOrderDetail::getOrderId, bo.getOrderId());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getFbaShipmentId()), BizLogisticsOrderDetail::getFbaShipmentId, bo.getFbaShipmentId());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getOrderId()), BizLogisticsOrderDetail::getOrderId, bo.getOrderId());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getFbaBoxNumber()), BizLogisticsOrderDetail::getFbaBoxNumber, bo.getFbaBoxNumber());
|
||||||
|
lqw.eq(bo.getLogisticsProviderId() != null, BizLogisticsOrderDetail::getLogisticsProviderId, bo.getLogisticsProviderId());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getLogisticsProviderName()), BizLogisticsOrderDetail::getLogisticsProviderName, bo.getLogisticsProviderName());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getChannelName()), BizLogisticsOrderDetail::getChannelName, bo.getChannelName());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getDestination()), BizLogisticsOrderDetail::getDestination, bo.getDestination());
|
||||||
|
lqw.eq(bo.getPlannedQuantity() != null, BizLogisticsOrderDetail::getPlannedQuantity, bo.getPlannedQuantity());
|
||||||
|
lqw.eq(bo.getShipmentQuantity() != null, BizLogisticsOrderDetail::getShipmentQuantity, bo.getShipmentQuantity());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getTrackingNumber()), BizLogisticsOrderDetail::getTrackingNumber, bo.getTrackingNumber());
|
||||||
|
lqw.eq(bo.getSupplierWeight() != null, BizLogisticsOrderDetail::getSupplierWeight, bo.getSupplierWeight());
|
||||||
|
lqw.eq(bo.getLogisticsWeight() != null, BizLogisticsOrderDetail::getLogisticsWeight, bo.getLogisticsWeight());
|
||||||
|
lqw.eq(bo.getWeightDiff() != null, BizLogisticsOrderDetail::getWeightDiff, bo.getWeightDiff());
|
||||||
|
lqw.eq(bo.getPricePerKg() != null, BizLogisticsOrderDetail::getPricePerKg, bo.getPricePerKg());
|
||||||
|
lqw.eq(bo.getLogisticsCalculationPrice() != null, BizLogisticsOrderDetail::getLogisticsCalculationPrice, bo.getLogisticsCalculationPrice());
|
||||||
|
lqw.eq(bo.getOtherFee() != null, BizLogisticsOrderDetail::getOtherFee, bo.getOtherFee());
|
||||||
|
lqw.eq(bo.getTotalFee() != null, BizLogisticsOrderDetail::getTotalFee, bo.getTotalFee());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getLogisticsStatus()), BizLogisticsOrderDetail::getLogisticsStatus, bo.getLogisticsStatus());
|
||||||
|
lqw.eq(bo.getEstimatedDeliveryDate() != null, BizLogisticsOrderDetail::getEstimatedDeliveryDate, bo.getEstimatedDeliveryDate());
|
||||||
|
lqw.eq(bo.getActualDeliveryDate() != null, BizLogisticsOrderDetail::getActualDeliveryDate, bo.getActualDeliveryDate());
|
||||||
|
lqw.eq(bo.getTimeliness() != null, BizLogisticsOrderDetail::getTimeliness, bo.getTimeliness());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增物流订单明细(按箱子维度存储)
|
||||||
|
*
|
||||||
|
* @param bo 物流订单明细(按箱子维度存储)
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(BizLogisticsOrderDetailBo bo) {
|
||||||
|
BizLogisticsOrderDetail add = MapstructUtils.convert(bo, BizLogisticsOrderDetail.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setId(add.getId());
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改物流订单明细(按箱子维度存储)
|
||||||
|
*
|
||||||
|
* @param bo 物流订单明细(按箱子维度存储)
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(BizLogisticsOrderDetailBo bo) {
|
||||||
|
BizLogisticsOrderDetail update = MapstructUtils.convert(bo, BizLogisticsOrderDetail.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
return baseMapper.updateById(update) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(BizLogisticsOrderDetail entity){
|
||||||
|
//TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除物流订单明细(按箱子维度存储)信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if(isValid){
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,233 @@
|
|||||||
|
package org.asinkj.amz.service.impl;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.asinkj.amz.domain.*;
|
||||||
|
import org.asinkj.amz.domain.bo.BizLogisticsCreateOrderBo;
|
||||||
|
import org.asinkj.amz.domain.vo.BizLogisticsQuoteVo;
|
||||||
|
import org.asinkj.amz.domain.vo.BizShipmentPlanVo;
|
||||||
|
import org.asinkj.amz.mapper.BizLogisticsOrderDetailMapper;
|
||||||
|
import org.asinkj.amz.service.*;
|
||||||
|
import org.asinkj.common.core.exception.ServiceException;
|
||||||
|
import org.asinkj.common.core.utils.MapstructUtils;
|
||||||
|
import org.asinkj.common.core.utils.StringUtils;
|
||||||
|
import org.asinkj.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.asinkj.common.mybatis.core.page.PageQuery;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.asinkj.common.satoken.utils.LoginHelper;
|
||||||
|
import org.asinkj.utils.SerialNoGenerator;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.asinkj.amz.domain.bo.BizLogisticsOrderBo;
|
||||||
|
import org.asinkj.amz.domain.vo.BizLogisticsOrderVo;
|
||||||
|
import org.asinkj.amz.mapper.BizLogisticsOrderMapper;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流订单Service业务层处理
|
||||||
|
*
|
||||||
|
* @author shuo hu
|
||||||
|
* @date 2025-03-24
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class BizLogisticsOrderServiceImpl implements IBizLogisticsOrderService {
|
||||||
|
|
||||||
|
private final BizLogisticsOrderMapper baseMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IBizLogisticsQuoteService bizLogisticsQuoteService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IBizShipmentPlanService bizShipmentPlanService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IBizShipmentTrackingService bizShipmentTrackingService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IBizShipmentItemService bizShipmentItemService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BizLogisticsOrderDetailMapper bizLogisticsOrderDetailMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BizLogisticsOrderMapper bizOrderMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物流订单
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 物流订单
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BizLogisticsOrderVo queryById(Long id){
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询物流订单列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 物流订单分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<BizLogisticsOrderVo> queryPageList(BizLogisticsOrderBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<BizLogisticsOrder> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<BizLogisticsOrderVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的物流订单列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 物流订单列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BizLogisticsOrderVo> queryList(BizLogisticsOrderBo bo) {
|
||||||
|
LambdaQueryWrapper<BizLogisticsOrder> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<BizLogisticsOrder> buildQueryWrapper(BizLogisticsOrderBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<BizLogisticsOrder> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getFbaShipmentId()), BizLogisticsOrder::getFbaShipmentId, bo.getFbaShipmentId());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getOrderId()), BizLogisticsOrder::getOrderId, bo.getOrderId());
|
||||||
|
lqw.eq(bo.getLogisticsProviderId() != null, BizLogisticsOrder::getLogisticsProviderId, bo.getLogisticsProviderId());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getLogisticsProviderName()), BizLogisticsOrder::getLogisticsProviderName, bo.getLogisticsProviderName());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getChannelName()), BizLogisticsOrder::getChannelName, bo.getChannelName());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getDestination()), BizLogisticsOrder::getDestination, bo.getDestination());
|
||||||
|
lqw.eq(bo.getBoxQuantity() != null, BizLogisticsOrder::getBoxQuantity, bo.getBoxQuantity());
|
||||||
|
lqw.eq(bo.getShipmentQuantity() != null, BizLogisticsOrder::getShipmentQuantity, bo.getShipmentQuantity());
|
||||||
|
lqw.eq(bo.getAmazonShelfDate() != null, BizLogisticsOrder::getAmazonShelfDate, bo.getAmazonShelfDate());
|
||||||
|
lqw.eq(bo.getShelfTimeliness() != null, BizLogisticsOrder::getShelfTimeliness, bo.getShelfTimeliness());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增物流订单
|
||||||
|
*
|
||||||
|
* @param bo 物流订单
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(BizLogisticsOrderBo bo) {
|
||||||
|
BizLogisticsOrder add = MapstructUtils.convert(bo, BizLogisticsOrder.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setId(add.getId());
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改物流订单
|
||||||
|
*
|
||||||
|
* @param bo 物流订单
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(BizLogisticsOrderBo bo) {
|
||||||
|
BizLogisticsOrder update = MapstructUtils.convert(bo, BizLogisticsOrder.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
return baseMapper.updateById(update) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(BizLogisticsOrder entity){
|
||||||
|
//TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除物流订单信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if(isValid){
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void createByBo(BizLogisticsCreateOrderBo bo) {
|
||||||
|
String logicQuoteId = bo.getLogicQuoteId();
|
||||||
|
BizLogisticsQuoteVo quoteVo = bizLogisticsQuoteService.queryById(Long.valueOf(logicQuoteId));
|
||||||
|
|
||||||
|
if (quoteVo == null) {
|
||||||
|
throw new ServiceException("物流报价不存在");
|
||||||
|
}
|
||||||
|
String fbaShipmentId = bo.getFbaShipmentId();
|
||||||
|
BizShipmentPlanVo planVo = bizShipmentPlanService.queryByfbaShipmentId(fbaShipmentId);
|
||||||
|
if (planVo == null) {
|
||||||
|
throw new ServiceException("物流计划不存在");
|
||||||
|
}
|
||||||
|
|
||||||
|
List<BizShipmentTracking> trackingList = bizShipmentTrackingService.queryByPlanId(planVo.getShipmentId());
|
||||||
|
|
||||||
|
List<BizShipmentItem> itemList = bizShipmentItemService.queryByPlanId(planVo.getShipmentId());
|
||||||
|
long sum = itemList.stream().mapToLong(BizShipmentItem::getQuantityShipped).sum();
|
||||||
|
|
||||||
|
|
||||||
|
BizLogisticsOrder bizLogisticsOrder = new BizLogisticsOrder();
|
||||||
|
bizLogisticsOrder.setFbaShipmentId(fbaShipmentId);
|
||||||
|
|
||||||
|
//订单编号
|
||||||
|
bizLogisticsOrder.setOrderId(SerialNoGenerator.generateOrderNo());
|
||||||
|
|
||||||
|
bizLogisticsOrder.setLogisticsProviderId(quoteVo.getUserId());
|
||||||
|
|
||||||
|
// todo bizLogisticsOrderBo.setLogisticsProviderName(quoteVo.getUserName());
|
||||||
|
bizLogisticsOrder.setChannelName(quoteVo.getChannelName());
|
||||||
|
// 目的地
|
||||||
|
bizLogisticsOrder.setDestination(quoteVo.getDestination());
|
||||||
|
|
||||||
|
//总箱子数量
|
||||||
|
bizLogisticsOrder.setBoxQuantity((long) trackingList.size());
|
||||||
|
//总货件数量
|
||||||
|
bizLogisticsOrder.setShipmentQuantity(sum);
|
||||||
|
|
||||||
|
|
||||||
|
ArrayList<BizLogisticsOrderDetail> orderDetailList = new ArrayList<>();
|
||||||
|
|
||||||
|
for (BizShipmentTracking bizShipmentTracking : trackingList) {
|
||||||
|
BizLogisticsOrderDetail detail = new BizLogisticsOrderDetail();
|
||||||
|
detail.setFbaShipmentId(fbaShipmentId);
|
||||||
|
detail.setOrderId(bizLogisticsOrder.getOrderId());
|
||||||
|
detail.setFbaBoxNumber(bizShipmentTracking.getBoxId());
|
||||||
|
detail.setLogisticsProviderId(quoteVo.getUserId());
|
||||||
|
// todo detail.setLogisticsProviderName(quoteVo.getUserName());
|
||||||
|
detail.setChannelName(quoteVo.getChannelName());
|
||||||
|
detail.setDestination(quoteVo.getDestination());
|
||||||
|
detail.setPricePerKg(quoteVo.getPrice());
|
||||||
|
detail.setLogisticsStatus("pending");
|
||||||
|
// detail.setPlannedQuantity(bizShipmentTracking.getQuantity());
|
||||||
|
// detail.setShipmentQuantity(sum);
|
||||||
|
// detail.setTrackingNumber(bizShipmentTracking.getTrackingNumber());
|
||||||
|
orderDetailList.add(detail);
|
||||||
|
}
|
||||||
|
|
||||||
|
int insert = bizOrderMapper.insert(bizLogisticsOrder);
|
||||||
|
|
||||||
|
boolean b = bizLogisticsOrderDetailMapper.insertBatch(orderDetailList);
|
||||||
|
log.info("物流订单创建成功");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,14 +1,13 @@
|
|||||||
package org.asinkj.amz.service.impl;
|
package org.asinkj.amz.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateField;
|
||||||
|
import cn.hutool.core.date.DateTime;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.NumberUtil;
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.asinkj.amz.domain.BizInquiryRequest;
|
import org.asinkj.amz.domain.bo.BizLogisticsQuoteMostBo;
|
||||||
import org.asinkj.amz.domain.BizLogisticsChannel;
|
|
||||||
import org.asinkj.amz.domain.vo.BizLogisticsChannelVo;
|
|
||||||
import org.asinkj.amz.mapper.BizInquiryRequestMapper;
|
import org.asinkj.amz.mapper.BizInquiryRequestMapper;
|
||||||
import org.asinkj.amz.service.IBizInquiryRequestService;
|
|
||||||
import org.asinkj.amz.service.IBizLogisticsChannelService;
|
import org.asinkj.amz.service.IBizLogisticsChannelService;
|
||||||
import org.asinkj.common.core.domain.R;
|
|
||||||
import org.asinkj.common.core.utils.MapstructUtils;
|
import org.asinkj.common.core.utils.MapstructUtils;
|
||||||
import org.asinkj.common.core.utils.StringUtils;
|
import org.asinkj.common.core.utils.StringUtils;
|
||||||
import org.asinkj.common.mybatis.core.page.TableDataInfo;
|
import org.asinkj.common.mybatis.core.page.TableDataInfo;
|
||||||
@ -17,6 +16,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.asinkj.common.satoken.utils.LoginHelper;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.asinkj.amz.domain.bo.BizLogisticsQuoteBo;
|
import org.asinkj.amz.domain.bo.BizLogisticsQuoteBo;
|
||||||
import org.asinkj.amz.domain.vo.BizLogisticsQuoteVo;
|
import org.asinkj.amz.domain.vo.BizLogisticsQuoteVo;
|
||||||
@ -25,10 +25,7 @@ import org.asinkj.amz.mapper.BizLogisticsQuoteMapper;
|
|||||||
import org.asinkj.amz.service.IBizLogisticsQuoteService;
|
import org.asinkj.amz.service.IBizLogisticsQuoteService;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 物流报价Service业务层处理
|
* 物流报价Service业务层处理
|
||||||
@ -44,13 +41,11 @@ public class BizLogisticsQuoteServiceImpl implements IBizLogisticsQuoteService {
|
|||||||
private final BizLogisticsQuoteMapper baseMapper;
|
private final BizLogisticsQuoteMapper baseMapper;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IBizLogisticsChannelService bizLogisticsChannelService;
|
private IBizLogisticsChannelService bizLogisticsChannelService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private BizInquiryRequestMapper billingRequestMapper;
|
private BizInquiryRequestMapper bizInquiryRequestMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询物流报价
|
* 查询物流报价
|
||||||
@ -94,7 +89,7 @@ public class BizLogisticsQuoteServiceImpl implements IBizLogisticsQuoteService {
|
|||||||
LambdaQueryWrapper<BizLogisticsQuote> lqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<BizLogisticsQuote> lqw = Wrappers.lambdaQuery();
|
||||||
lqw.eq(bo.getUserId() != null, BizLogisticsQuote::getUserId, bo.getUserId());
|
lqw.eq(bo.getUserId() != null, BizLogisticsQuote::getUserId, bo.getUserId());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getDestination()), BizLogisticsQuote::getDestination, bo.getDestination());
|
lqw.eq(StringUtils.isNotBlank(bo.getDestination()), BizLogisticsQuote::getDestination, bo.getDestination());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getTransportChannel()), BizLogisticsQuote::getTransportChannel, bo.getTransportChannel());
|
lqw.eq(StringUtils.isNotBlank(bo.getChannelName()), BizLogisticsQuote::getChannelName, bo.getChannelName());
|
||||||
lqw.eq(bo.getPrice() != null, BizLogisticsQuote::getPrice, bo.getPrice());
|
lqw.eq(bo.getPrice() != null, BizLogisticsQuote::getPrice, bo.getPrice());
|
||||||
lqw.eq(bo.getLeadTime() != null, BizLogisticsQuote::getLeadTime, bo.getLeadTime());
|
lqw.eq(bo.getLeadTime() != null, BizLogisticsQuote::getLeadTime, bo.getLeadTime());
|
||||||
lqw.eq(bo.getSurcharge() != null, BizLogisticsQuote::getSurcharge, bo.getSurcharge());
|
lqw.eq(bo.getSurcharge() != null, BizLogisticsQuote::getSurcharge, bo.getSurcharge());
|
||||||
@ -161,25 +156,56 @@ public class BizLogisticsQuoteServiceImpl implements IBizLogisticsQuoteService {
|
|||||||
public List<BizLogisticsQuoteVo> queryQuoteWithDestination(String destination, String channel) {
|
public List<BizLogisticsQuoteVo> queryQuoteWithDestination(String destination, String channel) {
|
||||||
LambdaQueryWrapper<BizLogisticsQuote> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BizLogisticsQuote> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(BizLogisticsQuote::getDestination, destination);
|
queryWrapper.eq(BizLogisticsQuote::getDestination, destination);
|
||||||
queryWrapper.eq(BizLogisticsQuote::getTransportChannel, channel);
|
queryWrapper.eq(BizLogisticsQuote::getChannelName, channel);
|
||||||
return baseMapper.selectVoList(queryWrapper);
|
return baseMapper.selectVoList(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TableDataInfo<BizLogisticsQuoteVo> listWithDesAndChannel(String destination, String channel) {
|
public TableDataInfo<BizLogisticsQuoteVo> listWithDesAndChannel(String destination, String channel,String date) {
|
||||||
|
|
||||||
|
|
||||||
if (StringUtils.isNotBlank(destination) && StringUtils.isNotBlank(channel)) {
|
if (StringUtils.isNotBlank(destination) && StringUtils.isNotBlank(channel)) {
|
||||||
LambdaQueryWrapper<BizLogisticsQuote> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BizLogisticsQuote> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(BizLogisticsQuote::getDestination, destination);
|
queryWrapper.eq(BizLogisticsQuote::getDestination, destination);
|
||||||
queryWrapper.eq(BizLogisticsQuote::getChannelId, NumberUtil.parseLong(channel));
|
queryWrapper.eq(BizLogisticsQuote::getChannelId, NumberUtil.parseLong(channel));
|
||||||
|
|
||||||
|
queryWrapper.eq(BizLogisticsQuote::getQuoteDate, date);
|
||||||
|
|
||||||
return TableDataInfo.build(baseMapper.selectVoList(queryWrapper));
|
return TableDataInfo.build(baseMapper.selectVoList(queryWrapper));
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void insertMostQuoteByBo(BizLogisticsQuoteMostBo bo) {
|
||||||
|
Date quoteStartDate = bo.getQuoteStartDate();
|
||||||
|
Date quoteEndDate = bo.getQuoteEndDate();
|
||||||
|
//计算中间的每一天的日期
|
||||||
|
// List<Date> dateList = DateUtil.getDatesBetween(quoteStartDate, quoteEndDate);
|
||||||
|
List<DateTime> dateTimes = DateUtil.rangeToList(quoteStartDate, quoteEndDate, DateField.DAY_OF_YEAR);
|
||||||
|
ArrayList<BizLogisticsQuote> bizLogisticsQuotes = new ArrayList<>();
|
||||||
|
for (DateTime dateTime : dateTimes) {
|
||||||
|
BizLogisticsQuote bizLogisticsQuote = new BizLogisticsQuote();
|
||||||
|
bizLogisticsQuote.setDestination(bo.getDestination());
|
||||||
|
bizLogisticsQuote.setUserId(LoginHelper.getUserId());
|
||||||
|
bizLogisticsQuote.setChannelName(bo.getChannelName());
|
||||||
|
bizLogisticsQuote.setPrice(bo.getPrice());
|
||||||
|
bizLogisticsQuote.setLeadTime(bo.getLeadTime());
|
||||||
|
bizLogisticsQuote.setSurcharge(bo.getSurcharge());
|
||||||
|
bizLogisticsQuote.setQuoteDate(dateTime.toJdkDate());
|
||||||
|
bizLogisticsQuote.setIsSubmitted(bo.getIsSubmitted());
|
||||||
|
bizLogisticsQuote.setChannelType(bo.getChannelType());
|
||||||
|
bizLogisticsQuote.setChannelId(bo.getChannelId());
|
||||||
|
bizLogisticsQuote.setIsDdp(bo.getIsDdp());
|
||||||
|
bizLogisticsQuote.setUnit(bo.getUnit());
|
||||||
|
bizLogisticsQuotes.add(bizLogisticsQuote);
|
||||||
|
}
|
||||||
|
boolean b = baseMapper.insertBatch(bizLogisticsQuotes);
|
||||||
|
log.info("b:{}", b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -134,4 +134,15 @@ public class BizShipmentItemServiceImpl implements IBizShipmentItemService {
|
|||||||
}
|
}
|
||||||
return baseMapper.deleteByIds(ids) > 0;
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BizShipmentItem> queryByPlanId(String shipmentId) {
|
||||||
|
if (StringUtils.isNotBlank(shipmentId)) {
|
||||||
|
return baseMapper.selectList(Wrappers.lambdaQuery(BizShipmentItem.class)
|
||||||
|
.eq(BizShipmentItem::getShipmentId, shipmentId));
|
||||||
|
}
|
||||||
|
return List.of();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package org.asinkj.amz.service.impl;
|
package org.asinkj.amz.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import org.asinkj.amz.domain.BizLogisticsQuote;
|
import org.asinkj.amz.domain.BizLogisticsQuote;
|
||||||
import org.asinkj.amz.domain.vo.BizLogisticsQuoteVo;
|
import org.asinkj.amz.domain.vo.BizLogisticsQuoteVo;
|
||||||
import org.asinkj.amz.service.IBizLogisticsQuoteService;
|
import org.asinkj.amz.service.IBizLogisticsQuoteService;
|
||||||
@ -83,7 +84,7 @@ public class BizShipmentPlanServiceImpl implements IBizShipmentPlanService {
|
|||||||
lqw.like(StringUtils.isNotBlank(bo.getShipmentName()), BizShipmentPlan::getShipmentName, bo.getShipmentName());
|
lqw.like(StringUtils.isNotBlank(bo.getShipmentName()), BizShipmentPlan::getShipmentName, bo.getShipmentName());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getIsClosed()), BizShipmentPlan::getIsClosed, bo.getIsClosed());
|
lqw.eq(StringUtils.isNotBlank(bo.getIsClosed()), BizShipmentPlan::getIsClosed, bo.getIsClosed());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getShipmentStatus()), BizShipmentPlan::getShipmentStatus, bo.getShipmentStatus());
|
lqw.eq(StringUtils.isNotBlank(bo.getShipmentStatus()), BizShipmentPlan::getShipmentStatus, bo.getShipmentStatus());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getDestinationFulfillmentCenterId()), BizShipmentPlan::getDestinationFulfillmentCenterId, bo.getDestinationFulfillmentCenterId());
|
lqw.eq(StringUtils.isNotBlank(bo.getDestination()), BizShipmentPlan::getDestination, bo.getDestination());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getShippingMode()), BizShipmentPlan::getShippingMode, bo.getShippingMode());
|
lqw.eq(StringUtils.isNotBlank(bo.getShippingMode()), BizShipmentPlan::getShippingMode, bo.getShippingMode());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getShippingSolution()), BizShipmentPlan::getShippingSolution, bo.getShippingSolution());
|
lqw.eq(StringUtils.isNotBlank(bo.getShippingSolution()), BizShipmentPlan::getShippingSolution, bo.getShippingSolution());
|
||||||
lqw.eq(bo.getGmtModified() != null, BizShipmentPlan::getGmtModified, bo.getGmtModified());
|
lqw.eq(bo.getGmtModified() != null, BizShipmentPlan::getGmtModified, bo.getGmtModified());
|
||||||
@ -156,4 +157,15 @@ public class BizShipmentPlanServiceImpl implements IBizShipmentPlanService {
|
|||||||
public List<BizLogisticsQuoteVo> getQuote(String destination, String channel) {
|
public List<BizLogisticsQuoteVo> getQuote(String destination, String channel) {
|
||||||
return iLogisticsQuoteService.queryQuoteWithDestination(destination, channel);
|
return iLogisticsQuoteService.queryQuoteWithDestination(destination, channel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BizShipmentPlanVo queryByfbaShipmentId(String fbaShipmentId) {
|
||||||
|
LambdaQueryWrapper<BizShipmentPlan> bizShipmentPlanLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
bizShipmentPlanLambdaQueryWrapper.eq(BizShipmentPlan::getShipmentId, fbaShipmentId);
|
||||||
|
BizShipmentPlanVo bizShipmentPlanVo = baseMapper.selectVoOne(bizShipmentPlanLambdaQueryWrapper);
|
||||||
|
if (ObjectUtil.isNotNull(bizShipmentPlanVo)){
|
||||||
|
return bizShipmentPlanVo;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -128,4 +128,14 @@ public class BizShipmentTrackingServiceImpl implements IBizShipmentTrackingServi
|
|||||||
}
|
}
|
||||||
return baseMapper.deleteByIds(ids) > 0;
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BizShipmentTracking> queryByPlanId(String shipmentId) {
|
||||||
|
if (StringUtils.isNotBlank(shipmentId)) {
|
||||||
|
return baseMapper.selectList(Wrappers.<BizShipmentTracking>lambdaQuery().eq(BizShipmentTracking::getShipmentId, shipmentId));
|
||||||
|
}
|
||||||
|
return List.of();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -52,8 +52,8 @@ public class FbaShipmentApiResponse {
|
|||||||
@JSONField(name = "sync_time")
|
@JSONField(name = "sync_time")
|
||||||
private String syncTime;
|
private String syncTime;
|
||||||
|
|
||||||
@JSONField(name = "destination_fulfillment_center_id")
|
@JSONField(name = "destination")
|
||||||
private String destinationFulfillmentCenterId;
|
private String destination;
|
||||||
|
|
||||||
private String username;
|
private String username;
|
||||||
private String seller;
|
private String seller;
|
||||||
|
@ -35,8 +35,8 @@ public class Shipment {
|
|||||||
@JsonProperty("sync_time")
|
@JsonProperty("sync_time")
|
||||||
private LocalDateTime syncTime; // 空字符串会反序列化为null
|
private LocalDateTime syncTime; // 空字符串会反序列化为null
|
||||||
|
|
||||||
@JsonProperty("destination_fulfillment_center_id")
|
@JsonProperty("destination")
|
||||||
private String destinationFulfillmentCenterId;
|
private String destination;
|
||||||
|
|
||||||
private String username;
|
private String username;
|
||||||
private String seller;
|
private String seller;
|
||||||
|
@ -0,0 +1,78 @@
|
|||||||
|
package org.asinkj.utils;
|
||||||
|
|
||||||
|
import org.asinkj.common.redis.utils.RedisUtils;
|
||||||
|
|
||||||
|
import java.time.Duration;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.ZoneId;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
|
||||||
|
public class SerialNoGenerator {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成询价单号(格式:INQ+年月日+6位序列)
|
||||||
|
* @return 示例:INQ20231023000001
|
||||||
|
*/
|
||||||
|
public static String generateInquiryNo() {
|
||||||
|
// 1. 生成日期部分
|
||||||
|
String datePart = LocalDate.now(ZoneId.of("Asia/Shanghai"))
|
||||||
|
.format(DateTimeFormatter.ofPattern("yyyyMMdd"));
|
||||||
|
|
||||||
|
// 2. 构建Redis键
|
||||||
|
String redisKey = "inquiry:serial:" + datePart;
|
||||||
|
|
||||||
|
// 3. 原子递增序列号
|
||||||
|
long sequence = RedisUtils.incrAtomicValue(redisKey);
|
||||||
|
|
||||||
|
// 4. 首次生成时设置过期时间(次日凌晨过期)
|
||||||
|
if (sequence == 1L) {
|
||||||
|
LocalDateTime now = LocalDateTime.now(ZoneId.of("Asia/Shanghai"));
|
||||||
|
LocalDateTime expirationTime = now.toLocalDate()
|
||||||
|
.plusDays(1)
|
||||||
|
.atStartOfDay();
|
||||||
|
|
||||||
|
Duration ttl = Duration.between(now, expirationTime);
|
||||||
|
RedisUtils.expire(redisKey, ttl);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 5. 校验序列号范围(根据业务需求可选)
|
||||||
|
if (sequence > 999_999L) {
|
||||||
|
throw new IllegalStateException("当日序列号已用尽");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 6. 格式化输出
|
||||||
|
return String.format("INQ%s%06d", datePart, sequence);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String generateOrderNo() {
|
||||||
|
// 1. 生成日期部分
|
||||||
|
String datePart = LocalDate.now(ZoneId.of("Asia/Shanghai"))
|
||||||
|
.format(DateTimeFormatter.ofPattern("yyyyMMdd"));
|
||||||
|
|
||||||
|
// 2. 构建Redis键
|
||||||
|
String redisKey = "order:serial:" + datePart;
|
||||||
|
|
||||||
|
// 3. 原子递增序列号
|
||||||
|
long sequence = RedisUtils.incrAtomicValue(redisKey);
|
||||||
|
|
||||||
|
// 4. 首次生成时设置过期时间(次日凌晨过期)
|
||||||
|
if (sequence == 1L) {
|
||||||
|
LocalDateTime now = LocalDateTime.now(ZoneId.of("Asia/Shanghai"));
|
||||||
|
LocalDateTime expirationTime = now.toLocalDate()
|
||||||
|
.plusDays(1)
|
||||||
|
.atStartOfDay();
|
||||||
|
|
||||||
|
Duration ttl = Duration.between(now, expirationTime);
|
||||||
|
RedisUtils.expire(redisKey, ttl);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 5. 校验序列号范围(根据业务需求可选)
|
||||||
|
if (sequence > 999_999L) {
|
||||||
|
throw new IllegalStateException("当日序列号已用尽");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 6. 格式化输出
|
||||||
|
return String.format("ORDER%s%06d", datePart, sequence);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
<?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="org.asinkj.amz.mapper.BizLogisticsOrderDetailMapper">
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,7 @@
|
|||||||
|
<?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="org.asinkj.amz.mapper.BizLogisticsOrderMapper">
|
||||||
|
|
||||||
|
</mapper>
|
Loading…
x
Reference in New Issue
Block a user