4.12新需求修改
This commit is contained in:
parent
b4eee35c1f
commit
fb5dad9511
@ -18,7 +18,7 @@ EXPOSE ${SERVER_PORT}
|
||||
ADD ./target/asinkj-auth.jar ./app.jar
|
||||
|
||||
ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom -Dserver.port=${SERVER_PORT} \
|
||||
-Dspring.profiles.active="prod" \
|
||||
# -Dspring.profiles.active="prod" \
|
||||
#-Dskywalking.agent.service_name=asinkj-auth \
|
||||
#-javaagent:/asinkj/skywalking/agent/skywalking-agent.jar \
|
||||
-XX:+HeapDumpOnOutOfMemoryError -XX:+UseZGC ${JAVA_OPTS} \
|
||||
|
26
asinkj-auth/DockerfileLocal
Normal file
26
asinkj-auth/DockerfileLocal
Normal file
@ -0,0 +1,26 @@
|
||||
# 贝尔实验室 Spring 官方推荐镜像 JDK下载地址 https://bell-sw.com/pages/downloads/
|
||||
FROM amazoncorretto:17.0.14
|
||||
|
||||
LABEL maintainer="Shuo Hu "
|
||||
|
||||
ENV TZ=Asia/Shanghai
|
||||
|
||||
RUN mkdir -p /asinkj/auth/logs \
|
||||
/asinkj/auth/temp \
|
||||
/asinkj/skywalking/agent
|
||||
|
||||
WORKDIR /asinkj/auth
|
||||
|
||||
ENV SERVER_PORT=9210 LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS=""
|
||||
|
||||
EXPOSE ${SERVER_PORT}
|
||||
|
||||
ADD ./target/asinkj-auth.jar ./app.jar
|
||||
|
||||
ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom -Dserver.port=${SERVER_PORT} \
|
||||
# -Dspring.profiles.active="prod" \
|
||||
#-Dskywalking.agent.service_name=asinkj-auth \
|
||||
#-javaagent:/asinkj/skywalking/agent/skywalking-agent.jar \
|
||||
-XX:+HeapDumpOnOutOfMemoryError -XX:+UseZGC ${JAVA_OPTS} \
|
||||
-jar app.jar
|
||||
|
@ -0,0 +1,114 @@
|
||||
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.BizInquiryBlacklistVo;
|
||||
import org.asinkj.amz.domain.bo.BizInquiryBlacklistBo;
|
||||
import org.asinkj.amz.service.IBizInquiryBlacklistService;
|
||||
import org.asinkj.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 物流询价屏蔽记录
|
||||
* 前端访问路由地址为:/amz/inquiryBlacklist
|
||||
*
|
||||
* @author shuo hu
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/inquiryBlacklist")
|
||||
public class BizInquiryBlacklistController extends BaseController {
|
||||
|
||||
private final IBizInquiryBlacklistService bizInquiryBlacklistService;
|
||||
|
||||
/**
|
||||
* 查询物流询价屏蔽记录列表
|
||||
*/
|
||||
@SaCheckPermission("amz:inquiryBlacklist:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<BizInquiryBlacklistVo> list(BizInquiryBlacklistBo bo, PageQuery pageQuery) {
|
||||
return bizInquiryBlacklistService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出物流询价屏蔽记录列表
|
||||
*/
|
||||
@SaCheckPermission("amz:inquiryBlacklist:export")
|
||||
@Log(title = "物流询价屏蔽记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(BizInquiryBlacklistBo bo, HttpServletResponse response) {
|
||||
List<BizInquiryBlacklistVo> list = bizInquiryBlacklistService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "物流询价屏蔽记录", BizInquiryBlacklistVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取物流询价屏蔽记录详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("amz:inquiryBlacklist:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<BizInquiryBlacklistVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(bizInquiryBlacklistService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增物流询价屏蔽记录
|
||||
*/
|
||||
@SaCheckPermission("amz:inquiryBlacklist:add")
|
||||
@Log(title = "物流询价屏蔽记录", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody BizInquiryBlacklistBo bo) {
|
||||
return toAjax(bizInquiryBlacklistService.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "物流询价屏蔽记录", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/insert")
|
||||
public R<Void> insert( @RequestBody List<Long> list) {
|
||||
bizInquiryBlacklistService.insertByList(list);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物流询价屏蔽记录
|
||||
*/
|
||||
@SaCheckPermission("amz:inquiryBlacklist:edit")
|
||||
@Log(title = "物流询价屏蔽记录", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BizInquiryBlacklistBo bo) {
|
||||
return toAjax(bizInquiryBlacklistService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除物流询价屏蔽记录
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("amz:inquiryBlacklist:remove")
|
||||
@Log(title = "物流询价屏蔽记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(bizInquiryBlacklistService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@ -1,12 +1,25 @@
|
||||
package org.asinkj.amz.controller;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import io.seata.spring.annotation.GlobalTransactional;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.asinkj.amz.domain.bo.BizLogisticsCreateOrderBo;
|
||||
import org.asinkj.common.core.utils.StringUtils;
|
||||
import org.asinkj.common.core.utils.file.MimeTypeUtils;
|
||||
import org.asinkj.common.satoken.utils.LoginHelper;
|
||||
import org.asinkj.resource.api.RemoteFileService;
|
||||
import org.asinkj.resource.api.domain.RemoteFile;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.asinkj.common.idempotent.annotation.RepeatSubmit;
|
||||
@ -22,6 +35,7 @@ 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;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 物流订单
|
||||
@ -36,8 +50,12 @@ import org.asinkj.common.mybatis.core.page.TableDataInfo;
|
||||
@RequestMapping("/logisticsOrder")
|
||||
public class BizLogisticsOrderController extends BaseController {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(BizLogisticsOrderController.class);
|
||||
private final IBizLogisticsOrderService bizLogisticsOrderService;
|
||||
|
||||
@DubboReference
|
||||
private RemoteFileService remoteFileService;
|
||||
|
||||
/**
|
||||
* 查询物流订单列表
|
||||
*/
|
||||
@ -65,8 +83,7 @@ public class BizLogisticsOrderController extends BaseController {
|
||||
*/
|
||||
@SaCheckPermission("amz:logisticsOrder:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<BizLogisticsOrderVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
public R<BizLogisticsOrderVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) {
|
||||
return R.ok(bizLogisticsOrderService.queryById(id));
|
||||
}
|
||||
|
||||
@ -94,6 +111,30 @@ public class BizLogisticsOrderController extends BaseController {
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
@RepeatSubmit
|
||||
@GlobalTransactional(rollbackFor = Exception.class)
|
||||
@PostMapping(value = "/uploadPod", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
public R<Void> uploadPod(@RequestPart("file") MultipartFile file, @RequestParam String order) throws IOException {
|
||||
if (!file.isEmpty()) {
|
||||
// String extension = FileUtil.extName(file.getOriginalFilename());
|
||||
// if (!StringUtils.equalsAnyIgnoreCase(extension, MimeTypeUtils.IMAGE_EXTENSION)) {
|
||||
// return R.fail("文件格式不正确,请上传" + Arrays.toString(MimeTypeUtils.IMAGE_EXTENSION) + "格式");
|
||||
// }
|
||||
RemoteFile oss = remoteFileService.upload(file.getName(), file.getOriginalFilename(), file.getContentType(), file.getBytes());
|
||||
log.info("url" + oss.getUrl());
|
||||
log.info("order" + order);
|
||||
log.info("oss" + oss.toString());
|
||||
|
||||
BizLogisticsOrderBo bizLogisticsOrderBo = new BizLogisticsOrderBo();
|
||||
bizLogisticsOrderBo.setOrderId(order);
|
||||
bizLogisticsOrderBo.setPodUrl(oss.getUrl());
|
||||
bizLogisticsOrderService.updateByOrderId(bizLogisticsOrderBo);
|
||||
return R.ok();
|
||||
}
|
||||
return R.fail("上传图片异常,请联系管理员");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物流订单
|
||||
*/
|
||||
@ -113,8 +154,7 @@ public class BizLogisticsOrderController extends BaseController {
|
||||
@SaCheckPermission("amz:logisticsOrder:remove")
|
||||
@Log(title = "物流订单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] ids) {
|
||||
return toAjax(bizLogisticsOrderService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,113 @@
|
||||
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.BizLogisticsOrderQuotationVo;
|
||||
import org.asinkj.amz.domain.bo.BizLogisticsOrderQuotationBo;
|
||||
import org.asinkj.amz.service.IBizLogisticsOrderQuotationService;
|
||||
import org.asinkj.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 物流订单确认
|
||||
* 前端访问路由地址为:/amz/logisticsOrderQuotation
|
||||
*
|
||||
* @author shuo hu
|
||||
* @date 2025-04-21
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/logisticsOrderQuotation")
|
||||
public class BizLogisticsOrderQuotationController extends BaseController {
|
||||
|
||||
private final IBizLogisticsOrderQuotationService bizLogisticsOrderQuotationService;
|
||||
|
||||
/**
|
||||
* 查询物流订单确认列表
|
||||
*/
|
||||
@SaCheckPermission("amz:logisticsOrderQuotation:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<BizLogisticsOrderQuotationVo> list(BizLogisticsOrderQuotationBo bo, PageQuery pageQuery) {
|
||||
return bizLogisticsOrderQuotationService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出物流订单确认列表
|
||||
*/
|
||||
@SaCheckPermission("amz:logisticsOrderQuotation:export")
|
||||
@Log(title = "物流订单确认", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(BizLogisticsOrderQuotationBo bo, HttpServletResponse response) {
|
||||
List<BizLogisticsOrderQuotationVo> list = bizLogisticsOrderQuotationService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "物流订单确认", BizLogisticsOrderQuotationVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取物流订单确认详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("amz:logisticsOrderQuotation:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<BizLogisticsOrderQuotationVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(bizLogisticsOrderQuotationService.queryById(id));
|
||||
}
|
||||
|
||||
@SaCheckPermission("amz:logisticsOrderQuotation:query")
|
||||
@PostMapping("/quotationOrder")
|
||||
public R<Void> quotationOrder(@RequestBody BizLogisticsOrderQuotationBo bo) {
|
||||
bizLogisticsOrderQuotationService.quotationOrder(bo);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增物流订单确认
|
||||
*/
|
||||
@SaCheckPermission("amz:logisticsOrderQuotation:add")
|
||||
@Log(title = "物流订单确认", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody BizLogisticsOrderQuotationBo bo) {
|
||||
return toAjax(bizLogisticsOrderQuotationService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物流订单确认
|
||||
*/
|
||||
@SaCheckPermission("amz:logisticsOrderQuotation:edit")
|
||||
@Log(title = "物流订单确认", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BizLogisticsOrderQuotationBo bo) {
|
||||
return toAjax(bizLogisticsOrderQuotationService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除物流订单确认
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("amz:logisticsOrderQuotation:remove")
|
||||
@Log(title = "物流订单确认", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(bizLogisticsOrderQuotationService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@ -63,6 +63,14 @@ public class BizLogisticsQuoteController extends BaseController {
|
||||
}
|
||||
|
||||
|
||||
@SaCheckPermission("amz:shipmentPlan:edit")
|
||||
@GetMapping("/queryWithDes/{destination}/{date}")
|
||||
public TableDataInfo<BizLogisticsQuoteVo> queryWithDes(@PathVariable("destination") @NotNull(message = "目的地不能为空") String destination,
|
||||
@PathVariable("date") @NotNull(message = "日期不能为空") String date) {
|
||||
return bizLogisticsQuoteService.listWithDes(destination,date);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
@ -0,0 +1,51 @@
|
||||
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.io.Serial;
|
||||
|
||||
/**
|
||||
* 物流询价屏蔽记录对象 biz_inquiry_blacklist
|
||||
*
|
||||
* @author shuo hu
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("biz_inquiry_blacklist")
|
||||
public class BizInquiryBlacklist extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 自增主键ID
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 关联的询价单ID(外键)
|
||||
*/
|
||||
private Long inquiryId;
|
||||
|
||||
/**
|
||||
* 物流商ID(外键)
|
||||
*/
|
||||
private Long providerId;
|
||||
|
||||
/**
|
||||
* 屏蔽状态标识:0=正常显示,1=已屏蔽
|
||||
*/
|
||||
private String isBlocked;
|
||||
|
||||
/**
|
||||
* 逻辑删除标记:0=有效数据,1=已删除
|
||||
*/
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
|
||||
|
||||
}
|
@ -90,5 +90,9 @@ public class BizLogisticsOrder extends TenantEntity {
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
|
||||
private String podUrl;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -140,5 +140,52 @@ public class BizLogisticsOrderDetail extends TenantEntity {
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 物流商确认接收时间
|
||||
*/
|
||||
private Date carrierConfirmTime;
|
||||
|
||||
/**
|
||||
* 已提货时间
|
||||
*/
|
||||
private Date goodsReceiptTime;
|
||||
|
||||
/**
|
||||
* 转运开始时间
|
||||
*/
|
||||
private Date transferStartTime;
|
||||
|
||||
/**
|
||||
* 最终签收时间
|
||||
*/
|
||||
private Date signedTime;
|
||||
|
||||
/**
|
||||
* 排仓时间
|
||||
*/
|
||||
private Date scheduleTime;
|
||||
|
||||
/**
|
||||
* 船舶离港时间
|
||||
*/
|
||||
private Date vesselDepartTime;
|
||||
|
||||
/**
|
||||
* 目的港到达时间
|
||||
*/
|
||||
private Date portArrivalTime;
|
||||
|
||||
/**
|
||||
* 查验开始时间
|
||||
*/
|
||||
private Date inspectionTime;
|
||||
|
||||
/**
|
||||
* 末端提取时间
|
||||
*/
|
||||
private Date deliveryPickupTime;
|
||||
|
||||
private Long quoteOrderId;
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,84 @@
|
||||
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.io.Serial;
|
||||
|
||||
/**
|
||||
* 物流订单确认对象 biz_logistics_order_quotation
|
||||
*
|
||||
* @author shuo hu
|
||||
* @date 2025-04-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("biz_logistics_order_quotation")
|
||||
public class BizLogisticsOrderQuotation 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;
|
||||
|
||||
/**
|
||||
* 删除标记(0=正常,1=删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
|
||||
|
||||
private String confirm;
|
||||
|
||||
/**
|
||||
* 根据哪个报价单生成的订单
|
||||
*/
|
||||
private Long quoteOrderId;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package org.asinkj.amz.domain.bo;
|
||||
|
||||
import org.asinkj.amz.domain.BizInquiryBlacklist;
|
||||
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.*;
|
||||
|
||||
/**
|
||||
* 物流询价屏蔽记录业务对象 biz_inquiry_blacklist
|
||||
*
|
||||
* @author shuo hu
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = BizInquiryBlacklist.class, reverseConvertGenerate = false)
|
||||
public class BizInquiryBlacklistBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 自增主键ID
|
||||
*/
|
||||
@NotNull(message = "自增主键ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 关联的询价单ID(外键)
|
||||
*/
|
||||
@NotNull(message = "关联的询价单ID(外键)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long inquiryId;
|
||||
|
||||
/**
|
||||
* 物流商ID(外键)
|
||||
*/
|
||||
@NotNull(message = "物流商ID(外键)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long providerId;
|
||||
|
||||
/**
|
||||
* 屏蔽状态标识:0=正常显示,1=已屏蔽
|
||||
*/
|
||||
@NotBlank(message = "屏蔽状态标识:0=正常显示,1=已屏蔽不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String isBlocked;
|
||||
|
||||
|
||||
}
|
@ -85,4 +85,7 @@ public class BizLogisticsOrderBo extends BaseEntity {
|
||||
private Long shelfTimeliness;
|
||||
|
||||
|
||||
private String podUrl;
|
||||
|
||||
|
||||
}
|
||||
|
@ -158,5 +158,63 @@ public class BizLogisticsOrderDetailBo extends BaseEntity {
|
||||
@NotNull(message = "运输时效(单位:天,实际签收日期 - 发货日期)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long timeliness;
|
||||
|
||||
/**
|
||||
* 物流商确认接收时间
|
||||
*/
|
||||
@NotNull(message = "物流商确认接收时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date carrierConfirmTime;
|
||||
|
||||
/**
|
||||
* 已提货时间
|
||||
*/
|
||||
@NotNull(message = "已提货时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date goodsReceiptTime;
|
||||
|
||||
/**
|
||||
* 转运开始时间
|
||||
*/
|
||||
@NotNull(message = "转运开始时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date transferStartTime;
|
||||
|
||||
/**
|
||||
* 最终签收时间
|
||||
*/
|
||||
@NotNull(message = "最终签收时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date signedTime;
|
||||
|
||||
/**
|
||||
* 排仓时间
|
||||
*/
|
||||
@NotNull(message = "排仓时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date scheduleTime;
|
||||
|
||||
/**
|
||||
* 船舶离港时间
|
||||
*/
|
||||
@NotNull(message = "船舶离港时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date vesselDepartTime;
|
||||
|
||||
/**
|
||||
* 目的港到达时间
|
||||
*/
|
||||
@NotNull(message = "目的港到达时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date portArrivalTime;
|
||||
|
||||
/**
|
||||
* 查验开始时间
|
||||
*/
|
||||
@NotNull(message = "查验开始时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date inspectionTime;
|
||||
|
||||
/**
|
||||
* 末端提取时间
|
||||
*/
|
||||
@NotNull(message = "末端提取时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date deliveryPickupTime;
|
||||
|
||||
/**
|
||||
* 根据哪个报价单生成的订单
|
||||
*/
|
||||
@NotNull(message = "根据哪个报价单生成的订单不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long quoteOrderId;
|
||||
}
|
||||
|
@ -0,0 +1,86 @@
|
||||
package org.asinkj.amz.domain.bo;
|
||||
|
||||
import org.asinkj.amz.domain.BizLogisticsOrderQuotation;
|
||||
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.*;
|
||||
|
||||
/**
|
||||
* 物流订单确认业务对象 biz_logistics_order_quotation
|
||||
*
|
||||
* @author shuo hu
|
||||
* @date 2025-04-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = BizLogisticsOrderQuotation.class, reverseConvertGenerate = false)
|
||||
public class BizLogisticsOrderQuotationBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键(应用层生成的全局唯一ID,如雪花算法)
|
||||
*/
|
||||
@NotNull(message = "主键(应用层生成的全局唯一ID,如雪花算法)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* FBA货件编号(亚马逊系统生成的唯一标识)
|
||||
*/
|
||||
@NotBlank(message = "FBA货件编号(亚马逊系统生成的唯一标识)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String fbaShipmentId;
|
||||
|
||||
/**
|
||||
* 订单编号(应用层生成的唯一业务流水号)
|
||||
*/
|
||||
@NotBlank(message = "订单编号(应用层生成的唯一业务流水号)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
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;
|
||||
|
||||
/**
|
||||
* 根据哪个报价单生成的订单
|
||||
*/
|
||||
@NotNull(message = "根据哪个报价单生成的订单不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long quoteOrderId;
|
||||
|
||||
private String confirm;
|
||||
|
||||
|
||||
}
|
@ -111,4 +111,9 @@ public class BizLogisticsQuoteBo extends BaseEntity {
|
||||
private String unit;
|
||||
|
||||
|
||||
|
||||
private String backLogisticsType;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,58 @@
|
||||
package org.asinkj.amz.domain.vo;
|
||||
|
||||
import org.asinkj.amz.domain.BizInquiryBlacklist;
|
||||
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_inquiry_blacklist
|
||||
*
|
||||
* @author shuo hu
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = BizInquiryBlacklist.class)
|
||||
public class BizInquiryBlacklistVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 自增主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "自增主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 关联的询价单ID(外键)
|
||||
*/
|
||||
@ExcelProperty(value = "关联的询价单ID", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "外=键")
|
||||
private Long inquiryId;
|
||||
|
||||
/**
|
||||
* 物流商ID(外键)
|
||||
*/
|
||||
@ExcelProperty(value = "物流商ID", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "外=键")
|
||||
private Long providerId;
|
||||
|
||||
/**
|
||||
* 屏蔽状态标识:0=正常显示,1=已屏蔽
|
||||
*/
|
||||
@ExcelProperty(value = "屏蔽状态标识:0=正常显示,1=已屏蔽")
|
||||
private String isBlocked;
|
||||
|
||||
|
||||
}
|
@ -167,8 +167,8 @@ public class BizLogisticsOrderDetailVo implements Serializable {
|
||||
/**
|
||||
* 物流状态(pending:待发运/in_transit:运输中/delivered:已签收)
|
||||
*/
|
||||
@ExcelProperty(value = "物流状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "pending=待发运,in_transit=运输中,delivered=已签收")
|
||||
@ExcelProperty(value = "物流状态")
|
||||
// @ExcelDictFormat(readConverterExp = "pending=待发运,in_transit=运输中,delivered=已签收")
|
||||
private String logisticsStatus;
|
||||
|
||||
/**
|
||||
@ -195,4 +195,61 @@ public class BizLogisticsOrderDetailVo implements Serializable {
|
||||
private Long timeliness;
|
||||
|
||||
|
||||
/**
|
||||
* 物流商确认接收时间
|
||||
*/
|
||||
@ExcelProperty(value = "物流商确认接收时间")
|
||||
private Date carrierConfirmTime;
|
||||
|
||||
/**
|
||||
* 已提货时间
|
||||
*/
|
||||
@ExcelProperty(value = "物流商已提货时间")
|
||||
private Date goodsReceiptTime;
|
||||
|
||||
/**
|
||||
* 转运开始时间
|
||||
*/
|
||||
@ExcelProperty(value = "转运开始时间")
|
||||
private Date transferStartTime;
|
||||
|
||||
/**
|
||||
* 最终签收时间
|
||||
*/
|
||||
@ExcelProperty(value = "最终签收时间")
|
||||
private Date signedTime;
|
||||
|
||||
/**
|
||||
* 排仓时间
|
||||
*/
|
||||
@ExcelProperty(value = "排仓时间")
|
||||
private Date scheduleTime;
|
||||
|
||||
/**
|
||||
* 船舶离港时间
|
||||
*/
|
||||
@ExcelProperty(value = "船舶离港时间")
|
||||
private Date vesselDepartTime;
|
||||
|
||||
/**
|
||||
* 目的港到达时间
|
||||
*/
|
||||
@ExcelProperty(value = "目的港到达时间")
|
||||
private Date portArrivalTime;
|
||||
|
||||
/**
|
||||
* 查验开始时间
|
||||
*/
|
||||
@ExcelProperty(value = "查验开始时间")
|
||||
private Date inspectionTime;
|
||||
|
||||
/**
|
||||
* 末端提取时间
|
||||
*/
|
||||
@ExcelProperty(value = "末端提取时间")
|
||||
private Date deliveryPickupTime;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,104 @@
|
||||
package org.asinkj.amz.domain.vo;
|
||||
|
||||
import org.asinkj.amz.domain.BizLogisticsOrderQuotation;
|
||||
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_quotation
|
||||
*
|
||||
* @author shuo hu
|
||||
* @date 2025-04-21
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = BizLogisticsOrderQuotation.class)
|
||||
public class BizLogisticsOrderQuotationVo 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 channelName;
|
||||
|
||||
/**
|
||||
* 目的地仓库名称或编码
|
||||
*/
|
||||
@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 Long quoteOrderId;
|
||||
|
||||
|
||||
private String confirm;
|
||||
|
||||
|
||||
|
||||
}
|
@ -45,16 +45,16 @@ public class BizShipmentPlanVo implements Serializable {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
// @ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 关联系统ID
|
||||
*/
|
||||
@ExcelProperty(value = "关联系统ID")
|
||||
// @ExcelProperty(value = "关联系统ID")
|
||||
private Long sid;
|
||||
|
||||
@ExcelProperty(value = "店铺名称")
|
||||
// @ExcelProperty(value = "店铺名称")
|
||||
private String sellerName;
|
||||
|
||||
/**
|
||||
@ -66,112 +66,112 @@ public class BizShipmentPlanVo implements Serializable {
|
||||
/**
|
||||
* 货件名称
|
||||
*/
|
||||
@ExcelProperty(value = "货件名称")
|
||||
// @ExcelProperty(value = "货件名称")
|
||||
private String shipmentName;
|
||||
|
||||
/**
|
||||
* 是否关闭
|
||||
*/
|
||||
@ExcelProperty(value = "是否关闭")
|
||||
// @ExcelProperty(value = "是否关闭")
|
||||
private String isClosed;
|
||||
|
||||
/**
|
||||
* 货件状态
|
||||
*/
|
||||
@ExcelProperty(value = "货件状态")
|
||||
// @ExcelProperty(value = "货件状态")
|
||||
private String shipmentStatus;
|
||||
|
||||
/**
|
||||
* 物流中心编码
|
||||
*/
|
||||
@ExcelProperty(value = "物流中心编码")
|
||||
// @ExcelProperty(value = "物流中心编码")
|
||||
private String destination;
|
||||
|
||||
/**
|
||||
* 运输模式
|
||||
*/
|
||||
@ExcelProperty(value = "运输模式")
|
||||
// @ExcelProperty(value = "运输模式")
|
||||
private String shippingMode;
|
||||
|
||||
/**
|
||||
* 运输方案
|
||||
*/
|
||||
@ExcelProperty(value = "运输方案")
|
||||
// @ExcelProperty(value = "运输方案")
|
||||
private String shippingSolution;
|
||||
|
||||
/**
|
||||
* 最后更新时间
|
||||
*/
|
||||
@ExcelProperty(value = "最后更新时间")
|
||||
// @ExcelProperty(value = "最后更新时间")
|
||||
private Date gmtModified;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
// @ExcelProperty(value = "创建时间")
|
||||
private Date gmtCreate;
|
||||
|
||||
/**
|
||||
* 同步时间
|
||||
*/
|
||||
@ExcelProperty(value = "同步时间")
|
||||
// @ExcelProperty(value = "同步时间")
|
||||
private Date receivingTime;
|
||||
|
||||
/**
|
||||
* 计划发货日期
|
||||
*/
|
||||
@ExcelProperty(value = "计划发货日期")
|
||||
// @ExcelProperty(value = "计划发货日期")
|
||||
private Date staShipmentDate;
|
||||
|
||||
/**
|
||||
* 预计到货开始日
|
||||
*/
|
||||
@ExcelProperty(value = "预计到货开始日")
|
||||
// @ExcelProperty(value = "预计到货开始日")
|
||||
private Date staDeliveryStartDate;
|
||||
|
||||
/**
|
||||
* 预计到货截止日
|
||||
*/
|
||||
@ExcelProperty(value = "预计到货截止日")
|
||||
// @ExcelProperty(value = "预计到货截止日")
|
||||
private Date staDeliveryEndDate;
|
||||
|
||||
/**
|
||||
* 发货地址
|
||||
*/
|
||||
@ExcelProperty(value = "发货地址")
|
||||
// @ExcelProperty(value = "发货地址")
|
||||
@TableField(value = "ship_from_address", typeHandler = AddressTypeHandler.class)
|
||||
private FbaShipmentApiResponse.Address shipFromAddress;
|
||||
|
||||
/**
|
||||
* 收货地址
|
||||
*/
|
||||
@ExcelProperty(value = "收货地址")
|
||||
// @ExcelProperty(value = "收货地址")
|
||||
@TableField(value = "ship_to_address", typeHandler = AddressTypeHandler.class)
|
||||
private FbaShipmentApiResponse.Address shipToAddress;
|
||||
|
||||
/**
|
||||
* 参考编号
|
||||
*/
|
||||
@ExcelProperty(value = "参考编号")
|
||||
// @ExcelProperty(value = "参考编号")
|
||||
private String referenceId;
|
||||
|
||||
/**
|
||||
* 入库计划ID
|
||||
*/
|
||||
@ExcelProperty(value = "入库计划ID")
|
||||
// @ExcelProperty(value = "入库计划ID")
|
||||
private String staInboundPlanId;
|
||||
|
||||
/**
|
||||
* 是否STA计划
|
||||
*/
|
||||
@ExcelProperty(value = "是否STA计划")
|
||||
// @ExcelProperty(value = "是否STA计划")
|
||||
private String isSta;
|
||||
|
||||
|
||||
/**
|
||||
* 运营操作货件状态
|
||||
*/
|
||||
@ExcelProperty(value = "运营操作货件状态")
|
||||
// @ExcelProperty(value = "运营操作货件状态")
|
||||
private String fbaStatus;
|
||||
|
||||
/**
|
||||
@ -189,27 +189,27 @@ public class BizShipmentPlanVo implements Serializable {
|
||||
/**
|
||||
* 总的物流商计重(单位:KG,物流商实际测量值)
|
||||
*/
|
||||
@ExcelProperty(value = "总的物流商计重", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "单=位:KG,物流商实际测量值")
|
||||
@ExcelProperty(value = "总的物流商计重")
|
||||
// @ExcelDictFormat(readConverterExp = "单=位:KG,物流商实际测量值")
|
||||
private Long vendorWeight;
|
||||
|
||||
/**
|
||||
* 套数(系统中的申报量)
|
||||
*/
|
||||
@ExcelProperty(value = "套数", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "系=统中的申报量")
|
||||
@ExcelProperty(value = "套数")
|
||||
// @ExcelDictFormat(readConverterExp = "系=统中的申报量")
|
||||
private Long setTotal;
|
||||
|
||||
/**
|
||||
* 渠道ID
|
||||
*/
|
||||
@ExcelProperty(value = "渠道ID")
|
||||
// @ExcelProperty(value = "渠道ID")
|
||||
private Long channelId;
|
||||
|
||||
/**
|
||||
* 物流渠道
|
||||
*/
|
||||
@ExcelProperty(value = "物流渠道")
|
||||
// @ExcelProperty(value = "物流渠道")
|
||||
private String channelName;
|
||||
|
||||
|
||||
|
@ -0,0 +1,15 @@
|
||||
package org.asinkj.amz.mapper;
|
||||
|
||||
import org.asinkj.amz.domain.BizInquiryBlacklist;
|
||||
import org.asinkj.amz.domain.vo.BizInquiryBlacklistVo;
|
||||
import org.asinkj.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 物流询价屏蔽记录Mapper接口
|
||||
*
|
||||
* @author shuo hu
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
public interface BizInquiryBlacklistMapper extends BaseMapperPlus<BizInquiryBlacklist, BizInquiryBlacklistVo> {
|
||||
|
||||
}
|
@ -1,9 +1,12 @@
|
||||
package org.asinkj.amz.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.asinkj.amz.domain.BizLogisticsOrder;
|
||||
import org.asinkj.amz.domain.vo.BizLogisticsOrderVo;
|
||||
import org.asinkj.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物流订单Mapper接口
|
||||
*
|
||||
@ -12,4 +15,9 @@ import org.asinkj.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
*/
|
||||
public interface BizLogisticsOrderMapper extends BaseMapperPlus<BizLogisticsOrder, BizLogisticsOrderVo> {
|
||||
|
||||
/**
|
||||
* 根据用户ID查询未删除的物流订单
|
||||
*/
|
||||
List<BizLogisticsOrder> selectOrdersByUserId(@Param("userId") Long userId);
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
package org.asinkj.amz.mapper;
|
||||
|
||||
import org.asinkj.amz.domain.BizLogisticsOrderQuotation;
|
||||
import org.asinkj.amz.domain.vo.BizLogisticsOrderQuotationVo;
|
||||
import org.asinkj.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 物流订单确认Mapper接口
|
||||
*
|
||||
* @author shuo hu
|
||||
* @date 2025-04-21
|
||||
*/
|
||||
public interface BizLogisticsOrderQuotationMapper extends BaseMapperPlus<BizLogisticsOrderQuotation, BizLogisticsOrderQuotationVo> {
|
||||
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
package org.asinkj.amz.service;
|
||||
|
||||
import org.asinkj.amz.domain.BizInquiryBlacklist;
|
||||
import org.asinkj.amz.domain.vo.BizInquiryBlacklistVo;
|
||||
import org.asinkj.amz.domain.bo.BizInquiryBlacklistBo;
|
||||
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-04-22
|
||||
*/
|
||||
public interface IBizInquiryBlacklistService {
|
||||
|
||||
/**
|
||||
* 查询物流询价屏蔽记录
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 物流询价屏蔽记录
|
||||
*/
|
||||
BizInquiryBlacklistVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询物流询价屏蔽记录列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 物流询价屏蔽记录分页列表
|
||||
*/
|
||||
TableDataInfo<BizInquiryBlacklistVo> queryPageList(BizInquiryBlacklistBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的物流询价屏蔽记录列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 物流询价屏蔽记录列表
|
||||
*/
|
||||
List<BizInquiryBlacklistVo> queryList(BizInquiryBlacklistBo bo);
|
||||
|
||||
/**
|
||||
* 新增物流询价屏蔽记录
|
||||
*
|
||||
* @param bo 物流询价屏蔽记录
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(BizInquiryBlacklistBo bo);
|
||||
|
||||
/**
|
||||
* 修改物流询价屏蔽记录
|
||||
*
|
||||
* @param bo 物流询价屏蔽记录
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(BizInquiryBlacklistBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除物流询价屏蔽记录信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
void insertByList(List<Long> list);
|
||||
|
||||
List<Long> queryByUserid(Long userId);
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
package org.asinkj.amz.service;
|
||||
|
||||
import org.asinkj.amz.domain.BizLogisticsOrderQuotation;
|
||||
import org.asinkj.amz.domain.vo.BizLogisticsOrderQuotationVo;
|
||||
import org.asinkj.amz.domain.bo.BizLogisticsOrderQuotationBo;
|
||||
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-04-21
|
||||
*/
|
||||
public interface IBizLogisticsOrderQuotationService {
|
||||
|
||||
/**
|
||||
* 查询物流订单确认
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 物流订单确认
|
||||
*/
|
||||
BizLogisticsOrderQuotationVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询物流订单确认列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 物流订单确认分页列表
|
||||
*/
|
||||
TableDataInfo<BizLogisticsOrderQuotationVo> queryPageList(BizLogisticsOrderQuotationBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的物流订单确认列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 物流订单确认列表
|
||||
*/
|
||||
List<BizLogisticsOrderQuotationVo> queryList(BizLogisticsOrderQuotationBo bo);
|
||||
|
||||
/**
|
||||
* 新增物流订单确认
|
||||
*
|
||||
* @param bo 物流订单确认
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(BizLogisticsOrderQuotationBo bo);
|
||||
|
||||
/**
|
||||
* 修改物流订单确认
|
||||
*
|
||||
* @param bo 物流订单确认
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(BizLogisticsOrderQuotationBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除物流订单确认信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
void quotationOrder(BizLogisticsOrderQuotationBo bo);
|
||||
}
|
@ -69,4 +69,6 @@ public interface IBizLogisticsOrderService {
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
void createByBo(BizLogisticsCreateOrderBo bo);
|
||||
|
||||
void updateByOrderId(BizLogisticsOrderBo bizLogisticsOrderBo);
|
||||
}
|
||||
|
@ -88,4 +88,6 @@ public interface IBizLogisticsQuoteService {
|
||||
List<InquiryQuoteStatusDTO> getTodayQuoteStatus();
|
||||
|
||||
List<BizLogisticsQuote> queryQuoteWithQuoteId(Set<Long> quoteIds);
|
||||
|
||||
TableDataInfo<BizLogisticsQuoteVo> listWithDes(String destination, String date);
|
||||
}
|
||||
|
@ -76,6 +76,8 @@ public interface ISysAmazonStoreService {
|
||||
|
||||
void pullAmzFBAData(String startDate,String endDate) throws Exception;
|
||||
|
||||
void updateAmzFBAData(String startDate, String endDate) throws Exception;
|
||||
|
||||
void pullAmzStaData(String startDate, String endDate, LingxinCallback lingxinCallback);
|
||||
|
||||
void pullAmzBoxData() throws Exception;
|
||||
|
@ -0,0 +1,158 @@
|
||||
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.asinkj.common.satoken.utils.LoginHelper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.asinkj.amz.domain.bo.BizInquiryBlacklistBo;
|
||||
import org.asinkj.amz.domain.vo.BizInquiryBlacklistVo;
|
||||
import org.asinkj.amz.domain.BizInquiryBlacklist;
|
||||
import org.asinkj.amz.mapper.BizInquiryBlacklistMapper;
|
||||
import org.asinkj.amz.service.IBizInquiryBlacklistService;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 物流询价屏蔽记录Service业务层处理
|
||||
*
|
||||
* @author shuo hu
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class BizInquiryBlacklistServiceImpl implements IBizInquiryBlacklistService {
|
||||
|
||||
private final BizInquiryBlacklistMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询物流询价屏蔽记录
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 物流询价屏蔽记录
|
||||
*/
|
||||
@Override
|
||||
public BizInquiryBlacklistVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询物流询价屏蔽记录列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 物流询价屏蔽记录分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<BizInquiryBlacklistVo> queryPageList(BizInquiryBlacklistBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<BizInquiryBlacklist> lqw = buildQueryWrapper(bo);
|
||||
Page<BizInquiryBlacklistVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的物流询价屏蔽记录列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 物流询价屏蔽记录列表
|
||||
*/
|
||||
@Override
|
||||
public List<BizInquiryBlacklistVo> queryList(BizInquiryBlacklistBo bo) {
|
||||
LambdaQueryWrapper<BizInquiryBlacklist> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<BizInquiryBlacklist> buildQueryWrapper(BizInquiryBlacklistBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<BizInquiryBlacklist> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getInquiryId() != null, BizInquiryBlacklist::getInquiryId, bo.getInquiryId());
|
||||
lqw.eq(bo.getProviderId() != null, BizInquiryBlacklist::getProviderId, bo.getProviderId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getIsBlocked()), BizInquiryBlacklist::getIsBlocked, bo.getIsBlocked());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增物流询价屏蔽记录
|
||||
*
|
||||
* @param bo 物流询价屏蔽记录
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(BizInquiryBlacklistBo bo) {
|
||||
BizInquiryBlacklist add = MapstructUtils.convert(bo, BizInquiryBlacklist.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物流询价屏蔽记录
|
||||
*
|
||||
* @param bo 物流询价屏蔽记录
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(BizInquiryBlacklistBo bo) {
|
||||
BizInquiryBlacklist update = MapstructUtils.convert(bo, BizInquiryBlacklist.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(BizInquiryBlacklist 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 insertByList(List<Long> list) {
|
||||
ArrayList<BizInquiryBlacklist> bizInquiryBlacklists = new ArrayList<>();
|
||||
for (Long s : list) {
|
||||
BizInquiryBlacklist bizInquiryBlacklist = new BizInquiryBlacklist();
|
||||
bizInquiryBlacklist.setInquiryId(s);
|
||||
bizInquiryBlacklist.setProviderId(LoginHelper.getUserId());
|
||||
bizInquiryBlacklist.setIsBlocked("1");
|
||||
bizInquiryBlacklists.add(bizInquiryBlacklist);
|
||||
}
|
||||
baseMapper.insertBatch(bizInquiryBlacklists);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Long> queryByUserid(Long userId) {
|
||||
if (userId != null) {
|
||||
LambdaQueryWrapper<BizInquiryBlacklist> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(BizInquiryBlacklist::getProviderId, userId);
|
||||
lqw.eq(BizInquiryBlacklist::getIsBlocked, "1");
|
||||
List<BizInquiryBlacklist> list = baseMapper.selectList(lqw);
|
||||
return list.stream().map(BizInquiryBlacklist::getInquiryId).toList();
|
||||
}
|
||||
return List.of();
|
||||
}
|
||||
}
|
@ -9,6 +9,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.asinkj.amz.domain.vo.BizLogisticsChannelVo;
|
||||
import org.asinkj.amz.domain.vo.InquiryRequestItemVo;
|
||||
import org.asinkj.amz.mapper.BizLogisticsQuoteMapper;
|
||||
import org.asinkj.amz.service.IBizInquiryBlacklistService;
|
||||
import org.asinkj.amz.service.IBizLogisticsChannelService;
|
||||
import org.asinkj.amz.service.IBizShipmentPlanService;
|
||||
import org.asinkj.common.core.domain.R;
|
||||
@ -73,6 +74,9 @@ public class BizInquiryRequestServiceImpl implements IBizInquiryRequestService {
|
||||
@Resource
|
||||
private IBizShipmentPlanService bizShipmentPlanService;
|
||||
|
||||
@Resource
|
||||
private IBizInquiryBlacklistService bizInquiryBlacklistService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询物流询价
|
||||
@ -125,6 +129,8 @@ public class BizInquiryRequestServiceImpl implements IBizInquiryRequestService {
|
||||
lqw.like(StringUtils.isNotBlank(bo.getChannelName()), BizInquiryRequest::getChannelName, bo.getChannelName());
|
||||
lqw.eq(bo.getEffectiveStartTime() != null, BizInquiryRequest::getEffectiveStartTime, bo.getEffectiveStartTime());
|
||||
lqw.eq(bo.getEffectiveEndTime() != null, BizInquiryRequest::getEffectiveEndTime, bo.getEffectiveEndTime());
|
||||
List<Long> ids = bizInquiryBlacklistService.queryByUserid(LoginHelper.getUserId());
|
||||
lqw.notIn(CollectionUtil.isNotEmpty(ids), BizInquiryRequest::getId, ids);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
@ -302,8 +308,8 @@ public class BizInquiryRequestServiceImpl implements IBizInquiryRequestService {
|
||||
|
||||
|
||||
/**
|
||||
* 创建单个询价单(带分布式锁)
|
||||
*/
|
||||
* 创建单个询价单(带分布式锁)
|
||||
*/
|
||||
@DistributedLock(
|
||||
prefix = "inquiry:create",
|
||||
params = {"request.channelId", "request.destination"}, // 从request对象提取字段
|
||||
@ -398,7 +404,6 @@ public class BizInquiryRequestServiceImpl implements IBizInquiryRequestService {
|
||||
}
|
||||
|
||||
|
||||
|
||||
private List<InquiryRequestItemVo> fiterItemsList(List<InquiryRequestItemVo> items) {
|
||||
LambdaQueryWrapper<BizInquiryRequest> wrapper = new LambdaQueryWrapper<>();
|
||||
for (InquiryRequestItemVo item : items) {
|
||||
|
@ -1,5 +1,6 @@
|
||||
package org.asinkj.amz.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.asinkj.amz.domain.BizLogisticsOrder;
|
||||
@ -161,6 +162,49 @@ public class BizLogisticsOrderDetailServiceImpl implements IBizLogisticsOrderDet
|
||||
|
||||
@Override
|
||||
public void updateList(List<BizLogisticsOrderDetailBo> list) {
|
||||
/**
|
||||
* 物流商确认接收 BOOKED
|
||||
* 已提货 PICKED_UP
|
||||
转运中 IN_TRANSIT
|
||||
已签收 DELIVERED
|
||||
排仓 SCHEDULING
|
||||
已开船 VESSEL_DEPARTED
|
||||
到港 PORT_ARRIVED
|
||||
查验中 CUSTOMS_CLEARANCE
|
||||
提取 CARGO_RELEASED
|
||||
|
||||
|
||||
carrier_confirm_time IS '物流商确认接收时间';
|
||||
goods_receipt_time IS '已提货时间';
|
||||
transfer_start_time IS '转运开始时间';
|
||||
signed_time IS '已签收时间';
|
||||
schedule_time IS '排仓时间';
|
||||
vessel_depart_time IS '已开船时间';
|
||||
port_arrival_time IS '目的港到达时间';
|
||||
inspection_time IS '查验开始时间';
|
||||
delivery_pickup_time IS '末端提取时间';
|
||||
*/
|
||||
for (BizLogisticsOrderDetailBo item : list) {
|
||||
if ("BOOKED".equals(item.getLogisticsStatus())){
|
||||
// item.setCarrierConfirmTime(DateUtil.date());
|
||||
}else if ("PICKED_UP".equals(item.getLogisticsStatus())){
|
||||
item.setGoodsReceiptTime(DateUtil.date());
|
||||
}else if ("IN_TRANSIT".equals(item.getLogisticsStatus())){
|
||||
item.setTransferStartTime(DateUtil.date());
|
||||
}else if ("DELIVERED".equals(item.getLogisticsStatus())){
|
||||
item.setSignedTime(DateUtil.date());
|
||||
}else if ("SCHEDULING".equals(item.getLogisticsStatus())){
|
||||
item.setScheduleTime(DateUtil.date());
|
||||
}else if ("VESSEL_DEPARTED".equals(item.getLogisticsStatus())){
|
||||
item.setVesselDepartTime(DateUtil.date());
|
||||
}else if ("PORT_ARRIVED".equals(item.getLogisticsStatus())){
|
||||
item.setPortArrivalTime(DateUtil.date());
|
||||
}else if ("CUSTOMS_CLEARANCE".equals(item.getLogisticsStatus())){
|
||||
item.setInspectionTime(DateUtil.date());
|
||||
}else if ("CARGO_RELEASED".equals(item.getLogisticsStatus())){
|
||||
item.setDeliveryPickupTime(DateUtil.date());
|
||||
}
|
||||
}
|
||||
baseMapper.updateBatchById(MapstructUtils.convert(list, BizLogisticsOrderDetail.class));
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,275 @@
|
||||
package org.asinkj.amz.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.asinkj.amz.domain.*;
|
||||
import org.asinkj.amz.domain.vo.BizLogisticsQuoteVo;
|
||||
import org.asinkj.amz.domain.vo.BizShipmentPlanVo;
|
||||
import org.asinkj.amz.mapper.BizLogisticsOrderDetailMapper;
|
||||
import org.asinkj.amz.mapper.BizLogisticsOrderMapper;
|
||||
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.system.api.RemoteUserService;
|
||||
import org.asinkj.utils.SerialNoGenerator;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.asinkj.amz.domain.bo.BizLogisticsOrderQuotationBo;
|
||||
import org.asinkj.amz.domain.vo.BizLogisticsOrderQuotationVo;
|
||||
import org.asinkj.amz.mapper.BizLogisticsOrderQuotationMapper;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 物流订单确认Service业务层处理
|
||||
*
|
||||
* @author shuo hu
|
||||
* @date 2025-04-21
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
@Slf4j
|
||||
public class BizLogisticsOrderQuotationServiceImpl implements IBizLogisticsOrderQuotationService {
|
||||
|
||||
private static final BigDecimal LB_TO_KG_RATIO = new BigDecimal("0.45359237");
|
||||
|
||||
private final BizLogisticsOrderQuotationMapper 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;
|
||||
|
||||
@Resource
|
||||
private RemoteUserService remoteUserService;
|
||||
|
||||
/**
|
||||
* 查询物流订单确认
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 物流订单确认
|
||||
*/
|
||||
@Override
|
||||
public BizLogisticsOrderQuotationVo queryById(Long id) {
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询物流订单确认列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 物流订单确认分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<BizLogisticsOrderQuotationVo> queryPageList(BizLogisticsOrderQuotationBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<BizLogisticsOrderQuotation> lqw = buildQueryWrapper(bo);
|
||||
Page<BizLogisticsOrderQuotationVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的物流订单确认列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 物流订单确认列表
|
||||
*/
|
||||
@Override
|
||||
public List<BizLogisticsOrderQuotationVo> queryList(BizLogisticsOrderQuotationBo bo) {
|
||||
LambdaQueryWrapper<BizLogisticsOrderQuotation> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<BizLogisticsOrderQuotation> buildQueryWrapper(BizLogisticsOrderQuotationBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<BizLogisticsOrderQuotation> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFbaShipmentId()), BizLogisticsOrderQuotation::getFbaShipmentId, bo.getFbaShipmentId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getOrderId()), BizLogisticsOrderQuotation::getOrderId, bo.getOrderId());
|
||||
lqw.eq(bo.getLogisticsProviderId() != null, BizLogisticsOrderQuotation::getLogisticsProviderId, bo.getLogisticsProviderId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getLogisticsProviderName()), BizLogisticsOrderQuotation::getLogisticsProviderName, bo.getLogisticsProviderName());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getChannelName()), BizLogisticsOrderQuotation::getChannelName, bo.getChannelName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDestination()), BizLogisticsOrderQuotation::getDestination, bo.getDestination());
|
||||
lqw.eq(bo.getBoxQuantity() != null, BizLogisticsOrderQuotation::getBoxQuantity, bo.getBoxQuantity());
|
||||
lqw.eq(bo.getShipmentQuantity() != null, BizLogisticsOrderQuotation::getShipmentQuantity, bo.getShipmentQuantity());
|
||||
lqw.eq(bo.getQuoteOrderId() != null, BizLogisticsOrderQuotation::getQuoteOrderId, bo.getQuoteOrderId());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增物流订单确认
|
||||
*
|
||||
* @param bo 物流订单确认
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(BizLogisticsOrderQuotationBo bo) {
|
||||
BizLogisticsOrderQuotation add = MapstructUtils.convert(bo, BizLogisticsOrderQuotation.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物流订单确认
|
||||
*
|
||||
* @param bo 物流订单确认
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(BizLogisticsOrderQuotationBo bo) {
|
||||
BizLogisticsOrderQuotation update = MapstructUtils.convert(bo, BizLogisticsOrderQuotation.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(BizLogisticsOrderQuotation 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 quotationOrder(BizLogisticsOrderQuotationBo bo) {
|
||||
Long logicQuoteId = bo.getQuoteOrderId();
|
||||
BizLogisticsQuoteVo quoteVo = bizLogisticsQuoteService.queryById(logicQuoteId);
|
||||
|
||||
if (quoteVo == null) {
|
||||
throw new ServiceException("物流报价不存在");
|
||||
}
|
||||
String fbaShipmentId = bo.getFbaShipmentId();
|
||||
BizShipmentPlanVo planVo = bizShipmentPlanService.queryByfbaShipmentId(fbaShipmentId);
|
||||
if (planVo == null) {
|
||||
throw new ServiceException("物流计划不存在");
|
||||
}
|
||||
|
||||
if (planVo.getShipmentStatus().equals("CLOSED")) {
|
||||
throw new ServiceException("物流计划已关闭");
|
||||
}
|
||||
if (planVo.getIsClosed().equals("Y")) {
|
||||
throw new ServiceException("物流计划已关闭");
|
||||
}
|
||||
LambdaQueryWrapper<BizLogisticsOrder> bizLogisticsOrderLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
bizLogisticsOrderLambdaQueryWrapper.eq(BizLogisticsOrder::getFbaShipmentId, fbaShipmentId);
|
||||
Long l = bizOrderMapper.selectCount(bizLogisticsOrderLambdaQueryWrapper);
|
||||
if (l > 0) {
|
||||
throw new ServiceException("物流订单已存在");
|
||||
}
|
||||
|
||||
|
||||
List<BizShipmentTracking> trackingList = bizShipmentTrackingService.queryByPlanId(planVo.getShipmentId());
|
||||
|
||||
List<BizShipmentItem> itemList = bizShipmentItemService.queryByPlanId(planVo.getShipmentId());
|
||||
long sum = itemList.stream().filter(item -> item.getQuantityShipped() != null).mapToLong(BizShipmentItem::getQuantityShipped).sum();
|
||||
|
||||
|
||||
BizLogisticsOrder bizLogisticsOrder = new BizLogisticsOrder();
|
||||
bizLogisticsOrder.setFbaShipmentId(fbaShipmentId);
|
||||
|
||||
//订单编号
|
||||
bizLogisticsOrder.setOrderId(SerialNoGenerator.generateOrderNo());
|
||||
|
||||
bizLogisticsOrder.setLogisticsProviderId(quoteVo.getUserId());
|
||||
String nickName = remoteUserService.selectNicknameById(quoteVo.getUserId());
|
||||
bizLogisticsOrder.setLogisticsProviderName(nickName);
|
||||
|
||||
bizLogisticsOrder.setQuoteOrderId(bo.getQuoteOrderId());
|
||||
|
||||
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());
|
||||
detail.setLogisticsProviderName(nickName);
|
||||
detail.setChannelName(quoteVo.getChannelName());
|
||||
detail.setDestination(quoteVo.getDestination());
|
||||
detail.setPricePerKg(quoteVo.getPrice());
|
||||
detail.setPlannedQuantity(bizShipmentTracking.getTotal());
|
||||
detail.setCarrierConfirmTime(DateUtil.date());
|
||||
BigDecimal lb = new BigDecimal(bizShipmentTracking.getWeight());
|
||||
|
||||
// 计算kg值(乘法运算)
|
||||
BigDecimal kgValue = lb.multiply(LB_TO_KG_RATIO);
|
||||
|
||||
// 保留两位小数并四舍五入
|
||||
kgValue = kgValue.setScale(2, RoundingMode.HALF_UP);
|
||||
|
||||
|
||||
detail.setSupplierWeight(kgValue.longValue());
|
||||
// detail.setLogisticsStatus("IN_WAREHOUSE");
|
||||
detail.setLogisticsStatus("BOOKED");
|
||||
detail.setQuoteOrderId(bo.getQuoteOrderId());
|
||||
// detail.setPlannedQuantity(bizShipmentTracking.getQuantity());
|
||||
// detail.setShipmentQuantity(sum);
|
||||
// detail.setTrackingNumber(bizShipmentTracking.getTrackingNumber());
|
||||
orderDetailList.add(detail);
|
||||
}
|
||||
|
||||
int insert = bizOrderMapper.insert(bizLogisticsOrder);
|
||||
|
||||
boolean b = bizLogisticsOrderDetailMapper.insertBatch(orderDetailList);
|
||||
|
||||
bo.setConfirm("1");
|
||||
updateByBo(bo);
|
||||
log.info("物流订单创建成功");
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,11 +1,13 @@
|
||||
package org.asinkj.amz.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
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.mapper.BizLogisticsOrderQuotationMapper;
|
||||
import org.asinkj.amz.service.*;
|
||||
import org.asinkj.common.core.exception.ServiceException;
|
||||
import org.asinkj.common.core.utils.MapstructUtils;
|
||||
@ -65,6 +67,10 @@ public class BizLogisticsOrderServiceImpl implements IBizLogisticsOrderService {
|
||||
@Resource
|
||||
private BizLogisticsOrderMapper bizOrderMapper;
|
||||
|
||||
|
||||
@Resource
|
||||
private BizLogisticsOrderQuotationMapper bizLogisticsOrderQuotationMapper;
|
||||
|
||||
@Resource
|
||||
private RemoteUserService remoteUserService;
|
||||
|
||||
@ -217,6 +223,13 @@ public class BizLogisticsOrderServiceImpl implements IBizLogisticsOrderService {
|
||||
throw new ServiceException("物流订单已存在");
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<BizLogisticsOrderQuotation> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(BizLogisticsOrderQuotation::getFbaShipmentId, fbaShipmentId);
|
||||
Long l2 = bizLogisticsOrderQuotationMapper.selectCount(lambdaQueryWrapper);
|
||||
if (l2 > 0) {
|
||||
throw new ServiceException("订单确认订单已存在");
|
||||
}
|
||||
|
||||
|
||||
List<BizShipmentTracking> trackingList = bizShipmentTrackingService.queryByPlanId(planVo.getShipmentId());
|
||||
|
||||
@ -224,64 +237,73 @@ public class BizLogisticsOrderServiceImpl implements IBizLogisticsOrderService {
|
||||
long sum = itemList.stream().filter(item -> item.getQuantityShipped() != null).mapToLong(BizShipmentItem::getQuantityShipped).sum();
|
||||
|
||||
|
||||
BizLogisticsOrder bizLogisticsOrder = new BizLogisticsOrder();
|
||||
bizLogisticsOrder.setFbaShipmentId(fbaShipmentId);
|
||||
BizLogisticsOrderQuotation bizLogisticsOrderQuotation = new BizLogisticsOrderQuotation();
|
||||
bizLogisticsOrderQuotation.setFbaShipmentId(fbaShipmentId);
|
||||
|
||||
//订单编号
|
||||
bizLogisticsOrder.setOrderId(SerialNoGenerator.generateOrderNo());
|
||||
bizLogisticsOrderQuotation.setOrderId(SerialNoGenerator.generateOrderNo());
|
||||
|
||||
bizLogisticsOrder.setLogisticsProviderId(quoteVo.getUserId());
|
||||
bizLogisticsOrderQuotation.setLogisticsProviderId(quoteVo.getUserId());
|
||||
String nickName = remoteUserService.selectNicknameById(quoteVo.getUserId());
|
||||
bizLogisticsOrder.setLogisticsProviderName(nickName);
|
||||
bizLogisticsOrderQuotation.setLogisticsProviderName(nickName);
|
||||
|
||||
bizLogisticsOrder.setQuoteOrderId(Long.valueOf(bo.getLogicQuoteId()));
|
||||
bizLogisticsOrderQuotation.setQuoteOrderId(Long.valueOf(bo.getLogicQuoteId()));
|
||||
|
||||
bizLogisticsOrder.setChannelName(quoteVo.getChannelName());
|
||||
bizLogisticsOrderQuotation.setChannelName(quoteVo.getChannelName());
|
||||
// 目的地
|
||||
bizLogisticsOrder.setDestination(quoteVo.getDestination());
|
||||
bizLogisticsOrderQuotation.setDestination(quoteVo.getDestination());
|
||||
|
||||
//总箱子数量
|
||||
bizLogisticsOrder.setBoxQuantity((long) trackingList.size());
|
||||
bizLogisticsOrderQuotation.setBoxQuantity((long) trackingList.size());
|
||||
//总货件数量
|
||||
bizLogisticsOrder.setShipmentQuantity(sum);
|
||||
bizLogisticsOrderQuotation.setShipmentQuantity(sum);
|
||||
|
||||
|
||||
ArrayList<BizLogisticsOrderDetail> orderDetailList = new ArrayList<>();
|
||||
// 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());
|
||||
// detail.setLogisticsProviderName(nickName);
|
||||
// detail.setChannelName(quoteVo.getChannelName());
|
||||
// detail.setDestination(quoteVo.getDestination());
|
||||
// detail.setPricePerKg(quoteVo.getPrice());
|
||||
// detail.setPlannedQuantity(bizShipmentTracking.getTotal());
|
||||
//
|
||||
// BigDecimal lb = new BigDecimal(bizShipmentTracking.getWeight());
|
||||
//
|
||||
// // 计算kg值(乘法运算)
|
||||
// BigDecimal kgValue = lb.multiply(LB_TO_KG_RATIO);
|
||||
//
|
||||
// // 保留两位小数并四舍五入
|
||||
// kgValue = kgValue.setScale(2, RoundingMode.HALF_UP);
|
||||
//
|
||||
//
|
||||
// detail.setSupplierWeight(kgValue.longValue());
|
||||
// detail.setLogisticsStatus("IN_WAREHOUSE");
|
||||
// detail.setQuoteOrderId(Long.valueOf(bo.getLogicQuoteId()));
|
||||
//// detail.setPlannedQuantity(bizShipmentTracking.getQuantity());
|
||||
//// detail.setShipmentQuantity(sum);
|
||||
//// detail.setTrackingNumber(bizShipmentTracking.getTrackingNumber());
|
||||
// orderDetailList.add(detail);
|
||||
// }
|
||||
|
||||
for (BizShipmentTracking bizShipmentTracking : trackingList) {
|
||||
BizLogisticsOrderDetail detail = new BizLogisticsOrderDetail();
|
||||
detail.setFbaShipmentId(fbaShipmentId);
|
||||
detail.setOrderId(bizLogisticsOrder.getOrderId());
|
||||
detail.setFbaBoxNumber(bizShipmentTracking.getBoxId());
|
||||
detail.setLogisticsProviderId(quoteVo.getUserId());
|
||||
detail.setLogisticsProviderName(nickName);
|
||||
detail.setChannelName(quoteVo.getChannelName());
|
||||
detail.setDestination(quoteVo.getDestination());
|
||||
detail.setPricePerKg(quoteVo.getPrice());
|
||||
detail.setPlannedQuantity(bizShipmentTracking.getTotal());
|
||||
int insert = bizLogisticsOrderQuotationMapper.insert(bizLogisticsOrderQuotation);
|
||||
|
||||
BigDecimal lb = new BigDecimal(bizShipmentTracking.getWeight());
|
||||
|
||||
// 计算kg值(乘法运算)
|
||||
BigDecimal kgValue = lb.multiply(LB_TO_KG_RATIO);
|
||||
|
||||
// 保留两位小数并四舍五入
|
||||
kgValue = kgValue.setScale(2, RoundingMode.HALF_UP);
|
||||
|
||||
|
||||
detail.setSupplierWeight(kgValue.longValue());
|
||||
detail.setLogisticsStatus("IN_WAREHOUSE");
|
||||
// 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("物流订单创建成功");
|
||||
// boolean b = bizLogisticsOrderDetailMapper.insertBatch(orderDetailList);
|
||||
log.info("物流订单确认创建成功");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateByOrderId(BizLogisticsOrderBo bizLogisticsOrderBo) {
|
||||
LambdaUpdateWrapper<BizLogisticsOrder> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.eq(BizLogisticsOrder::getOrderId, bizLogisticsOrderBo.getOrderId())
|
||||
.set(BizLogisticsOrder::getPodUrl, bizLogisticsOrderBo.getPodUrl());
|
||||
baseMapper.update(updateWrapper);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -258,16 +258,16 @@ public class BizLogisticsQuoteServiceImpl implements IBizLogisticsQuoteService {
|
||||
.eq(BizLogisticsQuote::getQuoteDate, bo.getQuoteEndDate())
|
||||
;
|
||||
List<BizLogisticsQuote> bizLogisticsQuotes = baseMapper.selectList(queryWrapper);
|
||||
if (bizLogisticsQuotes.size() == 0){
|
||||
if (bizLogisticsQuotes.size() == 0) {
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
BigDecimal average = bizLogisticsQuotes.stream()
|
||||
.map(BizLogisticsQuote::getPrice)
|
||||
.filter(Objects::nonNull)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add)
|
||||
.divide(new BigDecimal(bizLogisticsQuotes.size()), 2, RoundingMode.HALF_UP);
|
||||
.map(BizLogisticsQuote::getPrice)
|
||||
.filter(Objects::nonNull)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add)
|
||||
.divide(new BigDecimal(bizLogisticsQuotes.size()), 2, RoundingMode.HALF_UP);
|
||||
|
||||
if (average.compareTo(bo.getPrice()) > 0){
|
||||
if (average.compareTo(bo.getPrice()) > 0) {
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
@ -329,6 +329,20 @@ public class BizLogisticsQuoteServiceImpl implements IBizLogisticsQuoteService {
|
||||
return List.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<BizLogisticsQuoteVo> listWithDes(String destination, String date) {
|
||||
if (StringUtils.isNotBlank(destination)) {
|
||||
LambdaQueryWrapper<BizLogisticsQuote> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(BizLogisticsQuote::getDestination, destination);
|
||||
|
||||
queryWrapper.eq(BizLogisticsQuote::getQuoteDate, date);
|
||||
|
||||
return TableDataInfo.build(baseMapper.selectVoList(queryWrapper));
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
// 解析 target_providers 字符串为物流商ID列表
|
||||
private List<Long> parseTargetProviders(String targetProviders) {
|
||||
|
@ -357,7 +357,7 @@ public class BizShipmentPlanServiceImpl implements IBizShipmentPlanService {
|
||||
long sum = bizLogisticsOrderDetails1.stream().filter(item -> item.getLogisticsWeight() != null).mapToLong(BizLogisticsOrderDetail::getLogisticsWeight).sum();
|
||||
bizShipmentPlanVo.setLogisticWeight(sum);
|
||||
|
||||
long l = bizShipmentPlanVo.getLogisticWeight() - bizShipmentPlanVo.getVendorWeight();
|
||||
long l = Optional.ofNullable(bizShipmentPlanVo.getLogisticWeight()).orElse(0L) - Optional.ofNullable(bizShipmentPlanVo.getVendorWeight()).orElse(0L);
|
||||
bizShipmentPlanVo.setWeightDiff(l);
|
||||
}
|
||||
bizShipmentPlanVo.setBoxQuantity(count);
|
||||
|
@ -45,6 +45,7 @@ import org.asinkj.amz.domain.vo.SysAmazonStoreVo;
|
||||
import org.asinkj.amz.domain.SysAmazonStore;
|
||||
import org.asinkj.amz.mapper.SysAmazonStoreMapper;
|
||||
import org.asinkj.amz.service.ISysAmazonStoreService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.context.request.RequestAttributes;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
|
||||
@ -52,6 +53,7 @@ import javax.annotation.Resource;
|
||||
import java.io.IOException;
|
||||
import java.time.Duration;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static jodd.util.ThreadUtil.sleep;
|
||||
@ -147,7 +149,7 @@ public class SysAmazonStoreServiceImpl implements ISysAmazonStoreService {
|
||||
lqw.eq(bo.getHasAdsSetting() != null, SysAmazonStore::getHasAdsSetting, bo.getHasAdsSetting());
|
||||
lqw.eq(bo.getStatus() != null, SysAmazonStore::getStatus, bo.getStatus());
|
||||
lqw.orderByDesc(SysAmazonStore::getSid);
|
||||
if (!LoginHelper.isSuperAdmin()&&!LoginHelper.isManagerAdmin()){
|
||||
if (!LoginHelper.isSuperAdmin() && !LoginHelper.isManagerAdmin()) {
|
||||
lqw.eq(SysAmazonStore::getUserId, LoginHelper.getUserId());
|
||||
}
|
||||
return lqw;
|
||||
@ -412,6 +414,81 @@ public class SysAmazonStoreServiceImpl implements ISysAmazonStoreService {
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void updateAmzFBAData(String startDate, String endDate) throws Exception {
|
||||
|
||||
Map<String, String> queryParam = new HashMap<>();
|
||||
List<SysAmazonStore> sysAmazonStores = baseMapper.selectList();
|
||||
String sids = sysAmazonStores.stream().map(item -> String.valueOf(item.getSid())).collect(Collectors.joining(","));
|
||||
log.info("sids:{}", sids);
|
||||
queryParam.put("sid", "153");
|
||||
queryParam.put("start_date", startDate);
|
||||
queryParam.put("end_date", endDate);
|
||||
queryParam.put("shipment_status", "RECEIVING");
|
||||
|
||||
RequestAttributes ra = RequestContextHolder.getRequestAttributes();
|
||||
|
||||
HttpUtil.postWithUrlParams("/erp/sc/data/fba_report/shipmentList", queryParam, new Callback() {
|
||||
@Override
|
||||
public void onFailure(@NotNull Call call, @NotNull IOException e) {
|
||||
|
||||
log.info("onFailure");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
|
||||
|
||||
RequestContextHolder.setRequestAttributes(ra);
|
||||
try {
|
||||
|
||||
String string = response.body().string();
|
||||
log.info("string:{}", string);
|
||||
JSONObject jsonObject = JSONObject.parse(string);
|
||||
JSONObject data = jsonObject.getJSONObject("data");
|
||||
if (ObjectUtil.isEmpty(data)) {
|
||||
log.info("未获取到库存");
|
||||
return;
|
||||
}
|
||||
|
||||
JSONArray list = data.getJSONArray("list");
|
||||
if (CollectionUtil.isEmpty(list)) {
|
||||
log.info("未获取到库存");
|
||||
return;
|
||||
}
|
||||
log.info("data:{}", list);
|
||||
List<FbaShipmentApiResponse.ShipmentPlan> listData = list.toList(FbaShipmentApiResponse.ShipmentPlan.class);
|
||||
log.info("fbaShipmentApiResponse:{}", listData);
|
||||
Set<String> shipmentIds = listData.stream().map(FbaShipmentApiResponse.ShipmentPlan::getShipmentId).collect(Collectors.toSet());
|
||||
// 查询数据库中存在的shipmentId 使用mybatis-plus批量查询
|
||||
List<BizShipmentPlan> bizShipmentPlans = bizShipmentPlanMapper.selectList(new LambdaQueryWrapper<BizShipmentPlan>().in(BizShipmentPlan::getShipmentId, shipmentIds));
|
||||
Set<String> selectExistingShipmentIds = bizShipmentPlans.stream().map(BizShipmentPlan::getShipmentId).collect(Collectors.toSet());
|
||||
|
||||
|
||||
listData.removeIf(shipmentPlan -> !selectExistingShipmentIds.contains(shipmentPlan.getShipmentId()));
|
||||
|
||||
Map<String, FbaShipmentApiResponse.ShipmentPlan> collect = listData.stream().collect(Collectors.toMap(FbaShipmentApiResponse.ShipmentPlan::getShipmentId, Function.identity()));
|
||||
|
||||
for (BizShipmentPlan bizShipmentPlan : bizShipmentPlans) {
|
||||
FbaShipmentApiResponse.ShipmentPlan shipmentPlan = collect.get(bizShipmentPlan.getShipmentId());
|
||||
if (ObjectUtil.isNotEmpty(shipmentPlan)) {
|
||||
bizShipmentPlan.setShipmentStatus(shipmentPlan.getShipmentStatus());
|
||||
if (StrUtil.isNotEmpty(shipmentPlan.getReceivingTime())) {
|
||||
bizShipmentPlan.setReceivingTime(DateUtil.parseTime(shipmentPlan.getReceivingTime()));
|
||||
}
|
||||
}
|
||||
}
|
||||
bizShipmentPlanMapper.updateById(bizShipmentPlans);
|
||||
|
||||
} finally {
|
||||
RequestContextHolder.resetRequestAttributes();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -493,8 +570,8 @@ public class SysAmazonStoreServiceImpl implements ISysAmazonStoreService {
|
||||
log.info("key:{}", key);
|
||||
List<AmzStaApiResponse.Shipment> shipments = shipmentHashMap.get(key);
|
||||
|
||||
List<String> shipmentIdList = shipments.stream().map(c->{
|
||||
if (selectExistingShipmentIds.contains(c.getShipmentConfirmationId())){
|
||||
List<String> shipmentIdList = shipments.stream().map(c -> {
|
||||
if (selectExistingShipmentIds.contains(c.getShipmentConfirmationId())) {
|
||||
return null;
|
||||
}
|
||||
return c.getShipmentId();
|
||||
@ -512,7 +589,7 @@ public class SysAmazonStoreServiceImpl implements ISysAmazonStoreService {
|
||||
shipmentParms.put("shipmentIds", JSON.toJSON(shipmentIdList));
|
||||
|
||||
String gmtDate = gmtCreateDateMap.get(key);
|
||||
makeShipmentRequest(shipmentParms, bizShipmentPlans,bizShipmentItems,gmtDate);
|
||||
makeShipmentRequest(shipmentParms, bizShipmentPlans, bizShipmentItems, gmtDate);
|
||||
|
||||
|
||||
Map<String, Object> boxParms = new HashMap<>();
|
||||
@ -525,18 +602,8 @@ public class SysAmazonStoreServiceImpl implements ISysAmazonStoreService {
|
||||
makeBoxRequest(boxParms, shipmentMap, bizTrackingList);
|
||||
}
|
||||
|
||||
log.info("bizShipmentPlans:{}", bizShipmentPlans);
|
||||
|
||||
if (CollectionUtil.isNotEmpty(bizShipmentPlans)) {
|
||||
bizShipmentPlanMapper.insertBatch(bizShipmentPlans);
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(bizTrackingList)) {
|
||||
bizShipmentTrackingMapper.insertBatch(bizTrackingList);
|
||||
}
|
||||
|
||||
if (CollectionUtil.isNotEmpty(bizShipmentItems)) {
|
||||
bizShipmentItemMapper.insertBatch(bizShipmentItems);
|
||||
}
|
||||
insertDatas(bizShipmentPlans, bizTrackingList, bizShipmentItems);
|
||||
lingxinCallback.onFinished("获取货件信息完成", 200);
|
||||
|
||||
} catch (Exception e) {
|
||||
@ -546,6 +613,28 @@ public class SysAmazonStoreServiceImpl implements ISysAmazonStoreService {
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
private void insertDatas(List<BizShipmentPlan> bizShipmentPlans, List<BizShipmentTracking> bizTrackingList, List<BizShipmentItem> bizShipmentItems) {
|
||||
log.info("bizShipmentPlans:{}", bizShipmentPlans);
|
||||
ArrayList<String> shipmentIdList = new ArrayList<>();
|
||||
if (CollectionUtil.isNotEmpty(bizShipmentPlans)) {
|
||||
Set<BizShipmentPlan> readyToShip = bizShipmentPlans.stream().filter(bizShipmentPlan -> bizShipmentPlan.getShipmentStatus().equals("READY_TO_SHIP")).collect(Collectors.toSet());
|
||||
bizShipmentPlanMapper.insertBatch(readyToShip);
|
||||
shipmentIdList.addAll(readyToShip.stream().map(BizShipmentPlan::getShipmentId).toList());
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(bizTrackingList)) {
|
||||
List<BizShipmentTracking> collect = bizTrackingList.stream().filter(bizShipmentTracking -> shipmentIdList.contains(bizShipmentTracking.getShipmentId())).collect(Collectors.toList());
|
||||
|
||||
bizShipmentTrackingMapper.insertBatch(collect);
|
||||
}
|
||||
|
||||
if (CollectionUtil.isNotEmpty(bizShipmentItems)) {
|
||||
List<BizShipmentItem> collect = bizShipmentItems.stream().filter(bizShipmentItem -> shipmentIdList.contains(bizShipmentItem.getShipmentId())).collect(Collectors.toList());
|
||||
|
||||
bizShipmentItemMapper.insertBatch(collect);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@ -575,7 +664,7 @@ public class SysAmazonStoreServiceImpl implements ISysAmazonStoreService {
|
||||
sleep(1000);
|
||||
}
|
||||
|
||||
private List<BizShipmentPlan> makeShipmentRequest(Map<String, Object> shipmentParms, List<BizShipmentPlan> bizShipmentPlans,List<BizShipmentItem> bizShipmentItems,String gmtDate) throws IOException {
|
||||
private List<BizShipmentPlan> makeShipmentRequest(Map<String, Object> shipmentParms, List<BizShipmentPlan> bizShipmentPlans, List<BizShipmentItem> bizShipmentItems, String gmtDate) throws IOException {
|
||||
String shipmentString = HttpUtil.postWithParamsSync("/amzStaServer/openapi/inbound-shipment/shipmentDetailList", shipmentParms);
|
||||
|
||||
log.info("查询货件详情:{}", shipmentString);
|
||||
|
@ -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.BizInquiryBlacklistMapper">
|
||||
|
||||
</mapper>
|
@ -1,7 +1,22 @@
|
||||
<?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">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.asinkj.amz.mapper.BizLogisticsOrderMapper">
|
||||
|
||||
<select id="selectOrdersByUserId" resultType="org.asinkj.amz.domain.BizLogisticsOrder">
|
||||
SELECT blo.*
|
||||
FROM biz_logistics_order blo
|
||||
WHERE blo.logistics_provider_id = #{userId} -- 替换为实际物流商ID
|
||||
AND blo.del_flag = '0'
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM biz_logistics_order_detail blod
|
||||
WHERE blod.order_id = blo.order_id
|
||||
AND blod.del_flag = '0'
|
||||
AND blod.estimated_delivery_date BETWEEN CURRENT_DATE AND CURRENT_DATE + INTERVAL '5 days'
|
||||
AND blod.logistics_status != 'delivered'
|
||||
LIMIT 1 -- 明确只需判断存在至少一条符合条件的明细
|
||||
);
|
||||
</select>
|
||||
</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.BizLogisticsOrderQuotationMapper">
|
||||
|
||||
</mapper>
|
25
asinkj-gateway/DockerfileLocal
Normal file
25
asinkj-gateway/DockerfileLocal
Normal file
@ -0,0 +1,25 @@
|
||||
# 贝尔实验室 Spring 官方推荐镜像 JDK下载地址 https://bell-sw.com/pages/downloads/
|
||||
FROM amazoncorretto:17.0.14
|
||||
|
||||
LABEL maintainer="Shuo Hu "
|
||||
|
||||
ENV TZ=Asia/Shanghai
|
||||
|
||||
RUN mkdir -p /asinkj/gateway/logs \
|
||||
/asinkj/gateway/temp \
|
||||
/asinkj/skywalking/agent
|
||||
|
||||
WORKDIR /asinkj/gateway
|
||||
|
||||
ENV SERVER_PORT=8080 LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS=""
|
||||
|
||||
EXPOSE ${SERVER_PORT}
|
||||
|
||||
ADD ./target/asinkj-gateway.jar ./app.jar
|
||||
|
||||
ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom -Dserver.port=${SERVER_PORT} \
|
||||
-Dspring.profiles.active="prod" \
|
||||
#-Dskywalking.agent.service_name=asinkj-gateway \
|
||||
#-javaagent:/asinkj/skywalking/agent/skywalking-agent.jar \
|
||||
-XX:+HeapDumpOnOutOfMemoryError -XX:+UseZGC ${JAVA_OPTS} \
|
||||
-jar app.jar
|
@ -53,7 +53,7 @@ public class SysOssController extends BaseController {
|
||||
*
|
||||
* @param ossIds OSS对象ID串
|
||||
*/
|
||||
@SaCheckPermission("system:oss:list")
|
||||
// @SaCheckPermission("system:oss:list")
|
||||
@GetMapping("/listByIds/{ossIds}")
|
||||
public R<List<SysOssVo>> listByIds(@NotEmpty(message = "主键不能为空") @PathVariable Long[] ossIds) {
|
||||
List<SysOssVo> list = iSysOssService.listByIds(Arrays.asList(ossIds));
|
||||
@ -65,7 +65,7 @@ public class SysOssController extends BaseController {
|
||||
*
|
||||
* @param file 文件
|
||||
*/
|
||||
@SaCheckPermission("system:oss:upload")
|
||||
// @SaCheckPermission("system:oss:upload")
|
||||
@Log(title = "OSS对象存储", businessType = BusinessType.INSERT)
|
||||
@PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
public R<SysOssUploadVo> upload(@RequestPart("file") MultipartFile file) {
|
||||
@ -96,7 +96,7 @@ public class SysOssController extends BaseController {
|
||||
*
|
||||
* @param ossIds OSS对象ID串
|
||||
*/
|
||||
@SaCheckPermission("system:oss:remove")
|
||||
// @SaCheckPermission("system:oss:remove")
|
||||
@Log(title = "OSS对象存储", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ossIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] ossIds) {
|
||||
|
@ -19,7 +19,6 @@ EXPOSE ${SERVER_PORT}
|
||||
ADD ./target/asinkj-system.jar ./app.jar
|
||||
|
||||
ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom -Dserver.port=${SERVER_PORT} \
|
||||
-Dspring.profiles.active="prod" \
|
||||
#-Dskywalking.agent.service_name=asinkj-system \
|
||||
#-javaagent:/asinkj/skywalking/agent/skywalking-agent.jar \
|
||||
-XX:+HeapDumpOnOutOfMemoryError -XX:+UseZGC ${JAVA_OPTS} \
|
||||
|
Loading…
x
Reference in New Issue
Block a user