|
|
@ -30,14 +30,22 @@ 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.brandinfo.BrandInfoVo; |
|
|
|
import com.yxt.supervise.portal.api.dictcommon.DictCommon; |
|
|
|
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 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.api.storeinfo.StoreInfo; |
|
|
|
import com.yxt.supervise.portal.biz.brandinfo.BrandInfoService; |
|
|
|
import com.yxt.supervise.portal.biz.dictcommon.DictCommonService; |
|
|
|
import com.yxt.supervise.portal.biz.inventoryinformation.InventoryInformationService; |
|
|
|
import com.yxt.supervise.portal.biz.productinformation.ProductInformationService; |
|
|
|
import com.yxt.supervise.portal.biz.purchaserequisition.PurchaseRequisitionService; |
|
|
|
import com.yxt.supervise.portal.biz.purchaserequisitionpro.PurchaseRequisitionProService; |
|
|
|
import com.yxt.supervise.portal.biz.restrictedcategory.RestrictedCategoryService; |
|
|
|
import com.yxt.supervise.portal.biz.storeinfo.StoreInfoService; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
@ -91,6 +99,14 @@ public class SalesDataService extends MybatisBaseService<SalesDataMapper, SalesD |
|
|
|
private ProductInformationService productInformationService; |
|
|
|
@Resource |
|
|
|
private StoreInfoService storeInfoService; |
|
|
|
@Resource |
|
|
|
private PurchaseRequisitionProService purchaseRequisitionProService; |
|
|
|
@Resource |
|
|
|
private PurchaseRequisitionService purchaseRequisitionService; |
|
|
|
@Resource |
|
|
|
private BrandInfoService brandInfoService; |
|
|
|
@Resource |
|
|
|
private DictCommonService dictCommonService; |
|
|
|
private QueryWrapper<SalesData> createQueryWrapper(SalesDataQuery query) { |
|
|
|
// todo: 这里根据具体业务调整查询条件
|
|
|
|
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
|
|
|
@ -149,7 +165,7 @@ public class SalesDataService extends MybatisBaseService<SalesDataMapper, SalesD |
|
|
|
List<String> lisss2=new ArrayList<>(); |
|
|
|
HSSFSheet hssfSheet = hssfWorkbook.getSheetAt(0); |
|
|
|
// 循环行Row
|
|
|
|
for (int rowNum = 2; rowNum <= hssfSheet.getLastRowNum(); rowNum++) { |
|
|
|
for (int rowNum = 1; rowNum <= hssfSheet.getLastRowNum(); rowNum++) { |
|
|
|
SalesData sd=new SalesData(); |
|
|
|
HSSFRow hssfRow = hssfSheet.getRow(rowNum); |
|
|
|
int i = 0; |
|
|
@ -158,7 +174,7 @@ public class SalesDataService extends MybatisBaseService<SalesDataMapper, SalesD |
|
|
|
for ( ; i < hssfRow.getLastCellNum(); i++) { |
|
|
|
HSSFCell brandIdHSSFCell = hssfRow.getCell(i); |
|
|
|
if(brandIdHSSFCell!=null){ |
|
|
|
if (i == 1) {//供应商代码
|
|
|
|
if (i == 1) {//类型
|
|
|
|
brandIdHSSFCell.setCellType(CellType.STRING); |
|
|
|
if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { |
|
|
|
String value = brandIdHSSFCell.getStringCellValue(); |
|
|
@ -166,7 +182,7 @@ public class SalesDataService extends MybatisBaseService<SalesDataMapper, SalesD |
|
|
|
sd.setType(value); |
|
|
|
} |
|
|
|
} |
|
|
|
if (i == 2) {//供应商名称
|
|
|
|
if (i == 2) {//销售订单号
|
|
|
|
brandIdHSSFCell.setCellType(CellType.STRING); |
|
|
|
if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { |
|
|
|
String value = brandIdHSSFCell.getStringCellValue(); |
|
|
@ -197,7 +213,103 @@ public class SalesDataService extends MybatisBaseService<SalesDataMapper, SalesD |
|
|
|
sd.setProName(value); |
|
|
|
} |
|
|
|
} |
|
|
|
if (i == 6) {//销售数量
|
|
|
|
if (i == 6) {//品牌代码
|
|
|
|
brandIdHSSFCell.setCellType(CellType.STRING); |
|
|
|
if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { |
|
|
|
String value = brandIdHSSFCell.getStringCellValue(); |
|
|
|
value=value.trim(); |
|
|
|
sd.setBrandCode(value); |
|
|
|
} |
|
|
|
} |
|
|
|
if (i == 7) {//品牌名称
|
|
|
|
brandIdHSSFCell.setCellType(CellType.STRING); |
|
|
|
if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { |
|
|
|
String value = brandIdHSSFCell.getStringCellValue(); |
|
|
|
value=value.trim(); |
|
|
|
sd.setBrandName(value); |
|
|
|
BrandInfoVo brandInfoVo = brandInfoService.selectByCode(sd.getBrandCode()); |
|
|
|
if(brandInfoVo==null){ |
|
|
|
BrandInfo brandInfo = new BrandInfo(); |
|
|
|
brandInfo.setName(value); |
|
|
|
brandInfo.setCode(sd.getBrandCode()); |
|
|
|
brandInfoService.insert(brandInfo); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (i == 8) {//大类
|
|
|
|
brandIdHSSFCell.setCellType(CellType.STRING); |
|
|
|
if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { |
|
|
|
String value = brandIdHSSFCell.getStringCellValue(); |
|
|
|
value=value.trim(); |
|
|
|
String[] split = value.split("]"); |
|
|
|
String key = split[0].replace("[","");//key
|
|
|
|
String v=split[1];//类别value
|
|
|
|
sd.setCategoryb(value); |
|
|
|
DictCommonDetailsVo category = dictCommonService.fetchByKeyAndType(key, "category"); |
|
|
|
if(category==null){ |
|
|
|
DictCommon dc=new DictCommon(); |
|
|
|
dc.setDictType("category"); |
|
|
|
dc.setDictKey(key); |
|
|
|
dc.setDictValue(v); |
|
|
|
dictCommonService.insert(dc); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (i == 9) {//中类
|
|
|
|
brandIdHSSFCell.setCellType(CellType.STRING); |
|
|
|
if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { |
|
|
|
String value = brandIdHSSFCell.getStringCellValue(); |
|
|
|
value=value.trim(); |
|
|
|
String[] split = value.split("]"); |
|
|
|
String key = split[0].replace("[","");//key
|
|
|
|
String v=split[1];//类别value
|
|
|
|
sd.setCategorym(value); |
|
|
|
DictCommonDetailsVo category = dictCommonService.fetchByKeyAndType(key, "category"); |
|
|
|
if(category==null){ |
|
|
|
DictCommon dc=new DictCommon(); |
|
|
|
dc.setDictType("category"); |
|
|
|
dc.setDictKey(key); |
|
|
|
dc.setDictValue(v); |
|
|
|
dictCommonService.insert(dc); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (i == 10) {//小类
|
|
|
|
brandIdHSSFCell.setCellType(CellType.STRING); |
|
|
|
if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { |
|
|
|
String value = brandIdHSSFCell.getStringCellValue(); |
|
|
|
value=value.trim(); |
|
|
|
String[] split = value.split("]"); |
|
|
|
String key = split[0].replace("[","");//key
|
|
|
|
String v=split[1];//类别value
|
|
|
|
sd.setCategorys(value); |
|
|
|
DictCommonDetailsVo category = dictCommonService.fetchByKeyAndType(key, "category"); |
|
|
|
if(category==null){ |
|
|
|
DictCommon dc=new DictCommon(); |
|
|
|
dc.setDictType("category"); |
|
|
|
dc.setDictKey(key); |
|
|
|
dc.setDictValue(v); |
|
|
|
dictCommonService.insert(dc); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (i == 11) {//客户代码
|
|
|
|
brandIdHSSFCell.setCellType(CellType.STRING); |
|
|
|
if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { |
|
|
|
String value = brandIdHSSFCell.getStringCellValue(); |
|
|
|
value=value.trim(); |
|
|
|
sd.setCustomerCode(value); |
|
|
|
} |
|
|
|
} |
|
|
|
if (i == 12) {//客户名称
|
|
|
|
brandIdHSSFCell.setCellType(CellType.STRING); |
|
|
|
if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { |
|
|
|
String value = brandIdHSSFCell.getStringCellValue(); |
|
|
|
value=value.trim(); |
|
|
|
sd.setCustomerName(value); |
|
|
|
} |
|
|
|
} |
|
|
|
if (i == 13) {//销售数量
|
|
|
|
brandIdHSSFCell.setCellType(CellType.STRING); |
|
|
|
if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { |
|
|
|
String value = brandIdHSSFCell.getStringCellValue(); |
|
|
@ -205,7 +317,7 @@ public class SalesDataService extends MybatisBaseService<SalesDataMapper, SalesD |
|
|
|
sd.setSaleNum(value); |
|
|
|
} |
|
|
|
} |
|
|
|
if (i == 7) {//销售渠道
|
|
|
|
if (i == 14) {//销售渠道
|
|
|
|
brandIdHSSFCell.setCellType(CellType.STRING); |
|
|
|
if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { |
|
|
|
String value = brandIdHSSFCell.getStringCellValue(); |
|
|
@ -213,7 +325,7 @@ public class SalesDataService extends MybatisBaseService<SalesDataMapper, SalesD |
|
|
|
sd.setStoreCode(value); |
|
|
|
} |
|
|
|
} |
|
|
|
if (i == 8) {//销售价格
|
|
|
|
if (i == 15) {//销售价格
|
|
|
|
brandIdHSSFCell.setCellType(CellType.STRING); |
|
|
|
if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { |
|
|
|
String value = brandIdHSSFCell.getStringCellValue(); |
|
|
@ -221,7 +333,7 @@ public class SalesDataService extends MybatisBaseService<SalesDataMapper, SalesD |
|
|
|
sd.setSalePrice(value); |
|
|
|
} |
|
|
|
} |
|
|
|
if (i == 9) {//销售成本
|
|
|
|
if (i == 16) {//销售成本
|
|
|
|
brandIdHSSFCell.setCellType(CellType.STRING); |
|
|
|
if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { |
|
|
|
String value = brandIdHSSFCell.getStringCellValue(); |
|
|
@ -229,7 +341,7 @@ public class SalesDataService extends MybatisBaseService<SalesDataMapper, SalesD |
|
|
|
sd.setSaleCost(value); |
|
|
|
} |
|
|
|
} |
|
|
|
if (i == 10) {//利润
|
|
|
|
if (i == 17) {//利润
|
|
|
|
brandIdHSSFCell.setCellType(CellType.STRING); |
|
|
|
if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { |
|
|
|
String value = brandIdHSSFCell.getStringCellValue(); |
|
|
@ -237,7 +349,7 @@ public class SalesDataService extends MybatisBaseService<SalesDataMapper, SalesD |
|
|
|
sd.setProfit(value); |
|
|
|
} |
|
|
|
} |
|
|
|
if (i == 11) {//销售日期
|
|
|
|
if (i == 18) {//销售日期
|
|
|
|
brandIdHSSFCell.setCellType(CellType.STRING); |
|
|
|
if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) { |
|
|
|
String value = brandIdHSSFCell.getStringCellValue(); |
|
|
@ -266,13 +378,74 @@ public class SalesDataService extends MybatisBaseService<SalesDataMapper, SalesD |
|
|
|
System.out.println(x1); |
|
|
|
//return message;
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* |
|
|
|
* 销售明细表 |
|
|
|
* @param pc |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
/*public HSSFWorkbook analysisSalesData2(String pc){ |
|
|
|
|
|
|
|
}*/ |
|
|
|
|
|
|
|
/** |
|
|
|
* |
|
|
|
* 分析销售数据 |
|
|
|
* @param pc |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public HSSFWorkbook analysisSalesData(String pc){ |
|
|
|
public HSSFWorkbook analysisSalesData(String pc,String storeCode){ |
|
|
|
List<SalesData> list=new ArrayList<>(); |
|
|
|
if(com.yxt.common.base.utils.StringUtils.isNotBlank(pc)&&com.yxt.common.base.utils.StringUtils.isNotBlank(storeCode)){ |
|
|
|
list=baseMapper.selectByDateAndstoreCode(pc,storeCode); |
|
|
|
}else if(com.yxt.common.base.utils.StringUtils.isNotBlank(pc)&&com.yxt.common.base.utils.StringUtils.isBlank(storeCode)){ |
|
|
|
list=baseMapper.selectByDate(pc); |
|
|
|
}else if(com.yxt.common.base.utils.StringUtils.isBlank(pc)&&com.yxt.common.base.utils.StringUtils.isBlank(storeCode)){ |
|
|
|
list=baseMapper.selectAll(); |
|
|
|
}else if(com.yxt.common.base.utils.StringUtils.isBlank(pc)&&com.yxt.common.base.utils.StringUtils.isNotBlank(storeCode)){ |
|
|
|
list=baseMapper.selectByStoreCode(storeCode); |
|
|
|
} |
|
|
|
//创建HSSFWorkbook
|
|
|
|
addProductNum(list); |
|
|
|
List<Map<String,String>> listss=new ArrayList<>(); |
|
|
|
for(SalesData s:list){ |
|
|
|
String proCode = s.getProCode(); |
|
|
|
//List<StoreInfo> storeInfos=storeInfoService.selectLimitStores();
|
|
|
|
List<PurchaseRequisitionPro> lps=purchaseRequisitionProService.selectByCode(proCode); |
|
|
|
if(lps==null||lps.size()==0){ |
|
|
|
continue; |
|
|
|
} |
|
|
|
if(s.getState()==1){ |
|
|
|
BigDecimal multiply = new BigDecimal(s.getSaleNum()).multiply(new BigDecimal(s.getSalePrice())); |
|
|
|
StoreInfo storeInfo = storeInfoService.selectByCodeAndLimit(s.getStoreCode()); |
|
|
|
if(storeInfo!=null){ |
|
|
|
System.out.println( |
|
|
|
"[" |
|
|
|
+s.getStoreCode()+"]"+storeInfo.getName()+","+s.getType()+"," |
|
|
|
+s.getCode()+","+s.getProCode()+","+s.getProName()+","+s.getSaleNum()+"," |
|
|
|
+s.getSalePrice()+","+multiply.toString()); |
|
|
|
Map<String,String> map=new HashMap<>(); |
|
|
|
map.put("t1","["+s.getStoreCode()+"]"+storeInfo.getName()); |
|
|
|
map.put("t2",storeInfo.getName()); |
|
|
|
map.put("t3",s.getType()); |
|
|
|
map.put("t4",s.getCode()); |
|
|
|
map.put("t5",s.getProCode()); |
|
|
|
map.put("t6",s.getProName()); |
|
|
|
map.put("t7",s.getSaleNum()); |
|
|
|
map.put("t8",s.getSalePrice()); |
|
|
|
map.put("t9",multiply.toString()); |
|
|
|
listss.add(map); |
|
|
|
} else { |
|
|
|
log.info("SalesData:{}",JSONObject.toJSONString(s)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
baseMapper.insertStoreInfo(listss); |
|
|
|
return null; |
|
|
|
} |
|
|
|
public HSSFWorkbook analysisSalesData2(String pc,String storeCode){ |
|
|
|
// 企业组织机构代码证 类型 销售订单号 商品编码 商品条码 商品名称 销售数量 销售渠道 销售价格 销售成本 利润 数据日期
|
|
|
|
|
|
|
|
String title = "销售数据"; |
|
|
@ -280,11 +453,21 @@ public class SalesDataService extends MybatisBaseService<SalesDataMapper, SalesD |
|
|
|
"利润" ,"限定情况","数据日期","备注"}; |
|
|
|
//sheet名
|
|
|
|
String sheetName = pc+"销售数据"; |
|
|
|
List<SalesData> list=baseMapper.selectByDate(pc); |
|
|
|
List<SalesData> list=new ArrayList<>(); |
|
|
|
if(com.yxt.common.base.utils.StringUtils.isNotBlank(pc)&&com.yxt.common.base.utils.StringUtils.isNotBlank(storeCode)){ |
|
|
|
list=baseMapper.selectByDateAndstoreCode(pc,storeCode); |
|
|
|
}else if(com.yxt.common.base.utils.StringUtils.isNotBlank(pc)&&com.yxt.common.base.utils.StringUtils.isBlank(storeCode)){ |
|
|
|
list=baseMapper.selectByDate(pc); |
|
|
|
}else if(com.yxt.common.base.utils.StringUtils.isBlank(pc)&&com.yxt.common.base.utils.StringUtils.isBlank(storeCode)){ |
|
|
|
list=baseMapper.selectAll(); |
|
|
|
}else if(com.yxt.common.base.utils.StringUtils.isBlank(pc)&&com.yxt.common.base.utils.StringUtils.isNotBlank(storeCode)){ |
|
|
|
list=baseMapper.selectByStoreCode(storeCode); |
|
|
|
} |
|
|
|
|
|
|
|
//创建HSSFWorkbook
|
|
|
|
addProductNum(list); |
|
|
|
// 第一步,创建一个HSSFWorkbook,对应一个Excel文件
|
|
|
|
HSSFWorkbook wb = new HSSFWorkbook(); |
|
|
|
HSSFWorkbook wb = new HSSFWorkbook (); |
|
|
|
// 第二步,在workbook中添加一个sheet,对应Excel文件中的sheet
|
|
|
|
HSSFSheet sheet = wb.createSheet(sheetName); |
|
|
|
// 合并单元格:参数:起始行, 终止行, 起始列, 终止列
|
|
|
@ -303,12 +486,14 @@ public class SalesDataService extends MybatisBaseService<SalesDataMapper, SalesD |
|
|
|
createRow3(sheet, 1, col1, style); |
|
|
|
BigDecimal bigDecimal = new BigDecimal("0"); |
|
|
|
//创建内容
|
|
|
|
int index = 0;//记录额外创建的sheet数量
|
|
|
|
for(int i=0;i<list.size();i++){ |
|
|
|
SalesData salesData = list.get(i); |
|
|
|
row = sheet.createRow(i + 2); |
|
|
|
sheet = wb.createSheet(); |
|
|
|
row = sheet.createRow(i + 2); |
|
|
|
//将内容按顺序赋给对应的列对象
|
|
|
|
//"序号","销售订单号","类型","商品编码","商品条码","商品名称","销售数量","销售渠道","门店名称","销售价格","销售成本","利润" ,"限定情况","数据日期","备注"
|
|
|
|
row.createCell(0).setCellValue(i+1); |
|
|
|
row.createCell(0).setCellValue(i + 1); |
|
|
|
row.createCell(1).setCellValue(salesData.getCode()); |
|
|
|
row.createCell(2).setCellValue(salesData.getType()); |
|
|
|
row.createCell(3).setCellValue(salesData.getProCode()); |
|
|
@ -316,27 +501,24 @@ public class SalesDataService extends MybatisBaseService<SalesDataMapper, SalesD |
|
|
|
row.createCell(5).setCellValue(salesData.getProName()); |
|
|
|
row.createCell(6).setCellValue(salesData.getSaleNum()); |
|
|
|
row.createCell(7).setCellValue(salesData.getStoreCode()); |
|
|
|
StoreInfo storeInfo=storeInfoService.selectByCode(salesData.getStoreCode()); |
|
|
|
if(storeInfo!=null){ |
|
|
|
StoreInfo storeInfo = storeInfoService.selectByCode(salesData.getStoreCode()); |
|
|
|
if (storeInfo != null) { |
|
|
|
row.createCell(8).setCellValue(storeInfo.getName()); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
row.createCell(8).setCellValue(""); |
|
|
|
} |
|
|
|
row.createCell(9).setCellValue(salesData.getSalePrice());//"销售价格"
|
|
|
|
BigDecimal bigDecimal1 = new BigDecimal(salesData.getSalePrice()); |
|
|
|
bigDecimal=bigDecimal.add(bigDecimal1); |
|
|
|
bigDecimal = bigDecimal.add(bigDecimal1); |
|
|
|
row.createCell(10).setCellValue(salesData.getSaleCost());//"销售成本"
|
|
|
|
row.createCell(11).setCellValue(salesData.getProfit()); |
|
|
|
row.createCell(12).setCellValue(salesData.getState()==1?"符合":salesData.getState()==0?"不符合":"未知"); |
|
|
|
row.createCell(12).setCellValue(salesData.getState() == 1 ? "符合" : salesData.getState() == 0 ? "不符合" : "未知"); |
|
|
|
row.createCell(13).setCellValue(salesData.getDataDate()); |
|
|
|
row.createCell(14).setCellValue(salesData.getRemarks()); |
|
|
|
} |
|
|
|
row = sheet.createRow(list.size() + 2); |
|
|
|
row.createCell(0).setCellValue("合计"); |
|
|
|
row.createCell(9).setCellValue(bigDecimal.toString()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sheetName = pc+"符合限定品类的销售数据"; |
|
|
|
//创建HSSFWorkbook
|
|
|
|
// 第一步,创建一个HSSFWorkbook,对应一个Excel文件
|
|
|
@ -359,7 +541,9 @@ public class SalesDataService extends MybatisBaseService<SalesDataMapper, SalesD |
|
|
|
for(int i=0;i<list.size();i++){ |
|
|
|
SalesData salesData = list.get(i); |
|
|
|
if(salesData.getState()==1){ |
|
|
|
row2 = sheet2.createRow(j + 2); |
|
|
|
sheet2 = wb.createSheet(); |
|
|
|
row2 = sheet2.createRow(i + 2); |
|
|
|
//row2 = sheet2.createRow(j + 2);
|
|
|
|
//将内容按顺序赋给对应的列对象
|
|
|
|
//"序号","销售订单号","类型","商品编码","商品条码","商品名称","销售数量","销售渠道","门店名称","销售价格","销售成本","利润" ,"限定情况","数据日期","备注"
|
|
|
|
row2.createCell(0).setCellValue(j+1); |
|
|
@ -390,11 +574,6 @@ public class SalesDataService extends MybatisBaseService<SalesDataMapper, SalesD |
|
|
|
row2 = sheet2.createRow(j + 2); |
|
|
|
row2.createCell(0).setCellValue("合计"); |
|
|
|
row2.createCell(9).setCellValue(bigDecimal2.toString()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sheetName = pc+"不符合限定品类的销售数据"; |
|
|
|
//创建HSSFWorkbook
|
|
|
|
// 第一步,创建一个HSSFWorkbook,对应一个Excel文件
|
|
|
@ -449,9 +628,6 @@ public class SalesDataService extends MybatisBaseService<SalesDataMapper, SalesD |
|
|
|
row3.createCell(0).setCellValue("合计"); |
|
|
|
row3.createCell(9).setCellValue(bigDecimal3.toString()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sheetName = pc+"未知限定品类的销售数据"; |
|
|
|
//创建HSSFWorkbook
|
|
|
|
// 第一步,创建一个HSSFWorkbook,对应一个Excel文件
|
|
|
|