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