yxt_djz 3 years ago
parent
commit
273ee8dd24
  1. 6
      yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/inventoryinformation/InventoryInformation.java
  2. 6
      yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/inventoryinformation/InventoryInformationDetailsVo.java
  3. 7
      yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/inventoryinformation/InventoryInformationDto.java
  4. 7
      yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/inventoryinformation/InventoryInformationQuery.java
  5. 7
      yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/inventoryinformation/InventoryInformationVo.java
  6. 5
      yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productinformation/ProductInformation.java
  7. 3
      yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productinformation/ProductInformationDetailsVo.java
  8. 3
      yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productinformation/ProductInformationDto.java
  9. 3
      yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productinformation/ProductInformationQuery.java
  10. 3
      yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productinformation/ProductInformationVo.java
  11. 79
      yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/salesdata/SalesData.java
  12. 80
      yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/salesdata/SalesDataDetailsVo.java
  13. 80
      yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/salesdata/SalesDataDto.java
  14. 78
      yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/salesdata/SalesDataFeign.java
  15. 72
      yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/salesdata/SalesDataFeignFallback.java
  16. 78
      yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/salesdata/SalesDataQuery.java
  17. 80
      yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/salesdata/SalesDataVo.java
  18. 3
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/inventoryinformation/InventoryInformationMapper.java
  19. 78
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/inventoryinformation/InventoryInformationService.java
  20. 58
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/productnum/ProductNumService.java
  21. 33
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/purchaserequisition/PurchaseRequisitionService.java
  22. 5
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/purchaserequisitionpro/PurchaseRequisitionProService.java
  23. 65
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/salesdata/SalesDataMapper.java
  24. 13
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/salesdata/SalesDataMapper.xml
  25. 132
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/salesdata/SalesDataRest.java
  26. 259
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/salesdata/SalesDataService.java
  27. 2
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/storeout/StoreOutService.java

6
yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/inventoryinformation/InventoryInformation.java

@ -74,4 +74,10 @@ public class InventoryInformation extends BaseEntity {
private String suppliderSid; // 供应商 private String suppliderSid; // 供应商
@ApiModelProperty("供应商") @ApiModelProperty("供应商")
private String suppliderName; // 供应商 private String suppliderName; // 供应商
@ApiModelProperty("新的库存数")
private String newInventory;//新的库存数 根据入库单 出库单、销售数据进行维护的
@ApiModelProperty("新的货值")
private String newValue;//新的货值 根据入库单 出库单、销售数据进行维护的
@ApiModelProperty("偏差数量")
private String deviations;//偏差数量 维护盘库后与系统中偏差的数值
} }

6
yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/inventoryinformation/InventoryInformationDetailsVo.java

@ -73,5 +73,11 @@ public class InventoryInformationDetailsVo implements Vo {
private String prodValue; // 商品货值 private String prodValue; // 商品货值
@ApiModelProperty("供应商") @ApiModelProperty("供应商")
private String suppliderSid; // 供应商 private String suppliderSid; // 供应商
@ApiModelProperty("新的库存数")
private String newInventory;//新的库存数 根据入库单 出库单、销售数据进行维护的
@ApiModelProperty("新的货值")
private String newValue;//新的货值 根据入库单 出库单、销售数据进行维护的
@ApiModelProperty("偏差数量")
private String deviations;//偏差数量 维护盘库后与系统中偏差的数值
} }

7
yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/inventoryinformation/InventoryInformationDto.java

@ -73,5 +73,10 @@ public class InventoryInformationDto implements Dto {
private String prodValue; // 商品货值 private String prodValue; // 商品货值
@ApiModelProperty("供应商") @ApiModelProperty("供应商")
private String suppliderSid; // 供应商 private String suppliderSid; // 供应商
@ApiModelProperty("新的库存数")
private String newInventory;//新的库存数 根据入库单 出库单、销售数据进行维护的
@ApiModelProperty("新的货值")
private String newValue;//新的货值 根据入库单 出库单、销售数据进行维护的
@ApiModelProperty("偏差数量")
private String deviations;//偏差数量 维护盘库后与系统中偏差的数值
} }

7
yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/inventoryinformation/InventoryInformationQuery.java

@ -71,5 +71,10 @@ public class InventoryInformationQuery implements Query {
private String prodValue; // 商品货值 private String prodValue; // 商品货值
@ApiModelProperty("供应商") @ApiModelProperty("供应商")
private String suppliderSid; // 供应商 private String suppliderSid; // 供应商
@ApiModelProperty("新的库存数")
private String newInventory;//新的库存数 根据入库单 出库单、销售数据进行维护的
@ApiModelProperty("新的货值")
private String newValue;//新的货值 根据入库单 出库单、销售数据进行维护的
@ApiModelProperty("偏差数量")
private String deviations;//偏差数量 维护盘库后与系统中偏差的数值
} }

7
yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/inventoryinformation/InventoryInformationVo.java

@ -73,5 +73,10 @@ public class InventoryInformationVo implements Vo {
private String prodValue; // 商品货值 private String prodValue; // 商品货值
@ApiModelProperty("供应商") @ApiModelProperty("供应商")
private String suppliderSid; // 供应商 private String suppliderSid; // 供应商
@ApiModelProperty("新的库存数")
private String newInventory;//新的库存数 根据入库单 出库单、销售数据进行维护的
@ApiModelProperty("新的货值")
private String newValue;//新的货值 根据入库单 出库单、销售数据进行维护的
@ApiModelProperty("偏差数量")
private String deviations;//偏差数量 维护盘库后与系统中偏差的数值
} }

5
yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productinformation/ProductInformation.java

@ -94,7 +94,7 @@ public class ProductInformation extends BaseEntity {
private String buyer; // 采购员 private String buyer; // 采购员
@ApiModelProperty("核算售价") @ApiModelProperty("核算售价")
private String accountingSalesPrice; // 核算售价 private String accountingSalesPrice; // 核算售价
@ApiModelProperty("最新进价") @ApiModelProperty("最新进价(系统中导出的)")
private String latestPurchasePrice; // 最新进价 private String latestPurchasePrice; // 最新进价
@ApiModelProperty("库存价") @ApiModelProperty("库存价")
private String inventoryPrice; // 库存价 private String inventoryPrice; // 库存价
@ -151,5 +151,6 @@ public class ProductInformation extends BaseEntity {
private String productStatus; // 商品状态 private String productStatus; // 商品状态
@ApiModelProperty("商品状态key") @ApiModelProperty("商品状态key")
private String productStatusKey; // 商品状态key private String productStatusKey; // 商品状态key
@ApiModelProperty("最新进价(需要每次导入采购订单更新的)")
private String newestPurchasePrice;
} }

