## 去掉供应链涉及内容;
This commit is contained in:
parent
f2242b0161
commit
1373947c10
|
@ -7,19 +7,17 @@
|
|||
bd-api-bonus -- 奖金服务接口以及RPC传输数据DTO实体
|
||||
bd-api-member -- 会员服务接口以及RPC传输数据DTO实体
|
||||
bd-api-report -- 报表服务接口以及RPC传输数据DTO实体
|
||||
bd-api-sale -- 销售、供应链服务接口以及RPC传输数据DTO实体
|
||||
bd-api-sale -- 销售服务接口以及RPC传输数据DTO实体
|
||||
bd-api-system -- 系统基础服务接口以及RPC传输数据DTO实体
|
||||
bd-api-third -- 三方服务接口以及RPC传输数据DTO实体
|
||||
|
||||
### hzs-business(业务相关服务)
|
||||
hzs-business-activity -- 活动服务(所有活动等) 8095
|
||||
hzs-business-bonus -- 奖金服务(奖金计算等) 8098
|
||||
hzs-business-common -- 业务服务公共类(工具类)
|
||||
hzs-business-member -- 会员服务(会员、账户、银行等) 8092
|
||||
hzs-business-report -- 报表服务(统计分析、仪表盘等) 8097
|
||||
hzs-business-sale -- 销售服务(订单、商品、邮费、仓库进销存等) 8093
|
||||
hzs-business-sale -- 销售服务(订单、商品、邮费等) 8093
|
||||
hzs-business-system -- 系统基础服务(基础配置、自定义配置等) 8091
|
||||
hzs-business-scm -- 进销存服务(进销存功能等) 8099
|
||||
|
||||
### hzs-common(基础公用组件)
|
||||
hzs-common-core -- 核心公用组件、缓存操作等
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
package com.hzs.member.base;
|
||||
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.domain.member.detail.CuMemberLevel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 会员等级相关dubbo服务
|
||||
* @Author: jiang chao
|
||||
* @Time: 2025/2/27 9:25
|
||||
* @Classname: IMemberLevelServiceApi
|
||||
* @PackageName: com.hzs.member.base
|
||||
*/
|
||||
public interface IMemberLevelServiceApi {
|
||||
|
||||
/**
|
||||
* 获取会员升级记录
|
||||
*
|
||||
* @param pkMember 会员ID
|
||||
* @param pkOrder 订单ID -- 可为空
|
||||
* @return
|
||||
*/
|
||||
R<List<CuMemberLevel>> listMemberLevel(Long pkMember, Long pkOrder);
|
||||
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>com.bd</groupId>
|
||||
<artifactId>bd-api</artifactId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>bd-api-scm</artifactId>
|
||||
|
||||
<description>
|
||||
bd-api-scm进销存服务
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.bd</groupId>
|
||||
<artifactId>bd-api-system</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.bd</groupId>
|
||||
<artifactId>bd-common-domain</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -1,41 +0,0 @@
|
|||
package com.hzs.scm.product;/**
|
||||
* @Description:
|
||||
* @Author: yuhui
|
||||
* @Time: 2023/11/23 18:28
|
||||
* @Classname: IBdProductBasSpecsServiceApi
|
||||
* @PackageName: com.hzs.scm.product
|
||||
*/
|
||||
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.domain.sale.product.BdProductBas;
|
||||
import com.hzs.common.domain.sale.product.BdProductBasSpecs;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*@BelongsProject: hzs_cloud
|
||||
*@BelongsPackage: com.hzs.scm.product
|
||||
*@Author: yh
|
||||
*@CreateTime: 2023-11-23 18:28
|
||||
*@Description: TODO
|
||||
*@Version: 1.0
|
||||
*/
|
||||
public interface IBdProductBasSpecsServiceApi {
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param productBasSpecsList
|
||||
* @return
|
||||
*/
|
||||
R<Boolean> saveAll(List<BdProductBasSpecs> productBasSpecsList);
|
||||
|
||||
/**
|
||||
* 删除 (根据pkProductBas删除)
|
||||
* @param pkProductBasList
|
||||
* @return
|
||||
*/
|
||||
R<Boolean> removeByPkProductBasList(List<Integer> pkProductBasList);
|
||||
|
||||
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
package com.hzs.scm.product;
|
||||
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.domain.sale.product.BdProductBas;
|
||||
import com.hzs.scm.product.dto.ProductBasDTO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Author: yuhui
|
||||
* @Time: 2023/11/23 17:59
|
||||
* @Classname: IProductBasServiceApi
|
||||
* @PackageName: com.hzs.scm.product
|
||||
*/
|
||||
public interface IProductBasServiceApi {
|
||||
|
||||
|
||||
/**
|
||||
* 批量新增
|
||||
* @param productBas
|
||||
* @return
|
||||
*/
|
||||
R<BdProductBas> save(BdProductBas productBas);
|
||||
|
||||
/**
|
||||
* 根据id 修改
|
||||
*/
|
||||
R<Boolean> updateById(BdProductBas productBas);
|
||||
|
||||
/**
|
||||
* 根据id 查询
|
||||
* @return
|
||||
*/
|
||||
R<ProductBasDTO> getProductBasById(Integer pkId);
|
||||
|
||||
/**
|
||||
* 根据产品编号 查询
|
||||
* @return
|
||||
*/
|
||||
R<ProductBasDTO> getProductBasByProductCode(String productCode);
|
||||
|
||||
|
||||
}
|
|
@ -1,90 +0,0 @@
|
|||
package com.hzs.scm.product.dto;/**
|
||||
* @Description:
|
||||
* @Author: yuhui
|
||||
* @Time: 2023/11/23 18:04
|
||||
* @Classname: ProductDTO
|
||||
* @PackageName: com.hzs.scm.product.provider.dto
|
||||
*/
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
*@BelongsProject: hzs_cloud
|
||||
*@BelongsPackage: com.hzs.scm.product.provider.dto
|
||||
*@Author: yh
|
||||
*@CreateTime: 2023-11-23 18:04
|
||||
*@Description: TODO
|
||||
*@Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class ProductBasDTO implements Serializable {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
|
||||
private Integer pkId;
|
||||
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
|
||||
private String productCode;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 规格分类
|
||||
*/
|
||||
|
||||
private Integer pkClassify;
|
||||
|
||||
/**
|
||||
* 单位 来源于枚举:单位
|
||||
*/
|
||||
|
||||
private Integer unit;
|
||||
|
||||
/**
|
||||
* 重量 以千克作为单位
|
||||
*/
|
||||
|
||||
private BigDecimal weight;
|
||||
|
||||
/**
|
||||
* 长 以厘米作为单位
|
||||
*/
|
||||
|
||||
private BigDecimal length;
|
||||
|
||||
/**
|
||||
* 宽 以厘米作为单位
|
||||
*/
|
||||
|
||||
private BigDecimal width;
|
||||
|
||||
/**
|
||||
* 高 以厘米作为单位
|
||||
*/
|
||||
|
||||
private BigDecimal height;
|
||||
|
||||
/**
|
||||
* 封面图
|
||||
*/
|
||||
|
||||
private String cover;
|
||||
|
||||
/**
|
||||
* 保质期
|
||||
*/
|
||||
|
||||
private Integer shelfLife;
|
||||
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
package com.hzs.scm.pub;
|
||||
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.core.enums.EApprovalBusiness;
|
||||
import com.hzs.common.domain.sale.ext.SaOrderExt;
|
||||
import com.hzs.common.domain.scm.ic.IcAvailableNum;
|
||||
import com.hzs.common.domain.scm.ic.ext.IcAvailableNumExt;
|
||||
import com.hzs.scm.pub.dto.BillDTO;
|
||||
import com.hzs.system.sys.dto.ApprovalBusinessResultDTO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 供应链单据对外接口发布
|
||||
*/
|
||||
public interface IScmBillServiceApi {
|
||||
|
||||
/**
|
||||
* 活动服务信息处理回调
|
||||
*
|
||||
* @param approvalBusinessResultDTO 参数
|
||||
* @return
|
||||
*/
|
||||
R<Boolean> approvalCallback(ApprovalBusinessResultDTO approvalBusinessResultDTO);
|
||||
|
||||
/**
|
||||
* 查询单据信息
|
||||
*/
|
||||
R<List<BillDTO>> queryBillDtoByCondition(EApprovalBusiness eApprovalBusiness, String businessCode);
|
||||
|
||||
/**
|
||||
* 更新可用量
|
||||
*/
|
||||
R<Boolean> updateDeductIcAvailableNumByList(List<IcAvailableNumExt> availableNumList);
|
||||
|
||||
/**
|
||||
* 撤单、退单回退可用量
|
||||
*/
|
||||
R<Boolean> backSaOrderAvailable(SaOrderExt saOrderExt);
|
||||
}
|
|
@ -1,108 +0,0 @@
|
|||
package com.hzs.scm.pub.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: 单据主表表头
|
||||
* @author: sui q
|
||||
* @time: 2023/11/25 09:23
|
||||
* @classname: BillDTO
|
||||
* @package_name: com.hzs.scm.ic.dto
|
||||
* version 1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class BillDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long pkId;
|
||||
|
||||
/**
|
||||
* 采购部门
|
||||
*/
|
||||
private Integer pkDept;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 仓库管理员
|
||||
*/
|
||||
private Long pkWhsmanager;
|
||||
|
||||
/**
|
||||
* 管理员名称
|
||||
*/
|
||||
private String managerName;
|
||||
|
||||
/**
|
||||
* 供应商 取bd_cubasdoc 类型为1 2的
|
||||
*/
|
||||
private Integer pkCubasdoc;
|
||||
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
private String cubasdocName;
|
||||
|
||||
/**
|
||||
* 仓库
|
||||
*/
|
||||
private Integer pkStorehouse;
|
||||
|
||||
/**
|
||||
* 仓库名称
|
||||
*/
|
||||
private String storehouseName;
|
||||
|
||||
/**
|
||||
* 订单日期 2023-10
|
||||
*/
|
||||
private String orderDate;
|
||||
|
||||
/**
|
||||
* 订单状态 EPoOrderStatus 1=已保存 2=已提交 3=已审核 4=已收货 5=已关闭
|
||||
*/
|
||||
private Integer orderStatus;
|
||||
|
||||
/**
|
||||
* 退货状态 0=是 1=否
|
||||
*/
|
||||
private Integer returnStatus;
|
||||
|
||||
/**
|
||||
* 采购组织
|
||||
*/
|
||||
private Integer pkCorp;
|
||||
|
||||
/**
|
||||
* 采购组织名称
|
||||
*/
|
||||
private String corpName;
|
||||
|
||||
/**
|
||||
* 总数量
|
||||
*/
|
||||
private BigDecimal totalNum;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderCode;
|
||||
|
||||
/**
|
||||
* 退货理由
|
||||
*/
|
||||
private String returnReason;
|
||||
|
||||
private List<BillItemDTO> billDtoList;
|
||||
}
|
|
@ -1,158 +0,0 @@
|
|||
package com.hzs.scm.pub.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @description: 单据明细表
|
||||
* @author: sui q
|
||||
* @time: 2023/11/25 09:23
|
||||
* @classname: BillItemDTO
|
||||
* @package_name: com.hzs.scm.ic.dto
|
||||
* version 1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class BillItemDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long pkId;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private Integer pkUnit;
|
||||
|
||||
/**
|
||||
* 单位名称
|
||||
*/
|
||||
private String unitName;
|
||||
|
||||
/**
|
||||
* 采购订单主键
|
||||
*/
|
||||
private Long pkPoOrder;
|
||||
|
||||
/**
|
||||
* 采购订单明细主键
|
||||
*/
|
||||
private Long pkPoOrderItems;
|
||||
|
||||
/**
|
||||
* 主表主键
|
||||
*/
|
||||
private Long pkPurchase;
|
||||
|
||||
/**
|
||||
* 货位
|
||||
*/
|
||||
private Integer pkClocation;
|
||||
|
||||
/**
|
||||
* 货位名称
|
||||
*/
|
||||
private String clocationName;
|
||||
|
||||
/**
|
||||
* 产品基础信息主键
|
||||
*/
|
||||
private Integer pkProductBas;
|
||||
|
||||
/**
|
||||
* 产品信息主键
|
||||
*/
|
||||
private Integer pkProduct;
|
||||
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
private String productCode;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 规格名称
|
||||
*/
|
||||
private String specsName;
|
||||
|
||||
/**
|
||||
* 入库日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date bizDate;
|
||||
|
||||
/**
|
||||
* 出入口类型 1=入库 2=出库
|
||||
*/
|
||||
private Integer transType;
|
||||
|
||||
/**
|
||||
* 仓库
|
||||
*/
|
||||
private Integer pkStorehouse;
|
||||
|
||||
/**
|
||||
* 仓库名称
|
||||
*/
|
||||
private String storehouseName;
|
||||
|
||||
/**
|
||||
* 汇率
|
||||
*/
|
||||
private Integer pkRate;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private BigDecimal nnum;
|
||||
|
||||
/**
|
||||
* 无税单价
|
||||
*/
|
||||
private BigDecimal norigprice;
|
||||
|
||||
/**
|
||||
* 税率
|
||||
*/
|
||||
private BigDecimal ntaxrate;
|
||||
|
||||
/**
|
||||
* 含税单价 = 无税单价*(1+税率)
|
||||
*/
|
||||
private BigDecimal norigtaxprice;
|
||||
|
||||
/**
|
||||
* 无税金额 = 无税单价*数量
|
||||
*/
|
||||
private BigDecimal norigmny;
|
||||
|
||||
/**
|
||||
* 税额 =无税单价*数量
|
||||
*/
|
||||
private BigDecimal ntax;
|
||||
|
||||
/**
|
||||
* 价税合计 含税单价*数量
|
||||
*/
|
||||
private BigDecimal norigtaxmny;
|
||||
|
||||
/**
|
||||
* 批次主键
|
||||
*/
|
||||
private Long pkBatchCode;
|
||||
|
||||
private String batchCode;
|
||||
|
||||
/**
|
||||
* 是否赠品
|
||||
*/
|
||||
private Integer isGift;
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
package com.hzs.scm.pub.dto;
|
||||
|
||||
import com.hzs.system.sys.dto.LoginUser;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 发货推送MQ数据
|
||||
* @Author: jiang chao
|
||||
* @Time: 2023/12/19 14:16
|
||||
* @Classname: DeliverDTO
|
||||
* @PackageName: com.hzs.scm.pub.dto
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@Data
|
||||
public class DeliverDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* 发货单ID列表
|
||||
*/
|
||||
private List<Long> deliverIdList;
|
||||
|
||||
/**
|
||||
* 登录用户
|
||||
*/
|
||||
private LoginUser loginUser;
|
||||
|
||||
}
|
|
@ -6,11 +6,7 @@ import com.hzs.system.sys.dto.BusinessLogDTO;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 业务操作明细接口
|
||||
* @Author: jiang chao
|
||||
* @Time: 2023/8/3 18:14
|
||||
* @Classname: IBusinessLogApi
|
||||
* @PackageName: com.hzs.system.sys
|
||||
* 业务操作明细接口
|
||||
*/
|
||||
public interface IBusinessLogApi {
|
||||
|
||||
|
|
|
@ -3,17 +3,11 @@ package com.hzs.system.sys;
|
|||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.system.sys.dto.CubasdocDTO;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Author: yuhui
|
||||
* @Time: 2024/5/8 16:05
|
||||
* @Classname: ICubasdocApi
|
||||
* @PackageName: com.hzs.system.sys
|
||||
*/
|
||||
public interface ICubasdocApi {
|
||||
|
||||
/**
|
||||
* 根据id 查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
R<CubasdocDTO> getCubasdoc(Integer pkCubasdoc);
|
||||
|
|
|
@ -6,11 +6,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 菜单列服务
|
||||
* @Author: jiang chao
|
||||
* @Time: 2023/6/8 11:21
|
||||
* @Classname: IMenuColumnServiceApi
|
||||
* @PackageName: com.hzs.system.sys
|
||||
* 菜单列服务
|
||||
*/
|
||||
public interface IMenuColumnServiceApi {
|
||||
|
||||
|
|
|
@ -4,11 +4,7 @@ import com.hzs.common.core.domain.R;
|
|||
import com.hzs.common.domain.system.sys.SysOperationLog;
|
||||
|
||||
/**
|
||||
* Description: 后台操作日志服务接口
|
||||
* Author: jiang chao
|
||||
* Time: 2022/9/14 15:48
|
||||
* Classname: IOperationLogService
|
||||
* PackageName: com.hzs.system.sys
|
||||
* 后台操作日志服务接口
|
||||
*/
|
||||
public interface IOperationLogServiceApi {
|
||||
|
||||
|
|
|
@ -8,11 +8,7 @@ import lombok.NoArgsConstructor;
|
|||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 业务操作日志DTO
|
||||
* @Author: jiang chao
|
||||
* @Time: 2023/8/2 11:30
|
||||
* @Classname: BusinessLogDTO
|
||||
* @PackageName: com.hzs.system.sys.dto
|
||||
* 业务操作日志DTO
|
||||
*/
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
|
|
|
@ -1,13 +1,5 @@
|
|||
package com.hzs.system.sys.dto;/**
|
||||
* @Description:
|
||||
* @Author: yuhui
|
||||
* @Time: 2024/5/8 16:06
|
||||
* @Classname: CubasdocDTO
|
||||
* @PackageName: com.hzs.system.sys.dto
|
||||
*/
|
||||
package com.hzs.system.sys.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
@ -15,14 +7,6 @@ import lombok.NoArgsConstructor;
|
|||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*@BelongsProject: hzs_cloud
|
||||
*@BelongsPackage: com.hzs.system.sys.dto
|
||||
*@Author: yh
|
||||
*@CreateTime: 2024-05-08 16:06
|
||||
*@Description: TODO
|
||||
*@Version: 1.0
|
||||
*/
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
package com.hzs.system.sys.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @Description: 能量仓套餐DTO
|
||||
* @Author: jiang chao
|
||||
* @Time: 2023/8/10 17:53
|
||||
* @Classname: ThaliConfigDTO
|
||||
* @PackageName: com.hzs.system.sys.dto
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@Data
|
||||
public class ThaliConfigDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 3316294777261662729L;
|
||||
|
||||
/**
|
||||
* 套餐ID
|
||||
*/
|
||||
private Integer pkId;
|
||||
|
||||
/**
|
||||
* 三方套餐ID
|
||||
*/
|
||||
private Long packageId;
|
||||
|
||||
/**
|
||||
* 套餐时长
|
||||
*/
|
||||
private Integer time;
|
||||
|
||||
/**
|
||||
* 套餐价格
|
||||
*/
|
||||
private BigDecimal price;
|
||||
|
||||
}
|
|
@ -9,11 +9,7 @@ import java.io.Serializable;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 用户权限DTO
|
||||
* @Author: jiang chao
|
||||
* @Time: 2023/5/22 14:37
|
||||
* @Classname: UserAuthorityDTO
|
||||
* @PackageName: com.hzs.system.sys.dto
|
||||
* 用户权限DTO
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
package com.hzs.third.cabin;
|
||||
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.third.cabin.dto.CabinDeviceOpenDTO;
|
||||
import com.hzs.third.cabin.dto.CabinInfoDTO;
|
||||
import com.hzs.third.cabin.dto.CabinPackageDTO;
|
||||
|
||||
/**
|
||||
* @Description: 能量仓dubbo服务
|
||||
* @Author: jiang chao
|
||||
* @Time: 2023/8/10 18:19
|
||||
* @Classname: ICabinServiceApi
|
||||
* @PackageName: com.hzs.third.cabin
|
||||
*/
|
||||
public interface ICabinThirdServiceApi {
|
||||
|
||||
/**
|
||||
* 新增、编辑套餐
|
||||
*
|
||||
* @param dto 套餐数据
|
||||
* @return
|
||||
*/
|
||||
R<CabinPackageDTO> packageSave(CabinPackageDTO dto);
|
||||
|
||||
/**
|
||||
* 设备详情
|
||||
*
|
||||
* @param dto 查询设备DTO
|
||||
* @return
|
||||
*/
|
||||
R<CabinInfoDTO> deviceInfo(CabinInfoDTO dto);
|
||||
|
||||
/**
|
||||
* 设备开机
|
||||
*
|
||||
* @param dto 开机数据
|
||||
* @return
|
||||
*/
|
||||
R<CabinDeviceOpenDTO> deviceOpen(CabinDeviceOpenDTO dto);
|
||||
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
package com.hzs.third.cabin.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 能量仓开机
|
||||
* @Author: jiang chao
|
||||
* @Time: 2023/8/10 18:59
|
||||
* @Classname: CabinDeviceOpen
|
||||
* @PackageName: com.hzs.third.cabin.dto
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@Data
|
||||
public class CabinDeviceOpenDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -5408924484380798929L;
|
||||
|
||||
/**
|
||||
* 套餐ID(必传)
|
||||
*/
|
||||
private Long packageId;
|
||||
|
||||
/**
|
||||
* 设备code(必传)
|
||||
*/
|
||||
private String serialNumber;
|
||||
|
||||
}
|
|
@ -1,82 +0,0 @@
|
|||
package com.hzs.third.cabin.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 能量仓详情DTO
|
||||
* @Author: jiang chao
|
||||
* @Time: 2023/8/11 9:54
|
||||
* @Classname: CabinInfoDTO
|
||||
* @PackageName: com.hzs.third.cabin.dto
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@Data
|
||||
public class CabinInfoDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 3023891457338964400L;
|
||||
|
||||
/**
|
||||
* 店铺ID(必传)
|
||||
*/
|
||||
private Long storeId;
|
||||
/**
|
||||
* 设备编号(必传)
|
||||
*/
|
||||
private String serialNumber;
|
||||
|
||||
//////////////////// 返回参数 ////////////////////
|
||||
|
||||
/**
|
||||
* 设备ID
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 设备型号
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 设备地址
|
||||
*/
|
||||
private String address;
|
||||
/**
|
||||
* 运行状态(0=未使用,1=运行中,2=暂停(老设备使用))
|
||||
*/
|
||||
private Integer runState;
|
||||
/**
|
||||
* 最后开启时间(直接是年月日时分秒,2023-08-11 10:21:22)
|
||||
*/
|
||||
private Date lastOpenTime;
|
||||
/**
|
||||
* 最后的套餐时⻓
|
||||
*/
|
||||
private Integer lastOpenDuration;
|
||||
/**
|
||||
* 设备类型(1=4G,2=蓝⽛,3=4G&蓝⽛,4=mqtt)
|
||||
*/
|
||||
private Integer deviceType;
|
||||
/**
|
||||
* mqtt 通信是否在线(0=不是,1=是)
|
||||
*/
|
||||
private Integer mqttType;
|
||||
/**
|
||||
* mqtt 最后一次通信信息(100623010008,0,0,0,0,0,0,1,18,235,1691987769 -- 设备号,剩余工作时长,当前能量,当前能将,蜂鸣器,工作状态,错误码,网络状态,网络信号值,校验位要,秒级时间戳)
|
||||
*/
|
||||
private String mqttInfo;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String memo;
|
||||
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
package com.hzs.third.cabin.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @Description: 能量仓套餐DTO
|
||||
* @Author: jiang chao
|
||||
* @Time: 2023/8/10 18:20
|
||||
* @Classname: CabinPackageDTO
|
||||
* @PackageName: com.hzs.third.cabin.dto
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@Data
|
||||
public class CabinPackageDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 7406391624983226295L;
|
||||
|
||||
/**
|
||||
* 三方套餐ID(新增不传,修改传)
|
||||
*/
|
||||
private Long packageId;
|
||||
|
||||
/**
|
||||
* 套餐名称(必传)
|
||||
*/
|
||||
private String packageName;
|
||||
|
||||
/**
|
||||
* 套餐时长(必传)
|
||||
*/
|
||||
private Integer unitTime;
|
||||
|
||||
/**
|
||||
* 套餐金额(不需要传,默认按0元处理)
|
||||
*/
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
package com.hzs.third.pay;
|
||||
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.core.enums.EApprovalBusiness;
|
||||
import com.hzs.system.sys.dto.ApprovalBusinessResultDTO;
|
||||
|
||||
/**
|
||||
* @Description: 在线支付等dubbo服务api
|
||||
* @Author: jiang chao
|
||||
* @Time: 2023/4/7 18:08
|
||||
* @Classname: IOnlineAgentServiceApi
|
||||
* @PackageName: com.hzs.third.pay
|
||||
*/
|
||||
public interface IOnlineServiceApi {
|
||||
|
||||
/**
|
||||
* 三方服务信息处理回调
|
||||
*
|
||||
* @param approvalBusinessResultDTO
|
||||
* @return
|
||||
*/
|
||||
R<Boolean> approvalCallback(ApprovalBusinessResultDTO approvalBusinessResultDTO);
|
||||
|
||||
/**
|
||||
* 三方服务信息签呈查询
|
||||
*
|
||||
* @param eApprovalBusiness 业务类型
|
||||
* @param businessCode 业务单号
|
||||
* @return
|
||||
*/
|
||||
R queryApprovalData(EApprovalBusiness eApprovalBusiness, String businessCode);
|
||||
|
||||
}
|
|
@ -34,7 +34,6 @@
|
|||
<module>bd-api-sale</module>
|
||||
<module>bd-api-system</module>
|
||||
<module>bd-api-third</module>
|
||||
<module>bd-api-scm</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -3,11 +3,7 @@ package com.hzs.bonus.base.param;
|
|||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Description: 会员地址入参
|
||||
* @Author: jiang chao
|
||||
* @Time: 2023/1/18 10:19
|
||||
* @Classname: MemberAddressParam
|
||||
* @PackageName: com.hzs.member.base.param
|
||||
* 会员地址入参
|
||||
*/
|
||||
@Data
|
||||
public class MemberAddressParam {
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
package com.hzs.member.base.provider;
|
||||
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.domain.member.detail.CuMemberLevel;
|
||||
import com.hzs.member.base.IMemberLevelServiceApi;
|
||||
import com.hzs.member.detail.service.ICuMemberLevelService;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 会员等级相关dubbo服务
|
||||
* @Author: jiang chao
|
||||
* @Time: 2025/2/27 9:25
|
||||
* @Classname: MemberLevelServiceProvider
|
||||
* @PackageName: com.hzs.member.base.provider
|
||||
*/
|
||||
@DubboService
|
||||
public class MemberLevelServiceProvider implements IMemberLevelServiceApi {
|
||||
|
||||
@Autowired
|
||||
private ICuMemberLevelService iCuMemberLevelService;
|
||||
|
||||
@Override
|
||||
public R<List<CuMemberLevel>> listMemberLevel(Long pkMember, Long pkOrder) {
|
||||
return R.ok(iCuMemberLevelService.listMemberLevel(pkMember, pkOrder));
|
||||
}
|
||||
}
|
|
@ -54,15 +54,6 @@ public interface ICuMemberLevelService extends IService<CuMemberLevel> {
|
|||
*/
|
||||
int insertGradeBatch(List<CuMemberGrade> memberGradeList);
|
||||
|
||||
/**
|
||||
* 获取会员升级记录
|
||||
*
|
||||
* @param pkMember 会员ID
|
||||
* @param pkOrder 订单ID -- 可为空
|
||||
* @return
|
||||
*/
|
||||
List<CuMemberLevel> listMemberLevel(Long pkMember, Long pkOrder);
|
||||
|
||||
/**
|
||||
* 查询会员升级记录
|
||||
*
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.hzs.member.detail.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.core.enums.EYesNo;
|
||||
import com.hzs.common.domain.member.detail.CuMemberGrade;
|
||||
|
@ -49,15 +48,6 @@ public class CuMemberLevelServiceImpl extends ServiceImpl<CuMemberLevelMapper, C
|
|||
return baseMapper.insertGradeBatch(memberGradeList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CuMemberLevel> listMemberLevel(Long pkMember, Long pkOrder) {
|
||||
return this.list(Wrappers.<CuMemberLevel>lambdaQuery()
|
||||
.eq(CuMemberLevel::getPkMember, pkMember)
|
||||
.eq(null != pkOrder, CuMemberLevel::getPkOrder, pkOrder)
|
||||
.orderByAsc(CuMemberLevel::getUpgradeTime)
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CuMemberLevel getLevelByGradeValue(Long pkMember, Integer gradeValue, Date queryTime, Integer pkCountry) {
|
||||
return baseMapper.getLevelByGradeValue(pkMember, gradeValue, queryTime, pkCountry);
|
||||
|
|
|
@ -11,11 +11,7 @@ import java.math.BigDecimal;
|
|||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 会员补配置查询返回VO
|
||||
* @Author: jiang chao
|
||||
* @Time: 2024/5/6 13:57
|
||||
* @Classname: MemberPerkQueryVO
|
||||
* @PackageName: com.hzs.report.member.vo
|
||||
* 会员补配置查询返回VO
|
||||
*/
|
||||
@Data
|
||||
public class MemberPerkQueryVO {
|
||||
|
@ -87,17 +83,6 @@ public class MemberPerkQueryVO {
|
|||
@Excel(name = "考核类型")
|
||||
private String checkTypeVal;
|
||||
|
||||
/**
|
||||
* 是否含舱(0=是,1=否)
|
||||
*/
|
||||
@Transaction(transactionKey = EnumsPrefixConstants.YES_NO)
|
||||
private Integer containCabin;
|
||||
/**
|
||||
* 是否含舱显示
|
||||
*/
|
||||
@Excel(name = "是否含舱")
|
||||
private String containCabinVal;
|
||||
|
||||
/**
|
||||
* 是否扣除政策币(0=是,1=否)
|
||||
*/
|
||||
|
|
|
@ -46,11 +46,6 @@
|
|||
<groupId>com.bd</groupId>
|
||||
<artifactId>bd-api-bonus</artifactId>
|
||||
</dependency>
|
||||
<!-- scm 服务 -->
|
||||
<dependency>
|
||||
<groupId>com.bd</groupId>
|
||||
<artifactId>bd-api-scm</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -776,7 +776,7 @@ public class ActivityServiceImpl implements IActivityService {
|
|||
@Override
|
||||
public List<BdWaresDetailExt> generateActivityGiftWaresAchieve(Integer specialArea, Integer pkCountry, List<BdWaresDetailExt> bdWaresDetailExtList,
|
||||
String parentCode, CuMember cuMember) {
|
||||
// 兼容进销存处理,没有数据
|
||||
// 兼容没有数据
|
||||
bdWaresDetailExtList = bdWaresDetailExtList.stream().filter(bdWaresDetailExt -> null != bdWaresDetailExt.getPkWares()).collect(Collectors.toList());
|
||||
|
||||
// 商品赠送
|
||||
|
|
|
@ -4,7 +4,6 @@ import cn.hutool.core.bean.BeanUtil;
|
|||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.hzs.common.core.constant.RabbitMqConstants;
|
||||
import com.hzs.common.core.constant.msg.CommonMsgConstants;
|
||||
import com.hzs.common.core.constant.msg.DocumentMsgConstants;
|
||||
import com.hzs.common.core.domain.R;
|
||||
|
@ -29,7 +28,6 @@ import com.hzs.sale.deliver.service.ISaDeliverItemsService;
|
|||
import com.hzs.sale.deliver.service.ISaDeliverService;
|
||||
import com.hzs.sale.order.param.SelfPickUpParam;
|
||||
import com.hzs.sale.order.service.*;
|
||||
import com.hzs.scm.pub.dto.DeliverDTO;
|
||||
import com.hzs.system.base.IBarCodeServiceApi;
|
||||
import com.hzs.system.sys.IApprovalServiceApi;
|
||||
import com.hzs.system.sys.dto.ApprovalBusinessResultDTO;
|
||||
|
@ -37,7 +35,6 @@ import com.hzs.system.sys.dto.ApprovalSubmitDTO;
|
|||
import com.hzs.system.sys.dto.LoginUser;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
@ -69,8 +66,6 @@ public class SaDeliverBusinessServiceImpl implements ISaDeliverBusinessService {
|
|||
private ISaDeliverBarCodeService iSaDeliverBarCodeService;
|
||||
@Autowired
|
||||
private ISaOrderSelfLogService saOrderSelfLogService;
|
||||
@Autowired
|
||||
private RabbitTemplate rabbitTemplate;
|
||||
|
||||
@DubboReference
|
||||
IApprovalServiceApi iApprovalServiceApi;
|
||||
|
@ -333,22 +328,6 @@ public class SaDeliverBusinessServiceImpl implements ISaDeliverBusinessService {
|
|||
throw new ServiceException(TransactionUtils.getContent(CommonMsgConstants.APPROVAL_ERROR) + ":" + resultR.getMsg());
|
||||
}
|
||||
}
|
||||
if (saDeliver.getPkId() != null && deliverItemsList.size() > 0) {
|
||||
List<Long> deliverIdList = new ArrayList<>();
|
||||
deliverIdList.add(saDeliver.getPkId());
|
||||
// 推送进销存处理数据
|
||||
rabbitTemplate.convertAndSend(RabbitMqConstants.SCM_DELIVER_EXCHANGE, RabbitMqConstants.SCM_DELIVER_KEY, DeliverDTO.builder()
|
||||
.deliverIdList(deliverIdList)
|
||||
.loginUser(approvalBusinessResultDTO.getLoginUser())
|
||||
.build());
|
||||
// 如果订单仓库跟提货仓库不一致,回退可用量,然后在扣减可用量
|
||||
if (saOrder.getPkStorehouse() != null && !saOrder.getPkStorehouse().equals(pkStorehouse)) {
|
||||
rabbitTemplate.convertAndSend(RabbitMqConstants.AVAILABLE_NMU_BACK_EXCHANGE, RabbitMqConstants.AVAILABLE_NMU_BACK_KEY, saOrder);
|
||||
saOrder.setPkStorehouse(pkStorehouse);
|
||||
saOrder.setDeductFlag(Boolean.TRUE);
|
||||
rabbitTemplate.convertAndSend(RabbitMqConstants.AVAILABLE_NMU_BACK_EXCHANGE, RabbitMqConstants.AVAILABLE_NMU_BACK_KEY, saOrder);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
log.error("订单自提同意处理失败: 更新数据失败");
|
||||
|
|
|
@ -49,10 +49,6 @@ public class ApiOthSaOrderController extends ParentOrderController {
|
|||
return AjaxResult.error(TransactionUtils.getContent(MemberMsgConstants.REQUIRED_NOT_EMPTY));
|
||||
}
|
||||
|
||||
if (!orderService.checkPreSalesQuantity(orderParam)) {
|
||||
// 商品预售数量不足
|
||||
return AjaxResult.error(TransactionUtils.getContent(SaOrderMsgConstants.WARES_PRE_SALE_QUANTITY_LACK));
|
||||
}
|
||||
if (orderParam.getSpecialArea() != EOrderType.REGISTER_ORDER.getValue()) {
|
||||
convertShoppingCarToSku(orderParam);
|
||||
if (EOrderType.UPGRADE_ORDER.getValue() == orderParam.getSpecialArea()
|
||||
|
@ -153,7 +149,6 @@ public class ApiOthSaOrderController extends ParentOrderController {
|
|||
// 升级订单
|
||||
if (EOrderType.UPGRADE_ORDER.getValue() == orderParam.getSpecialArea()) {
|
||||
if (getOrderService().payUpgradeSaOrder(saOrderExt, cuMemberAccountExt)) {
|
||||
getOrderService().convertAvailableNumMsg(oldOrderParam.getAvailableNumList());
|
||||
return AjaxResult.success(saOrderExt);
|
||||
} else {
|
||||
return AjaxResult.error(TransactionUtils.getContent(MemberMsgConstants.LEVEL_NOT_ENOUGH));
|
||||
|
@ -161,7 +156,6 @@ public class ApiOthSaOrderController extends ParentOrderController {
|
|||
} else {
|
||||
// 复购订单
|
||||
if (getOrderService().payRepurchaseSaOrder(saOrderExt, cuMemberAccountExt)) {
|
||||
getOrderService().convertAvailableNumMsg(oldOrderParam.getAvailableNumList());
|
||||
return AjaxResult.success(saOrderExt);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,11 +68,6 @@ public class ApiRegSaOrderController extends ParentOrderController {
|
|||
}
|
||||
orderParam.setSource(source);
|
||||
|
||||
if (!iSaOrderService.checkPreSalesQuantity(orderParam)) {
|
||||
// 商品预售数量不足
|
||||
return AjaxResult.error(TransactionUtils.getContent(SaOrderMsgConstants.WARES_PRE_SALE_QUANTITY_LACK));
|
||||
}
|
||||
|
||||
AjaxResult result = validateSaveMember(orderParam);
|
||||
if ((Integer) result.get(AjaxResult.CODE_TAG) == HttpStatus.ERROR) {
|
||||
return result;
|
||||
|
@ -165,7 +160,6 @@ public class ApiRegSaOrderController extends ParentOrderController {
|
|||
if (cuMemberAccountExt.getIsPayment()) {
|
||||
// 开始支付 扣款
|
||||
getOrderService().payRegSaOrder(saOrderExt, newCuMember, cuMemberAccountExt, isHaiFun);
|
||||
getOrderService().convertAvailableNumMsg(oldOrderParam.getAvailableNumList());
|
||||
} else {
|
||||
if (StringUtils.isEmpty(cuMemberAccountExt.getErrorMsg())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(MemberMsgConstants.MEMBER_BALANCE_NOT_PAY));
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
package com.hzs.sale.order.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hzs.common.domain.sale.order.SaOrderRelationItems;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-03-17
|
||||
*/
|
||||
public interface SaOrderRelationItemsMapper extends BaseMapper<SaOrderRelationItems> {
|
||||
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
package com.hzs.sale.order.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hzs.common.domain.sale.order.SaOrderRelation;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 订单与虚拟订单关联表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-03-17
|
||||
*/
|
||||
public interface SaOrderRelationMapper extends BaseMapper<SaOrderRelation> {
|
||||
|
||||
/**
|
||||
* 根据订单编号查询订单关系,用于复购订单、福利订单支付页面,在线支付
|
||||
* @param orderCode 订单编号
|
||||
* @return: SaOrderRelation
|
||||
* @Author: sui q
|
||||
* @Date: 2023/3/17 17:49
|
||||
*/
|
||||
SaOrderRelation querySaOrderRelationBySaOrder(String orderCode);
|
||||
}
|
|
@ -2,7 +2,6 @@ package com.hzs.sale.order.param;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.hzs.common.core.constant.msg.MemberMsgConstants;
|
||||
import com.hzs.common.domain.scm.ic.ext.IcAvailableNumExt;
|
||||
import com.hzs.sale.shopping.vo.ShoppingCartRedis;
|
||||
import com.hzs.sale.ticket.param.BuyTicketParam;
|
||||
import jdk.nashorn.internal.ir.annotations.Ignore;
|
||||
|
@ -295,11 +294,6 @@ public class OrderParam implements Serializable {
|
|||
*/
|
||||
private List<OrderItemsParam> orderItemsParams;
|
||||
|
||||
/**
|
||||
* 用于下单时更新可用量
|
||||
*/
|
||||
private List<IcAvailableNumExt> availableNumList;
|
||||
|
||||
/**
|
||||
* 是否首单
|
||||
*/
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
package com.hzs.sale.order.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.domain.sale.order.SaOrderRelationItems;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-03-17
|
||||
*/
|
||||
public interface ISaOrderRelationItemsService extends IService<SaOrderRelationItems> {
|
||||
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
package com.hzs.sale.order.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.domain.sale.order.SaOrderRelation;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 订单与虚拟订单关联表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-03-17
|
||||
*/
|
||||
public interface ISaOrderRelationService extends IService<SaOrderRelation> {
|
||||
|
||||
/**
|
||||
* 根据订单编号查询订单关系,用于复购订单、福利订单支付页面,在线支付
|
||||
* @param orderCode 订单编号
|
||||
* @return: SaOrderRelation
|
||||
* @Author: sui q
|
||||
* @Date: 2023/3/17 17:49
|
||||
*/
|
||||
SaOrderRelation querySaOrderRelationBySaOrder(String orderCode);
|
||||
}
|
|
@ -8,7 +8,6 @@ import com.hzs.common.domain.member.ext.CuMemberExt;
|
|||
import com.hzs.common.domain.sale.ext.*;
|
||||
import com.hzs.common.domain.sale.order.SaOrder;
|
||||
import com.hzs.common.domain.sale.order.SaOrderItems;
|
||||
import com.hzs.common.domain.scm.ic.ext.IcAvailableNumExt;
|
||||
import com.hzs.common.domain.system.config.BdGrade;
|
||||
import com.hzs.sale.index.vo.CuMemberMyMarketVO;
|
||||
import com.hzs.sale.order.param.*;
|
||||
|
@ -188,11 +187,6 @@ public interface ISaOrderService extends IService<SaOrder> {
|
|||
Boolean payRegSaOrder(SaOrderExt saOrderExt, CuMember newCuMember,
|
||||
CuMemberAccountExt cuMemberAccountExt, Boolean isHaiFun);
|
||||
|
||||
/*
|
||||
* 发送更新可用量的消息
|
||||
**/
|
||||
void convertAvailableNumMsg(List<IcAvailableNumExt> availableNumList);
|
||||
|
||||
/**
|
||||
* 支付升级订单
|
||||
*
|
||||
|
@ -573,23 +567,6 @@ public interface ISaOrderService extends IService<SaOrder> {
|
|||
*/
|
||||
void saveSaOrderByOrderExt(SaOrderExt saOrderExt);
|
||||
|
||||
/**
|
||||
* 校验预售库存数量是否充足
|
||||
*
|
||||
* @param orderParam
|
||||
* @return
|
||||
*/
|
||||
Boolean checkPreSalesQuantity(OrderParam orderParam);
|
||||
|
||||
/**
|
||||
* 扣减预售状态下预售库存使用量
|
||||
*
|
||||
* @param orderCode
|
||||
* @param specialArea
|
||||
* @return
|
||||
*/
|
||||
Boolean reducePreSalesQuantity(String orderCode, Integer specialArea);
|
||||
|
||||
/**
|
||||
* 根据编号查询会员首单
|
||||
*
|
||||
|
|
|
@ -2646,15 +2646,6 @@ public class OrderBusinessServiceImpl implements IOrderBusinessService {
|
|||
// 新旧订单的订单明细全部插入新订单中,并且变更为未删除
|
||||
iSaOrderItemsService.copyDeductionItems(deductionDTO.getPkOrderOld(), deductionDTO.getPkOrderNew(), userId, nowDate);
|
||||
|
||||
// 推送MQ处理库存(新订单明细回退)
|
||||
newOrder.setPkModified(userId);
|
||||
rabbitTemplate.convertAndSend(RabbitMqConstants.AVAILABLE_NMU_BACK_EXCHANGE, RabbitMqConstants.AVAILABLE_NMU_BACK_KEY, newOrder);
|
||||
|
||||
// 推送MQ处理库存(老订单明细扣减)
|
||||
oldOrder.setDeductFlag(true);
|
||||
oldOrder.setPkModified(userId);
|
||||
rabbitTemplate.convertAndSend(RabbitMqConstants.AVAILABLE_NMU_BACK_EXCHANGE, RabbitMqConstants.AVAILABLE_NMU_BACK_KEY, oldOrder);
|
||||
|
||||
return null;
|
||||
}
|
||||
return "订单金额、业绩、BV存在不相同,不能进行抵扣";
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
package com.hzs.sale.order.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.domain.sale.order.SaOrderRelationItems;
|
||||
import com.hzs.sale.order.mapper.SaOrderRelationItemsMapper;
|
||||
import com.hzs.sale.order.service.ISaOrderRelationItemsService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-03-17
|
||||
*/
|
||||
@Service
|
||||
public class SaOrderRelationItemsServiceImpl extends ServiceImpl<SaOrderRelationItemsMapper, SaOrderRelationItems> implements ISaOrderRelationItemsService {
|
||||
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
package com.hzs.sale.order.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.domain.sale.order.SaOrderRelation;
|
||||
import com.hzs.sale.order.mapper.SaOrderRelationMapper;
|
||||
import com.hzs.sale.order.service.ISaOrderRelationService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 订单与虚拟订单关联表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-03-17
|
||||
*/
|
||||
@Service
|
||||
public class SaOrderRelationServiceImpl extends ServiceImpl<SaOrderRelationMapper, SaOrderRelation> implements ISaOrderRelationService {
|
||||
|
||||
@Override
|
||||
public SaOrderRelation querySaOrderRelationBySaOrder(String orderCode) {
|
||||
return baseMapper.querySaOrderRelationBySaOrder(orderCode);
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -33,8 +33,6 @@ import com.hzs.sale.product.vo.ProductSpecsVo;
|
|||
import com.hzs.sale.product.vo.ProductVo;
|
||||
import com.hzs.sale.product.vo.SupplierProductCensusVo;
|
||||
import com.hzs.sale.wares.service.IBdWaresDetailService;
|
||||
import com.hzs.scm.product.IProductBasServiceApi;
|
||||
import com.hzs.scm.product.dto.ProductBasDTO;
|
||||
import com.hzs.system.base.ISystemConfigServiceApi;
|
||||
import com.hzs.system.base.dto.BdCubasdocDTO;
|
||||
import com.hzs.system.sys.dto.LoginUser;
|
||||
|
@ -73,8 +71,6 @@ public class BdProductController extends BaseController {
|
|||
|
||||
@DubboReference
|
||||
ISystemConfigServiceApi systemConfigServiceApi;
|
||||
@DubboReference
|
||||
IProductBasServiceApi productBasServiceApi;
|
||||
|
||||
/**
|
||||
* 查询产品列表
|
||||
|
@ -526,43 +522,6 @@ public class BdProductController extends BaseController {
|
|||
return AjaxResult.success(productParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询产品详情 根据产品基本信息主键
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/product-bas-detail")
|
||||
public AjaxResult productBasDetail(Integer pkProductBas) {
|
||||
R<ProductBasDTO> productBas = productBasServiceApi.getProductBasById(pkProductBas);
|
||||
BdProduct product = productService.getOne(new LambdaQueryWrapper<BdProduct>().eq(BdProduct::getPkProductBas, pkProductBas).eq(BdProduct::getPkCountry, SecurityUtils.getPkCountry()));
|
||||
|
||||
if (productBas.getData() == null) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ProductMsgConstants.PRODUCT_NOT_REQUIRED));
|
||||
}
|
||||
ProductParams productParams = BeanUtil.copyProperties(productBas.getData(), ProductParams.class);
|
||||
BdProductExtend productExtend = productExtendService.getProductExtend(product.getPkId());
|
||||
productParams.setIsPickUp(productExtend.getIsPickUp());
|
||||
productParams.setIsPrize(productExtend.getIsPrize());
|
||||
productParams.setIsBarCode(productExtend.getIsBarCode());
|
||||
productParams.setRepurchaseType(productExtend.getRepurchaseType());
|
||||
productParams.setIsMerge(productExtend.getIsMerge());
|
||||
productParams.setIsGift(productExtend.getIsGift());
|
||||
productParams.setIsLandTrans(productExtend.getIsLandTrans());
|
||||
productParams.setIsAirTrans(productExtend.getIsAirTrans());
|
||||
productParams.setIsOceanTrans(productExtend.getIsOceanTrans());
|
||||
productParams.setSort(productExtend.getSort());
|
||||
LambdaQueryWrapper<BdProductSpecs> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(BdProductSpecs::getPkProduct, product.getPkId());
|
||||
List<Integer> pkSpecsType = new ArrayList<>();
|
||||
List<BdProductSpecs> productSpecList = productSpecsService.list(queryWrapper);
|
||||
for (BdProductSpecs bdProductSpecs : productSpecList) {
|
||||
pkSpecsType.add(bdProductSpecs.getPkSpecsType());
|
||||
}
|
||||
productParams.setPkSpecsType(pkSpecsType);
|
||||
productParams.setPkProductBas(productBas.getData().getPkId());
|
||||
return AjaxResult.success(productParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
|
|
|
@ -11,17 +11,13 @@ import org.springframework.stereotype.Service;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 规格明细表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2022-09-13
|
||||
*/
|
||||
@Service
|
||||
public class BdProductSpecsServiceImpl extends ServiceImpl<BdProductSpecsMapper, BdProductSpecs> implements IBdProductSpecsService {
|
||||
/**
|
||||
* 产品规格
|
||||
*
|
||||
* @param pkProduct
|
||||
* @return
|
||||
*/
|
||||
|
|
|
@ -70,7 +70,7 @@ dubbo:
|
|||
payload: 10485760
|
||||
cloud:
|
||||
# 订阅服务
|
||||
subscribed-services: bd-system, bd-member, bd-third, bd-bonus, bd-scm
|
||||
subscribed-services: bd-system, bd-member, bd-third, bd-bonus
|
||||
scan:
|
||||
# dubbo 服务扫描包(开启之后才会对外提供服务)
|
||||
base-packages: com.hzs
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzs.sale.order.mapper.SaOrderRelationItemsMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.hzs.common.domain.sale.order.SaOrderRelationItems">
|
||||
<id column="PK_ID" property="pkId" />
|
||||
<result column="DEL_FLAG" property="delFlag" />
|
||||
<result column="CREATION_TIME" property="creationTime" />
|
||||
<result column="MODIFIED_TIME" property="modifiedTime" />
|
||||
<result column="PK_COUNTRY" property="pkCountry" />
|
||||
<result column="PK_CREATOR" property="pkCreator" />
|
||||
<result column="PK_MODIFIED" property="pkModified" />
|
||||
<result column="PK_ORDER" property="pkOrder" />
|
||||
<result column="PK_ORDER_RELATION" property="pkOrderRelation" />
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
|
@ -1,24 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzs.sale.order.mapper.SaOrderRelationMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.hzs.common.domain.sale.order.SaOrderRelation">
|
||||
<id column="PK_ID" property="pkId" />
|
||||
<result column="DEL_FLAG" property="delFlag" />
|
||||
<result column="CREATION_TIME" property="creationTime" />
|
||||
<result column="MODIFIED_TIME" property="modifiedTime" />
|
||||
<result column="PK_COUNTRY" property="pkCountry" />
|
||||
<result column="PK_CREATOR" property="pkCreator" />
|
||||
<result column="PK_MODIFIED" property="pkModified" />
|
||||
<result column="ORDER_CODE" property="orderCode" />
|
||||
<result column="ORDER_TYPE" property="orderType" />
|
||||
<result column="PK_RATE" property="pkRate" />
|
||||
<result column="ORDER_AMOUNT" property="orderAmount" />
|
||||
<result column="POSTAGE" property="postage" />
|
||||
</resultMap>
|
||||
<select id="querySaOrderRelationBySaOrder" resultType="com.hzs.common.domain.sale.order.SaOrderRelation">
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -1,71 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>com.bd</groupId>
|
||||
<artifactId>bd-business</artifactId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>bd-business-scm</artifactId>
|
||||
|
||||
<description>
|
||||
bd-business-scm进销存服务
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.bd</groupId>
|
||||
<artifactId>bd-business-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 订单服务接口 -->
|
||||
<dependency>
|
||||
<groupId>com.bd</groupId>
|
||||
<artifactId>bd-api-sale</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 进销存服务接口 -->
|
||||
<dependency>
|
||||
<groupId>com.bd</groupId>
|
||||
<artifactId>bd-api-scm</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.bd</groupId>
|
||||
<artifactId>bd-common-aop</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.bd</groupId>
|
||||
<artifactId>bd-common-domain</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.amqp</groupId>
|
||||
<artifactId>spring-rabbit</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>2.3.12.RELEASE</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -1,25 +0,0 @@
|
|||
package com.hzs;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import com.hzs.common.security.annotation.EnableCustomConfig;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
/**
|
||||
* 进销存服务
|
||||
*
|
||||
* @author hzs
|
||||
*/
|
||||
@EnableDiscoveryClient
|
||||
@EnableCustomConfig
|
||||
@SpringBootApplication
|
||||
@EnableScheduling
|
||||
public class ScmApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(ScmApplication.class, args);
|
||||
System.out.println("ScmApplication 进销存服务启动成功");
|
||||
}
|
||||
|
||||
}
|
|
@ -1,117 +0,0 @@
|
|||
package com.hzs.ground.margin.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.hzs.common.core.annotation.Log;
|
||||
import com.hzs.common.core.constant.msg.ScmMsgConstants;
|
||||
import com.hzs.common.core.enums.*;
|
||||
import com.hzs.common.core.utils.StringUtils;
|
||||
import com.hzs.common.core.web.controller.BaseController;
|
||||
import com.hzs.common.core.web.domain.AjaxResult;
|
||||
import com.hzs.common.core.web.page.TableDataInfo;
|
||||
import com.hzs.common.domain.ground.margin.ThMargin;
|
||||
import com.hzs.common.security.utils.SecurityUtils;
|
||||
import com.hzs.common.util.TransactionUtils;
|
||||
import com.hzs.ground.margin.service.IThMarginService;
|
||||
import com.hzs.ground.margin.vo.ThMarginVO;
|
||||
import com.hzs.ground.supplier.service.IThSupplierApplyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 保证金缴纳 前端控制器
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/manage/th-margin")
|
||||
public class ThMarginController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IThMarginService iThMarginService;
|
||||
@Autowired
|
||||
private IThSupplierApplyService iThSupplierApplyService;
|
||||
|
||||
/**
|
||||
* 保证金缴纳列表
|
||||
**/
|
||||
@GetMapping("/list")
|
||||
@Log(module = EOperationModule.TH_SUPPLIER_APPLY, business = EOperationBusiness.TH_SUPPLIER_APPLY, method = EOperationMethod.SELECT)
|
||||
public TableDataInfo listGeneralIn(ThMarginVO thMarginVO) {
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
thMarginVO.setPkCountry(SecurityUtils.getPkCountry());
|
||||
Integer checkUser = iThSupplierApplyService.queryThSupplierApplyUserList(userId);
|
||||
if (checkUser > 0) {
|
||||
thMarginVO.setPkCreator(userId);
|
||||
}
|
||||
startPage();
|
||||
List<ThMarginVO> thSupplierApplyList = iThMarginService.queryThMarginList(thMarginVO);
|
||||
return getDataTable(thSupplierApplyList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加保证金缴纳
|
||||
**/
|
||||
@PostMapping("/save")
|
||||
public AjaxResult save(@RequestBody ThMarginVO thMarginVO) {
|
||||
int pkCountry = SecurityUtils.getPkCountry();
|
||||
// 验证必填信息
|
||||
if (StringUtils.isNull(thMarginVO.getMargin())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ScmMsgConstants.TH_MARGIN_MARGIN));
|
||||
}
|
||||
thMarginVO.setPkCountry(pkCountry);
|
||||
thMarginVO.setPkCreator(SecurityUtils.getUserId());
|
||||
thMarginVO.setCreationTime(new Date());
|
||||
QueryWrapper<ThMargin> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("PK_SUPPLIER", thMarginVO.getPkSupplier());
|
||||
List thList = iThMarginService.list(queryWrapper);
|
||||
if (CollectionUtil.isNotEmpty(thList)) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ScmMsgConstants.TH_MARGIN_REPEAT));
|
||||
}
|
||||
iThMarginService.saveThMargin(thMarginVO);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保证金缴纳
|
||||
**/
|
||||
@PostMapping("/update")
|
||||
public AjaxResult update(@RequestBody ThMarginVO thMarginVO) {
|
||||
int pkCountry = SecurityUtils.getPkCountry();
|
||||
// 验证必填信息
|
||||
if (StringUtils.isNull(thMarginVO.getMargin())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ScmMsgConstants.TH_MARGIN_MARGIN));
|
||||
}
|
||||
QueryWrapper<ThMargin> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("PK_SUPPLIER", thMarginVO.getPkSupplier());
|
||||
queryWrapper.ne("PK_ID", thMarginVO.getPkId());
|
||||
List thList = iThMarginService.list(queryWrapper);
|
||||
if (CollectionUtil.isNotEmpty(thList)) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ScmMsgConstants.TH_MARGIN_REPEAT));
|
||||
}
|
||||
thMarginVO.setPkCountry(pkCountry);
|
||||
thMarginVO.setPkCreator(SecurityUtils.getUserId());
|
||||
thMarginVO.setCreationTime(new Date());
|
||||
iThMarginService.updateThMargin(thMarginVO);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询保证金缴纳
|
||||
**/
|
||||
@GetMapping("/getOne/{pkId}")
|
||||
public AjaxResult getOne(@PathVariable Long pkId) {
|
||||
ThMargin tsa = iThMarginService.getById(pkId);
|
||||
return AjaxResult.success(tsa);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除保证金缴纳
|
||||
**/
|
||||
@DeleteMapping("/{pkId}")
|
||||
public AjaxResult delete(@PathVariable Long pkId) {
|
||||
return AjaxResult.success(iThMarginService.delThMargin(pkId));
|
||||
}
|
||||
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
package com.hzs.ground.margin.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hzs.common.domain.ground.margin.ThMargin;
|
||||
import com.hzs.ground.margin.vo.ThMarginVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 保证金缴纳 Mapper 接口
|
||||
*/
|
||||
public interface ThMarginMapper extends BaseMapper<ThMargin> {
|
||||
|
||||
/**
|
||||
* 保证金缴纳列表
|
||||
**/
|
||||
List<ThMarginVO> queryThMarginList(ThMarginVO thMarginVO);
|
||||
|
||||
/**
|
||||
* 保证金缴纳审批查看
|
||||
**/
|
||||
List<ThMarginVO> queryThMarginByCode(@Param("businessCode") String businessCode,
|
||||
@Param("pkCountry") Integer pkCountry);
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
package com.hzs.ground.margin.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.domain.ground.margin.ThMargin;
|
||||
import com.hzs.ground.margin.vo.ThMarginVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 保证金缴纳 服务类
|
||||
*/
|
||||
public interface IThMarginService extends IService<ThMargin> {
|
||||
|
||||
/**
|
||||
* 保证金缴纳列表
|
||||
**/
|
||||
List<ThMarginVO> queryThMarginList(ThMarginVO thMarginVO);
|
||||
|
||||
/**
|
||||
* 添加保证金缴纳
|
||||
**/
|
||||
boolean saveThMargin(ThMarginVO thMarginVO);
|
||||
|
||||
/**
|
||||
* 修改保证金缴纳
|
||||
**/
|
||||
boolean updateThMargin(ThMarginVO thMarginVO);
|
||||
|
||||
/**
|
||||
* 删除保证金缴纳
|
||||
**/
|
||||
boolean delThMargin(Long pkId);
|
||||
|
||||
}
|
|
@ -1,57 +0,0 @@
|
|||
package com.hzs.ground.margin.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.core.enums.*;
|
||||
import com.hzs.common.domain.ground.margin.ThMargin;
|
||||
import com.hzs.common.security.utils.SecurityUtils;
|
||||
import com.hzs.ground.margin.mapper.ThMarginMapper;
|
||||
import com.hzs.ground.margin.service.IThMarginService;
|
||||
import com.hzs.ground.margin.vo.ThMarginVO;
|
||||
import com.hzs.ground.product.service.IThApprovalLogService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 保证金缴纳 服务实现类
|
||||
*/
|
||||
@Service
|
||||
public class ThMarginServiceImpl extends ServiceImpl<ThMarginMapper, ThMargin> implements IThMarginService {
|
||||
|
||||
@Autowired
|
||||
IThApprovalLogService iThApprovalLogService;
|
||||
|
||||
@Override
|
||||
public List<ThMarginVO> queryThMarginList(ThMarginVO thMarginVO) {
|
||||
return baseMapper.queryThMarginList(thMarginVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveThMargin(ThMarginVO thMarginVO) {
|
||||
ThMargin tm = BeanUtil.copyProperties(thMarginVO, ThMargin.class);
|
||||
baseMapper.insert(tm);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateThMargin(ThMarginVO thMarginVO) {
|
||||
ThMargin tm = BeanUtil.copyProperties(thMarginVO, ThMargin.class);
|
||||
baseMapper.updateById(tm);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean delThMargin(Long pkId) {
|
||||
UpdateWrapper<ThMargin> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.eq("PK_ID", pkId);
|
||||
updateWrapper.set("PK_MODIFIED", SecurityUtils.getUserId());
|
||||
updateWrapper.set("MODIFIED_TIME", new Date());
|
||||
updateWrapper.set("DEL_FLAG", EDelFlag.DELETE.getValue());
|
||||
baseMapper.update(null, updateWrapper);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,205 +0,0 @@
|
|||
package com.hzs.ground.margin.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.hzs.common.core.annotation.Excel;
|
||||
import com.hzs.common.core.annotation.Transaction;
|
||||
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||
import com.hzs.common.core.web.domain.BaseApprovalEntity;
|
||||
import com.hzs.system.sys.dto.LoginUser;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 保证金缴纳VO
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2024-03-21
|
||||
*/
|
||||
@Data
|
||||
public class ThMarginVO extends BaseApprovalEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Integer pkId;
|
||||
private String pkIdListStr;
|
||||
private List<Integer> pkIdList;
|
||||
/**
|
||||
* 会员编号
|
||||
*/
|
||||
private String memberCode;
|
||||
/**
|
||||
* 会员名称
|
||||
*/
|
||||
private String memberName;
|
||||
/**
|
||||
* 客商编号
|
||||
*/
|
||||
private String custCode;
|
||||
/**
|
||||
* 客商名称
|
||||
*/
|
||||
private String custName;
|
||||
/**
|
||||
* 供应商类型
|
||||
*/
|
||||
private Integer custType;
|
||||
|
||||
/**
|
||||
* 供应商简称
|
||||
*/
|
||||
private String shortName;
|
||||
|
||||
/**
|
||||
* 法人
|
||||
*/
|
||||
private String legalBody;
|
||||
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
private String linkMan;
|
||||
|
||||
/**
|
||||
* 纳税人登记号
|
||||
*/
|
||||
private String taxpayerid;
|
||||
|
||||
/**
|
||||
* 省
|
||||
*/
|
||||
private Integer province;
|
||||
/**
|
||||
* 省
|
||||
*/
|
||||
private String provinceName;
|
||||
|
||||
/**
|
||||
* 市
|
||||
*/
|
||||
private Integer city;
|
||||
/**
|
||||
* 市
|
||||
*/
|
||||
private String cityName;
|
||||
|
||||
/**
|
||||
* 区
|
||||
*/
|
||||
private Integer county;
|
||||
/**
|
||||
* 区
|
||||
*/
|
||||
private String countyName;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
private String address;
|
||||
/**
|
||||
* 经营范围
|
||||
*/
|
||||
private String tradeScope;
|
||||
/**
|
||||
* 会员id
|
||||
*/
|
||||
private Long pkMember;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 缴纳供应商
|
||||
*/
|
||||
private Integer pkSupplier;
|
||||
|
||||
/**
|
||||
* 缴纳日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date billDate;
|
||||
|
||||
/**
|
||||
* 销售类型 引用现在销售大类 来源枚举 ESaleType
|
||||
*/
|
||||
@Transaction(transactionKey = EnumsPrefixConstants.E_SALE_TYPE)
|
||||
private Integer saleType;
|
||||
/**
|
||||
* 销售类型 引用现在销售大类 来源枚举 ESaleType
|
||||
*/
|
||||
private String saleTypeVal;
|
||||
|
||||
/**
|
||||
* 销售范围
|
||||
*/
|
||||
private Integer saleScope;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
|
||||
/**
|
||||
* 保证金金额
|
||||
*/
|
||||
private BigDecimal margin;
|
||||
|
||||
/**
|
||||
* 创建人ID
|
||||
*/
|
||||
private Long pkCreator;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Excel(name = "创建时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date creationTime;
|
||||
|
||||
/**
|
||||
* 逻辑删除 (0=未删除,1已删除)
|
||||
*/
|
||||
private Integer delFlag;
|
||||
|
||||
/**
|
||||
* 国家
|
||||
*/
|
||||
private Integer pkCountry;
|
||||
/**
|
||||
* 登录用户信息
|
||||
*/
|
||||
private LoginUser loginUser;
|
||||
/**
|
||||
* 审批业务类型 来源枚举 EApprovalBusiness
|
||||
*/
|
||||
private Integer editType;
|
||||
|
||||
/**
|
||||
* 审核状态 来源枚举 EApproveStatus
|
||||
*/
|
||||
@Transaction(transactionKey = EnumsPrefixConstants.APPROVE_STATUS)
|
||||
private Integer approveStatus;
|
||||
/**
|
||||
* 审核状态 来源枚举 EApproveStatus
|
||||
*/
|
||||
private String approveStatusVal;
|
||||
|
||||
/**
|
||||
* 修改记录单号
|
||||
*/
|
||||
private String thBusinessCode;
|
||||
/**
|
||||
* 保证金缴纳集合
|
||||
*/
|
||||
private List<ThMarginVO> thMarginVOList;
|
||||
|
||||
|
||||
}
|
|
@ -1,221 +0,0 @@
|
|||
package com.hzs.ground.order.controller.manage;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.hzs.common.core.annotation.Log;
|
||||
import com.hzs.common.core.constant.msg.ScmMsgConstants;
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.core.enums.*;
|
||||
import com.hzs.common.core.utils.poi.ExcelUtil;
|
||||
import com.hzs.common.core.web.controller.BaseController;
|
||||
import com.hzs.common.core.web.domain.AjaxResult;
|
||||
import com.hzs.common.core.web.page.TableDataInfo;
|
||||
import com.hzs.common.domain.ground.order.ext.SaOrderSettleExt;
|
||||
import com.hzs.common.domain.sale.ext.SaOrderExt;
|
||||
import com.hzs.common.security.utils.SecurityUtils;
|
||||
import com.hzs.ground.order.param.OrderItemsParam;
|
||||
import com.hzs.ground.order.param.OrderQueryParam;
|
||||
import com.hzs.ground.order.service.ISaOrderSettleService;
|
||||
import com.hzs.ground.order.service.ISupplierOrderService;
|
||||
import com.hzs.ground.order.vo.SaOrderSettleVo;
|
||||
import com.hzs.system.base.ISystemConfigServiceApi;
|
||||
import com.hzs.system.base.dto.BdCubasdocDTO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单控制类
|
||||
*
|
||||
* @author: sui q
|
||||
* @time: 2022/8/27 16:20
|
||||
* @description:
|
||||
* @classname: OrderController
|
||||
* @package_name: com.hzs.sale.order.controller
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/manage/order")
|
||||
@Slf4j
|
||||
public class SupplierOrderController extends BaseController {
|
||||
|
||||
@DubboReference
|
||||
private ISystemConfigServiceApi systemConfigServiceApi;
|
||||
|
||||
@Autowired
|
||||
private ISupplierOrderService supplierOrderService;
|
||||
|
||||
@Autowired
|
||||
private ISaOrderSettleService saOrderSettleService;
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*
|
||||
* @return cubasdocParam 入参
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo listSupplierOrder(@RequestBody OrderQueryParam orderQueryParam) {
|
||||
// 根据登录人获取供应商,根据登录账号查找绑定的供应商,查询供应商表
|
||||
R<BdCubasdocDTO> bdCubasdocDate = systemConfigServiceApi.queryBdCubasdocByUser(SecurityUtils.getUserId());
|
||||
if (!bdCubasdocDate.isSuccess() || bdCubasdocDate.getData() == null) {
|
||||
return getDataTable(Collections.emptyList());
|
||||
}
|
||||
orderQueryParam.setPkSupplier(bdCubasdocDate.getData().getPkSupplier());
|
||||
// 根据供应商查询可以查询到的订单
|
||||
startPage();
|
||||
orderQueryParam.setPkCountry(SecurityUtils.getPkCountry());
|
||||
List<SaOrderExt> orderList = supplierOrderService.querySaOrderByCondition(orderQueryParam);
|
||||
for (SaOrderExt saOrderExt : orderList) {
|
||||
for (EOrderStatus value : EOrderStatus.values()) {
|
||||
if (value.getValue() == saOrderExt.getOrderStatus()) {
|
||||
saOrderExt.setOrderStatusVal(value.getLabel());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return getDataTable(orderList);
|
||||
}
|
||||
|
||||
@PostMapping("/send")
|
||||
public AjaxResult sendGood(@RequestBody List<OrderItemsParam> orderItemsParamList) {
|
||||
// 验证是否有该产品的权限,验证订单是否已经发货
|
||||
R<BdCubasdocDTO> bdCubasdocDate = systemConfigServiceApi.queryBdCubasdocByUser(SecurityUtils.getUserId());
|
||||
if (!bdCubasdocDate.isSuccess() || bdCubasdocDate.getData() == null) {
|
||||
return AjaxResult.error("该账号没有绑定供应商");
|
||||
}
|
||||
for (OrderItemsParam orderItemsParam : orderItemsParamList) {
|
||||
if (orderItemsParam.getLogisticsCode() == null || orderItemsParam.getLogisticsCompany() == null) {
|
||||
return AjaxResult.error("请输入物流单号,物流公司");
|
||||
}
|
||||
}
|
||||
OrderQueryParam orderQueryParam = new OrderQueryParam();
|
||||
orderQueryParam.setPkSupplier(bdCubasdocDate.getData().getPkSupplier());
|
||||
orderQueryParam.setOrderItemsParamList(orderItemsParamList);
|
||||
orderQueryParam.setPkCountry(SecurityUtils.getPkCountry());
|
||||
orderQueryParam.setPkCreator(SecurityUtils.getUserId());
|
||||
List<SaOrderExt> orderList = supplierOrderService.querySaOrderByCondition(orderQueryParam);
|
||||
if (orderList == null) {
|
||||
return AjaxResult.error("存在不属于该用户的产品,不能发货");
|
||||
}
|
||||
int size = 0;
|
||||
for (SaOrderExt saOrderExt : orderList) {
|
||||
size += saOrderExt.getOrderItemsExtList().size();
|
||||
}
|
||||
if (size < orderItemsParamList.size()) {
|
||||
return AjaxResult.error("存在不属于该用户的产品,不能发货");
|
||||
}
|
||||
supplierOrderService.sendGood(orderQueryParam, orderItemsParamList, orderList);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*
|
||||
* @return cubasdocParam 入参
|
||||
*/
|
||||
@PostMapping("/list-settle")
|
||||
@Log(module = EOperationModule.SUPPLIER_SETTLE_ORDER, business = EOperationBusiness.SUPPLIER_SETTLE_ORDER, method = EOperationMethod.SELECT)
|
||||
public TableDataInfo listSettleOrder(@RequestBody OrderQueryParam orderQueryParam) {
|
||||
// 根据登录人获取供应商,根据登录账号查找绑定的供应商,查询供应商表
|
||||
R<BdCubasdocDTO> bdCubasdocDate = systemConfigServiceApi.queryBdCubasdocByUser(SecurityUtils.getUserId());
|
||||
if (bdCubasdocDate != null && bdCubasdocDate.getData() != null) {
|
||||
orderQueryParam.setPkSupplier(bdCubasdocDate.getData().getPkSupplier());
|
||||
}
|
||||
// 根据供应商查询可以查询到的订单
|
||||
startPage();
|
||||
orderQueryParam.setPkCountry(SecurityUtils.getPkCountry());
|
||||
List<SaOrderSettleExt> orderSettleExtList = saOrderSettleService.querySaOrderSettle(orderQueryParam);
|
||||
return getDataTable(orderSettleExtList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询会员某个时间段内的奖金汇总
|
||||
*/
|
||||
@PostMapping("/export-list")
|
||||
@Log(module = EOperationModule.SUPPLIER_SETTLE_ORDER, business = EOperationBusiness.SUPPLIER_SETTLE_ORDER, method = EOperationMethod.EXPORT)
|
||||
public void exportSettleOrder(HttpServletResponse response, OrderQueryParam orderQueryParam){
|
||||
// 根据登录人获取供应商,根据登录账号查找绑定的供应商,查询供应商表
|
||||
R<BdCubasdocDTO> bdCubasdocDate = systemConfigServiceApi.queryBdCubasdocByUser(SecurityUtils.getUserId());
|
||||
if (bdCubasdocDate != null && bdCubasdocDate.getData() != null) {
|
||||
orderQueryParam.setPkSupplier(bdCubasdocDate.getData().getPkSupplier());
|
||||
}
|
||||
// 根据供应商查询可以查询到的订单
|
||||
orderQueryParam.setPkCountry(SecurityUtils.getPkCountry());
|
||||
List<SaOrderSettleExt> orderSettleExtList = saOrderSettleService.querySaOrderSettle(orderQueryParam);
|
||||
List<SaOrderSettleVo> saOrderSettleVoList = packageScmExportVo(orderSettleExtList);
|
||||
ExcelUtil<SaOrderSettleVo> util = new ExcelUtil<>(SaOrderSettleVo.class);
|
||||
util.exportExcel(response, saOrderSettleVoList, "订单结算导出");
|
||||
}
|
||||
|
||||
private List<SaOrderSettleVo> packageScmExportVo(List<SaOrderSettleExt> orderSettleExtList) {
|
||||
List<SaOrderSettleVo> saOrderSettleVoList = new ArrayList<>();
|
||||
for (SaOrderSettleExt saOrderSettleExt : orderSettleExtList) {
|
||||
SaOrderSettleVo saOrderSettleVo = BeanUtil.copyProperties(saOrderSettleExt, SaOrderSettleVo.class);
|
||||
if(EDealerYesNo.YES.getValue() == saOrderSettleExt.getSettleStatus()){
|
||||
saOrderSettleVo.setSettleStatusVal(EDealerYesNo.YES.getLabel());
|
||||
}else{
|
||||
saOrderSettleVo.setSettleStatusVal(EDealerYesNo.NO.getLabel());
|
||||
}
|
||||
saOrderSettleVoList.add(saOrderSettleVo);
|
||||
}
|
||||
return saOrderSettleVoList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 结算订单
|
||||
*
|
||||
* @return cubasdocParam 入参
|
||||
*/
|
||||
@PostMapping("/settle-order")
|
||||
@Log(module = EOperationModule.SUPPLIER_SETTLE_ORDER, business = EOperationBusiness.SUPPLIER_SETTLE_ORDER, method = EOperationMethod.SETTLE)
|
||||
public AjaxResult settleOrder(@RequestBody OrderQueryParam orderQueryParam) {
|
||||
orderQueryParam.setPkCountry(SecurityUtils.getPkCountry());
|
||||
List<SaOrderSettleExt> orderSettleExtList = saOrderSettleService.querySaOrderSettle(orderQueryParam);
|
||||
if (CollectionUtil.isEmpty(orderSettleExtList)) {
|
||||
return AjaxResult.error(ScmMsgConstants.SETTLE_ORDER_NOT_EXISTS);
|
||||
}
|
||||
// 分为线上线下2部分
|
||||
for (SaOrderSettleExt saOrderSettleExt : orderSettleExtList) {
|
||||
// 验证状态
|
||||
if (EYesNo.YES.getIntValue() == saOrderSettleExt.getSettleStatus()) {
|
||||
return AjaxResult.error(ScmMsgConstants.SETTLE_ORDER_HAS_SETTLE);
|
||||
}
|
||||
}
|
||||
saOrderSettleService.updateSaOrderSettle(orderSettleExtList);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 撤销订单并入库(走签呈),签呈页面点击确定按钮
|
||||
// *
|
||||
// * @param scmApproveParam 参数
|
||||
// */
|
||||
// @PostMapping("/submit")
|
||||
// @Log(module = EOperationModule.SUPPLIER_SETTLE_ORDER, business = EOperationBusiness.SUPPLIER_SETTLE_ORDER, method = EOperationMethod.UPDATE)
|
||||
// public AjaxResult submitSettleOrder(@RequestBody ScmApproveParam scmApproveParam) {
|
||||
// scmApproveParam.setPkCountry(SecurityUtils.getPkCountry());
|
||||
// if(scmApproveParam.getPkId() == null){
|
||||
// return AjaxResult.error(TransactionUtils.getContent(ScmMsgConstants.IC_GENERAL_IN_NOT_EXIST));
|
||||
// }
|
||||
// IcGeneralInHExt generalInhExt = generalInhService.queryGeneralInById(scmApproveParam.getPkId(), EScmOrderStatus.SAVE.getValue());
|
||||
// if (generalInhExt == null) {
|
||||
// return AjaxResult.error(TransactionUtils.getContent(ScmMsgConstants.IC_GENERAL_IN_NOT_EXIST));
|
||||
// }
|
||||
// // 验证该订单是否存在签呈,存在待审核的签呈不能再次发起
|
||||
// List<ScmOrderApproveLog> scmOrderApproveLogs = scmOrderApproveLogService.queryScmOrderApproveLogByCondition(scmApproveParam.getPkId(), EApprovalBusiness.IC_GENERAL_IN_APPROVE.getValue(), null);
|
||||
// if(CollectionUtil.isNotEmpty(scmOrderApproveLogs)){
|
||||
// return AjaxResult.error(TransactionUtils.getContent(ScmMsgConstants.PURCHASE_EXISTS_AGENT));
|
||||
// }
|
||||
// generalInhService.auditGeneralInByApproveParamSubmit(scmApproveParam, userTokenService.getLoginUser());
|
||||
// return AjaxResult.success();
|
||||
// }
|
||||
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
package com.hzs.ground.order.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hzs.common.domain.ground.order.SaOrderSettle;
|
||||
import com.hzs.common.domain.ground.order.ext.SaOrderSettleExt;
|
||||
import com.hzs.ground.order.param.OrderQueryParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 销售订单-三方结算表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2024-04-15
|
||||
*/
|
||||
public interface SaOrderSettleMapper extends BaseMapper<SaOrderSettle> {
|
||||
|
||||
/*
|
||||
* @description:
|
||||
* @author: sui q
|
||||
* @date: 2024/4/15 15:37
|
||||
* @param: null null
|
||||
**/
|
||||
List<SaOrderSettleExt> querySaOrderSettle(@Param("queryParam") OrderQueryParam queryParam);
|
||||
|
||||
/*
|
||||
* @description: 结算操作
|
||||
* @author: sui q
|
||||
* @date: 2024/4/16 10:23
|
||||
* @param: null null
|
||||
**/
|
||||
void updateSaOrderSettle(@Param("orderSettleExtList") List<SaOrderSettleExt> orderSettleExtList);
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
package com.hzs.ground.order.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hzs.common.domain.sale.ext.SaOrderExt;
|
||||
import com.hzs.common.domain.sale.order.SaOrderItems;
|
||||
import com.hzs.ground.order.param.OrderQueryParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: 供应商查询顶顶那
|
||||
* @author: sui q
|
||||
* @time: 2024/3/23 14:01
|
||||
* @classname: SupplierOrdeMapper
|
||||
* @package_name: com.hzs.ground.order.mapper
|
||||
* version 1.0.0
|
||||
*/
|
||||
public interface SupplierOrderMapper extends BaseMapper<SaOrderItems> {
|
||||
|
||||
/*
|
||||
* @description: 供应商查询订单
|
||||
* @author: sui q
|
||||
* @date: 2024/3/23 14:32
|
||||
* @param: null null
|
||||
**/
|
||||
List<SaOrderExt> querySaOrderByCondition(@Param("orderQueryParam") OrderQueryParam orderQueryParam);
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
package com.hzs.ground.order.param;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import lombok.Data;
|
||||
import org.apache.ibatis.type.JdbcType;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @description: 发货信息
|
||||
* @author: sui q
|
||||
* @time: 2024/3/23 15:18
|
||||
* @classname: OrderItemsParam
|
||||
* @package_name: com.hzs.ground.order.param
|
||||
* version 1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class OrderItemsParam implements Serializable {
|
||||
|
||||
/**
|
||||
* 子表主键
|
||||
*/
|
||||
private Long pkId;
|
||||
|
||||
/**
|
||||
* 物流单号
|
||||
*/
|
||||
private String logisticsCode;
|
||||
|
||||
/**
|
||||
* 物流公司
|
||||
*/
|
||||
private String logisticsCompany;
|
||||
}
|
|
@ -1,87 +0,0 @@
|
|||
package com.hzs.ground.order.param;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 订单查询参数
|
||||
* @Author: sui q
|
||||
* @Time: 2022/10/19 16:49
|
||||
* @Classname: OrderQueryParam
|
||||
* @PackageName: com.hzs.sale.order.param
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class OrderQueryParam implements Serializable {
|
||||
|
||||
/**
|
||||
* 收货人
|
||||
*/
|
||||
private String recName;
|
||||
|
||||
/**
|
||||
* 收货电话
|
||||
*/
|
||||
private String recPhone;
|
||||
|
||||
/**
|
||||
* 开始支付时间
|
||||
*/
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 结束支付时间
|
||||
*/
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderCode;
|
||||
|
||||
/**
|
||||
* 国家
|
||||
*/
|
||||
private Integer pkCountry;
|
||||
|
||||
private Long pkCreator;
|
||||
|
||||
/**
|
||||
* 供应商
|
||||
*/
|
||||
private Integer pkSupplier;
|
||||
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
private String productCode;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 发货渠道 1 总仓发货 2 一件代发
|
||||
*/
|
||||
private Integer shippingChannel;
|
||||
|
||||
/**
|
||||
* 订单状态 (0=待支付,1=已支付)
|
||||
*/
|
||||
private Integer orderStatus;
|
||||
|
||||
private List<Long> idList;
|
||||
|
||||
private List<OrderItemsParam> orderItemsParamList;
|
||||
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
package com.hzs.ground.order.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.domain.ground.order.SaOrderSettle;
|
||||
import com.hzs.common.domain.ground.order.ext.SaOrderSettleExt;
|
||||
import com.hzs.common.domain.sale.ext.SaOrderExt;
|
||||
import com.hzs.ground.order.param.OrderQueryParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 销售订单-三方结算表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2024-04-15
|
||||
*/
|
||||
public interface ISaOrderSettleService extends IService<SaOrderSettle> {
|
||||
|
||||
/*
|
||||
* @description: 保存结算单,发货完成后生成订单结算单
|
||||
* @author: sui q
|
||||
* @date: 2024/4/15 14:12
|
||||
* @param: null null
|
||||
**/
|
||||
void saveOrderSettleByOrder(OrderQueryParam orderQueryParam, List<SaOrderExt> orderList);
|
||||
|
||||
/*
|
||||
* @description:
|
||||
* @author: sui q
|
||||
* @date: 2024/4/15 15:37
|
||||
* @param: null null
|
||||
**/
|
||||
List<SaOrderSettleExt> querySaOrderSettle(OrderQueryParam queryParam);
|
||||
|
||||
/*
|
||||
* @description: 结算操作
|
||||
* @author: sui q
|
||||
* @date: 2024/4/16 10:23
|
||||
* @param: null null
|
||||
**/
|
||||
void updateSaOrderSettle(List<SaOrderSettleExt> orderSettleExtList);
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
package com.hzs.ground.order.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.domain.sale.ext.SaOrderExt;
|
||||
import com.hzs.common.domain.sale.order.SaOrder;
|
||||
import com.hzs.common.domain.sale.order.SaOrderItems;
|
||||
import com.hzs.ground.order.param.OrderItemsParam;
|
||||
import com.hzs.ground.order.param.OrderQueryParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: 用于查询供应商订单,发货
|
||||
* @author: sui q
|
||||
* @time: 2024/3/23 13:59
|
||||
* @classname: SupplierOrderService
|
||||
* @package_name: com.hzs.ground.order.service
|
||||
* version 1.0.0
|
||||
*/
|
||||
public interface ISupplierOrderService extends IService<SaOrderItems> {
|
||||
|
||||
/*
|
||||
* @description: 供应商查询订单
|
||||
* @author: sui q
|
||||
* @date: 2024/3/23 14:32
|
||||
* @param: null null
|
||||
**/
|
||||
List<SaOrderExt> querySaOrderByCondition(OrderQueryParam orderQueryParam);
|
||||
|
||||
/*
|
||||
* @description: 发货
|
||||
* @author: sui q
|
||||
* @date: 2024/3/23 15:36
|
||||
* @param: null null
|
||||
**/
|
||||
void sendGood(OrderQueryParam orderQueryParam, List<OrderItemsParam> orderItemsParamList, List<SaOrderExt> orderList);
|
||||
}
|
|
@ -1,105 +0,0 @@
|
|||
package com.hzs.ground.order.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.core.enums.ESettleType;
|
||||
import com.hzs.common.core.enums.EYesNo;
|
||||
import com.hzs.common.core.utils.ComputeUtil;
|
||||
import com.hzs.common.core.utils.DateUtils;
|
||||
import com.hzs.common.domain.ground.order.SaOrderSettle;
|
||||
import com.hzs.common.domain.ground.order.ext.SaOrderSettleExt;
|
||||
import com.hzs.common.domain.sale.ext.SaOrderExt;
|
||||
import com.hzs.common.domain.sale.ext.SaOrderItemsExt;
|
||||
import com.hzs.common.domain.scm.postage.ext.ThSupplierPostageExt;
|
||||
import com.hzs.ground.order.mapper.SaOrderSettleMapper;
|
||||
import com.hzs.ground.order.param.OrderQueryParam;
|
||||
import com.hzs.ground.order.service.ISaOrderSettleService;
|
||||
import com.hzs.ground.postage.service.IThSupplierPostageService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 销售订单-三方结算表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2024-04-15
|
||||
*/
|
||||
@Service
|
||||
public class SaOrderSettleServiceImpl extends ServiceImpl<SaOrderSettleMapper, SaOrderSettle> implements ISaOrderSettleService {
|
||||
|
||||
@Autowired
|
||||
private IThSupplierPostageService supplierPostageService;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void saveOrderSettleByOrder(OrderQueryParam orderQueryParam, List<SaOrderExt> orderList) {
|
||||
List<SaOrderSettle> saOrderSettleList = new ArrayList<>();
|
||||
List<SaOrderItemsExt> orderItemsExtList = new ArrayList<>();
|
||||
for (SaOrderExt saOrderExt : orderList) {
|
||||
for (SaOrderItemsExt saOrderItems : saOrderExt.getOrderItemsExtList()) {
|
||||
SaOrderSettle saOrderSettle = SaOrderSettle.builder()
|
||||
.pkOrder(saOrderExt.getPkId())
|
||||
.pkOrderItems(saOrderItems.getPkId())
|
||||
.settleStatus(EYesNo.NO.getIntValue())
|
||||
.price(saOrderItems.getSupplyPrice())
|
||||
.quantity(saOrderItems.getQuantity())
|
||||
.pkSupplier(orderQueryParam.getPkSupplier())
|
||||
.postage(BigDecimal.ZERO)
|
||||
.totalPrice(ComputeUtil.computeMultiply(saOrderItems.getSupplyPrice(), saOrderItems.getQuantity()))
|
||||
.build();
|
||||
saOrderSettle.setPkCountry(orderQueryParam.getPkCountry());
|
||||
saOrderSettle.setPkCreator(orderQueryParam.getPkCreator());
|
||||
saOrderSettleList.add(saOrderSettle);
|
||||
saOrderItems.setPkSupplier(orderQueryParam.getPkSupplier());
|
||||
orderItemsExtList.add(saOrderItems);
|
||||
}
|
||||
}
|
||||
List<ThSupplierPostageExt> thSupplierPostageExtList = supplierPostageService.querySupplierPostageByOrder(orderItemsExtList);
|
||||
if (saOrderSettleList.size() > 0) {
|
||||
Map<Long, ThSupplierPostageExt> supplierPostageExtMap = new HashMap<>();
|
||||
if(thSupplierPostageExtList.size()>0){
|
||||
thSupplierPostageExtList.forEach(thSupplierPostageExt -> supplierPostageExtMap.put(thSupplierPostageExt.getPkOrder(), thSupplierPostageExt));
|
||||
}
|
||||
for (SaOrderSettle saOrderSettle : saOrderSettleList) {
|
||||
if(supplierPostageExtMap.containsKey(saOrderSettle.getPkOrder())){
|
||||
saOrderSettle.setPostage(supplierPostageExtMap.get(saOrderSettle.getPkOrder()).getPostage());
|
||||
saOrderSettle.setTotalPrice(ComputeUtil.computeAdd(saOrderSettle.getTotalPrice(), saOrderSettle.getPostage()));
|
||||
supplierPostageExtMap.remove(saOrderSettle.getPkOrder());
|
||||
}
|
||||
}
|
||||
saveBatch(saOrderSettleList);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SaOrderSettleExt> querySaOrderSettle(OrderQueryParam queryParam) {
|
||||
if (queryParam.getEndTime() != null) {
|
||||
queryParam.setEndTime(DateUtils.afterDate(1, ChronoUnit.DAYS, queryParam.getEndTime()));
|
||||
}
|
||||
return baseMapper.querySaOrderSettle(queryParam);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateSaOrderSettle(List<SaOrderSettleExt> orderSettleExtList) {
|
||||
// 分为线上线下2部分
|
||||
List<SaOrderSettleExt> onlineSaOrderSettleList = new ArrayList<>();
|
||||
for (SaOrderSettleExt saOrderSettleExt : orderSettleExtList) {
|
||||
if(ESettleType.ONLINE.getValue() == saOrderSettleExt.getSettleType()){
|
||||
onlineSaOrderSettleList.add(saOrderSettleExt);
|
||||
}
|
||||
}
|
||||
// 批量更新结算状态
|
||||
baseMapper.updateSaOrderSettle(orderSettleExtList);
|
||||
// 为账号发放结算金额,这个可能会发2份,待确认
|
||||
}
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
package com.hzs.ground.order.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.core.constant.SaOrderFieldConstants;
|
||||
import com.hzs.common.core.constant.SystemFieldConstants;
|
||||
import com.hzs.common.core.enums.EOrderStatus;
|
||||
import com.hzs.common.core.utils.DateUtils;
|
||||
import com.hzs.common.domain.sale.ext.SaOrderExt;
|
||||
import com.hzs.common.domain.sale.order.SaOrder;
|
||||
import com.hzs.common.domain.sale.order.SaOrderItems;
|
||||
import com.hzs.ground.order.mapper.SupplierOrderMapper;
|
||||
import com.hzs.ground.order.param.OrderItemsParam;
|
||||
import com.hzs.ground.order.param.OrderQueryParam;
|
||||
import com.hzs.ground.order.service.ISaOrderSettleService;
|
||||
import com.hzs.ground.order.service.ISupplierOrderService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: 供应商查询订单
|
||||
* @author: sui q
|
||||
* @time: 2024/3/23 13:59
|
||||
* @classname: SupplierOrderServiceImpl
|
||||
* @package_name: com.hzs.ground.order.service.impl
|
||||
* version 1.0.0
|
||||
*/
|
||||
@Service
|
||||
public class SupplierOrderServiceImpl extends ServiceImpl<SupplierOrderMapper, SaOrderItems> implements ISupplierOrderService {
|
||||
|
||||
@Autowired
|
||||
private ISaOrderSettleService saOrderSettleService;
|
||||
|
||||
@Override
|
||||
public List<SaOrderExt> querySaOrderByCondition(OrderQueryParam orderQueryParam) {
|
||||
if (orderQueryParam.getEndTime() != null) {
|
||||
orderQueryParam.setEndTime(DateUtils.afterDate(1, ChronoUnit.DAYS, orderQueryParam.getEndTime()));
|
||||
}
|
||||
return baseMapper.querySaOrderByCondition(orderQueryParam);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void sendGood(OrderQueryParam orderQueryParam , List<OrderItemsParam> orderItemsParamList, List<SaOrderExt> orderList) {
|
||||
for (OrderItemsParam orderItemsParam : orderItemsParamList) {
|
||||
UpdateWrapper<SaOrderItems> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.eq(SystemFieldConstants.PK_ID, orderItemsParam.getPkId());
|
||||
updateWrapper.eq(SaOrderFieldConstants.ORDER_STATUS, EOrderStatus.PAY.getValue());
|
||||
updateWrapper.set("LOGISTICS_CODE", orderItemsParam.getLogisticsCode());
|
||||
updateWrapper.set("LOGISTICS_COMPANY", orderItemsParam.getLogisticsCompany());
|
||||
updateWrapper.set(SaOrderFieldConstants.ORDER_STATUS, EOrderStatus.DELIVERED.getValue());
|
||||
update(updateWrapper);
|
||||
}
|
||||
// 发货完成自动生成待结算单据
|
||||
saOrderSettleService.saveOrderSettleByOrder(orderQueryParam, orderList);
|
||||
}
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
package com.hzs.ground.order.vo;
|
||||
|
||||
import com.hzs.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @description: 订单结算vo
|
||||
* @author: sui q
|
||||
* @time: 2024/5/8 11:04
|
||||
* @classname: SaOrderSettleVo
|
||||
* @package_name: com.hzs.ground.order.vo
|
||||
* version 1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class SaOrderSettleVo implements Serializable {
|
||||
|
||||
@Excel(name = "订单编号")
|
||||
private String orderCode;
|
||||
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
@Excel(name = "产品编号")
|
||||
private String productCode;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
@Excel(name = "产品名称")
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
@Excel(name = "数量")
|
||||
private Integer quantity;
|
||||
|
||||
/**
|
||||
* 价格
|
||||
*/
|
||||
@Excel(name = "结算单价",scale = 2)
|
||||
private BigDecimal price;
|
||||
|
||||
@Excel(name = "结算状态")
|
||||
private String settleStatusVal;
|
||||
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
@Excel(name = "供应商")
|
||||
private String supplyName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Excel(name = "创建时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date creationTime;
|
||||
|
||||
|
||||
/**
|
||||
* 支付时间
|
||||
*/
|
||||
@Excel(name = "支付时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date payTime;
|
||||
}
|
|
@ -1,124 +0,0 @@
|
|||
package com.hzs.ground.postage.controller.manage;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.hzs.common.core.constant.HttpStatus;
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.core.utils.DateUtils;
|
||||
import com.hzs.common.core.utils.poi.ExcelUtil;
|
||||
import com.hzs.common.core.web.controller.BaseController;
|
||||
import com.hzs.common.core.web.domain.AjaxResult;
|
||||
import com.hzs.common.core.web.page.TableDataInfo;
|
||||
import com.hzs.common.domain.scm.postage.ThSupplierPostage;
|
||||
import com.hzs.common.security.utils.SecurityUtils;
|
||||
import com.hzs.ground.postage.param.SupplierPostageParam;
|
||||
import com.hzs.ground.postage.service.IThSupplierPostageService;
|
||||
import com.hzs.ground.postage.vo.SupplierPostageVo;
|
||||
import com.hzs.system.base.ISystemConfigServiceApi;
|
||||
import com.hzs.system.base.dto.BdCubasdocDTO;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/manage/supplier-postage")
|
||||
public class SupplierPostageController extends BaseController {
|
||||
@Autowired
|
||||
private IThSupplierPostageService supplierPostageService;
|
||||
@DubboReference
|
||||
private ISystemConfigServiceApi systemConfigServiceApi;
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("list")
|
||||
public TableDataInfo list(SupplierPostageParam supplierPostageParam){
|
||||
startPage();
|
||||
|
||||
// 下面代码需要使用 坐等随工提交此方法 取消注释
|
||||
R<BdCubasdocDTO> bdCubasdocDate = systemConfigServiceApi.queryBdCubasdocByUser(SecurityUtils.getUserId());
|
||||
Integer pkSupplier = null;
|
||||
if(bdCubasdocDate.getCode() == HttpStatus.SUCCESS){
|
||||
BdCubasdocDTO bdCubasdoc = bdCubasdocDate.getData();
|
||||
if(bdCubasdoc == null){
|
||||
pkSupplier = 1;
|
||||
}else {
|
||||
pkSupplier = bdCubasdoc.getPkSupplier();
|
||||
}
|
||||
}
|
||||
supplierPostageParam.setPkCubasdoc(pkSupplier);
|
||||
List<SupplierPostageVo> list = supplierPostageService.selectByQueryList(supplierPostageParam);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 查询列表
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("export")
|
||||
public void export(SupplierPostageParam supplierPostageParam,HttpServletResponse response){
|
||||
|
||||
// 下面代码需要使用 坐等随工提交此方法 取消注释
|
||||
R<BdCubasdocDTO> bdCubasdocDate = systemConfigServiceApi.queryBdCubasdocByUser(SecurityUtils.getUserId());
|
||||
Integer pkSupplier = null;
|
||||
if(bdCubasdocDate.getCode() == HttpStatus.SUCCESS){
|
||||
BdCubasdocDTO bdCubasdoc = bdCubasdocDate.getData();
|
||||
if(bdCubasdoc == null){
|
||||
pkSupplier = 1;
|
||||
}else {
|
||||
pkSupplier = bdCubasdoc.getPkSupplier();
|
||||
}
|
||||
}
|
||||
supplierPostageParam.setPkCubasdoc(pkSupplier);
|
||||
List<SupplierPostageVo> list = supplierPostageService.selectByQueryList(supplierPostageParam);
|
||||
ExcelUtil<SupplierPostageVo> util = new ExcelUtil<>(SupplierPostageVo.class);
|
||||
util.exportExcel(response, list, "商品信息导出");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("save")
|
||||
public AjaxResult save(@RequestBody ThSupplierPostage supplierPostage){
|
||||
supplierPostage.setCreationTime(DateUtils.currentDateTime());
|
||||
supplierPostage.setPkCreator(SecurityUtils.getUserId());
|
||||
supplierPostage.setPkCountry(SecurityUtils.getPkCountry());
|
||||
supplierPostageService.save(supplierPostage);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@PostMapping("update")
|
||||
public AjaxResult update(@RequestBody ThSupplierPostage supplierPostage){
|
||||
supplierPostageService.updateById(supplierPostage);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询详情
|
||||
*/
|
||||
@GetMapping("detail")
|
||||
public AjaxResult detail(Integer pkSupplierPostage){
|
||||
|
||||
SupplierPostageVo supplierPostageVo = supplierPostageService.selectByPkId(pkSupplierPostage);
|
||||
|
||||
return AjaxResult.success(supplierPostageVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param pkSupplierPostage
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("remove")
|
||||
public AjaxResult remove(Integer pkSupplierPostage){
|
||||
supplierPostageService.removeById(pkSupplierPostage);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
package com.hzs.ground.postage.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hzs.common.domain.sale.ext.SaOrderItemsExt;
|
||||
import com.hzs.common.domain.scm.postage.ThSupplierPostage;
|
||||
import com.hzs.common.domain.scm.postage.ext.ThSupplierPostageExt;
|
||||
import com.hzs.ground.postage.param.SupplierPostageParam;
|
||||
import com.hzs.ground.postage.vo.SupplierPostageVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2024-04-19
|
||||
*/
|
||||
public interface ThSupplierPostageMapper extends BaseMapper<ThSupplierPostage> {
|
||||
|
||||
/*
|
||||
* @description: 根据订单批量查询供应商邮费
|
||||
* @author: sui q
|
||||
* @date: 2024/4/19 16:29
|
||||
* @param: null null
|
||||
**/
|
||||
List<ThSupplierPostageExt> querySupplierPostageByOrder(@Param("orderItemsExtList") List<SaOrderItemsExt> orderItemsExtList);
|
||||
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
* @return
|
||||
*/
|
||||
List<SupplierPostageVo> selectByQueryList(SupplierPostageParam supplierPostageParam);
|
||||
|
||||
/**
|
||||
* 根据id 查询
|
||||
* @param pkSupplierPostage
|
||||
* @return
|
||||
*/
|
||||
SupplierPostageVo selectByPkId(@Param("pkSupplierPostage") Integer pkSupplierPostage);
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
package com.hzs.ground.postage.param;/**
|
||||
* @Description:
|
||||
* @Author: yuhui
|
||||
* @Time: 2024/4/28 11:09
|
||||
* @Classname: SupplierPostageParam
|
||||
* @PackageName: com.hzs.ground.postage.param
|
||||
*/
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*@BelongsProject: hzs_cloud
|
||||
*@BelongsPackage: com.hzs.ground.postage.param
|
||||
*@Author: yh
|
||||
*@CreateTime: 2024-04-28 11:09
|
||||
*@Description: TODO
|
||||
*@Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class SupplierPostageParam {
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String waresName;
|
||||
|
||||
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
private String custName;
|
||||
|
||||
|
||||
/**
|
||||
* 省名称
|
||||
*/
|
||||
private String areaName;
|
||||
|
||||
|
||||
/**
|
||||
* 省主键
|
||||
*/
|
||||
private Integer pkArea;
|
||||
|
||||
/**
|
||||
* 供应商主键
|
||||
*/
|
||||
|
||||
private Integer pkCubasdoc;
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
package com.hzs.ground.postage.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.domain.sale.ext.SaOrderExt;
|
||||
import com.hzs.common.domain.sale.ext.SaOrderItemsExt;
|
||||
import com.hzs.common.domain.scm.postage.ThSupplierPostage;
|
||||
import com.hzs.common.domain.scm.postage.ext.ThSupplierPostageExt;
|
||||
import com.hzs.ground.postage.param.SupplierPostageParam;
|
||||
import com.hzs.ground.postage.vo.SupplierPostageVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2024-04-19
|
||||
*/
|
||||
public interface IThSupplierPostageService extends IService<ThSupplierPostage> {
|
||||
|
||||
/*
|
||||
* @description: 根据订单批量查询供应商邮费
|
||||
* @author: sui q
|
||||
* @date: 2024/4/19 16:29
|
||||
* @param: null null
|
||||
**/
|
||||
List<ThSupplierPostageExt> querySupplierPostageByOrder(List<SaOrderItemsExt> orderItemsExtList);
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
* @return
|
||||
*/
|
||||
List<SupplierPostageVo> selectByQueryList(SupplierPostageParam supplierPostageParam);
|
||||
|
||||
/**
|
||||
* 根据id 查询
|
||||
* @param pkSupplierPostage
|
||||
* @return
|
||||
*/
|
||||
SupplierPostageVo selectByPkId(Integer pkSupplierPostage);
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
package com.hzs.ground.postage.service.impl;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.domain.sale.ext.SaOrderExt;
|
||||
import com.hzs.common.domain.sale.ext.SaOrderItemsExt;
|
||||
import com.hzs.common.domain.scm.postage.ThSupplierPostage;
|
||||
import com.hzs.common.domain.scm.postage.ext.ThSupplierPostageExt;
|
||||
import com.hzs.ground.postage.mapper.ThSupplierPostageMapper;
|
||||
import com.hzs.ground.postage.param.SupplierPostageParam;
|
||||
import com.hzs.ground.postage.service.IThSupplierPostageService;
|
||||
import com.hzs.ground.postage.vo.SupplierPostageVo;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2024-04-19
|
||||
*/
|
||||
@Service
|
||||
public class ThSupplierPostageServiceImpl extends ServiceImpl<ThSupplierPostageMapper, ThSupplierPostage> implements IThSupplierPostageService {
|
||||
|
||||
@Override
|
||||
public List<ThSupplierPostageExt> querySupplierPostageByOrder(List<SaOrderItemsExt> orderItemsExtList){
|
||||
return baseMapper.querySupplierPostageByOrder(orderItemsExtList);
|
||||
}
|
||||
/**
|
||||
* 查询列表
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SupplierPostageVo> selectByQueryList(SupplierPostageParam supplierPostageParam ) {
|
||||
return baseMapper.selectByQueryList(supplierPostageParam);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SupplierPostageVo selectByPkId(Integer pkSupplierPostage) {
|
||||
return baseMapper.selectByPkId(pkSupplierPostage);
|
||||
}
|
||||
}
|
|
@ -1,62 +0,0 @@
|
|||
package com.hzs.ground.postage.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.hzs.common.core.annotation.Excel;
|
||||
import com.hzs.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class SupplierPostageVo {
|
||||
|
||||
|
||||
private Integer pkId;
|
||||
/**
|
||||
* 商品主键
|
||||
*/
|
||||
|
||||
private Integer pkWares;
|
||||
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
@Excel(name = "商品名称")
|
||||
private String waresName;
|
||||
/**
|
||||
* 供应商主键
|
||||
*/
|
||||
|
||||
private Integer pkCubasdoc;
|
||||
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
@Excel(name = "供应商名称")
|
||||
private String custName;
|
||||
|
||||
/**
|
||||
* 邮费主键
|
||||
*/
|
||||
|
||||
private Integer pkPostage;
|
||||
|
||||
/**
|
||||
* 邮费
|
||||
*/
|
||||
@Excel(name = "邮费")
|
||||
private BigDecimal postage;
|
||||
|
||||
/**
|
||||
* 省主键
|
||||
*/
|
||||
|
||||
private Integer pkArea;
|
||||
|
||||
/**
|
||||
* 省 名称
|
||||
*/
|
||||
@Excel(name = "省")
|
||||
private String areaName;
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
package com.hzs.ground.product.controller.api;/**
|
||||
* @Description:
|
||||
* @Author: yuhui
|
||||
* @Time: 2024/4/17 16:15
|
||||
* @Classname: ApiProductController
|
||||
* @PackageName: com.hzs.ground.product.controller.api
|
||||
*/
|
||||
|
||||
import com.hzs.common.core.web.controller.BaseController;
|
||||
import com.hzs.ground.product.service.IThProductService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
*@BelongsProject: hzs_cloud
|
||||
*@BelongsPackage: com.hzs.ground.product.controller.api
|
||||
*@Author: yh
|
||||
*@CreateTime: 2024-04-17 16:15
|
||||
*@Description: TODO
|
||||
*@Version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/th-product")
|
||||
public class ApiProductController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IThProductService productService;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,415 +0,0 @@
|
|||
package com.hzs.ground.product.controller.manage;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.hzs.common.core.annotation.Log;
|
||||
import com.hzs.common.core.constant.msg.ProductMsgConstants;
|
||||
import com.hzs.common.core.enums.*;
|
||||
import com.hzs.common.core.utils.DateUtils;
|
||||
import com.hzs.common.core.utils.StringUtils;
|
||||
import com.hzs.common.core.utils.poi.ExcelUtil;
|
||||
import com.hzs.common.core.web.controller.BaseController;
|
||||
import com.hzs.common.core.web.domain.AjaxResult;
|
||||
import com.hzs.common.core.web.page.TableDataInfo;
|
||||
import com.hzs.common.domain.sale.product.BdProductBas;
|
||||
import com.hzs.common.domain.sale.product.BdProductBasSpecs;
|
||||
import com.hzs.common.domain.sale.product.ext.BdProductBasExt;
|
||||
import com.hzs.common.domain.scm.th.ThProduct;
|
||||
import com.hzs.common.domain.scm.th.ThProductExtend;
|
||||
import com.hzs.common.domain.scm.th.ThProductSpecs;
|
||||
import com.hzs.common.security.service.UserTokenService;
|
||||
import com.hzs.common.security.utils.SecurityUtils;
|
||||
import com.hzs.common.util.TransactionUtils;
|
||||
import com.hzs.ground.product.param.ProductBasParams;
|
||||
import com.hzs.ground.product.service.*;
|
||||
import com.hzs.ground.product.vo.ProductBasVo;
|
||||
import com.hzs.sale.product.IProductServiceApi;
|
||||
import com.hzs.sale.product.dto.ProductParamDTO;
|
||||
import com.hzs.system.sys.dto.LoginUser;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @BelongsProject: hzs_cloud
|
||||
* @BelongsPackage: com.hzs.scm.product.controller
|
||||
* @Author: yh
|
||||
* @CreateTime: 2023-11-27 09:29
|
||||
* @Description: TODO
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/manage/product-bas")
|
||||
public class BdProductBasController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private UserTokenService userTokenService;
|
||||
@Autowired
|
||||
private IThProductExtendService productExtendService;
|
||||
@Autowired
|
||||
private IThProductService thProductService;
|
||||
@Autowired
|
||||
private IThProductSpecsService productSpecsService;
|
||||
@Autowired
|
||||
private IBdProductBasService productBasService;
|
||||
@Autowired
|
||||
private IBdProductBasSpecsService productBasSpecsService;
|
||||
|
||||
@DubboReference
|
||||
IProductServiceApi productServiceApi;
|
||||
|
||||
/**
|
||||
* 查询列表 (分页)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ProductBasParams productBasParams) {
|
||||
if (productBasParams.getStartCreateDate() != null) {
|
||||
productBasParams.setStartCreateDate(DateUtils.getStartTime(productBasParams.getStartCreateDate()));
|
||||
}
|
||||
if (productBasParams.getEndCreateDate() != null) {
|
||||
productBasParams.setEndCreateDate(DateUtils.getEndTime(productBasParams.getEndCreateDate()));
|
||||
}
|
||||
productBasParams.setSystemType(SecurityUtils.getSystemType());
|
||||
|
||||
startPage();
|
||||
List<BdProductBasExt> list = productBasService.selectByList(productBasParams);
|
||||
for (BdProductBasExt productBas : list) {
|
||||
Integer pkProduct = productBas.getPkProduct();
|
||||
if (pkProduct == null) {
|
||||
productBas.setIsShowCreateButton(EYesNo.YES.getIntValue());
|
||||
} else {
|
||||
productBas.setIsShowCreateButton(EYesNo.NO.getIntValue());
|
||||
}
|
||||
}
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出
|
||||
*
|
||||
* @param productBasParams
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/export")
|
||||
public void export(ProductBasParams productBasParams, HttpServletResponse response) {
|
||||
LambdaQueryWrapper<BdProductBas> qw = new LambdaQueryWrapper<>();
|
||||
qw.eq(BdProductBas::getPkCountry, SecurityUtils.getPkCountry());
|
||||
qw.eq(BdProductBas::getSystemType, SecurityUtils.getSystemType());
|
||||
if (StringUtils.isNotBlank(productBasParams.getProductCode())) {
|
||||
qw.like(BdProductBas::getProductCode, productBasParams.getProductCode());
|
||||
}
|
||||
if (StringUtils.isNotBlank(productBasParams.getProductName())) {
|
||||
qw.like(BdProductBas::getProductName, productBasParams.getProductName());
|
||||
}
|
||||
if (productBasParams.getStartCreateDate() != null && productBasParams.getEndCreateDate() != null) {
|
||||
qw.between(BdProductBas::getCreationTime, DateUtils.getStartTime(productBasParams.getStartCreateDate()), DateUtils.getEndTime(productBasParams.getEndCreateDate()));
|
||||
}
|
||||
qw.orderByDesc(BdProductBas::getCreationTime);
|
||||
List<BdProductBas> list = productBasService.list(qw);
|
||||
List<ProductBasVo> resultList = list.stream().map(a -> BeanUtil.copyProperties(a, ProductBasVo.class)).collect(Collectors.toList());
|
||||
ExcelUtil<ProductBasVo> util = new ExcelUtil<>(ProductBasVo.class);
|
||||
util.exportExcel(response, resultList, "产品基本信息导出");
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/find-all")
|
||||
public TableDataInfo findAll(String query, Integer pkCubasdoc) {
|
||||
startPage();
|
||||
List<ProductBasVo> resultList = productBasService.queryProductBasList(query, SecurityUtils.getPkCountry(), pkCubasdoc, SecurityUtils.getSystemType());
|
||||
return getDataTable(resultList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/find-by-bas-all")
|
||||
public TableDataInfo findByBasAll(String query) {
|
||||
startPage();
|
||||
List<ProductBasVo> resultList = productBasService.queryProductBasAllList(query, SecurityUtils.getPkCountry(), SecurityUtils.getSystemType());
|
||||
return getDataTable(resultList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询全部关联商品
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/query-product-bas-relevance")
|
||||
public TableDataInfo queryProductBasRelevance(String query) {
|
||||
startPage();
|
||||
Integer pkCountry = SecurityUtils.getPkCountry();
|
||||
List<ProductBasVo> resultList = productBasService.queryProductBasRelevanceList(query, pkCountry, SecurityUtils.getSystemType());
|
||||
return getDataTable(resultList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param productBasParams
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
public AjaxResult save(@RequestBody ProductBasParams productBasParams) {
|
||||
if (StringUtils.isBlank(productBasParams.getProductName())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ProductMsgConstants.PRODUCT_NAME_REQUIRED));
|
||||
}
|
||||
// 保质期
|
||||
if (productBasParams.getShelfLife() == null) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ProductMsgConstants.PRODUCT_SHELFLIFE_REQUIRED));
|
||||
}
|
||||
// 单位
|
||||
if (productBasParams.getUnit() == null) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ProductMsgConstants.PRODUCT_UNIT_REQUIRED));
|
||||
}
|
||||
// 重量
|
||||
if (productBasParams.getWeight() == null) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ProductMsgConstants.PRODUCT_WEIGHT_REQUIRED));
|
||||
}
|
||||
// 产品分类
|
||||
if (productBasParams.getPkClassify() == null) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ProductMsgConstants.PRODUCT_CLASSIFY_REQUIRED));
|
||||
}
|
||||
// 长
|
||||
if (productBasParams.getLength() == null) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ProductMsgConstants.PRODUCT_LENGTH_REQUIRED));
|
||||
}
|
||||
// 宽
|
||||
if (productBasParams.getWidth() == null) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ProductMsgConstants.PRODUCT_WIDTH_REQUIRED));
|
||||
}
|
||||
// 高
|
||||
if (productBasParams.getHeight() == null) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ProductMsgConstants.PRODUCT_HEIGHT_REQUIRED));
|
||||
}
|
||||
// 产品主图
|
||||
if (StringUtils.isBlank(productBasParams.getCover())) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ProductMsgConstants.PRODUCT_COVER_REQUIRED));
|
||||
}
|
||||
// 产品相关规格
|
||||
if (productBasParams.getPkSpecsType().size() == 0) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ProductMsgConstants.PRODUCT_SPECSTYPE_REQUIRED));
|
||||
}
|
||||
productBasParams.setSystemType(SecurityUtils.getSystemType());
|
||||
// 新增商品信息
|
||||
LoginUser loginUser = userTokenService.getLoginUser();
|
||||
// 校验编号重复
|
||||
LambdaQueryWrapper<BdProductBas> qw = new LambdaQueryWrapper<>();
|
||||
qw.eq(BdProductBas::getProductCode, productBasParams.getProductCode());
|
||||
qw.eq(BdProductBas::getSystemType, SecurityUtils.getSystemType());
|
||||
int productCount = productBasService.count(qw);
|
||||
if (productCount > 0) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ProductMsgConstants.PRODUCT_NUMBER_ALREADY_EXISTS));
|
||||
}
|
||||
return AjaxResult.success(productBasService.saveProductBas(productBasParams, loginUser));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询产品详情
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public AjaxResult detail(Integer productBasId) {
|
||||
BdProductBas productBas = productBasService.getById(productBasId);
|
||||
if (productBas == null) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ProductMsgConstants.PRODUCT_NOT_REQUIRED));
|
||||
}
|
||||
ProductBasParams productParams = BeanUtil.copyProperties(productBas, ProductBasParams.class);
|
||||
LambdaQueryWrapper<BdProductBasSpecs> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(BdProductBasSpecs::getPkProductBas, productBasId);
|
||||
List<Integer> pkSpecsType = new ArrayList<>();
|
||||
List<BdProductBasSpecs> productSpecList = productBasSpecsService.list(queryWrapper);
|
||||
for (BdProductBasSpecs productBasSpecs : productSpecList) {
|
||||
pkSpecsType.add(productBasSpecs.getPkSpecsType());
|
||||
}
|
||||
productParams.setPkSpecsType(pkSpecsType);
|
||||
return AjaxResult.success(productParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param productBasParams
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/update")
|
||||
public AjaxResult update(@RequestBody ProductBasParams productBasParams) {
|
||||
// 查询订单编号是否重复
|
||||
BdProductBas productBas = productBasService.getById(productBasParams.getPkId());
|
||||
if (!productBas.getProductCode().equals(productBasParams.getProductCode())) {
|
||||
LambdaQueryWrapper<BdProductBas> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(BdProductBas::getProductCode, productBasParams.getProductCode());
|
||||
queryWrapper.eq(BdProductBas::getSystemType, SecurityUtils.getSystemType());
|
||||
int count = productBasService.count(queryWrapper);
|
||||
if (count > 0) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ProductMsgConstants.PRODUCT_NUMBER_ALREADY_EXISTS));
|
||||
}
|
||||
}
|
||||
LoginUser loginUser = userTokenService.getLoginUser();
|
||||
// 校验编号重复
|
||||
LambdaQueryWrapper<BdProductBas> qe = new LambdaQueryWrapper<>();
|
||||
qe.eq(BdProductBas::getProductCode, productBasParams.getProductCode());
|
||||
qe.eq(BdProductBas::getSystemType, SecurityUtils.getSystemType());
|
||||
qe.notIn(BdProductBas::getPkId, productBasParams.getPkId());
|
||||
int productCount = productBasService.count(qe);
|
||||
if (productCount > 0) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ProductMsgConstants.PRODUCT_NUMBER_ALREADY_EXISTS));
|
||||
}
|
||||
// 修改商品基本信息
|
||||
productBasService.updateProductBas(productBasParams, loginUser);
|
||||
return AjaxResult.success(productBasParams.getProductCode());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据商品id 删除数据
|
||||
*
|
||||
* @param pkId
|
||||
* @return
|
||||
*/
|
||||
@Log(module = EOperationModule.PRODUCT_DELETE, method = EOperationMethod.DELETE)
|
||||
@DeleteMapping("/{pkId}")
|
||||
public AjaxResult delete(@PathVariable Integer pkId) {
|
||||
productBasService.removeProductBas(pkId);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据产品编号查询产品信息
|
||||
*
|
||||
* @param productCode
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/get-product-info")
|
||||
public AjaxResult getProductInfo(String productCode) {
|
||||
return AjaxResult.success(productBasService.getByProductCodeInfo(productCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成产品
|
||||
*/
|
||||
@GetMapping("/generate-product")
|
||||
public AjaxResult generateProduct(Integer pkProductBas) {
|
||||
// 生成产品基本信息
|
||||
LoginUser loginUser = userTokenService.getLoginUser();
|
||||
BdProductBas productBas = productBasService.getById(pkProductBas);
|
||||
String productCode = productBas.getProductCode();
|
||||
ThProduct product = thProductService.getOne(new LambdaQueryWrapper<ThProduct>().eq(ThProduct::getProductCode, productCode));
|
||||
if (product != null) {
|
||||
// 商品拓展表
|
||||
ThProductExtend productExtend = productExtendService.getOne(new LambdaQueryWrapper<ThProductExtend>().eq(ThProductExtend::getPkProduct, product.getPkId()));
|
||||
// 商品规格表
|
||||
List<ThProductSpecs> productSpecsList = productSpecsService.list(new LambdaQueryWrapper<ThProductSpecs>().eq(ThProductSpecs::getPkProduct, product.getPkId()));
|
||||
// 创建产品
|
||||
ProductParamDTO productDTO = new ProductParamDTO();
|
||||
productDTO.setProductCode(product.getProductCode());
|
||||
productDTO.setProductName(product.getProductName());
|
||||
productDTO.setPkClassify(product.getPkClassify());
|
||||
productDTO.setShippingChannel(product.getShippingChannel());
|
||||
productDTO.setUnit(product.getUnit());
|
||||
productDTO.setWeight(product.getWeight());
|
||||
productDTO.setWidth(product.getWidth());
|
||||
productDTO.setPostageWeight(BigDecimal.ZERO);
|
||||
productDTO.setHeight(product.getHeight());
|
||||
productDTO.setLength(product.getLength());
|
||||
productDTO.setRetailPrice(product.getRetailPrice());
|
||||
productDTO.setCover(product.getCover());
|
||||
productDTO.setShelfLife(product.getShelfLife());
|
||||
productDTO.setCreationTime(DateUtils.currentDateTime());
|
||||
productDTO.setPkCreator(SecurityUtils.getUserId());
|
||||
productDTO.setPkCountry(SecurityUtils.getPkCountry());
|
||||
productDTO.setPkProductBas(productBas.getPkId());
|
||||
productDTO.setPkSupplier(product.getPkSupplier());
|
||||
List<Integer> pkSpecsType = new ArrayList<>();
|
||||
for (ThProductSpecs productSpecs : productSpecsList) {
|
||||
pkSpecsType.add(productSpecs.getPkSpecsType());
|
||||
}
|
||||
productDTO.setPkSpecsType(pkSpecsType);
|
||||
productDTO.setIsPickUp(productExtend.getIsPickUp());
|
||||
productDTO.setIsBarCode(productExtend.getIsBarCode());
|
||||
productDTO.setIsMerge(productExtend.getIsMerge());
|
||||
productDTO.setIsGift(productExtend.getIsGift());
|
||||
productDTO.setIsLandTrans(productExtend.getIsLandTrans());
|
||||
productDTO.setIsAirTrans(productExtend.getIsAirTrans());
|
||||
productDTO.setIsOceanTrans(productExtend.getIsOceanTrans());
|
||||
productDTO.setSort(productExtend.getSort());
|
||||
productDTO.setRepurchaseType(productExtend.getRepurchaseType());
|
||||
productDTO.setIsFresh(EYesNo.NO.getIntValue());
|
||||
productDTO.setPkCubasdoc(product.getPkCubasdoc());
|
||||
productServiceApi.saveProduct(productDTO, loginUser);
|
||||
} else {
|
||||
List<BdProductBasSpecs> productSpecsList = productBasSpecsService.list(new QueryWrapper<BdProductBasSpecs>().eq("PK_PRODUCT_BAS", productBas.getPkId()));
|
||||
// 创建产品
|
||||
ProductParamDTO productDTO = new ProductParamDTO();
|
||||
productDTO.setProductCode(productBas.getProductCode());
|
||||
productDTO.setProductName(productBas.getProductName());
|
||||
productDTO.setPkClassify(productBas.getPkClassify());
|
||||
productDTO.setShippingChannel(EShippingChannel.A_PIECE.getValue());
|
||||
productDTO.setUnit(productBas.getUnit());
|
||||
productDTO.setWeight(productBas.getWeight());
|
||||
productDTO.setWidth(productBas.getWidth());
|
||||
productDTO.setPostageWeight(BigDecimal.ZERO);
|
||||
productDTO.setHeight(productBas.getHeight());
|
||||
productDTO.setLength(productBas.getLength());
|
||||
productDTO.setRetailPrice(BigDecimal.ZERO);
|
||||
productDTO.setCover(productBas.getCover());
|
||||
productDTO.setShelfLife(productBas.getShelfLife());
|
||||
productDTO.setCreationTime(DateUtils.currentDateTime());
|
||||
productDTO.setPkCreator(SecurityUtils.getUserId());
|
||||
productDTO.setPkCountry(SecurityUtils.getPkCountry());
|
||||
productDTO.setPkProductBas(productBas.getPkId());
|
||||
List<Integer> pkSpecsType = new ArrayList<>();
|
||||
for (BdProductBasSpecs productBasSpecs : productSpecsList) {
|
||||
pkSpecsType.add(productBasSpecs.getPkSpecsType());
|
||||
}
|
||||
productDTO.setPkSpecsType(pkSpecsType);
|
||||
productDTO.setIsPickUp(EYesNo.NO.getIntValue());
|
||||
productDTO.setIsBarCode(EYesNo.NO.getIntValue());
|
||||
productDTO.setIsMerge(EYesNo.NO.getIntValue());
|
||||
productDTO.setIsGift(EYesNo.NO.getIntValue());
|
||||
productDTO.setIsLandTrans(EYesNo.NO.getIntValue());
|
||||
productDTO.setIsAirTrans(EYesNo.NO.getIntValue());
|
||||
productDTO.setIsOceanTrans(EYesNo.NO.getIntValue());
|
||||
productDTO.setSort(EYesNo.NO.getIntValue());
|
||||
productDTO.setRepurchaseType(EYesNo.NO.getIntValue());
|
||||
productDTO.setIsFresh(EYesNo.NO.getIntValue());
|
||||
productServiceApi.saveProduct(productDTO, loginUser);
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询供应商产品
|
||||
*/
|
||||
@GetMapping("/get-supplier-product")
|
||||
public AjaxResult getSupplierProduct(Integer pkSupplier) {
|
||||
List<ProductBasVo> productBasList;
|
||||
if (pkSupplier != null) {
|
||||
productBasList = productBasService.selectbypkSupplierList(pkSupplier);
|
||||
} else {
|
||||
productBasList = productBasService.selectbyNotSupplierList();
|
||||
}
|
||||
for (ProductBasVo productBasVo : productBasList) {
|
||||
productBasVo.setUnitStr(EUnit.getEnumByValue(productBasVo.getUnit()).getLabel());
|
||||
}
|
||||
return AjaxResult.success(productBasList);
|
||||
}
|
||||
}
|
|
@ -1,122 +0,0 @@
|
|||
package com.hzs.ground.product.controller.manage;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.hzs.common.core.constant.msg.ProductMsgConstants;
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.core.utils.DateUtils;
|
||||
import com.hzs.common.core.utils.poi.ExcelUtil;
|
||||
import com.hzs.common.core.web.controller.BaseController;
|
||||
import com.hzs.common.core.web.domain.AjaxResult;
|
||||
import com.hzs.common.core.web.page.TableDataInfo;
|
||||
import com.hzs.common.domain.scm.th.ThProductExtend;
|
||||
import com.hzs.common.domain.scm.th.ThProductSpecs;
|
||||
import com.hzs.common.security.utils.SecurityUtils;
|
||||
import com.hzs.common.util.TransactionUtils;
|
||||
import com.hzs.ground.product.param.ProductInfoParam;
|
||||
import com.hzs.ground.product.service.IThProductExtendService;
|
||||
import com.hzs.ground.product.service.IThProductService;
|
||||
import com.hzs.ground.product.service.IThProductSpecsService;
|
||||
import com.hzs.ground.product.vo.ProductVo;
|
||||
import com.hzs.system.base.ISystemConfigServiceApi;
|
||||
import com.hzs.system.base.dto.BdCubasdocDTO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/manage/th-product")
|
||||
public class ThProductController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IThProductService iThProductService;
|
||||
@Autowired
|
||||
private IThProductSpecsService iThProductSpecsService;
|
||||
@Autowired
|
||||
private IThProductExtendService iThProductExtendService;
|
||||
|
||||
@DubboReference
|
||||
ISystemConfigServiceApi iSystemConfigServiceApi;
|
||||
|
||||
/**
|
||||
* 供应商 数据
|
||||
*/
|
||||
@GetMapping("list")
|
||||
public TableDataInfo list(ProductInfoParam productInfoParam) {
|
||||
startPage();
|
||||
if (productInfoParam.getStartCreateDate() != null) {
|
||||
productInfoParam.setStartCreateDate(DateUtils.getStartTime(productInfoParam.getStartCreateDate()));
|
||||
}
|
||||
if (productInfoParam.getEndCreateDate() != null) {
|
||||
productInfoParam.setEndCreateDate(DateUtils.getEndTime(productInfoParam.getEndCreateDate()));
|
||||
}
|
||||
// 根据登录人获取供应商,根据登录账号查找绑定的供应商,查询供应商表
|
||||
R<BdCubasdocDTO> bdCubasdocDate = iSystemConfigServiceApi.queryBdCubasdocByUser(SecurityUtils.getUserId());
|
||||
if (!bdCubasdocDate.isSuccess() || bdCubasdocDate.getData() == null) {
|
||||
return getDataTable(new ArrayList<>());
|
||||
}
|
||||
productInfoParam.setPkSupplier(bdCubasdocDate.getData().getPkSupplier());
|
||||
|
||||
List<ProductVo> list = iThProductService.queryByList(productInfoParam);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出
|
||||
*/
|
||||
@PostMapping("export")
|
||||
public void export(HttpServletResponse response, ProductInfoParam productInfoParam) {
|
||||
if (productInfoParam.getStartCreateDate() != null) {
|
||||
productInfoParam.setStartCreateDate(DateUtils.getStartTime(productInfoParam.getStartCreateDate()));
|
||||
}
|
||||
if (productInfoParam.getEndCreateDate() != null) {
|
||||
productInfoParam.setEndCreateDate(DateUtils.getEndTime(productInfoParam.getEndCreateDate()));
|
||||
}
|
||||
List<ProductVo> list = iThProductService.queryByList(productInfoParam);
|
||||
ExcelUtil<ProductVo> util = new ExcelUtil<>(ProductVo.class);
|
||||
util.exportExcel(response, list, "供应商产品导出");
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询产品详情
|
||||
*/
|
||||
@GetMapping("detail")
|
||||
public AjaxResult detail(Integer productId) {
|
||||
ProductVo product = iThProductService.getProductInfoById(productId);
|
||||
if (product == null) {
|
||||
return AjaxResult.error(TransactionUtils.getContent(ProductMsgConstants.PRODUCT_NOT_REQUIRED));
|
||||
}
|
||||
ProductInfoParam productParams = BeanUtil.copyProperties(product, ProductInfoParam.class);
|
||||
|
||||
ThProductExtend productExtend = iThProductExtendService.getOne(new QueryWrapper<ThProductExtend>().eq("PK_PRODUCT", productId));
|
||||
productParams.setIsPickUp(productExtend.getIsPickUp());
|
||||
productParams.setIsPrize(productExtend.getIsPrize());
|
||||
productParams.setIsBarCode(productExtend.getIsBarCode());
|
||||
productParams.setRepurchaseType(productExtend.getRepurchaseType());
|
||||
productParams.setIsMerge(productExtend.getIsMerge());
|
||||
productParams.setIsGift(productExtend.getIsGift());
|
||||
productParams.setIsLandTrans(productExtend.getIsLandTrans());
|
||||
productParams.setIsAirTrans(productExtend.getIsAirTrans());
|
||||
productParams.setIsOceanTrans(productExtend.getIsOceanTrans());
|
||||
productParams.setSort(productExtend.getSort());
|
||||
LambdaQueryWrapper<ThProductSpecs> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ThProductSpecs::getPkProduct, productId);
|
||||
List<Integer> pkSpecsType = new ArrayList<>();
|
||||
List<ThProductSpecs> productSpecList = iThProductSpecsService.list(queryWrapper);
|
||||
for (ThProductSpecs productSpecs : productSpecList) {
|
||||
pkSpecsType.add(productSpecs.getPkSpecsType());
|
||||
}
|
||||
productParams.setPkSpecsType(pkSpecsType);
|
||||
productParams.setSupplierName(product.getSupplierName());
|
||||
return AjaxResult.success(productParams);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,98 +0,0 @@
|
|||
package com.hzs.ground.product.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hzs.common.domain.sale.product.BdProductBas;
|
||||
import com.hzs.common.domain.sale.product.BdProductSpecs;
|
||||
import com.hzs.common.domain.sale.product.ext.BdProductBasExt;
|
||||
import com.hzs.ground.product.param.ProductBasParams;
|
||||
import com.hzs.ground.product.vo.ProductBasVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 产品基本设置 Mapper 接口
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-11-21
|
||||
*/
|
||||
public interface BdProductBasMapper extends BaseMapper<BdProductBas> {
|
||||
|
||||
/*
|
||||
* @description: 查询产品id,顺道查询出国家对应的产品id
|
||||
* @author: sui q
|
||||
* @date: 2023/11/24 11:41
|
||||
* @param: null null
|
||||
**/
|
||||
List<BdProductBasExt> queryProductBasByIds(@Param("idList") Set<Integer> idList, @Param("pkCountry") Integer pkCountry);
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*
|
||||
* @param query
|
||||
* @param pkCubasdoc
|
||||
* @return
|
||||
*/
|
||||
List<ProductBasVo> queryProductBasList(@Param("query") String query,
|
||||
@Param("pkCountry") Integer pkCountry,
|
||||
@Param("pkCubasdoc") Integer pkCubasdoc,
|
||||
@Param("systemType") Integer systemType);
|
||||
|
||||
/**
|
||||
* 根据产品编号查询
|
||||
*
|
||||
* @param productCode
|
||||
* @return
|
||||
*/
|
||||
ProductBasVo findByProductCode(@Param("productCode") String productCode);
|
||||
|
||||
/*
|
||||
* @description: 根据规格、主键查询产品
|
||||
* @author: sui q
|
||||
* @date: 2023/11/27 15:52
|
||||
* @param: null null
|
||||
**/
|
||||
List<BdProductBasExt> queryProductExtBySpecsId(@Param("productSpecsList") List<BdProductSpecs> productSpecsList, @Param("pkCountry") Integer pkCountry);
|
||||
|
||||
/**
|
||||
* 查询全部已关联产品
|
||||
*
|
||||
* @param query
|
||||
* @return
|
||||
*/
|
||||
List<ProductBasVo> queryProductBasRelevanceList(@Param("query") String query, @Param("pkCountry") Integer pkCountry, @Param("systemType") Integer systemType);
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*
|
||||
* @param productBasParams
|
||||
* @return
|
||||
*/
|
||||
List<BdProductBasExt> selectByList(ProductBasParams productBasParams);
|
||||
|
||||
/**
|
||||
* 根据供应商查询产品基本信息
|
||||
*
|
||||
* @param pkSupplier
|
||||
* @return
|
||||
*/
|
||||
List<ProductBasVo> selectbypkSupplierList(@Param("pkSupplier") Integer pkSupplier);
|
||||
|
||||
|
||||
/**
|
||||
* 查询无供应商的产品基本信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<ProductBasVo> selectbyNotSupplierList();
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param query
|
||||
* @param pkCountry
|
||||
* @return
|
||||
*/
|
||||
List<ProductBasVo> queryProductBasAllList(@Param("query") String query, @Param("pkCountry") Integer pkCountry, @Param("systemType") Integer systemType);
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
package com.hzs.ground.product.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hzs.common.domain.sale.product.BdProductBasSpecs;
|
||||
import com.hzs.ground.product.vo.BdProductBasSpecsVo;
|
||||
import com.hzs.ground.product.vo.SpecsVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 规格明细表 Mapper 接口
|
||||
*/
|
||||
public interface BdProductBasSpecsMapper extends BaseMapper<BdProductBasSpecs> {
|
||||
|
||||
/**
|
||||
* 根据主键查询 产品规格信息
|
||||
*
|
||||
* @param pkProductBas
|
||||
* @return
|
||||
*/
|
||||
List<BdProductBasSpecsVo> queryListByProductBasCode(@Param("pkProductBas") Integer pkProductBas);
|
||||
|
||||
/**
|
||||
* 查询规格(规格类型条件)
|
||||
*
|
||||
* @param pkSpecsType
|
||||
* @return
|
||||
*/
|
||||
List<SpecsVo> findByPkSpecsType(@Param("pkSpecsType") Integer pkSpecsType);
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
package com.hzs.ground.product.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hzs.common.domain.scm.th.ThApprovalLog;
|
||||
|
||||
/**
|
||||
* 供应商产品日志 Mapper 接口
|
||||
*/
|
||||
public interface ThApprovalLogMapper extends BaseMapper<ThApprovalLog> {
|
||||
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
package com.hzs.ground.product.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hzs.common.domain.scm.th.ThProductExtend;
|
||||
|
||||
/**
|
||||
* thProduct商品拓展表 Mapper 接口
|
||||
*/
|
||||
public interface ThProductExtendMapper extends BaseMapper<ThProductExtend> {
|
||||
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
package com.hzs.ground.product.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hzs.common.domain.scm.th.ThProduct;
|
||||
import com.hzs.ground.product.param.ProductInfoParam;
|
||||
import com.hzs.ground.product.vo.ProductVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ThProductMapper extends BaseMapper<ThProduct> {
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
* @param productInfoParam
|
||||
* @return
|
||||
*/
|
||||
List<ProductVo> queryByList(ProductInfoParam productInfoParam);
|
||||
|
||||
/**
|
||||
* 根据id 查询详情
|
||||
* @param productId
|
||||
* @return
|
||||
*/
|
||||
ProductVo getProductInfoById(@Param("productId") Integer productId);
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
package com.hzs.ground.product.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hzs.common.domain.scm.th.ThProductSpecs;
|
||||
|
||||
/**
|
||||
* thPorduct规格明细表 Mapper 接口
|
||||
*
|
||||
*/
|
||||
public interface ThProductSpecsMapper extends BaseMapper<ThProductSpecs> {
|
||||
|
||||
}
|
|
@ -1,148 +0,0 @@
|
|||
package com.hzs.ground.product.param;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @BelongsProject: hzs_cloud
|
||||
* @BelongsPackage: com.hzs.scm.product.param
|
||||
* @Author: yh
|
||||
* @CreateTime: 2023-11-28 15:04
|
||||
* @Description: TODO
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class ProductBasParams implements Serializable {
|
||||
|
||||
/**
|
||||
* 商品主键
|
||||
*/
|
||||
private Integer pkId;
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
private String productCode;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
private String productName;
|
||||
|
||||
|
||||
/**
|
||||
* 规格分类
|
||||
*/
|
||||
private Integer pkClassify;
|
||||
|
||||
/**
|
||||
* 单位 来源于枚举:单位
|
||||
*/
|
||||
private Integer unit;
|
||||
|
||||
/**
|
||||
* 重量 以千克作为单位
|
||||
*/
|
||||
private BigDecimal weight;
|
||||
|
||||
/**
|
||||
* 长 以厘米作为单位
|
||||
*/
|
||||
private BigDecimal length;
|
||||
|
||||
/**
|
||||
* 宽 以厘米作为单位
|
||||
*/
|
||||
private BigDecimal width;
|
||||
|
||||
/**
|
||||
* 高 以厘米作为单位
|
||||
*/
|
||||
private BigDecimal height;
|
||||
|
||||
|
||||
/**
|
||||
* 封面图
|
||||
*/
|
||||
private String cover;
|
||||
|
||||
/**
|
||||
* 保质期
|
||||
*/
|
||||
private Integer shelfLife;
|
||||
|
||||
|
||||
/**
|
||||
* 产品规格类型列表
|
||||
*/
|
||||
private List<Integer> pkSpecsType;
|
||||
|
||||
/**
|
||||
* 排序值
|
||||
*/
|
||||
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 发货渠道 1 总仓发货 2 一件代发
|
||||
*/
|
||||
|
||||
private Integer shippingChannel;
|
||||
|
||||
|
||||
/**
|
||||
* 产品主键id列表
|
||||
*/
|
||||
List<Integer> productIds;
|
||||
|
||||
/**
|
||||
* 海陆空运输方式筛选
|
||||
*/
|
||||
private Integer shippingType;
|
||||
|
||||
/**
|
||||
* 开始创建时间
|
||||
*/
|
||||
private Date startCreateDate;
|
||||
/**
|
||||
* 结束创建时间
|
||||
*/
|
||||
private Date endCreateDate;
|
||||
|
||||
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
List<String> productCodes;
|
||||
|
||||
private Integer pkCountry;
|
||||
|
||||
/**
|
||||
* 复购类型
|
||||
*/
|
||||
private Integer repurchaseType;
|
||||
|
||||
/**
|
||||
* 是否存在规格
|
||||
*/
|
||||
private Integer isExistSpecs;
|
||||
|
||||
/**
|
||||
* 查询产品信息
|
||||
*/
|
||||
private String queryInfo;
|
||||
|
||||
/**
|
||||
* 产品基础档案主键
|
||||
*/
|
||||
private Integer pkProductBas;
|
||||
|
||||
/**
|
||||
* 系统类型(2=新零售,3=美业)
|
||||
*/
|
||||
private Integer systemType;
|
||||
|
||||
}
|
|
@ -1,268 +0,0 @@
|
|||
package com.hzs.ground.product.param;/**
|
||||
* @Description:
|
||||
* @Author: yuhui
|
||||
* @Time: 2024/3/25 11:12
|
||||
* @Classname: ProductInfoParam
|
||||
* @PackageName: com.hzs.scm.product.param
|
||||
*/
|
||||
|
||||
import com.hzs.system.sys.dto.LoginUser;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*@BelongsProject: hzs_cloud
|
||||
*@BelongsPackage: com.hzs.scm.product.param
|
||||
*@Author: yh
|
||||
*@CreateTime: 2024-03-25 11:12
|
||||
*@Description: TODO
|
||||
*@Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ProductInfoParam implements Serializable {
|
||||
/**
|
||||
* 登录用户信息
|
||||
*/
|
||||
private LoginUser loginUser;
|
||||
/**
|
||||
* 商品主键
|
||||
*/
|
||||
private Integer pkId;
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
private String productCode;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 翻译key
|
||||
*/
|
||||
private Integer transactionKey;
|
||||
|
||||
/**
|
||||
* 规格分类
|
||||
*/
|
||||
private Integer pkClassify;
|
||||
|
||||
/**
|
||||
* 单位 来源于枚举:单位
|
||||
*/
|
||||
private Integer unit;
|
||||
|
||||
/**
|
||||
* 重量 以千克作为单位
|
||||
*/
|
||||
private BigDecimal weight;
|
||||
|
||||
/**
|
||||
* 长 以厘米作为单位
|
||||
*/
|
||||
private BigDecimal length;
|
||||
|
||||
/**
|
||||
* 宽 以厘米作为单位
|
||||
*/
|
||||
private BigDecimal width;
|
||||
|
||||
/**
|
||||
* 高 以厘米作为单位
|
||||
*/
|
||||
private BigDecimal height;
|
||||
|
||||
/**
|
||||
* 邮费重量 以千克作为单位
|
||||
*/
|
||||
private BigDecimal postageWeight;
|
||||
|
||||
/**
|
||||
* 建议零售价
|
||||
*/
|
||||
private BigDecimal retailPrice;
|
||||
|
||||
/**
|
||||
* 启用状态 来源于枚举:是否,默认是
|
||||
*/
|
||||
private Integer enableState;
|
||||
|
||||
/**
|
||||
* 封面图
|
||||
*/
|
||||
private String cover;
|
||||
|
||||
/**
|
||||
* 保质期
|
||||
*/
|
||||
private Integer shelfLife;
|
||||
|
||||
/**
|
||||
* 是否冷链
|
||||
*/
|
||||
private Integer isFresh;
|
||||
|
||||
|
||||
/**
|
||||
* 是否提货 来源于枚举:是否,默认否
|
||||
*/
|
||||
private Integer isPickUp;
|
||||
|
||||
/**
|
||||
* 是否抽奖奖品 来源于枚举:是否,默认否
|
||||
*/
|
||||
private Integer isPrize;
|
||||
|
||||
/**
|
||||
* 是否条码管理 来源于枚举:是否,默认否
|
||||
*/
|
||||
private Integer isBarCode;
|
||||
|
||||
/**
|
||||
* 能否合并发货 来源于枚举:是否,默认是
|
||||
*/
|
||||
private Integer isMerge;
|
||||
|
||||
/**
|
||||
* 来源于枚举:是否,默认是
|
||||
*/
|
||||
private Integer isGift;
|
||||
|
||||
/**
|
||||
* 库存预警数量
|
||||
*/
|
||||
// private Long warningQuantity;
|
||||
|
||||
/**
|
||||
* 是否陆运
|
||||
*/
|
||||
private Integer isLandTrans;
|
||||
|
||||
/**
|
||||
* 是否空运
|
||||
*/
|
||||
private Integer isAirTrans;
|
||||
|
||||
/**
|
||||
* 是否海运
|
||||
*/
|
||||
private Integer isOceanTrans;
|
||||
|
||||
/**
|
||||
* 产品属性 枚举:商品属性,1=实物商品、2=虚拟商品
|
||||
*/
|
||||
private Integer productAttr;
|
||||
|
||||
/**
|
||||
* 产品规格类型列表
|
||||
*/
|
||||
private List<Integer> pkSpecsType;
|
||||
|
||||
/**
|
||||
* 排序值
|
||||
*/
|
||||
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 发货渠道 1 总仓发货 2 一件代发
|
||||
*/
|
||||
private Integer shippingChannel;
|
||||
|
||||
/**
|
||||
* 产品主键id列表
|
||||
*/
|
||||
List<Integer> productIds;
|
||||
|
||||
/**
|
||||
* 海陆空运输方式筛选
|
||||
*/
|
||||
private Integer shippingType;
|
||||
|
||||
/**
|
||||
* 开始创建时间
|
||||
*/
|
||||
private Date startCreateDate;
|
||||
/**
|
||||
* 结束创建时间
|
||||
*/
|
||||
private Date endCreateDate;
|
||||
|
||||
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
List<String> productCodes;
|
||||
|
||||
private Integer pkCountry;
|
||||
|
||||
/**
|
||||
* 复购类型
|
||||
*/
|
||||
|
||||
private Integer repurchaseType;
|
||||
|
||||
/**
|
||||
* 是否存在规格
|
||||
*/
|
||||
private Integer isExistSpecs;
|
||||
|
||||
/**
|
||||
* 查询产品信息
|
||||
*/
|
||||
private String queryInfo;
|
||||
|
||||
/**
|
||||
* 产品基础档案主键
|
||||
*/
|
||||
private Integer pkProductBas;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private Integer quantity;
|
||||
|
||||
/**
|
||||
* 供货价格
|
||||
*/
|
||||
|
||||
private BigDecimal supplyPrice;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 供货数量
|
||||
*/
|
||||
|
||||
private Integer supplyQuantity;
|
||||
|
||||
/**
|
||||
* 销售模式
|
||||
*/
|
||||
|
||||
private Integer saleModel;
|
||||
|
||||
/**
|
||||
* 供应商
|
||||
*/
|
||||
private Integer pkSupplier;
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
private String supplierName;
|
||||
|
||||
|
||||
/**
|
||||
* 供应商主键
|
||||
*/
|
||||
private Integer pkCubasdoc;
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
package com.hzs.ground.product.provider;/**
|
||||
* @Description:
|
||||
* @Author: yuhui
|
||||
* @Time: 2023/11/23 18:27
|
||||
* @Classname: IBdProductBasSpecsServiceProvider
|
||||
* @PackageName: com.hzs.scm.product.provider
|
||||
*/
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.domain.sale.product.BdProductBasSpecs;
|
||||
import com.hzs.ground.product.service.IBdProductBasSpecsService;
|
||||
import com.hzs.scm.product.IBdProductBasSpecsServiceApi;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*@BelongsProject: hzs_cloud
|
||||
*@BelongsPackage: com.hzs.scm.product.provider
|
||||
*@Author: yh
|
||||
*@CreateTime: 2023-11-23 18:27
|
||||
*@Description: TODO
|
||||
*@Version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@DubboService
|
||||
public class IBdProductBasSpecsServiceProvider implements IBdProductBasSpecsServiceApi {
|
||||
|
||||
@Autowired
|
||||
private IBdProductBasSpecsService productBasSpecsService;
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param productBasSpecsList
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public R<Boolean> saveAll(List<BdProductBasSpecs> productBasSpecsList) {
|
||||
return R.ok(productBasSpecsService.saveBatch(productBasSpecsList));
|
||||
}
|
||||
/**
|
||||
* 删除 (根据pkProductBas删除)
|
||||
* @param pkProductBasList
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public R<Boolean> removeByPkProductBasList(List<Integer> pkProductBasList) {
|
||||
return R.ok(productBasSpecsService.remove(new QueryWrapper<BdProductBasSpecs>().in("PK_PRODUCT_BAS",pkProductBasList)));
|
||||
}
|
||||
}
|
|
@ -1,82 +0,0 @@
|
|||
package com.hzs.ground.product.provider;/**
|
||||
* @Description:
|
||||
* @Author: yuhui
|
||||
* @Time: 2023/11/23 18:00
|
||||
* @Classname: IProductBasServiceProvider
|
||||
* @PackageName: com.hzs.scm.product.provider
|
||||
*/
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.hzs.common.core.constant.CacheConstants;
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.core.service.RedisService;
|
||||
import com.hzs.common.domain.sale.product.BdProductBas;
|
||||
import com.hzs.ground.product.service.IBdProductBasService;
|
||||
import com.hzs.scm.product.IProductBasServiceApi;
|
||||
import com.hzs.scm.product.dto.ProductBasDTO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
*@BelongsProject: hzs_cloud
|
||||
*@BelongsPackage: com.hzs.scm.product.provider
|
||||
*@Author: yh
|
||||
*@CreateTime: 2023-11-23 18:00
|
||||
*@Description: TODO
|
||||
*@Version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@DubboService
|
||||
public class IProductBasServiceProvider implements IProductBasServiceApi {
|
||||
|
||||
@Autowired
|
||||
private IBdProductBasService productBasService;
|
||||
@Autowired
|
||||
private RedisService redisService;
|
||||
|
||||
/**
|
||||
* 批量新增
|
||||
* @param productBas
|
||||
* @return
|
||||
*/
|
||||
public R<BdProductBas> save(BdProductBas productBas){
|
||||
boolean isSave = productBasService.save(productBas);
|
||||
if (isSave){
|
||||
return R.ok(productBas);
|
||||
}else {
|
||||
return R.fail();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 根据id 修改
|
||||
*/
|
||||
@Override
|
||||
public R<Boolean> updateById(BdProductBas productBas) {
|
||||
productBasService.updateById(productBas);
|
||||
redisService.deleteObject(CacheConstants.BD_PRODUCT_BAS + productBas.getPkId());
|
||||
redisService.deleteObject(CacheConstants.BD_PRODUCT_BAS + productBas.getProductCode());
|
||||
return R.ok();
|
||||
}
|
||||
/**
|
||||
* 根据id 查询
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public R<ProductBasDTO> getProductBasById(Integer pkId) {
|
||||
BdProductBas productBas = productBasService.getProductBasById(pkId);
|
||||
return R.ok(BeanUtil.copyProperties(productBas, ProductBasDTO.class));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据产品编号 查询
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public R<ProductBasDTO> getProductBasByProductCode(String productCode) {
|
||||
BdProductBas productBas = productBasService.getProductBasByProductCode(productCode);
|
||||
return R.ok(BeanUtil.copyProperties(productBas, ProductBasDTO.class));
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,130 +0,0 @@
|
|||
package com.hzs.ground.product.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.domain.sale.product.BdProductBas;
|
||||
import com.hzs.common.domain.sale.product.BdProductSpecs;
|
||||
import com.hzs.common.domain.sale.product.ext.BdProductBasExt;
|
||||
import com.hzs.ground.product.param.ProductBasParams;
|
||||
import com.hzs.ground.product.vo.ProductBasVo;
|
||||
import com.hzs.ground.product.vo.ProductInfoVo;
|
||||
import com.hzs.system.sys.dto.LoginUser;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 产品基本设置 服务类
|
||||
*/
|
||||
public interface IBdProductBasService extends IService<BdProductBas> {
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param productBasId
|
||||
* @return
|
||||
*/
|
||||
BdProductBas getProductBasById(Integer productBasId);
|
||||
|
||||
/**
|
||||
* 根据产品编号 查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
BdProductBas getProductBasByProductCode(String productCode);
|
||||
|
||||
/*
|
||||
* 查询产品id,顺道查询出国家对应的产品id
|
||||
**/
|
||||
List<BdProductBasExt> queryProductBasByIds(Set<Integer> idList, Integer pkCountry);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param productBasParams
|
||||
* @return
|
||||
*/
|
||||
String saveProductBas(ProductBasParams productBasParams, LoginUser loginUser);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param productBasParams
|
||||
* @param loginUser
|
||||
*/
|
||||
void updateProductBas(ProductBasParams productBasParams, LoginUser loginUser);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param productBasId
|
||||
*/
|
||||
void removeProductBas(Integer productBasId);
|
||||
|
||||
/**
|
||||
* 根据产品编号查询信息
|
||||
*
|
||||
* @param productCode
|
||||
*/
|
||||
ProductInfoVo getByProductCodeInfo(String productCode);
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*
|
||||
* @param query
|
||||
* @return
|
||||
*/
|
||||
List<ProductBasVo> queryProductBasList(String query, Integer pkCountry, Integer pkCubasdoc, Integer systemType);
|
||||
|
||||
/**
|
||||
* 根据产品编号查询
|
||||
*
|
||||
* @param productCode
|
||||
* @return
|
||||
*/
|
||||
ProductBasVo findByProductCode(String productCode);
|
||||
|
||||
/**
|
||||
* 根据规格、主键查询产品
|
||||
*/
|
||||
List<BdProductBasExt> queryProductExtBySpecsId(List<BdProductSpecs> productSpecsList, Integer pkCountry);
|
||||
|
||||
/**
|
||||
* 查询全部已关联查询
|
||||
*
|
||||
* @param query
|
||||
* @return
|
||||
*/
|
||||
List<ProductBasVo> queryProductBasRelevanceList(String query, Integer pkCountry, Integer systemType);
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*
|
||||
* @param productBasParams
|
||||
* @return
|
||||
*/
|
||||
List<BdProductBasExt> selectByList(ProductBasParams productBasParams);
|
||||
|
||||
/**
|
||||
* 根据供应商查询产品基本信息
|
||||
*
|
||||
* @param pkSupplier
|
||||
* @return
|
||||
*/
|
||||
List<ProductBasVo> selectbypkSupplierList(Integer pkSupplier);
|
||||
|
||||
/**
|
||||
* 查询无供应商的产品基本信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<ProductBasVo> selectbyNotSupplierList();
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param query
|
||||
* @param pkCountry
|
||||
* @return
|
||||
*/
|
||||
List<ProductBasVo> queryProductBasAllList(String query, Integer pkCountry, Integer systemType);
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
package com.hzs.ground.product.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.domain.sale.product.BdProductBasSpecs;
|
||||
import com.hzs.ground.product.vo.BdProductBasSpecsVo;
|
||||
import com.hzs.ground.product.vo.SpecsVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 规格明细表 服务类
|
||||
*/
|
||||
public interface IBdProductBasSpecsService extends IService<BdProductBasSpecs> {
|
||||
|
||||
/**
|
||||
* 根据主键查询 产品规格信息
|
||||
*
|
||||
* @param pkProductBas
|
||||
* @return
|
||||
*/
|
||||
List<BdProductBasSpecsVo> queryListByProductBasCode(Integer pkProductBas);
|
||||
|
||||
/**
|
||||
* 查询规格(规格类型条件)
|
||||
*
|
||||
* @param pkSpecsType
|
||||
* @return
|
||||
*/
|
||||
List<SpecsVo> findByPkSpecsType(Integer pkSpecsType);
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
package com.hzs.ground.product.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.domain.scm.th.ThApprovalLog;
|
||||
|
||||
/**
|
||||
* 供应商产品日志 服务类
|
||||
*/
|
||||
public interface IThApprovalLogService extends IService<ThApprovalLog> {
|
||||
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
package com.hzs.ground.product.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.domain.scm.th.ThProductExtend;
|
||||
|
||||
/**
|
||||
* thProduct商品拓展表 服务类
|
||||
*/
|
||||
public interface IThProductExtendService extends IService<ThProductExtend> {
|
||||
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
package com.hzs.ground.product.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.domain.scm.th.ThProduct;
|
||||
import com.hzs.ground.product.param.ProductInfoParam;
|
||||
import com.hzs.ground.product.vo.ProductVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务类
|
||||
*/
|
||||
public interface IThProductService extends IService<ThProduct> {
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*
|
||||
* @param productInfoParam
|
||||
* @return
|
||||
*/
|
||||
List<ProductVo> queryByList(ProductInfoParam productInfoParam);
|
||||
|
||||
/**
|
||||
* 根据id 查询详情
|
||||
*
|
||||
* @param productId
|
||||
* @return
|
||||
*/
|
||||
ProductVo getProductInfoById(Integer productId);
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
package com.hzs.ground.product.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.domain.scm.th.ThProductSpecs;
|
||||
|
||||
/**
|
||||
* thPorduct规格明细表 服务类
|
||||
*/
|
||||
public interface IThProductSpecsService extends IService<ThProductSpecs> {
|
||||
|
||||
}
|
|
@ -1,190 +0,0 @@
|
|||
package com.hzs.ground.product.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.core.constant.CacheConstants;
|
||||
import com.hzs.common.core.enums.EDelFlag;
|
||||
import com.hzs.common.core.service.RedisService;
|
||||
import com.hzs.common.core.utils.DateUtils;
|
||||
import com.hzs.common.domain.sale.product.BdProductBas;
|
||||
import com.hzs.common.domain.sale.product.BdProductBasSpecs;
|
||||
import com.hzs.common.domain.sale.product.BdProductSpecs;
|
||||
import com.hzs.common.domain.sale.product.ext.BdProductBasExt;
|
||||
import com.hzs.ground.product.mapper.BdProductBasMapper;
|
||||
import com.hzs.ground.product.param.ProductBasParams;
|
||||
import com.hzs.ground.product.service.IBdProductBasService;
|
||||
import com.hzs.ground.product.service.IBdProductBasSpecsService;
|
||||
import com.hzs.ground.product.vo.BdProductBasSpecsVo;
|
||||
import com.hzs.ground.product.vo.ProductBasVo;
|
||||
import com.hzs.ground.product.vo.ProductInfoVo;
|
||||
import com.hzs.ground.product.vo.SpecsVo;
|
||||
import com.hzs.system.sys.dto.LoginUser;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 产品基本设置 服务实现类
|
||||
*/
|
||||
@Service
|
||||
public class BdProductBasServiceImpl extends ServiceImpl<BdProductBasMapper, BdProductBas> implements IBdProductBasService {
|
||||
|
||||
@Autowired
|
||||
private IBdProductBasService productBasService;
|
||||
@Autowired
|
||||
private IBdProductBasSpecsService productBasSpecsService;
|
||||
@Autowired
|
||||
private RedisService redisService;
|
||||
|
||||
@Override
|
||||
public BdProductBas getProductBasById(Integer productBasId) {
|
||||
BdProductBas bdProductBas = redisService.getCacheObject(CacheConstants.BD_PRODUCT_BAS + productBasId);
|
||||
if (bdProductBas == null) {
|
||||
bdProductBas = baseMapper.selectById(productBasId);
|
||||
if (bdProductBas != null) {
|
||||
redisService.setCacheObject(CacheConstants.BD_PRODUCT_BAS + bdProductBas.getPkId(), bdProductBas);
|
||||
}
|
||||
}
|
||||
return bdProductBas;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BdProductBas getProductBasByProductCode(String productCode) {
|
||||
BdProductBas bdProductBas = redisService.getCacheObject(CacheConstants.BD_PRODUCT_BAS + productCode);
|
||||
if (bdProductBas == null) {
|
||||
bdProductBas = baseMapper.selectOne(new LambdaQueryWrapper<BdProductBas>().eq(BdProductBas::getProductCode, productCode));
|
||||
if (bdProductBas != null) {
|
||||
redisService.setCacheObject(CacheConstants.BD_PRODUCT_BAS + productCode, bdProductBas);
|
||||
}
|
||||
}
|
||||
return bdProductBas;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BdProductBasExt> queryProductBasByIds(Set<Integer> idList, Integer pkCountry) {
|
||||
return baseMapper.queryProductBasByIds(idList, pkCountry);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String saveProductBas(ProductBasParams productBasParams, LoginUser loginUser) {
|
||||
String productCode = productBasParams.getProductCode();
|
||||
BdProductBas productBas = BeanUtil.copyProperties(productBasParams, BdProductBas.class);
|
||||
productBas.setProductCode(productCode);
|
||||
productBas.setPkCreator(loginUser.getUserId());
|
||||
productBas.setCreationTime(DateUtils.currentDateTime());
|
||||
productBas.setPkCreator(loginUser.getUserId());
|
||||
productBas.setPkCountry(loginUser.getDataCountry());
|
||||
// 删除状态 审核完毕 修改为未删除状态
|
||||
productBas.setDelFlag(EDelFlag.UN_DELETE.getValue());
|
||||
productBasService.save(productBas);
|
||||
// 生成规格明细
|
||||
if (productBasParams.getPkSpecsType() != null) {
|
||||
for (Integer id : productBasParams.getPkSpecsType()) {
|
||||
BdProductBasSpecs productBasSpecs = new BdProductBasSpecs();
|
||||
productBasSpecs.setPkProductBas(productBas.getPkId());
|
||||
productBasSpecs.setPkSpecsType(id);
|
||||
productBasSpecs.setPkCountry(loginUser.getDataCountry());
|
||||
productBasSpecs.setPkCreator(loginUser.getUserId());
|
||||
productBasSpecs.setCreationTime(DateUtils.currentDateTime());
|
||||
productBasSpecsService.save(productBasSpecs);
|
||||
}
|
||||
}
|
||||
return productCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateProductBas(ProductBasParams productBasParams, LoginUser loginUser) {
|
||||
BdProductBas productBas = BeanUtil.copyProperties(productBasParams, BdProductBas.class);
|
||||
productBas.setPkId(productBasParams.getPkId());
|
||||
productBas.setPkModified(loginUser.getUserId());
|
||||
productBas.setModifiedTime(new Date());
|
||||
productBasService.updateById(productBas);
|
||||
// 生成规格明细
|
||||
if (productBasParams.getPkSpecsType() != null) {
|
||||
LambdaQueryWrapper<BdProductBasSpecs> removeWrapper = new LambdaQueryWrapper<>();
|
||||
removeWrapper.eq(BdProductBasSpecs::getPkProductBas, productBasParams.getPkId());
|
||||
productBasSpecsService.remove(removeWrapper);
|
||||
for (Integer id : productBasParams.getPkSpecsType()) {
|
||||
BdProductBasSpecs productBasSpecs = new BdProductBasSpecs();
|
||||
productBasSpecs.setPkProductBas(productBasParams.getPkId());
|
||||
productBasSpecs.setPkSpecsType(id);
|
||||
productBasSpecs.setPkCountry(loginUser.getDataCountry());
|
||||
productBasSpecs.setPkCreator(loginUser.getUserId());
|
||||
productBasSpecs.setCreationTime(new Date());
|
||||
productBasSpecsService.save(productBasSpecs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeProductBas(Integer productBasId) {
|
||||
productBasService.removeById(productBasId);
|
||||
productBasSpecsService.remove(new LambdaQueryWrapper<BdProductBasSpecs>().eq(BdProductBasSpecs::getPkProductBas, productBasId));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductInfoVo getByProductCodeInfo(String productCode) {
|
||||
ProductBasVo productBas = productBasService.findByProductCode(productCode);
|
||||
ProductInfoVo productInfoVo = new ProductInfoVo();
|
||||
if (productBas != null) {
|
||||
List<BdProductBasSpecsVo> bdProductBasSpecsVos = productBasSpecsService.queryListByProductBasCode(productBas.getPkId());
|
||||
for (BdProductBasSpecsVo bdProductBasSpecsVo : bdProductBasSpecsVos) {
|
||||
List<SpecsVo> specsList = productBasSpecsService.findByPkSpecsType(bdProductBasSpecsVo.getPkSpecsType());
|
||||
bdProductBasSpecsVo.setSpecsList(specsList);
|
||||
}
|
||||
productInfoVo.setProductBasSpecsList(bdProductBasSpecsVos);
|
||||
productInfoVo.setPkId(productBas.getPkId());
|
||||
productInfoVo.setProductCode(productBas.getProductCode());
|
||||
productInfoVo.setProductName(productBas.getProductName());
|
||||
// 单位
|
||||
productInfoVo.setUnit(productBas.getUnit());
|
||||
productInfoVo.setUnitStr(productBas.getUnitStr());
|
||||
}
|
||||
return productInfoVo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductBasVo> queryProductBasList(String query, Integer pkCountry, Integer pkCubasdoc, Integer systemType) {
|
||||
return baseMapper.queryProductBasList(query, pkCountry, pkCubasdoc, systemType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductBasVo findByProductCode(String productCode) {
|
||||
return baseMapper.findByProductCode(productCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BdProductBasExt> queryProductExtBySpecsId(List<BdProductSpecs> productSpecsList, Integer pkCountry) {
|
||||
return baseMapper.queryProductExtBySpecsId(productSpecsList, pkCountry);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductBasVo> queryProductBasRelevanceList(String query, Integer pkCountry, Integer systemType) {
|
||||
return baseMapper.queryProductBasRelevanceList(query, pkCountry, systemType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BdProductBasExt> selectByList(ProductBasParams productBasParams) {
|
||||
return baseMapper.selectByList(productBasParams);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductBasVo> selectbypkSupplierList(Integer pkSupplier) {
|
||||
return baseMapper.selectbypkSupplierList(pkSupplier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductBasVo> selectbyNotSupplierList() {
|
||||
return baseMapper.selectbyNotSupplierList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductBasVo> queryProductBasAllList(String query, Integer pkCountry, Integer systemType) {
|
||||
return baseMapper.queryProductBasAllList(query, pkCountry, systemType);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
package com.hzs.ground.product.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.domain.sale.product.BdProductBasSpecs;
|
||||
import com.hzs.ground.product.mapper.BdProductBasSpecsMapper;
|
||||
import com.hzs.ground.product.service.IBdProductBasSpecsService;
|
||||
import com.hzs.ground.product.vo.BdProductBasSpecsVo;
|
||||
import com.hzs.ground.product.vo.SpecsVo;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 规格明细表 服务实现类
|
||||
*/
|
||||
@Service
|
||||
public class BdProductBasSpecsServiceImpl extends ServiceImpl<BdProductBasSpecsMapper, BdProductBasSpecs> implements IBdProductBasSpecsService {
|
||||
|
||||
|
||||
@Override
|
||||
public List<BdProductBasSpecsVo> queryListByProductBasCode(Integer pkProductBas) {
|
||||
return baseMapper.queryListByProductBasCode(pkProductBas);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SpecsVo> findByPkSpecsType(Integer pkSpecsType) {
|
||||
return baseMapper.findByPkSpecsType(pkSpecsType);
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
package com.hzs.ground.product.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.domain.scm.th.ThApprovalLog;
|
||||
import com.hzs.ground.product.mapper.ThApprovalLogMapper;
|
||||
import com.hzs.ground.product.service.IThApprovalLogService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 供应商产品日志 服务实现类
|
||||
*/
|
||||
@Service
|
||||
public class ThApprovalLogServiceImpl extends ServiceImpl<ThApprovalLogMapper, ThApprovalLog> implements IThApprovalLogService {
|
||||
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
package com.hzs.ground.product.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.domain.scm.th.ThProductExtend;
|
||||
import com.hzs.ground.product.mapper.ThProductExtendMapper;
|
||||
import com.hzs.ground.product.service.IThProductExtendService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* thProduct商品拓展表 服务实现类
|
||||
*/
|
||||
@Service
|
||||
public class ThProductExtendServiceImpl extends ServiceImpl<ThProductExtendMapper, ThProductExtend> implements IThProductExtendService {
|
||||
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
package com.hzs.ground.product.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.domain.scm.th.ThProduct;
|
||||
import com.hzs.ground.product.mapper.ThProductMapper;
|
||||
import com.hzs.ground.product.param.ProductInfoParam;
|
||||
|
||||
import com.hzs.ground.product.service.*;
|
||||
import com.hzs.ground.product.vo.ProductVo;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务实现类
|
||||
*/
|
||||
@Service
|
||||
public class ThProductServiceImpl extends ServiceImpl<ThProductMapper, ThProduct> implements IThProductService {
|
||||
|
||||
@Override
|
||||
public List<ProductVo> queryByList(ProductInfoParam productInfoParam) {
|
||||
return baseMapper.queryByList(productInfoParam);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductVo getProductInfoById(Integer productId) {
|
||||
return baseMapper.getProductInfoById(productId);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
package com.hzs.ground.product.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.domain.scm.th.ThProductSpecs;
|
||||
import com.hzs.ground.product.mapper.ThProductSpecsMapper;
|
||||
import com.hzs.ground.product.service.IThProductSpecsService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* thPorduct规格明细表 服务实现类
|
||||
*/
|
||||
@Service
|
||||
public class ThProductSpecsServiceImpl extends ServiceImpl<ThProductSpecsMapper, ThProductSpecs> implements IThProductSpecsService {
|
||||
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
package com.hzs.ground.product.vo;/**
|
||||
* @Description:
|
||||
* @Author: yuhui
|
||||
* @Time: 2023/12/5 17:18
|
||||
* @Classname: BdProductBasSpecsVo
|
||||
* @PackageName: com.hzs.scm.product.vo
|
||||
*/
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*@BelongsProject: hzs_cloud
|
||||
*@BelongsPackage: com.hzs.scm.product.vo
|
||||
*@Author: yh
|
||||
*@CreateTime: 2023-12-05 17:18
|
||||
*@Description: TODO
|
||||
*@Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class BdProductBasSpecsVo {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
|
||||
private Integer pkId;
|
||||
|
||||
/**
|
||||
* 产品主键
|
||||
*/
|
||||
|
||||
private Integer pkProductBas;
|
||||
|
||||
/**
|
||||
* 规格类型
|
||||
*/
|
||||
|
||||
private Integer pkSpecsType;
|
||||
|
||||
/**
|
||||
* 规格类型名称
|
||||
*/
|
||||
private String specsTypeName;
|
||||
|
||||
/**
|
||||
* 产品规格表
|
||||
*/
|
||||
private List<SpecsVo> specsList;
|
||||
}
|
|
@ -1,121 +0,0 @@
|
|||
package com.hzs.ground.product.vo;/**
|
||||
* @Description:
|
||||
* @Author: yuhui
|
||||
* @Time: 2023/11/29 11:33
|
||||
* @Classname: ProductBasVo
|
||||
* @PackageName: com.hzs.scm.product.vo
|
||||
*/
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.hzs.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*@BelongsProject: hzs_cloud
|
||||
*@BelongsPackage: com.hzs.scm.product.vo
|
||||
*@Author: yh
|
||||
*@CreateTime: 2023-11-29 11:33
|
||||
*@Description: TODO
|
||||
*@Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class ProductBasVo {
|
||||
|
||||
private Integer pkProduct;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
|
||||
private Integer pkId;
|
||||
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
|
||||
@Excel(name = "产品编号")
|
||||
private String productCode;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
|
||||
@Excel(name = "产品名称")
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 规格分类
|
||||
*/
|
||||
|
||||
private Integer pkClassify;
|
||||
|
||||
/**
|
||||
* 单位 来源于枚举:单位
|
||||
*/
|
||||
|
||||
private Integer unit;
|
||||
|
||||
/**
|
||||
* 单位 来源于枚举:单位
|
||||
*/
|
||||
|
||||
private String unitStr;
|
||||
|
||||
|
||||
/**
|
||||
* 长 以厘米作为单位
|
||||
*/
|
||||
|
||||
@Excel(name = "长(CM)")
|
||||
private BigDecimal length;
|
||||
|
||||
/**
|
||||
* 宽 以厘米作为单位
|
||||
*/
|
||||
|
||||
@Excel(name = "宽(CM)")
|
||||
private BigDecimal width;
|
||||
|
||||
/**
|
||||
* 高 以厘米作为单位
|
||||
*/
|
||||
|
||||
@Excel(name = "高(CM)")
|
||||
private BigDecimal height;
|
||||
|
||||
/**
|
||||
* 重量 以千克作为单位
|
||||
*/
|
||||
|
||||
@Excel(name = "重量(KG)")
|
||||
private BigDecimal weight;
|
||||
|
||||
/**
|
||||
* 封面图
|
||||
*/
|
||||
|
||||
private String cover;
|
||||
|
||||
/**
|
||||
* 保质期
|
||||
*/
|
||||
|
||||
@Excel(name = "保质期(天)")
|
||||
private Integer shelfLife;
|
||||
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Excel(name = "创建时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date creationTime;
|
||||
|
||||
/**
|
||||
* 供应商主键
|
||||
*/
|
||||
private Integer pkCubasdoc;
|
||||
}
|
|
@ -1,56 +0,0 @@
|
|||
package com.hzs.ground.product.vo;/**
|
||||
* @Description:
|
||||
* @Author: yuhui
|
||||
* @Time: 2023/12/5 17:13
|
||||
* @Classname: ProductInfoVo
|
||||
* @PackageName: com.hzs.scm.product.vo
|
||||
*/
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*@BelongsProject: hzs_cloud
|
||||
*@BelongsPackage: com.hzs.scm.product.vo
|
||||
*@Author: yh
|
||||
*@CreateTime: 2023-12-05 17:13
|
||||
*@Description: TODO
|
||||
*@Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class ProductInfoVo {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
|
||||
private Integer pkId;
|
||||
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
|
||||
private String productCode;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
|
||||
private String productName;
|
||||
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private Integer unit;
|
||||
/**
|
||||
* 单位字符
|
||||
*/
|
||||
private String unitStr;
|
||||
|
||||
/**
|
||||
* 产品规格明细
|
||||
*/
|
||||
private List<BdProductBasSpecsVo> productBasSpecsList;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue