Browse Source

客户中心监管品牌、监管品类增删改查部分修改

master
dimengzhe 2 years ago
parent
commit
45a8e2fea8
  1. 156
      yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/productinformation/ProductInformation.java
  2. 175
      yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/productinformation/ProductInformationDetailsVo.java
  3. 175
      yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/productinformation/ProductInformationDto.java
  4. 76
      yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/productinformation/ProductInformationFeign.java
  5. 70
      yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/productinformation/ProductInformationFeignFallback.java
  6. 173
      yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/productinformation/ProductInformationQuery.java
  7. 152
      yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/productinformation/ProductInformationVo.java
  8. 2
      yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrandFeign.java
  9. 59
      yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedcategory/RestrictedCategory.java
  10. 58
      yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedcategory/RestrictedCategoryDetailsVo.java
  11. 58
      yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedcategory/RestrictedCategoryDto.java
  12. 76
      yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedcategory/RestrictedCategoryFeign.java
  13. 70
      yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedcategory/RestrictedCategoryFeignFallback.java
  14. 57
      yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedcategory/RestrictedCategoryQuery.java
  15. 58
      yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedcategory/RestrictedCategoryVo.java
  16. 72
      yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/productinformation/ProductInformationMapper.java
  17. 26
      yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/productinformation/ProductInformationMapper.xml
  18. 127
      yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/productinformation/ProductInformationRest.java
  19. 545
      yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/productinformation/ProductInformationService.java
  20. 6
      yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandMapper.java
  21. 29
      yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandMapper.xml
  22. 12
      yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandRest.java
  23. 60
      yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandService.java
  24. 75
      yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedcategory/RestrictedCategoryMapper.java
  25. 34
      yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedcategory/RestrictedCategoryMapper.xml
  26. 128
      yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedcategory/RestrictedCategoryRest.java
  27. 223
      yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedcategory/RestrictedCategoryService.java
  28. 36
      yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/config/Swagger2Config.java

156
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(客户中心) <br/>
* File: ProductInformation.java <br/>
* Class: com.supervise.customer.api.productinformation.ProductInformation <br/>
* Description: 商品档案信息. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-11 11:40:29 <br/>
*
* @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;
}

175
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(客户中心) <br/>
* File: ProductInformationVo.java <br/>
* Class: com.supervise.customer.api.productinformation.ProductInformationVo <br/>
* Description: 商品档案信息 视图数据对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-11 11:40:29 <br/>
*
* @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;
}

175
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(客户中心) <br/>
* File: ProductInformationDto.java <br/>
* Class: com.supervise.customer.api.productinformation.ProductInformationDto <br/>
* Description: 商品档案信息 数据传输对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-11 11:40:29 <br/>
*
* @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;
}

76
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(宇信通监管) <br/>
* File: ProductInformationFeign.java <br/>
* Class: com.supervise.api.productinformation.ProductInformationFeign <br/>
* Description: 商品档案信息. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-11 11:40:29 <br/>
*
* @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<PagerVo<ProductInformationVo>> listPage(@RequestBody PagerQuery<ProductInformationQuery> 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<ProductInformationDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid);
}

70
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(客户中心) <br/>
* File: ProductInformationFeignFallback.java <br/>
* Class: com.supervise.customer.api.productinformation.ProductInformationFeignFallback <br/>
* Description: 商品档案信息. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-11 11:40:29 <br/>
*
* @author dongjianzhao
* @version 1.0
* @since 1.0
*/
@Component
public class ProductInformationFeignFallback implements ProductInformationFeign {
@Override
public ResultBean<PagerVo<ProductInformationVo>> listPage(PagerQuery<ProductInformationQuery> 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<ProductInformationDetailsVo> fetchDetailsBySid(String sid) {
ResultBean rb = ResultBean.fireFail();
return rb.setMsg("接口yxt_supervise/productinformation/fetchDetailsBySid无法访问");
}
}

173
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(客户中心) <br/>
* File: ProductInformationQuery.java <br/>
* Class: com.supervise.customer.api.productinformation.ProductInformationQuery <br/>
* Description: 商品档案信息 查询条件. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-11 11:40:29 <br/>
*
* @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;
}

152
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(客户中心) <br/>
* File: ProductInformationVo.java <br/>
* Class: com.supervise.customer.api.productinformation.ProductInformationVo <br/>
* Description: 商品档案信息 视图数据对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-11 11:40:29 <br/>
*
* @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;
}

2
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);

