20 changed files with 847 additions and 76 deletions
@ -0,0 +1,71 @@ |
|||||
|
package com.yxt.supervise.customer.api.gdinstoragegd; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/3/29 13:34 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "入库数据", description = "入库数据") |
||||
|
@TableName("gd_instorage_gd") |
||||
|
public class GdInstorageGd extends BaseEntity { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@ApiModelProperty("企业组织机构代码证") |
||||
|
private String cola0; // 企业组织机构代码证
|
||||
|
@ApiModelProperty("仓库/门店编号") |
||||
|
private String colb1; // 仓库/门店编号
|
||||
|
@ApiModelProperty("仓库/门店名称") |
||||
|
private String colc2; // 仓库/门店名称
|
||||
|
@ApiModelProperty("入库时间") |
||||
|
private String cold3; // 入库时间
|
||||
|
@ApiModelProperty("供应商编号") |
||||
|
private String colex; // 供应商编号
|
||||
|
@ApiModelProperty("供应商名称") |
||||
|
private String cole4; // 供应商名称
|
||||
|
@ApiModelProperty("单据号") |
||||
|
private String colf5; // 单据号
|
||||
|
@ApiModelProperty("单据类型") |
||||
|
private String colg6; // 单据类型
|
||||
|
@ApiModelProperty("货号") |
||||
|
private String colh7; // 货号
|
||||
|
@ApiModelProperty("商品名称") |
||||
|
private String coli8; // 商品名称
|
||||
|
@ApiModelProperty("商品生产日期") |
||||
|
private String colj9; // 商品生产日期
|
||||
|
@ApiModelProperty("商品保质期") |
||||
|
private String colk10; // 商品保质期
|
||||
|
@ApiModelProperty("商品规格") |
||||
|
private String coll11; // 商品规格
|
||||
|
@ApiModelProperty("类别编号") |
||||
|
private String colm12; // 类别编号
|
||||
|
@ApiModelProperty("类别名称") |
||||
|
private String coln13; // 类别名称
|
||||
|
@ApiModelProperty("一级类别名称") |
||||
|
private String colo14; // 一级类别名称
|
||||
|
@ApiModelProperty("二级类别名称") |
||||
|
private String colp15; // 二级类别名称
|
||||
|
@ApiModelProperty("入库金额") |
||||
|
private String colq16; // 入库金额
|
||||
|
@ApiModelProperty("入库数量") |
||||
|
private String colr17; // 入库数量
|
||||
|
@ApiModelProperty("成本金额") |
||||
|
private String cols18; // 成本金额
|
||||
|
@ApiModelProperty("成本税额") |
||||
|
private String colt19; // 成本税额
|
||||
|
@ApiModelProperty("不含税成本") |
||||
|
private String colu20; // 不含税成本
|
||||
|
@ApiModelProperty("进项税率") |
||||
|
private String colv21; // 进项税率
|
||||
|
@ApiModelProperty("单据日期") |
||||
|
private String orderDate; // 单据日期
|
||||
|
@ApiModelProperty("供货商编码统一") |
||||
|
private String supplierCodeUnified; // 供货商编码统一
|
||||
|
@ApiModelProperty("入库定单号") |
||||
|
private String inOrderNo; // 入库定单号
|
||||
|
} |
@ -0,0 +1,67 @@ |
|||||
|
package com.yxt.supervise.customer.api.gdinstoragegd; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/3/29 13:40 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "入库数据 视图数据详情", description = "入库数据 视图数据详情") |
||||
|
public class GdInstorageGdDetailsVo implements Vo { |
||||
|
@ApiModelProperty("企业组织机构代码证") |
||||
|
private String cola0; // 企业组织机构代码证
|
||||
|
@ApiModelProperty("仓库/门店编号") |
||||
|
private String colb1; // 仓库/门店编号
|
||||
|
@ApiModelProperty("仓库/门店名称") |
||||
|
private String colc2; // 仓库/门店名称
|
||||
|
@ApiModelProperty("入库时间") |
||||
|
private String cold3; // 入库时间
|
||||
|
@ApiModelProperty("供应商编号") |
||||
|
private String colex; // 供应商编号
|
||||
|
@ApiModelProperty("供应商名称") |
||||
|
private String cole4; // 供应商名称
|
||||
|
@ApiModelProperty("单据号") |
||||
|
private String colf5; // 单据号
|
||||
|
@ApiModelProperty("单据类型") |
||||
|
private String colg6; // 单据类型
|
||||
|
@ApiModelProperty("货号") |
||||
|
private String colh7; // 货号
|
||||
|
@ApiModelProperty("商品名称") |
||||
|
private String coli8; // 商品名称
|
||||
|
@ApiModelProperty("商品生产日期") |
||||
|
private String colj9; // 商品生产日期
|
||||
|
@ApiModelProperty("商品保质期") |
||||
|
private String colk10; // 商品保质期
|
||||
|
@ApiModelProperty("商品规格") |
||||
|
private String coll11; // 商品规格
|
||||
|
@ApiModelProperty("类别编号") |
||||
|
private String colm12; // 类别编号
|
||||
|
@ApiModelProperty("类别名称") |
||||
|
private String coln13; // 类别名称
|
||||
|
@ApiModelProperty("一级类别名称") |
||||
|
private String colo14; // 一级类别名称
|
||||
|
@ApiModelProperty("二级类别名称") |
||||
|
private String colp15; // 二级类别名称
|
||||
|
@ApiModelProperty("入库金额") |
||||
|
private String colq16; // 入库金额
|
||||
|
@ApiModelProperty("入库数量") |
||||
|
private String colr17; // 入库数量
|
||||
|
@ApiModelProperty("成本金额") |
||||
|
private String cols18; // 成本金额
|
||||
|
@ApiModelProperty("成本税额") |
||||
|
private String colt19; // 成本税额
|
||||
|
@ApiModelProperty("不含税成本") |
||||
|
private String colu20; // 不含税成本
|
||||
|
@ApiModelProperty("进项税率") |
||||
|
private String colv21; // 进项税率
|
||||
|
@ApiModelProperty("单据日期") |
||||
|
private String orderDate; // 单据日期
|
||||
|
@ApiModelProperty("供货商编码统一") |
||||
|
private String supplierCodeUnified; // 供货商编码统一
|
||||
|
@ApiModelProperty("入库定单号") |
||||
|
private String inOrderNo; // 入库定单号
|
||||
|
} |
@ -0,0 +1,67 @@ |
|||||
|
package com.yxt.supervise.customer.api.gdinstoragegd; |
||||
|
|
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/3/29 13:46 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "入库数据 数据传输对象", description = "入库数据 数据传输对象") |
||||
|
public class GdInstorageGdDto implements Dto { |
||||
|
@ApiModelProperty("企业组织机构代码证") |
||||
|
private String cola0; // 企业组织机构代码证
|
||||
|
@ApiModelProperty("仓库/门店编号") |
||||
|
private String colb1; // 仓库/门店编号
|
||||
|
@ApiModelProperty("仓库/门店名称") |
||||
|
private String colc2; // 仓库/门店名称
|
||||
|
@ApiModelProperty("入库时间") |
||||
|
private String cold3; // 入库时间
|
||||
|
@ApiModelProperty("供应商编号") |
||||
|
private String colex; // 供应商编号
|
||||
|
@ApiModelProperty("供应商名称") |
||||
|
private String cole4; // 供应商名称
|
||||
|
@ApiModelProperty("单据号") |
||||
|
private String colf5; // 单据号
|
||||
|
@ApiModelProperty("单据类型") |
||||
|
private String colg6; // 单据类型
|
||||
|
@ApiModelProperty("货号") |
||||
|
private String colh7; // 货号
|
||||
|
@ApiModelProperty("商品名称") |
||||
|
private String coli8; // 商品名称
|
||||
|
@ApiModelProperty("商品生产日期") |
||||
|
private String colj9; // 商品生产日期
|
||||
|
@ApiModelProperty("商品保质期") |
||||
|
private String colk10; // 商品保质期
|
||||
|
@ApiModelProperty("商品规格") |
||||
|
private String coll11; // 商品规格
|
||||
|
@ApiModelProperty("类别编号") |
||||
|
private String colm12; // 类别编号
|
||||
|
@ApiModelProperty("类别名称") |
||||
|
private String coln13; // 类别名称
|
||||
|
@ApiModelProperty("一级类别名称") |
||||
|
private String colo14; // 一级类别名称
|
||||
|
@ApiModelProperty("二级类别名称") |
||||
|
private String colp15; // 二级类别名称
|
||||
|
@ApiModelProperty("入库金额") |
||||
|
private String colq16; // 入库金额
|
||||
|
@ApiModelProperty("入库数量") |
||||
|
private String colr17; // 入库数量
|
||||
|
@ApiModelProperty("成本金额") |
||||
|
private String cols18; // 成本金额
|
||||
|
@ApiModelProperty("成本税额") |
||||
|
private String colt19; // 成本税额
|
||||
|
@ApiModelProperty("不含税成本") |
||||
|
private String colu20; // 不含税成本
|
||||
|
@ApiModelProperty("进项税率") |
||||
|
private String colv21; // 进项税率
|
||||
|
@ApiModelProperty("单据日期") |
||||
|
private String orderDate; // 单据日期
|
||||
|
@ApiModelProperty("供货商编码统一") |
||||
|
private String supplierCodeUnified; // 供货商编码统一
|
||||
|
@ApiModelProperty("入库定单号") |
||||
|
private String inOrderNo; // 入库定单号
|
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
package com.yxt.supervise.customer.api.gdinstoragegd; |
||||
|
|
||||
|
import com.alibaba.excel.annotation.ExcelProperty; |
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/3/29 14:56 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "入库数据 Excel视图数据对象", description = "入库数据 Excel视图数据对象") |
||||
|
public class GdInstorageGdExcelVo implements Vo { |
||||
|
@ExcelProperty(value = "仓库/门店名称") |
||||
|
@ApiModelProperty("仓库/门店名称") |
||||
|
private String colc2; // 仓库/门店名称
|
||||
|
@ApiModelProperty("入库时间") |
||||
|
@ExcelProperty(value = "入库时间") |
||||
|
private String cold3; // 入库时间
|
||||
|
@ApiModelProperty("商品名称") |
||||
|
@ExcelProperty(value = "商品名称") |
||||
|
private String coli8; // 商品名称
|
||||
|
@ExcelProperty(value = "商品规格") |
||||
|
@ApiModelProperty("商品规格") |
||||
|
private String coll11; // 商品规格
|
||||
|
@ExcelProperty(value = "类别编号") |
||||
|
@ApiModelProperty("类别编号") |
||||
|
private String colm12; // 类别编号
|
||||
|
@ExcelProperty(value = "类别名称") |
||||
|
@ApiModelProperty("类别名称") |
||||
|
private String coln13; // 类别名称
|
||||
|
@ExcelProperty(value = "入库数量") |
||||
|
@ApiModelProperty("入库数量") |
||||
|
private String colr17; // 入库数量
|
||||
|
} |
@ -0,0 +1,29 @@ |
|||||
|
package com.yxt.supervise.customer.api.gdinstoragegd; |
||||
|
|
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
import org.springframework.web.bind.annotation.ResponseBody; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/3/29 13:47 |
||||
|
*/ |
||||
|
@Api(tags = "入库数据") |
||||
|
@FeignClient( |
||||
|
contextId = "yxt-supervise-GdInstorageGdData", |
||||
|
name = "yxt-supervise", |
||||
|
path = "v1/gdinstoragegd", |
||||
|
fallback = GdInstorageGdFeignFallback.class) |
||||
|
public interface GdInstorageGdFeign { |
||||
|
@ApiOperation("根据条件分页查询数据的列表") |
||||
|
@PostMapping("/listPage") |
||||
|
@ResponseBody |
||||
|
public ResultBean<PagerVo<GdInstorageGd>> listPage(@RequestBody PagerQuery<GdInstorageGdQuery> pq); |
||||
|
|
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
package com.yxt.supervise.customer.api.gdinstoragegd; |
||||
|
|
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/3/29 13:48 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class GdInstorageGdFeignFallback implements GdInstorageGdFeign{ |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<PagerVo<GdInstorageGd>> listPage(PagerQuery<GdInstorageGdQuery> pq) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
return rb.setMsg("接口yxt-supervise/gdinstoragegd/listPage无法访问"); |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,71 @@ |
|||||
|
package com.yxt.supervise.customer.api.gdinstoragegd; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/3/29 13:50 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "入库数据 查询条件", description = "入库数据 查询条件") |
||||
|
public class GdInstorageGdQuery implements Query { |
||||
|
@ApiModelProperty("企业组织机构代码证") |
||||
|
private String cola0; // 企业组织机构代码证
|
||||
|
@ApiModelProperty("仓库/门店编号") |
||||
|
private String colb1; // 仓库/门店编号
|
||||
|
@ApiModelProperty("仓库/门店名称") |
||||
|
private String colc2; // 仓库/门店名称
|
||||
|
@ApiModelProperty("入库时间") |
||||
|
private String cold3; // 入库时间
|
||||
|
@ApiModelProperty("供应商编号") |
||||
|
private String colex; // 供应商编号
|
||||
|
@ApiModelProperty("供应商名称") |
||||
|
private String cole4; // 供应商名称
|
||||
|
@ApiModelProperty("单据号") |
||||
|
private String colf5; // 单据号
|
||||
|
@ApiModelProperty("单据类型") |
||||
|
private String colg6; // 单据类型
|
||||
|
@ApiModelProperty("货号") |
||||
|
private String colh7; // 货号
|
||||
|
@ApiModelProperty("商品名称") |
||||
|
private String coli8; // 商品名称
|
||||
|
@ApiModelProperty("商品生产日期") |
||||
|
private String colj9; // 商品生产日期
|
||||
|
@ApiModelProperty("商品保质期") |
||||
|
private String colk10; // 商品保质期
|
||||
|
@ApiModelProperty("商品规格") |
||||
|
private String coll11; // 商品规格
|
||||
|
@ApiModelProperty("类别编号") |
||||
|
private String colm12; // 类别编号
|
||||
|
@ApiModelProperty("类别名称") |
||||
|
private String coln13; // 类别名称
|
||||
|
@ApiModelProperty("一级类别名称") |
||||
|
private String colo14; // 一级类别名称
|
||||
|
@ApiModelProperty("二级类别名称") |
||||
|
private String colp15; // 二级类别名称
|
||||
|
@ApiModelProperty("入库金额") |
||||
|
private String colq16; // 入库金额
|
||||
|
@ApiModelProperty("入库数量") |
||||
|
private String colr17; // 入库数量
|
||||
|
@ApiModelProperty("成本金额") |
||||
|
private String cols18; // 成本金额
|
||||
|
@ApiModelProperty("成本税额") |
||||
|
private String colt19; // 成本税额
|
||||
|
@ApiModelProperty("不含税成本") |
||||
|
private String colu20; // 不含税成本
|
||||
|
@ApiModelProperty("进项税率") |
||||
|
private String colv21; // 进项税率
|
||||
|
@ApiModelProperty("单据日期") |
||||
|
private String orderDate; // 单据日期
|
||||
|
@ApiModelProperty("供货商编码统一") |
||||
|
private String supplierCodeUnified; // 供货商编码统一
|
||||
|
@ApiModelProperty("入库定单号") |
||||
|
private String inOrderNo; // 入库定单号
|
||||
|
@ApiModelProperty("开始时间") |
||||
|
private String startTime; |
||||
|
@ApiModelProperty("结束时间") |
||||
|
private String endTime; |
||||
|
} |
@ -0,0 +1,67 @@ |
|||||
|
package com.yxt.supervise.customer.api.gdinstoragegd; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/3/29 13:51 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "入库数据 视图数据对象", description = "入库数据 视图数据对象") |
||||
|
public class GdInstorageGdVo implements Vo { |
||||
|
@ApiModelProperty("企业组织机构代码证") |
||||
|
private String cola0; // 企业组织机构代码证
|
||||
|
@ApiModelProperty("仓库/门店编号") |
||||
|
private String colb1; // 仓库/门店编号
|
||||
|
@ApiModelProperty("仓库/门店名称") |
||||
|
private String colc2; // 仓库/门店名称
|
||||
|
@ApiModelProperty("入库时间") |
||||
|
private String cold3; // 入库时间
|
||||
|
@ApiModelProperty("供应商编号") |
||||
|
private String colex; // 供应商编号
|
||||
|
@ApiModelProperty("供应商名称") |
||||
|
private String cole4; // 供应商名称
|
||||
|
@ApiModelProperty("单据号") |
||||
|
private String colf5; // 单据号
|
||||
|
@ApiModelProperty("单据类型") |
||||
|
private String colg6; // 单据类型
|
||||
|
@ApiModelProperty("货号") |
||||
|
private String colh7; // 货号
|
||||
|
@ApiModelProperty("商品名称") |
||||
|
private String coli8; // 商品名称
|
||||
|
@ApiModelProperty("商品生产日期") |
||||
|
private String colj9; // 商品生产日期
|
||||
|
@ApiModelProperty("商品保质期") |
||||
|
private String colk10; // 商品保质期
|
||||
|
@ApiModelProperty("商品规格") |
||||
|
private String coll11; // 商品规格
|
||||
|
@ApiModelProperty("类别编号") |
||||
|
private String colm12; // 类别编号
|
||||
|
@ApiModelProperty("类别名称") |
||||
|
private String coln13; // 类别名称
|
||||
|
@ApiModelProperty("一级类别名称") |
||||
|
private String colo14; // 一级类别名称
|
||||
|
@ApiModelProperty("二级类别名称") |
||||
|
private String colp15; // 二级类别名称
|
||||
|
@ApiModelProperty("入库金额") |
||||
|
private String colq16; // 入库金额
|
||||
|
@ApiModelProperty("入库数量") |
||||
|
private String colr17; // 入库数量
|
||||
|
@ApiModelProperty("成本金额") |
||||
|
private String cols18; // 成本金额
|
||||
|
@ApiModelProperty("成本税额") |
||||
|
private String colt19; // 成本税额
|
||||
|
@ApiModelProperty("不含税成本") |
||||
|
private String colu20; // 不含税成本
|
||||
|
@ApiModelProperty("进项税率") |
||||
|
private String colv21; // 进项税率
|
||||
|
@ApiModelProperty("单据日期") |
||||
|
private String orderDate; // 单据日期
|
||||
|
@ApiModelProperty("供货商编码统一") |
||||
|
private String supplierCodeUnified; // 供货商编码统一
|
||||
|
@ApiModelProperty("入库定单号") |
||||
|
private String inOrderNo; // 入库定单号
|
||||
|
} |
@ -0,0 +1,83 @@ |
|||||
|
package com.yxt.supervise.customer.api.gdsales; |
||||
|
|
||||
|
import com.alibaba.excel.annotation.ExcelProperty; |
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import lombok.experimental.Accessors; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/3/29 10:43 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "销售数据 导出excel视图数据对象", description = "销售数据 导出excel视图数据对象") |
||||
|
public class GdSalesExcelVo implements Vo { |
||||
|
// private String sid; // sid
|
||||
|
//
|
||||
|
// @ApiModelProperty("创建者")
|
||||
|
// private String createSid; // 创建者
|
||||
|
// @ApiModelProperty("更新者")
|
||||
|
// private String modifySid; // 更新者
|
||||
|
@ExcelProperty(value = "销售订单号") |
||||
|
@ApiModelProperty("销售订单号") |
||||
|
private String code; // 销售订单号
|
||||
|
@ExcelProperty(value = "商品编码") |
||||
|
@ApiModelProperty("商品编码") |
||||
|
private String prodCode; // 商品编码
|
||||
|
// @ApiModelProperty("商品条码")
|
||||
|
// private String prodBarCode; // 商品条码
|
||||
|
@ExcelProperty(value = "商品名称") |
||||
|
@ApiModelProperty("商品名称") |
||||
|
private String prodName; // 商品名称
|
||||
|
@ExcelProperty(value = "销售数量") |
||||
|
@ApiModelProperty("销售数量") |
||||
|
private String saleNum; // 销售数量
|
||||
|
// @ApiModelProperty("销售渠道")
|
||||
|
// private String storeCode; // 销售渠道
|
||||
|
@ExcelProperty(value = "销售渠道") |
||||
|
@ApiModelProperty("销售渠道名称") |
||||
|
private String storeName; // 销售渠道名称
|
||||
|
// @ApiModelProperty("销售价格")
|
||||
|
// private String salePrice; // 销售价格
|
||||
|
// @ApiModelProperty("销售成本")
|
||||
|
// private String saleCost; // 销售成本
|
||||
|
// @ApiModelProperty("利润")
|
||||
|
// private String profit; // 利润
|
||||
|
@ExcelProperty(value = "数据日期") |
||||
|
@ApiModelProperty("数据日期") |
||||
|
private String dataDate; // 数据日期
|
||||
|
@ExcelProperty(value = "类型") |
||||
|
@ApiModelProperty("类型") |
||||
|
private String orderType; // 类型
|
||||
|
// @ApiModelProperty("客户代码")
|
||||
|
// private String customerCode; // 客户代码
|
||||
|
// @ApiModelProperty("客户名称")
|
||||
|
// private String customerName; // 客户名称
|
||||
|
@ExcelProperty(value = "品牌编码") |
||||
|
@ApiModelProperty("品牌代码") |
||||
|
private String brandCode; // 品牌代码
|
||||
|
@ExcelProperty(value = "品牌名称") |
||||
|
@ApiModelProperty("品牌名称") |
||||
|
private String brandName; // 品牌名称
|
||||
|
// @ApiModelProperty("大类")
|
||||
|
// private String categoryb; // 大类
|
||||
|
// @ApiModelProperty("种类")
|
||||
|
// private String categorym; // 种类
|
||||
|
// @ApiModelProperty("小类")
|
||||
|
// private String categorys; // 小类
|
||||
|
@ExcelProperty(value = "总价") |
||||
|
@ApiModelProperty("总价") |
||||
|
private String total; |
||||
|
|
||||
|
public void setSaleNum(String saleNum){ |
||||
|
int i=saleNum.indexOf("."); |
||||
|
if(i!=-1){ |
||||
|
String num=saleNum.substring(0,i); |
||||
|
this.saleNum=num; |
||||
|
}else{ |
||||
|
this.saleNum=saleNum; |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,24 @@ |
|||||
|
package com.yxt.supervise.customer.biz.gdinstoragegd; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.core.toolkit.Constants; |
||||
|
import com.yxt.supervise.customer.api.gdinstoragegd.GdInstorageGd; |
||||
|
import com.yxt.supervise.customer.api.gdinstoragegd.GdInstorageGdExcelVo; |
||||
|
import com.yxt.supervise.customer.api.gdinstoragegd.GdInstorageGdVo; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/3/29 13:57 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface GdInstorageGdMapper extends BaseMapper<GdInstorageGd> { |
||||
|
|
||||
|
IPage<GdInstorageGdVo> selectPageVo(IPage<GdInstorageGd> page, @Param(Constants.WRAPPER) Wrapper<GdInstorageGd> qw); |
||||
|
List<GdInstorageGdExcelVo> exportExcel(@Param(Constants.WRAPPER) Wrapper<GdInstorageGd> qw); |
||||
|
} |
@ -0,0 +1,42 @@ |
|||||
|
<?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.yxt.supervise.customer.biz.gdinstoragegd.GdInstorageGdMapper"> |
||||
|
<!-- <where> ${ew.sqlSegment} </where>--> |
||||
|
<!-- ${ew.customSqlSegment} --> |
||||
|
<select id="selectPageVo" resultType="com.yxt.supervise.customer.api.gdinstoragegd.GdInstorageGdVo"> |
||||
|
SELECT |
||||
|
colc2, |
||||
|
cold3, |
||||
|
colf5, |
||||
|
coli8, |
||||
|
colk10, |
||||
|
coll11, |
||||
|
colm12, |
||||
|
coln13, |
||||
|
colr17 |
||||
|
FROM |
||||
|
gd_instorage_gd |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
order by cold3 desc |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
<select id="exportExcel" resultType="com.yxt.supervise.customer.api.gdinstoragegd.GdInstorageGdExcelVo"> |
||||
|
SELECT |
||||
|
colc2, |
||||
|
cold3, |
||||
|
coli8, |
||||
|
coll11, |
||||
|
colm12, |
||||
|
coln13, |
||||
|
colr17 |
||||
|
FROM |
||||
|
gd_instorage_gd |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
order by cold3 desc |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,56 @@ |
|||||
|
package com.yxt.supervise.customer.biz.gdinstoragegd; |
||||
|
|
||||
|
import com.alibaba.excel.EasyExcel; |
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import com.yxt.supervise.customer.api.gdinstoragegd.*; |
||||
|
import com.yxt.supervise.customer.api.gdsales.GdSalesExcelVo; |
||||
|
import com.yxt.supervise.customer.api.gdsales.GdSalesQuery; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
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.ServletOutputStream; |
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.io.IOException; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/3/29 14:00 |
||||
|
*/ |
||||
|
@Api(tags = "入库数据") |
||||
|
@RestController |
||||
|
@RequestMapping("v1/gdinstoragegd") |
||||
|
public class GdInstorageGdRest implements GdInstorageGdFeign { |
||||
|
@Autowired |
||||
|
private GdInstorageGdService gdInstorageGdService; |
||||
|
@ApiOperation("根据条件分页查询数据的列表") |
||||
|
@PostMapping("/listPage") |
||||
|
public ResultBean<PagerVo<GdInstorageGd>> listPage(PagerQuery<GdInstorageGdQuery> pq) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
PagerVo<GdInstorageGdVo> pv = gdInstorageGdService.listPageVo(pq); |
||||
|
return rb.success().setData(pv); |
||||
|
} |
||||
|
@PostMapping("/exportExcel") |
||||
|
@ApiOperation(value = "入库数据导出") |
||||
|
public void exportExcel(@RequestBody PagerQuery<GdInstorageGdQuery> pq, HttpServletResponse response) throws IOException { |
||||
|
//得到所有要导出的数据
|
||||
|
List<GdInstorageGdExcelVo> excelVos = gdInstorageGdService.exportExcel(pq); |
||||
|
String fileName = "入库数据" + System.currentTimeMillis() + ".xlsx"; |
||||
|
response.setContentType( "application/vnd.ms-excel"); |
||||
|
response.setCharacterEncoding("utf8"); |
||||
|
response.setHeader("Content-disposition","attachment;filename="+ fileName ); |
||||
|
// 这里 需要指定写用哪个class去读,然后写到第一个sheet,名字为模板 然后文件流会自动关闭
|
||||
|
// 如果这里想使用03 则 传入excelType参数即可
|
||||
|
ServletOutputStream outputStream = response.getOutputStream(); |
||||
|
EasyExcel.write(outputStream, GdInstorageGdExcelVo.class).sheet("入库数据").doWrite(excelVos); |
||||
|
outputStream.flush(); |
||||
|
outputStream.close(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,87 @@ |
|||||
|
package com.yxt.supervise.customer.biz.gdinstoragegd; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import com.yxt.common.base.utils.PagerUtil; |
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import com.yxt.supervise.customer.api.gdinstoragegd.GdInstorageGd; |
||||
|
import com.yxt.supervise.customer.api.gdinstoragegd.GdInstorageGdExcelVo; |
||||
|
import com.yxt.supervise.customer.api.gdinstoragegd.GdInstorageGdQuery; |
||||
|
import com.yxt.supervise.customer.api.gdinstoragegd.GdInstorageGdVo; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/3/29 14:00 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Service |
||||
|
public class GdInstorageGdService extends MybatisBaseService<GdInstorageGdMapper, GdInstorageGd> { |
||||
|
|
||||
|
public PagerVo<GdInstorageGdVo> listPageVo(PagerQuery<GdInstorageGdQuery> pq) { |
||||
|
GdInstorageGdQuery query = pq.getParams(); |
||||
|
QueryWrapper<GdInstorageGd> qw = new QueryWrapper<>(); |
||||
|
//门店/仓库
|
||||
|
if (StringUtils.isNotBlank(query.getColc2())) { |
||||
|
qw.like("colc2", query.getColc2()); |
||||
|
} |
||||
|
if (StringUtils.isNotBlank(query.getColf5())) { |
||||
|
qw.like("colf5", query.getColf5()); |
||||
|
} |
||||
|
if (StringUtils.isNotBlank(query.getColi8())) { |
||||
|
qw.like("coli8", query.getColi8()); |
||||
|
} |
||||
|
if (StringUtils.isNotBlank(query.getColm12())) { |
||||
|
qw.like("colm12", query.getColm12()); |
||||
|
} |
||||
|
// if (StringUtils.isNotBlank(query.getBrandCode())) {
|
||||
|
// qw.eq("s.brandCode", query.getBrandCode());
|
||||
|
// }
|
||||
|
//时间
|
||||
|
if (StringUtils.isNotBlank(query.getStartTime())) { |
||||
|
qw.ge("STR_TO_DATE(cold3,'%Y-%m-%d')", query.getStartTime()); |
||||
|
} |
||||
|
if (StringUtils.isNotBlank(query.getEndTime())) { |
||||
|
qw.le("STR_TO_DATE(cold3,'%Y-%m-%d')", query.getEndTime()); |
||||
|
} |
||||
|
IPage<GdInstorageGd> page = PagerUtil.queryToPage(pq); |
||||
|
IPage<GdInstorageGdVo> pagging = baseMapper.selectPageVo(page, qw); |
||||
|
PagerVo<GdInstorageGdVo> p = PagerUtil.pageToVo(pagging, null); |
||||
|
return p; |
||||
|
} |
||||
|
public List<GdInstorageGdExcelVo> exportExcel(PagerQuery<GdInstorageGdQuery> pq) { |
||||
|
GdInstorageGdQuery query = pq.getParams(); |
||||
|
QueryWrapper<GdInstorageGd> qw = new QueryWrapper<>(); |
||||
|
//门店/仓库
|
||||
|
if (StringUtils.isNotBlank(query.getColc2())) { |
||||
|
qw.like("colc2", query.getColc2()); |
||||
|
} |
||||
|
if (StringUtils.isNotBlank(query.getColf5())) { |
||||
|
qw.like("colf5", query.getColf5()); |
||||
|
} |
||||
|
if (StringUtils.isNotBlank(query.getColi8())) { |
||||
|
qw.like("coli8", query.getColi8()); |
||||
|
} |
||||
|
if (StringUtils.isNotBlank(query.getColm12())) { |
||||
|
qw.like("colm12", query.getColm12()); |
||||
|
} |
||||
|
// if (StringUtils.isNotBlank(query.getBrandCode())) {
|
||||
|
// qw.eq("s.brandCode", query.getBrandCode());
|
||||
|
// }
|
||||
|
//时间
|
||||
|
if (StringUtils.isNotBlank(query.getStartTime())) { |
||||
|
qw.ge("STR_TO_DATE(cold3,'%Y-%m-%d')", query.getStartTime()); |
||||
|
} |
||||
|
if (StringUtils.isNotBlank(query.getEndTime())) { |
||||
|
qw.le("STR_TO_DATE(cold3,'%Y-%m-%d')", query.getEndTime()); |
||||
|
} |
||||
|
List<GdInstorageGdExcelVo> pagging = baseMapper.exportExcel(qw); |
||||
|
return pagging; |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue