chenlong
5 months ago
6 changed files with 452 additions and 0 deletions
@ -0,0 +1,91 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.distribution.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.tenant.mp.TenantEntity; |
||||
|
||||
/** |
||||
* 常规订单拆单明细 实体类 |
||||
* |
||||
* @author TJJ |
||||
* @since 2023-09-11 |
||||
*/ |
||||
@Data |
||||
@TableName("logpm_distribution_split_order_detail") |
||||
@ApiModel(value = "logpmDistributionSplitOrderDetail对象", description = "常规订单拆单明细表") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class DistributionSplitOrderDetailEntity extends TenantEntity { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
/** |
||||
* 主键 |
||||
*/ |
||||
@JsonSerialize(using = ToStringSerializer.class) |
||||
@ApiModelProperty(value = "主键") |
||||
@TableId(value = "id", type = IdType.ASSIGN_ID) |
||||
private Long id; |
||||
|
||||
/** |
||||
* 预留1 |
||||
*/ |
||||
@ApiModelProperty(value = "预留1") |
||||
private String reserve1; |
||||
/** |
||||
* 预留2 |
||||
*/ |
||||
@ApiModelProperty(value = "预留2") |
||||
private String reserve2; |
||||
/** |
||||
* 预留3 |
||||
*/ |
||||
@ApiModelProperty(value = "预留3") |
||||
private String reserve3; |
||||
/** |
||||
* 预留4 |
||||
*/ |
||||
@ApiModelProperty(value = "预留4") |
||||
private String reserve4; |
||||
/** |
||||
* 预留5 |
||||
*/ |
||||
@ApiModelProperty(value = "预留5") |
||||
private String reserve5; |
||||
|
||||
@ApiModelProperty(value = "任务ID") |
||||
private Long splitOrderTaskId; |
||||
|
||||
@ApiModelProperty(value = "包条") |
||||
private String orderPackageCode; |
||||
|
||||
@ApiModelProperty(value = "状态:1=待拆单,2=已拆单,3=驳回拆单,4=已撤回") |
||||
private Integer state; |
||||
|
||||
@ApiModelProperty(value = "撤回人员ID") |
||||
private Long cancelUser; |
||||
|
||||
@ApiModelProperty(value = "撤回人员") |
||||
private String cancelUsername; |
||||
} |
@ -0,0 +1,85 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.distribution.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.tenant.mp.TenantEntity; |
||||
|
||||
/** |
||||
* 常规订单拆单日志 实体类 |
||||
* |
||||
* @author TJJ |
||||
* @since 2023-09-11 |
||||
*/ |
||||
@Data |
||||
@TableName("logpm_distribution_split_order_log") |
||||
@ApiModel(value = "logpmDistributionSplitOrderLog对象", description = "常规订单拆单日志表") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class DistributionSplitOrderLogEntity extends TenantEntity { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
/** |
||||
* 主键 |
||||
*/ |
||||
@JsonSerialize(using = ToStringSerializer.class) |
||||
@ApiModelProperty(value = "主键") |
||||
@TableId(value = "id", type = IdType.ASSIGN_ID) |
||||
private Long id; |
||||
|
||||
/** |
||||
* 预留1 |
||||
*/ |
||||
@ApiModelProperty(value = "预留1") |
||||
private String reserve1; |
||||
/** |
||||
* 预留2 |
||||
*/ |
||||
@ApiModelProperty(value = "预留2") |
||||
private String reserve2; |
||||
/** |
||||
* 预留3 |
||||
*/ |
||||
@ApiModelProperty(value = "预留3") |
||||
private String reserve3; |
||||
/** |
||||
* 预留4 |
||||
*/ |
||||
@ApiModelProperty(value = "预留4") |
||||
private String reserve4; |
||||
/** |
||||
* 预留5 |
||||
*/ |
||||
@ApiModelProperty(value = "预留5") |
||||
private String reserve5; |
||||
|
||||
@ApiModelProperty(value = "任务ID") |
||||
private Long splitOrderTaskId; |
||||
|
||||
@ApiModelProperty(value = "日志内容") |
||||
private String content; |
||||
|
||||
@ApiModelProperty(value = "创建人名") |
||||
private String createUsername; |
||||
} |
@ -0,0 +1,126 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.distribution.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.tenant.mp.TenantEntity; |
||||
|
||||
import javax.validation.constraints.NotBlank; |
||||
import java.math.BigDecimal; |
||||
|
||||
/** |
||||
* 常规订单拆单任务 实体类 |
||||
* |
||||
* @author TJJ |
||||
* @since 2023-09-11 |
||||
*/ |
||||
@Data |
||||
@TableName("logpm_distribution_split_order_task") |
||||
@ApiModel(value = "logpmDistributionSplitOrderTask对象", description = "常规订单拆单任务表") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class DistributionSplitOrderTaskEntity extends TenantEntity { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
/** |
||||
* 主键 |
||||
*/ |
||||
@JsonSerialize(using = ToStringSerializer.class) |
||||
@ApiModelProperty(value = "主键") |
||||
@TableId(value = "id", type = IdType.ASSIGN_ID) |
||||
private Long id; |
||||
|
||||
/** |
||||
* 预留1 |
||||
*/ |
||||
@ApiModelProperty(value = "预留1") |
||||
private String reserve1; |
||||
/** |
||||
* 预留2 |
||||
*/ |
||||
@ApiModelProperty(value = "预留2") |
||||
private String reserve2; |
||||
/** |
||||
* 预留3 |
||||
*/ |
||||
@ApiModelProperty(value = "预留3") |
||||
private String reserve3; |
||||
/** |
||||
* 预留4 |
||||
*/ |
||||
@ApiModelProperty(value = "预留4") |
||||
private String reserve4; |
||||
/** |
||||
* 预留5 |
||||
*/ |
||||
@ApiModelProperty(value = "预留5") |
||||
private String reserve5; |
||||
|
||||
@NotBlank(message = "被拆订单ID不能为空") |
||||
@ApiModelProperty(value = "被拆订单ID") |
||||
private Long stockArticleId; |
||||
|
||||
@ApiModelProperty(value = "被拆订单") |
||||
private String orderCode; |
||||
|
||||
@ApiModelProperty(value = "商场名称") |
||||
private String mallName; |
||||
|
||||
@ApiModelProperty(value = "状态:1=待审核,2=同意拆单,3=驳回拆单,4=撤回") |
||||
private Integer state; |
||||
|
||||
@ApiModelProperty(value = "原因") |
||||
private String reason; |
||||
|
||||
@ApiModelProperty(value = "审核人") |
||||
private Long reviewerUser; |
||||
|
||||
@ApiModelProperty(value = "审核人名字") |
||||
private String reviewerUsername; |
||||
|
||||
@ApiModelProperty(value = "审核时间") |
||||
private String reviewTime; |
||||
|
||||
@ApiModelProperty(value = "拆单数量") |
||||
private Integer number; |
||||
|
||||
@NotBlank(message = "新的客户姓名不能为空") |
||||
@ApiModelProperty(value = "新的客户姓名") |
||||
private String customerName; |
||||
|
||||
@NotBlank(message = "新的客户联系方式不能为空") |
||||
@ApiModelProperty(value = "新的客户联系方式") |
||||
private String customerTelephone; |
||||
|
||||
@NotBlank(message = "新的客户地址不能为空") |
||||
@ApiModelProperty(value = "新的客户地址") |
||||
private String customerAddress; |
||||
|
||||
@ApiModelProperty(value = "新的订单") |
||||
private String newOrderCode; |
||||
|
||||
@ApiModelProperty(value = "新的订单ID") |
||||
private Long newStockArticleId; |
||||
|
||||
} |
@ -0,0 +1,7 @@
|
||||
package com.logpm.distribution.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.logpm.distribution.entity.DistributionSplitOrderTaskEntity; |
||||
|
||||
public interface DistributionSplitOrderTaskMapper extends BaseMapper<DistributionSplitOrderTaskEntity> { |
||||
} |
@ -0,0 +1,65 @@
|
||||
package com.logpm.distribution.service; |
||||
|
||||
|
||||
import com.logpm.distribution.entity.DistributionSplitOrderTaskEntity; |
||||
import org.springblade.core.mp.support.Query; |
||||
import org.springblade.core.tool.api.R; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 拆单任务接口 |
||||
*/ |
||||
public interface IDistributionSplitOrderTaskService { |
||||
|
||||
/** |
||||
* 拆单任务列表 |
||||
* @param query |
||||
* @param distributionSplitOrderTaskEntity |
||||
* @return |
||||
*/ |
||||
R<List<DistributionSplitOrderTaskEntity>> taskList(Query query, DistributionSplitOrderTaskEntity distributionSplitOrderTaskEntity); |
||||
|
||||
/** |
||||
* 创建任务 |
||||
* @param distributionSplitOrderTaskEntity |
||||
* @return |
||||
*/ |
||||
R<String> createTask(DistributionSplitOrderTaskEntity distributionSplitOrderTaskEntity, List<String> packageCodeList); |
||||
|
||||
/** |
||||
* 更新任务 |
||||
* @param distributionSplitOrderTaskEntity |
||||
* @return |
||||
*/ |
||||
R<String> updateTask(DistributionSplitOrderTaskEntity distributionSplitOrderTaskEntity, List<String> packageCodeList); |
||||
|
||||
/** |
||||
* 整单撤回任务 |
||||
* @param taskId |
||||
* @return |
||||
*/ |
||||
R<String> cancelTask(Long taskId); |
||||
|
||||
/** |
||||
* 单个包撤回任务 |
||||
* @param taskId |
||||
* @param packageCode |
||||
* @return |
||||
*/ |
||||
R<String> cancelPackageCode(Long taskId, String packageCode); |
||||
|
||||
/** |
||||
* 审核任务 |
||||
* @param taskId |
||||
* @return |
||||
*/ |
||||
R<String> reviewTask(Long taskId); |
||||
|
||||
/** |
||||
* 获取任务详情 |
||||
* @param taskId |
||||
* @return |
||||
*/ |
||||
R<Object> getTaskDetail(Long taskId); |
||||
} |
@ -0,0 +1,78 @@
|
||||
package com.logpm.distribution.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||
import com.logpm.distribution.entity.DistributionParcelListEntity; |
||||
import com.logpm.distribution.entity.DistributionSplitOrderTaskEntity; |
||||
import com.logpm.distribution.entity.DistributionStockArticleEntity; |
||||
import com.logpm.distribution.mapper.DistributionSplitOrderTaskMapper; |
||||
import com.logpm.distribution.service.IDistributionSplitOrderTaskService; |
||||
import groovy.util.logging.Slf4j; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springblade.core.mp.support.Query; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.List; |
||||
|
||||
@Service |
||||
@AllArgsConstructor |
||||
@Slf4j |
||||
public class DistributionSplitOrderTaskServiceImpl extends BaseServiceImpl<DistributionSplitOrderTaskMapper, DistributionSplitOrderTaskEntity> implements IDistributionSplitOrderTaskService { |
||||
|
||||
private DistributionStockArticleServiceImpl distributionStockArticleService; |
||||
private DistributionParcelListServiceImpl distributionParcelListService; |
||||
|
||||
@Override |
||||
public R<List<DistributionSplitOrderTaskEntity>> taskList(Query query, DistributionSplitOrderTaskEntity distributionSplitOrderTaskEntity) { |
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public R<String> createTask(DistributionSplitOrderTaskEntity distributionSplitOrderTaskEntity, List<String> packageCodeList) { |
||||
try { |
||||
DistributionStockArticleEntity distributionStockArticle = distributionStockArticleService.getById(distributionSplitOrderTaskEntity.getStockArticleId()); |
||||
if (distributionStockArticle == null) { |
||||
return R.fail("原订单信息错误"); |
||||
} |
||||
List<DistributionParcelListEntity> packageCode = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>lambdaQuery() |
||||
.eq(DistributionParcelListEntity::getStockArticleId, distributionSplitOrderTaskEntity.getStockArticleId()) |
||||
.in(DistributionParcelListEntity::getOrderPackageCode, packageCodeList) |
||||
); |
||||
if (packageCode.size() != packageCodeList.size()) { |
||||
return R.fail("订单包件信息错误"); |
||||
} |
||||
|
||||
|
||||
return R.data(""); |
||||
} catch (Exception e) { |
||||
log.error("createTask error", e); |
||||
return R.fail("createTask error"); |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
public R<String> updateTask(DistributionSplitOrderTaskEntity distributionSplitOrderTaskEntity, List<String> packageCodeList) { |
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public R<String> cancelTask(Long taskId) { |
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public R<String> cancelPackageCode(Long taskId, String packageCode) { |
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public R<String> reviewTask(Long taskId) { |
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public R<Object> getTaskDetail(Long taskId) { |
||||
return null; |
||||
} |
||||
} |
Loading…
Reference in new issue