Browse Source

销售数据导入

master
lzh 2 years ago
parent
commit
6f723172da
  1. 20
      base-ui/src/api/kucun/sales.js
  2. 2
      base-ui/src/views/kucun/pfsjgl/index.vue
  3. 40
      base-ui/src/views/kucun/xssjgl/index.vue
  4. 2
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryService.java
  5. 68
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSales.java
  6. 68
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesGd.java
  7. 51
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesGdMapper.java
  8. 50
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesGdService.java
  9. 69
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesLog.java
  10. 62
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesLogErr.java
  11. 46
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesLogErrMapper.java
  12. 46
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesLogErrService.java
  13. 46
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesLogMapper.java
  14. 74
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesLogService.java
  15. 51
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesMapper.java
  16. 48
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesQuery.java
  17. 80
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesRest.java
  18. 207
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesService.java
  19. 68
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesYc.java
  20. 50
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesYcMapper.java
  21. 50
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesYcService.java

20
base-ui/src/api/kucun/sales.js

@ -0,0 +1,20 @@
import request from '@/utils/request'
// 条件查询
export function buildExcel(logId) {
return request({
url: '/sales/buildExcel/' + logId
})
}
// 加盟店入库明细表按天查询
export function logsPagerList(data) {
return request({
url: '/sales/logsPagerList',
data,
method: 'post',
headers: {
'Content-Type': 'application/json'
}
})
}

2
base-ui/src/views/kucun/pfsjgl/index.vue

@ -21,7 +21,7 @@
</div> </div>
<!-- Start 项目列表头部 --> <!-- Start 项目列表头部 -->
<div class="listtop"> <div class="listtop">
<div class="tit">采购订单列表</div> <div class="tit">上传记录列表</div>
<pageye <pageye
v-show="dataList.length > 0" v-show="dataList.length > 0"
:total="queryParams.total" :total="queryParams.total"

40
base-ui/src/views/kucun/xssjgl/index.vue

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div v-show="viewState == 1"> <div v-show="viewState == 1">
<button-bar ref="btnbar" view-title="批发数据上传记录" :btndisabled="btndisabled" @btnhandle="btnHandle" /> <button-bar ref="btnbar" view-title="销售数据上传记录" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<div class="main-content"> <div class="main-content">
<div class="searchcon"> <div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> <el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
@ -21,7 +21,7 @@
</div> </div>
<!-- Start 项目列表头部 --> <!-- Start 项目列表头部 -->
<div class="listtop"> <div class="listtop">
<div class="tit">采购订单列表</div> <div class="tit">上传记录列表</div>
<pageye <pageye
v-show="dataList.length > 0" v-show="dataList.length > 0"
:total="queryParams.total" :total="queryParams.total"
@ -38,7 +38,7 @@
<el-table-column fixed width="50" type="selection" align="center" /> <el-table-column fixed width="50" type="selection" align="center" />
<el-table-column fixed width="180" label="操作" align="center"> <el-table-column fixed width="180" label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" @click="downExcel(scope.row)">下载批发数据Excel</el-button> <el-button type="primary" size="mini" @click="downExcel(scope.row)">下载销售数据Excel</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="orderDate" label="单据日期" align="center" width="120" /> <el-table-column prop="orderDate" label="单据日期" align="center" width="120" />
@ -56,10 +56,40 @@
</div> </div>
</div> </div>
</div> </div>
<el-dialog title="上传<汇融银行_销售数据>" :visible.sync="dialogVisible" width="60%" :before-close="dialogClose">
<el-card class="box-card">
<div>
<el-upload
ref="upload"
class="upload-demo"
:action="updateAction"
:on-progress="handleProgress"
:on-success="handleSuccess"
:file-list="fileList"
:auto-upload="false"
:multiple="false"
:limit="1"
>
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button>
<div slot="tip" class="el-upload__tip">上传 汇融银行_销售数据.xlsx文件</div>
</el-upload>
</div>
<div>
<h3>文件上传结果</h3>
<el-card class="box-card">
<div>共导入数据{{ currentLog.allNum }} 符合监管条件的数据{{ currentLog.validNum }} 用时{{ currentLog.durations }} 毫秒</div>
</el-card>
</div>
<div><el-button :disabled="filecandown" size="small" type="primary" @click="doDownloadHz">下载批发数据文件</el-button></div>
</el-card>
<span slot="footer" class="dialog-footer"><el-button @click="dialogClose"> </el-button></span>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { buildExcel, logsPagerList } from '@/api/kucun/sales'
import ButtonBar from '@/components/ButtonBar' import ButtonBar from '@/components/ButtonBar'
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import pageye from '@/components/pagination/pageye'
@ -82,7 +112,7 @@ export default {
size: 'small', size: 'small',
icon: 'upload', icon: 'upload',
btnKey: 'toAdd', btnKey: 'toAdd',
btnLabel: '上传批发数据' btnLabel: '上传销售数据'
}, },
{ {
type: 'info', type: 'info',
@ -104,7 +134,7 @@ export default {
} }
}, },
dialogVisible: false, dialogVisible: false,
updateAction: process.env.VUE_APP_BASE_API + '/wholesale/uploadPszxpfsj', updateAction: process.env.VUE_APP_BASE_API + '/sales/uploadXssj',
fileList: [], fileList: [],
currentLog: {}, currentLog: {},
filecandown: true, filecandown: true,

