Commit 374ec321 authored by 332784038@qq.com's avatar 332784038@qq.com

到仓业务修改更新

parent c19f30c0
......@@ -9,13 +9,15 @@ alter table ecw_order
add COLUMN `check_weight` decimal(10, 2) DEFAULT '0.00' COMMENT '到仓重量';
alter table ecw_order_item
add COLUMN `check_num` int DEFAULT '0' COMMENT '到仓件数';
add COLUMN `check_material` varchar(255) DEFAULT NULL COMMENT '到仓材质';
alter table ecw_order_item
add COLUMN `check_volume` decimal(10, 2) DEFAULT '0.00' COMMENT '到仓体积';
add COLUMN `warehouse_check_prod_attr_ids` varchar(50) DEFAULT NULL COMMENT '到仓商品特性(可选多个特性ID)';
alter table ecw_order_item
add COLUMN `check_quantity` int DEFAULT '0' COMMENT '到仓数量';
add COLUMN `check_brand` bigint DEFAULT NULL COMMENT '到仓品牌';
alter table ecw_order_item
add COLUMN `check_weight` decimal(10, 2) DEFAULT '0.00' COMMENT '到仓重量';
add COLUMN `check_brand_type` tinyint NOT NULL DEFAULT '0' COMMENT '到仓:0 无牌 1 有牌 2 中性';
alter table ecw_order_item
add COLUMN `warehouse_check_info` json DEFAULT NULL COMMENT '到仓信息json';
-- 跟进记录菜单
INSERT INTO `system_menu` (`name`, `permission`, `menu_type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `is_show_in_menu_bar`, `name_en`, `keepalive`, `redirect`, `badge_field`) VALUES ( '跟进记录', '', 2, 1, 1417, 'offer/logList', 'log', 'ecw/offer/logList', 0, '2702', '2024-10-27 12:02:57', '2702', '2024-10-27 12:04:30', b'0', b'1', 'followLog', b'0', NULL, NULL);
-- 到仓详情表
CREATE TABLE `ecw_order_warehouse_check` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`warehouse_in_id` bigint NOT NULL COMMENT '入仓记录id',
`order_id` bigint NOT NULL COMMENT '订单ID',
`order_no` char(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '订单编号',
`order_item_id` bigint NOT NULL COMMENT '订单项id',
`cartons_num` int NOT NULL DEFAULT '0' COMMENT '箱/件数',
`check_cartons_num` int NOT NULL DEFAULT '0' COMMENT '到仓箱/件数',
`quantity_all` int DEFAULT NULL COMMENT '所有箱总数量',
`check_quantity_all` int DEFAULT NULL COMMENT '到仓所有箱总数量',
`unit` char(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '单位',
`box_gauge` char(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '箱规',
`volume` decimal(10,2) DEFAULT NULL COMMENT '体积',
`check_volume` decimal(10,2) DEFAULT NULL COMMENT '到仓体积',
`weight` decimal(10,2) DEFAULT NULL COMMENT '重量',
`check_weight` decimal(10,2) DEFAULT NULL COMMENT '到仓重量',
`express_no` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '快递单号',
`in_time` datetime DEFAULT NULL COMMENT '入仓时间',
`creator` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者',
......@@ -26,8 +24,9 @@ CREATE TABLE `ecw_order_warehouse_check` (
`source` int DEFAULT '1' COMMENT '入仓来源 字典order_warehouse_in_source 1-始发港入仓、2-调拨入仓、3-目的港入仓、4-退场入仓',
`specification_type` int DEFAULT '1' COMMENT '入仓规格类型',
`remark` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注',
`order_warehouse_in_details` json DEFAULT NULL COMMENT '入仓纪录明细json',
`order_warehouse_check_details` json DEFAULT NULL COMMENT '到仓纪录明细json',
PRIMARY KEY (`id`),
KEY `order_id` (`order_id`),
KEY `warehouse_in_id` (`warehouse_in_id`),
KEY `order_item_id` (`order_item_id`)
) ENGINE=InnoDB AUTO_INCREMENT=174745 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='到仓货物详情表'
......@@ -417,17 +417,22 @@ public class OrderItemDO extends BaseDO {
@ApiModelProperty(value = "是否处理了渠道特性异常")
private Boolean handlerChannelAttrException;
@ApiModelProperty(value = "到仓件数")
private Integer checkNum;
@ApiModelProperty(value = "到仓材质")
private String checkMaterial;
@ApiModelProperty(value = "到仓数量")
private Integer checkQuantity;
@ApiModelProperty(value = "到仓商品特性(可选多个特性ID)")
private String warehouseCheckProdAttrIds;
@ApiModelProperty(value = "到仓体积")
private BigDecimal checkVolume;
@ApiModelProperty(value = "到仓品牌")
private Long checkBrand;
@ApiModelProperty(value = "到仓重量")
private BigDecimal checkWeight;
@ApiModelProperty(value = "到仓:0 无牌 1 有牌 2 中性")
private Integer checkBrandType;
/**
* 到仓信息json
*/
@ApiModelProperty(value = "到仓信息json")
private String warehouseCheckInfo;
/**
* 1-未设置商品清关费, 2-区间未匹配上
*/
......
......@@ -54,21 +54,11 @@ public class OrderWarehouseCheckDO extends BaseDO {
*/
private Integer cartonsNum;
/**
* 箱/件数
*/
private Integer checkCartonsNum;
/**
* 所有箱内总货物数量
*/
private Integer quantityAll;
/**
* 所有箱内总货物数量
*/
private Integer checkQuantityAll;
/**
* 单位
*/
......@@ -89,55 +79,42 @@ public class OrderWarehouseCheckDO extends BaseDO {
*/
private BigDecimal volume;
/**
* 到仓体积
*/
private BigDecimal checkVolume;
/**
* 重量
*/
private BigDecimal weight;
/**
* 到仓重量
*/
private BigDecimal checkWeight;
/**
* 快递单号
*/
private String expressNo;
/**
* 仓时间
* 仓时间
*/
private Date inTime;
private Date checkTime;
/**
* 入仓来源 字典order_warehouse_in_source 1-始发港入仓、2-调拨入仓、3-目的港入仓、4-退场入仓
* 到仓来源 字典order_warehouse_check_source 1-始发港入仓、2-调拨入仓、3-目的港入仓、4-退场入仓
*/
private Integer source;
/**
* 重货方数
*/
private BigDecimal heavyNumber;
/**
* 泡货方数
* 备注
*/
private BigDecimal lightNumber;
private String remark;
/**
* 备注
* 入仓记录id
*/
private String remark;
private Long warehouseInId;
/**
* 入仓纪录明细VO
*/
@TableField(value = "order_warehouse_in_details", typeHandler = OrderWarehouseInDetailsTypeHandler.class)
@TableField(value = "order_warehouse_check_details", typeHandler = OrderWarehouseInDetailsTypeHandler.class)
private List<OrderWarehouseInDetailsVO> orderWarehouseInDetailsVOList;
@TableField(exist = false)
......
package cn.iocoder.yudao.module.order.dal.dataobject.orderWarehouseCheck.handler;
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
import cn.iocoder.yudao.module.order.vo.order.OrderWarehouseCheckDetailsVO;
import com.baomidou.mybatisplus.extension.handlers.AbstractJsonTypeHandler;
import java.util.List;
public class OrderWarehouseCheckDetailsTypeHandler extends AbstractJsonTypeHandler<List<OrderWarehouseCheckDetailsVO>> {
@Override
protected List<OrderWarehouseCheckDetailsVO> parse(String json) {
return JsonUtils.parseArray(json, OrderWarehouseCheckDetailsVO.class);
}
@Override
protected String toJson(List<OrderWarehouseCheckDetailsVO> obj) {
return JsonUtils.toJsonString(obj);
}
}
\ No newline at end of file
......@@ -166,10 +166,13 @@ public interface OrderItemMapper extends AbstractMapper<OrderItemDO> {
"(oi.original_clearance_freight + oi.packaging_freight_price + oi.brand_clearance_fee_price + oi.electrified_clearance_fee_price + oi.liquid_clearance_fee_price - oi.discount_clearance_fee_price) as after_discount_clearance_freight, ",
"IF(o.order_type != 2 and (SELECT COUNT(1) FROM ecw_order_exception hoe WHERE hoe.order_id = o.order_id AND hoe.deleted = 0 AND hoe.order_exception_status = 0 AND hoe.order_exception_type ='order_heavy_cargo_exception') = 0, IFNULL(oi.warehouse_in_info ->> '$.volume', oi.volume), oi.w_volume ) as we_volume,",
"IF(o.order_type != 3 and (SELECT COUNT(1) FROM ecw_order_exception boe WHERE boe.order_id = o.order_id AND boe.deleted = 0 AND boe.order_exception_status = 0 AND boe.order_exception_type ='order_bulky_cargo_exception') = 0, IFNULL(oi.warehouse_in_info ->> '$.weight', oi.weight), oi.v_weight ) as vo_weight,",
"IF(#{lang} = 0, pd.title_zh, pd.title_en) as brand_name ",
"IF(#{lang} = 0, pd.title_zh, pd.title_en) as brand_name, ",
"IF(#{lang} = 0, pdc.title_zh, pdc.title_en) as brand_name ",
"from ecw_order_item oi",
"left join ecw_product_brank pd",
"on pd.id = oi.brand",
"left join ecw_product_brank pdc",
"on pdc.id = oi.check_brand",
"left join ecw_order o",
"on o.order_id = oi.order_id",
"where oi.deleted = 0 and ",
......
......@@ -6,12 +6,14 @@ import cn.iocoder.yudao.module.ecw.dal.dataobject.region.RegionDO;
import cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderException.OrderExceptionDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderItem.OrderItemDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderWarehouseCheck.OrderWarehouseCheckDO;
import cn.iocoder.yudao.module.order.dto.OrderRemindExceptionDto;
import cn.iocoder.yudao.module.order.enums.OrderAirTimeEnum;
import cn.iocoder.yudao.module.order.enums.OrderSeaTimeEnum;
import cn.iocoder.yudao.module.order.param.OrderChangePriceParam;
import cn.iocoder.yudao.module.order.param.OrderControlLogParam;
import cn.iocoder.yudao.module.order.vo.order.*;
import cn.iocoder.yudao.module.order.vo.orderItem.OrderItemCheckWarehouseVO;
import cn.iocoder.yudao.module.order.vo.orderWarehouseCheck.CheckItemSumVO;
import cn.iocoder.yudao.module.product.dal.dataobject.product.ProductPriceDO;
......@@ -406,9 +408,9 @@ public interface OrderBusinessService extends IService<OrderDO> {
* 订单到仓更新
*
* @param orderId 订单ID
* @param itemSumMap 到仓商品项
* @param orderItemCheckWarehouseVOMap 到仓商品项
*/
void orderToWarehouse(Long orderId, Map<Long, CheckItemSumVO> itemSumMap);
void orderToWarehouse(Long orderId, Map<Long, OrderItemCheckWarehouseVO> orderItemCheckWarehouseVOMap);
/**
......
......@@ -45,6 +45,7 @@ import cn.iocoder.yudao.module.order.dal.dataobject.orderNumberLog.OrderNumberLo
import cn.iocoder.yudao.module.order.dal.dataobject.orderObjective.OrderObjectiveDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderSplit.OrderSplitDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderTime.OrderTimeDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderWarehouseCheck.OrderWarehouseCheckDO;
import cn.iocoder.yudao.module.order.dal.mysql.order.OrderMapper;
import cn.iocoder.yudao.module.order.dal.mysql.order.ZTestMapper2;
import cn.iocoder.yudao.module.order.dal.mysql.orderCargoControl.OrderCargoControlMapper;
......@@ -65,6 +66,7 @@ import cn.iocoder.yudao.module.order.vo.order.*;
import cn.iocoder.yudao.module.order.vo.orderControlLog.OrderControlLogCreateReqVO;
import cn.iocoder.yudao.module.order.vo.orderException.OrderExceptionCreateReqVO;
import cn.iocoder.yudao.module.order.vo.orderException.OrderExceptionDescVO;
import cn.iocoder.yudao.module.order.vo.orderItem.OrderItemCheckWarehouseVO;
import cn.iocoder.yudao.module.order.vo.orderOperateLog.OrderOperateLogCreateReqVO;
import cn.iocoder.yudao.module.order.vo.orderWarehouseCheck.CheckItemSumVO;
import cn.iocoder.yudao.module.product.component.ProdCostCalculation;
......@@ -103,6 +105,7 @@ import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.MessageFormat;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
import static cn.iocoder.yudao.framework.apollo.core.constants.Constants.NOT_ACCEPTED_PROD_CODE;
......@@ -4044,25 +4047,26 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
}
@Override
public void orderToWarehouse(Long orderId, Map<Long, CheckItemSumVO> itemSumMap) {
public void orderToWarehouse(Long orderId, Map<Long, OrderItemCheckWarehouseVO> orderItemCheckWarehouseVOMap) {
Integer sumCheckNum = 0;
Integer sumCheckQuantity = 0;
BigDecimal sumCheckVolume = BigDecimal.ZERO;
BigDecimal sumCheckWeight = BigDecimal.ZERO;
List<OrderItemDO> orderItemDOList = orderItemMapper.selectList(new LambdaQueryWrapper<OrderItemDO>().eq(OrderItemDO::getOrderId, orderId));
for (OrderItemDO orderItemDO : orderItemDOList) {
if (itemSumMap.containsKey(orderItemDO.getOrderItemId())){
CheckItemSumVO itemSum = itemSumMap.get(orderItemDO.getOrderItemId());
orderItemDO.setCheckNum(itemSum.getCartons());
orderItemDO.setCheckQuantity(itemSum.getQuantity());
orderItemDO.setCheckVolume(itemSum.getVolume());
orderItemDO.setCheckWeight(itemSum.getWeight());
}
sumCheckNum += orderItemDO.getCheckNum();
sumCheckQuantity += orderItemDO.getCheckQuantity();
sumCheckVolume = sumCheckVolume.add(orderItemDO.getCheckVolume());
sumCheckWeight = sumCheckWeight.add(orderItemDO.getCheckWeight());
if (orderItemCheckWarehouseVOMap.containsKey(orderItemDO.getOrderItemId())){
OrderItemCheckWarehouseVO warehouseCheckDO = orderItemCheckWarehouseVOMap.get(orderItemDO.getOrderItemId());
WarehouseCheckInfoVO warehouseCheckInfoVO = warehouseCheckDO.getWarehouseCheckInfoVO();
orderItemDO.setCheckBrand(warehouseCheckDO.getCheckBrand());
orderItemDO.setCheckBrandType(warehouseCheckDO.getCheckBrandType());
orderItemDO.setCheckMaterial(warehouseCheckDO.getCheckMaterial());
orderItemDO.setWarehouseCheckProdAttrIds(warehouseCheckDO.getCheckProdAttrIds());
orderItemDO.setWarehouseCheckInfo(JSONObject.toJSONString(warehouseCheckDO.getWarehouseCheckInfoVO()));
sumCheckNum += warehouseCheckInfoVO.getCartonsNum();
sumCheckQuantity += warehouseCheckInfoVO.getQuantity();
sumCheckVolume = sumCheckVolume.add(warehouseCheckInfoVO.getVolume());
sumCheckWeight = sumCheckWeight.add(warehouseCheckInfoVO.getWeight());
}
}
// 更新订单项的到仓信息
orderItemMapper.insertBatch(orderItemDOList);
......
......@@ -854,6 +854,13 @@ public class OrderQueryServiceImpl implements OrderQueryService {
List<String> pictureUrls = warehousePictureList.stream().map(OrderWarehousePictureDO::getUrl).collect(Collectors.toList());
item.setPictureUrls(pictureUrls);
}
//订单项到仓影像
List<OrderWarehousePictureDO> warehouseCheckPictureList =
orderWarehousePictureService.getWarehousePictureList(7, item.getOrderItemId());
if (CollectionUtil.isNotEmpty(warehouseCheckPictureList)) {
List<String> checkPictureUrls = warehouseCheckPictureList.stream().map(OrderWarehousePictureDO::getUrl).collect(Collectors.toList());
item.setCheckPictureUrls(checkPictureUrls);
}
if ((Objects.nonNull(item.getChannelManualPricing()) && item.getChannelManualPricing())
|| (Objects.nonNull(item.getSpecialPriceType()) && item.getSpecialPriceType())
|| (Objects.nonNull(item.getSplitCustomPriceType()) && item.getSplitCustomPriceType())) {
......
......@@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.order.service.orderWarehouseCheck;
import cn.iocoder.yudao.framework.mybatis.core.service.IService;
import cn.iocoder.yudao.module.order.dal.dataobject.orderWarehouseCheck.OrderWarehouseCheckDO;
import cn.iocoder.yudao.module.order.vo.orderWarehouseCheck.OrderWarehouseCheckUpdateItemVO;
import cn.iocoder.yudao.module.order.vo.orderWarehouseCheck.OrderWarehouseCheckUpdateReqVO;
import java.util.List;
......@@ -45,5 +46,5 @@ public interface OrderWarehouseCheckService extends IService<OrderWarehouseCheck
* @param orderId 订单编号
* @param updates 更新详情
*/
void update(long orderId, List<OrderWarehouseCheckUpdateItemVO> updates);
void update(OrderWarehouseCheckUpdateReqVO checkUpdateReqVO);
}
......@@ -141,6 +141,7 @@ public class OrderExcelVO {
@ApiModelProperty(value = "入仓信息json")
private String warehouseInInfo;
@ExcelIgnore
@ApiModelProperty(value = "是否控货")
private Boolean isCargoControl;
......@@ -287,6 +288,43 @@ public class OrderExcelVO {
@ApiModelProperty(value = "是否在公海")
private Boolean isInOpenSea;
@ExcelIgnore
@ApiModelProperty(value = "到仓材质")
private String checkMaterial;
@ExcelIgnore
@ApiModelProperty(value = "到仓商品特性(可选多个特性ID)")
private String warehouseCheckProdAttrIds;
@ExcelIgnore
@ApiModelProperty(value = "到仓品牌")
private Long checkBrand;
@ExcelIgnore
@ApiModelProperty(value = "到仓:0 无牌 1 有牌 2 中性")
private Integer checkBrandType;
/**
* 到仓信息json
*/
@ExcelIgnore
@ApiModelProperty(value = "到仓信息json")
private String warehouseCheckInfo;
/**
* 到仓信息json
*/
@ExcelIgnore
@ApiModelProperty(value = "到仓信息VO")
private WarehouseCheckInfoVO warehouseCheckInfoVO;
public void setWarehouseCheckInfo(String warehouseCheckInfo) {
this.warehouseCheckInfo = warehouseCheckInfo;
if (StringUtils.isNotBlank(warehouseCheckInfo)) {
this.warehouseCheckInfoVO = JSONObject.parseObject(warehouseCheckInfo, WarehouseCheckInfoVO.class);
}
}
public void setWarehouseInInfo(String warehouseInInfo) {
this.warehouseInInfo = warehouseInInfo;
if (StringUtils.isNotBlank(warehouseInInfo)) {
......@@ -295,6 +333,9 @@ public class OrderExcelVO {
}
public void setLang(Integer lang) {
this.lang = lang;
this.getOrderDesc();
......
package cn.iocoder.yudao.module.order.vo.order;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.util.Date;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
/**
* 入仓纪录明细VO
*
* @author yanghao
*/
@Data
@ApiModel(value = "入仓纪录明细VO")
public class OrderWarehouseCheckDetailsVO {
@ApiModelProperty(value = "商品ID")
private Long prodId;
@ApiModelProperty(value = "品牌ID")
private Long brand;
/**
* 商品特性(可选多个特性ID)
*/
private String prodAttrIds;
@ApiModelProperty("用途")
private String usageIds;
@ApiModelProperty(value = "箱/件数")
private Integer cartonsNum;
@ApiModelProperty(value = "所有箱内总货物数量")
private Integer quantityAll;
@ApiModelProperty(value = "单位")
private String unit;
/**
* 入仓规格类型 1箱/2整板 见字典 warehousing_specification_type
*/
@ApiModelProperty(value = "入仓规格类型")
private Integer specificationType;
/**
* 箱规
*/
@ApiModelProperty(value = "箱规")
private String boxGauge;
@ApiModelProperty(value = "体积")
private BigDecimal volume;
@ApiModelProperty(value = "重量")
private BigDecimal weight;
@ApiModelProperty(value = "快递单号")
private String expressNo;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "创建时间", required = true)
private Date createTime;
@ApiModelProperty(value = "材质")
private String material;
}
package cn.iocoder.yudao.module.order.vo.order;
import cn.iocoder.yudao.module.order.vo.orderItem.OrderItemCheckWarehouseVO;
import cn.iocoder.yudao.module.order.vo.orderItem.OrderItemInWarehouseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
/**
* 入仓订单详情 Response VO
* @author yanghao
*/
@Data
@ApiModel(value = "入仓订单详情")
public class OrderWarehouseCheckVO {
@ApiModelProperty(value = "主键ID")
private Long orderId;
@ApiModelProperty(value = "订单编号")
private String orderNo;
@ApiModelProperty(value = "到仓订单项列表")
private List<OrderItemCheckWarehouseVO> orderItemCheckWarehouseVOList;
@ApiModelProperty(value = "箱/件数", required = true)
private Integer cartonsNum;
@ApiModelProperty(value = "类型,多了还是少了,见字典warehouse_in_status", required = true)
private Integer diffType;
@ApiModelProperty(value = "箱/件数差", required = true)
private Integer cartonsNumDiff;
@ApiModelProperty(value = "所有箱内总货物数量")
private Integer quantityAll;
@ApiModelProperty(value = "单位", required = true)
private String unit;
@ApiModelProperty(value = "体积")
private BigDecimal volume;
@ApiModelProperty(value = "重量")
private BigDecimal weight;
@ApiModelProperty(value = "快递单号")
private String expressNo;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "入仓时间")
private Date firstInTime;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "创建时间", required = true)
private Date createTime;
/**
* 重货方数
*/
@ApiModelProperty(value = "入仓货物-重货方数")
private BigDecimal heavyNumber;
/**
* 泡货方数
*/
@ApiModelProperty(value = "入仓货物-泡货方数")
private BigDecimal lightNumber;
}
package cn.iocoder.yudao.module.order.vo.order;
import cn.iocoder.yudao.module.order.vo.orderLocation.OrderLocationBackVO;
import cn.iocoder.yudao.module.order.vo.orderLocation.OrderLocationMergeVO;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
/**
* 到仓货物详情 Response VO
* @author yanghao
*/
@Data
public class WarehouseCheckInfoVO {
@ApiModelProperty(value = "是否多规格")
private Boolean isMultiSpecification;
@ExcelProperty("箱/件数")
@ApiModelProperty(value = "箱/件数", required = true)
private Integer cartonsNum;
@ExcelProperty("所有箱内总货物数量")
@ApiModelProperty(value = "所有箱内总货物数量")
private Integer quantity;
@ExcelProperty("单位")
@ApiModelProperty(value = "单位", required = true)
private String unit;
@ApiModelProperty(value = "规格类型")
private Integer specificationType;
@ApiModelProperty(value = "单位-拼接所有")
private String units;
/**
* 箱规
*/
@ExcelProperty("箱规")
@ApiModelProperty(value = "箱规")
private String boxGauge;
@ExcelProperty("体积")
@ApiModelProperty(value = "体积")
private BigDecimal volume;
@ExcelProperty("重量")
@ApiModelProperty(value = "重量")
private BigDecimal weight;
@ExcelProperty("快递单号")
@ApiModelProperty(value = "快递单号")
private String expressNo;
@ExcelProperty("备注")
@ApiModelProperty(value = "备注")
private String remark;
@ExcelProperty("到仓时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "到仓时间")
private Date checkTime;
@ExcelProperty("创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "创建时间", required = true)
private Date createTime;
@ApiModelProperty(value = "到仓储位详细列表")
private List<OrderLocationBackVO> orderLocationBackVOList;
@ApiModelProperty(value = "到仓储位合并后的显示列表")
private List<OrderLocationMergeVO> orderLocationMergeVOSet;
@ApiModelProperty(value = "混箱状态, 1-混箱")
private Integer mixStatus = 0;
@ApiModelProperty(value = "到仓影像列表")
private List<String> pictureUrls;
}
package cn.iocoder.yudao.module.order.vo.orderItem;
import cn.iocoder.yudao.module.order.vo.order.WarehouseCheckInfoVO;
import cn.iocoder.yudao.module.order.vo.order.WarehouseInInfoVO;
import cn.iocoder.yudao.module.product.vo.coupon.CouponInfoVO;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
......@@ -437,17 +439,49 @@ public class OrderItemBackVO {
@ApiModelProperty(value = "入仓记录备注,多个用逗号分隔")
private String warehouseRecordRemark ;
@ApiModelProperty(value = "到仓件数")
private Integer checkNum;
@ApiModelProperty(value = "到仓材质")
private String checkMaterial;
@ApiModelProperty(value = "到仓数量")
private Integer checkQuantity;
@ApiModelProperty(value = "到仓商品特性(可选多个特性ID)")
private String warehouseCheckProdAttrIds;
@ApiModelProperty(value = "到仓体积")
private BigDecimal checkVolume;
@ApiModelProperty(value = "到仓品牌")
private Long checkBrand;
@ApiModelProperty(value = "到仓重量")
private BigDecimal checkWeight;
@ApiModelProperty(value = "到仓:0 无牌 1 有牌 2 中性")
private Integer checkBrandType;
/**
* 到仓信息json
*/
@ApiModelProperty(value = "到仓信息json")
private String warehouseCheckInfo;
/**
* 到仓信息json
*/
@ApiModelProperty(value = "到仓信息VO")
private WarehouseCheckInfoVO warehouseCheckInfoVO;
@ExcelProperty("到仓品牌名称")
@ApiModelProperty(value = "到仓品牌名称")
private String checkBrandName;
@ApiModelProperty(value = "订单项到仓影像列表")
private List<String> checkPictureUrls;
public void setWarehouseCheckInfo(String warehouseCheckInfo) {
this.warehouseCheckInfo = warehouseCheckInfo;
if (StringUtils.isNotBlank(warehouseCheckInfo)) {
this.warehouseCheckInfoVO = JSONObject.parseObject(warehouseCheckInfo, WarehouseCheckInfoVO.class);
}
}
public void setWarehouseCheckInfoVO(WarehouseCheckInfoVO warehouseCheckInfoVO) {
this.warehouseCheckInfoVO = warehouseCheckInfoVO;
if (Objects.nonNull(warehouseCheckInfoVO)) {
this.warehouseCheckInfo = JSONObject.toJSONString(warehouseCheckInfoVO);
}
}
public void setCouponInfo(String couponInfo) {
......
package cn.iocoder.yudao.module.order.vo.orderItem;
import cn.iocoder.yudao.module.order.vo.order.WarehouseCheckInfoVO;
import cn.iocoder.yudao.module.order.vo.order.WarehouseInInfoVO;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.fastjson.JSONObject;
......@@ -9,6 +10,8 @@ import lombok.*;
import java.math.BigDecimal;
import java.util.*;
import io.swagger.annotations.*;
import org.apache.commons.lang3.StringUtils;
import javax.validation.constraints.*;
/**
......@@ -290,17 +293,42 @@ public class OrderItemBaseVO {
@ApiModelProperty(value = "是否处理了渠道特性异常")
private Boolean handlerChannelAttrException;
@ApiModelProperty(value = "到仓件数")
private Integer checkNum;
@ApiModelProperty(value = "到仓材质")
private String checkMaterial;
@ApiModelProperty(value = "到仓商品特性(可选多个特性ID)")
private String warehouseCheckProdAttrIds;
@ApiModelProperty(value = "到仓品牌")
private Long checkBrand;
@ApiModelProperty(value = "到仓:0 无牌 1 有牌 2 中性")
private Integer checkBrandType;
/**
* 到仓信息json
*/
@ApiModelProperty(value = "到仓信息json")
private String warehouseCheckInfo;
@ApiModelProperty(value = "到仓数量")
private Integer checkQuantity;
/**
* 到仓信息json
*/
@ApiModelProperty(value = "到仓信息VO")
private WarehouseCheckInfoVO warehouseCheckInfoVO;
@ApiModelProperty(value = "到仓体积")
private BigDecimal checkVolume;
public void setWarehouseCheckInfo(String warehouseCheckInfo) {
this.warehouseCheckInfo = warehouseCheckInfo;
if (StringUtils.isNotBlank(warehouseCheckInfo)) {
this.warehouseCheckInfoVO = JSONObject.parseObject(warehouseCheckInfo, WarehouseCheckInfoVO.class);
}
}
@ApiModelProperty(value = "到仓重量")
private BigDecimal checkWeight;
public void setWarehouseCheckInfoVO(WarehouseCheckInfoVO warehouseCheckInfoVO) {
this.warehouseCheckInfoVO = warehouseCheckInfoVO;
if (Objects.nonNull(warehouseCheckInfoVO)) {
this.warehouseCheckInfo = JSONObject.toJSONString(warehouseCheckInfoVO);
}
}
public void setWarehouseInInfo(String warehouseInInfo) {
this.warehouseInInfo = warehouseInInfo;
......
package cn.iocoder.yudao.module.order.vo.orderItem;
import cn.iocoder.yudao.module.order.vo.order.WarehouseCheckInfoVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "到仓订单项信息")
public class OrderItemCheckWarehouseVO {
@ApiModelProperty(value = "主键ID", required = true)
private Long orderItemId;
@ApiModelProperty(value = "订单ID", required = true)
private Long orderId;
@ApiModelProperty(value = "商品ID", required = true)
private Long prodId;
@ApiModelProperty(value = "产品类型")
private Integer prodType;
@ApiModelProperty(value = "产品中文标题")
private String prodTitleZh;
@ApiModelProperty(value = "产品英文标题")
private String prodTitleEn;
@ApiModelProperty(value = "到仓品牌ID", required = true)
private Long checkBrand;
@ApiModelProperty(value = "0 无牌 1 有牌 2 中性", required = true)
private Integer checkBrandType;
@ApiModelProperty(value = "商品特性(可选多个特性ID)")
private String checkProdAttrIds;
@ApiModelProperty(value = "入仓规格类型")
private Integer specificationType;
@ApiModelProperty(value = "材质")
private String checkMaterial;
@ApiModelProperty(value = "到仓数据")
private WarehouseCheckInfoVO warehouseCheckInfoVO;
}
package cn.iocoder.yudao.module.order.vo.orderItem;
import cn.iocoder.yudao.module.order.vo.order.WarehouseCheckInfoVO;
import cn.iocoder.yudao.module.order.vo.order.WarehouseInInfoVO;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.*;
import java.math.BigDecimal;
import java.util.*;
import io.swagger.annotations.*;
import org.apache.commons.lang3.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
......@@ -211,4 +214,28 @@ public class OrderItemQueryVO {
@ApiModelProperty(value = "是否处理了渠道特性异常")
private Boolean handlerChannelAttrException;
@ApiModelProperty(value = "到仓材质")
private String checkMaterial;
@ApiModelProperty(value = "到仓商品特性(可选多个特性ID)")
private String warehouseCheckProdAttrIds;
@ApiModelProperty(value = "到仓品牌")
private Long checkBrand;
@ApiModelProperty(value = "到仓:0 无牌 1 有牌 2 中性")
private Integer checkBrandType;
/**
* 到仓信息json
*/
@ApiModelProperty(value = "到仓信息json")
private String warehouseCheckInfo;
/**
* 到仓信息json
*/
@ApiModelProperty(value = "到仓信息VO")
private WarehouseCheckInfoVO warehouseCheckInfoVO;
}
package cn.iocoder.yudao.module.order.vo.orderItem;
import cn.iocoder.yudao.module.order.vo.order.WarehouseCheckInfoVO;
import cn.iocoder.yudao.module.order.vo.order.WarehouseInInfoVO;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.fastjson.JSONObject;
......@@ -7,6 +8,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
......@@ -287,6 +289,43 @@ public class OrderItemSpecialBackVO {
@ApiModelProperty(value = "是否处理了渠道特性异常")
private Boolean handlerChannelAttrException;
@ApiModelProperty(value = "到仓材质")
private String checkMaterial;
@ApiModelProperty(value = "到仓商品特性(可选多个特性ID)")
private String warehouseCheckProdAttrIds;
@ApiModelProperty(value = "到仓品牌")
private Long checkBrand;
@ApiModelProperty(value = "到仓:0 无牌 1 有牌 2 中性")
private Integer checkBrandType;
/**
* 到仓信息json
*/
@ApiModelProperty(value = "到仓信息json")
private String warehouseCheckInfo;
/**
* 到仓信息json
*/
@ApiModelProperty(value = "到仓信息VO")
private WarehouseCheckInfoVO warehouseCheckInfoVO;
public void setWarehouseCheckInfo(String warehouseCheckInfo) {
this.warehouseCheckInfo = warehouseCheckInfo;
if (StringUtils.isNotBlank(warehouseCheckInfo)) {
this.warehouseCheckInfoVO = JSONObject.parseObject(warehouseCheckInfo, WarehouseCheckInfoVO.class);
}
}
public void setWarehouseCheckInfoVO(WarehouseCheckInfoVO warehouseCheckInfoVO) {
this.warehouseCheckInfoVO = warehouseCheckInfoVO;
if (Objects.nonNull(warehouseCheckInfoVO)) {
this.warehouseCheckInfo = JSONObject.toJSONString(warehouseCheckInfoVO);
}
}
public void setWarehouseInInfo(String warehouseInInfo) {
this.warehouseInInfo = warehouseInInfo;
......
package cn.iocoder.yudao.module.order.vo.orderWarehouseCheck;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
......@@ -7,10 +8,14 @@ import java.math.BigDecimal;
@Data
public class CheckItemSumVO {
int cartons = 0; // 到仓总箱数
int quantity = 0; // 到仓总数量
BigDecimal volume = BigDecimal.ZERO; // 到仓总体积
BigDecimal weight = BigDecimal.ZERO; // 到仓总重量
@ApiModelProperty("到仓箱数")
private int cartons = 0; // 到仓总箱数
@ApiModelProperty("到仓数量")
private int quantity = 0; // 到仓总数量
@ApiModelProperty("到仓体积")
private BigDecimal volume = BigDecimal.ZERO; // 到仓总体积
@ApiModelProperty("到仓重量")
private BigDecimal weight = BigDecimal.ZERO; // 到仓总重量
public void add(Integer checkNum, Integer checkQuantity, BigDecimal checkVolume, BigDecimal checkWeight) {
......
package cn.iocoder.yudao.module.order.vo.orderWarehouseCheck;
import cn.iocoder.yudao.module.order.vo.order.OrderWarehouseInDetailsVO;
import cn.iocoder.yudao.module.order.vo.orderLocation.OrderLocationCreateReqVO;
import cn.iocoder.yudao.module.order.vo.orderWarehouseIn.OrderWarehouseInItemDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;
@ApiModel("管理后台 - 到仓货物详情更新 Item VO")
@Data
@EqualsAndHashCode
@ToString(callSuper = true)
public class OrderWarehouseCheckUpdateItemVO {
@ApiModelProperty(value = "到仓详情编号", required = true)
@NotNull(message = "到仓详情编号不能为空")
@ApiModelProperty(value = "入仓货物-id, 可为空")
private Long id;
@ApiModelProperty(value = "到仓详情总数", required = true)
@NotNull(message = "到仓详情总数不能为空")
private Integer quantityAll;
@ApiModelProperty(value = "到仓详情箱数", required = true)
@NotNull(message = "到仓详情箱数不能为空")
private Integer cartonsNum;
@ApiModelProperty(value = "入仓规格类型")
private Integer specificationType;
@ApiModelProperty(value = "入仓货物-包装类型", required = true)
@NotNull(message = "包装类型不能为空")
private String unit;
@ApiModelProperty(value = "入仓货物-箱规 长*宽*高")
private String boxGauge;
@ApiModelProperty(value = "到仓详情体积", required = true)
@NotNull(message = "到仓详情体积不能为空")
private BigDecimal checkVolume;
private BigDecimal volume;
@ApiModelProperty(value = "到仓详情重量", required = true)
@NotNull(message = "到仓详情重量不能为空")
private BigDecimal checkWeight;
private BigDecimal weight;
@ApiModelProperty(value = "入仓货物-快递单号")
private String expressNo;
@ApiModelProperty(value = "入仓备注")
@Length(max = 100, message = "备注最多支持100字")
private String remark;
@ApiModelProperty(value = "储位列表")
private List<OrderLocationCreateReqVO> orderLocationCreateReqVOList;
@ApiModelProperty(value = "入仓纪录明细列表")
private List<OrderWarehouseInDetailsVO> orderWarehouseInDetailsVOList;
@ApiModelProperty(value = "到仓详情总数", required = true)
@NotNull(message = "到仓详情总数不能为空")
private Integer checkQuantityAll;
@ApiModelProperty(value = "到仓详情箱数", required = true)
@NotNull(message = "到仓详情箱数不能为空")
private Integer checkCartonsNum;
}
......@@ -7,6 +7,7 @@ import lombok.EqualsAndHashCode;
import lombok.ToString;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;
@ApiModel("管理后台 - 到仓修改 Request VO")
......@@ -14,11 +15,58 @@ import java.util.List;
@EqualsAndHashCode
@ToString(callSuper = true)
public class OrderWarehouseCheckUpdateReqVO {
@ApiModelProperty(value = "到仓订单编号", required = true)
@NotNull(message = "到仓订单编号不能为空")
@ApiModelProperty(value = "订单ID", required = true)
@NotNull(message = "订单ID不能为空")
private Long orderId;
@ApiModelProperty(value = "订单项ID", required = true)
@NotNull(message = "订单项id不能为空")
private Long orderItemId;
/**
* 商品ID
*/
@ApiModelProperty(value = "订单项-商品id")
private Long prodId;
/**
* 产品类型
*/
@ApiModelProperty(value = "订单项-产品类型")
private Integer prodType;
/**
* 产品中文标题
*/
@ApiModelProperty(value = "订单项-产品中文标题")
private String prodTitleZh;
/**
* 产品英文标题
*/
@ApiModelProperty(value = "订单项-产品英文标题")
private String prodTitleEn;
/**
* 品牌
*/
@ApiModelProperty(value = "订单项-品牌")
private Long brand;
/**
* 0 无牌 1 有牌 2 中性
*/
@ApiModelProperty(value = "订单项-0 无牌 1 有牌 2 中性")
private Integer brandType;
@ApiModelProperty(value = "收费:无牌价0,有牌价1,中性品牌价2")
private Integer feeType;
@ApiModelProperty(value = "入仓商品特性(可选多个特性ID)")
private String warehouseInProdAttrIds;
/**
* 材质
*/
@ApiModelProperty(value = "材质")
private String material;
@ApiModelProperty(value = "到仓修改详情", required = true)
@NotNull(message = "到仓货物重量不能为空")
private List<OrderWarehouseCheckUpdateItemVO> updates;
}
......@@ -15,7 +15,7 @@ public class OrderWarehousePictureBaseVO {
@ApiModelProperty(value = "图片地址")
private String url;
@ApiModelProperty(value = "类型 1订单完成入仓 2 调拨出仓 3调拨到仓 4 订单转异 5订单项入仓 6报关资料")
@ApiModelProperty(value = "类型 1订单完成入仓 2 调拨出仓 3调拨到仓 4 订单转异 5订单项入仓 6报关资料 7 订单项到仓")
private Integer type;
@ApiModelProperty(value = "业务id")
......
......@@ -59,7 +59,7 @@ public class OrderWarehouseCheckController {
@ApiOperation("到仓修改")
@ApiImplicitParam(name = "orderId", value = "订单id", required = true, example = "1024", dataTypeClass = Long.class)
public CommonResult<Boolean> update(@Valid @RequestBody OrderWarehouseCheckUpdateReqVO req) {
service.update(req.getOrderId(), Optional.ofNullable(req.getUpdates()).orElseGet(Collections::emptyList));
service.update(req);
return success(true);
}
}
package cn.iocoder.yudao.module.shipment.vo.boxPreloadGoods;
import cn.hutool.core.collection.CollectionUtil;
import cn.iocoder.yudao.module.order.vo.order.WarehouseInInfoVO;
import cn.iocoder.yudao.module.order.vo.orderItem.OrderItemBackVO;
import io.swagger.annotations.ApiModelProperty;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment