no commit message

This commit is contained in:
ICEC
2020-07-14 16:44:34 +08:00
parent be7e538466
commit 8d4fbe3029
4 changed files with 67 additions and 67 deletions

View File

@ -93,9 +93,9 @@ export function getBestHunsha() {
} }
export function getBestTijiaoxian() { export function getBestJiancai() {
return request({ return request({
url: '/fx_technologist/getBestTijiaoxian', url: '/fx_technologist/getBestJiancai',
method: 'get' method: 'get'
}) })
} }

View File

@ -7,11 +7,11 @@
<div class="ibox "> <div class="ibox ">
<div class="ibox-title"> <div class="ibox-title">
<h3>婚纱框 </h3> <h3>婚纱框畅销 </h3>
</div> </div>
<div class="ibox-content"> <div class="ibox-content">
<el-table <el-table
:data="tableDataODM" :data="tableData婚纱框"
stripe stripe
border border
style="width: 100%"> style="width: 100%">
@ -41,11 +41,11 @@
<div class="ibox "> <div class="ibox ">
<div class="ibox-title"> <div class="ibox-title">
<h3>踢脚线爆 </h3> <h3>建材畅销 </h3>
</div> </div>
<div class="ibox-content"> <div class="ibox-content">
<el-table <el-table
:data="tableDataOEM" :data="tableData建材"
stripe stripe
border border
style="width: 100%"> style="width: 100%">
@ -75,11 +75,11 @@
<div class="ibox "> <div class="ibox ">
<div class="ibox-title"> <div class="ibox-title">
<h3>画框 </h3> <h3>画框畅销 </h3>
</div> </div>
<div class="ibox-content"> <div class="ibox-content">
<el-table <el-table
:data="tableDataOEM" :data="tableData画框"
stripe stripe
border border
style="width: 100%"> style="width: 100%">
@ -112,8 +112,10 @@
require('echarts/theme/macarons') // echarts theme require('echarts/theme/macarons') // echarts theme
import resize from '../dashboard/mixins/resize' import resize from '../dashboard/mixins/resize'
import {getBestOEM} from '@/api/dashboard/fx_technologist' import {getBestJiancai} from '@/api/dashboard/fx_technologist'
import {getBestODM} from '@/api/dashboard/fx_technologist' import {getBestHunsha} from '@/api/dashboard/fx_technologist'
import {getBestHuakuang} from '@/api/dashboard/fx_technologist'
const lineChartData = { const lineChartData = {
@ -128,7 +130,7 @@
return { return {
tableData婚纱框: [], tableData婚纱框: [],
tableData画框: [], tableData画框: [],
tableData踢脚线: [] tableData建材: []
} }
}, },
@ -159,13 +161,13 @@
} }
}) })
getBestTijiaoxian().then(response => { getBestJiancai().then(response => {
for (var i = 0; i < response.data.length; i++) { for (var i = 0; i < response.data.length; i++) {
this.tableData踢脚线.push({ this.tableData建材.push({
MouldingStyleCode: response.data[i].MouldingStyleCode, MouldingStyleCode: response.data[i].MouldingStyleCode,
CNY: ((response.data[i].CNY)*1).toFixed(2), CNY: ((response.data[i].CNY)*1).toFixed(2),
Area: response.data[i].Area, Area: response.data[i].Area,

View File

@ -450,17 +450,28 @@ public class DB_Ajax_DashBoard_Technologist_48102 {
public static List<HashMap<String,String>> getBestHuakuang() { //除了 画框 婚纱框 相框 镜框
public static List<HashMap<String,String>> getBestByProductionLine(String ProductionLine) {
List<HashMap<String,String>> hashMapList = new ArrayList<>(); List<HashMap<String,String>> hashMapList = new ArrayList<>();
try { try {
Connection conn = getSQLConnection(); Connection conn = getSQLConnection();
String sql = "SELECT TOP\n" + String sql = "SELECT DISTINCT TOP\n" +
"\t20 MouldingStyleCode,\n" + "\t20 chen_12个月_A版本BOM销售额.MouldingStyleCode,\n" +
"\t[折算人民币价税合计] AS CNY \n" + "\t[折算人民币价税合计] AS CNY,\n" +
"\tMouldingSampleMakingMasterSchedule.ProductionLine ,\n" +
"\t(SELECT TOP\n" +
"\t1 SHCountry \n" +
"FROM\n" + "FROM\n" +
"\t[chen_12个月_A版本BOM销售额] \n" + "\tMouldingDataStatistics \n" +
"WHERE MouldingCode = reverse(substring(reverse(chen_12个月_A版本BOM销售额.MouldingStyleCode),charindex('-',reverse(chen_12个月_A版本BOM销售额.MouldingStyleCode)) +1,500)) \n" +
"GROUP BY SHCountry\n" +
"ORDER BY sum(SHMouldingSaleLength) ) as Area\n" +
"FROM\n" +
"\t[chen_12个月_A版本BOM销售额]\n" +
"\tLEFT JOIN MouldingSampleMakingMasterSchedule ON MouldingSampleMakingMasterSchedule.MouldingStyleCode = chen_12个月_A版本BOM销售额.MouldingStyleCode \n" +
"WHERE\n" + "WHERE\n" +
"\ttagname = 'OEM' \n" + "\tMouldingSampleMakingMasterSchedule.ProductionLine = '"+ProductionLine+"' \n" +
"ORDER BY\n" + "ORDER BY\n" +
"\t折算人民币价税合计 DESC"; "\t折算人民币价税合计 DESC";
Statement stmt = conn.createStatement();// Statement stmt = conn.createStatement();//
@ -471,6 +482,7 @@ public class DB_Ajax_DashBoard_Technologist_48102 {
HashMap<String,String> map = new HashMap<>(); HashMap<String,String> map = new HashMap<>();
map.put("MouldingStyleCode",rs.getString("MouldingStyleCode")); map.put("MouldingStyleCode",rs.getString("MouldingStyleCode"));
map.put("CNY",rs.getString("CNY")); map.put("CNY",rs.getString("CNY"));
map.put("Area",rs.getString("Area"));
hashMapList.add(map); hashMapList.add(map);
} }
@ -485,17 +497,38 @@ public class DB_Ajax_DashBoard_Technologist_48102 {
} }
public static List<HashMap<String,String>> getBestTijiaoxian() {
//除了 画框 婚纱框 相框 镜框
public static List<HashMap<String,String>> getBestByProductionLine_Jiancai( ) {
List<HashMap<String,String>> hashMapList = new ArrayList<>(); List<HashMap<String,String>> hashMapList = new ArrayList<>();
try { try {
Connection conn = getSQLConnection(); Connection conn = getSQLConnection();
String sql = "SELECT TOP\n" + String sql = "SELECT DISTINCT TOP\n" +
"\t20 MouldingStyleCode,\n" + "\t20 chen_12个月_A版本BOM销售额.MouldingStyleCode,\n" +
"\t[折算人民币价税合计] AS CNY \n" + "\t[折算人民币价税合计] AS CNY,\n" +
"\tMouldingSampleMakingMasterSchedule.ProductionLine ,\n" +
"\t(SELECT TOP\n" +
"\t1 SHCountry \n" +
"FROM\n" + "FROM\n" +
"\t[chen_12个月_A版本BOM销售额] \n" + "\tMouldingDataStatistics \n" +
"WHERE MouldingCode = reverse(substring(reverse(chen_12个月_A版本BOM销售额.MouldingStyleCode),charindex('-',reverse(chen_12个月_A版本BOM销售额.MouldingStyleCode)) +1,500)) \n" +
"GROUP BY SHCountry\n" +
"ORDER BY sum(SHMouldingSaleLength) ) as Area,\n" +
"\t(SELECT TOP\n" +
"\t1 SDCountry \n" +
"FROM\n" +
"\tMouldingDataStatistics \n" +
"WHERE MouldingCode = reverse(substring(reverse(chen_12个月_A版本BOM销售额.MouldingStyleCode),charindex('-',reverse(chen_12个月_A版本BOM销售额.MouldingStyleCode)) +1,500)) \n" +
"GROUP BY SDCountry\n" +
"ORDER BY sum(SDMouldingSaleLength) ) as Area2\n" +
"FROM\n" +
"\t[chen_12个月_A版本BOM销售额]\n" +
"\tLEFT JOIN MouldingSampleMakingMasterSchedule ON MouldingSampleMakingMasterSchedule.MouldingStyleCode = chen_12个月_A版本BOM销售额.MouldingStyleCode \n" +
"WHERE\n" + "WHERE\n" +
"\ttagname = 'OEM' \n" + "\tSUBSTRING(chen_12个月_A版本BOM销售额.MouldingStyleCode,1,1) = 'J'\n" +
"\n" +
"\n" +
"ORDER BY\n" + "ORDER BY\n" +
"\t折算人民币价税合计 DESC"; "\t折算人民币价税合计 DESC";
Statement stmt = conn.createStatement();// Statement stmt = conn.createStatement();//
@ -506,6 +539,7 @@ public class DB_Ajax_DashBoard_Technologist_48102 {
HashMap<String,String> map = new HashMap<>(); HashMap<String,String> map = new HashMap<>();
map.put("MouldingStyleCode",rs.getString("MouldingStyleCode")); map.put("MouldingStyleCode",rs.getString("MouldingStyleCode"));
map.put("CNY",rs.getString("CNY")); map.put("CNY",rs.getString("CNY"));
map.put("Area",rs.getString("Area"));
hashMapList.add(map); hashMapList.add(map);
} }
@ -520,42 +554,6 @@ public class DB_Ajax_DashBoard_Technologist_48102 {
} }
public static List<HashMap<String,String>> getBestHunsha() {
List<HashMap<String,String>> hashMapList = new ArrayList<>();
try {
Connection conn = getSQLConnection();
String sql = "SELECT TOP\n" +
"\t20 MouldingStyleCode,\n" +
"\t[折算人民币价税合计] AS CNY \n" +
"FROM\n" +
"\t[chen_12个月_A版本BOM销售额] \n" +
"WHERE\n" +
"\ttagname = 'OEM' \n" +
"ORDER BY\n" +
"\t折算人民币价税合计 DESC";
Statement stmt = conn.createStatement();//
ResultSet rs = stmt.executeQuery(sql);
while (rs.next()) {
// 截面积(mm2)
HashMap<String,String> map = new HashMap<>();
map.put("MouldingStyleCode",rs.getString("MouldingStyleCode"));
map.put("CNY",rs.getString("CNY"));
hashMapList.add(map);
}
rs.close();
stmt.close();
conn.close();
} catch (SQLException e) {
e.printStackTrace();
}
return hashMapList;
}

View File

@ -92,22 +92,22 @@ public class TechnologistController extends BaseController
@GetMapping("/getBestOEM") @GetMapping("/getBestHuakuang")
public AjaxResult getBestHuakuang() throws Exception public AjaxResult getBestHuakuang() throws Exception
{ {
return AjaxResult.success(DB_Ajax_DashBoard_Technologist_48102.getBestHuakuang()); return AjaxResult.success(DB_Ajax_DashBoard_Technologist_48102.getBestByProductionLine("画框"));
} }
@GetMapping("/getBestODM") @GetMapping("/getBestJiancai")
public AjaxResult getBestTijiaoxian() throws Exception public AjaxResult getBestTijiaoxian() throws Exception
{ {
return AjaxResult.success(DB_Ajax_DashBoard_Technologist_48102.getBestTijiaoxian()); return AjaxResult.success(DB_Ajax_DashBoard_Technologist_48102.getBestByProductionLine_Jiancai());
} }
@GetMapping("/getBestODM") @GetMapping("/getBestHunsha")
public AjaxResult getBestHunsha() throws Exception public AjaxResult getBestHunsha() throws Exception
{ {
return AjaxResult.success(DB_Ajax_DashBoard_Technologist_48102.getBestHunsha()); return AjaxResult.success(DB_Ajax_DashBoard_Technologist_48102.getBestByProductionLine("婚纱框"));
} }