3
yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productinformation/ProductInformationDetailsVo.java

@ -169,5 +169,6 @@ public class ProductInformationDetailsVo implements Vo {
private String ContractPriceExcludingTax; // 去税合同进价 private String ContractPriceExcludingTax; // 去税合同进价
@ApiModelProperty("商品状态") @ApiModelProperty("商品状态")
private String productStatus; // 商品状态 private String productStatus; // 商品状态
@ApiModelProperty("最新进价(需要每次导入采购订单更新的)")
private String newestPurchasePrice;
} }

3
yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productinformation/ProductInformationDto.java

@ -169,5 +169,6 @@ public class ProductInformationDto implements Dto {
private String ContractPriceExcludingTax; // 去税合同进价 private String ContractPriceExcludingTax; // 去税合同进价
@ApiModelProperty("商品状态") @ApiModelProperty("商品状态")
private String productStatus; // 商品状态 private String productStatus; // 商品状态
@ApiModelProperty("最新进价(需要每次导入采购订单更新的)")
private String newestPurchasePrice;
} }

3
yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productinformation/ProductInformationQuery.java

@ -167,5 +167,6 @@ public class ProductInformationQuery implements Query {
private String ContractPriceExcludingTax; // 去税合同进价 private String ContractPriceExcludingTax; // 去税合同进价
@ApiModelProperty("商品状态") @ApiModelProperty("商品状态")
private String productStatus; // 商品状态 private String productStatus; // 商品状态
@ApiModelProperty("最新进价(需要每次导入采购订单更新的)")
private String newestPurchasePrice;
} }

3
yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/productinformation/ProductInformationVo.java

@ -169,5 +169,6 @@ public class ProductInformationVo implements Vo {
private String ContractPriceExcludingTax; // 去税合同进价 private String ContractPriceExcludingTax; // 去税合同进价
@ApiModelProperty("商品状态") @ApiModelProperty("商品状态")
private String productStatus; // 商品状态 private String productStatus; // 商品状态
@ApiModelProperty("最新进价(需要每次导入采购订单更新的)")
private String newestPurchasePrice;
} }

79
yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/salesdata/SalesData.java

@ -0,0 +1,79 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.api.salesdata;
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: SalesData.java <br/>
* Class: com.yxt.supervise.portal.api.salesdata.SalesData <br/>
* Description: 销售数据. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-24 20:43:02 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "销售数据", description = "销售数据")
@TableName("sales_data")
public class SalesData extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty("创建者")
private String createSid; // 创建者
@ApiModelProperty("更新者")
private String modifySid; // 更新者
@ApiModelProperty("销售订单号")
private String code; // 销售订单号
@ApiModelProperty("商品编码")
private String proCode; // 商品编码
@ApiModelProperty("商品条码")
private String proBarCode; // 商品条码
@ApiModelProperty("商品名称")
private String proName; // 商品名称
@ApiModelProperty("销售数量")
private String saleNum; // 销售数量
@ApiModelProperty("销售渠道")
private String storeCode; // 销售渠道
@ApiModelProperty("销售价格")
private String salePrice; // 销售价格
@ApiModelProperty("销售成本")
private String saleCost; // 销售成本
@ApiModelProperty("利润")
private String profit; // 利润
@ApiModelProperty("数据日期")
private String dataDate; // 数据日期
@ApiModelProperty("类型")
private String type; // 类型
}

80
yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/salesdata/SalesDataDetailsVo.java

@ -0,0 +1,80 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.api.salesdata;
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: SalesDataVo.java <br/>
* Class: com.yxt.supervise.portal.api.salesdata.SalesDataVo <br/>
* Description: 销售数据 视图数据对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-24 20:43:02 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "销售数据 视图数据详情", description = "销售数据 视图数据详情")
public class SalesDataDetailsVo implements Vo {
private String sid; // sid
@ApiModelProperty("创建者")
private String createSid; // 创建者
@ApiModelProperty("更新者")
private String modifySid; // 更新者
@ApiModelProperty("销售订单号")
private String code; // 销售订单号
@ApiModelProperty("商品编码")
private String proCode; // 商品编码
@ApiModelProperty("商品条码")
private String proBarCode; // 商品条码
@ApiModelProperty("商品名称")
private String proName; // 商品名称
@ApiModelProperty("销售数量")
private String saleNum; // 销售数量
@ApiModelProperty("销售渠道")
private String storeCode; // 销售渠道
@ApiModelProperty("销售价格")
private String salePrice; // 销售价格
@ApiModelProperty("销售成本")
private String saleCost; // 销售成本
@ApiModelProperty("利润")
private String profit; // 利润
@ApiModelProperty("数据日期")
private String dataDate; // 数据日期
@ApiModelProperty("类型")
private String type; // 类型
}

80
yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/salesdata/SalesDataDto.java

@ -0,0 +1,80 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.api.salesdata;
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: SalesDataDto.java <br/>
* Class: com.yxt.supervise.portal.api.salesdata.SalesDataDto <br/>
* Description: 销售数据 数据传输对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-24 20:43:02 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "销售数据 数据传输对象", description = "销售数据 数据传输对象")
public class SalesDataDto implements Dto {
private String sid; // sid
@ApiModelProperty("创建者")
private String createSid; // 创建者
@ApiModelProperty("更新者")
private String modifySid; // 更新者
@ApiModelProperty("销售订单号")
private String code; // 销售订单号
@ApiModelProperty("商品编码")
private String proCode; // 商品编码
@ApiModelProperty("商品条码")
private String proBarCode; // 商品条码
@ApiModelProperty("商品名称")
private String proName; // 商品名称
@ApiModelProperty("销售数量")
private String saleNum; // 销售数量
@ApiModelProperty("销售渠道")
private String storeCode; // 销售渠道
@ApiModelProperty("销售价格")
private String salePrice; // 销售价格
@ApiModelProperty("销售成本")
private String saleCost; // 销售成本
@ApiModelProperty("利润")
private String profit; // 利润
@ApiModelProperty("数据日期")
private String dataDate; // 数据日期
@ApiModelProperty("类型")
private String type; // 类型
}

