55 changed files with 98531 additions and 170 deletions
@ -0,0 +1,66 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8" /> |
|||
<title>ECharts</title> |
|||
<!-- 引入刚刚下载的 ECharts 文件 --> |
|||
<script src="js/echarts.js"></script> |
|||
</head> |
|||
<body> |
|||
<!-- 为 ECharts 准备一个定义了宽高的 DOM --> |
|||
<div id="main" style="width: 600px;height:600px;"></div> |
|||
<script type="text/javascript"> |
|||
var postData = |
|||
[ |
|||
{ |
|||
"value": 2313123, |
|||
"name": "订单总额" |
|||
}, |
|||
{ |
|||
"value": 4359354, |
|||
"name": "实际到货价值" |
|||
}, |
|||
{ |
|||
"value": 2313123, |
|||
"name": "在途货价值" |
|||
}, |
|||
{ |
|||
"value": 2313123, |
|||
"name": "超出价值" |
|||
} |
|||
]; |
|||
// 基于准备好的dom,初始化echarts实例 |
|||
var myChart = echarts.init(document.getElementById('main')); |
|||
// 指定图表的配置项和数据 |
|||
var option = { |
|||
legend: { |
|||
top: 'bottom' |
|||
}, |
|||
toolbox: { |
|||
show: true, |
|||
feature: { |
|||
mark: { show: true }, |
|||
dataView: { show: true, readOnly: false }, |
|||
restore: { show: true }, |
|||
saveAsImage: { show: true } |
|||
} |
|||
}, |
|||
series: [ |
|||
{ |
|||
name: 'Nightingale Chart', |
|||
type: 'pie', |
|||
radius: [50, 250], |
|||
center: ['50%', '50%'], |
|||
roseType: 'area', |
|||
itemStyle: { |
|||
borderRadius: 8 |
|||
}, |
|||
data: postData |
|||
} |
|||
] |
|||
}; |
|||
// 使用刚指定的配置项和数据显示图表。 |
|||
myChart.setOption(option); |
|||
</script> |
|||
</body> |
|||
</html> |
File diff suppressed because it is too large
@ -0,0 +1,75 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8" /> |
|||
<title>ECharts</title> |
|||
<!-- 引入刚刚下载的 ECharts 文件 --> |
|||
<script src="js/echarts.js"></script> |
|||
</head> |
|||
<body> |
|||
<!-- 为 ECharts 准备一个定义了宽高的 DOM --> |
|||
<div id="main" style="width: 600px;height:400px;"></div> |
|||
|
|||
<script type="text/javascript"> |
|||
var postDataSet = { |
|||
"dimensions": [ |
|||
"reportDate", |
|||
"销售商品收到的现金", |
|||
"收到其他与经营活动有关的现金" |
|||
], |
|||
"source": [ |
|||
{ |
|||
"reportDate": "2023-01-01", |
|||
"销售商品收到的现金": 123123.21, |
|||
"收到其他与经营活动有关的现金": 23554.43 |
|||
}, |
|||
{ |
|||
"reportDate": "2023-01-02", |
|||
"销售商品收到的现金": 235553.23, |
|||
"收到其他与经营活动有关的现金": 234323.11 |
|||
}, |
|||
{ |
|||
"reportDate": "2023-01-03", |
|||
"销售商品收到的现金": 347534.13, |
|||
"收到其他与经营活动有关的现金": 234234.11 |
|||
}, |
|||
{ |
|||
"reportDate": "2023-01-04", |
|||
"销售商品收到的现金": 346532.21, |
|||
"收到其他与经营活动有关的现金": 234342.11 |
|||
}, |
|||
{ |
|||
"reportDate": "2023-01-05", |
|||
"销售商品收到的现金": 345354.23, |
|||
"收到其他与经营活动有关的现金": 213123.11 |
|||
}, |
|||
{ |
|||
"reportDate": "2023-01-06", |
|||
"销售商品收到的现金": 543266.23, |
|||
"收到其他与经营活动有关的现金": 34234.11 |
|||
}, |
|||
{ |
|||
"reportDate": "2023-01-07", |
|||
"销售商品收到的现金": 564365.23, |
|||
"收到其他与经营活动有关的现金": 234342.11 |
|||
} |
|||
] |
|||
}; |
|||
// 基于准备好的dom,初始化echarts实例 |
|||
var myChart = echarts.init(document.getElementById('main')); |
|||
// 指定图表的配置项和数据 |
|||
var option = { |
|||
legend: {}, |
|||
tooltip: {}, |
|||
dataset: postDataSet, |
|||
xAxis: { type: 'category' }, |
|||
yAxis: {}, |
|||
// Declare several bar series, each will be mapped |
|||
// to a column of dataset.source by default. |
|||
series: [{ type: 'bar' }, { type: 'bar' }] |
|||
}; |
|||
// 使用刚指定的配置项和数据显示图表。 |
|||
myChart.setOption(option); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,163 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8" /> |
|||
<title>ECharts</title> |
|||
<!-- 引入刚刚下载的 ECharts 文件 --> |
|||
<script src="js/echarts.js"></script> |
|||
</head> |
|||
<body> |
|||
<!-- 为 ECharts 准备一个定义了宽高的 DOM --> |
|||
<div id="main" style="width: 800px;height:300px;"></div> |
|||
<script type="text/javascript"> |
|||
var postData = |
|||
{ |
|||
"legend": { |
|||
"data": [ |
|||
"仓库货值", |
|||
"在途货值", |
|||
"门店货值", |
|||
"帐户余额", |
|||
"应收帐款", |
|||
"借款金额" |
|||
] |
|||
}, |
|||
"xAxis": { |
|||
"type": "category", |
|||
"boundaryGap": false, |
|||
"data": [ |
|||
"23-01-01", |
|||
"23-01-02", |
|||
"23-01-03", |
|||
"23-01-04", |
|||
"23-01-05", |
|||
"23-01-06", |
|||
"23-01-07" |
|||
] |
|||
}, |
|||
"series": [ |
|||
{ |
|||
"name": "仓库货值", |
|||
"type": "line", |
|||
"stack": "Total", |
|||
"data": [ |
|||
120, |
|||
132, |
|||
101, |
|||
134, |
|||
90, |
|||
230, |
|||
210 |
|||
] |
|||
}, |
|||
{ |
|||
"name": "在途货值", |
|||
"type": "line", |
|||
"stack": "Total", |
|||
"data": [ |
|||
120, |
|||
132, |
|||
101, |
|||
134, |
|||
90, |
|||
230, |
|||
210 |
|||
] |
|||
}, |
|||
{ |
|||
"name": "门店货值", |
|||
"type": "line", |
|||
"stack": "Total", |
|||
"data": [ |
|||
120, |
|||
132, |
|||
101, |
|||
134, |
|||
90, |
|||
230, |
|||
210 |
|||
] |
|||
}, |
|||
{ |
|||
"name": "帐户余额", |
|||
"type": "line", |
|||
"stack": "Total", |
|||
"data": [ |
|||
120, |
|||
132, |
|||
101, |
|||
134, |
|||
90, |
|||
230, |
|||
210 |
|||
] |
|||
}, |
|||
{ |
|||
"name": "应收帐款", |
|||
"type": "line", |
|||
"stack": "Total", |
|||
"data": [ |
|||
120, |
|||
132, |
|||
101, |
|||
134, |
|||
90, |
|||
230, |
|||
210 |
|||
] |
|||
}, |
|||
{ |
|||
"name": "借款金额", |
|||
"type": "line", |
|||
"stack": "Total", |
|||
"data": [ |
|||
120, |
|||
132, |
|||
101, |
|||
134, |
|||
90, |
|||
230, |
|||
210 |
|||
] |
|||
} |
|||
] |
|||
} |
|||
// 基于准备好的dom,初始化echarts实例 |
|||
var myChart = echarts.init(document.getElementById('main')); |
|||
// 指定图表的配置项和数据 |
|||
var option = { |
|||
title: { |
|||
text: '' |
|||
}, |
|||
tooltip: { |
|||
trigger: 'axis' |
|||
}, |
|||
legend: { |
|||
data: postData.legend.data |
|||
}, |
|||
grid: { |
|||
left: '3%', |
|||
right: '4%', |
|||
bottom: '3%', |
|||
containLabel: true |
|||
}, |
|||
toolbox: { |
|||
feature: { |
|||
saveAsImage: {} |
|||
} |
|||
}, |
|||
xAxis: { |
|||
type: 'category', |
|||
boundaryGap: false, |
|||
data: postData.xAxis.data |
|||
}, |
|||
yAxis: { |
|||
type: 'value' |
|||
}, |
|||
series: postData.series |
|||
}; |
|||
// 使用刚指定的配置项和数据显示图表。 |
|||
myChart.setOption(option); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -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' |
|||
} |
|||
}) |
|||
} |
@ -0,0 +1,51 @@ |
|||
import request from '@/utils/request' |
|||
// 销售报表
|
|||
|
|||
// 品牌管理模糊查询
|
|||
export default { |
|||
|
|||
initData(data) { |
|||
return request({ |
|||
url: '/reportCenter/getSalesReport', |
|||
method: 'get', |
|||
params: data |
|||
}) |
|||
}, |
|||
// 保存新增记录
|
|||
saveOrUpdate: function(params) { |
|||
|
|||
return request({ |
|||
url: '/v1/purchaserequisition/save', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
// 通过sid删除一条或多条记录
|
|||
delBySids: function(data) { |
|||
return request({ |
|||
url: '/v1/purchaserequisition/delBySids', |
|||
method: 'delete', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
// 通过sid查询一条记录
|
|||
fetchBySid: function(sid) { |
|||
return request({ |
|||
url: '/v1/purchaserequisition/fetchDetailsBySid/' + sid |
|||
}) |
|||
}, |
|||
// 提交
|
|||
doSubmit: function(params) { |
|||
return request({ |
|||
url: '/supervise/v1/kfpurchaserequisition/doSubmit', |
|||
method: 'post', |
|||
data: params |
|||
}) |
|||
} |
|||
} |
@ -0,0 +1,151 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div style="margin-left: 16px;"> |
|||
<h3>{{ name }}</h3> |
|||
</div> |
|||
<div class = "current-data"> |
|||
<div class = "left"> |
|||
<div class="top"> |
|||
<span>当前数据</span> |
|||
<span>{{currentDate}}</span> |
|||
</div> |
|||
</div> |
|||
<div ref="charta" class ="middle"> |
|||
|
|||
</div> |
|||
<div class ="right" /></div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import * as echarts from 'echarts' |
|||
export default { |
|||
name: '在途商品管理表', |
|||
// components: { }, |
|||
data() { |
|||
return { |
|||
currentDate:"2023-01-01", |
|||
name: '在途商品管理表', |
|||
myCharta: null |
|||
} |
|||
}, |
|||
created() { |
|||
// 初始化变量 |
|||
// this.init() |
|||
// 加载列表 |
|||
// this.getList() |
|||
}, |
|||
beforeDestroy() { |
|||
if (this.myCharta) { |
|||
this.myCharta.dispose() |
|||
this.myCharta = null |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.$nextTick(() => { |
|||
this.initCharta() |
|||
}) |
|||
}, |
|||
methods: { |
|||
initCharta() { |
|||
// 基于准备好的dom,初始化echarts实例 |
|||
this.myCharta = echarts.init(this.$refs.charta) |
|||
this.myCharta.setOption( |
|||
{ |
|||
legend: { |
|||
top: 'bottom' |
|||
}, |
|||
toolbox: { |
|||
show: true, |
|||
feature: { |
|||
mark: { show: true }, |
|||
dataView: { show: true, readOnly: false }, |
|||
restore: { show: true }, |
|||
saveAsImage: { show: true } |
|||
} |
|||
}, |
|||
series: [ |
|||
{ |
|||
name: 'Nightingale Chart', |
|||
type: 'pie', |
|||
radius: [50, 250], |
|||
center: ['50%', '50%'], |
|||
roseType: 'area', |
|||
itemStyle: { |
|||
borderRadius: 8 |
|||
}, |
|||
data:[ |
|||
{ |
|||
"value": 2313123, |
|||
"name": "订单总额" |
|||
}, |
|||
{ |
|||
"value": 4359354, |
|||
"name": "实际到货价值" |
|||
}, |
|||
{ |
|||
"value": 2313123, |
|||
"name": "在途货价值" |
|||
}, |
|||
{ |
|||
"value": 2313123, |
|||
"name": "超出价值" |
|||
} |
|||
] |
|||
} |
|||
] |
|||
} |
|||
) |
|||
}, |
|||
getList() {}, |
|||
// 返回 |
|||
handleReturn() { |
|||
this.$router.go(-1) |
|||
} |
|||
} |
|||
} |
|||
|
|||
</script> |
|||
|
|||
<style> |
|||
.current-data{ |
|||
width:100%; |
|||
height:500px; |
|||
display: flex; |
|||
} |
|||
.current-data .top{ |
|||
height:30px; |
|||
line-height:30px; |
|||
width:100%; |
|||
} |
|||
.current-data .left{ |
|||
background-color: aqua; |
|||
width:250px; |
|||
height:600px; |
|||
margin-left: 16px; |
|||
} |
|||
|
|||
.current-data .middle{ |
|||
width:600px; |
|||
height:600px; |
|||
float: left; |
|||
margin-left: 10px; |
|||
} |
|||
|
|||
.current-data .right{ |
|||
background-color: red; |
|||
width:700px; |
|||
height:600px; |
|||
float: left; |
|||
margin-left: 10px; |
|||
|
|||
} |
|||
.current-data .right .top{ |
|||
text-align: center; |
|||
} |
|||
.current-data .right .charts{ |
|||
height:480px; |
|||
width:100%; |
|||
} |
|||
</style> |
@ -0,0 +1,163 @@ |
|||
<template> |
|||
|
|||
<div class="app-container"> |
|||
<div> |
|||
<h3>{{ name }}</h3> |
|||
</div> |
|||
<div class = "current-data"> |
|||
<div class = "left"> |
|||
<div class="top"> |
|||
<span>当前数据</span> |
|||
<span>{{currentDate}}</span> |
|||
</div> |
|||
</div> |
|||
<div ref="charta" class ="right" /></div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import * as echarts from 'echarts' |
|||
export default { |
|||
name: '销售报表', |
|||
// components: { }, |
|||
data() { |
|||
return { |
|||
currentDate:"2023-01-01", |
|||
name: '销售报表', |
|||
myCharta: null |
|||
} |
|||
}, |
|||
created() { |
|||
// 初始化变量 |
|||
// this.init() |
|||
// 加载列表 |
|||
// this.getList() |
|||
}, |
|||
beforeDestroy() { |
|||
if (this.myCharta) { |
|||
this.myCharta.dispose() |
|||
this.myCharta = null |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.$nextTick(() => { |
|||
this.initCharta() |
|||
}) |
|||
}, |
|||
methods: { |
|||
initCharta() { |
|||
// 基于准备好的dom,初始化echarts实例 |
|||
this.myCharta = echarts.init(this.$refs.charta) |
|||
|
|||
this.myCharta.setOption({ |
|||
legend: {}, |
|||
tooltip: {}, |
|||
dataset: { |
|||
"dimensions": [ |
|||
"报表日期", |
|||
"销售商品收到的现金", |
|||
"收到其他与经营活动有关的现金" |
|||
], |
|||
"source": [ |
|||
{ |
|||
"报表日期": "2023-01-01", |
|||
"销售商品收到的现金": 123123.21, |
|||
"收到其他与经营活动有关的现金": 23554.43 |
|||
}, |
|||
{ |
|||
"报表日期": "2023-01-02", |
|||
"销售商品收到的现金": 235553.23, |
|||
"收到其他与经营活动有关的现金": 234423.11 |
|||
}, |
|||
{ |
|||
"报表日期": "2023-01-03", |
|||
"销售商品收到的现金": 347534.13, |
|||
"收到其他与经营活动有关的现金": 234234.11 |
|||
}, |
|||
{ |
|||
"报表日期": "2023-01-04", |
|||
"销售商品收到的现金": 346532.21, |
|||
"收到其他与经营活动有关的现金": 234342.11 |
|||
}, |
|||
{ |
|||
"报表日期": "2023-01-05", |
|||
"销售商品收到的现金": 345354.23, |
|||
"收到其他与经营活动有关的现金": 213123.11 |
|||
}, |
|||
{ |
|||
"报表日期": "2023-01-06", |
|||
"销售商品收到的现金": 543266.23, |
|||
"收到其他与经营活动有关的现金": 34234.11 |
|||
}, |
|||
{ |
|||
"报表日期": "2023-01-07", |
|||
"销售商品收到的现金": 564365.23, |
|||
"收到其他与经营活动有关的现金": 234342.11 |
|||
} |
|||
] |
|||
}, |
|||
xAxis: { type: 'category' }, |
|||
yAxis: {}, |
|||
// Declare several bar series, each will be mapped |
|||
// to a column of dataset.source by default. |
|||
series: [{ type: 'bar' }, { type: 'bar' }] |
|||
}) |
|||
|
|||
}, |
|||
getList() {}, |
|||
// 返回 |
|||
handleReturn() { |
|||
this.$router.go(-1) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.current-data{ |
|||
width:100%; |
|||
height:500px; |
|||
display: flex; |
|||
} |
|||
.current-data .top{ |
|||
height:30px; |
|||
line-height:30px; |
|||
width:100%; |
|||
} |
|||
.current-data .left{ |
|||
background-color: aqua; |
|||
width:450px; |
|||
height:500px; |
|||
margin-left: 16px; |
|||
|
|||
} |
|||
|
|||
.current-data .right{ |
|||
width:1200px; |
|||
height:500px; |
|||
float: left; |
|||
margin-left: 10px; |
|||
|
|||
} |
|||
.current-data .right .top{ |
|||
text-align: center; |
|||
} |
|||
.current-data .right .charts{ |
|||
height:480px; |
|||
width:100%; |
|||
} |
|||
.wenjiantit { |
|||
font-size: 16px; |
|||
font-weight: bold; |
|||
margin: 25px 0 10px 0; |
|||
} |
|||
.forminfo { |
|||
margin: 0; |
|||
padding: 0; |
|||
} |
|||
.listcon { |
|||
height: calc(100vh - 250px); |
|||
overflow-y: auto; |
|||
overflow-x: hidden; |
|||
} |
|||
</style> |
@ -0,0 +1,219 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div style="margin-left:16px;"> |
|||
<h3>{{ name }}</h3> |
|||
</div> |
|||
<div class = "current-data"> |
|||
<div class = "upper"> |
|||
</div> |
|||
|
|||
<div ref="charta" class ="lower" /></div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import * as echarts from 'echarts' |
|||
export default { |
|||
name: '阀值分析', |
|||
// components: { }, |
|||
data() { |
|||
return { |
|||
currentDate:"2023-01-01", |
|||
name: '阀值分析', |
|||
myCharta: null, |
|||
} |
|||
}, |
|||
created() { |
|||
// 初始化变量 |
|||
// this.init() |
|||
// 加载列表 |
|||
// this.getList() |
|||
}, |
|||
beforeDestroy() { |
|||
if (this.myCharta) { |
|||
this.myCharta.dispose() |
|||
this.myCharta = null |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.$nextTick(() => { |
|||
// this.initChartaThreshold() |
|||
this.initCharta() |
|||
}) |
|||
}, |
|||
methods: { |
|||
initCharta() { |
|||
// 基于准备好的dom,初始化echarts实例 |
|||
// this.myChartaThreshold = echarts.init(this.$refs.myChartaThreshold) |
|||
this.myCharta = echarts.init(this.$refs.charta) |
|||
this.myCharta.setOption( |
|||
{ |
|||
tooltip: { |
|||
trigger: 'axis', |
|||
axisPointer: { |
|||
type: 'cross', |
|||
crossStyle: { |
|||
color: '#999' |
|||
} |
|||
} |
|||
}, |
|||
toolbox: { |
|||
feature: { |
|||
dataView: { show: false, readOnly: false }, |
|||
magicType: { show: false, type: ['line', 'bar'] }, |
|||
restore: { show: false }, |
|||
saveAsImage: { show: false } |
|||
} |
|||
}, |
|||
legend: { |
|||
data: ['仓库货值', '在途货值', ' 门店货值', '帐户余额', '应收帐款', '借款金额', '阀值'] |
|||
}, |
|||
xAxis: [ |
|||
{ |
|||
type: 'category', |
|||
data: ['2023-01-01', '2023-01-02', '2023-01-03', '2023-01-04', '2023-01-05', '2023-01-06', '2023-01-07'], |
|||
axisPointer: { |
|||
type: 'shadow' |
|||
} |
|||
} |
|||
], |
|||
yAxis: [ |
|||
{ |
|||
type: 'value', |
|||
name: '人民币', |
|||
min: 0, |
|||
max: 250, |
|||
interval: 50, |
|||
axisLabel: { |
|||
formatter: '{value} 元' |
|||
} |
|||
}, |
|||
{ |
|||
type: 'value', |
|||
name: '百分比', |
|||
min: 0, |
|||
max: 25, |
|||
interval: 5, |
|||
axisLabel: { |
|||
formatter: '{value} ' |
|||
} |
|||
} |
|||
], |
|||
series: [ |
|||
{ |
|||
name: '仓库货值', |
|||
type: 'bar', |
|||
tooltip: { |
|||
valueFormatter: function (value) { |
|||
return value + ' 元'; |
|||
} |
|||
}, |
|||
data: [ |
|||
2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3 |
|||
] |
|||
}, |
|||
{ |
|||
name: '在途货值', |
|||
type: 'bar', |
|||
tooltip: { |
|||
valueFormatter: function (value) { |
|||
return value + ' 元'; |
|||
} |
|||
}, |
|||
data: [ |
|||
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3 |
|||
] |
|||
}, |
|||
{ |
|||
name: ' 门店货值', |
|||
type: 'bar', |
|||
tooltip: { |
|||
valueFormatter: function (value) { |
|||
return value + ' 元'; |
|||
} |
|||
}, |
|||
data: [ |
|||
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3 |
|||
] |
|||
}, |
|||
{ |
|||
name: '帐户余额', |
|||
type: 'bar', |
|||
tooltip: { |
|||
valueFormatter: function (value) { |
|||
return value + ' 元'; |
|||
} |
|||
}, |
|||
data: [ |
|||
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3 |
|||
] |
|||
}, |
|||
{ |
|||
name: '应收帐款', |
|||
type: 'bar', |
|||
tooltip: { |
|||
valueFormatter: function (value) { |
|||
return value + ' 元'; |
|||
} |
|||
}, |
|||
data: [ |
|||
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3 |
|||
] |
|||
}, |
|||
{ |
|||
name: '借款金额', |
|||
type: 'bar', |
|||
tooltip: { |
|||
valueFormatter: function (value) { |
|||
return value + '元'; |
|||
} |
|||
}, |
|||
data: [ |
|||
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3 |
|||
] |
|||
}, |
|||
{ |
|||
name: '阀值', |
|||
type: 'line', |
|||
yAxisIndex: 1, |
|||
tooltip: { |
|||
valueFormatter: function (value) { |
|||
return value + '%'; |
|||
} |
|||
}, |
|||
data: [2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2] |
|||
}, |
|||
|
|||
] |
|||
} |
|||
) |
|||
}, |
|||
getList() {}, |
|||
// 返回 |
|||
handleReturn() { |
|||
this.$router.go(-1) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
.current-data{ |
|||
width:100%; |
|||
height:500px; |
|||
} |
|||
|
|||
.current-data .upper{ |
|||
width:100%; |
|||
height:100px; |
|||
} |
|||
|
|||
.current-data .lower{ |
|||
width:100%; |
|||
height:600px; |
|||
float: left; |
|||
margin-left: 10px; |
|||
|
|||
} |
|||
</style> |
@ -0,0 +1,17 @@ |
|||
<?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.gdinstorage.GdInstorageCountMapper"> |
|||
<select id="spdhmxb" resultType="java.util.Map"> |
|||
SELECT sbi.name ,prp.`proCode`,prp.`proName`,prp.`number`, SUM(CONVERT(packageTotalPrice,DECIMAL(12,2))) as ptotalPrice, |
|||
(SELECT IFNULL(SUM(prodNum),0) FROM gd_instorage_count gic WHERE gic.supplierCodeUnified=pr.supplierOnlyCode AND prp.`proCode`=gic.prodcode ) prodNum, |
|||
(SELECT CONVERT(IFNULL(SUM(prodValue),0),DECIMAL(12,2)) FROM gd_instorage_count gic WHERE gic.supplierCodeUnified=pr.supplierOnlyCode AND prp.`proCode`=gic.prodcode ) prodValue, |
|||
IF(prp.`number`-(SELECT IFNULL(SUM(prodNum),0) FROM gd_instorage_count gic WHERE gic.supplierCodeUnified=pr.supplierOnlyCode AND prp.`proCode`=gic.prodcode ) > 0 , prp.`number`-(SELECT IFNULL(SUM(prodNum),0) FROM gd_instorage_count gic WHERE gic.supplierCodeUnified=pr.supplierOnlyCode AND prp.`proCode`=gic.prodcode ) , 0) ztnumber, |
|||
CONVERT(IF(SUM(packageTotalPrice)-(SELECT IFNULL(SUM(prodValue),0) FROM gd_instorage_count gic WHERE gic.supplierCodeUnified=pr.supplierOnlyCode AND prp.`proCode`=gic.prodcode ) > 0 ,SUM(packageTotalPrice)-(SELECT IFNULL(SUM(prodValue),0) FROM gd_instorage_count gic WHERE gic.supplierCodeUnified=pr.supplierOnlyCode AND prp.`proCode`=gic.prodcode ), 0),DECIMAL(12,2)) ztprodValue1, |
|||
CONVERT(IF((SELECT IFNULL(SUM(prodValue),0) FROM gd_instorage_count gic WHERE gic.supplierCodeUnified=pr.supplierOnlyCode AND prp.`proCode`=gic.prodcode )-SUM(packageTotalPrice) > 0 ,(SELECT SUM(prodValue) FROM gd_instorage_count gic WHERE gic.supplierCodeUnified=pr.supplierOnlyCode AND prp.`proCode`=gic.prodcode )-SUM(packageTotalPrice), 0),DECIMAL(12,2)) ztprodValue2 |
|||
FROM `supplier_bank_info` sbi |
|||
LEFT JOIN `purchase_requisition` pr ON pr.supplierOnlyCode=sbi.codeUnified |
|||
LEFT JOIN `purchase_requisition_pro` prp ON pr.sid=prp.mainsid |
|||
WHERE pr.purchaseState=1 AND pr.bankState=1 AND sbi.`purchaseRequisition`=1 AND sbi.`bankState`=1 |
|||
GROUP BY pr.supplierOnlyCode,prp.`proCode` ORDER BY sbi.name,prp.`proCode`; |
|||
</select> |
|||
</mapper> |
@ -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; // 数据日期
|
|||
} |
@ -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; // 数据日期
|
|||
} |
@ -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); |
|||
} |
@ -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); |
|||
} |
|||
} |
@ -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; // 单据日期',
|
|||
} |
@ -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; //商品名称
|
|||
} |
@ -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> { |
|||
} |
@ -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> { |
|||
} |
@ -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> { |
|||
} |
@ -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); |
|||
} |
|||
} |
@ -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); |
|||
} |
@ -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; |
|||
} |
@ -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); |
|||
} |
|||
} |
@ -0,0 +1,263 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.supervise.portal.biz.gdsales; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import cn.hutool.core.date.DateUtil; |
|||
import cn.hutool.core.io.FileUtil; |
|||
import cn.hutool.core.util.NumberUtil; |
|||
import cn.hutool.core.util.StrUtil; |
|||
import cn.hutool.poi.excel.ExcelUtil; |
|||
import cn.hutool.poi.excel.ExcelWriter; |
|||
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 com.yxt.supervise.portal.extexcel.ExcelTool; |
|||
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.io.File; |
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 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; |
|||
@Value("${image.xlsxtmpl:static/upload/}") |
|||
private String xlsxtmplPath; |
|||
@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) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
|
|||
GdSalesLog gdLog = gdSalesLogService.fetchById(logId); |
|||
if (gdLog == null) |
|||
return rb.setMsg("上传记录未找到"); |
|||
String orderDate = gdLog.getOrderDate(); |
|||
|
|||
Date curDate = new Date(); |
|||
String timestr = DateUtil.format(curDate, "yyyyMMddHHmmssSSS"); |
|||
String dfmt1 = DateUtil.format(curDate, "yyyyMMdd"); |
|||
String dfmt2 = DateUtil.format(curDate, "yyyy-MM-dd HH:mm"); |
|||
String dfmt = DateUtil.format(curDate, "yyyy-MM-dd"); |
|||
|
|||
String xlsxpath = xlsxtmplPath + "销售汇总日报表.xlsx"; |
|||
File srcFile = FileUtil.file(xlsxpath); |
|||
String tfile = "kchzb/销售汇总日报表" + dfmt + ".xlsx"; |
|||
String url = urlPrefix + tfile; |
|||
String toFileName = uploadPath + tfile; |
|||
File file = FileUtil.file(toFileName); |
|||
FileUtil.copy(srcFile, file, true); |
|||
ExcelWriter writer = ExcelUtil.getWriter(file); |
|||
|
|||
// 销售汇总日报表
|
|||
writer.setSheet(0); |
|||
writer.writeCellValue(0, 1, "编号:xshzrbb" + dfmt1); |
|||
writer.writeCellValue(2, 1, "上报时间:" + dfmt2); |
|||
|
|||
// 门店销售明细表
|
|||
// writer.setSheet(1);
|
|||
|
|||
// 门店商品销售明细表
|
|||
// writer.setSheet(2);
|
|||
|
|||
// 烟草门店销售明细表
|
|||
// writer.setSheet(3);
|
|||
|
|||
// 烟草门店商品销售明细表
|
|||
// writer.setSheet(4);
|
|||
|
|||
writer.flush(); |
|||
writer.close(); |
|||
|
|||
gdLog.setFileUrl(url); |
|||
gdLog.setOutFilePath(toFileName); |
|||
gdSalesLogService.updateById(gdLog); |
|||
|
|||
return rb.success().setData(gdLog); |
|||
} |
|||
} |
@ -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; // 数据日期
|
|||
} |
@ -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); |
|||
} |
@ -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); |
|||
} |
|||
} |
@ -1,11 +1,28 @@ |
|||
package com.yxt.supervise.portal.biz.purchaserequisitionpro; |
|||
|
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.supervise.portal.biz.gdinventory.GdRescategoryProdService; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RequestMethod; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.annotation.Resource; |
|||
import java.text.ParseException; |
|||
|
|||
@Api(tags = "采购订单商品信息") |
|||
@RestController("com.supervise.biz.purchaserequisitionpro.PurchaseRequisitionProRest") |
|||
@RequestMapping("v1/purchaserequisitionpro") |
|||
public class PurchaseRequisitionProRest { |
|||
@Resource |
|||
private PurchaseRequisitionProService purchaseRequisitionProService; |
|||
@ApiOperation("更新商品代码的索引表") |
|||
@RequestMapping(value = "/makeProdCodeIndex", method = RequestMethod.POST) |
|||
public ResultBean makeProdCodeIndex(){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
int i= purchaseRequisitionProService.makeProdCodeIndex(); |
|||
GdRescategoryProdService.resetCache(); |
|||
return rb.success().setData(i); |
|||
} |
|||
} |
|||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue