代码更新
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
package org.nl.wms.sb.re.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateUnit;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
@@ -48,6 +49,20 @@ public class InstrumentaccountServiceImpl implements InstrumentaccountService {
|
||||
map.put("beginuse_date", MapUtil.getStr(whereJson, "beginuse_date"));
|
||||
map.put("docimasy_result", MapUtil.getStr(whereJson, "docimasy_result"));
|
||||
JSONObject json = WQL.getWO("QEM_BI_INSTRUMENTACCOUNT001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "");
|
||||
|
||||
JSONArray content = json.getJSONArray("content");
|
||||
for (int i = 0; i < content.size(); i++) {
|
||||
JSONObject jsonObject = content.getJSONObject(i);
|
||||
|
||||
Date date1 = DateUtil.parse(DateUtil.today()); // 当前日期
|
||||
Date date2 = DateUtil.parse(jsonObject.getString("beginuse_date")); // 下次检验日期
|
||||
|
||||
long betweenDay = DateUtil.between(date1, date2, DateUnit.DAY, false);
|
||||
|
||||
if (betweenDay < 15) {
|
||||
jsonObject.put("is_red", "1");
|
||||
}
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
package org.nl.wms.sb.re.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateUnit;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
@@ -45,6 +46,20 @@ public class SafeaccountServiceImpl implements SafeaccountService {
|
||||
if (!ObjectUtil.isEmpty(device_code)) map.put("device_code", "%" + device_code + "%");
|
||||
map.put("docimasy_date", docimasy_date);
|
||||
JSONObject json = WQL.getWO("QEM_BI_SAFEACCOUNT001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "");
|
||||
|
||||
JSONArray content = json.getJSONArray("content");
|
||||
for (int i = 0; i < content.size(); i++) {
|
||||
JSONObject jsonObject = content.getJSONObject(i);
|
||||
|
||||
Date date1 = DateUtil.parse(DateUtil.today()); // 当前日期
|
||||
Date date2 = DateUtil.parse(jsonObject.getString("next_docimasy_date")); // 下次检验日期
|
||||
|
||||
long betweenDay = DateUtil.between(date1, date2, DateUnit.DAY, false);
|
||||
|
||||
if (betweenDay < 15) {
|
||||
jsonObject.put("is_red", "1");
|
||||
}
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
package org.nl.wms.sb.re.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateUnit;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
@@ -35,7 +36,6 @@ import java.util.*;
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class SpecialaccountServiceImpl implements SpecialaccountService {
|
||||
|
||||
@Override
|
||||
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
||||
String device_code = (String) whereJson.get("device_code");
|
||||
@@ -45,6 +45,20 @@ public class SpecialaccountServiceImpl implements SpecialaccountService {
|
||||
if (!ObjectUtil.isEmpty(device_code)) map.put("device_code", "%" + device_code + "%");
|
||||
map.put("valid_term", valid_term);
|
||||
JSONObject json = WQL.getWO("QEM_BI_SPECIALACCOUNT001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "");
|
||||
|
||||
JSONArray content = json.getJSONArray("content");
|
||||
for (int i = 0; i < content.size(); i++) {
|
||||
JSONObject jsonObject = content.getJSONObject(i);
|
||||
|
||||
Date date1 = DateUtil.parse(DateUtil.today()); // 当前日期
|
||||
Date date2 = DateUtil.parse(jsonObject.getString("valid_term")); // 检验日期
|
||||
|
||||
long betweenDay = DateUtil.between(date1, date2, DateUnit.DAY, false);
|
||||
|
||||
if (betweenDay < 30) {
|
||||
jsonObject.put("is_red", "1");
|
||||
}
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
|
||||
@@ -58,11 +58,15 @@
|
||||
class.class_name,
|
||||
file.device_code,
|
||||
file.device_name,
|
||||
file.extend_code
|
||||
file.extend_code,
|
||||
d1.name AS dept_name,
|
||||
d2.name AS use_name
|
||||
FROM
|
||||
EM_BI_DeviceRepairMst mst
|
||||
LEFT JOIN EM_BI_EquipmentFile file ON file.devicerecord_id = mst.devicerecord_id
|
||||
LEFT JOIN md_pb_classstandard class ON file.material_type_id = class.class_id
|
||||
LEFT JOIN sys_dept d1 ON file.belong_deptid = d1.dept_id
|
||||
LEFT JOIN sys_dept d2 ON file.use_groupid = d2.dept_id
|
||||
WHERE
|
||||
mst.is_delete = '0'
|
||||
AND file.is_delete = '0'
|
||||
|
||||
Reference in New Issue
Block a user