78
yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/salesdata/SalesDataFeign.java

@ -0,0 +1,78 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.api.salesdata;
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: SalesDataFeign.java <br/>
* Class: com.yxt.supervise.portal.api.salesdata.SalesDataFeign <br/>
* Description: 销售数据. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-24 20:43:02 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Api(tags = "销售数据")
@FeignClient(
contextId = "yxt-supervise-SalesData",
name = "yxt-supervise",
path = "v1/salesdata",
fallback = SalesDataFeignFallback.class)
public interface SalesDataFeign {
@ApiOperation("根据条件分页查询数据的列表")
@PostMapping("/listPage")
@ResponseBody
public ResultBean<PagerVo<SalesDataVo>> listPage(@RequestBody PagerQuery<SalesDataQuery> pq);
@ApiOperation("新增或修改")
@PostMapping("/save")
@ResponseBody
public ResultBean save(@RequestBody SalesDataDto dto);
@ApiOperation("根据sid删除记录")
@DeleteMapping("/delBySids")
@ResponseBody
public ResultBean delBySids(@RequestBody String[] sids);
@ApiOperation("根据SID获取一条记录")
@GetMapping("/fetchDetailsBySid/{sid}")
@ResponseBody
public ResultBean<SalesDataDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid);
}

72
yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/salesdata/SalesDataFeignFallback.java

@ -0,0 +1,72 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.api.salesdata;
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: SalesDataFeignFallback.java <br/>
* Class: com.yxt.supervise.portal.api.salesdata.SalesDataFeignFallback <br/>
* Description: 销售数据. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-24 20:43:02 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Component
public class SalesDataFeignFallback implements SalesDataFeign {
@Override
public ResultBean<PagerVo<SalesDataVo>> listPage(PagerQuery<SalesDataQuery> pq){
ResultBean rb = ResultBean.fireFail();
return rb.setMsg("接口yxt-supervise/salesdata/listPage无法访问");
}
@Override
public ResultBean save(SalesDataDto dto){
return ResultBean.fireFail().setMsg("接口yxt-supervise/salesdata/save无法访问");
}
@Override
public ResultBean delBySids( String[] sids){
return ResultBean.fireFail().setMsg("接口yxt-supervise/salesdata/delBySids无法访问");
}
@Override
public ResultBean<SalesDataDetailsVo> fetchDetailsBySid(String sid){
ResultBean rb = ResultBean.fireFail();
return rb.setMsg("接口yxt-supervise/salesdata/fetchDetailsBySid无法访问");
}
}

78
yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/salesdata/SalesDataQuery.java

@ -0,0 +1,78 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.api.salesdata;
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: SalesDataQuery.java <br/>
* Class: com.yxt.supervise.portal.api.salesdata.SalesDataQuery <br/>
* Description: 销售数据 查询条件. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-24 20:43:02 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "销售数据 查询条件", description = "销售数据 查询条件")
public class SalesDataQuery implements Query {
@ApiModelProperty("创建者")
private String createSid; // 创建者
@ApiModelProperty("更新者")
private String modifySid; // 更新者
@ApiModelProperty("销售订单号")
private String code; // 销售订单号
@ApiModelProperty("商品编码")
private String proCode; // 商品编码
@ApiModelProperty("商品条码")
private String proBarCode; // 商品条码
@ApiModelProperty("商品名称")
private String proName; // 商品名称
@ApiModelProperty("销售数量")
private String saleNum; // 销售数量
@ApiModelProperty("销售渠道")
private String storeCode; // 销售渠道
@ApiModelProperty("销售价格")
private String salePrice; // 销售价格
@ApiModelProperty("销售成本")
private String saleCost; // 销售成本
@ApiModelProperty("利润")
private String profit; // 利润
@ApiModelProperty("数据日期")
private String dataDate; // 数据日期
@ApiModelProperty("类型")
private String type; // 类型
}

80
yxt_supervise/supervise-portal/supervise-portal-api/src/main/java/com/yxt/supervise/portal/api/salesdata/SalesDataVo.java

@ -0,0 +1,80 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.api.salesdata;
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: SalesDataVo.java <br/>
* Class: com.yxt.supervise.portal.api.salesdata.SalesDataVo <br/>
* Description: 销售数据 视图数据对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-24 20:43:02 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "销售数据 视图数据对象", description = "销售数据 视图数据对象")
public class SalesDataVo implements Vo {
private String sid; // sid
@ApiModelProperty("创建者")
private String createSid; // 创建者
@ApiModelProperty("更新者")
private String modifySid; // 更新者
@ApiModelProperty("销售订单号")
private String code; // 销售订单号
@ApiModelProperty("商品编码")
private String proCode; // 商品编码
@ApiModelProperty("商品条码")
private String proBarCode; // 商品条码
@ApiModelProperty("商品名称")
private String proName; // 商品名称
@ApiModelProperty("销售数量")
private String saleNum; // 销售数量
@ApiModelProperty("销售渠道")
private String storeCode; // 销售渠道
@ApiModelProperty("销售价格")
private String salePrice; // 销售价格
@ApiModelProperty("销售成本")
private String saleCost; // 销售成本
@ApiModelProperty("利润")
private String profit; // 利润
@ApiModelProperty("数据日期")
private String dataDate; // 数据日期
@ApiModelProperty("类型")
private String type; // 类型
}

3
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/inventoryinformation/InventoryInformationMapper.java

@ -62,4 +62,7 @@ public interface InventoryInformationMapper extends BaseMapper<InventoryInformat
@Select("select * from inventory_information") @Select("select * from inventory_information")
List<InventoryInformationVo> selectListVo(); List<InventoryInformationVo> selectListVo();
@Select("select * from inventory_information where prodCode=#{prodCode} and warehouseCode=#{store}")
InventoryInformation selectByProCodeAndStoreCode(@Param("prodCode")String proCode,
@Param("store")String store);
} }

78
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/inventoryinformation/InventoryInformationService.java

