|
|
@@ -7,6 +7,7 @@ import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|
|
import com.xunmei.common.core.constant.SecurityConstants;
|
|
|
+import com.xunmei.common.core.enums.resumption.RulePointDataSource;
|
|
|
import com.xunmei.common.core.exception.ServiceException;
|
|
|
import com.xunmei.common.core.utils.DateHelper;
|
|
|
import com.xunmei.common.security.utils.SecurityUtils;
|
|
|
@@ -18,8 +19,12 @@ import com.xunmei.core.question.service.IQuestionService;
|
|
|
import com.xunmei.core.resumption.domain.*;
|
|
|
import com.xunmei.core.resumption.enums.ResumptionStatus;
|
|
|
import com.xunmei.core.resumption.gx.vo.*;
|
|
|
-import com.xunmei.core.resumption.mapper.*;
|
|
|
+import com.xunmei.core.resumption.mapper.AppPlanMapper;
|
|
|
+import com.xunmei.core.resumption.mapper.AppResumptionDataNfcMapper;
|
|
|
+import com.xunmei.core.resumption.mapper.AppResumptionDataRemarkimgMapper;
|
|
|
+import com.xunmei.core.resumption.mapper.ResumptionMapper;
|
|
|
import com.xunmei.core.resumption.service.AppPlanService;
|
|
|
+import com.xunmei.system.api.RemoteIotService;
|
|
|
import com.xunmei.system.api.RemoteOrgService;
|
|
|
import com.xunmei.system.api.domain.SysOrg;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -28,6 +33,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.transaction.support.TransactionSynchronization;
|
|
|
import org.springframework.transaction.support.TransactionSynchronizationManager;
|
|
|
|
|
|
+import java.time.LocalDate;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@@ -44,7 +50,7 @@ public class ResumptionServiceImpl implements ResumptionService {
|
|
|
private AppResumptionDataRemarkimgMapper appResumptionDataRemarkimgMapper;
|
|
|
|
|
|
@Autowired
|
|
|
- private AppResumptionDataMapper appResumptionDataMapper;
|
|
|
+ private RemoteIotService remoteIotService;
|
|
|
|
|
|
@Autowired
|
|
|
private AppResumptionDataNfcMapper appResumptionDataNfcMapper;
|
|
|
@@ -405,7 +411,7 @@ public class ResumptionServiceImpl implements ResumptionService {
|
|
|
//区域数据
|
|
|
Map<Long, AreaResumptionVo> map = new HashMap<>();
|
|
|
|
|
|
- dealData(resumptionPlanVos, imgMap, itemMap, itComMap, map, taskVo, isExist);
|
|
|
+ dealData(resumptionPlanVos, imgMap, itemMap, itComMap, map, taskVo, isExist,resumption.getOrgId());
|
|
|
|
|
|
|
|
|
int yesNFC = 0;
|
|
|
@@ -496,7 +502,8 @@ public class ResumptionServiceImpl implements ResumptionService {
|
|
|
Map<Long, Map<String, Integer>> itComMap,
|
|
|
Map<Long, AreaResumptionVo> map,
|
|
|
ResumptionTaskDetailVo taskVo,
|
|
|
- boolean isExist) {
|
|
|
+ boolean isExist,
|
|
|
+ Long orgId) {
|
|
|
|
|
|
Integer noPointNum = 0;
|
|
|
Integer yesPointNum = 0;
|
|
|
@@ -551,6 +558,10 @@ public class ResumptionServiceImpl implements ResumptionService {
|
|
|
}
|
|
|
pointVo.setRectificationDeadline(vo.getRectificationDeadline());
|
|
|
pointVo.setDataStatus(vo.getDataStatus());
|
|
|
+
|
|
|
+ //处理设置了数据来源的检查要点
|
|
|
+ dealPointDataSource(vo,orgId);
|
|
|
+
|
|
|
resumptionItemVo.getPoints().add(pointVo);
|
|
|
|
|
|
|
|
|
@@ -594,4 +605,24 @@ public class ResumptionServiceImpl implements ResumptionService {
|
|
|
imgMap = images.stream().collect(Collectors.groupingBy(AppResumptionDataRemarkimg::getResumptionDataId));
|
|
|
return imgMap;
|
|
|
}
|
|
|
+
|
|
|
+ private void dealPointDataSource(ResumptionPlanVo vo,Long orgId){
|
|
|
+ Integer pointDataSource = vo.getPointDataSource();
|
|
|
+ if (ObjectUtil.isNull(pointDataSource)){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (RulePointDataSource.VIDEO_DAYS.getCode().equals(pointDataSource)){
|
|
|
+ String yesterDay = LocalDate.now().plusDays(-1).toString();
|
|
|
+ int nums = remoteIotService.selectVideoDayExceptionChannelNums(orgId,yesterDay);
|
|
|
+ vo.setExceptionChannelNum(nums);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (RulePointDataSource.VIDEO_DIAGNOSIS.getCode().equals(pointDataSource)){
|
|
|
+ String today = LocalDate.now().toString();
|
|
|
+ int nums = remoteIotService.selectVideoDiagnosisExceptionChannelNums(orgId,today);
|
|
|
+ vo.setExceptionChannelNum(nums);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
}
|