Commit c8815893 authored by 332784038@qq.com's avatar 332784038@qq.com

Merge branch 'dev' into test

parents 3804d2de 739b2ffa
-- 到仓详情表
CREATE TABLE `ecw_order_warehouse_check` (
`id` bigint NOT NULL AUTO_INCREMENT 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 '创建者',
`create_time` datetime NOT NULL COMMENT '创建时间',
`updater` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
`heavy_number` decimal(10,2) DEFAULT NULL COMMENT '重货方数',
`light_number` decimal(10,2) DEFAULT NULL COMMENT '泡货方数',
`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',
PRIMARY KEY (`id`),
KEY `order_id` (`order_id`),
KEY `order_item_id` (`order_item_id`)
) ENGINE=InnoDB AUTO_INCREMENT=174745 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='到仓货物详情表'
-- 补充字典脚本
INSERT INTO `system_dict_type` (`name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ('商品列表中文标题匹配字段', 'prod_query_title_zh_field', 0, NULL, '2702', '2024-10-29 13:43:47', '2702', '2024-10-29 13:43:47', b'0');
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `label_en`) VALUES (0, '包含', 'titleZhKey', 'prod_query_title_zh_field', 0, 'default', '', NULL, '2702', '2024-10-29 13:44:28', '2702', '2024-10-29 13:44:28', b'0', 'include');
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `label_en`) VALUES (1, '等于', 'eqTitleZhKey', 'prod_query_title_zh_field', 0, 'default', '', NULL, '2702', '2024-10-29 13:45:12', '2702', '2024-10-29 13:45:12', b'0', 'equal');
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `label_en`) VALUES (2, '不等于', 'notEqTitleZhKey', 'prod_query_title_zh_field', 0, 'default', '', NULL, '2702', '2024-10-29 13:45:39', '2702', '2024-10-29 13:45:58', b'0', 'not equal');
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `label_en`) VALUES (4, '不包含', 'notTitleZhKey', 'prod_query_title_zh_field', 0, 'default', '', NULL, '2702', '2024-10-29 13:46:58', '2702', '2024-10-29 13:46:58', b'0', 'not contain');
package cn.iocoder.yudao.module.order.dal.dataobject.orderWarehouseCheck;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderWarehouseIn.handler.OrderWarehouseInDetailsTypeHandler;
import cn.iocoder.yudao.module.order.vo.order.OrderWarehouseInDetailsVO;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* 到仓货物详情 DO
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "ecw_order_warehouse_check", autoResultMap = true)
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class OrderWarehouseCheckDO extends BaseDO {
/**
* 主键ID
*/
@TableId
private Long id;
/**
* 订单ID
*/
private Long orderId;
/**
* 订单编号
*/
private String orderNo;
/**
* 订单项id
*/
private Long orderItemId;
/**
* 箱/件数
*/
private Integer cartonsNum;
/**
* 箱/件数
*/
private Integer checkCartonsNum;
/**
* 所有箱内总货物数量
*/
private Integer quantityAll;
/**
* 所有箱内总货物数量
*/
private Integer checkQuantityAll;
/**
* 单位
*/
private String unit;
/**
* 入仓规格类型 1箱/2整板 见字典 warehousing_specification_type
*/
private Integer specificationType;
/**
* 箱规
*/
private String boxGauge;
/**
* 体积
*/
private BigDecimal volume;
/**
* 到仓体积
*/
private BigDecimal checkVolume;
/**
* 重量
*/
private BigDecimal weight;
/**
* 到仓重量
*/
private BigDecimal checkWeight;
/**
* 快递单号
*/
private String expressNo;
/**
* 入仓时间
*/
private Date inTime;
/**
* 入仓来源 字典order_warehouse_in_source 1-始发港入仓、2-调拨入仓、3-目的港入仓、4-退场入仓
*/
private Integer source;
/**
* 重货方数
*/
private BigDecimal heavyNumber;
/**
* 泡货方数
*/
private BigDecimal lightNumber;
/**
* 备注
*/
private String remark;
/**
* 入仓纪录明细VO
*/
@TableField(value = "order_warehouse_in_details", typeHandler = OrderWarehouseInDetailsTypeHandler.class)
private List<OrderWarehouseInDetailsVO> orderWarehouseInDetailsVOList;
@TableField(exist = false)
private String locationId;
}
package cn.iocoder.yudao.module.order.dal.mysql.orderWarehouseCheck;
import cn.iocoder.yudao.framework.mybatis.core.mapper.AbstractMapper;
import cn.iocoder.yudao.module.order.dal.dataobject.orderWarehouseCheck.OrderWarehouseCheckDO;
import org.apache.ibatis.annotations.Mapper;
/**
* 到仓货物详情 Mapper
*/
@Mapper
public interface OrderWarehouseCheckMapper extends AbstractMapper<OrderWarehouseCheckDO> {
}
...@@ -223,6 +223,9 @@ public interface ErrorCodeConstants { ...@@ -223,6 +223,9 @@ public interface ErrorCodeConstants {
ErrorCode WAREHOUSE_APPROVAL_BATCH_ADJUST_APPLYING = new ErrorCode(1006010014, "warehouse.approval.batch.adjust.applying"); ErrorCode WAREHOUSE_APPROVAL_BATCH_ADJUST_APPLYING = new ErrorCode(1006010014, "warehouse.approval.batch.adjust.applying");
ErrorCode WAREHOUSE_APPROVAL_PASSED_CANNOT_CANCEL = new ErrorCode(1006010015, "warehouse.approval.passed.cannot.cancel"); ErrorCode WAREHOUSE_APPROVAL_PASSED_CANNOT_CANCEL = new ErrorCode(1006010015, "warehouse.approval.passed.cannot.cancel");
ErrorCode ORDER_WAREHOUSE_CHECK_NOT_EXISTS = new ErrorCode(1006010016, "order.warehouse.check.not.exists");
ErrorCode ORDER_WAREHOUSE_CHECK_BAD_VOLUME = new ErrorCode(1006010017, "order.warehouse.check.bad.volume");
ErrorCode ORDER_WAREHOUSE_CHECK_BAD_WEIGHT = new ErrorCode(1006010018, "order.warehouse.check.bad.weight");
ErrorCode ORDER_LABEL_NOT_EMPTY = new ErrorCode(1006010020, "order.label.not.empty"); ErrorCode ORDER_LABEL_NOT_EMPTY = new ErrorCode(1006010020, "order.label.not.empty");
......
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 java.util.List;
/**
* 到仓货物详情 Service 接口
*/
public interface OrderWarehouseCheckService extends IService<OrderWarehouseCheckDO> {
/**
* 到仓查询. 当前订单到仓信息详情列表
*
* @param orderId 订单编号
* @return 到仓详情列表
*/
List<OrderWarehouseCheckDO> list(long orderId);
/**
* 订单到仓. 复制入仓信息,到仓订单修改已在缷柜逻辑中
*
* @param orderId 订单编号
*/
void check(long orderId);
/**
* 强制到仓. 箱数=入仓箱数
*
* @param orderId 订单编号
*/
void force(long orderId);
/**
* 撤销到仓. 修改订单状态为已清关,清空到仓时间箱数以及详情
*
* @param orderId 订单编号
*/
void revoke(long orderId);
/**
* 到仓修改. 允许修改到仓后的体积与重量,箱数默认为到仓箱数
*
* @param orderId 订单编号
* @param updates 更新详情
*/
void update(long orderId, List<OrderWarehouseCheckUpdateItemVO> updates);
}
package cn.iocoder.yudao.module.order.service.orderWarehouseCheck;
import cn.iocoder.yudao.framework.common.exception.ServiceException;
import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil;
import cn.iocoder.yudao.framework.mybatis.core.service.AbstractService;
import cn.iocoder.yudao.module.order.dal.dataobject.orderWarehouseCheck.OrderWarehouseCheckDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderWarehouseIn.OrderWarehouseInDO;
import cn.iocoder.yudao.module.order.dal.mysql.orderWarehouseCheck.OrderWarehouseCheckMapper;
import cn.iocoder.yudao.module.order.enums.ErrorCodeConstants;
import cn.iocoder.yudao.module.order.service.order.OrderBusinessService;
import cn.iocoder.yudao.module.order.service.orderWarehouseIn.OrderWarehouseInService;
import cn.iocoder.yudao.module.order.vo.orderWarehouseCheck.OrderWarehouseCheckUpdateItemVO;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.function.Function;
import java.util.stream.Collectors;
@Slf4j
@Service
@Validated
public class OrderWarehouseCheckServiceImpl
extends AbstractService<OrderWarehouseCheckMapper, OrderWarehouseCheckDO>
implements OrderWarehouseCheckService {
@Autowired
private OrderBusinessService orderBusinessService;
@Autowired
private OrderWarehouseInService orderWarehouseInService;
@Override
public List<OrderWarehouseCheckDO> list(long orderId) {
return abstractMapper.selectList(OrderWarehouseCheckDO::getOrderId, orderId);
}
// 到仓信息统计
private class Sum {
int cartons = 0; // 到仓总箱数
int quantity = 0; // 到仓总数量
BigDecimal volume = BigDecimal.ZERO; // 到仓总体积
BigDecimal weight = BigDecimal.ZERO; // 到仓总重量
// 将到仓信息累加
void add(OrderWarehouseCheckDO checkDo) {
cartons += checkDo.getCheckCartonsNum();
quantity += checkDo.getCheckQuantityAll();
volume = volume.add(checkDo.getCheckVolume());
weight = weight.add(checkDo.getCheckWeight());
}
// 将统计数据更新到订单中
void done(long orderId) {
orderBusinessService.orderToWarehouse(orderId, cartons, quantity, volume, weight);
}
}
// 重置到仓数据为入仓数据
private void reset(OrderWarehouseCheckDO checkDo) {
checkDo.setCheckVolume(checkDo.getVolume());
checkDo.setCheckWeight(checkDo.getWeight());
checkDo.setCheckCartonsNum(checkDo.getCartonsNum());
checkDo.setCheckQuantityAll(checkDo.getQuantityAll());
}
@Override
public void check(long orderId) {
Sum sum = new Sum();
// 全部到仓,复制入仓信息
for (OrderWarehouseInDO inDo : orderWarehouseInService.selectList(OrderWarehouseInDO::getOrderId, orderId)) {
OrderWarehouseCheckDO checkDo = new OrderWarehouseCheckDO();
BeanUtils.copyProperties(inDo, checkDo);
reset(checkDo);
sum.add(checkDo);
abstractMapper.insert(checkDo);
}
sum.done(orderId);
}
@Override
public void revoke(long orderId) {
LambdaQueryWrapper<OrderWarehouseCheckDO> wrapper = Wrappers.lambdaQuery();
// 清空到仓信息
abstractMapper.delete(wrapper.eq(OrderWarehouseCheckDO::getOrderId, orderId));
orderBusinessService.revokeToWarehouse(orderId);
}
@Override
public void force(long orderId) {
Sum sum = new Sum();
// 强制到仓信息一致
for (OrderWarehouseCheckDO checkDo : list(orderId)) {
reset(checkDo);
sum.add(checkDo);
abstractMapper.updateById(checkDo);
}
sum.done(orderId);
}
@Override
public void update(long orderId, List<OrderWarehouseCheckUpdateItemVO> updates) {
Sum sum = new Sum();
Map<Long, OrderWarehouseCheckDO> mappings = list(orderId).stream()
.collect(Collectors.toMap(OrderWarehouseCheckDO::getId, Function.identity()));
ServiceException exception = ServiceExceptionUtil.exception(ErrorCodeConstants.ORDER_WAREHOUSE_CHECK_NOT_EXISTS);
// 应用更新数据到到仓详情
for (OrderWarehouseCheckUpdateItemVO update : updates) {
OrderWarehouseCheckDO checkDo = Optional.ofNullable(mappings.get(update.getId()))
.orElseThrow(() -> exception);
checkDo.setCheckVolume(update.getCheckVolume());
checkDo.setCheckWeight(update.getCheckWeight());
checkDo.setCheckCartonsNum(update.getCheckCartonsNum());
checkDo.setCheckQuantityAll(update.getCheckQuantityAll());
}
// 统计并更新到数据库
for (OrderWarehouseCheckDO checkDo : mappings.values()) {
sum.add(checkDo);
abstractMapper.updateById(checkDo);
}
sum.done(orderId);
}
}
package cn.iocoder.yudao.module.order.vo.orderWarehouseCheck;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
@ApiModel("管理后台 - 到仓货物详情更新 Item VO")
@Data
@EqualsAndHashCode
@ToString(callSuper = true)
public class OrderWarehouseCheckUpdateItemVO {
@ApiModelProperty(value = "到仓详情编号", required = true)
@NotNull(message = "到仓详情编号不能为空")
private Long id;
@ApiModelProperty(value = "到仓详情体积", required = true)
@NotNull(message = "到仓详情体积不能为空")
private BigDecimal checkVolume;
@ApiModelProperty(value = "到仓详情重量", required = true)
@NotNull(message = "到仓详情重量不能为空")
private BigDecimal checkWeight;
@ApiModelProperty(value = "到仓详情总数", required = true)
@NotNull(message = "到仓详情总数不能为空")
private Integer checkQuantityAll;
@ApiModelProperty(value = "到仓详情箱数", required = true)
@NotNull(message = "到仓详情箱数不能为空")
private Integer checkCartonsNum;
}
package cn.iocoder.yudao.module.order.vo.orderWarehouseCheck;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import javax.validation.constraints.NotNull;
import java.util.List;
@ApiModel("管理后台 - 到仓修改 Request VO")
@Data
@EqualsAndHashCode
@ToString(callSuper = true)
public class OrderWarehouseCheckUpdateReqVO {
@ApiModelProperty(value = "到仓订单编号", required = true)
@NotNull(message = "到仓订单编号不能为空")
private Long orderId;
@ApiModelProperty(value = "到仓修改详情", required = true)
@NotNull(message = "到仓货物重量不能为空")
private List<OrderWarehouseCheckUpdateItemVO> updates;
}
package cn.iocoder.yudao.module.order.controller.admin.orderWarehouseCheck;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.order.dal.dataobject.orderWarehouseCheck.OrderWarehouseCheckDO;
import cn.iocoder.yudao.module.order.service.orderWarehouseCheck.OrderWarehouseCheckService;
import cn.iocoder.yudao.module.order.vo.orderWarehouseCheck.OrderWarehouseCheckUpdateReqVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.Valid;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Validated
@RestController
@Api(tags = "管理后台 - 订单到仓相关接口")
@RequestMapping("/order/order-warehouse-check")
public class OrderWarehouseCheckController {
@Autowired
private OrderWarehouseCheckService service;
@GetMapping("/query")
@ApiOperation("到仓查询")
@ApiImplicitParam(name = "orderId", value = "订单id", required = true, example = "1024", dataTypeClass = Long.class)
public CommonResult<List<OrderWarehouseCheckDO>> query(@RequestParam("orderId") Long orderId) {
return success(service.list(orderId));
}
@PostMapping("/force")
@ApiOperation("强制到仓")
@ApiImplicitParam(name = "orderId", value = "订单id", required = true, example = "1024", dataTypeClass = Long.class)
public CommonResult<Boolean> force(@RequestParam("orderId") Long orderId) {
service.force(orderId);
return success(true);
}
@PostMapping("/revoke")
@ApiOperation("撤销到仓")
@ApiImplicitParam(name = "orderId", value = "订单id", required = true, example = "1024", dataTypeClass = Long.class)
public CommonResult<Boolean> revoke(@RequestParam("orderId") Long orderId) {
service.revoke(orderId);
return success(true);
}
@PutMapping("/update")
@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));
return success(true);
}
}
...@@ -144,6 +144,10 @@ public interface ProductMapper extends BaseMapperX<ProductDO> { ...@@ -144,6 +144,10 @@ public interface ProductMapper extends BaseMapperX<ProductDO> {
"AND t.`audit_status` = #{query.auditStatus}", "AND t.`audit_status` = #{query.auditStatus}",
"</when>", "</when>",
"<when test = 'query.packaging != null'>",
"AND t.`packaging` = #{query.packaging}",
"</when>",
"<when test = 'query.titleZh != null and query.titleZh != \"\"'>", "<when test = 'query.titleZh != null and query.titleZh != \"\"'>",
"AND (t.`title_zh` like concat('%',concat(#{query.titleZh},'%')) or t.`title_en` like concat('%',concat(#{query.titleZh},'%')))", "AND (t.`title_zh` like concat('%',concat(#{query.titleZh},'%')) or t.`title_en` like concat('%',concat(#{query.titleZh},'%')))",
"</when>", "</when>",
...@@ -166,6 +170,47 @@ public interface ProductMapper extends BaseMapperX<ProductDO> { ...@@ -166,6 +170,47 @@ public interface ProductMapper extends BaseMapperX<ProductDO> {
// "AND FIND_IN_SET(t.`attr_id`, #{query.attrId})", // "AND FIND_IN_SET(t.`attr_id`, #{query.attrId})",
"</when>", "</when>",
"<when test=\"query.materialTypes != null and query.materialTypes.size()>0\">" ,
"<when test=\"query.materialTypes != null and query.materialTypes.size()==1 \">" +
"<foreach item='materialType' index=\"index\" collection='query.materialTypes' >" +
"AND t.`material_type` = #{materialType}" +
"</foreach>" +
"</when>",
"<when test=\"query.materialTypes != null and query.materialTypes.size()>1 \">" +
" AND t.`material_type` in " +
" <foreach item='materialType' index='index' collection='query.materialTypes' open='(' separator=',' close=')'>" +
" #{materialType}" +
" </foreach>" +
"</when>" +
"</when>",
" <when test='query.beginCreateTime != null' >",
"AND <![CDATA[ t.create_time >= #{query.beginCreateTime} ]]> ",
"</when>",
" <when test='query.endCreateTime != null' >",
"AND <![CDATA[ t.create_time <= #{query.endCreateTime} ]]> ",
"</when>",
"<when test=\"query.creator != null and query.creator != '' \">" +
"AND c.`nickname` like concat('%',concat(#{query.creator},'%'))",
"</when>",
"<when test=\"query.titleZhKey != null and query.titleZhKey != '' \">" +
"AND c.`title_zh` like concat('%',concat(#{query.titleZhKey},'%'))",
"</when>",
"<when test=\"query.notTitleZhKey != null and query.notTitleZhKey != '' \">" +
"AND c.`title_zh` not like concat('%',concat(#{query.notTitleZhKey},'%'))",
"</when>",
"<when test=\"query.eqTitleZhKey != null and query.eqTitleZhKey != '' \">" +
"AND c.`title_zh` = #{query.eqTitleZhKey} ",
"</when>",
"<when test=\"query.notEqTitleZhKey != null and query.notEqTitleZhKey != '' \">" +
"AND c.`title_zh` != #{query.notEqTitleZhKey} ",
"</when>",
"order by t.id desc", "order by t.id desc",
"</script>" "</script>"
......
...@@ -26,9 +26,26 @@ public class ProductReqDTO extends PageParam { ...@@ -26,9 +26,26 @@ public class ProductReqDTO extends PageParam {
@ApiModelProperty(value = "商品属性id") @ApiModelProperty(value = "商品属性id")
//private String attrId; //private String attrId;
private List<String> attrId; private List<String> attrId;
@ApiModelProperty(value = "商品材质id")
//private String materialTypes;
private List<String> materialTypes;
@ApiModelProperty(value = "中文标题") @ApiModelProperty(value = "中文标题")
private String titleZh; private String titleZh;
@ApiModelProperty(value = "中文标题搜索(包括订单号,麦头,提单号)")
private String titleZhKey;
@ApiModelProperty(value = "反向中文标题搜索(包括订单号,麦头,提单号)不包含的数据")
private String notTitleZhKey;
@ApiModelProperty(value = "中文标题搜索强等于(包括订单号,麦头,提单号)")
private String eqTitleZhKey;
@ApiModelProperty(value = "中文标题搜索强不等于(包括订单号,麦头,提单号)")
private String notEqTitleZhKey;
@ApiModelProperty(value = "英文标题") @ApiModelProperty(value = "英文标题")
private String titleEn; private String titleEn;
...@@ -79,6 +96,9 @@ public class ProductReqDTO extends PageParam { ...@@ -79,6 +96,9 @@ public class ProductReqDTO extends PageParam {
@ApiModelProperty(value = "结束创建时间") @ApiModelProperty(value = "结束创建时间")
private Date endCreateTime; private Date endCreateTime;
@ApiModelProperty(value = "创建人")
private String creator;
private boolean filter = true; private boolean filter = true;
/** /**
......
...@@ -21,6 +21,7 @@ import cn.iocoder.yudao.module.order.service.order.OrderItemService; ...@@ -21,6 +21,7 @@ import cn.iocoder.yudao.module.order.service.order.OrderItemService;
import cn.iocoder.yudao.module.order.service.order.OrderQueryService; import cn.iocoder.yudao.module.order.service.order.OrderQueryService;
import cn.iocoder.yudao.module.order.service.order.OrderService; import cn.iocoder.yudao.module.order.service.order.OrderService;
import cn.iocoder.yudao.module.order.service.orderLabel.OrderLabelService; import cn.iocoder.yudao.module.order.service.orderLabel.OrderLabelService;
import cn.iocoder.yudao.module.order.service.orderWarehouseCheck.OrderWarehouseCheckService;
import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO; import cn.iocoder.yudao.module.order.vo.order.OrderQueryVO;
import cn.iocoder.yudao.module.order.vo.orderLabel.OrderLabelQueryVO; import cn.iocoder.yudao.module.order.vo.orderLabel.OrderLabelQueryVO;
import cn.iocoder.yudao.module.order.vo.orderLocation.OrderLocationCreateReqVO; import cn.iocoder.yudao.module.order.vo.orderLocation.OrderLocationCreateReqVO;
...@@ -107,6 +108,10 @@ public class BoxLoadInfoServiceImpl extends AbstractService<BoxLoadInfoMapper, B ...@@ -107,6 +108,10 @@ public class BoxLoadInfoServiceImpl extends AbstractService<BoxLoadInfoMapper, B
@Lazy @Lazy
private BoxPkgOrderService boxPkgOrderService; private BoxPkgOrderService boxPkgOrderService;
@Resource
@Lazy
private OrderWarehouseCheckService orderWarehouseCheckService;
public static void main(String[] args) { public static void main(String[] args) {
String number = "NG2200491L-01-1"; String number = "NG2200491L-01-1";
int position = number.lastIndexOf("-"); int position = number.lastIndexOf("-");
...@@ -663,6 +668,7 @@ public class BoxLoadInfoServiceImpl extends AbstractService<BoxLoadInfoMapper, B ...@@ -663,6 +668,7 @@ public class BoxLoadInfoServiceImpl extends AbstractService<BoxLoadInfoMapper, B
//修改订单状态为已到仓 //修改订单状态为已到仓
updateOrderStatusAir(orderIdSet, ulBoxTime, createReqVO.getShipmentId()); updateOrderStatusAir(orderIdSet, ulBoxTime, createReqVO.getShipmentId());
// boxService.updateUlBoxTime(createReqVO.getShipmentId(), ulBoxTime); // boxService.updateUlBoxTime(createReqVO.getShipmentId(), ulBoxTime);
orderIdSet.forEach(orderWarehouseCheckService::check);
} }
...@@ -719,6 +725,7 @@ public class BoxLoadInfoServiceImpl extends AbstractService<BoxLoadInfoMapper, B ...@@ -719,6 +725,7 @@ public class BoxLoadInfoServiceImpl extends AbstractService<BoxLoadInfoMapper, B
.eq(BoxLoadInfoDO::getShipmentId, shipmentId) .eq(BoxLoadInfoDO::getShipmentId, shipmentId)
); );
updateOrderStatusAir(Collections.singletonList(orderId), ulBoxTime, shipmentId); updateOrderStatusAir(Collections.singletonList(orderId), ulBoxTime, shipmentId);
orderWarehouseCheckService.check(orderId);
} }
} else { } else {
//单个卸柜 //单个卸柜
...@@ -767,6 +774,7 @@ public class BoxLoadInfoServiceImpl extends AbstractService<BoxLoadInfoMapper, B ...@@ -767,6 +774,7 @@ public class BoxLoadInfoServiceImpl extends AbstractService<BoxLoadInfoMapper, B
} }
if(CollectionUtil.isNotEmpty(unloadOrderList)) { if(CollectionUtil.isNotEmpty(unloadOrderList)) {
updateOrderStatusAir(unloadOrderList, ulBoxTime, shipmentId); updateOrderStatusAir(unloadOrderList, ulBoxTime, shipmentId);
unloadOrderList.forEach(orderWarehouseCheckService::check);
} }
} }
// boxService.updateUlBoxTime(shipmentId, ulBoxTime); // boxService.updateUlBoxTime(shipmentId, ulBoxTime);
...@@ -1129,6 +1137,7 @@ public class BoxLoadInfoServiceImpl extends AbstractService<BoxLoadInfoMapper, B ...@@ -1129,6 +1137,7 @@ public class BoxLoadInfoServiceImpl extends AbstractService<BoxLoadInfoMapper, B
); );
updateOrderStatus(Collections.singletonList(orderId), ulBoxTime, shipmentId); updateOrderStatus(Collections.singletonList(orderId), ulBoxTime, shipmentId);
orderWarehouseCheckService.check(orderId);
} }
} else { } else {
//单个卸柜 //单个卸柜
...@@ -1179,6 +1188,7 @@ public class BoxLoadInfoServiceImpl extends AbstractService<BoxLoadInfoMapper, B ...@@ -1179,6 +1188,7 @@ public class BoxLoadInfoServiceImpl extends AbstractService<BoxLoadInfoMapper, B
} }
if(CollectionUtil.isNotEmpty(unloadOrderList)) { if(CollectionUtil.isNotEmpty(unloadOrderList)) {
updateOrderStatus(unloadOrderList, ulBoxTime, shipmentId); updateOrderStatus(unloadOrderList, ulBoxTime, shipmentId);
unloadOrderList.forEach(orderWarehouseCheckService::check);
} }
} }
// boxService.updateUlBoxTime(shipmentId, ulBoxTime); // boxService.updateUlBoxTime(shipmentId, ulBoxTime);
...@@ -1208,6 +1218,7 @@ public class BoxLoadInfoServiceImpl extends AbstractService<BoxLoadInfoMapper, B ...@@ -1208,6 +1218,7 @@ public class BoxLoadInfoServiceImpl extends AbstractService<BoxLoadInfoMapper, B
//修改订单状态为已到仓 //修改订单状态为已到仓
updateOrderStatus(orderIdSet, ulBoxTime, shipmentId); updateOrderStatus(orderIdSet, ulBoxTime, shipmentId);
// boxService.updateUlBoxTime(shipmentId, ulBoxTime); // boxService.updateUlBoxTime(shipmentId, ulBoxTime);
orderIdSet.forEach(orderWarehouseCheckService::check);
} }
@Override @Override
......
...@@ -126,6 +126,9 @@ not.find.currency=No available currency units found ...@@ -126,6 +126,9 @@ not.find.currency=No available currency units found
order.warehouse.in.not.exists=order warehouse in not exists order.warehouse.in.not.exists=order warehouse in not exists
order.warehouse.in.update.not.exists=order warehouse in update data not exists order.warehouse.in.update.not.exists=order warehouse in update data not exists
order.warehouse.approval.not.exists=order warehouse approval not exists order.warehouse.approval.not.exists=order warehouse approval not exists
order.warehouse.check.not.exists=order warehouse check not exists
order.warehouse.check.bad.volume=order warehouse check bad volume
order.warehouse.check.bad.weight=order warehouse check bad weight
warehouse.adjust.not.exists=warehouse adjust not exists warehouse.adjust.not.exists=warehouse adjust not exists
shipment.not.exists=Shipment does not exist shipment.not.exists=Shipment does not exist
shipment.order.exit.not.exists=Order exit information does not exist shipment.order.exit.not.exists=Order exit information does not exist
......
...@@ -126,6 +126,9 @@ not.find.currency=\u672A\u627E\u5230\u53EF\u7528\u8D27\u5E01\u5355\u4F4D ...@@ -126,6 +126,9 @@ not.find.currency=\u672A\u627E\u5230\u53EF\u7528\u8D27\u5E01\u5355\u4F4D
order.warehouse.in.not.exists=\u5165\u4ED3\u8D27\u7269\u8BE6\u60C5\u4E0D\u5B58\u5728 order.warehouse.in.not.exists=\u5165\u4ED3\u8D27\u7269\u8BE6\u60C5\u4E0D\u5B58\u5728
order.warehouse.in.update.not.exists=\u6CA1\u6709\u8981\u4FEE\u6539\u7684\u5165\u4ED3\u6570\u636E order.warehouse.in.update.not.exists=\u6CA1\u6709\u8981\u4FEE\u6539\u7684\u5165\u4ED3\u6570\u636E
order.warehouse.approval.not.exists=\u5165\u4ED3\u5355\u5BA1\u6838\u4E0D\u5B58\u5728 order.warehouse.approval.not.exists=\u5165\u4ED3\u5355\u5BA1\u6838\u4E0D\u5B58\u5728
order.warehouse.check.not.exists=\u5230\u4ed3\u8d27\u7269\u8be6\u60c5\u4e0d\u5b58\u5728
order.warehouse.check.bad.volume=\u5230\u4ed3\u8d27\u7269\u4f53\u79ef\u8d85\u51fa
order.warehouse.check.bad.weight=\u5230\u4ed3\u8d27\u7269\u91cd\u91cf\u8d85\u51fa
warehouse.adjust.not.exists=\u8C03\u4ED3\u8BB0\u5F55\u4E0D\u5B58\u5728 warehouse.adjust.not.exists=\u8C03\u4ED3\u8BB0\u5F55\u4E0D\u5B58\u5728
shipment.not.exists=\u51FA\u8D27\u4E0D\u5B58\u5728 shipment.not.exists=\u51FA\u8D27\u4E0D\u5B58\u5728
shipment.order.exit.not.exists=\u8BA2\u5355\u9000\u573A\u4FE1\u606F\u4E0D\u5B58\u5728 shipment.order.exit.not.exists=\u8BA2\u5355\u9000\u573A\u4FE1\u606F\u4E0D\u5B58\u5728
......
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