Commit 9bfd76b6 authored by 刘林's avatar 刘林

Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register

parents c85952d3 5b2cc3df
......@@ -2723,7 +2723,7 @@
WHERE
ei.use_unit_code IS NOT NULL
AND ul.is_delete = 0
and ei.s_delete = '0'
and ei.is_delete = '0'
AND ul.expiry_date <![CDATA[<]]> to_char( now( ), 'YYYY-MM-DD' )
</select>
......
package com.yeejoin.amos.boot.module.jg.biz.listener;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONException;
......@@ -255,11 +256,7 @@ public class SafetyProblemTopicMessage extends EmqxListener {
if (problemTimeObj instanceof Long) {
problemTime = new Date((Long) problemTimeObj);
} else if (problemTimeObj instanceof String && !((String) problemTimeObj).isEmpty()) {
try {
problemTime = new Date(Long.parseLong((String) problemTimeObj));
} catch (NumberFormatException e) {
log.warn("无法解析problemTime: {}", problemTimeObj);
}
problemTime = DateUtil.parseDate((String) problemTimeObj);
} else if (problemTimeObj instanceof Date) {
problemTime = (Date) problemTimeObj;
}
......
package com.yeejoin.amos.boot.module.jg.biz.refresh.handler;
import com.yeejoin.amos.boot.module.common.api.dao.EsEquipmentDao;
import com.yeejoin.amos.boot.module.common.api.entity.TzsDataRefreshMessage;
import com.yeejoin.amos.boot.module.common.api.service.IDataRefreshHandler;
import com.yeejoin.amos.boot.module.common.biz.refresh.DataRefreshEvent;
......@@ -23,7 +22,6 @@ public class EquipmentSafetyProblemRefreshHandler implements IDataRefreshHandler
private final IdxBizJgUseInfoServiceImpl useInfoService;
private final IIdxBizJgInspectionDetectionInfoService iIdxBizJgInspectionDetectionInfoService;
private final EsEquipmentDao esEquipmentDao;
private final IdxBizJgMaintenanceRecordInfoServiceImpl maintenanceRecordInfoService;
private final SafetyProblemTracingServiceImpl safetyProblemTracingService;
......
......@@ -72,8 +72,8 @@ public class SafetyProblemTracingGenServiceImpl{
}
@Scheduled(cron = "0 0 1 * * ?")
@SchedulerLock(name = "executePersonnalCertification", lockAtMostFor = "PT5H", lockAtLeastFor = "PT10M")
public void executePersonnalCertification() {
@SchedulerLock(name = "executePersonnelCertification", lockAtMostFor = "PT5H", lockAtLeastFor = "PT10M")
public void executePersonnelCertification() {
executePersonnalCertificationCheck();
}
......
......@@ -292,13 +292,13 @@ public class SafetyProblemTracingServiceImpl extends BaseService<SafetyProblemTr
safetyProblemTracings.forEach(item -> {
// 一个设备某类未处理的问题只有一个,所以直接更新某个类型问题
if (item.getProblemTypeCode().equals(SafetyProblemTypeEnum.JYCQ.getProblemTypeCode())
&& inspectionDetectionInfo != null
&& !ValidationUtil.isEmpty(inspectionDetectionInfo) && !ValidationUtil.isEmpty(inspectionDetectionInfo.getNextInspectDate())
&& new Date().before(inspectionDetectionInfo.getNextInspectDate())) {
item.setProblemStatusCode(SafetyProblemStatusEnum.HANDLED.getCode());
item.setProblemStatus(SafetyProblemStatusEnum.HANDLED.getName());
}
if (item.getProblemTypeCode().equals(SafetyProblemTypeEnum.WBCQ.getProblemTypeCode())
&& lastMaintenanceRecordInfo != null
&& !ValidationUtil.isEmpty(lastMaintenanceRecordInfo) && !ValidationUtil.isEmpty(lastMaintenanceRecordInfo.getInformEnd())
&& new Date().before(lastMaintenanceRecordInfo.getInformEnd())) {
item.setProblemStatusCode(SafetyProblemStatusEnum.HANDLED.getCode());
item.setProblemStatus(SafetyProblemStatusEnum.HANDLED.getName());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment