feat: 大屏
This commit is contained in:
@@ -300,7 +300,10 @@ public class DashboardService {
|
|||||||
*/
|
*/
|
||||||
public JSONObject homepageEquipment() {
|
public JSONObject homepageEquipment() {
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
|
JSONArray productReport = WQL.getWO("DASHBOARD").addParam("flag", "5").process().getResultJSONArray(0);
|
||||||
|
JSONArray deviceReport = WQL.getWO("DASHBOARD").addParam("flag", "6").process().getResultJSONArray(0);
|
||||||
|
result.put("productReport", productReport);
|
||||||
|
result.put("deviceReport", deviceReport);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -119,3 +119,43 @@
|
|||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "5"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
sd.create_time,
|
||||||
|
mm.material_code,
|
||||||
|
IF(LEFT(sd.point_code, 2) = 'YJ' ,CONCAT(sd.qty, '块'),CONCAT(sd.weight,'千克')) AS number
|
||||||
|
FROM
|
||||||
|
`st_ivt_vehicle_detail` sd
|
||||||
|
LEFT JOIN md_me_materialbase mm ON mm.material_id = sd.material_id
|
||||||
|
WHERE sd.point_code LIKE 'YJ%' OR sd.point_code LIKE 'HL%'
|
||||||
|
ORDER BY sd.create_time DESC
|
||||||
|
LIMIT 20
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
IF 输入.flag = "6"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
dn.device_code,
|
||||||
|
dn.failure_time,
|
||||||
|
IF(ISNULL(dn.failure_info), '-', dn.failure_info) AS failure_info
|
||||||
|
FROM
|
||||||
|
`das_device_number` dn
|
||||||
|
WHERE
|
||||||
|
(dn.device_code, dn.failure_time) IN (
|
||||||
|
SELECT
|
||||||
|
device_code,
|
||||||
|
MAX(failure_time) AS latest_failure_time
|
||||||
|
FROM
|
||||||
|
`das_device_number`
|
||||||
|
GROUP BY
|
||||||
|
device_code
|
||||||
|
)
|
||||||
|
ORDER BY
|
||||||
|
dn.failure_time DESC
|
||||||
|
LIMIT 20;
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|||||||
@@ -37,4 +37,20 @@ public class TempTest {
|
|||||||
.uniqueResult(0);
|
.uniqueResult(0);
|
||||||
System.out.println(info);
|
System.out.println(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void test02() {
|
||||||
|
String dateStr = "2023-06-14 07:32:05";
|
||||||
|
String trimmedDateStr = dateStr.substring(dateStr.indexOf('-') + 1);
|
||||||
|
System.out.println(trimmedDateStr);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void test03() {
|
||||||
|
JSONObject point = new JSONObject();
|
||||||
|
point.put("point_code", "333");
|
||||||
|
JSONArray request_param = new JSONArray();
|
||||||
|
request_param.add(point.getString("point_code"));
|
||||||
|
System.out.println(String.valueOf(request_param));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user