59
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(客户中心) <br/>
* File: RestrictedCategory.java <br/>
* Class: com.yxt.supervise.customer.api.restrictedcategory.RestrictedCategory <br/>
* Description: 限定品类. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-22 21:47:10 <br/>
*
* @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;
}

58
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(客户中心) <br/>
* File: RestrictedCategoryVo.java <br/>
* Class: com.yxt.supervise.customer.api.restrictedcategory.RestrictedCategoryVo <br/>
* Description: 限定品类 视图数据对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-22 21:47:10 <br/>
*
* @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;
}

58
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(客户中心) <br/>
* File: RestrictedCategoryDto.java <br/>
* Class: com.yxt.supervise.portal.api.restrictedcategory.RestrictedCategoryDto <br/>
* Description: 限定品类 数据传输对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-22 21:47:10 <br/>
*
* @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;
}

76
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(客户中心) <br/>
* File: RestrictedCategoryFeign.java <br/>
* Class: com.yxt.supervise.customer.api.restrictedcategory.RestrictedCategoryFeign <br/>
* Description: 限定品类. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-22 21:47:10 <br/>
*
* @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<PagerVo<RestrictedCategoryVo>> listPage(@RequestBody PagerQuery<RestrictedCategoryQuery> 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<RestrictedCategoryDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid);
}

70
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(客户中心) <br/>
* File: RestrictedCategoryFeignFallback.java <br/>
* Class: com.yxt.supervise.customer.api.restrictedcategory.RestrictedCategoryFeignFallback <br/>
* Description: 限定品类. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-22 21:47:10 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Component
public class RestrictedCategoryFeignFallback implements RestrictedCategoryFeign {
@Override
public ResultBean<PagerVo<RestrictedCategoryVo>> listPage(PagerQuery<RestrictedCategoryQuery> 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<RestrictedCategoryDetailsVo> fetchDetailsBySid(String sid) {
ResultBean rb = ResultBean.fireFail();
return rb.setMsg("接口yxt-supervise/restrictedcategory/fetchDetailsBySid无法访问");
}
}

57
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(客户中心) <br/>
* File: RestrictedCategoryQuery.java <br/>
* Class: com.yxt.supervise.customer.api.restrictedcategory.RestrictedCategoryQuery <br/>
* Description: 限定品类 查询条件. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-22 21:47:10 <br/>
*
* @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;
}

58
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(客户中心) <br/>
* File: RestrictedCategoryVo.java <br/>
* Class: com.yxt.supervise.customer.api.restrictedcategory.RestrictedCategoryVo <br/>
* Description: 限定品类 视图数据对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-22 21:47:10 <br/>
*
* @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;
}

72
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(客户中心) <br/>
* File: ProductInformationMapper.java <br/>
* Class: com.supervise.customer.biz.productinformation.ProductInformationMapper <br/>
* Description: 商品档案信息. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-11 11:40:29 <br/>
*
* @author dongjianzhao
* @version 1.0
* @since 1.0
*/
@Mapper
public interface ProductInformationMapper extends BaseMapper<ProductInformation> {
IPage<ProductInformationVo> selectPageVo(IPage<ProductInformation> page, @Param(Constants.WRAPPER) Wrapper<ProductInformation> qw);
List<ProductInformationVo> selectListAllVo(@Param(Constants.WRAPPER) Wrapper<ProductInformation> qw);
@Select("select * from product_information")
List<ProductInformationVo> 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);
}

26
yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/productinformation/ProductInformationMapper.xml

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yxt.supervise.customer.biz.productinformation.ProductInformationMapper">
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="selectPageVo" resultType="com.yxt.supervise.customer.api.productinformation.ProductInformationVo">
SELECT *
FROM product_information
<where>
${ew.sqlSegment}
</where>
</select>
<select id="selectListAllVo" resultType="com.yxt.supervise.customer.api.productinformation.ProductInformationVo">
SELECT *
FROM product_information
<where>
${ew.sqlSegment}
</where>
</select>
<select id="selectByCode" resultType="com.yxt.supervise.customer.api.productinformation.ProductInformationVo">
select *
from product_information
where code = #{code}
</select>
</mapper>

127
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(客户中心) <br/>
* File: ProductInformationFeignFallback.java <br/>
* Class: com.supervise.customer.biz.productinformation.ProductInformationRest <br/>
* Description: 商品档案信息. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-11 11:40:29 <br/>
*
* @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<PagerVo<ProductInformationVo>> listPage(@RequestBody PagerQuery<ProductInformationQuery> pq) {
ResultBean rb = ResultBean.fireFail();
PagerVo<ProductInformationVo> 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<ProductInformationDetailsVo> 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;
}*/
}

