diff --git a/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productnum/ProductNum.java b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productnum/ProductNum.java new file mode 100644 index 00000000..9a6af25f --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productnum/ProductNum.java @@ -0,0 +1,90 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.api.productnum; + +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; + +/** + * Project: com.supervise(宇信通监管)
+ * File: WarehouseInfo.java
+ * Class: com.supervise.api.warehouseinfo.WarehouseInfo
+ * Description: 商品代码、商品名称.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-12 09:42:36
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "商品代码、商品名称信息", description = "商品代码、商品名称信息") +@TableName("product_num") +public class ProductNum extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("编码") + private String code; // 编码 + @ApiModelProperty("名称") + private String name; // 名称 + @ApiModelProperty("品类") + private String category; // 品类 + @ApiModelProperty("品牌") + private String brand; // 品牌 + @ApiModelProperty("批次") + private String pc; // 批次 + @ApiModelProperty("结算供应商code") + private String supplierCode; // 结算供应商 + @ApiModelProperty("结算供应商name") + private String supplierName; // 结算供应商 + @ApiModelProperty("条码") + private String barCode; // 条码 + @ApiModelProperty("单位") + private String unit; // 单位 + + @ApiModelProperty("进价") + private String purchasePrice; // 进价 + @ApiModelProperty("配价") + private String valence;//配价 + @ApiModelProperty("售价") + private String price; // 售价 + + @ApiModelProperty("箱规") + private String boxGauge; // 箱规 + @ApiModelProperty("订货数量") + private String num; // 订货数量 + @ApiModelProperty("订货金额") + private String orderAmount; // 订货金额 + + @ApiModelProperty("税票") + private String taxReceipt; // 税票 + @ApiModelProperty("降价折扣") + private String discount;//降价折扣 +} diff --git a/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productnum/ProductNumDetailsVo.java b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productnum/ProductNumDetailsVo.java new file mode 100644 index 00000000..954dbe81 --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productnum/ProductNumDetailsVo.java @@ -0,0 +1,92 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.api.productnum; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * Project: com.supervise(宇信通监管)
+ * File: WarehouseInfoVo.java
+ * Class: com.supervise.api.warehouseinfo.WarehouseInfoVo
+ * Description: 商品代码、商品名称信息.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-12 09:42:36
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "商品代码、商品名称信息", description = "商品代码、商品名称信息") +public class ProductNumDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("编码") + private String code; // 编码 + @ApiModelProperty("名称") + private String name; // 名称 + @ApiModelProperty("品类") + private String category; // 品类 + @ApiModelProperty("品牌") + private String brand; // 品牌 + @ApiModelProperty("批次") + private String pc; // 批次 + @ApiModelProperty("结算供应商code") + private String supplierCode; // 结算供应商 + @ApiModelProperty("结算供应商name") + private String supplierName; // 结算供应商 + @ApiModelProperty("条码") + private String barCode; // 条码 + @ApiModelProperty("单位") + private String unit; // 单位 + + @ApiModelProperty("进价") + private String purchasePrice; // 进价 + @ApiModelProperty("售价") + private String price; // 售价 + @ApiModelProperty("箱规") + private String boxGauge; // 箱规 + @ApiModelProperty("订货数量") + private String num; // 订货数量 + @ApiModelProperty("订货金额") + private String orderAmount; // 订货金额 + + @ApiModelProperty("税票") + private String taxReceipt; // 税票 + @ApiModelProperty("降价折扣") + private String discount;//降价折扣 + @ApiModelProperty("配价") + private String valence;//配价 +} \ No newline at end of file diff --git a/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productnum/ProductNumDto.java b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productnum/ProductNumDto.java new file mode 100644 index 00000000..845430c9 --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productnum/ProductNumDto.java @@ -0,0 +1,92 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.api.productnum; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * Project: com.supervise(宇信通监管)
+ * File: WarehouseInfoDto.java
+ * Class: com.supervise.api.warehouseinfo.WarehouseInfoDto
+ * Description: 商品代码、商品名称信息.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-12 09:42:36
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "商品代码、商品名称信息", description = "商品代码、商品名称信息") +public class ProductNumDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("编码") + private String code; // 编码 + @ApiModelProperty("名称") + private String name; // 名称 + @ApiModelProperty("品类") + private String category; // 品类 + @ApiModelProperty("品牌") + private String brand; // 品牌 + @ApiModelProperty("批次") + private String pc; // 批次 + @ApiModelProperty("结算供应商code") + private String supplierCode; // 结算供应商 + @ApiModelProperty("结算供应商name") + private String supplierName; // 结算供应商 + @ApiModelProperty("条码") + private String barCode; // 条码 + @ApiModelProperty("单位") + private String unit; // 单位 + + @ApiModelProperty("进价") + private String purchasePrice; // 进价 + @ApiModelProperty("售价") + private String price; // 售价 + @ApiModelProperty("箱规") + private String boxGauge; // 箱规 + @ApiModelProperty("订货数量") + private String num; // 订货数量 + @ApiModelProperty("订货金额") + private String orderAmount; // 订货金额 + + @ApiModelProperty("税票") + private String taxReceipt; // 税票 + @ApiModelProperty("降价折扣") + private String discount;//降价折扣 + @ApiModelProperty("配价") + private String valence;//配价 +} \ No newline at end of file diff --git a/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productnum/ProductNumFeign.java b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productnum/ProductNumFeign.java new file mode 100644 index 00000000..89985d2b --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productnum/ProductNumFeign.java @@ -0,0 +1,76 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.api.productnum; + +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.*; + +/** + * Project: com.supervise(宇信通监管)
+ * File: WarehouseInfoFeign.java
+ * Class: com.supervise.api.warehouseinfo.WarehouseInfoFeign
+ * Description: 商品代码、商品名称信息.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-12 09:42:36
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "商品代码、商品名称信息") +@FeignClient( + contextId = "com.supervise-ProductNum", + name = "com.supervise", + path = "v1/productnum", + fallback = ProductNumFeignFallback.class) +public interface ProductNumFeign { + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + @ResponseBody + public ResultBean> listPage(@RequestBody PagerQuery pq); + + @ApiOperation("新增或修改") + @PostMapping("/save") + @ResponseBody + public ResultBean save(@RequestBody ProductNumDto dto); + + @ApiOperation("根据sid删除记录") + @DeleteMapping("/delBySids") + @ResponseBody + public ResultBean delBySids(@RequestBody String[] sids); + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + @ResponseBody + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid); +} \ No newline at end of file diff --git a/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productnum/ProductNumFeignFallback.java b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productnum/ProductNumFeignFallback.java new file mode 100644 index 00000000..eab208d6 --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productnum/ProductNumFeignFallback.java @@ -0,0 +1,70 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.api.productnum; + +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; + +/** + * Project: com.supervise(宇信通监管)
+ * File: WarehouseInfoFeignFallback.java
+ * Class: com.supervise.api.warehouseinfo.WarehouseInfoFeignFallback
+ * Description: 商品代码、商品名称信息.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-12 09:42:36
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Component +public class ProductNumFeignFallback implements ProductNumFeign { + + @Override + public ResultBean> listPage(PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + return rb.setMsg("接口com.supervise/warehouseinfo/listPage无法访问"); + } + + @Override + public ResultBean save(ProductNumDto dto){ + return ResultBean.fireFail().setMsg("接口com.supervise/warehouseinfo/save无法访问"); + } + + @Override + public ResultBean delBySids( String[] sids){ + return ResultBean.fireFail().setMsg("接口com.supervise/warehouseinfo/delBySids无法访问"); + } + + @Override + public ResultBean fetchDetailsBySid(String sid){ + ResultBean rb = ResultBean.fireFail(); + return rb.setMsg("接口com.supervise/warehouseinfo/fetchDetailsBySid无法访问"); + } +} \ No newline at end of file diff --git a/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productnum/ProductNumQuery.java b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productnum/ProductNumQuery.java new file mode 100644 index 00000000..cf960f10 --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productnum/ProductNumQuery.java @@ -0,0 +1,89 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.api.productnum; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * Project: com.supervise(宇信通监管)
+ * File: WarehouseInfoQuery.java
+ * Class: com.supervise.api.warehouseinfo.WarehouseInfoQuery
+ * Description: 商品代码、商品名称信息.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-12 09:42:36
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "商品代码、商品名称信息", description = "商品代码、商品名称信息") +public class ProductNumQuery implements Query { + @ApiModelProperty("编码") + private String code; // 编码 + @ApiModelProperty("名称") + private String name; // 名称 + @ApiModelProperty("品类") + private String category; // 品类 + @ApiModelProperty("品牌") + private String brand; // 品牌 + @ApiModelProperty("批次") + private String pc; // 批次 + @ApiModelProperty("结算供应商code") + private String supplierCode; // 结算供应商 + @ApiModelProperty("结算供应商name") + private String supplierName; // 结算供应商 + @ApiModelProperty("条码") + private String barCode; // 条码 + @ApiModelProperty("单位") + private String unit; // 单位 + + @ApiModelProperty("进价") + private String purchasePrice; // 进价 + @ApiModelProperty("售价") + private String price; // 售价 + @ApiModelProperty("箱规") + private String boxGauge; // 箱规 + @ApiModelProperty("订货数量") + private String num; // 订货数量 + @ApiModelProperty("订货金额") + private String orderAmount; // 订货金额 + + @ApiModelProperty("税票") + private String taxReceipt; // 税票 + @ApiModelProperty("降价折扣") + private String discount;//降价折扣 + @ApiModelProperty("配价") + private String valence;//配价 +} diff --git a/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productnum/ProductNumVo.java b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productnum/ProductNumVo.java new file mode 100644 index 00000000..9c53d650 --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productnum/ProductNumVo.java @@ -0,0 +1,90 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.api.productnum; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * Project: com.supervise(宇信通监管)
+ * File: WarehouseInfoVo.java
+ * Class: com.supervise.api.warehouseinfo.WarehouseInfoVo
+ * Description: 商品代码、商品名称信息.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-12 09:42:36
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "商品代码、商品名称信息", description = "商品代码、商品名称信息") +public class ProductNumVo implements Vo { + private String sid; // sid + @ApiModelProperty("编码") + private String code; // 编码 + @ApiModelProperty("名称") + private String name; // 名称 + @ApiModelProperty("品类") + private String category; // 品类 + @ApiModelProperty("品牌") + private String brand; // 品牌 + @ApiModelProperty("批次") + private String pc; // 批次 + @ApiModelProperty("结算供应商code") + private String supplierCode; // 结算供应商 + @ApiModelProperty("结算供应商name") + private String supplierName; // 结算供应商 + @ApiModelProperty("条码") + private String barCode; // 条码 + @ApiModelProperty("单位") + private String unit; // 单位 + + @ApiModelProperty("进价") + private String purchasePrice; // 进价 + @ApiModelProperty("售价") + private String price; // 售价 + @ApiModelProperty("箱规") + private String boxGauge; // 箱规 + @ApiModelProperty("订货数量") + private String num; // 订货数量 + @ApiModelProperty("订货金额") + private String orderAmount; // 订货金额 + + @ApiModelProperty("税票") + private String taxReceipt; // 税票 + @ApiModelProperty("降价折扣") + private String discount;//降价折扣 + @ApiModelProperty("配价") + private String valence;//配价 +} diff --git a/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedbrand/RestrictedBrand.java b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedbrand/RestrictedBrand.java new file mode 100644 index 00000000..0efffe90 --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedbrand/RestrictedBrand.java @@ -0,0 +1,58 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.api.restrictedbrand; + +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; + +/** + * Project: yxt-supervise(宇信通监管)
+ * File: RestrictedBrand.java
+ * Class: com.yxt.supervise.portal.api.restrictedbrand.RestrictedBrand
+ * Description: 限定品牌.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "限定品牌", description = "限定品牌") +@TableName("restricted_brand") +public class RestrictedBrand extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("代码") + private String code; // 代码 + @ApiModelProperty("名称") + private String name; // 名称 + +} diff --git a/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedbrand/RestrictedBrandDetailsVo.java b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedbrand/RestrictedBrandDetailsVo.java new file mode 100644 index 00000000..bf033873 --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedbrand/RestrictedBrandDetailsVo.java @@ -0,0 +1,59 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.api.restrictedbrand; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-supervise(宇信通监管)
+ * File: RestrictedBrandVo.java
+ * Class: com.yxt.supervise.portal.api.restrictedbrand.RestrictedBrandVo
+ * Description: 限定品牌 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "限定品牌 视图数据详情", description = "限定品牌 视图数据详情") +public class RestrictedBrandDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("代码") + private String code; // 代码 + @ApiModelProperty("名称") + private String name; // 名称 + +} \ No newline at end of file diff --git a/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedbrand/RestrictedBrandDto.java b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedbrand/RestrictedBrandDto.java new file mode 100644 index 00000000..96cf564c --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedbrand/RestrictedBrandDto.java @@ -0,0 +1,59 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.api.restrictedbrand; + + +import com.yxt.common.core.dto.Dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-supervise(宇信通监管)
+ * File: RestrictedBrandDto.java
+ * Class: com.yxt.supervise.portal.api.restrictedbrand.RestrictedBrandDto
+ * Description: 限定品牌 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "限定品牌 数据传输对象", description = "限定品牌 数据传输对象") +public class RestrictedBrandDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("代码") + private String code; // 代码 + @ApiModelProperty("名称") + private String name; // 名称 + +} \ No newline at end of file diff --git a/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedbrand/RestrictedBrandFeign.java b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedbrand/RestrictedBrandFeign.java new file mode 100644 index 00000000..7a7cd2b1 --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedbrand/RestrictedBrandFeign.java @@ -0,0 +1,78 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.api.restrictedbrand; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * Project: yxt-supervise(宇信通监管)
+ * File: RestrictedBrandFeign.java
+ * Class: com.yxt.supervise.portal.api.restrictedbrand.RestrictedBrandFeign
+ * Description: 限定品牌.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "限定品牌") +@FeignClient( + contextId = "yxt-supervise-RestrictedBrand", + name = "yxt-supervise", + path = "v1/restrictedbrand", + fallback = RestrictedBrandFeignFallback.class) +public interface RestrictedBrandFeign { + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + @ResponseBody + public ResultBean> listPage(@RequestBody PagerQuery pq); + + @ApiOperation("新增或修改") + @PostMapping("/save") + @ResponseBody + public ResultBean save(@RequestBody RestrictedBrandDto dto); + + @ApiOperation("根据sid删除记录") + @DeleteMapping("/delBySids") + @ResponseBody + public ResultBean delBySids(@RequestBody String[] sids); + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + @ResponseBody + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid); +} \ No newline at end of file diff --git a/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedbrand/RestrictedBrandFeignFallback.java b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedbrand/RestrictedBrandFeignFallback.java new file mode 100644 index 00000000..1b024b05 --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedbrand/RestrictedBrandFeignFallback.java @@ -0,0 +1,72 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.api.restrictedbrand; + +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; + +import java.util.List; + +/** + * Project: yxt-supervise(宇信通监管)
+ * File: RestrictedBrandFeignFallback.java
+ * Class: com.yxt.supervise.portal.api.restrictedbrand.RestrictedBrandFeignFallback
+ * Description: 限定品牌.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Component +public class RestrictedBrandFeignFallback implements RestrictedBrandFeign { + + @Override + public ResultBean> listPage(PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + return rb.setMsg("接口yxt-supervise/restrictedbrand/listPage无法访问"); + } + + @Override + public ResultBean save(RestrictedBrandDto dto){ + return ResultBean.fireFail().setMsg("接口yxt-supervise/restrictedbrand/save无法访问"); + } + + @Override + public ResultBean delBySids( String[] sids){ + return ResultBean.fireFail().setMsg("接口yxt-supervise/restrictedbrand/delBySids无法访问"); + } + + @Override + public ResultBean fetchDetailsBySid(String sid){ + ResultBean rb = ResultBean.fireFail(); + return rb.setMsg("接口yxt-supervise/restrictedbrand/fetchDetailsBySid无法访问"); + } +} \ No newline at end of file diff --git a/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedbrand/RestrictedBrandQuery.java b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedbrand/RestrictedBrandQuery.java new file mode 100644 index 00000000..554f4411 --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedbrand/RestrictedBrandQuery.java @@ -0,0 +1,57 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.api.restrictedbrand; + + +import com.yxt.common.core.query.Query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-supervise(宇信通监管)
+ * File: RestrictedBrandQuery.java
+ * Class: com.yxt.supervise.portal.api.restrictedbrand.RestrictedBrandQuery
+ * Description: 限定品牌 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "限定品牌 查询条件", description = "限定品牌 查询条件") +public class RestrictedBrandQuery implements Query { + + @ApiModelProperty("代码") + private String code; // 代码 + @ApiModelProperty("名称") + private String name; // 名称 + +} diff --git a/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedbrand/RestrictedBrandVo.java b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedbrand/RestrictedBrandVo.java new file mode 100644 index 00000000..d695f401 --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedbrand/RestrictedBrandVo.java @@ -0,0 +1,59 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.api.restrictedbrand; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-supervise(宇信通监管)
+ * File: RestrictedBrandVo.java
+ * Class: com.yxt.supervise.portal.api.restrictedbrand.RestrictedBrandVo
+ * Description: 限定品牌 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "限定品牌 视图数据对象", description = "限定品牌 视图数据对象") +public class RestrictedBrandVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("代码") + private String code; // 代码 + @ApiModelProperty("名称") + private String name; // 名称 + +} diff --git a/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedcategory/RestrictedCategory.java b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedcategory/RestrictedCategory.java new file mode 100644 index 00000000..2ff53175 --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedcategory/RestrictedCategory.java @@ -0,0 +1,59 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.api.restrictedcategory; + +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; + +/** + * Project: yxt-supervise(宇信通监管)
+ * File: RestrictedCategory.java
+ * Class: com.yxt.supervise.portal.api.restrictedcategory.RestrictedCategory
+ * Description: 限定品类.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "限定品类", description = "限定品类") +@TableName("restricted_category") +public class RestrictedCategory extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("监管品类") + private String categorys; // 监管品类 + @ApiModelProperty("监管品牌") + private String brands; // value值 + + +} diff --git a/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedcategory/RestrictedCategoryDetailsVo.java b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedcategory/RestrictedCategoryDetailsVo.java new file mode 100644 index 00000000..08bc2bc9 --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedcategory/RestrictedCategoryDetailsVo.java @@ -0,0 +1,58 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.api.restrictedcategory; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-supervise(宇信通监管)
+ * File: RestrictedCategoryVo.java
+ * Class: com.yxt.supervise.portal.api.restrictedcategory.RestrictedCategoryVo
+ * Description: 限定品类 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "限定品类 视图数据详情", description = "限定品类 视图数据详情") +public class RestrictedCategoryDetailsVo implements Vo { + + private String sid; // sid + @ApiModelProperty("监管品类") + private String categorys; // 监管品类 + @ApiModelProperty("监管品牌") + private String brands; // value值 + +} \ No newline at end of file diff --git a/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedcategory/RestrictedCategoryDto.java b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedcategory/RestrictedCategoryDto.java new file mode 100644 index 00000000..716971d4 --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedcategory/RestrictedCategoryDto.java @@ -0,0 +1,58 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.api.restrictedcategory; + + +import com.yxt.common.core.dto.Dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-supervise(宇信通监管)
+ * File: RestrictedCategoryDto.java
+ * Class: com.yxt.supervise.portal.api.restrictedcategory.RestrictedCategoryDto
+ * Description: 限定品类 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "限定品类 数据传输对象", description = "限定品类 数据传输对象") +public class RestrictedCategoryDto implements Dto { + + private String sid; // sid + @ApiModelProperty("监管品类") + private String categorys; // 监管品类 + @ApiModelProperty("监管品牌") + private String brands; // value值 + +} \ No newline at end of file diff --git a/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedcategory/RestrictedCategoryFeign.java b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedcategory/RestrictedCategoryFeign.java new file mode 100644 index 00000000..5759429b --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedcategory/RestrictedCategoryFeign.java @@ -0,0 +1,78 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.api.restrictedcategory; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * Project: yxt-supervise(宇信通监管)
+ * File: RestrictedCategoryFeign.java
+ * Class: com.yxt.supervise.portal.api.restrictedcategory.RestrictedCategoryFeign
+ * Description: 限定品类.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "限定品类") +@FeignClient( + contextId = "yxt-supervise-RestrictedCategory", + name = "yxt-supervise", + path = "v1/restrictedcategory", + fallback = RestrictedCategoryFeignFallback.class) +public interface RestrictedCategoryFeign { + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + @ResponseBody + public ResultBean> listPage(@RequestBody PagerQuery pq); + + @ApiOperation("新增或修改") + @PostMapping("/save") + @ResponseBody + public ResultBean save(@RequestBody RestrictedCategoryDto dto); + + @ApiOperation("根据sid删除记录") + @DeleteMapping("/delBySids") + @ResponseBody + public ResultBean delBySids(@RequestBody String[] sids); + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + @ResponseBody + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid); +} \ No newline at end of file diff --git a/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedcategory/RestrictedCategoryFeignFallback.java b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedcategory/RestrictedCategoryFeignFallback.java new file mode 100644 index 00000000..8ff369c8 --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedcategory/RestrictedCategoryFeignFallback.java @@ -0,0 +1,72 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.api.restrictedcategory; + +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; + +import java.util.List; + +/** + * Project: yxt-supervise(宇信通监管)
+ * File: RestrictedCategoryFeignFallback.java
+ * Class: com.yxt.supervise.portal.api.restrictedcategory.RestrictedCategoryFeignFallback
+ * Description: 限定品类.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Component +public class RestrictedCategoryFeignFallback implements RestrictedCategoryFeign { + + @Override + public ResultBean> listPage(PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + return rb.setMsg("接口yxt-supervise/restrictedcategory/listPage无法访问"); + } + + @Override + public ResultBean save(RestrictedCategoryDto dto){ + return ResultBean.fireFail().setMsg("接口yxt-supervise/restrictedcategory/save无法访问"); + } + + @Override + public ResultBean delBySids( String[] sids){ + return ResultBean.fireFail().setMsg("接口yxt-supervise/restrictedcategory/delBySids无法访问"); + } + + @Override + public ResultBean fetchDetailsBySid(String sid){ + ResultBean rb = ResultBean.fireFail(); + return rb.setMsg("接口yxt-supervise/restrictedcategory/fetchDetailsBySid无法访问"); + } +} \ No newline at end of file diff --git a/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedcategory/RestrictedCategoryQuery.java b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedcategory/RestrictedCategoryQuery.java new file mode 100644 index 00000000..8974b890 --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedcategory/RestrictedCategoryQuery.java @@ -0,0 +1,57 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.api.restrictedcategory; + + +import com.yxt.common.core.query.Query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-supervise(宇信通监管)
+ * File: RestrictedCategoryQuery.java
+ * Class: com.yxt.supervise.portal.api.restrictedcategory.RestrictedCategoryQuery
+ * Description: 限定品类 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "限定品类 查询条件", description = "限定品类 查询条件") +public class RestrictedCategoryQuery implements Query { + + @ApiModelProperty("监管品类") + private String categorys; // 监管品类 + @ApiModelProperty("监管品牌") + private String brands; // value值 + +} diff --git a/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedcategory/RestrictedCategoryVo.java b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedcategory/RestrictedCategoryVo.java new file mode 100644 index 00000000..497bae77 --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/restrictedcategory/RestrictedCategoryVo.java @@ -0,0 +1,58 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.api.restrictedcategory; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-supervise(宇信通监管)
+ * File: RestrictedCategoryVo.java
+ * Class: com.yxt.supervise.portal.api.restrictedcategory.RestrictedCategoryVo
+ * Description: 限定品类 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "限定品类 视图数据对象", description = "限定品类 视图数据对象") +public class RestrictedCategoryVo implements Vo { + + private String sid; // sid + @ApiModelProperty("监管品类") + private String categorys; // 监管品类 + @ApiModelProperty("监管品牌") + private String brands; // value值 + +} diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/productnum/ProductNumMapper.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/productnum/ProductNumMapper.java new file mode 100644 index 00000000..39420082 --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/productnum/ProductNumMapper.java @@ -0,0 +1,69 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.biz.productnum; + +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.portal.api.productnum.ProductNum; +import com.yxt.supervise.portal.api.productnum.ProductNumVo; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * Project: com.supervise(宇信通监管)
+ * File: ProductNumMapper.java
+ * Class: com.supervise.biz.ProductNum.ProductNumMapper
+ * Description: 商品代码、商品名称信息.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-12 09:42:36
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface ProductNumMapper extends BaseMapper { + + //@Update("update warehouse_info set name=#{msg} where id=#{id}") + //IPage voPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from product_num") + List selectListVo(); + @Select("select * from product_num") + List getAll(); + @Select("select * from product_num where pc like CONCAT('%',#{pc},'%') group by pc ") + List selectMaxPc(@Param("pc") String pc); +} \ No newline at end of file diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/productnum/ProductNumMapper.xml b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/productnum/ProductNumMapper.xml new file mode 100644 index 00000000..158612be --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/productnum/ProductNumMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/productnum/ProductNumRest.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/productnum/ProductNumRest.java new file mode 100644 index 00000000..8fbe9b50 --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/productnum/ProductNumRest.java @@ -0,0 +1,126 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.biz.productnum; + +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.portal.api.productnum.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; + +/** + * Project: com.supervise(宇信通监管)
+ * File: ProductNumFeignFallback.java
+ * Class: com.supervise.biz.ProductNum.ProductNumRest
+ * Description: 仓库信息.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-12 09:42:36
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "仓库信息") +@RestController("com.supervise.biz.productnum.ProductNumRest") +@RequestMapping("v1/productnum") +public class ProductNumRest implements ProductNumFeign { + + @Autowired + private ProductNumService productNumService; + + @Override + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = productNumService.listPageVo(pq); + return rb.success().setData(pv); + } + + @Override + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody ProductNumDto dto){ + ResultBean rb = ResultBean.fireFail(); + productNumService.saveOrUpdateDto(dto); + return rb.success(); + } + + @Override + @ApiOperation("根据sid批量删除") + @PostMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + productNumService.delBySids(sids); + return rb.success(); + } + + @Override + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + ProductNumDetailsVo vo = productNumService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } + @ApiOperation(" ") + @RequestMapping(value = "/importBrandSort", method = RequestMethod.POST) + public ResultBean importBrandSort(@RequestParam("filename") MultipartFile file, + HttpServletRequest request, HttpServletResponse response){ + ResultBean rb = ResultBean.fireFail(); + String temp = request.getSession().getServletContext() + .getRealPath(File.separator) + + "temp"; // 临时目录 + File tempFile = new File(temp); + if (!tempFile.exists()) { + tempFile.mkdirs(); + } + String name = file.getOriginalFilename();// 获取上传文件名,包括路径 + long size = file.getSize(); + if ((name == null || name.equals("")) && size == 0) + return null; + InputStream in = null; + try { + in = file.getInputStream(); + } catch (IOException e) { + e.printStackTrace(); + } + //inventoryInformationService.readBrandPeriodSorXls1(in,""); + productNumService.readBrandPeriodSorXls1(in,""); + return rb; + } +} diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/productnum/ProductNumService.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/productnum/ProductNumService.java new file mode 100644 index 00000000..48771db5 --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/productnum/ProductNumService.java @@ -0,0 +1,313 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.biz.productnum; + +import cn.hutool.core.bean.BeanUtil; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +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.portal.api.brandinfo.BrandInfo; +import com.yxt.supervise.portal.api.brandinfo.BrandInfoVo; +import com.yxt.supervise.portal.api.dictcommon.DictCommonDetailsVo; +import com.yxt.supervise.portal.api.productinformation.ProductInformation; +import com.yxt.supervise.portal.api.productinformation.ProductInformationVo; +import com.yxt.supervise.portal.api.productnum.*; +import com.yxt.supervise.portal.api.purchaserequisition.PurchaseRequisition; +import com.yxt.supervise.portal.api.purchaserequisitionpro.PurchaseRequisitionPro; +import com.yxt.supervise.portal.api.restrictedcategory.RestrictedCategory; +import com.yxt.supervise.portal.biz.brandinfo.BrandInfoService; +import com.yxt.supervise.portal.biz.dictcommon.DictCommonService; +import com.yxt.supervise.portal.biz.productinformation.ProductInformationService; +import com.yxt.supervise.portal.biz.restrictedcategory.RestrictedCategoryService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.apache.poi.hssf.usermodel.HSSFCell; +import org.apache.poi.hssf.usermodel.HSSFRow; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.ss.usermodel.CellType; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.io.IOException; +import java.io.InputStream; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * Project: com.supervise(宇信通监管)
+ * File: ProductNumService.java
+ * Class: com.supervise.biz.ProductNum.ProductNumService
+ * Description: 仓库信息 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-12 09:42:36
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Slf4j +@Service +public class ProductNumService extends MybatisBaseService { + private QueryWrapper createQueryWrapper(ProductNumQuery query) { + // todo: 这里根据具体业务调整查询条件 + // 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName())); + QueryWrapper qw = new QueryWrapper<>(); + return qw; + } + + public PagerVo listPageVo(PagerQuery pq) { + ProductNumQuery query = pq.getParams(); + QueryWrapper qw = createQueryWrapper(query); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(ProductNumDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(ProductNumDto dto){ + ProductNum entity = new ProductNum(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(ProductNumDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + ProductNum entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public ProductNumDetailsVo fetchDetailsVoBySid(String sid){ + ProductNum entity = fetchBySid(sid); + ProductNumDetailsVo vo = new ProductNumDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } + @Resource + private ProductInformationService productInformationService; + @Resource + private DictCommonService dictCommonService; + @Resource + private BrandInfoService brandInfoService; + @Resource + private RestrictedCategoryService restrictedCategoryService; + public void readBrandPeriodSorXls1(InputStream is, String sid) { + HSSFWorkbook hssfWorkbook = null; + try { + hssfWorkbook = new HSSFWorkbook(is); + } catch (IOException e) { + e.printStackTrace(); + } + SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); + String pc = sdf.format(new Date()); + List pcs=baseMapper.selectMaxPc( pc ); + if(pcs!=null&&pcs.size()>0){ + if(pcs.size()<=9){ + pc=pc+"0"+(pcs.size()+1); + }else{ + pc=pc+(pcs.size()+1); + } + }else{ + pc=pc+"01"; + } + List lisss=new ArrayList<>(); + List lisss2=new ArrayList<>(); + HSSFSheet hssfSheet = hssfWorkbook.getSheetAt(0); + + // 循环行Row + for (int rowNum = 2; rowNum <= hssfSheet.getLastRowNum(); rowNum++) { + ProductNum pr=new ProductNum(); + pr.setPc(pc); + HSSFRow hssfRow = hssfSheet.getRow(rowNum); + int i = 0; + try{ + if(rowNum>=1){ + for ( ; i < hssfRow.getLastCellNum(); i++) { + HSSFCell brandIdHSSFCell = hssfRow.getCell(i); + if(brandIdHSSFCell!=null){ + if (i == 1) {//供应商代码 + brandIdHSSFCell.setCellType(CellType.STRING); + if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { + String value = brandIdHSSFCell.getStringCellValue(); + pr.setSupplierCode(value); + } + } + if (i == 2) {//供应商名称 + brandIdHSSFCell.setCellType(CellType.STRING); + if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { + String value = brandIdHSSFCell.getStringCellValue(); + pr.setSupplierName(value); + } + } + + if (i == 3) {//商品代码 + brandIdHSSFCell.setCellType(CellType.STRING); + String code = brandIdHSSFCell.getStringCellValue(); + ProductInformationVo productInformation=productInformationService.selectByCode(code); + ///ProductInformationVo b=productInformationService.limitJudgement(code); + ProductInformationVo b=productInformationService.selectByCode(code); + String brandSid = b.getBrandSid(); + String categoryKey = b.getCategoryKey(); + + List restrictedCategorys=restrictedCategoryService.limitJudgement(categoryKey,brandSid); + if("081101,081102,081103".indexOf(categoryKey)>=0||(restrictedCategorys!=null&&restrictedCategorys.size()>0)){ + pr.setState(1); + }else{ + pr.setState(0); + String remarks=""; + remarks=remarks+productInformation.getCategory()+"["+productInformation.getCategoryKey()+"]品类,"; + remarks=remarks+productInformation.getBrand()+"["+productInformation.getBrandSid()+"]品牌不符合;"; + pr.setRemarks(remarks); + } + pr.setCode(code); + if(productInformation!=null){ + pr.setBrand(productInformation.getBrand()); + pr.setCategory(productInformation.getCategory()); + } + } + if (i == 4) {//商品条码 + brandIdHSSFCell.setCellType(CellType.STRING); + if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { + String value = brandIdHSSFCell.getStringCellValue(); + pr.setBarCode(value); + } + } + if (i == 5) {//商品名称 + brandIdHSSFCell.setCellType(CellType.STRING); + if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { + String name = brandIdHSSFCell.getStringCellValue(); + pr.setName(name); + } + } + if (i == 6) {//单位 + brandIdHSSFCell.setCellType(CellType.STRING); + if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { + String value = brandIdHSSFCell.getStringCellValue(); + pr.setUnit(value); + } + } + if (i == 7) {//进价 + brandIdHSSFCell.setCellType(CellType.STRING); + if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { + String value = brandIdHSSFCell.getStringCellValue(); + pr.setPurchasePrice(value); + } + } + if (i == 8) {//配价 + brandIdHSSFCell.setCellType(CellType.STRING); + if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { + String value = brandIdHSSFCell.getStringCellValue(); + pr.setValence(value); + } + } + if (i == 9) {//售价 + brandIdHSSFCell.setCellType(CellType.STRING); + if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { + String value = brandIdHSSFCell.getStringCellValue(); + pr.setPrice(value); + } + } + if (i == 10) {//箱规 + brandIdHSSFCell.setCellType(CellType.STRING); + if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { + String value = brandIdHSSFCell.getStringCellValue(); + pr.setBoxGauge(value); + } + } + if (i == 11) {//订货数量 + brandIdHSSFCell.setCellType(CellType.STRING); + if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { + String value = brandIdHSSFCell.getStringCellValue(); + pr.setNum(value); + } + } + if (i == 12) {//订货金额 + brandIdHSSFCell.setCellType(CellType.STRING); + if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { + String value = brandIdHSSFCell.getStringCellValue(); + pr.setOrderAmount(value); + } + } + if (i == 13) {//税票 + brandIdHSSFCell.setCellType(CellType.STRING); + if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { + String value = brandIdHSSFCell.getStringCellValue(); + pr.setTaxReceipt(value); + } + } + if (i == 14) {//折扣 + brandIdHSSFCell.setCellType(CellType.STRING); + if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { + String value = brandIdHSSFCell.getStringCellValue(); + pr.setDiscount(value); + } + } + }else{ + System.err.println("rowNum="+rowNum+",i="+i+",value=null"); + } + } + } + }catch(Exception e){ + e.printStackTrace(); + System.err.println("i="+i+",value=null"); + } + + lisss.add(rowNum+""); + baseMapper.insert(pr); + log.info("productInformation:{}", JSONObject.toJSONString(pr)); + } + String x = JSON.toJSONString(lisss); + System.out.println(x); + String x1 = JSON.toJSONString(lisss2); + System.out.println(x1); + //return message; + } + + public List getAll() { + return baseMapper.getAll(); + } +} \ No newline at end of file diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedbrand/RestrictedBrandMapper.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedbrand/RestrictedBrandMapper.java new file mode 100644 index 00000000..b05d3608 --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedbrand/RestrictedBrandMapper.java @@ -0,0 +1,65 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.biz.restrictedbrand; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import com.yxt.supervise.portal.api.restrictedbrand.RestrictedBrand; +import com.yxt.supervise.portal.api.restrictedbrand.RestrictedBrandVo; + +import java.util.List; + +/** + * Project: yxt-supervise(宇信通监管)
+ * File: RestrictedBrandMapper.java
+ * Class: com.yxt.supervise.portal.biz.restrictedbrand.RestrictedBrandMapper
+ * Description: 限定品牌.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface RestrictedBrandMapper extends BaseMapper { + + //@Update("update restricted_brand set name=#{msg} where id=#{id}") + //IPage voPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from restricted_brand") + List selectListVo(); +} \ No newline at end of file diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedbrand/RestrictedBrandMapper.xml b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedbrand/RestrictedBrandMapper.xml new file mode 100644 index 00000000..f01900a5 --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedbrand/RestrictedBrandMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedbrand/RestrictedBrandRest.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedbrand/RestrictedBrandRest.java new file mode 100644 index 00000000..4b3438dd --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedbrand/RestrictedBrandRest.java @@ -0,0 +1,133 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.biz.restrictedbrand; + +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.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.util.List; +import com.yxt.supervise.portal.api.restrictedbrand.RestrictedBrand; +import com.yxt.supervise.portal.api.restrictedbrand.RestrictedBrandQuery; +import com.yxt.supervise.portal.api.restrictedbrand.RestrictedBrandVo; +import com.yxt.supervise.portal.api.restrictedbrand.RestrictedBrandDetailsVo; +import com.yxt.supervise.portal.api.restrictedbrand.RestrictedBrandDto; +import com.yxt.supervise.portal.api.restrictedbrand.RestrictedBrandFeign; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * Project: yxt-supervise(宇信通监管)
+ * File: RestrictedBrandFeignFallback.java
+ * Class: com.yxt.supervise.portal.biz.restrictedbrand.RestrictedBrandRest
+ * Description: 限定品牌.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "限定品牌") +@RestController("com.yxt.supervise.portal.biz.restrictedbrand.RestrictedBrandRest") +@RequestMapping("v1/restrictedbrand") +public class RestrictedBrandRest implements RestrictedBrandFeign { + + @Autowired + private RestrictedBrandService restrictedBrandService; + + @Override + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = restrictedBrandService.listPageVo(pq); + return rb.success().setData(pv); + } + + @Override + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody RestrictedBrandDto dto){ + ResultBean rb = ResultBean.fireFail(); + restrictedBrandService.saveOrUpdateDto(dto); + return rb.success(); + } + + @Override + @ApiOperation("根据sid批量删除") + @PostMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + restrictedBrandService.delBySids(sids); + return rb.success(); + } + + @Override + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + RestrictedBrandDetailsVo vo = restrictedBrandService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } + @ApiOperation(" ") + @RequestMapping(value = "/importBrandSort", method = RequestMethod.POST) + public ResultBean importBrandSort(@RequestParam("filename") MultipartFile file, + HttpServletRequest request, HttpServletResponse response){ + ResultBean rb = ResultBean.fireFail(); + String temp = request.getSession().getServletContext() + .getRealPath(File.separator) + + "temp"; // 临时目录 + File tempFile = new File(temp); + if (!tempFile.exists()) { + tempFile.mkdirs(); + } + String name = file.getOriginalFilename();// 获取上传文件名,包括路径 + long size = file.getSize(); + if ((name == null || name.equals("")) && size == 0) + return null; + InputStream in = null; + try { + in = file.getInputStream(); + } catch (IOException e) { + e.printStackTrace(); + } + //inventoryInformationService.readBrandPeriodSorXls1(in,""); + restrictedBrandService.readBrandPeriodSorXls1(in,""); + return rb; + } +} diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedbrand/RestrictedBrandService.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedbrand/RestrictedBrandService.java new file mode 100644 index 00000000..37df9ad7 --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedbrand/RestrictedBrandService.java @@ -0,0 +1,184 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.biz.restrictedbrand; + +import cn.hutool.core.bean.BeanUtil; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.supervise.portal.api.brandinfo.BrandInfo; +import com.yxt.supervise.portal.api.dictcommon.DictCommonDetailsVo; +import com.yxt.supervise.portal.api.productinformation.ProductInformationVo; +import com.yxt.supervise.portal.api.productnum.ProductNum; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +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.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.supervise.portal.api.restrictedbrand.RestrictedBrand; +import com.yxt.supervise.portal.api.restrictedbrand.RestrictedBrandQuery; +import com.yxt.supervise.portal.api.restrictedbrand.RestrictedBrandVo; +import com.yxt.supervise.portal.api.restrictedbrand.RestrictedBrandDetailsVo; +import com.yxt.supervise.portal.api.restrictedbrand.RestrictedBrandDto; +import com.yxt.supervise.portal.api.restrictedbrand.RestrictedBrandFeign; + +import org.apache.poi.hssf.usermodel.HSSFCell; +import org.apache.poi.hssf.usermodel.HSSFRow; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.ss.usermodel.CellType; +import org.springframework.stereotype.Service; + +import java.io.IOException; +import java.io.InputStream; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * Project: yxt-supervise(宇信通监管)
+ * File: RestrictedBrandService.java
+ * Class: com.yxt.supervise.portal.biz.restrictedbrand.RestrictedBrandService
+ * Description: 限定品牌 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Slf4j +@Service +public class RestrictedBrandService extends MybatisBaseService { + private QueryWrapper createQueryWrapper(RestrictedBrandQuery query) { + // todo: 这里根据具体业务调整查询条件 + // 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName())); + QueryWrapper qw = new QueryWrapper<>(); + return qw; + } + + public PagerVo listPageVo(PagerQuery pq) { + RestrictedBrandQuery query = pq.getParams(); + QueryWrapper qw = createQueryWrapper(query); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(RestrictedBrandDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(RestrictedBrandDto dto){ + RestrictedBrand entity = new RestrictedBrand(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(RestrictedBrandDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + RestrictedBrand entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public RestrictedBrandDetailsVo fetchDetailsVoBySid(String sid){ + RestrictedBrand entity = fetchBySid(sid); + RestrictedBrandDetailsVo vo = new RestrictedBrandDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } + public void readBrandPeriodSorXls1(InputStream is, String sid) { + HSSFWorkbook hssfWorkbook = null; + try { + hssfWorkbook = new HSSFWorkbook(is); + } catch (IOException e) { + e.printStackTrace(); + } + + List lisss=new ArrayList<>(); + List lisss2=new ArrayList<>(); + HSSFSheet hssfSheet = hssfWorkbook.getSheetAt(0); + + // 循环行Row + for (int rowNum = 1; rowNum <= hssfSheet.getLastRowNum(); rowNum++) { + RestrictedBrand pr=new RestrictedBrand(); + HSSFRow hssfRow = hssfSheet.getRow(rowNum); + int i = 0; + try{ + if(rowNum>=1){ + for ( ; i < hssfRow.getLastCellNum(); i++) { + HSSFCell brandIdHSSFCell = hssfRow.getCell(i); + if(brandIdHSSFCell!=null){ + if (i == 1) {//品牌编码 + brandIdHSSFCell.setCellType(CellType.STRING); + if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { + String value = brandIdHSSFCell.getStringCellValue(); + pr.setCode(value); + } + } + if (i == 2) {//品牌名称 + brandIdHSSFCell.setCellType(CellType.STRING); + if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { + String value = brandIdHSSFCell.getStringCellValue(); + pr.setName(value); + } + } + }else{ + System.err.println("rowNum="+rowNum+",i="+i+",value=null"); + } + } + } + }catch(Exception e){ + e.printStackTrace(); + System.err.println("i="+i+",value=null"); + } + + lisss.add(rowNum+""); + baseMapper.insert(pr); + log.info("productInformation:{}", JSONObject.toJSONString(pr)); + } + String x = JSON.toJSONString(lisss); + System.out.println(x); + String x1 = JSON.toJSONString(lisss2); + System.out.println(x1); + //return message; + } +} \ No newline at end of file diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedcategory/RestrictedCategoryMapper.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedcategory/RestrictedCategoryMapper.java new file mode 100644 index 00000000..9945e2ac --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedcategory/RestrictedCategoryMapper.java @@ -0,0 +1,67 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.biz.restrictedcategory; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import com.yxt.supervise.portal.api.restrictedcategory.RestrictedCategory; +import com.yxt.supervise.portal.api.restrictedcategory.RestrictedCategoryVo; + +import java.util.List; + +/** + * Project: yxt-supervise(宇信通监管)
+ * File: RestrictedCategoryMapper.java
+ * Class: com.yxt.supervise.portal.biz.restrictedcategory.RestrictedCategoryMapper
+ * Description: 限定品类.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface RestrictedCategoryMapper extends BaseMapper { + + //@Update("update restricted_category set name=#{msg} where id=#{id}") + //IPage voPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw); + + @Select("select * from restricted_category") + List selectListVo(); + @Select("select * from restricted_category where categorys like CONCAT('%',#{categoryKey},'%') and brands like CONCAT('%',#{brandCode},'%')") + List limitJudgement(@Param("categoryKey")String categoryKey, @Param("brandCode")String brandCode); +} \ No newline at end of file diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedcategory/RestrictedCategoryMapper.xml b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedcategory/RestrictedCategoryMapper.xml new file mode 100644 index 00000000..454ac247 --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedcategory/RestrictedCategoryMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedcategory/RestrictedCategoryRest.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedcategory/RestrictedCategoryRest.java new file mode 100644 index 00000000..cc4e0c61 --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedcategory/RestrictedCategoryRest.java @@ -0,0 +1,133 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.biz.restrictedcategory; + +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.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.util.List; +import com.yxt.supervise.portal.api.restrictedcategory.RestrictedCategory; +import com.yxt.supervise.portal.api.restrictedcategory.RestrictedCategoryQuery; +import com.yxt.supervise.portal.api.restrictedcategory.RestrictedCategoryVo; +import com.yxt.supervise.portal.api.restrictedcategory.RestrictedCategoryDetailsVo; +import com.yxt.supervise.portal.api.restrictedcategory.RestrictedCategoryDto; +import com.yxt.supervise.portal.api.restrictedcategory.RestrictedCategoryFeign; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * Project: yxt-supervise(宇信通监管)
+ * File: RestrictedCategoryFeignFallback.java
+ * Class: com.yxt.supervise.portal.biz.restrictedcategory.RestrictedCategoryRest
+ * Description: 限定品类.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "限定品类") +@RestController("com.yxt.supervise.portal.biz.restrictedcategory.RestrictedCategoryRest") +@RequestMapping("v1/restrictedcategory") +public class RestrictedCategoryRest implements RestrictedCategoryFeign { + + @Autowired + private RestrictedCategoryService restrictedCategoryService; + + @Override + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = restrictedCategoryService.listPageVo(pq); + return rb.success().setData(pv); + } + + @Override + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody RestrictedCategoryDto dto){ + ResultBean rb = ResultBean.fireFail(); + restrictedCategoryService.saveOrUpdateDto(dto); + return rb.success(); + } + + @Override + @ApiOperation("根据sid批量删除") + @PostMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + restrictedCategoryService.delBySids(sids); + return rb.success(); + } + + @Override + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + RestrictedCategoryDetailsVo vo = restrictedCategoryService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } + @ApiOperation(" ") + @RequestMapping(value = "/importBrandSort", method = RequestMethod.POST) + public ResultBean importBrandSort(@RequestParam("filename") MultipartFile file, + HttpServletRequest request, HttpServletResponse response){ + ResultBean rb = ResultBean.fireFail(); + String temp = request.getSession().getServletContext() + .getRealPath(File.separator) + + "temp"; // 临时目录 + File tempFile = new File(temp); + if (!tempFile.exists()) { + tempFile.mkdirs(); + } + String name = file.getOriginalFilename();// 获取上传文件名,包括路径 + long size = file.getSize(); + if ((name == null || name.equals("")) && size == 0) + return null; + InputStream in = null; + try { + in = file.getInputStream(); + } catch (IOException e) { + e.printStackTrace(); + } + //inventoryInformationService.readBrandPeriodSorXls1(in,""); + restrictedCategoryService.readBrandPeriodSorXls1(in,""); + return rb; + } +} diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedcategory/RestrictedCategoryService.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedcategory/RestrictedCategoryService.java new file mode 100644 index 00000000..890b1f1c --- /dev/null +++ b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedcategory/RestrictedCategoryService.java @@ -0,0 +1,180 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.supervise.portal.biz.restrictedcategory; + +import cn.hutool.core.bean.BeanUtil; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +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.portal.api.restrictedcategory.RestrictedCategory; +import com.yxt.supervise.portal.api.restrictedcategory.RestrictedCategoryQuery; +import com.yxt.supervise.portal.api.restrictedcategory.RestrictedCategoryVo; +import com.yxt.supervise.portal.api.restrictedcategory.RestrictedCategoryDetailsVo; +import com.yxt.supervise.portal.api.restrictedcategory.RestrictedCategoryDto; + +import org.apache.poi.hssf.usermodel.HSSFCell; +import org.apache.poi.hssf.usermodel.HSSFRow; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.ss.usermodel.CellType; +import org.springframework.stereotype.Service; + +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; + +/** + * Project: yxt-supervise(宇信通监管)
+ * File: RestrictedCategoryService.java
+ * Class: com.yxt.supervise.portal.biz.restrictedcategory.RestrictedCategoryService
+ * Description: 限定品类 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Slf4j +@Service +public class RestrictedCategoryService extends MybatisBaseService { + private QueryWrapper createQueryWrapper(RestrictedCategoryQuery query) { + // todo: 这里根据具体业务调整查询条件 + // 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName())); + QueryWrapper qw = new QueryWrapper<>(); + return qw; + } + + public PagerVo listPageVo(PagerQuery pq) { + RestrictedCategoryQuery query = pq.getParams(); + QueryWrapper qw = createQueryWrapper(query); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public void saveOrUpdateDto(RestrictedCategoryDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + this.insertByDto(dto); + return; + } + this.updateByDto(dto); + } + + public void insertByDto(RestrictedCategoryDto dto){ + RestrictedCategory entity = new RestrictedCategory(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(RestrictedCategoryDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + RestrictedCategory entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public RestrictedCategoryDetailsVo fetchDetailsVoBySid(String sid){ + RestrictedCategory entity = fetchBySid(sid); + RestrictedCategoryDetailsVo vo = new RestrictedCategoryDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } + public void readBrandPeriodSorXls1(InputStream is, String sid) { + HSSFWorkbook hssfWorkbook = null; + try { + hssfWorkbook = new HSSFWorkbook(is); + } catch (IOException e) { + e.printStackTrace(); + } + + List lisss=new ArrayList<>(); + List lisss2=new ArrayList<>(); + HSSFSheet hssfSheet = hssfWorkbook.getSheetAt(0); + + // 循环行Row + for (int rowNum = 1; rowNum <= hssfSheet.getLastRowNum(); rowNum++) { + RestrictedCategory pr=new RestrictedCategory(); + HSSFRow hssfRow = hssfSheet.getRow(rowNum); + int i = 0; + try{ + if(rowNum>=1){ + for ( ; i < hssfRow.getLastCellNum(); i++) { + HSSFCell brandIdHSSFCell = hssfRow.getCell(i); + if(brandIdHSSFCell!=null){ + if (i == 1) {//编码 + brandIdHSSFCell.setCellType(CellType.STRING); + if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { + String value = brandIdHSSFCell.getStringCellValue(); + pr.setCategorys(value); + } + } + if (i == 2) {//名称 + brandIdHSSFCell.setCellType(CellType.STRING); + if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { + String value = brandIdHSSFCell.getStringCellValue(); + pr.setBrands(value); + } + } + }else{ + System.err.println("rowNum="+rowNum+",i="+i+",value=null"); + } + } + } + }catch(Exception e){ + e.printStackTrace(); + System.err.println("i="+i+",value=null"); + } + + lisss.add(rowNum+""); + baseMapper.insert(pr); + log.info("productInformation:{}", JSONObject.toJSONString(pr)); + } + String x = JSON.toJSONString(lisss); + System.out.println(x); + String x1 = JSON.toJSONString(lisss2); + System.out.println(x1); + //return message; + } + + public List limitJudgement(String categoryKey, String brandSid) { + return baseMapper.limitJudgement(categoryKey,brandSid); + } +} \ No newline at end of file