@ -33,9 +33,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.supervise.portal.api.dictcommon.DictCommon; import com.yxt.supervise.portal.api.dictcommon.DictCommon;
import com.yxt.supervise.portal.api.dictcommon.DictCommonDetailsVo; import com.yxt.supervise.portal.api.dictcommon.DictCommonDetailsVo;
import com.yxt.supervise.portal.api.inventoryinformation.*; import com.yxt.supervise.portal.api.inventoryinformation.*;
import com.yxt.supervise.portal.api.productinformation.ProductInformationVo;
import com.yxt.supervise.portal.api.productnum.ProductNum; import com.yxt.supervise.portal.api.productnum.ProductNum;
import com.yxt.supervise.portal.api.purchaserequisitionpro.PurchaseRequisitionPro; import com.yxt.supervise.portal.api.purchaserequisitionpro.PurchaseRequisitionPro;
import com.yxt.supervise.portal.biz.dictcommon.DictCommonService; import com.yxt.supervise.portal.biz.dictcommon.DictCommonService;
import com.yxt.supervise.portal.biz.productinformation.ProductInformationService;
import com.yxt.supervise.portal.biz.productnum.ProductNumService; import com.yxt.supervise.portal.biz.productnum.ProductNumService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -53,6 +55,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -72,6 +75,8 @@ import java.util.List;
@Slf4j @Slf4j
@Service @Service
public class InventoryInformationService extends MybatisBaseService<InventoryInformationMapper, InventoryInformation> { public class InventoryInformationService extends MybatisBaseService<InventoryInformationMapper, InventoryInformation> {
@Resource
private ProductInformationService productInformationService;
private QueryWrapper<InventoryInformation> createQueryWrapper(InventoryInformationQuery query) { private QueryWrapper<InventoryInformation> createQueryWrapper(InventoryInformationQuery query) {
// todo: 这里根据具体业务调整查询条件 // todo: 这里根据具体业务调整查询条件
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName())); // 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
@ -303,4 +308,77 @@ public class InventoryInformationService extends MybatisBaseService<InventoryInf
System.out.println(x1); System.out.println(x1);
//return message; //return message;
} }
/**
* 增加库存
* @param proCode 商品的代码
* @param store 门店的代码
* @param number 商品数量
*/
public void increaseStock(String proCode,String store,String number ){
ProductInformationVo productInformationVo = productInformationService.selectByCode(proCode);
String newestPurchasePrice = productInformationVo.getNewestPurchasePrice();
/*BigDecimal bigDecimal = new BigDecimal(newestPurchasePrice);
BigDecimal bigDecimal1 = new BigDecimal(number);
BigDecimal multiply = bigDecimal.multiply(bigDecimal1);*/
increaseStock( proCode, store, number, "0");
}
/**
* 增加库存
* @param proCode 商品的代码
* @param store 门店的代码
* @param number 商品数量
* @param money 金额
*/
private void increaseStock(String proCode,String store,String number,String money){
InventoryInformation ii=baseMapper.selectByProCodeAndStoreCode(proCode,store);
String newInventory = ii.getNewInventory();//新的库存数
String newValue = ii.getNewValue();//新的货值
ii.getDeviations();//偏差值
Integer integer = Integer.valueOf(newInventory);
Integer integer1 = Integer.valueOf(number);
integer=integer+integer1;
ii.setNewInventory(integer.toString());
/* BigDecimal bigDecimal = new BigDecimal(newValue);
BigDecimal bigDecimal1 = new BigDecimal(money);
BigDecimal add = bigDecimal.add(bigDecimal1);
ii.setNewValue(add.toString());*/
baseMapper.updateById(ii);
}
/**
* 减少库存
* @param proCode 商品的代码
* @param store 门店的代码
* @param number 商品数量
*/
public void reduceStock(String proCode,String store,String number){
ProductInformationVo productInformationVo = productInformationService.selectByCode(proCode);
String newestPurchasePrice = productInformationVo.getNewestPurchasePrice();
/*BigDecimal bigDecimal = new BigDecimal(newestPurchasePrice);
BigDecimal bigDecimal1 = new BigDecimal(number);
BigDecimal multiply = bigDecimal.multiply(bigDecimal1);*/
reduceStock( proCode, store, number, "0");
}
/**
* 减少库存
* @param proCode 商品的代码
* @param store 门店的代码
* @param number 商品数量
* @param money 金额
*/
private void reduceStock(String proCode,String store,String number,String money){
InventoryInformation ii=baseMapper.selectByProCodeAndStoreCode(proCode,store);
String newInventory = ii.getNewInventory();//新的库存数
String newValue = ii.getNewValue();//新的货值
ii.getDeviations();//偏差值
Integer integer = Integer.valueOf(newInventory);
Integer integer1 = Integer.valueOf(number);
integer=integer-integer1;
ii.setNewInventory(integer.toString());
/*BigDecimal bigDecimal = new BigDecimal(newValue);
BigDecimal bigDecimal1 = new BigDecimal(money);
BigDecimal subtract = bigDecimal.subtract(bigDecimal1);
ii.setNewValue(subtract.toString());*/
baseMapper.updateById(ii);
}
} }

58
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/productnum/ProductNumService.java