2
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryService.java

@ -385,7 +385,7 @@ public class GdInventoryService extends ServiceImpl<GdInventoryMapper, GdInvento
} }
} }
if (checkYcProd(prodCode) && storeInfoService.containsCodeOfYc(warehouseCode)) { if (checkYcProd(typeCode) && storeInfoService.containsCodeOfYc(warehouseCode)) {
GdInventoryYc yc = new GdInventoryYc(); GdInventoryYc yc = new GdInventoryYc();
Map<String, Object> map = readMapFromRow(r); Map<String, Object> map = readMapFromRow(r);

68
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSales.java

@ -0,0 +1,68 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.biz.gdsales;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yxt.common.core.domain.EntityWithId;
import lombok.Data;
/**
* Project: yxt_supervise <br/>
* File: GdSales.java <br/>
* Class: com.yxt.supervise.portal.biz.gdsales.GdSales <br/>
* Description: <描述类的功能>. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2023/1/7 16:08 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@TableName("gd_sales")
public class GdSales extends EntityWithId {
private String orgCode; // 企业组织机构代码证
private String orderType; // 订单类型
private String orderNo; // 销售订单号
private String prodCode; // 商品编码
private String prodBarCode; // 商品条码
private String prodName; // 商品名称
private String brandCode; // 品牌代码
private String brandName; // 品牌名称
private String categoryb; // 商品大类
private String categorym; // 商品中类
private String categorys; // 商品小类
private String customerCode; // 客户代码
private String customerName; // 客户名称
private String saleNum; // 销售数量
private String storeCode; // 销售渠道
private String salePrice; // 销售价格
private String saleCost; // 销售成本
private String profit; // 利润
private String dataDate; // 数据日期
}

68
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesGd.java

@ -0,0 +1,68 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.biz.gdsales;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yxt.common.core.domain.EntityWithId;
import lombok.Data;
/**
* Project: yxt_supervise <br/>
* File: GdSalesGd.java <br/>
* Class: com.yxt.supervise.portal.biz.gdsales.GdSalesGd <br/>
* Description: <描述类的功能>. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2023/1/7 16:09 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@TableName("gd_sales_gd")
public class GdSalesGd extends EntityWithId {
private String orgCode; // 企业组织机构代码证
private String orderType; // 订单类型
private String orderNo; // 销售订单号
private String prodCode; // 商品编码
private String prodBarCode; // 商品条码
private String prodName; // 商品名称
private String brandCode; // 品牌代码
private String brandName; // 品牌名称
private String categoryb; // 商品大类
private String categorym; // 商品中类
private String categorys; // 商品小类
private String customerCode; // 客户代码
private String customerName; // 客户名称
private String saleNum; // 销售数量
private String storeCode; // 销售渠道
private String salePrice; // 销售价格
private String saleCost; // 销售成本
private String profit; // 利润
private String dataDate; // 数据日期
}

51
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesGdMapper.java

@ -0,0 +1,51 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.biz.gdsales;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* Project: yxt_supervise <br/>
* File: GdSalesGdMapper.java <br/>
* Class: com.yxt.supervise.portal.biz.gdsales.GdSalesGdMapper <br/>
* Description: <描述类的功能>. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2023/1/7 16:20 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Mapper
public interface GdSalesGdMapper extends BaseMapper<GdSalesGd> {
@Delete("delete from gd_sales_gd where dataDate=#{dataDate} ")
void clearByDataDate(@Param("dataDate") String dataDate);
}

50
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesGdService.java

@ -0,0 +1,50 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.biz.gdsales;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* Project: yxt_supervise <br/>
* File: GdSalesGdService.java <br/>
* Class: com.yxt.supervise.portal.biz.gdsales.GdSalesGdService <br/>
* Description: <描述类的功能>. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2023/1/7 16:21 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Service
public class GdSalesGdService extends ServiceImpl<GdSalesGdMapper,GdSalesGd> {
public void clearByDataDate(String dataDate) {
baseMapper.clearByDataDate(dataDate);
}
}

69
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesLog.java

@ -0,0 +1,69 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.biz.gdsales;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yxt.common.core.domain.EntityWithId;
import lombok.Data;
import java.util.Date;
/**
* Project: yxt_supervise <br/>
* File: GdSalesLog.java <br/>
* Class: com.yxt.supervise.portal.biz.gdsales.GdSalesLog <br/>
* Description: <描述类的功能>. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2023/1/7 16:10 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@TableName("gd_sales_log")
public class GdSalesLog extends EntityWithId {
public GdSalesLog() {
}
public GdSalesLog(String fileFullPath) {
this.fileFullPath = fileFullPath;
}
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime = new Date(); // 记录创建时间/
private String remarks; // 备注说明',
private String fileFullPath; // 文件完整路径',
private String outFilePath; // 汇总文件路径',
private String fileUrl; // 文件下载地址',
private int allNum = 0; // 总记录数',
private int validNum = 0; // 有效记录数',
private long durations = 0; // 程序运行时长',
private int errRowNum = 0; // 出错的条数',
private String orderDate; // 单据日期',
}

62
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesLogErr.java

@ -0,0 +1,62 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.biz.gdsales;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yxt.common.core.domain.EntityWithId;
import lombok.Data;
import java.util.Date;
/**
* Project: yxt_supervise <br/>
* File: GdSalesLogErr.java <br/>
* Class: com.yxt.supervise.portal.biz.gdsales.GdSalesLogErr <br/>
* Description: <描述类的功能>. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2023/1/7 16:11 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@TableName("gd_sales_log_err")
public class GdSalesLogErr extends EntityWithId {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime = new Date(); // 记录创建时间',
private String remarks; // 备注说明',
private String fileFullPath; // 文件完整路径',
private String errInfo; // 异常信息',
private String rowContent; // 原记录内容',
private int rowNum; // 出错行数',
private String orderDate; // 单据日期
private String orderNo; // 销售订单号
private String prodCode; //商品编码
private String prodName; //商品名称
}

46
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesLogErrMapper.java

@ -0,0 +1,46 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.biz.gdsales;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* Project: yxt_supervise <br/>
* File: GdSalesLogErrMapper.java <br/>
* Class: com.yxt.supervise.portal.biz.gdsales.GdSalesLogErrMapper <br/>
* Description: <描述类的功能>. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2023/1/7 16:13 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Mapper
public interface GdSalesLogErrMapper extends BaseMapper<GdSalesLogErr> {
}

46
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesLogErrService.java

@ -0,0 +1,46 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.biz.gdsales;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* Project: yxt_supervise <br/>
* File: GdSalesLogErrService.java <br/>
* Class: com.yxt.supervise.portal.biz.gdsales.GdSalesLogErrService <br/>
* Description: <描述类的功能>. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2023/1/7 16:13 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Service
public class GdSalesLogErrService extends ServiceImpl<GdSalesLogErrMapper,GdSalesLogErr> {
}

46
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesLogMapper.java

@ -0,0 +1,46 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.biz.gdsales;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* Project: yxt_supervise <br/>
* File: GdSalesLogMapper.java <br/>
* Class: com.yxt.supervise.portal.biz.gdsales.GdSalesLogMapper <br/>
* Description: <描述类的功能>. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2023/1/7 16:14 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Mapper
public interface GdSalesLogMapper extends BaseMapper<GdSalesLog> {
}

74
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesLogService.java

@ -0,0 +1,74 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.biz.gdsales;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
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.biz.gdwholesale.GdWholesaleLog;
import com.yxt.supervise.portal.biz.gdwholesale.GdWholesaleQuery;
import org.springframework.stereotype.Service;
/**
* Project: yxt_supervise <br/>
* File: GdSalesLogService.java <br/>
* Class: com.yxt.supervise.portal.biz.gdsales.GdSalesLogService <br/>
* Description: <描述类的功能>. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2023/1/7 16:14 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Service
public class GdSalesLogService extends ServiceImpl<GdSalesLogMapper, GdSalesLog> {
public PagerVo<GdSalesLog> listPageVo(PagerQuery<GdSalesQuery> pq) {
GdSalesQuery query = pq.getParams();
QueryWrapper<GdSalesLog> qw = new QueryWrapper<>();
if (StrUtil.isNotBlank(query.getOrderDateStart())) {
qw.ge("orderDate", query.getOrderDateStart());
}
if (StrUtil.isNotBlank(query.getOrderDateEnd())) {
qw.lt("orderDate", query.getOrderDateEnd());
}
qw.orderByDesc("orderDate");
IPage<GdSalesLog> page = PagerUtil.queryToPage(pq);
IPage<GdSalesLog> pagging = baseMapper.selectPage(page, qw);
PagerVo<GdSalesLog> p = PagerUtil.pageToVo(pagging, null);
return p;
}
public GdSalesLog fetchById(String logId) {
return baseMapper.selectById(logId);
}
}

51
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesMapper.java

@ -0,0 +1,51 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.biz.gdsales;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* Project: yxt_supervise <br/>
* File: GdSalesMapper.java <br/>
* Class: com.yxt.supervise.portal.biz.gdsales.GdSalesMapper <br/>
* Description: <描述类的功能>. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2023/1/7 16:21 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Mapper
public interface GdSalesMapper extends BaseMapper<GdSales> {
@Delete("delete from gd_sales where dataDate=#{dataDate} ")
void clearByDataDate(@Param("dataDate") String dataDate);
}

48
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesQuery.java

@ -0,0 +1,48 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.biz.gdsales;
import com.yxt.common.core.query.Query;
import lombok.Data;
/**
* Project: yxt_supervise <br/>
* File: GdSalesQuery.java <br/>
* Class: com.yxt.supervise.portal.biz.gdsales.GdSalesQuery <br/>
* Description: <描述类的功能>. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2023/1/7 16:25 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
public class GdSalesQuery implements Query {
private String orderDateStart;
private String orderDateEnd;
}

80
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesRest.java

@ -0,0 +1,80 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.biz.gdsales;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
/**
* Project: yxt_supervise <br/>
* File: GdSalesRest.java <br/>
* Class: com.yxt.supervise.portal.biz.gdsales.GdSalesRest <br/>
* Description: <描述类的功能>. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2023/1/7 16:22 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@RestController("com.yxt.supervise.portal.biz.gdsales.GdSalesRest")
@RequestMapping("/sales")
public class GdSalesRest {
@Autowired
private GdSalesService gdSalesService;
@Autowired
private GdSalesLogService gdSalesLogService;
/**
* 上传配送中心批发数据
* @param file
* @return
*/
@PostMapping("/uploadXssj")
public ResultBean<GdSalesLog> uploadGdData(@RequestParam("file") MultipartFile file) {
return gdSalesService.uploadAndInsert(file);
}
@PostMapping("/logsPagerList")
public ResultBean<PagerVo<GdSalesLog>> logsPagerList(@RequestBody PagerQuery<GdSalesQuery> pq) {
ResultBean rb = ResultBean.fireFail();
PagerVo<GdSalesLog> pv = gdSalesLogService.listPageVo(pq);
return rb.success().setData(pv);
}
@GetMapping("/buildExcel/{logId}")
public ResultBean<GdSalesLog> buildExcel(@PathVariable("logId") String logId) {
return gdSalesService.buildExcel(logId);
}
}

207
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesService.java

@ -0,0 +1,207 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.biz.gdsales;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.poi.excel.ExcelUtil;
import cn.hutool.poi.excel.sax.handler.RowHandler;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yxt.common.base.config.component.FileUploadComponent;
import com.yxt.common.core.result.FileUploadResult;
import com.yxt.common.core.result.ResultBean;
import com.yxt.supervise.portal.biz.gdinventory.GdRescategoryProdService;
import com.yxt.supervise.portal.biz.storeindex.StoreIndexService;
import com.yxt.supervise.portal.biz.storeinfo.StoreInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import java.util.ArrayList;
import java.util.List;
/**
* Project: yxt_supervise <br/>
* File: GdSalesService.java <br/>
* Class: com.yxt.supervise.portal.biz.gdsales.GdSalesService <br/>
* Description: <描述类的功能>. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2023/1/7 16:21 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Service
public class GdSalesService extends ServiceImpl<GdSalesMapper, GdSales> {
@Value("${image.upload.path:static/upload/}")
private String uploadPath;
@Value("${image.url.prefix:http://127.0.0.1:8080/upload/}")
private String urlPrefix;
@Autowired
private GdSalesGdService gdSalesGdService;
@Autowired
private GdSalesYcService gdSalesYcService;
@Autowired
private GdSalesLogService gdSalesLogService;
@Autowired
private GdSalesLogErrService gdSalesLogErrService;
@Autowired
private FileUploadComponent fileUploadComponent;
@Autowired
private GdRescategoryProdService gdRescategoryProdService;
@Autowired
private StoreInfoService storeInfoService;
@Autowired
private StoreIndexService storeIndexService;
public ResultBean<GdSalesLog> uploadAndInsert(MultipartFile file) {
ResultBean rb = ResultBean.fireFail();
ResultBean<FileUploadResult> fub = fileUploadComponent.uploadFile(file, "xssj");
String filePath = fub.getData().getFilePath();
String fp = fileUploadComponent.getUploadPath() + filePath;
long millis = System.currentTimeMillis();
GdSalesLog gdlog = new GdSalesLog(fp);
ExcelUtil.read07BySax(fp, -1, createRowHandler(gdlog));
gdlog.setDurations(System.currentTimeMillis() - millis);
gdSalesLogService.save(gdlog);
return rb.success().setData(gdlog);
}
private RowHandler createRowHandler(GdSalesLog gdlog) {
return new RowHandler() {
private List<GdSalesGd> toInsertListGd = new ArrayList<>();
private List<GdSalesYc> toInsertListYc = new ArrayList<>();
private List<GdSales> toInsertList = new ArrayList<>();
private List<GdSalesLogErr> errList = new ArrayList<>();
private int x = 0, y = 0, errnum = 0;
private String odate = null;
private GdSalesGd rowToEntity(List<Object> r) {
GdSalesGd gd = new GdSalesGd();
gd.setOrgCode("" + r.get(0)); // 企业组织机构代码证
gd.setOrderType("" + r.get(1)); // 订单类型
gd.setOrderNo("" + r.get(2)); // 销售订单号
gd.setProdCode("" + r.get(3)); // 商品编码
gd.setProdBarCode("" + r.get(4)); // 商品条码
gd.setProdName("" + r.get(5)); // 商品名称
gd.setBrandCode("" + r.get(6)); // 品牌代码
gd.setBrandName("" + r.get(7)); // 品牌名称
gd.setCategoryb("" + r.get(8)); // 商品大类
gd.setCategorym("" + r.get(9)); // 商品中类
gd.setCategorys("" + r.get(10)); // 商品小类
gd.setCustomerCode("" + r.get(11)); // 客户代码
gd.setCustomerName("" + r.get(12)); // 客户名称
gd.setSaleNum("" + r.get(13)); // 销售数量
gd.setStoreCode("" + r.get(14)); // 销售渠道
gd.setSalePrice("" + r.get(15)); // 销售价格
gd.setSaleCost("" + r.get(16)); // 销售成本
gd.setProfit("" + r.get(17)); // 利润
gd.setDataDate("" + r.get(18)); // 数据日期
return gd;
}
private boolean checkYcProd(String typeCode) {
if (StrUtil.isBlank(typeCode))
return false;
if (typeCode.length() < 6)
return false;
String subCode = typeCode.substring(0, 6);
return "[0811]".equals(subCode) || "[0813]".equals(subCode) || "[0815]".equals(subCode);
}
@Override
public void handle(int sheetIndex, long rowIndex, List<Object> r) {
if (rowIndex > 0) { //跳过标题行
String dataDate = "" + r.get(18); //数据日期
String prodCode = "" + r.get(3); //商品编码
String typeTwo = "" + r.get(9); //中类
String storeCode = "" + r.get(14); //门店编码
if (StrUtil.isNotBlank(prodCode)) { //商品编码不为空才插入,过滤掉统计行
if (odate == null)
odate = dataDate;
GdSalesGd gd = rowToEntity(r);
toInsertListGd.add(gd);
if (gdRescategoryProdService.containsCode(prodCode) && storeIndexService.containsCodeWithOneNoJmd(storeCode)) {
GdSales gw = new GdSales();
BeanUtil.copyProperties(gd, gw);
toInsertList.add(gw);
y++;
}
if (checkYcProd(typeTwo) && storeInfoService.containsCodeOfYc(storeCode)) {
GdSalesYc gyc = new GdSalesYc();
BeanUtil.copyProperties(gd, gyc);
toInsertListYc.add(gyc);
}
x++;
}
}
}
@Override
public void doAfterAllAnalysed() {
if (toInsertListGd != null && !toInsertListGd.isEmpty()) {
GdSalesGd gd = toInsertListGd.get(0);
gdSalesGdService.clearByDataDate(gd.getDataDate());
gdSalesGdService.saveBatch(toInsertListGd);
}
if (toInsertList != null && !toInsertList.isEmpty()) {
GdSales gd = toInsertList.get(0);
GdSalesService.this.clearByDataDate(gd.getDataDate());
GdSalesService.this.saveBatch(toInsertList);
}
if (toInsertListYc != null && !toInsertListYc.isEmpty()) {
GdSalesYc gd = toInsertListYc.get(0);
gdSalesYcService.clearByDataDate(gd.getDataDate());
gdSalesYcService.saveBatch(toInsertListYc);
}
gdlog.setAllNum(x);
gdlog.setValidNum(y);
gdlog.setErrRowNum(errnum);
gdlog.setOrderDate(odate);
RowHandler.super.doAfterAllAnalysed();
}
};
}
public void clearByDataDate(String dataDate) {
baseMapper.clearByDataDate(dataDate);
}
public ResultBean<GdSalesLog> buildExcel(String logId) {
return null;
}
}

68
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesYc.java

@ -0,0 +1,68 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.biz.gdsales;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yxt.common.core.domain.EntityWithId;
import lombok.Data;
/**
* Project: yxt_supervise <br/>
* File: GdSalesYc.java <br/>
* Class: com.yxt.supervise.portal.biz.gdsales.GdSalesYc <br/>
* Description: <描述类的功能>. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2023/1/7 16:09 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@TableName("gd_sales_yc")
public class GdSalesYc extends EntityWithId {
private String orgCode; // 企业组织机构代码证
private String orderType; // 订单类型
private String orderNo; // 销售订单号
private String prodCode; // 商品编码
private String prodBarCode; // 商品条码
private String prodName; // 商品名称
private String brandCode; // 品牌代码
private String brandName; // 品牌名称
private String categoryb; // 商品大类
private String categorym; // 商品中类
private String categorys; // 商品小类
private String customerCode; // 客户代码
private String customerName; // 客户名称
private String saleNum; // 销售数量
private String storeCode; // 销售渠道
private String salePrice; // 销售价格
private String saleCost; // 销售成本
private String profit; // 利润
private String dataDate; // 数据日期
}

50
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesYcMapper.java

@ -0,0 +1,50 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.biz.gdsales;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* Project: yxt_supervise <br/>
* File: GdSalesYcMapper.java <br/>
* Class: com.yxt.supervise.portal.biz.gdsales.GdSalesYcMapper <br/>
* Description: <描述类的功能>. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2023/1/7 16:12 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Mapper
public interface GdSalesYcMapper extends BaseMapper<GdSalesYc> {
@Delete("delete from gd_sales_yc where dataDate=#{dataDate} ")
void clearByDataDate(@Param("dataDate") String dataDate);
}

50
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesYcService.java

@ -0,0 +1,50 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.biz.gdsales;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* Project: yxt_supervise <br/>
* File: GdSalesYcService.java <br/>
* Class: com.yxt.supervise.portal.biz.gdsales.GdSalesYcService <br/>
* Description: <描述类的功能>. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2023/1/7 16:13 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Service
public class GdSalesYcService extends ServiceImpl<GdSalesYcMapper, GdSalesYc> {
public void clearByDataDate(String dataDate) {
baseMapper.clearByDataDate(dataDate);
}
}
Loading…
Cancel
Save