代码更新
This commit is contained in:
@@ -243,11 +243,16 @@ public class DeviceBigScreenServiceImpl implements DeviceBigScreenService {
|
||||
jsonObject.put("fault_num", fault_num.getString("num"));
|
||||
|
||||
// 委外台数
|
||||
map.put("status", "30");
|
||||
map.put("flag", "10");
|
||||
JSONObject out_num = WQL.getWO("EM_DEVICEBIGSCREEN_01").addParamMap(map).process().uniqueResult(0);
|
||||
jsonObject.put("out_num", out_num.getString("num"));
|
||||
if (ObjectUtil.isEmpty(out_num)) {
|
||||
jsonObject.put("out_num", "0");
|
||||
} else {
|
||||
jsonObject.put("out_num", String.valueOf(out_num.size()));
|
||||
}
|
||||
|
||||
// 保养台数
|
||||
map.put("flag", "5");
|
||||
map.put("status", "40");
|
||||
JSONObject main_num = WQL.getWO("EM_DEVICEBIGSCREEN_01").addParamMap(map).process().uniqueResult(0);
|
||||
jsonObject.put("main_num", main_num.getString("num"));
|
||||
@@ -328,12 +333,23 @@ public class DeviceBigScreenServiceImpl implements DeviceBigScreenService {
|
||||
/*
|
||||
* 查询保养单明细
|
||||
*/
|
||||
|
||||
WQLObject dtlTab = WQLObject.getWQLObject("em_bi_devicemaintenanceplandtl");
|
||||
JSONObject resultJson = new JSONObject();
|
||||
JSONObject resultData = new JSONObject();
|
||||
|
||||
JSONArray arr = WQL.getWO("EM_DEVICEBIGSCREEN_01").addParam("flag", "8").process().getResultJSONArray(0);
|
||||
for (int i = 0; i < arr.size(); i++) {
|
||||
JSONObject json = arr.getJSONObject(i);
|
||||
|
||||
// 明细数
|
||||
JSONArray jsonDtl = dtlTab.query("maint_plan_id = '" + json.getString("maint_plan_id") + "'").getResultJSONArray(0);
|
||||
if (ObjectUtil.isEmpty(jsonDtl)) {
|
||||
json.put("num", "0");
|
||||
} else {
|
||||
json.put("num", String.valueOf(jsonDtl.size()));
|
||||
}
|
||||
|
||||
// 保养倒计时: 计划日期 - 当前日期
|
||||
Date date1 = DateUtil.parse(DateUtil.today()); // 当前日期
|
||||
Date date2 = DateUtil.parse(json.getString("plan_time")); // 计划日期
|
||||
|
||||
@@ -193,15 +193,9 @@
|
||||
mst.real_start_date AS impl_time,
|
||||
mst.remark,
|
||||
mst.real_end_date,
|
||||
dtl.num
|
||||
mst.maint_plan_id
|
||||
FROM
|
||||
EM_BI_DeviceMaintenancePlanMst mst
|
||||
LEFT JOIN
|
||||
(
|
||||
SELECT count(*)AS num,d.maint_plan_id FROM EM_BI_DeviceMaintenancePlanDtl d
|
||||
LEFT JOIN EM_BI_DeviceMaintenancePlanMst m ON m.maint_plan_id = d.maint_plan_id
|
||||
GROUP BY d.maint_plan_dtl_id
|
||||
) AS dtl ON mst.maint_plan_id = dtl.maint_plan_id
|
||||
LEFT JOIN EM_BI_EquipmentFile file ON mst.devicerecord_id = file.devicerecord_id
|
||||
LEFT JOIN sys_dept dept ON dept.dept_id = file.use_deptid
|
||||
WHERE
|
||||
@@ -227,3 +221,23 @@
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "10"
|
||||
QUERY
|
||||
SELECT
|
||||
count(mst.devicerecord_id) AS num
|
||||
FROM
|
||||
EM_BI_DeviceRepairMst mst
|
||||
LEFT JOIN EM_BI_EquipmentFile file ON file.devicerecord_id = mst.devicerecord_id
|
||||
LEFT JOIN sys_dept dept ON dept.dept_id = file.use_deptid
|
||||
WHERE
|
||||
mst.is_delete = '0'
|
||||
AND file.is_delete = '0'
|
||||
AND dept.code = 输入.dept_code
|
||||
AND mst.invstatus = '04'
|
||||
|
||||
group by mst.devicerecord_id
|
||||
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
@@ -306,7 +306,7 @@
|
||||
LEFT JOIN sys_dept dept ON dept.dept_id = file.use_deptid
|
||||
WHERE
|
||||
mst.is_delete = '0'
|
||||
AND (mst.invstatus <> '99')
|
||||
AND mst.invstatus not in ('06','07','99')
|
||||
AND ( ISNULL( mst.source_bill_id ) OR mst.source_bill_type = 'WXJH' )
|
||||
|
||||
UNION
|
||||
@@ -416,7 +416,7 @@
|
||||
LEFT JOIN sys_dept dept ON dept.dept_id = file.use_deptid
|
||||
WHERE
|
||||
mst.is_delete = '0'
|
||||
AND (mst.invstatus <> '99')
|
||||
AND mst.invstatus not in ('04','05','99')
|
||||
|
||||
order by input_time DESC
|
||||
|
||||
|
||||
Reference in New Issue
Block a user