|
@@ -411,6 +411,7 @@ public class TimerServiceImpl implements TimerService {
|
|
" SUM( income ) income, " +
|
|
" SUM( income ) income, " +
|
|
" SUM( person ) person, " +
|
|
" SUM( person ) person, " +
|
|
" SUM( person_cost ) person_cost, " +
|
|
" SUM( person_cost ) person_cost, " +
|
|
|
|
+ " SUM( folding_repair ) folding_repair, " +
|
|
" SUM( material ) material, " +
|
|
" SUM( material ) material, " +
|
|
" SUM( other_cost ) other_cost, " +
|
|
" SUM( other_cost ) other_cost, " +
|
|
" SUM( cost_sum ) cost_sum, " +
|
|
" SUM( cost_sum ) cost_sum, " +
|
|
@@ -433,6 +434,7 @@ public class TimerServiceImpl implements TimerService {
|
|
" SUM( income ) income, " +
|
|
" SUM( income ) income, " +
|
|
" SUM( person ) person, " +
|
|
" SUM( person ) person, " +
|
|
" SUM( person_cost ) person_cost, " +
|
|
" SUM( person_cost ) person_cost, " +
|
|
|
|
+ " SUM( folding_repair ) folding_repair, " +
|
|
" SUM( material ) material, " +
|
|
" SUM( material ) material, " +
|
|
" SUM( other_cost ) other_cost, " +
|
|
" SUM( other_cost ) other_cost, " +
|
|
" SUM( cost_sum ) cost_sum, " +
|
|
" SUM( cost_sum ) cost_sum, " +
|
|
@@ -474,6 +476,7 @@ public class TimerServiceImpl implements TimerService {
|
|
" `month`," +
|
|
" `month`," +
|
|
" project_name, " +
|
|
" project_name, " +
|
|
" predict_income, " +
|
|
" predict_income, " +
|
|
|
|
+ " folding_repair, " +
|
|
" `open`, " +
|
|
" `open`, " +
|
|
" income, " +
|
|
" income, " +
|
|
" person, " +
|
|
" person, " +
|
|
@@ -499,6 +502,7 @@ public class TimerServiceImpl implements TimerService {
|
|
" SUM( `open` ) `open`, " +
|
|
" SUM( `open` ) `open`, " +
|
|
" SUM( income ) income, " +
|
|
" SUM( income ) income, " +
|
|
" SUM( person ) person, " +
|
|
" SUM( person ) person, " +
|
|
|
|
+ " SUM( folding_repair ) folding_repair, " +
|
|
" SUM( person_cost ) person_cost, " +
|
|
" SUM( person_cost ) person_cost, " +
|
|
" SUM( material ) material, " +
|
|
" SUM( material ) material, " +
|
|
" SUM( other_cost ) other_cost, " +
|
|
" SUM( other_cost ) other_cost, " +
|
|
@@ -1221,6 +1225,7 @@ public class TimerServiceImpl implements TimerService {
|
|
" SUM( income ) income, " +
|
|
" SUM( income ) income, " +
|
|
" SUM( person ) person, " +
|
|
" SUM( person ) person, " +
|
|
" SUM( person_cost ) person_cost, " +
|
|
" SUM( person_cost ) person_cost, " +
|
|
|
|
+ " SUM( folding_repair ) folding_repair, " +
|
|
" SUM( material ) material, " +
|
|
" SUM( material ) material, " +
|
|
" SUM( other_cost ) other_cost, " +
|
|
" SUM( other_cost ) other_cost, " +
|
|
" SUM( cost_sum ) cost_sum, " +
|
|
" SUM( cost_sum ) cost_sum, " +
|
|
@@ -1232,7 +1237,7 @@ public class TimerServiceImpl implements TimerService {
|
|
" SUM( net_profit ) net_profit, " +
|
|
" SUM( net_profit ) net_profit, " +
|
|
" CONCAT(ROUND(SUM( net_profit )/ SUM( income )*100,2),'%') net_margin " +
|
|
" CONCAT(ROUND(SUM( net_profit )/ SUM( income )*100,2),'%') net_margin " +
|
|
"FROM " +
|
|
"FROM " +
|
|
- " lanyun_project_analysis " +
|
|
|
|
|
|
+ " lanyun_project_analysis_copy1 " +
|
|
" WHERE 1=1 " ;
|
|
" WHERE 1=1 " ;
|
|
/*sql获取第一层合计数据*/
|
|
/*sql获取第一层合计数据*/
|
|
sql[1]= "SELECT " +
|
|
sql[1]= "SELECT " +
|
|
@@ -1243,6 +1248,7 @@ public class TimerServiceImpl implements TimerService {
|
|
" SUM( income ) income, " +
|
|
" SUM( income ) income, " +
|
|
" SUM( person ) person, " +
|
|
" SUM( person ) person, " +
|
|
" SUM( person_cost ) person_cost, " +
|
|
" SUM( person_cost ) person_cost, " +
|
|
|
|
+ " SUM( folding_repair ) folding_repair, " +
|
|
" SUM( material ) material, " +
|
|
" SUM( material ) material, " +
|
|
" SUM( other_cost ) other_cost, " +
|
|
" SUM( other_cost ) other_cost, " +
|
|
" SUM( cost_sum ) cost_sum, " +
|
|
" SUM( cost_sum ) cost_sum, " +
|
|
@@ -1254,13 +1260,13 @@ public class TimerServiceImpl implements TimerService {
|
|
" SUM( net_profit ) net_profit, " +
|
|
" SUM( net_profit ) net_profit, " +
|
|
" CONCAT(ROUND(SUM( net_profit )/ SUM( income )*100,2),'%') net_margin " +
|
|
" CONCAT(ROUND(SUM( net_profit )/ SUM( income )*100,2),'%') net_margin " +
|
|
"FROM " +
|
|
"FROM " +
|
|
- " lanyun_project_analysis " +
|
|
|
|
|
|
+ " lanyun_project_analysis_copy1 " +
|
|
"WHERE 1=1 " ;
|
|
"WHERE 1=1 " ;
|
|
/*sql获取第一层数据总数*/
|
|
/*sql获取第一层数据总数*/
|
|
sql[2] = "SELECT " +
|
|
sql[2] = "SELECT " +
|
|
" COUNT(*) total_count " +
|
|
" COUNT(*) total_count " +
|
|
"FROM " +
|
|
"FROM " +
|
|
- " ( SELECT `month` FROM lanyun_project_analysis WHERE 1 = 1 " ;
|
|
|
|
|
|
+ " ( SELECT `month` FROM lanyun_project_analysis_copy1 WHERE 1 = 1 " ;
|
|
if (ObjectUtil.isNotNull(data.get("startDate"))) {
|
|
if (ObjectUtil.isNotNull(data.get("startDate"))) {
|
|
sql[0] = sql[0] + " AND `month` >= \"" + data.get("startDate") +"\" " ;
|
|
sql[0] = sql[0] + " AND `month` >= \"" + data.get("startDate") +"\" " ;
|
|
sql[1] = sql[1] + " AND `month` >= \"" + data.get("startDate") +"\" " ;
|
|
sql[1] = sql[1] + " AND `month` >= \"" + data.get("startDate") +"\" " ;
|
|
@@ -1284,6 +1290,7 @@ public class TimerServiceImpl implements TimerService {
|
|
" `month`," +
|
|
" `month`," +
|
|
" project_name, " +
|
|
" project_name, " +
|
|
" predict_income, " +
|
|
" predict_income, " +
|
|
|
|
+ " folding_repair, " +
|
|
" `open`, " +
|
|
" `open`, " +
|
|
" income, " +
|
|
" income, " +
|
|
" person, " +
|
|
" person, " +
|
|
@@ -1299,7 +1306,7 @@ public class TimerServiceImpl implements TimerService {
|
|
" net_profit, " +
|
|
" net_profit, " +
|
|
" CONCAT(ROUND(net_margin*100,2),'%') net_margin " +
|
|
" CONCAT(ROUND(net_margin*100,2),'%') net_margin " +
|
|
"FROM " +
|
|
"FROM " +
|
|
- " lanyun_project_analysis " +
|
|
|
|
|
|
+ " lanyun_project_analysis_copy1 " +
|
|
" WHERE 1=1";
|
|
" WHERE 1=1";
|
|
/*sql获取第二层合计数据*/
|
|
/*sql获取第二层合计数据*/
|
|
sql[1] = "SELECT " +
|
|
sql[1] = "SELECT " +
|
|
@@ -1309,6 +1316,7 @@ public class TimerServiceImpl implements TimerService {
|
|
" SUM( `open` ) `open`, " +
|
|
" SUM( `open` ) `open`, " +
|
|
" SUM( income ) income, " +
|
|
" SUM( income ) income, " +
|
|
" SUM( person ) person, " +
|
|
" SUM( person ) person, " +
|
|
|
|
+ " SUM( folding_repair ) folding_repair, " +
|
|
" SUM( person_cost ) person_cost, " +
|
|
" SUM( person_cost ) person_cost, " +
|
|
" SUM( material ) material, " +
|
|
" SUM( material ) material, " +
|
|
" SUM( other_cost ) other_cost, " +
|
|
" SUM( other_cost ) other_cost, " +
|
|
@@ -1321,13 +1329,13 @@ public class TimerServiceImpl implements TimerService {
|
|
" SUM( net_profit ) net_profit, " +
|
|
" SUM( net_profit ) net_profit, " +
|
|
" CONCAT(ROUND(SUM( net_profit )/ SUM( income )*100,2),'%') net_margin " +
|
|
" CONCAT(ROUND(SUM( net_profit )/ SUM( income )*100,2),'%') net_margin " +
|
|
" FROM " +
|
|
" FROM " +
|
|
- " lanyun_project_analysis " +
|
|
|
|
|
|
+ " lanyun_project_analysis_copy1 " +
|
|
" WHERE 1=1 ";
|
|
" WHERE 1=1 ";
|
|
/*sql获取第二层数据总数*/
|
|
/*sql获取第二层数据总数*/
|
|
sql[2] = "SELECT " +
|
|
sql[2] = "SELECT " +
|
|
" COUNT(*) total_count " +
|
|
" COUNT(*) total_count " +
|
|
" FROM " +
|
|
" FROM " +
|
|
- " lanyun_project_analysis " +
|
|
|
|
|
|
+ " lanyun_project_analysis_copy1 " +
|
|
" WHERE 1=1 ";
|
|
" WHERE 1=1 ";
|
|
if (data.containsKey("startDate") || data.containsKey("endDate")){
|
|
if (data.containsKey("startDate") || data.containsKey("endDate")){
|
|
data.remove("month");
|
|
data.remove("month");
|
|
@@ -1355,9 +1363,9 @@ public class TimerServiceImpl implements TimerService {
|
|
log.info("sql[0]:{}",sql[0]);
|
|
log.info("sql[0]:{}",sql[0]);
|
|
log.info("sql[2]:{}",sql[2]);
|
|
log.info("sql[2]:{}",sql[2]);
|
|
}
|
|
}
|
|
- sql[3]="SELECT DISTINCT project_name FROM lanyun_project_analysis;";
|
|
|
|
- sql[4]="SELECT DISTINCT format FROM lanyun_project_analysis;";
|
|
|
|
- sql[5]="SELECT DISTINCT customer_system FROM lanyun_project_analysis;";
|
|
|
|
|
|
+ sql[3]="SELECT DISTINCT project_name FROM lanyun_project_analysis_copy1;";
|
|
|
|
+ sql[4]="SELECT DISTINCT format FROM lanyun_project_analysis_copy1;";
|
|
|
|
+ sql[5]="SELECT DISTINCT customer_system FROM lanyun_project_analysis_copy1;";
|
|
|
|
|
|
List<ProjectAnalysis> analysisList = jdbcTemplate.query(sql[0], new ProjectAnalysisMapper());
|
|
List<ProjectAnalysis> analysisList = jdbcTemplate.query(sql[0], new ProjectAnalysisMapper());
|
|
List<ProjectAnalysis> analysisSum= jdbcTemplate.query(sql[1], new ProjectAnalysisMapper());
|
|
List<ProjectAnalysis> analysisSum= jdbcTemplate.query(sql[1], new ProjectAnalysisMapper());
|