Compare commits
1 Commits
9ea11ee143
...
dev_js_202
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ed17f7910c |
@@ -31,9 +31,17 @@ public class zhxsqkLineReportEnhance implements ReportBeforeAdvicePlugin {
|
||||
}
|
||||
if (groupFieldList.contains("useyear") || params.containsKey("useyear")) { //年
|
||||
executePluginSql.append(" tbl_lgbsa.USEYEAR, \n");
|
||||
if(!(groupFieldList.contains("usemonth") || params.containsKey("usemonth"))){
|
||||
executePluginSql.append(" MAX(USEYEAR) as ny, \n"); //年月
|
||||
}
|
||||
}
|
||||
if (groupFieldList.contains("usemonth") || params.containsKey("usemonth")) { //月
|
||||
executePluginSql.append(" tbl_lgbsa.USEMONTH, \n");
|
||||
if(groupFieldList.contains("useyear") || params.containsKey("useyear")){
|
||||
executePluginSql.append(" MAX(CONCAT(USEYEAR, LPAD(USEMONTH, 2, '0'))) as ny, \n"); //年月
|
||||
}else{
|
||||
executePluginSql.append(" MAX(LPAD(USEMONTH, 2, '0')) as ny, \n");
|
||||
}
|
||||
}
|
||||
if (groupFieldList.contains("zonename") || params.containsKey("zonename")) { //业务区域
|
||||
executePluginSql.append(" tbl_lgbsa.ZONEID, \n");
|
||||
@@ -55,7 +63,7 @@ public class zhxsqkLineReportEnhance implements ReportBeforeAdvicePlugin {
|
||||
executePluginSql.append(" tbl_lgbsa.GOODSID, \n");
|
||||
executePluginSql.append(" tbl_lgbsa.GOODSNAME, \n");
|
||||
}
|
||||
executePluginSql.append(" MAX(CONCAT(USEYEAR, LPAD(USEMONTH, 2, '0'))) as ny, \n"); //年月
|
||||
|
||||
executePluginSql.append(" GROUP_CONCAT(DISTINCT tbl_lgbsa.PROVINCEID ORDER BY tbl_lgbsa.PROVINCEID SEPARATOR ',') as PROVINCEID, \n"); //行政区域ID
|
||||
executePluginSql.append(" GROUP_CONCAT(DISTINCT tbl_lgbsa.PROVINCENAME ORDER BY tbl_lgbsa.PROVINCEID SEPARATOR ',') as PROVINCENAME, \n"); //行政区域名称
|
||||
executePluginSql.append(" SUM(tbl_lgbsa.MONTHSAQTY) as MONTHSAQTY, \n"); //本月销量
|
||||
|
||||
Reference in New Issue
Block a user