@ -313,7 +313,7 @@ public class ProductNumService extends MybatisBaseService<ProductNumMapper, Prod
public HSSFWorkbook exportExcel( HSSFWorkbook wb) { public HSSFWorkbook exportExcel( HSSFWorkbook wb) {
String title = "重点品类商品订货明细"; String title = "重点品类商品订货明细";
String[] col = {"审核单号","状态","合计金额"}; String[] col = {"审核单号","状态","合计金额"};
String[] col1 = {"序号","采购订单编号","厂商编码","厂商名称","商品代码","商品条码","商品名称","单位","进价","配价","售价","箱规", String[] col1 = {"序号","采购订单编号","厂商编码","厂商名称","商品代码","商品条码","商品名称","单位","进价","箱规",
"订货数量","订货金额(元)","合计","税票","降价折扣%","判定结果","备注"}; "订货数量","订货金额(元)","合计","税票","降价折扣%","判定结果","备注"};
//sheet名 //sheet名
String sheetName = "重点品类商品订货明细"; String sheetName = "重点品类商品订货明细";
@ -327,7 +327,7 @@ public class ProductNumService extends MybatisBaseService<ProductNumMapper, Prod
// 第二步,在workbook中添加一个sheet,对应Excel文件中的sheet // 第二步,在workbook中添加一个sheet,对应Excel文件中的sheet
HSSFSheet sheet = wb.createSheet(sheetName); HSSFSheet sheet = wb.createSheet(sheetName);
// 合并单元格:参数:起始行, 终止行, 起始列, 终止列 // 合并单元格:参数:起始行, 终止行, 起始列, 终止列
CellRangeAddress cra = new CellRangeAddress(0, 0, 0, 19); CellRangeAddress cra = new CellRangeAddress(0, 0, 0, 17);
sheet.addMergedRegion(cra); sheet.addMergedRegion(cra);
// 第三步,在sheet中添加表头第0行,注意老版本poi对Excel的行数列数有限制 // 第三步,在sheet中添加表头第0行,注意老版本poi对Excel的行数列数有限制
@ -361,16 +361,16 @@ public class ProductNumService extends MybatisBaseService<ProductNumMapper, Prod
row.createCell(6).setCellValue(productNums.get(i).getName()); row.createCell(6).setCellValue(productNums.get(i).getName());
row.createCell(7).setCellValue(productNums.get(i).getUnit()); row.createCell(7).setCellValue(productNums.get(i).getUnit());
row.createCell(8).setCellValue(productNums.get(i).getPurchasePrice());//进价 row.createCell(8).setCellValue(productNums.get(i).getPurchasePrice());//进价
row.createCell(9).setCellValue(productNums.get(i).getValence());//进 //row.createCell(9).setCellValue(productNums.get(i).getValence());//配
row.createCell(10).setCellValue(productNums.get(i).getPrice());//售价 //row.createCell(10).setCellValue(productNums.get(i).getPrice());//售价
row.createCell(11).setCellValue(productNums.get(i).getBoxGauge()); row.createCell(9).setCellValue(productNums.get(i).getBoxGauge());
row.createCell(12).setCellValue(productNums.get(i).getNum()); row.createCell(10).setCellValue(productNums.get(i).getNum());
row.createCell(13).setCellValue(productNums.get(i).getOrderAmount()); row.createCell(11).setCellValue(productNums.get(i).getOrderAmount());
row.createCell(14).setCellValue("0"); row.createCell(12).setCellValue("0");
row.createCell(15).setCellValue(productNums.get(i).getTaxReceipt()); row.createCell(13).setCellValue(productNums.get(i).getTaxReceipt());
row.createCell(16).setCellValue(productNums.get(i).getDiscount()); row.createCell(14).setCellValue(productNums.get(i).getDiscount());
row.createCell(17).setCellValue(productNums.get(i).getState()==1?"符合":"不符合"); row.createCell(15).setCellValue(productNums.get(i).getState()==1?"符合":"不符合");
row.createCell(18).setCellValue(productNums.get(i).getRemarks()); row.createCell(16).setCellValue(productNums.get(i).getRemarks());
} }
return wb; return wb;
} }
@ -473,7 +473,7 @@ public class ProductNumService extends MybatisBaseService<ProductNumMapper, Prod
public HSSFWorkbook products(String pc){ public HSSFWorkbook products(String pc){
String title = "重点品类商品订货明细限定情况"; String title = "重点品类商品订货明细限定情况";
String[] col = {"审核单号","状态","合计金额"}; String[] col = {"审核单号","状态","合计金额"};
String[] col1 = {"序号","采购订单编号","厂商编码","厂商名称","商品代码","商品条码","商品名称","单位","进价","配价","售价","箱规", String[] col1 = {"序号","采购订单编号","厂商编码","厂商名称","商品代码","商品条码","商品名称","单位","进价","箱规",
"订货数量","订货金额(元)","合计","税票","降价折扣%","判定结果","备注"}; "订货数量","订货金额(元)","合计","税票","降价折扣%","判定结果","备注"};
//sheet名 //sheet名
String sheetName = pc+"重点品类商品订货明细限定情况"; String sheetName = pc+"重点品类商品订货明细限定情况";
@ -489,7 +489,7 @@ public class ProductNumService extends MybatisBaseService<ProductNumMapper, Prod
// 第二步,在workbook中添加一个sheet,对应Excel文件中的sheet // 第二步,在workbook中添加一个sheet,对应Excel文件中的sheet
HSSFSheet sheet = wb.createSheet(sheetName); HSSFSheet sheet = wb.createSheet(sheetName);
// 合并单元格:参数:起始行, 终止行, 起始列, 终止列 // 合并单元格:参数:起始行, 终止行, 起始列, 终止列
CellRangeAddress cra = new CellRangeAddress(0, 0, 0, 19); CellRangeAddress cra = new CellRangeAddress(0, 0, 0, 17);
sheet.addMergedRegion(cra); sheet.addMergedRegion(cra);
// 第三步,在sheet中添加表头第0行,注意老版本poi对Excel的行数列数有限制 // 第三步,在sheet中添加表头第0行,注意老版本poi对Excel的行数列数有限制
@ -523,16 +523,16 @@ public class ProductNumService extends MybatisBaseService<ProductNumMapper, Prod
row.createCell(6).setCellValue(productNums.get(i).getName()); row.createCell(6).setCellValue(productNums.get(i).getName());
row.createCell(7).setCellValue(productNums.get(i).getUnit()); row.createCell(7).setCellValue(productNums.get(i).getUnit());
row.createCell(8).setCellValue(productNums.get(i).getPurchasePrice());//进价 row.createCell(8).setCellValue(productNums.get(i).getPurchasePrice());//进价
row.createCell(9).setCellValue(productNums.get(i).getValence());//进价 // row.createCell(9).setCellValue(productNums.get(i).getValence());//进价
row.createCell(10).setCellValue(productNums.get(i).getPrice());//售价 // row.createCell(10).setCellValue(productNums.get(i).getPrice());//售价
row.createCell(11).setCellValue(productNums.get(i).getBoxGauge()); row.createCell(9).setCellValue(productNums.get(i).getBoxGauge());
row.createCell(12).setCellValue(productNums.get(i).getNum()); row.createCell(10).setCellValue(productNums.get(i).getNum());
row.createCell(13).setCellValue(productNums.get(i).getOrderAmount()); row.createCell(11).setCellValue(productNums.get(i).getOrderAmount());
row.createCell(14).setCellValue("0"); row.createCell(12).setCellValue("0");
row.createCell(15).setCellValue(productNums.get(i).getTaxReceipt()); row.createCell(13).setCellValue(productNums.get(i).getTaxReceipt());
row.createCell(16).setCellValue(productNums.get(i).getDiscount()); row.createCell(14).setCellValue(productNums.get(i).getDiscount());
row.createCell(17).setCellValue(productNums.get(i).getState()==1?"符合":"不符合"); row.createCell(15).setCellValue(productNums.get(i).getState()==1?"符合":"不符合");
row.createCell(18).setCellValue(productNums.get(i).getRemarks()); row.createCell(16).setCellValue(productNums.get(i).getRemarks());
} }
return wb; return wb;
} }
@ -575,13 +575,13 @@ public class ProductNumService extends MybatisBaseService<ProductNumMapper, Prod
String number = p.getNumber(); String number = p.getNumber();
BigDecimal v = new BigDecimal(packageTotalPrice).divide(new BigDecimal(number),4,BigDecimal.ROUND_HALF_UP); BigDecimal v = new BigDecimal(packageTotalPrice).divide(new BigDecimal(number),4,BigDecimal.ROUND_HALF_UP);
pr.setPurchasePrice(v.toString());//进价 送货金额/数量=进价 pr.setPurchasePrice(v.toString());//进价 送货金额/数量=进价
pr.setValence(productInformation.getRationingPrice());//配价 // pr.setValence(productInformation.getRationingPrice());//配价
String retailAmount = p.getRetailAmount();//零售金额 // String retailAmount = p.getRetailAmount();//零售金额
String packageSpec = p.getPackageInsideNumber();//包装规格 String packageSpec = p.getPackageInsideNumber();//包装规格
String packageNumber = p.getPackageNumber();//包装数量 // String packageNumber = p.getPackageNumber();//包装数量
BigDecimal v1 = new BigDecimal(retailAmount).divide(new BigDecimal(packageSpec)).divide(new BigDecimal(packageNumber)); // BigDecimal v1 = new BigDecimal(retailAmount).divide(new BigDecimal(packageSpec),4,BigDecimal.ROUND_HALF_UP).divide(new BigDecimal(packageNumber),4,BigDecimal.ROUND_HALF_UP);
//double v1 = Double.parseDouble(retailAmount) / Double.parseDouble(packageSpec) / Double.parseDouble(packageNumber); //double v1 = Double.parseDouble(retailAmount) / Double.parseDouble(packageSpec) / Double.parseDouble(packageNumber);
pr.setPrice(v1.toString());//售价 零售金额/规格/包装数量=单价 // pr.setPrice(v1.toString());//售价 零售金额/规格/包装数量=单价
pr.setBoxGauge(packageSpec);//箱规 pr.setBoxGauge(packageSpec);//箱规
pr.setNum(p.getNumber());//订货数量 pr.setNum(p.getNumber());//订货数量
pr.setOrderAmount(p.getPackageTotalPrice());//订货金额 pr.setOrderAmount(p.getPackageTotalPrice());//订货金额

