diff --git a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/productinformation/ProductInformation.java b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/productinformation/ProductInformation.java
new file mode 100644
index 00000000..c16f87c3
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/productinformation/ProductInformation.java
@@ -0,0 +1,156 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.api.productinformation;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.yxt.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * Project: supervise-customer(客户中心)
+ * File: ProductInformation.java
+ * Class: com.supervise.customer.api.productinformation.ProductInformation
+ * Description: 商品档案信息.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-11 11:40:29
+ *
+ * @author dongjianzhao
+ * @version 1.0
+ * @since 1.0
+ */
+@Data
+@ApiModel(value = "商品档案信息", description = "商品档案信息")
+@TableName("product_information")
+public class ProductInformation extends BaseEntity {
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty("代码")
+ private String code;
+ @ApiModelProperty("名称")
+ private String name;
+ @ApiModelProperty("含量")
+ private String content;
+ @ApiModelProperty("类别")
+ private String category;
+ @ApiModelProperty("类别key")
+ private String categoryKey;
+ @ApiModelProperty("规格单位")
+ private String unit;
+ @ApiModelProperty("制造厂")
+ private String manufacturer;
+ @ApiModelProperty("制造厂sid")
+ private String manufacturerSid;
+ @ApiModelProperty("品牌")
+ private String brand;
+ @ApiModelProperty("品牌sid")
+ private String brandSid;
+ @ApiModelProperty("产地")
+ private String placeOfOrigin;
+ @ApiModelProperty("等级")
+ private String grade;
+ @ApiModelProperty("等级key")
+ private String gradeKey;
+ @ApiModelProperty("保质期")
+ private String qualityGuaranteePeriod;
+ @ApiModelProperty("部门")
+ private String deptartment;
+ @ApiModelProperty("货架")
+ private String goodsShelves;
+ @ApiModelProperty("货架code")
+ private String goodsShelvesCode;
+ @ApiModelProperty("第二代码")
+ private String secondCode;
+ @ApiModelProperty("毛利率")
+ private String grossProfitMargin;
+ @ApiModelProperty("采购员")
+ private String buyer;
+ @ApiModelProperty("核算售价")
+ private String accountingSalesPrice;
+ @ApiModelProperty("最新进价(系统中导出的)")
+ private String latestPurchasePrice;
+ @ApiModelProperty("库存价")
+ private String inventoryPrice;
+ @ApiModelProperty("合同进价")
+ private String contractPurchasePrice;
+ @ApiModelProperty("会员价")
+ private String membershipPrice;
+ @ApiModelProperty("进项税率")
+ private String inputTaxRate;
+ @ApiModelProperty("销项税率")
+ private String outputTaxRate;
+ @ApiModelProperty("仓位")
+ private String position;
+ @ApiModelProperty("仓位code")
+ private String positionCode;
+ @ApiModelProperty("结算供应商")
+ private String supplier;
+ @ApiModelProperty("结算供应商Sid")
+ private String supplierSid;
+ @ApiModelProperty("配货方式")
+ private String distributionMethod;
+ @ApiModelProperty("配货方式Key")
+ private String distributionMethodKey;
+ @ApiModelProperty("来源单位")
+ private String sourceUnit;
+ @ApiModelProperty("管理到效期")
+ private String managementExpirationDate;
+ @ApiModelProperty("配货价")
+ private String rationingPrice;
+ @ApiModelProperty("最低售价")
+ private String lowestSellingPrice;
+ @ApiModelProperty("缺省进价")
+ private String defaultPurchasePrice;
+ @ApiModelProperty("批发价")
+ private String tradePrice;
+ @ApiModelProperty("规格说明")
+ private String specifications;
+ @ApiModelProperty("规格长宽高")
+ private String description;
+ @ApiModelProperty("规格重量")
+ private String weight;
+ @ApiModelProperty("最后调价时间")
+ private Date priceAdjustmentTime;
+ @ApiModelProperty("对方系统代码")
+ private String systemCode;
+ @ApiModelProperty("去税最新进价")
+ private String priceWithoutTax;
+ @ApiModelProperty("去税库存价")
+ private String taxableInventoryPrice;
+ @ApiModelProperty("去税合同进价")
+ private String ContractPriceExcludingTax;
+ @ApiModelProperty("商品状态")
+ private String productStatus;
+ @ApiModelProperty("商品状态key")
+ private String productStatusKey;
+ @ApiModelProperty("最新进价(需要每次导入采购订单更新的)")
+ private String newestPurchasePrice;
+}
diff --git a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/productinformation/ProductInformationDetailsVo.java b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/productinformation/ProductInformationDetailsVo.java
new file mode 100644
index 00000000..4bb9bbed
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/productinformation/ProductInformationDetailsVo.java
@@ -0,0 +1,175 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.api.productinformation;
+
+
+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: supervise-customer(客户中心)
+ * File: ProductInformationVo.java
+ * Class: com.supervise.customer.api.productinformation.ProductInformationVo
+ * Description: 商品档案信息 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-11 11:40:29
+ *
+ * @author dongjianzhao
+ * @version 1.0
+ * @since 1.0
+ */
+@Data
+@ApiModel(value = "商品档案信息 视图数据详情", description = "商品档案信息 视图数据详情")
+public class ProductInformationDetailsVo implements Vo {
+
+ private static final long serialVersionUID = -7305436694722608899L;
+ private String sid;
+
+ @ApiModelProperty("记录版本,锁")
+ private String lock_version;
+ @ApiModelProperty("创建者")
+ private String create_sid;
+ @ApiModelProperty("更新者")
+ private String modify_sid;
+ @ApiModelProperty("记录是否可用,1:可用,0:不可用")
+ private String is_enable;
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @ApiModelProperty("记录创建时间")
+ private Date create_timeStart;
+ private Date create_timeEnd;
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @ApiModelProperty("记录最后修改时间")
+ private Date modify_timeStart;
+ private Date modify_timeEnd;
+ @ApiModelProperty("记录是否被删除,0:未删除,1:已经删除")
+ private String is_delete;
+ @ApiModelProperty("代码")
+ private String code;
+ @ApiModelProperty("名称")
+ private String name;
+ @ApiModelProperty("含量")
+ private String content;
+ @ApiModelProperty("类别")
+ private String category;
+ @ApiModelProperty("类别key")
+ private String categoryKey;
+ @ApiModelProperty("规格单位")
+ private String unit;
+ @ApiModelProperty("制造厂")
+ private String manufacturer;
+ @ApiModelProperty("制造厂sid")
+ private String manufacturerSid;
+ @ApiModelProperty("品牌")
+ private String brand;
+ @ApiModelProperty("品牌sid")
+ private String brandSid;
+ @ApiModelProperty("产地")
+ private String placeOfOrigin;
+ @ApiModelProperty("等级")
+ private String grade;
+ @ApiModelProperty("等级key")
+ private String gradeKey;
+ @ApiModelProperty("保质期")
+ private String qualityGuaranteePeriod;
+ @ApiModelProperty("部门")
+ private String deptartment;
+ @ApiModelProperty("货架")
+ private String goodsShelves;
+ @ApiModelProperty("货架code")
+ private String goodsShelvesCode;
+ @ApiModelProperty("第二代码")
+ private String secondCode;
+ @ApiModelProperty("毛利率")
+ private String grossProfitMargin;
+ @ApiModelProperty("采购员")
+ private String buyer;
+ @ApiModelProperty("核算售价")
+ private String accountingSalesPrice;
+ @ApiModelProperty("最新进价")
+ private String latestPurchasePrice;
+ @ApiModelProperty("库存价")
+ private String inventoryPrice;
+ @ApiModelProperty("合同进价")
+ private String contractPurchasePrice;
+ @ApiModelProperty("会员价")
+ private String membershipPrice;
+ @ApiModelProperty("进项税率")
+ private String inputTaxRate;
+ @ApiModelProperty("销项税率")
+ private String outputTaxRate;
+ @ApiModelProperty("仓位")
+ private String position;
+ @ApiModelProperty("仓位code")
+ private String positionCode;
+ @ApiModelProperty("结算供应商")
+ private String supplier;
+ @ApiModelProperty("结算供应商Sid")
+ private String supplierSid;
+ @ApiModelProperty("配货方式")
+ private String distributionMethod;
+ @ApiModelProperty("配货方式Key")
+ private String distributionMethodKey;
+ @ApiModelProperty("来源单位")
+ private String sourceUnit;
+ @ApiModelProperty("管理到效期")
+ private String managementExpirationDate;
+ @ApiModelProperty("配货价")
+ private String rationingPrice;
+ @ApiModelProperty("最低售价")
+ private String lowestSellingPrice;
+ @ApiModelProperty("缺省进价")
+ private String defaultPurchasePrice;
+ @ApiModelProperty("批发价")
+ private String tradePrice;
+ @ApiModelProperty("规格说明")
+ private String specifications;
+ @ApiModelProperty("规格长宽高")
+ private String description;
+ @ApiModelProperty("规格重量")
+ private String weight;
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @ApiModelProperty("最后调价时间")
+ private Date priceAdjustmentTimeStart;
+ private Date priceAdjustmentTimeEnd;
+ @ApiModelProperty("对方系统代码")
+ private String systemCode;
+ @ApiModelProperty("去税最新进价")
+ private String priceWithoutTax;
+ @ApiModelProperty("去税库存价")
+ private String taxableInventoryPrice;
+ @ApiModelProperty("去税合同进价")
+ private String ContractPriceExcludingTax;
+ @ApiModelProperty("商品状态")
+ private String productStatus;
+ @ApiModelProperty("最新进价(需要每次导入采购订单更新的)")
+ private String newestPurchasePrice;
+}
\ No newline at end of file
diff --git a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/productinformation/ProductInformationDto.java b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/productinformation/ProductInformationDto.java
new file mode 100644
index 00000000..ee4d53ab
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/productinformation/ProductInformationDto.java
@@ -0,0 +1,175 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.api.productinformation;
+
+
+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: supervise-customer(客户中心)
+ * File: ProductInformationDto.java
+ * Class: com.supervise.customer.api.productinformation.ProductInformationDto
+ * Description: 商品档案信息 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-11 11:40:29
+ *
+ * @author dongjianzhao
+ * @version 1.0
+ * @since 1.0
+ */
+@Data
+@ApiModel(value = "商品档案信息 数据传输对象", description = "商品档案信息 数据传输对象")
+public class ProductInformationDto implements Dto {
+
+ private static final long serialVersionUID = 2628182250934148420L;
+ private String sid;
+
+ @ApiModelProperty("记录版本,锁")
+ private String lock_version;
+ @ApiModelProperty("创建者")
+ private String create_sid;
+ @ApiModelProperty("更新者")
+ private String modify_sid;
+ @ApiModelProperty("记录是否可用,1:可用,0:不可用")
+ private String is_enable;
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @ApiModelProperty("记录创建时间")
+ private Date create_timeStart;
+ private Date create_timeEnd;
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @ApiModelProperty("记录最后修改时间")
+ private Date modify_timeStart;
+ private Date modify_timeEnd;
+ @ApiModelProperty("记录是否被删除,0:未删除,1:已经删除")
+ private String is_delete;
+ @ApiModelProperty("代码")
+ private String code;
+ @ApiModelProperty("名称")
+ private String name;
+ @ApiModelProperty("含量")
+ private String content;
+ @ApiModelProperty("类别")
+ private String category;
+ @ApiModelProperty("类别key")
+ private String categoryKey;
+ @ApiModelProperty("规格单位")
+ private String unit;
+ @ApiModelProperty("制造厂")
+ private String manufacturer;
+ @ApiModelProperty("制造厂sid")
+ private String manufacturerSid;
+ @ApiModelProperty("品牌")
+ private String brand;
+ @ApiModelProperty("品牌sid")
+ private String brandSid;
+ @ApiModelProperty("产地")
+ private String placeOfOrigin;
+ @ApiModelProperty("等级")
+ private String grade;
+ @ApiModelProperty("等级key")
+ private String gradeKey;
+ @ApiModelProperty("保质期")
+ private String qualityGuaranteePeriod;
+ @ApiModelProperty("部门")
+ private String deptartment;
+ @ApiModelProperty("货架")
+ private String goodsShelves;
+ @ApiModelProperty("货架code")
+ private String goodsShelvesCode;
+ @ApiModelProperty("第二代码")
+ private String secondCode;
+ @ApiModelProperty("毛利率")
+ private String grossProfitMargin;
+ @ApiModelProperty("采购员")
+ private String buyer;
+ @ApiModelProperty("核算售价")
+ private String accountingSalesPrice;
+ @ApiModelProperty("最新进价")
+ private String latestPurchasePrice;
+ @ApiModelProperty("库存价")
+ private String inventoryPrice;
+ @ApiModelProperty("合同进价")
+ private String contractPurchasePrice;
+ @ApiModelProperty("会员价")
+ private String membershipPrice;
+ @ApiModelProperty("进项税率")
+ private String inputTaxRate;
+ @ApiModelProperty("销项税率")
+ private String outputTaxRate;
+ @ApiModelProperty("仓位")
+ private String position;
+ @ApiModelProperty("仓位code")
+ private String positionCode;
+ @ApiModelProperty("结算供应商")
+ private String supplier;
+ @ApiModelProperty("结算供应商Sid")
+ private String supplierSid;
+ @ApiModelProperty("配货方式")
+ private String distributionMethod;
+ @ApiModelProperty("配货方式Key")
+ private String distributionMethodKey;
+ @ApiModelProperty("来源单位")
+ private String sourceUnit;
+ @ApiModelProperty("管理到效期")
+ private String managementExpirationDate;
+ @ApiModelProperty("配货价")
+ private String rationingPrice;
+ @ApiModelProperty("最低售价")
+ private String lowestSellingPrice;
+ @ApiModelProperty("缺省进价")
+ private String defaultPurchasePrice;
+ @ApiModelProperty("批发价")
+ private String tradePrice;
+ @ApiModelProperty("规格说明")
+ private String specifications;
+ @ApiModelProperty("规格长宽高")
+ private String description;
+ @ApiModelProperty("规格重量")
+ private String weight;
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @ApiModelProperty("最后调价时间")
+ private Date priceAdjustmentTimeStart;
+ private Date priceAdjustmentTimeEnd;
+ @ApiModelProperty("对方系统代码")
+ private String systemCode;
+ @ApiModelProperty("去税最新进价")
+ private String priceWithoutTax;
+ @ApiModelProperty("去税库存价")
+ private String taxableInventoryPrice;
+ @ApiModelProperty("去税合同进价")
+ private String ContractPriceExcludingTax;
+ @ApiModelProperty("商品状态")
+ private String productStatus;
+ @ApiModelProperty("最新进价(需要每次导入采购订单更新的)")
+ private String newestPurchasePrice;
+}
\ No newline at end of file
diff --git a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/productinformation/ProductInformationFeign.java b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/productinformation/ProductInformationFeign.java
new file mode 100644
index 00000000..681ee950
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/productinformation/ProductInformationFeign.java
@@ -0,0 +1,76 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.api.productinformation;
+
+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: yxt_supervise(宇信通监管)
+ * File: ProductInformationFeign.java
+ * Class: com.supervise.api.productinformation.ProductInformationFeign
+ * Description: 商品档案信息.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-11 11:40:29
+ *
+ * @author dongjianzhao
+ * @version 1.0
+ * @since 1.0
+ */
+@Api(tags = "商品档案信息")
+@FeignClient(
+ contextId = "supervise-customer-ProductInformation",
+ name = "supervise-customer",
+ path = "v1/productinformation",
+ fallback = ProductInformationFeignFallback.class)
+public interface ProductInformationFeign {
+
+ @ApiOperation("根据条件分页查询数据的列表")
+ @PostMapping("/listPage")
+ @ResponseBody
+ public ResultBean> listPage(@RequestBody PagerQuery pq);
+
+ @ApiOperation("新增或修改")
+ @PostMapping("/save")
+ @ResponseBody
+ public ResultBean save(@RequestBody ProductInformationDto 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-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/productinformation/ProductInformationFeignFallback.java b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/productinformation/ProductInformationFeignFallback.java
new file mode 100644
index 00000000..358ea9d4
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/productinformation/ProductInformationFeignFallback.java
@@ -0,0 +1,70 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.api.productinformation;
+
+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: supervise-customer(客户中心)
+ * File: ProductInformationFeignFallback.java
+ * Class: com.supervise.customer.api.productinformation.ProductInformationFeignFallback
+ * Description: 商品档案信息.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-11 11:40:29
+ *
+ * @author dongjianzhao
+ * @version 1.0
+ * @since 1.0
+ */
+@Component
+public class ProductInformationFeignFallback implements ProductInformationFeign {
+
+ @Override
+ public ResultBean> listPage(PagerQuery pq) {
+ ResultBean rb = ResultBean.fireFail();
+ return rb.setMsg("接口yxt_supervise/productinformation/listPage无法访问");
+ }
+
+ @Override
+ public ResultBean save(ProductInformationDto dto) {
+ return ResultBean.fireFail().setMsg("接口yxt_supervise/productinformation/save无法访问");
+ }
+
+ @Override
+ public ResultBean delBySids(String[] sids) {
+ return ResultBean.fireFail().setMsg("接口yxt_supervise/productinformation/delBySids无法访问");
+ }
+
+ @Override
+ public ResultBean fetchDetailsBySid(String sid) {
+ ResultBean rb = ResultBean.fireFail();
+ return rb.setMsg("接口yxt_supervise/productinformation/fetchDetailsBySid无法访问");
+ }
+}
\ No newline at end of file
diff --git a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/productinformation/ProductInformationQuery.java b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/productinformation/ProductInformationQuery.java
new file mode 100644
index 00000000..7cdc930f
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/productinformation/ProductInformationQuery.java
@@ -0,0 +1,173 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.api.productinformation;
+
+
+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: supervise-customer(客户中心)
+ * File: ProductInformationQuery.java
+ * Class: com.supervise.customer.api.productinformation.ProductInformationQuery
+ * Description: 商品档案信息 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-11 11:40:29
+ *
+ * @author dongjianzhao
+ * @version 1.0
+ * @since 1.0
+ */
+@Data
+@ApiModel(value = "商品档案信息 查询条件", description = "商品档案信息 查询条件")
+public class ProductInformationQuery implements Query {
+
+ private static final long serialVersionUID = -2156227778094595808L;
+ @ApiModelProperty("记录版本,锁")
+ private String lock_version;
+ @ApiModelProperty("创建者")
+ private String create_sid;
+ @ApiModelProperty("更新者")
+ private String modify_sid;
+ @ApiModelProperty("记录是否可用,1:可用,0:不可用")
+ private String is_enable;
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @ApiModelProperty("记录创建时间")
+ private Date create_timeStart;
+ private Date create_timeEnd;
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @ApiModelProperty("记录最后修改时间")
+ private Date modify_timeStart;
+ private Date modify_timeEnd;
+ @ApiModelProperty("记录是否被删除,0:未删除,1:已经删除")
+ private String is_delete;
+ @ApiModelProperty("代码")
+ private String code;
+ @ApiModelProperty("名称")
+ private String name;
+ @ApiModelProperty("含量")
+ private String content;
+ @ApiModelProperty("类别")
+ private String category;
+ @ApiModelProperty("类别key")
+ private String categoryKey;
+ @ApiModelProperty("规格单位")
+ private String unit;
+ @ApiModelProperty("制造厂")
+ private String manufacturer;
+ @ApiModelProperty("制造厂sid")
+ private String manufacturerSid;
+ @ApiModelProperty("品牌")
+ private String brand;
+ @ApiModelProperty("品牌sid")
+ private String brandSid;
+ @ApiModelProperty("产地")
+ private String placeOfOrigin;
+ @ApiModelProperty("等级")
+ private String grade;
+ @ApiModelProperty("等级key")
+ private String gradeKey;
+ @ApiModelProperty("保质期")
+ private String qualityGuaranteePeriod;
+ @ApiModelProperty("部门")
+ private String deptartment;
+ @ApiModelProperty("货架")
+ private String goodsShelves;
+ @ApiModelProperty("货架code")
+ private String goodsShelvesCode;
+ @ApiModelProperty("第二代码")
+ private String secondCode;
+ @ApiModelProperty("毛利率")
+ private String grossProfitMargin;
+ @ApiModelProperty("采购员")
+ private String buyer;
+ @ApiModelProperty("核算售价")
+ private String accountingSalesPrice;
+ @ApiModelProperty("最新进价")
+ private String latestPurchasePrice;
+ @ApiModelProperty("库存价")
+ private String inventoryPrice;
+ @ApiModelProperty("合同进价")
+ private String contractPurchasePrice;
+ @ApiModelProperty("会员价")
+ private String membershipPrice;
+ @ApiModelProperty("进项税率")
+ private String inputTaxRate;
+ @ApiModelProperty("销项税率")
+ private String outputTaxRate;
+ @ApiModelProperty("仓位")
+ private String position;
+ @ApiModelProperty("仓位code")
+ private String positionCode;
+ @ApiModelProperty("结算供应商")
+ private String supplier;
+ @ApiModelProperty("结算供应商Sid")
+ private String supplierSid;
+ @ApiModelProperty("配货方式")
+ private String distributionMethod;
+ @ApiModelProperty("配货方式Key")
+ private String distributionMethodKey;
+ @ApiModelProperty("来源单位")
+ private String sourceUnit;
+ @ApiModelProperty("管理到效期")
+ private String managementExpirationDate;
+ @ApiModelProperty("配货价")
+ private String rationingPrice;
+ @ApiModelProperty("最低售价")
+ private String lowestSellingPrice;
+ @ApiModelProperty("缺省进价")
+ private String defaultPurchasePrice;
+ @ApiModelProperty("批发价")
+ private String tradePrice;
+ @ApiModelProperty("规格说明")
+ private String specifications;
+ @ApiModelProperty("规格长宽高")
+ private String description;
+ @ApiModelProperty("规格重量")
+ private String weight;
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @ApiModelProperty("最后调价时间")
+ private Date priceAdjustmentTimeStart;
+ private Date priceAdjustmentTimeEnd;
+ @ApiModelProperty("对方系统代码")
+ private String systemCode;
+ @ApiModelProperty("去税最新进价")
+ private String priceWithoutTax;
+ @ApiModelProperty("去税库存价")
+ private String taxableInventoryPrice;
+ @ApiModelProperty("去税合同进价")
+ private String ContractPriceExcludingTax;
+ @ApiModelProperty("商品状态")
+ private String productStatus;
+ @ApiModelProperty("最新进价(需要每次导入采购订单更新的)")
+ private String newestPurchasePrice;
+}
diff --git a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/productinformation/ProductInformationVo.java b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/productinformation/ProductInformationVo.java
new file mode 100644
index 00000000..10e75dfe
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/productinformation/ProductInformationVo.java
@@ -0,0 +1,152 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.api.productinformation;
+
+
+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: supervise-customer(客户中心)
+ * File: ProductInformationVo.java
+ * Class: com.supervise.customer.api.productinformation.ProductInformationVo
+ * Description: 商品档案信息 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-11 11:40:29
+ *
+ * @author dongjianzhao
+ * @version 1.0
+ * @since 1.0
+ */
+@Data
+@ApiModel(value = "商品档案信息 视图数据对象", description = "商品档案信息 视图数据对象")
+public class ProductInformationVo implements Vo {
+
+ private static final long serialVersionUID = 8544481348404723979L;
+ private String sid;
+ @ApiModelProperty("代码")
+ private String code;
+ @ApiModelProperty("名称")
+ private String name;
+ @ApiModelProperty("含量")
+ private String content;
+ @ApiModelProperty("类别")
+ private String category;
+ @ApiModelProperty("类别key")
+ private String categoryKey;
+ @ApiModelProperty("规格单位")
+ private String unit;
+ @ApiModelProperty("制造厂")
+ private String manufacturer;
+ @ApiModelProperty("制造厂sid")
+ private String manufacturerSid;
+ @ApiModelProperty("品牌")
+ private String brand;
+ @ApiModelProperty("品牌sid")
+ private String brandSid;
+ @ApiModelProperty("产地")
+ private String placeOfOrigin;
+ @ApiModelProperty("等级")
+ private String grade;
+ @ApiModelProperty("等级key")
+ private String gradeKey;
+ @ApiModelProperty("保质期")
+ private String qualityGuaranteePeriod;
+ @ApiModelProperty("部门")
+ private String deptartment;
+ @ApiModelProperty("货架")
+ private String goodsShelves;
+ @ApiModelProperty("货架code")
+ private String goodsShelvesCode;
+ @ApiModelProperty("第二代码")
+ private String secondCode;
+ @ApiModelProperty("毛利率")
+ private String grossProfitMargin;
+ @ApiModelProperty("采购员")
+ private String buyer;
+ @ApiModelProperty("核算售价")
+ private String accountingSalesPrice;
+ @ApiModelProperty("最新进价")
+ private String latestPurchasePrice;
+ @ApiModelProperty("库存价")
+ private String inventoryPrice;
+ @ApiModelProperty("合同进价")
+ private String contractPurchasePrice;
+ @ApiModelProperty("会员价")
+ private String membershipPrice;
+ @ApiModelProperty("进项税率")
+ private String inputTaxRate;
+ @ApiModelProperty("销项税率")
+ private String outputTaxRate;
+ @ApiModelProperty("仓位")
+ private String position;
+ @ApiModelProperty("仓位code")
+ private String positionCode;
+ @ApiModelProperty("结算供应商")
+ private String supplier;
+ @ApiModelProperty("结算供应商Sid")
+ private String supplierSid;
+ @ApiModelProperty("配货方式")
+ private String distributionMethod;
+ @ApiModelProperty("配货方式Key")
+ private String distributionMethodKey;
+ @ApiModelProperty("来源单位")
+ private String sourceUnit;
+ @ApiModelProperty("管理到效期")
+ private String managementExpirationDate;
+ @ApiModelProperty("配货价")
+ private String rationingPrice;
+ @ApiModelProperty("最低售价")
+ private String lowestSellingPrice;
+ @ApiModelProperty("缺省进价")
+ private String defaultPurchasePrice;
+ @ApiModelProperty("批发价")
+ private String tradePrice;
+ @ApiModelProperty("规格说明")
+ private String specifications;
+ @ApiModelProperty("规格长宽高")
+ private String description;
+ @ApiModelProperty("规格重量")
+ private String weight;
+ @ApiModelProperty("对方系统代码")
+ private String systemCode;
+ @ApiModelProperty("去税最新进价")
+ private String priceWithoutTax;
+ @ApiModelProperty("去税库存价")
+ private String taxableInventoryPrice;
+ @ApiModelProperty("去税合同进价")
+ private String ContractPriceExcludingTax;
+ @ApiModelProperty("商品状态")
+ private String productStatus;
+ @ApiModelProperty("最新进价(需要每次导入采购订单更新的)")
+ private String newestPurchasePrice;
+}
diff --git a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrand.java b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrand.java
index 151bbfc6..a2dd672f 100644
--- a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrand.java
+++ b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrand.java
@@ -50,9 +50,9 @@ import lombok.Data;
public class RestrictedBrand extends BaseEntity {
private static final long serialVersionUID = 1L;
- @ApiModelProperty("代码")
+ @ApiModelProperty("代码")
private String code;
- @ApiModelProperty("名称")
+ @ApiModelProperty("名称")
private String name;
}
diff --git a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrandFeign.java b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrandFeign.java
index 63d03d69..5034e5a5 100644
--- a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrandFeign.java
+++ b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrandFeign.java
@@ -65,7 +65,7 @@ public interface RestrictedBrandFeign {
public ResultBean save(@RequestBody RestrictedBrandDto dto);
@ApiOperation("根据sid删除记录")
- @DeleteMapping("/delBySids")
+ @PostMapping("/delBySids")
@ResponseBody
public ResultBean delBySids(@RequestBody String[] sids);
diff --git a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedcategory/RestrictedCategory.java b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedcategory/RestrictedCategory.java
new file mode 100644
index 00000000..eaf20fee
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedcategory/RestrictedCategory.java
@@ -0,0 +1,59 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.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: supervise-customer(客户中心)
+ * File: RestrictedCategory.java
+ * Class: com.yxt.supervise.customer.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("监管品类Key")
+ private String categoryKey;
+
+
+}
diff --git a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedcategory/RestrictedCategoryDetailsVo.java b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedcategory/RestrictedCategoryDetailsVo.java
new file mode 100644
index 00000000..b1f6d213
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedcategory/RestrictedCategoryDetailsVo.java
@@ -0,0 +1,58 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.api.restrictedcategory;
+
+
+import com.yxt.common.core.vo.Vo;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * Project: supervise-customer(客户中心)
+ * File: RestrictedCategoryVo.java
+ * Class: com.yxt.supervise.customer.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 static final long serialVersionUID = 855177717255339140L;
+ private String sid;
+ @ApiModelProperty("监管品类")
+ private String categorys;
+ @ApiModelProperty("监管品类Key")
+ private String categoryKey;
+
+}
\ No newline at end of file
diff --git a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedcategory/RestrictedCategoryDto.java b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedcategory/RestrictedCategoryDto.java
new file mode 100644
index 00000000..baf522a1
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedcategory/RestrictedCategoryDto.java
@@ -0,0 +1,58 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.api.restrictedcategory;
+
+
+import com.yxt.common.core.dto.Dto;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * Project: supervise-customer(客户中心)
+ * 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 static final long serialVersionUID = 2112403315598174369L;
+ private String sid;
+ @ApiModelProperty("监管品类")
+ private String categorys;
+ @ApiModelProperty("监管品类Key")
+ private String categoryKey;
+
+}
\ No newline at end of file
diff --git a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedcategory/RestrictedCategoryFeign.java b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedcategory/RestrictedCategoryFeign.java
new file mode 100644
index 00000000..549b00a7
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedcategory/RestrictedCategoryFeign.java
@@ -0,0 +1,76 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.api.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.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * Project: supervise-customer(客户中心)
+ * File: RestrictedCategoryFeign.java
+ * Class: com.yxt.supervise.customer.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 = "supervise-customer-RestrictedCategory",
+ name = "supervise-customer",
+ 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删除记录")
+ @PostMapping("/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-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedcategory/RestrictedCategoryFeignFallback.java b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedcategory/RestrictedCategoryFeignFallback.java
new file mode 100644
index 00000000..45b20210
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedcategory/RestrictedCategoryFeignFallback.java
@@ -0,0 +1,70 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.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;
+
+/**
+ * Project: supervise-customer(客户中心)
+ * File: RestrictedCategoryFeignFallback.java
+ * Class: com.yxt.supervise.customer.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-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedcategory/RestrictedCategoryQuery.java b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedcategory/RestrictedCategoryQuery.java
new file mode 100644
index 00000000..f41e3f43
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedcategory/RestrictedCategoryQuery.java
@@ -0,0 +1,57 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.api.restrictedcategory;
+
+
+import com.yxt.common.core.query.Query;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * Project: supervise-customer(客户中心)
+ * File: RestrictedCategoryQuery.java
+ * Class: com.yxt.supervise.customer.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 {
+
+ private static final long serialVersionUID = -8593577848480469393L;
+ @ApiModelProperty("监管品类")
+ private String categorys;
+ @ApiModelProperty("监管品类Key")
+ private String categoryKey;
+
+}
diff --git a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedcategory/RestrictedCategoryVo.java b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedcategory/RestrictedCategoryVo.java
new file mode 100644
index 00000000..5ec010c0
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedcategory/RestrictedCategoryVo.java
@@ -0,0 +1,58 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.api.restrictedcategory;
+
+
+import com.yxt.common.core.vo.Vo;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * Project: supervise-customer(客户中心)
+ * File: RestrictedCategoryVo.java
+ * Class: com.yxt.supervise.customer.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 static final long serialVersionUID = 7449291362621420732L;
+ private String sid;
+ @ApiModelProperty("监管品类")
+ private String categorys;
+ @ApiModelProperty("监管品类Key")
+ private String categoryKey;
+
+}
diff --git a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/productinformation/ProductInformationMapper.java b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/productinformation/ProductInformationMapper.java
new file mode 100644
index 00000000..0766deda
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/productinformation/ProductInformationMapper.java
@@ -0,0 +1,72 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.biz.productinformation;
+
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import com.yxt.supervise.customer.api.productinformation.ProductInformation;
+import com.yxt.supervise.customer.api.productinformation.ProductInformationVo;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
+
+/**
+ * Project: supervise-customer(客户中心)
+ * File: ProductInformationMapper.java
+ * Class: com.supervise.customer.biz.productinformation.ProductInformationMapper
+ * Description: 商品档案信息.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-11 11:40:29
+ *
+ * @author dongjianzhao
+ * @version 1.0
+ * @since 1.0
+ */
+@Mapper
+public interface ProductInformationMapper extends BaseMapper {
+
+
+ IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw);
+
+ List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw);
+
+ @Select("select * from product_information")
+ List selectListVo();
+
+ ProductInformationVo selectByCode(@Param("code") String code);
+
+ @Select("SELECT * FROM `product_information` WHERE (brandSid IN(SELECT CODE FROM restricted_brand) " +
+ "AND categoryKey IN(SELECT dictKey FROM restricted_category) AND CODE = #{code}) or (categoryKey in('081101','081102','081103'))")
+ ProductInformationVo limitJudgement(String code);
+
+ @Select("select * from product_information where sid=#{sid}")
+ ProductInformation fetchBySid(@Param("sid") String dtoSid);
+}
\ No newline at end of file
diff --git a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/productinformation/ProductInformationMapper.xml b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/productinformation/ProductInformationMapper.xml
new file mode 100644
index 00000000..4344922f
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/productinformation/ProductInformationMapper.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/productinformation/ProductInformationRest.java b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/productinformation/ProductInformationRest.java
new file mode 100644
index 00000000..6604a220
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/productinformation/ProductInformationRest.java
@@ -0,0 +1,127 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.biz.productinformation;
+
+import com.yxt.common.core.query.PagerQuery;
+import com.yxt.common.core.result.ResultBean;
+import com.yxt.common.core.vo.PagerVo;
+import com.yxt.supervise.customer.api.productinformation.*;
+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: supervise-customer(客户中心)
+ * File: ProductInformationFeignFallback.java
+ * Class: com.supervise.customer.biz.productinformation.ProductInformationRest
+ * Description: 商品档案信息.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-11 11:40:29
+ *
+ * @author dongjianzhao
+ * @version 1.0
+ * @since 1.0
+ */
+@Api(tags = "商品档案信息")
+@RestController
+@RequestMapping("v1/productinformation")
+public class ProductInformationRest implements ProductInformationFeign {
+
+ @Autowired
+ private ProductInformationService productInformationService;
+
+ @Override
+ @ApiOperation("根据条件分页查询数据的列表")
+ @PostMapping("/listPage")
+ public ResultBean> listPage(@RequestBody PagerQuery pq) {
+ ResultBean rb = ResultBean.fireFail();
+ PagerVo pv = productInformationService.listPageVo(pq);
+ return rb.success().setData(pv);
+ }
+
+ @Override
+ @ApiOperation("新增或修改")
+ @PostMapping("/save")
+ public ResultBean save(@RequestBody ProductInformationDto dto) {
+ ResultBean rb = ResultBean.fireFail();
+ productInformationService.saveOrUpdateDto(dto);
+ return rb.success();
+ }
+
+ @Override
+ @ApiOperation("根据sid批量删除")
+ @PostMapping("/delBySids")
+ public ResultBean delBySids(@RequestBody String[] sids) {
+ ResultBean rb = ResultBean.fireFail();
+ productInformationService.delBySids(sids);
+ return rb.success();
+ }
+
+ @Override
+ @ApiOperation("根据SID获取一条记录")
+ @GetMapping("/fetchDetailsBySid/{sid}")
+ public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid) {
+ ResultBean rb = ResultBean.fireFail();
+ ProductInformationDetailsVo vo = productInformationService.fetchDetailsVoBySid(sid);
+ return rb.success().setData(vo);
+ }
+
+ /*
+ @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();
+ }
+ productInformationService.readBrandPeriodSorXls1(in, "");
+ return rb;
+ }*/
+}
diff --git a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/productinformation/ProductInformationService.java b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/productinformation/ProductInformationService.java
new file mode 100644
index 00000000..6f39c133
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/productinformation/ProductInformationService.java
@@ -0,0 +1,545 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.biz.productinformation;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.yxt.common.base.service.MybatisBaseService;
+import com.yxt.common.base.utils.PagerUtil;
+import com.yxt.common.core.query.PagerQuery;
+import com.yxt.common.core.vo.PagerVo;
+import com.yxt.supervise.customer.api.productinformation.*;
+import com.yxt.supervise.customer.api.supplierbankinfo.SupplierBankInfo;
+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.List;
+
+/**
+ * Project: supervise-customer(客户中心)
+ * File: ProductInformationService.java
+ * Class: com.supervise.biz.productinformation.ProductInformationService
+ * Description: 商品档案信息 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-11 11:40:29
+ *
+ * @author dongjianzhao
+ * @version 1.0
+ * @since 1.0
+ */
+@Slf4j
+@Service
+public class ProductInformationService extends MybatisBaseService {
+ /*@Resource
+ private DictCommonService dictCommonService;
+ @Resource
+ private ManufacturerInfoService manufacturerInfoService;
+ @Resource
+ private BrandInfoService brandInfoService;
+ @Resource
+ private WarehouseShelvesService warehouseShelvesService;
+ @Resource
+ private WarehousePositionService warehousePositionService;
+ @Resource
+ private SupplierInfoService supplierInfoService;
+ @Resource
+ private SupplierBankInfoService supplierBankInfoService;*/
+ @Resource
+ private ProductInformationService productInformationService;
+
+ private QueryWrapper createQueryWrapper(ProductInformationQuery 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) {
+ ProductInformationQuery 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(ProductInformationDto dto) {
+ String dtoSid = dto.getSid();
+ if (StringUtils.isBlank(dtoSid)) {
+ this.insertByDto(dto);
+ return;
+ }
+ this.updateByDto(dto);
+ }
+
+ public void insertByDto(ProductInformationDto dto) {
+ ProductInformation entity = new ProductInformation();
+ BeanUtil.copyProperties(dto, entity, "id", "sid");
+ baseMapper.insert(entity);
+ }
+
+ public void updateByDto(ProductInformationDto dto) {
+ String dtoSid = dto.getSid();
+ if (StringUtils.isBlank(dtoSid)) {
+ return;
+ }
+ ProductInformation entity = baseMapper.fetchBySid(dtoSid);
+ BeanUtil.copyProperties(dto, entity, "id", "sid");
+ baseMapper.updateById(entity);
+ }
+
+ public ProductInformationDetailsVo fetchDetailsVoBySid(String sid) {
+ ProductInformation entity = fetchBySid(sid);
+ ProductInformationDetailsVo vo = new ProductInformationDetailsVo();
+ 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();
+ }
+
+ //商品档案信息
+ ProductInformation productInformation;
+
+// // 循环工作表Sheet
+ int aaa = 0;
+ List lisss = new ArrayList<>();
+ List lisss2 = new ArrayList<>();
+ HSSFSheet hssfSheet = hssfWorkbook.getSheetAt(0);
+ // 循环行Row
+ for (int rowNum = 1; rowNum <= hssfSheet.getLastRowNum(); rowNum++) {
+ //商品档案信息
+ productInformation = new ProductInformation();
+ //最大应急编码
+ productInformation.setState(0);
+
+ HSSFRow hssfRow = hssfSheet.getRow(rowNum);
+ int i = 0;
+ try {
+ for (; i < hssfRow.getLastCellNum(); i++) {
+ HSSFCell brandIdHSSFCell = hssfRow.getCell(i);
+ if (brandIdHSSFCell != null) {
+ if (i == 0) {//商品代码
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ String code = brandIdHSSFCell.getStringCellValue();
+ //ProductInformationVo productInformationVo = baseMapper.selectByCode(code);
+ productInformation.setCode(code);
+
+ }
+ if (i == 1) {//名称
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String name = brandIdHSSFCell.getStringCellValue();
+ productInformation.setName(name);
+ }
+ }
+ if (i == 2) {//含量
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ productInformation.setContent(value);
+ }
+ }
+ if (i == 3) {//类别
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ int i1 = value.indexOf("[");
+ String key = "";
+ String v = "";
+ *//*if(i1>=0){*//*
+ String[] split = value.split("\\[");
+ v = split[0];//类别value
+ key = split[1].replace("]", "");//key
+ DictCommonDetailsVo dictCommonDetailsVo = dictCommonService.fetchByKeyAndType(key, "category");
+ if (dictCommonDetailsVo == null) {
+ DictCommon dc = new DictCommon();
+ dc.setDictType("category");
+ dc.setDictKey(key);
+ dc.setDictValue(v);
+ dictCommonService.insert(dc);
+ }
+ productInformation.setCategory(v);
+ productInformation.setCategoryKey(key);
+ }
+ }
+ if (i == 4) {//单位
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ productInformation.setUnit(value);
+ }
+ }
+ if (i == 5) {//制造厂
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ ManufacturerInfoVo manufacturerInfoVo = manufacturerInfoService.selectByName(value);
+ if (manufacturerInfoVo == null) {
+ manufacturerInfoVo = new ManufacturerInfoVo();
+ ManufacturerInfo m = new ManufacturerInfo();
+ m.setName(value);
+ manufacturerInfoService.insert(m);
+ manufacturerInfoVo.setSid(m.getSid());
+ }
+ productInformation.setManufacturer(value);
+ productInformation.setManufacturerSid(manufacturerInfoVo.getSid());
+ }
+ }
+ if (i == 6) {//品牌
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ String[] split = value.split("\\[");
+ String v = split[0];//类别value
+ String key = split[1].replace("]", "");//key
+
+ BrandInfoVo brandInfoVo = brandInfoService.selectByCode(key);
+ if (brandInfoVo == null) {
+ brandInfoVo = new BrandInfoVo();
+ BrandInfo dc = new BrandInfo();
+ dc.setCode(key);
+ dc.setName(v);
+ brandInfoService.insert(dc);
+ brandInfoVo.setSid(dc.getSid());
+ }
+ productInformation.setBrand(v);
+ productInformation.setBrandSid(key);
+ }
+ }
+ if (i == 7) {//产地
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ productInformation.setPlaceOfOrigin(value);
+ }
+ }
+ if (i == 8) {//等级 等级key
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+
+
+ DictCommonDetailsVo dictCommonDetailsVo = dictCommonService.fetchByKeyAndType(value, "grade");
+ if (dictCommonDetailsVo == null) {
+ DictCommon dc = new DictCommon();
+ dc.setDictType("grade");
+ dc.setDictKey(value);
+ dc.setDictValue(value);
+ dictCommonService.insert(dc);
+ }
+ productInformation.setGrade(value);
+ productInformation.setGradeKey(value);
+ }
+ }
+ if (i == 9) {//保质期 qualityGuaranteePeriod
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ productInformation.setQualityGuaranteePeriod(value);
+ }
+ }
+ if (i == 10) {//货架 货架code
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ WarehouseShelvesVo warehouseShelvesVo = warehouseShelvesService.selectByCode(value);
+ if (warehouseShelvesVo == null) {
+ WarehouseShelves dc = new WarehouseShelves();
+ dc.setCode(value);
+ warehouseShelvesService.insert(dc);
+ }
+ productInformation.setGoodsShelves(value);
+ productInformation.setGoodsShelvesCode(value);
+ }
+ }
+ if (i == 11) {//第二代码
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ productInformation.setSecondCode(value);
+ }
+ }
+ if (i == 12) {//毛利率
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ productInformation.setGrossProfitMargin(value);
+ }
+ }
+ if (i == 13) {//核算售价
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ productInformation.setAccountingSalesPrice(value);
+ }
+ }
+ if (i == 14) {//最新进价
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ productInformation.setLatestPurchasePrice(value);
+ }
+ }
+ if (i == 15) {//库存价
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ productInformation.setInventoryPrice(value);
+ }
+ }
+ if (i == 16) {//合同进价
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ productInformation.setContractPurchasePrice(value);
+ }
+ }
+ if (i == 17) {//会员价
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ productInformation.setMembershipPrice(value);
+ }
+ }
+ if (i == 18) {//进项税率
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ productInformation.setInputTaxRate(value);
+ }
+ }
+ if (i == 19) {//销项税率
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ productInformation.setOutputTaxRate(value);
+ }
+ }
+ if (i == 20) {//仓位 仓位code
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ String[] split = value.split("\\[");
+ String v = split[0];//类别value
+ String key = split[1].replace("]", "");//key
+
+ WarehousePositionVo warehousePositionVo = warehousePositionService.selectByCode(key);
+ if (warehousePositionVo == null) {
+ WarehousePosition dc = new WarehousePosition();
+ dc.setCode(key);
+ dc.setName(v);
+ warehousePositionService.insert(dc);
+ }
+ productInformation.setPosition(key);
+ productInformation.setPositionCode(key);
+ }
+ }
+ if (i == 21) {//结算供应商 结算供应商Sid
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ String[] split = value.split("\\[");
+ String v = split[0];//类别value
+ String key = split[1].replace("]", "");//key
+ SupplierInfoVo supplierInfoVo = supplierInfoService.selectByCode(key);
+ if (supplierInfoVo == null) {
+ supplierInfoVo = new SupplierInfoVo();
+ SupplierBankInfo sbi = new SupplierBankInfo();// m=new SupplierInfo();
+ sbi.setName(v);
+ sbi.setCodeUnified(key);
+ supplierBankInfoService.insert(sbi);
+ supplierInfoVo.setSid(sbi.getSid());
+ }
+ productInformation.setSupplier(v);
+ productInformation.setSupplierSid(supplierInfoVo.getSid());
+ }
+ }
+ if (i == 22) {//配货方式 配货方式Key
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+
+ DictCommonDetailsVo dictCommonDetailsVo = dictCommonService.fetchByKeyAndType(value, "distributionMethod");
+ if (dictCommonDetailsVo == null) {
+ DictCommon dc = new DictCommon();
+ dc.setDictType("distributionMethod");
+ dc.setDictKey(value);
+ dc.setDictValue(value);
+ dictCommonService.insert(dc);
+ }
+ productInformation.setDistributionMethod(value);
+ productInformation.setDistributionMethodKey(value);
+ }
+ }
+ if (i == 23) {//管理到效期
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ productInformation.setManagementExpirationDate(value);
+ }
+ }
+ if (i == 24) {//配货价
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ productInformation.setRationingPrice(value);
+ }
+ }
+ if (i == 25) {//最低售价
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ productInformation.setLowestSellingPrice(value);
+ }
+ }
+ if (i == 26) {//缺省进价
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ productInformation.setDefaultPurchasePrice(value);
+ }
+ }
+ if (i == 27) {//批发价
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ productInformation.setTradePrice(value);
+ }
+ }
+ if (i == 28) {//规格说明
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ productInformation.setSpecifications(value);
+ }
+ }
+ if (i == 29) {//规格长宽高
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ productInformation.setDescription(value);
+ }
+ }
+ if (i == 30) {//规格重量
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ productInformation.setWeight(value);
+ }
+ }
+ if (i == 31) {//最后调价时间
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss");
+ productInformation.setPriceAdjustmentTime(sdf.parse(value));
+ }
+ }
+ if (i == 32) {//去税最新进价
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ productInformation.setPriceWithoutTax(value);
+ }
+ }
+ if (i == 33) {//去税库存价
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ productInformation.setTaxableInventoryPrice(value);
+ }
+ }
+ if (i == 34) {//去税合同进价
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ productInformation.setContractPriceExcludingTax(value);
+ }
+ }
+ if (i == 35) {//商品状态
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ DictCommonDetailsVo dictCommonDetailsVo = dictCommonService.fetchByKeyAndType(value, "productStatus");
+ if (dictCommonDetailsVo == null) {
+ DictCommon dc = new DictCommon();
+ dc.setDictType("productStatus");
+ dc.setDictKey(value);
+ dc.setDictValue(value);
+ dictCommonService.insert(dc);
+ }
+ productInformation.setProductStatus(value);
+ productInformation.setProductStatusKey(value);
+ }
+ }
+ } else {
+ System.err.println("rowNum=" + rowNum + ",i=" + i + ",value=null");
+ }
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.err.println("i=" + i + ",rowNum=" + rowNum);
+ }
+ String code = productInformation.getCode();
+ ProductInformationVo productInformationVo = productInformationService.selectByCode(code);
+ if (productInformationVo != null) {
+ productInformation.setSid(productInformationVo.getSid());
+ ProductInformationDto pd = new ProductInformationDto();
+ BeanUtil.copyProperties(productInformation, pd);
+ productInformationService.saveOrUpdateDto(pd);
+ } else {
+ productInformationService.insert(productInformation);
+ }
+ }
+ }*/
+
+ public ProductInformationVo selectByCode(String code) {
+ return baseMapper.selectByCode(code);
+ }
+
+ public ProductInformationVo limitJudgement(String code) {
+ return baseMapper.limitJudgement(code);
+ }
+}
\ No newline at end of file
diff --git a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandMapper.java b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandMapper.java
index 304cd634..d58b64cd 100644
--- a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandMapper.java
+++ b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandMapper.java
@@ -53,8 +53,6 @@ import java.util.List;
@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);
@@ -65,4 +63,8 @@ public interface RestrictedBrandMapper extends BaseMapper {
@Select("select * from restricted_brand where code=#{brandCode}")
RestrictedBrand selectByBrands(@Param("brandCode") String brandCode);
+
+ RestrictedBrand selectByCodeAndSid(@Param("code") String code, @Param("sid") String sid);
+
+ RestrictedBrand selectByCode(String code);
}
\ No newline at end of file
diff --git a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandMapper.xml b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandMapper.xml
index 7b802472..086bfd37 100644
--- a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandMapper.xml
+++ b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandMapper.xml
@@ -1,13 +1,34 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandRest.java b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandRest.java
index 52a34361..2e04338c 100644
--- a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandRest.java
+++ b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandRest.java
@@ -29,7 +29,6 @@ import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import com.yxt.supervise.customer.api.restrictedbrand.*;
-import com.yxt.supervise.portal.api.restrictedbrand.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
@@ -76,9 +75,7 @@ public class RestrictedBrandRest implements RestrictedBrandFeign {
@ApiOperation("新增或修改")
@PostMapping("/save")
public ResultBean save(@RequestBody RestrictedBrandDto dto) {
- ResultBean rb = ResultBean.fireFail();
- restrictedBrandService.saveOrUpdateDto(dto);
- return rb.success();
+ return restrictedBrandService.saveOrUpdateDto(dto);
}
@Override
@@ -95,12 +92,15 @@ public class RestrictedBrandRest implements RestrictedBrandFeign {
@GetMapping("/fetchDetailsBySid/{sid}")
public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid) {
ResultBean rb = ResultBean.fireFail();
+ RestrictedBrand restrictedBrand = restrictedBrandService.fetchBySid(sid);
+ if (restrictedBrand == null) {
+ return rb.setMsg("该品牌不存在");
+ }
RestrictedBrandDetailsVo vo = restrictedBrandService.fetchDetailsVoBySid(sid);
return rb.success().setData(vo);
}
- @ApiOperation(" ")
- @RequestMapping(value = "/importBrandSort", method = RequestMethod.POST)
+ // @RequestMapping(value = "/importBrandSort", method = RequestMethod.POST)
public ResultBean importBrandSort(@RequestParam("filename") MultipartFile file,
HttpServletRequest request, HttpServletResponse response) {
ResultBean rb = ResultBean.fireFail();
diff --git a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandService.java b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandService.java
index 59a5c5ef..318d2eae 100644
--- a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandService.java
+++ b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandService.java
@@ -33,6 +33,7 @@ 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.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import com.yxt.supervise.customer.api.restrictedbrand.*;
import lombok.extern.slf4j.Slf4j;
@@ -42,6 +43,7 @@ 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.context.annotation.Bean;
import org.springframework.stereotype.Service;
import java.io.IOException;
@@ -65,45 +67,51 @@ import java.util.List;
@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);
+ QueryWrapper qw = new QueryWrapper<>();
+ if (query != null) {
+ if (StringUtils.isNotBlank(query.getCode())) {
+ qw.like("code", query.getCode());
+ }
+ if (StringUtils.isNotBlank(query.getName())) {
+ qw.like("name", query.getName());
+ }
+ }
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;
+ public ResultBean saveOrUpdateDto(RestrictedBrandDto dto) {
+ ResultBean rb = ResultBean.fireFail();
+ String sid = dto.getSid();
+ String code = dto.getCode();
+ if (StringUtils.isBlank(sid)) {
+ RestrictedBrand restrictedBrand = baseMapper.selectByCode(code);
+ if (restrictedBrand != null) {
+ return rb.setMsg("该品牌编码已存在");
+ }
+ restrictedBrand = new RestrictedBrand();
+ BeanUtil.copyProperties(dto, restrictedBrand, "sid");
+ baseMapper.insert(restrictedBrand);
+ } else {
+ RestrictedBrand restrictedBrand = fetchBySid(sid);
+ if (restrictedBrand == null) {
+ return rb.setMsg("该品牌不存在");
+ }
+ //查询是否存在code值相同的
+ RestrictedBrand restrictedBrands = baseMapper.selectByCodeAndSid(code, sid);
+ if (restrictedBrands != null) {
+ return rb.setMsg("该品牌编码已存在");
+ }
+ BeanUtil.copyProperties(dto, restrictedBrand, "sid");
+ baseMapper.updateById(restrictedBrand);
}
- this.updateByDto(dto);
- }
+ return rb.success();
- 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) {
diff --git a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedcategory/RestrictedCategoryMapper.java b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedcategory/RestrictedCategoryMapper.java
new file mode 100644
index 00000000..b34f984a
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedcategory/RestrictedCategoryMapper.java
@@ -0,0 +1,75 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.biz.restrictedcategory;
+
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import com.yxt.supervise.customer.api.restrictedcategory.RestrictedCategory;
+import com.yxt.supervise.customer.api.restrictedcategory.RestrictedCategoryVo;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
+
+/**
+ * Project: supervise-customer(客户中心)
+ * File: RestrictedCategoryMapper.java
+ * Class: com.yxt.supervise.customer.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 {
+
+ 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);
+
+ @Select("select * from restricted_category where categoryKey = #{categoryKey} ")
+ RestrictedCategory selectByCategorys(@Param("categoryKey") String categoryKey);
+
+ @Select("select * from restricted_category where brands like CONCAT('%',#{brandCode},'%') ")
+ List selectByBrands(@Param("brandCode") String brand);
+
+ RestrictedCategory selectByKey(String key);
+
+ RestrictedCategory selectByKeyAndSid(@Param("key") String key, @Param("sid") String sid);
+}
\ No newline at end of file
diff --git a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedcategory/RestrictedCategoryMapper.xml b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedcategory/RestrictedCategoryMapper.xml
new file mode 100644
index 00000000..f1dfcc29
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedcategory/RestrictedCategoryMapper.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedcategory/RestrictedCategoryRest.java b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedcategory/RestrictedCategoryRest.java
new file mode 100644
index 00000000..fe33adaf
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedcategory/RestrictedCategoryRest.java
@@ -0,0 +1,128 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.biz.restrictedcategory;
+
+import com.yxt.common.core.query.PagerQuery;
+import com.yxt.common.core.result.ResultBean;
+import com.yxt.common.core.vo.PagerVo;
+import com.yxt.supervise.customer.api.restrictedcategory.*;
+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: supervise-customer(客户中心)
+ * File: RestrictedCategoryFeignFallback.java
+ * Class: com.yxt.supervise.customer.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
+@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) {
+ return restrictedCategoryService.saveOrUpdateDto(dto);
+ }
+
+ @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();
+ RestrictedCategory restrictedCategory = restrictedCategoryService.fetchBySid(sid);
+ if(restrictedCategory == null){
+ return rb.setMsg("该类别不存在");
+ }
+ RestrictedCategoryDetailsVo vo = restrictedCategoryService.fetchDetailsVoBySid(sid);
+ return rb.success().setData(vo);
+ }
+
+// @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-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedcategory/RestrictedCategoryService.java b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedcategory/RestrictedCategoryService.java
new file mode 100644
index 00000000..46f467b4
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedcategory/RestrictedCategoryService.java
@@ -0,0 +1,223 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.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 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.customer.api.restrictedcategory.*;
+import com.yxt.supervise.customer.biz.restrictedbrand.RestrictedBrandService;
+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.util.ArrayList;
+import java.util.List;
+
+/**
+ * Project: supervise-customer(客户中心)
+ * File: RestrictedCategoryService.java
+ * Class: com.yxt.supervise.customer.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 {
+ /* @Resource
+ private DictCommonService dictCommonService;
+ @Resource
+ private BrandInfoService brandInfoService;*/
+ @Resource
+ private RestrictedBrandService restrictedBrandService;
+
+ /**
+ * 分页列表
+ *
+ * @param pq
+ * @return
+ */
+ public PagerVo listPageVo(PagerQuery pq) {
+ RestrictedCategoryQuery query = pq.getParams();
+ QueryWrapper qw = new QueryWrapper<>();
+ if (query != null) {
+ if (StringUtils.isNotBlank(query.getCategorys())) {
+ qw.like("categorys", query.getCategorys());
+
+ }
+ if (StringUtils.isNotBlank(query.getCategoryKey())) {
+ qw.like("categoryKey", query.getCategoryKey());
+ }
+ }
+ IPage page = PagerUtil.queryToPage(pq);
+ IPage pagging = baseMapper.selectPageVo(page, qw);
+ PagerVo p = PagerUtil.pageToVo(pagging, null);
+ return p;
+ }
+
+ public ResultBean saveOrUpdateDto(RestrictedCategoryDto dto) {
+ ResultBean rb = ResultBean.fireFail();
+ String sid = dto.getSid();
+ String key = dto.getCategoryKey();
+ if (StringUtils.isBlank(sid)) {
+ RestrictedCategory restrictedCategory = baseMapper.selectByKey(key);
+ //查询key是否重复
+ if (restrictedCategory != null) {
+ return rb.setMsg("该类别编码已存在");
+ }
+ restrictedCategory = new RestrictedCategory();
+ BeanUtil.copyProperties(dto, restrictedCategory, "sid");
+ baseMapper.insert(restrictedCategory);
+ } else {
+ RestrictedCategory restrictedCategory = fetchBySid(sid);
+ if (restrictedCategory == null) {
+ return rb.setMsg("该类别不存在");
+ }
+ //查询该key是否存在
+ RestrictedCategory restrictedCategorys = baseMapper.selectByKeyAndSid(key, sid);
+ if (restrictedCategorys != null) {
+ return rb.setMsg("该类别编码已存在");
+ }
+ BeanUtil.copyProperties(dto, restrictedCategory, "sid");
+ baseMapper.updateById(restrictedCategory);
+ }
+ return rb.success();
+ }
+
+ 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 Map limitJudgement(String categoryKey, String brandCode) {
+ Map result = new HashMap<>();
+ RestrictedCategory r = baseMapper.selectByCategorys(categoryKey);
+ result.put("success", "1");
+ String msg = "";
+ if (r == null) {
+ result.put("success", "0");
+ DictCommonDetailsVo category = dictCommonService.fetchByKeyAndType(categoryKey, "category");
+ if (category == null) {
+ msg = msg + categoryKey + "商品品类不存在;";
+ } else {
+ msg = msg + category.getDictValue() + "[" + categoryKey + "]" + "不符合监管品类;";
+ }
+
+ }
+ RestrictedBrand r1 = restrictedBrandService.selectByBrands(brandCode);
+ if (r1 == null) {
+ result.put("success", "0");
+ BrandInfoVo brandInfoVo = brandInfoService.selectByCode(brandCode);
+ if (brandInfoVo == null) {
+ msg = msg + categoryKey + "商品品牌不存在;";
+ } else {
+ msg = msg + brandInfoVo.getName() + "[" + brandCode + "]" + "不符合监管品牌;";
+ }
+ }
+ result.put("msg", msg);
+ return result;//baseMapper.limitJudgement(categoryKey,brandSid);
+ }*/
+}
\ No newline at end of file
diff --git a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/config/Swagger2Config.java b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/config/Swagger2Config.java
new file mode 100644
index 00000000..a9e9a3e8
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/config/Swagger2Config.java
@@ -0,0 +1,36 @@
+package com.yxt.supervise.customer.config;
+
+import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+/**
+ * @author dimengzhe
+ * @date 2020/9/9 16:42
+ * @description
+ */
+@Configuration
+@EnableSwagger2
+@EnableKnife4j
+public class Swagger2Config {
+
+ @Bean
+ public Docket createRestApi() {
+ return new Docket(DocumentationType.SWAGGER_2)
+ .apiInfo(apiInfo()).select()
+ .apis(RequestHandlerSelectors.basePackage("com.yxt.supervise.customer"))
+ .paths(PathSelectors.any()).build();
+ }
+
+ private ApiInfo apiInfo() {
+ return new ApiInfoBuilder().title("监管/客户中心").description("监管/客户中心").version("1.0")
+ .build();
+ }
+}