hu il y a 2 ans
Parent
commit
6521876c64

+ 10 - 1
src/custom/restcontroller/webmanage/sale/accountclass/SQL/营销大类列表查询.sql

@@ -1,4 +1,13 @@
-select *  from plm_itemclass t1 where siteid=$siteid$ and parentid=0 and not exists (
+select  itemclassid,itemclassname,0 isused from plm_itemclass t1 where siteid=$siteid$ and parentid=0 and classtype='营销' and not exists (
+SELECT
+	t.v
+FROM
+	sa_accountclass,
+	JSON_TABLE(bindingcategories,"$[*]" COLUMNS ( v VARCHAR (128) PATH "$")) t where t.v=t1.itemclassid)
+
+	UNION ALL
+
+	select  itemclassid,itemclassname,1 isused from plm_itemclass t1 where siteid=$siteid$ and parentid=0 and classtype='营销' and  exists (
 SELECT
 	t.v
 FROM

+ 1 - 1
src/custom/restcontroller/webmanage/sale/databoard/databoard.java

@@ -383,7 +383,7 @@ public class databoard extends Controller {
         }
         list = supplementDate(Integer.parseInt(year), list);
         list = supplementDate(Integer.parseInt(lastyear), list);
-
+        list.sort(Comparator.comparingLong(o -> Long.parseLong(StringUtils.isBlank(o.getMonth())?"9999":o.getMonth())));
         return getSucReturnObject().setData(list).toString();
     }