33
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/purchaserequisition/PurchaseRequisitionService.java

@ -86,7 +86,7 @@ public class PurchaseRequisitionService extends MybatisBaseService<PurchaseRequi
pr.setPurchasingDeptCode("9001"); pr.setPurchasingDeptCode("9001");
pr.setPurchasingDeptName("365生活通"); pr.setPurchasingDeptName("365生活通");
// 循环行Row // 循环行Row
for (int rowNum = 1; rowNum <= hssfSheet.getLastRowNum(); rowNum++) { for (int rowNum = 1; rowNum <=hssfSheet.getLastRowNum(); rowNum++) {
HSSFRow hssfRow = hssfSheet.getRow(rowNum); HSSFRow hssfRow = hssfSheet.getRow(rowNum);
int i = 0; int i = 0;
try{ try{
@ -162,7 +162,18 @@ public class PurchaseRequisitionService extends MybatisBaseService<PurchaseRequi
if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
String value= brandIdHSSFCell.getStringCellValue(); String value= brandIdHSSFCell.getStringCellValue();
prp.setPackageInsideNumber(value); prp.setPackageInsideNumber(value);
BigDecimal v3 = new BigDecimal(value);//包内数量 规格
String packagePrice = prp.getPackagePrice();//包装价格
BigDecimal v4 = new BigDecimal(packagePrice);
BigDecimal divide = v4.divide(v3, 4);//单价
String number = prp.getNumber();//数量
BigDecimal v5 = new BigDecimal(number);
BigDecimal v6 = divide .multiply( v5);//订货总金额
prp.setTotalPrice(v6.toString());
ProductInformationVo productInformationVo = productInformationService.selectByCode(prp.getProCode());
productInformationVo.setNewestPurchasePrice(divide.toString());
} }
if(StringUtils.isNotBlank(p.getCode())){ if(StringUtils.isNotBlank(p.getCode())){
productInformationService.insert(p); productInformationService.insert(p);
} }
@ -188,11 +199,7 @@ public class PurchaseRequisitionService extends MybatisBaseService<PurchaseRequi
String value= brandIdHSSFCell.getStringCellValue(); String value= brandIdHSSFCell.getStringCellValue();
prp.setPackagePrice(value); prp.setPackagePrice(value);
// prp.setPackageInsideNumber(i1+""); // prp.setPackageInsideNumber(i1+"");
String packageNumber = prp.getPackageNumber();
BigDecimal v3 = new BigDecimal(packageNumber);
BigDecimal v4 = new BigDecimal(value);
BigDecimal v5 = v3 .multiply( v4);
prp.setTotalPrice(v5.toString());
} }
} }
if (i == 37) {//包合计(元) if (i == 37) {//包合计(元)
@ -210,7 +217,6 @@ public class PurchaseRequisitionService extends MybatisBaseService<PurchaseRequi
BeanUtil.copyProperties(productInformationVo,pif); BeanUtil.copyProperties(productInformationVo,pif);
productInformationService.updateById(pif); productInformationService.updateById(pif);
} }
} }
if (i == 10) {//第二代码 if (i == 10) {//第二代码
brandIdHSSFCell.setCellType(CellType.STRING); brandIdHSSFCell.setCellType(CellType.STRING);
@ -248,7 +254,10 @@ public class PurchaseRequisitionService extends MybatisBaseService<PurchaseRequi
System.err.println("rowNum="+rowNum+",i="+i+",value=null"); System.err.println("rowNum="+rowNum+",i="+i+",value=null");
} }
} }
prps.add(prp); if(StringUtils.isNotBlank(prp.getProCode())){
prps.add(prp);
}
} }
}catch(Exception e){ }catch(Exception e){
e.printStackTrace(); e.printStackTrace();
@ -276,9 +285,17 @@ public class PurchaseRequisitionService extends MybatisBaseService<PurchaseRequi
if (i == 1) {//单号 if (i == 1) {//单号
brandIdHSSFCell.setCellType(CellType.STRING); brandIdHSSFCell.setCellType(CellType.STRING);
String code = brandIdHSSFCell.getStringCellValue(); String code = brandIdHSSFCell.getStringCellValue();
PurchaseRequisition purchaseRequisition = baseMapper.selectByCode(code);
Map<String,Object> map=new HashMap<>(); Map<String,Object> map=new HashMap<>();
map.put("code",code); map.put("code",code);
baseMapper.deleteByMap(map); baseMapper.deleteByMap(map);
purchaseRequisition=new PurchaseRequisition();
Map<String,Object> map1=new HashMap<>();
if(purchaseRequisition!=null){
map1.put("mainSid",purchaseRequisition.getSid());
purchaseRequisitionProService.deleteByMap(map1);
}
//ProductInformationVo productInformationVo = baseMapper.selectByCode(code); //ProductInformationVo productInformationVo = baseMapper.selectByCode(code);
pr.setCode(code); pr.setCode(code);

5
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/purchaserequisitionpro/PurchaseRequisitionProService.java

@ -5,6 +5,7 @@ import com.yxt.supervise.portal.api.purchaserequisitionpro.PurchaseRequisitionPr
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
import java.util.Map;
@Service @Service
public class PurchaseRequisitionProService extends MybatisBaseService<PurchaseRequisitionProMapper, PurchaseRequisitionPro> { public class PurchaseRequisitionProService extends MybatisBaseService<PurchaseRequisitionProMapper, PurchaseRequisitionPro> {
@ -16,4 +17,8 @@ public class PurchaseRequisitionProService extends MybatisBaseService<PurchaseRe
public List<PurchaseRequisitionPro> selectByMainSid(String purchaseRequisitionSid) { public List<PurchaseRequisitionPro> selectByMainSid(String purchaseRequisitionSid) {
return baseMapper.selectByMainSid(purchaseRequisitionSid); return baseMapper.selectByMainSid(purchaseRequisitionSid);
} }
public void deleteByMap(Map<String, Object> map1) {
baseMapper.deleteByMap(map1);
}
} }

65
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/salesdata/SalesDataMapper.java

@ -0,0 +1,65 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.biz.salesdata;
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.salesdata.SalesData;
import com.yxt.supervise.portal.api.salesdata.SalesDataVo;
import java.util.List;
/**
* Project: yxt-supervise(宇信通监管) <br/>
* File: SalesDataMapper.java <br/>
* Class: com.yxt.supervise.portal.biz.salesdata.SalesDataMapper <br/>
* Description: 销售数据. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-24 20:43:02 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Mapper
public interface SalesDataMapper extends BaseMapper<SalesData> {
//@Update("update sales_data set name=#{msg} where id=#{id}")
//IPage<SalesDataVo> voPage(IPage<SalesData> page, @Param(Constants.WRAPPER) QueryWrapper<SalesData> qw);
IPage<SalesDataVo> selectPageVo(IPage<SalesData> page, @Param(Constants.WRAPPER) Wrapper<SalesData> qw);
List<SalesDataVo> selectListAllVo(@Param(Constants.WRAPPER) Wrapper<SalesData> qw);
@Select("select * from sales_data")
List<SalesDataVo> selectListVo();
}

13
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/salesdata/SalesDataMapper.xml

@ -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.salesdata.SalesDataMapper">
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="selectPageVo" resultType="com.yxt.supervise.portal.api.salesdata.SalesDataVo">
SELECT * FROM sales_data <where> ${ew.sqlSegment} </where>
</select>
<select id="selectListAllVo" resultType="com.yxt.supervise.portal.api.salesdata.SalesDataVo">
SELECT * FROM sales_data <where> ${ew.sqlSegment} </where>
</select>
</mapper>

132
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/salesdata/SalesDataRest.java

@ -0,0 +1,132 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.biz.salesdata;
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.salesdata.SalesData;
import com.yxt.supervise.portal.api.salesdata.SalesDataQuery;
import com.yxt.supervise.portal.api.salesdata.SalesDataVo;
import com.yxt.supervise.portal.api.salesdata.SalesDataDetailsVo;
import com.yxt.supervise.portal.api.salesdata.SalesDataDto;
import com.yxt.supervise.portal.api.salesdata.SalesDataFeign;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Project: yxt-supervise(宇信通监管) <br/>
* File: SalesDataFeignFallback.java <br/>
* Class: com.yxt.supervise.portal.biz.salesdata.SalesDataRest <br/>
* Description: 销售数据. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-24 20:43:02 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Api(tags = "销售数据")
@RestController("com.yxt.supervise.portal.biz.salesdata.SalesDataRest")
@RequestMapping("v1/salesdata")
public class SalesDataRest implements SalesDataFeign {
@Autowired
private SalesDataService salesDataService;
@Override
@ApiOperation("根据条件分页查询数据的列表")
@PostMapping("/listPage")
public ResultBean<PagerVo<SalesDataVo>> listPage(@RequestBody PagerQuery<SalesDataQuery> pq){
ResultBean rb = ResultBean.fireFail();
PagerVo<SalesDataVo> pv = salesDataService.listPageVo(pq);
return rb.success().setData(pv);
}
@Override
@ApiOperation("新增或修改")
@PostMapping("/save")
public ResultBean save(@RequestBody SalesDataDto dto){
ResultBean rb = ResultBean.fireFail();
salesDataService.saveOrUpdateDto(dto);
return rb.success();
}
@Override
@ApiOperation("根据sid批量删除")
@PostMapping("/delBySids")
public ResultBean delBySids(@RequestBody String[] sids){
ResultBean rb = ResultBean.fireFail();
salesDataService.delBySids(sids);
return rb.success();
}
@Override
@ApiOperation("根据SID获取一条记录")
@GetMapping("/fetchDetailsBySid/{sid}")
public ResultBean<SalesDataDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid){
ResultBean rb = ResultBean.fireFail();
SalesDataDetailsVo vo = salesDataService.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();
}
salesDataService.readBrandPeriodSorXls1(in,"");
return rb;
}
}

259
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/salesdata/SalesDataService.java

@ -0,0 +1,259 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.biz.salesdata;
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.productinformation.ProductInformationVo;
import com.yxt.supervise.portal.api.productnum.ProductNum;
import com.yxt.supervise.portal.api.restrictedcategory.RestrictedCategory;
import com.yxt.supervise.portal.biz.inventoryinformation.InventoryInformationService;
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.salesdata.SalesData;
import com.yxt.supervise.portal.api.salesdata.SalesDataQuery;
import com.yxt.supervise.portal.api.salesdata.SalesDataVo;
import com.yxt.supervise.portal.api.salesdata.SalesDataDetailsVo;
import com.yxt.supervise.portal.api.salesdata.SalesDataDto;
import com.yxt.supervise.portal.api.salesdata.SalesDataFeign;
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: yxt-supervise(宇信通监管) <br/>
* File: SalesDataService.java <br/>
* Class: com.yxt.supervise.portal.biz.salesdata.SalesDataService <br/>
* Description: 销售数据 业务逻辑. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-11-24 20:43:02 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Slf4j
@Service
public class SalesDataService extends MybatisBaseService<SalesDataMapper, SalesData> {
@Resource
private InventoryInformationService inventoryInformationService;
private QueryWrapper<SalesData> createQueryWrapper(SalesDataQuery query) {
// todo: 这里根据具体业务调整查询条件
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
QueryWrapper<SalesData> qw = new QueryWrapper<>();
return qw;
}
public PagerVo<SalesDataVo> listPageVo(PagerQuery<SalesDataQuery> pq) {
SalesDataQuery query = pq.getParams();
QueryWrapper<SalesData> qw = createQueryWrapper(query);
IPage<SalesData> page = PagerUtil.queryToPage(pq);
IPage<SalesDataVo> pagging = baseMapper.selectPageVo(page, qw);
PagerVo<SalesDataVo> p = PagerUtil.pageToVo(pagging, null);
return p;
}
public void saveOrUpdateDto(SalesDataDto dto){
String dtoSid = dto.getSid();
if (StringUtils.isBlank(dtoSid)) {
this.insertByDto(dto);
return;
}
this.updateByDto(dto);
}
public void insertByDto(SalesDataDto dto){
SalesData entity = new SalesData();
BeanUtil.copyProperties(dto, entity, "id", "sid");
baseMapper.insert(entity);
}
public void updateByDto(SalesDataDto dto){
String dtoSid = dto.getSid();
if (StringUtils.isBlank(dtoSid)) {
return;
}
SalesData entity = fetchBySid(dtoSid);
BeanUtil.copyProperties(dto, entity, "id", "sid");
baseMapper.updateById(entity);
}
public SalesDataDetailsVo fetchDetailsVoBySid(String sid){
SalesData entity = fetchBySid(sid);
SalesDataDetailsVo vo = new SalesDataDetailsVo();
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 = 2; rowNum <= hssfSheet.getLastRowNum(); rowNum++) {
SalesData sd=new SalesData();
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();
value=value.trim();
sd.setType(value);
}
}
if (i == 2) {//供应商名称
brandIdHSSFCell.setCellType(CellType.STRING);
if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
String value = brandIdHSSFCell.getStringCellValue();
value=value.trim();
sd.setCode(value);
}
}
if (i == 3) {//商品代码
brandIdHSSFCell.setCellType(CellType.STRING);
String value = brandIdHSSFCell.getStringCellValue();
value=value.trim();
sd.setProCode(value);
}
if (i == 4) {//商品条码
brandIdHSSFCell.setCellType(CellType.STRING);
if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
String value = brandIdHSSFCell.getStringCellValue();
value=value.trim();
sd.setProBarCode(value);
}
}
if (i == 5) {//商品名称
brandIdHSSFCell.setCellType(CellType.STRING);
if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
String value = brandIdHSSFCell.getStringCellValue();
value=value.trim();
sd.setProName(value);
}
}
if (i == 6) {//销售数量
brandIdHSSFCell.setCellType(CellType.STRING);
if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
String value = brandIdHSSFCell.getStringCellValue();
value=value.trim();
sd.setSaleNum(value);
}
}
if (i == 7) {//销售渠道
brandIdHSSFCell.setCellType(CellType.STRING);
if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
String value = brandIdHSSFCell.getStringCellValue();
value=value.trim();
sd.setStoreCode(value);
}
}
if (i == 8) {//销售价格
brandIdHSSFCell.setCellType(CellType.STRING);
if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
String value = brandIdHSSFCell.getStringCellValue();
value=value.trim();
sd.setSalePrice(value);
}
}
if (i == 9) {//销售成本
brandIdHSSFCell.setCellType(CellType.STRING);
if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
String value = brandIdHSSFCell.getStringCellValue();
value=value.trim();
sd.setSaleCost(value);
}
}
if (i == 10) {//利润
brandIdHSSFCell.setCellType(CellType.STRING);
if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
String value = brandIdHSSFCell.getStringCellValue();
value=value.trim();
sd.setProfit(value);
}
}
if (i == 11) {//销售日期
brandIdHSSFCell.setCellType(CellType.STRING);
if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
String value = brandIdHSSFCell.getStringCellValue();
value=value.trim();
sd.setDataDate(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(sd);
inventoryInformationService.reduceStock(sd.getProCode(),sd.getStoreCode(),sd.getSaleNum());
log.info("productInformation:{}", JSONObject.toJSONString(sd));
}
String x = JSON.toJSONString(lisss);
System.out.println(x);
String x1 = JSON.toJSONString(lisss2);
System.out.println(x1);
//return message;
}
}

2
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/storeout/StoreOutService.java

@ -88,6 +88,8 @@ public class StoreOutService extends MybatisBaseService<StoreOutMapper, StoreOut
map.put(c_f, dto); map.put(c_f, dto);
} }
StoreOutItem item = createStoreOutItemFromRow(row); StoreOutItem item = createStoreOutItemFromRow(row);
String storeCode = dto.getStoreOut().getStoreCode();// 仓库/门店编号
String productCode = item.getProductCode();
dto.getItemList().add(item); dto.getItemList().add(item);
} }

Loading…
Cancel
Save