Merge #91 into master from cc_20230331_device
feat:添加阶段状态
* cc_20230331_device: (21 commits squashed)
- feat:添加采购审批
- Merge branch 'master' into cc_20230331_device
- feat:设备发货阶段
- feat:设备发货
- feat:设备发货
- feat:接口调整
- feat:接口调整
- feat:接口调整
- feat:接口调整
- feat:接口调整
- feat:接口调整
- feat:接口调整
- feat:接口调整
- feat:查询订单设备明细
- feat:测试
- feat:短信模板切换
- feat:getPendingList
- feat:代办调整
- feat:处理人
- feat:添加阶段状态
- Merge branch 'master' into cc_20230331_device
# Conflicts:
#	coolstore-partner-service/src/main/java/com/cool/store/service/order/impl/MiniStoreOrderServiceImpl.java
#	coolstore-partner-web/src/main/java/com/cool/store/controller/webc/TestController.java
Signed-off-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com>
Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com>
CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/91
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
package com.cool.store.converter;
|
||||
|
||||
import com.alibaba.excel.converters.Converter;
|
||||
import com.alibaba.excel.enums.CellDataTypeEnum;
|
||||
import com.alibaba.excel.metadata.CellData;
|
||||
import com.alibaba.excel.metadata.GlobalConfiguration;
|
||||
import com.alibaba.excel.metadata.property.ExcelContentProperty;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.cool.store.vo.order.OrderDeviceConfigItemVO;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Auther zx_szh
|
||||
* @Date 2026/4/3 09:30
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class ConfigItemListConverter implements Converter<List<OrderDeviceConfigItemVO>> {
|
||||
|
||||
@Override
|
||||
public Class<?> supportJavaTypeKey() {
|
||||
return List.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CellDataTypeEnum supportExcelTypeKey() {
|
||||
return CellDataTypeEnum.STRING;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<OrderDeviceConfigItemVO> convertToJavaData(CellData cellData,
|
||||
ExcelContentProperty contentProperty,
|
||||
GlobalConfiguration globalConfiguration) {
|
||||
String cellValue = cellData.getStringValue();
|
||||
if (!StringUtils.hasText(cellValue)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
// 将 JSON 字符串解析为 List
|
||||
return JSON.parseArray(cellValue, OrderDeviceConfigItemVO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出 Excel 时:将 List 对象转换为字符串写入单元格
|
||||
* 导出时使用
|
||||
*/
|
||||
@Override
|
||||
public CellData convertToExcelData(List<OrderDeviceConfigItemVO> value,
|
||||
ExcelContentProperty contentProperty,
|
||||
GlobalConfiguration globalConfiguration) {
|
||||
if (value == null || value.isEmpty()) {
|
||||
return new CellData<>("");
|
||||
}
|
||||
|
||||
// 将 List 转换为 JSON 字符串
|
||||
String jsonString = JSON.toJSONString(value);
|
||||
return new CellData<>(jsonString);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.cool.store.entity.plan;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 门店发货阶段主表
|
||||
*/
|
||||
@Data
|
||||
@Table(name = "zxjp_shop_delivery_plan")
|
||||
public class ShopDeliveryPlanDO {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 门店ID
|
||||
*/
|
||||
@Column(name = "shop_id")
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 期望发货时间
|
||||
*/
|
||||
@Column(name = "expected_delivery_time")
|
||||
private Date expectedDeliveryTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@Column(name = "create_user")
|
||||
private String createUser;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Column(name = "update_time")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.cool.store.entity.plan;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 门店发货阶段明细映射表
|
||||
*/
|
||||
@Data
|
||||
@Table(name = "zxjp_shop_delivery_plan_item")
|
||||
public class ShopDeliveryPlanItemDO {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 主表ID(shop_delivery_plan.id)
|
||||
*/
|
||||
@Column(name = "plan_id")
|
||||
private Long planId;
|
||||
|
||||
/**
|
||||
* 明细类型:1=采购设备,2=火码设备
|
||||
*/
|
||||
@Column(name = "item_type")
|
||||
private Integer itemType;
|
||||
|
||||
/**
|
||||
* 发货/订货状态:0-未发货 1-发货
|
||||
*/
|
||||
@Column(name = "delivery_status")
|
||||
private Integer deliveryStatus;
|
||||
|
||||
/**
|
||||
* 发货/订货备注
|
||||
*/
|
||||
@Column(name = "delivery_remark")
|
||||
private String deliveryRemark;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Column(name = "update_time")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.cool.store.request.plan;
|
||||
|
||||
import com.cool.store.common.InsertGroup;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 通知发货请求
|
||||
*/
|
||||
@Data
|
||||
public class NotifyDeliveryRequest {
|
||||
|
||||
@ApiModelProperty(value = "门店ID", required = true)
|
||||
@NotNull(message = "门店ID不能为空")
|
||||
private Long shopId;
|
||||
|
||||
@ApiModelProperty(value = "期望发货日期", required = true)
|
||||
private Date expectedDeliveryDate;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.cool.store.request.plan;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 更新发货项请求
|
||||
*/
|
||||
@Data
|
||||
public class UpdateDeliveryItemRequest {
|
||||
|
||||
@ApiModelProperty(value = "门店ID", required = true)
|
||||
@NotNull(message = "门店ID不能为空")
|
||||
private Long shopId;
|
||||
|
||||
@ApiModelProperty(value = "发货项类型:1=采购设备,2=火码设备", required = true)
|
||||
@NotNull(message = "发货项类型不能为空")
|
||||
private Integer itemType;
|
||||
|
||||
@ApiModelProperty(value = "发货状态:0-未发货 1-发货", required = true)
|
||||
@NotNull(message = "发货状态不能为空")
|
||||
private Integer deliveryStatus;
|
||||
|
||||
@ApiModelProperty(value = "发货备注")
|
||||
private String deliveryRemark;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.cool.store.vo.desk;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.models.auth.In;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Auther zx_szh
|
||||
* @Date 2026/4/2 10:41
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class DeliveryPendingVO {
|
||||
|
||||
@ApiModelProperty("门店ID")
|
||||
private Long shopId;
|
||||
|
||||
@ApiModelProperty("类型")
|
||||
private Integer itemType;
|
||||
|
||||
@ApiModelProperty("门店名称")
|
||||
private String shopName;
|
||||
|
||||
@ApiModelProperty("加盟商名称")
|
||||
private String partnerName;
|
||||
|
||||
private Long lineId;
|
||||
|
||||
@ApiModelProperty("地址")
|
||||
private String address;
|
||||
|
||||
private Integer deliveryStatus ;
|
||||
|
||||
@ApiModelProperty("运营大区")
|
||||
private Long regionId;
|
||||
|
||||
@ApiModelProperty("运营大区名称")
|
||||
private String regionName;
|
||||
|
||||
@ApiModelProperty("招商大区")
|
||||
private Long investRegionId;
|
||||
|
||||
@ApiModelProperty("招商大区名称")
|
||||
private String investRegionName;
|
||||
|
||||
private Integer subStageStatus;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.cool.store.vo.order;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.cool.store.utils.BeanUtil;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单设备配置项明细VO
|
||||
*/
|
||||
@Data
|
||||
public class OrderDeviceConfigItemVO {
|
||||
|
||||
@ApiModelProperty("费用类型")
|
||||
private String expenseTypeCode;
|
||||
|
||||
@ApiModelProperty("配置大类")
|
||||
private String categoryCode;
|
||||
|
||||
@ApiModelProperty("配置大类名称")
|
||||
@ExcelProperty(value = "配置大类", index = 1)
|
||||
private String categoryName;
|
||||
|
||||
@ApiModelProperty("配置项")
|
||||
private String itemCode;
|
||||
|
||||
@ApiModelProperty("配置项名称")
|
||||
@ExcelProperty(value = "配置项", index = 2)
|
||||
private String itemName;
|
||||
|
||||
@ApiModelProperty("配置选型名称")
|
||||
@ExcelProperty(value = "配置项选型", index = 3)
|
||||
private String optionName;
|
||||
|
||||
@ApiModelProperty("原单价")
|
||||
@ExcelProperty(value = "原单价", index = 3)
|
||||
private BigDecimal originalOptionPrice;
|
||||
|
||||
@ApiModelProperty("默认数量")
|
||||
@ExcelProperty(value = "优惠数量", index = 3)
|
||||
private BigDecimal defaultQuantity;
|
||||
|
||||
@ApiModelProperty("优惠单价")
|
||||
@ExcelProperty(value = "优惠单价", index = 3)
|
||||
private BigDecimal optionPrice;
|
||||
|
||||
@ApiModelProperty("下单数量")
|
||||
@ExcelProperty(value = "下单数量", index = 3)
|
||||
private BigDecimal quantity;
|
||||
|
||||
@ApiModelProperty("价格合计")
|
||||
@ExcelProperty(value = "价格合计", index = 3)
|
||||
private BigDecimal amount;
|
||||
|
||||
@ApiModelProperty("单位")
|
||||
private String optionUnit;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.cool.store.vo.order;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.cool.store.utils.BeanUtil;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Auther zx_szh
|
||||
* @Date 2026/4/3 10:15
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class OrderDeviceDetailExportVO {
|
||||
|
||||
@ApiModelProperty("费用名称")
|
||||
@ExcelProperty(value = "费用类型", index = 0)
|
||||
private String expenseTypeName;
|
||||
|
||||
@ApiModelProperty("配置大类名称")
|
||||
@ExcelProperty(value = "配置大类", index = 1)
|
||||
private String categoryName;
|
||||
|
||||
@ApiModelProperty("配置项名称")
|
||||
@ExcelProperty(value = "配置项", index = 2)
|
||||
private String itemName;
|
||||
|
||||
@ApiModelProperty("配置选型名称")
|
||||
@ExcelProperty(value = "配置项选型", index = 3)
|
||||
private String optionName;
|
||||
|
||||
@ApiModelProperty("原单价")
|
||||
@ExcelProperty(value = "原单价", index = 4)
|
||||
private BigDecimal originalOptionPrice;
|
||||
|
||||
@ApiModelProperty("默认数量")
|
||||
@ExcelProperty(value = "优惠数量", index = 5)
|
||||
private BigDecimal defaultQuantity;
|
||||
|
||||
@ApiModelProperty("优惠单价")
|
||||
@ExcelProperty(value = "优惠单价", index = 6)
|
||||
private BigDecimal optionPrice;
|
||||
|
||||
@ApiModelProperty("下单数量")
|
||||
@ExcelProperty(value = "下单数量", index = 7)
|
||||
private BigDecimal quantity;
|
||||
|
||||
@ApiModelProperty("价格合计")
|
||||
@ExcelProperty(value = "价格合计", index = 8)
|
||||
private BigDecimal amount;
|
||||
|
||||
|
||||
public static List<OrderDeviceDetailExportVO> convert(List<OrderDeviceDetailVO> voList){
|
||||
if (CollectionUtils.isEmpty(voList)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<OrderDeviceDetailExportVO> result = new ArrayList<>();
|
||||
voList.forEach(x->{
|
||||
x.getItems().forEach(y->{
|
||||
OrderDeviceDetailExportVO orderDeviceConfigItemVO = new OrderDeviceDetailExportVO();
|
||||
BeanUtil.copyProperties(y,orderDeviceConfigItemVO);
|
||||
orderDeviceConfigItemVO.setExpenseTypeName(x.getExpenseTypeName());
|
||||
result.add(orderDeviceConfigItemVO);
|
||||
});
|
||||
});
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.cool.store.vo.order;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.cool.store.converter.ConfigItemListConverter;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单设备明细VO
|
||||
*/
|
||||
@Data
|
||||
public class OrderDeviceDetailVO {
|
||||
|
||||
@ApiModelProperty("费用类型")
|
||||
private String expenseTypeCode;
|
||||
|
||||
@ApiModelProperty("费用名称")
|
||||
@ExcelProperty(value = "费用类型", index = 0)
|
||||
private String expenseTypeName;
|
||||
|
||||
@ApiModelProperty("配置项列表")
|
||||
@ExcelProperty(value = "配置项", index = 1, converter = ConfigItemListConverter.class)
|
||||
private List<OrderDeviceConfigItemVO> items;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.cool.store.vo.plan;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 发货详细信息VO
|
||||
*/
|
||||
@Data
|
||||
public class DeliveryDetailVO {
|
||||
|
||||
@ApiModelProperty("主表ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("门店ID")
|
||||
private Long shopId;
|
||||
|
||||
private Long orderId;
|
||||
|
||||
@ApiModelProperty("期望发货日期")
|
||||
private Date expectedDeliveryTime;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("采购设备发货状态:0-未发货 1-发货")
|
||||
private Integer purchaseDeviceDeliveryStatus;
|
||||
|
||||
@ApiModelProperty("采购设备发货备注")
|
||||
private String purchaseDeviceDeliveryRemark;
|
||||
|
||||
@ApiModelProperty("火码设备发货状态:0-未发货 1-发货")
|
||||
private Integer fireCodeDeviceDeliveryStatus;
|
||||
|
||||
@ApiModelProperty("火码设备发货备注")
|
||||
private String fireCodeDeviceDeliveryRemark;
|
||||
|
||||
@ApiModelProperty("创建人")
|
||||
private String createUser;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.cool.store.vo.plan;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 发货信息VO
|
||||
*/
|
||||
@Data
|
||||
public class DeliveryInfoVO {
|
||||
|
||||
@ApiModelProperty("主表ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("门店ID")
|
||||
private Long shopId;
|
||||
|
||||
@ApiModelProperty("期望发货日期")
|
||||
private String expectedDeliveryDate;
|
||||
|
||||
@ApiModelProperty("期望发货时间")
|
||||
private Date expectedDeliveryTime;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("创建人")
|
||||
private String createUser;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
}
|
||||
Reference in New Issue
Block a user