|
|
@@ -515,7 +515,7 @@ public class databoard extends Controller {
|
|
|
if (row.getString("y").equals(new SimpleDateFormat("yyyy").format(new Date()))) {
|
|
|
dataTrans.setName(row.getString("y") + "-" + row.getString("d") + "-" + row.getString("type"));
|
|
|
dataTrans.setType(row.getString("type"));
|
|
|
- dataTrans.setDay(row.getString("d"));
|
|
|
+ dataTrans.setMonth(row.getString("d"));
|
|
|
dataTrans.setYear(row.getString("y"));
|
|
|
dataTrans.setValue(row.getBigDecimal("typestatistics"));
|
|
|
list.add(dataTrans);
|
|
|
@@ -554,6 +554,8 @@ public class databoard extends Controller {
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
+
|
|
|
+ list.sort(Comparator.comparingLong(o -> Long.parseLong(o.getMonth())));
|
|
|
return getSucReturnObject().setData(list).toString();
|
|
|
}
|
|
|
|
|
|
@@ -796,7 +798,7 @@ public class databoard extends Controller {
|
|
|
|
|
|
public static List<DataTrans> supplementDate_cashbill(int year, List<DataTrans> params) {
|
|
|
String[] monthAndDay = new String[]{"01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"};
|
|
|
- String[] types = new String[]{"0", "1"};
|
|
|
+ String[] types = new String[]{"支出", "收入"};
|
|
|
List<DataTrans> list = new ArrayList<>();
|
|
|
if (params.isEmpty()) {
|
|
|
for (String type : types) {
|
|
|
@@ -837,7 +839,7 @@ public class databoard extends Controller {
|
|
|
|
|
|
public static List<DataTrans> supplementDate_cashbill_month(int year, List<DataTrans> params) {
|
|
|
String[] monthAndDay = new String[]{"01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31"};
|
|
|
- String[] types = new String[]{"0", "1"};
|
|
|
+ String[] types = new String[]{"支出", "收入"};
|
|
|
List<DataTrans> list = new ArrayList<>();
|
|
|
if (params.isEmpty()) {
|
|
|
for (String type : types) {
|
|
|
@@ -845,7 +847,7 @@ public class databoard extends Controller {
|
|
|
DataTrans dataTrans = new DataTrans();
|
|
|
String date = year + "-" + s + "-" + type;
|
|
|
dataTrans.setName(date);
|
|
|
- dataTrans.setDay(s);
|
|
|
+ dataTrans.setMonth(s);
|
|
|
dataTrans.setType(type);
|
|
|
dataTrans.setYear(String.valueOf(year));
|
|
|
dataTrans.setValue(BigDecimal.ZERO);
|
|
|
@@ -886,7 +888,7 @@ public class databoard extends Controller {
|
|
|
for (int i = 1; i <= 3; i++) {
|
|
|
monthAndDay[i - 1] = String.format("%02d", current + i);
|
|
|
}
|
|
|
- String[] types = new String[]{"0", "1"};
|
|
|
+ String[] types = new String[]{"支出", "收入"};
|
|
|
List<DataTrans> list = new ArrayList<>();
|
|
|
if (params.isEmpty()) {
|
|
|
for (String type : types) {
|