545
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(客户中心) <br/>
* File: ProductInformationService.java <br/>
* Class: com.supervise.biz.productinformation.ProductInformationService <br/>
* Description: 商品档案信息 业务逻辑. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-11 11:40:29 <br/>
*
* @author dongjianzhao
* @version 1.0
* @since 1.0
*/
@Slf4j
@Service
public class ProductInformationService extends MybatisBaseService<ProductInformationMapper, ProductInformation> {
/*@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<ProductInformation> createQueryWrapper(ProductInformationQuery query) {
// todo: 这里根据具体业务调整查询条件
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
QueryWrapper<ProductInformation> qw = new QueryWrapper<>();
return qw;
}
public PagerVo<ProductInformationVo> listPageVo(PagerQuery<ProductInformationQuery> pq) {
ProductInformationQuery query = pq.getParams();
QueryWrapper<ProductInformation> qw = createQueryWrapper(query);
IPage<ProductInformation> page = PagerUtil.queryToPage(pq);
IPage<ProductInformationVo> pagging = baseMapper.selectPageVo(page, qw);
PagerVo<ProductInformationVo> 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<String> lisss = new ArrayList<>();
List<String> 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);
}
}

6
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<RestrictedBrand> {
//@Update("update restricted_brand set name=#{msg} where id=#{id}")
//IPage<RestrictedBrandVo> voPage(IPage<RestrictedBrand> page, @Param(Constants.WRAPPER) QueryWrapper<RestrictedBrand> qw);
IPage<RestrictedBrandVo> selectPageVo(IPage<RestrictedBrand> page, @Param(Constants.WRAPPER) Wrapper<RestrictedBrand> qw);
@ -65,4 +63,8 @@ public interface RestrictedBrandMapper extends BaseMapper<RestrictedBrand> {
@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);
}

29
yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandMapper.xml

@ -3,11 +3,32 @@
<mapper namespace="com.yxt.supervise.customer.biz.restrictedbrand.RestrictedBrandMapper">
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="selectPageVo" resultType="com.yxt.supervise.portal.api.restrictedbrand.RestrictedBrandVo">
SELECT * FROM restricted_brand <where> ${ew.sqlSegment} </where>
<select id="selectPageVo" resultType="com.yxt.supervise.customer.api.restrictedbrand.RestrictedBrandVo">
SELECT *
FROM restricted_brand
<where>
${ew.sqlSegment}
</where>
</select>
<select id="selectListAllVo" resultType="com.yxt.supervise.portal.api.restrictedbrand.RestrictedBrandVo">
SELECT * FROM restricted_brand <where> ${ew.sqlSegment} </where>
<select id="selectListAllVo" resultType="com.yxt.supervise.customer.api.restrictedbrand.RestrictedBrandVo">
SELECT *
FROM restricted_brand
<where>
${ew.sqlSegment}
</where>
</select>
<select id="selectByCodeAndSid" resultType="com.yxt.supervise.customer.api.restrictedbrand.RestrictedBrand">
select *
from restricted_brand
where code = #{code}
and sid &lt;&gt; #{sid}
</select>
<select id="selectByCode" resultType="com.yxt.supervise.customer.api.restrictedbrand.RestrictedBrand">
select *
from restricted_brand
where code = #{code}
</select>
</mapper>

12
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<RestrictedBrandDetailsVo> 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();

60
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<RestrictedBrandMapper, RestrictedBrand> {
private QueryWrapper<RestrictedBrand> createQueryWrapper(RestrictedBrandQuery query) {
// todo: 这里根据具体业务调整查询条件
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
QueryWrapper<RestrictedBrand> qw = new QueryWrapper<>();
return qw;
}
public PagerVo<RestrictedBrandVo> listPageVo(PagerQuery<RestrictedBrandQuery> pq) {
RestrictedBrandQuery query = pq.getParams();
QueryWrapper<RestrictedBrand> qw = createQueryWrapper(query);
QueryWrapper<RestrictedBrand> 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<RestrictedBrand> page = PagerUtil.queryToPage(pq);
IPage<RestrictedBrandVo> pagging = baseMapper.selectPageVo(page, qw);
PagerVo<RestrictedBrandVo> 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("该品牌不存在");
}
this.updateByDto(dto);
//查询是否存在code值相同的
RestrictedBrand restrictedBrands = baseMapper.selectByCodeAndSid(code, sid);
if (restrictedBrands != null) {
return rb.setMsg("该品牌编码已存在");
}
public void insertByDto(RestrictedBrandDto dto) {
RestrictedBrand entity = new RestrictedBrand();
BeanUtil.copyProperties(dto, entity, "id", "sid");
baseMapper.insert(entity);
BeanUtil.copyProperties(dto, restrictedBrand, "sid");
baseMapper.updateById(restrictedBrand);
}
return rb.success();
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) {

75
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(客户中心) <br/>
* File: RestrictedCategoryMapper.java <br/>
* Class: com.yxt.supervise.customer.biz.restrictedcategory.RestrictedCategoryMapper <br/>
* Description: 限定品类. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-22 21:47:10 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Mapper
public interface RestrictedCategoryMapper extends BaseMapper<RestrictedCategory> {
IPage<RestrictedCategoryVo> selectPageVo(IPage<RestrictedCategory> page, @Param(Constants.WRAPPER) Wrapper<RestrictedCategory> qw);
List<RestrictedCategoryVo> selectListAllVo(@Param(Constants.WRAPPER) Wrapper<RestrictedCategory> qw);
@Select("select * from restricted_category")
List<RestrictedCategoryVo> selectListVo();
@Select("select * from restricted_category where categorys like CONCAT('%',#{categoryKey},'%') and brands like CONCAT('%',#{brandCode},'%')")
List<RestrictedCategory> 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<RestrictedCategory> selectByBrands(@Param("brandCode") String brand);
RestrictedCategory selectByKey(String key);
RestrictedCategory selectByKeyAndSid(@Param("key") String key, @Param("sid") String sid);
}

34
yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedcategory/RestrictedCategoryMapper.xml

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yxt.supervise.customer.biz.restrictedcategory.RestrictedCategoryMapper">
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="selectPageVo" resultType="com.yxt.supervise.customer.api.restrictedcategory.RestrictedCategoryVo">
SELECT *
FROM restricted_category
<where>
${ew.sqlSegment}
</where>
</select>
<select id="selectListAllVo" resultType="com.yxt.supervise.customer.api.restrictedcategory.RestrictedCategoryVo">
SELECT *
FROM restricted_category
<where>
${ew.sqlSegment}
</where>
</select>
<select id="selectByKey" resultType="com.yxt.supervise.customer.api.restrictedcategory.RestrictedCategory">
select *
from restricted_category
where categoryKey = #{key}
</select>
<select id="selectByKeyAndSid" resultType="com.yxt.supervise.customer.api.restrictedcategory.RestrictedCategory">
select *
from restricted_category
where categoryKey = #{key}
and sid &lt;&gt; #{sid}
</select>
</mapper>

128
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(客户中心) <br/>
* File: RestrictedCategoryFeignFallback.java <br/>
* Class: com.yxt.supervise.customer.biz.restrictedcategory.RestrictedCategoryRest <br/>
* Description: 限定品类. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-22 21:47:10 <br/>
*
* @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<PagerVo<RestrictedCategoryVo>> listPage(@RequestBody PagerQuery<RestrictedCategoryQuery> pq) {
ResultBean rb = ResultBean.fireFail();
PagerVo<RestrictedCategoryVo> 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<RestrictedCategoryDetailsVo> 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;
}
}

223
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(客户中心) <br/>
* File: RestrictedCategoryService.java <br/>
* Class: com.yxt.supervise.customer.biz.restrictedcategory.RestrictedCategoryService <br/>
* Description: 限定品类 业务逻辑. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-22 21:47:10 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Slf4j
@Service
public class RestrictedCategoryService extends MybatisBaseService<RestrictedCategoryMapper, RestrictedCategory> {
/* @Resource
private DictCommonService dictCommonService;
@Resource
private BrandInfoService brandInfoService;*/
@Resource
private RestrictedBrandService restrictedBrandService;
/**
* 分页列表
*
* @param pq
* @return
*/
public PagerVo<RestrictedCategoryVo> listPageVo(PagerQuery<RestrictedCategoryQuery> pq) {
RestrictedCategoryQuery query = pq.getParams();
QueryWrapper<RestrictedCategory> 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<RestrictedCategory> page = PagerUtil.queryToPage(pq);
IPage<RestrictedCategoryVo> pagging = baseMapper.selectPageVo(page, qw);
PagerVo<RestrictedCategoryVo> 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<String> lisss = new ArrayList<>();
List<String> 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<String, String> limitJudgement(String categoryKey, String brandCode) {
Map<String, String> 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);
}*/
}

36
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();
}
}
Loading…
Cancel
Save