|
@@ -292,6 +292,49 @@ public class MsSuspectedService {
|
|
|
msReportMapper.updateById(msReport);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ //更新今日日报,直接上报
|
|
|
+ @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
|
|
|
+ public void updateReportStatus(Long reportId, Integer medical, Integer singleRoom, BigDecimal temperature) {
|
|
|
+ //更新今日日报
|
|
|
+ Integer trueNum = 0, singleNum = 0, isSuspected = 0, isNoSuspected = 0, isFamliy = 0, abnormalNum = 0;
|
|
|
+
|
|
|
+ //确诊
|
|
|
+ trueNum = msReportMapper.selectSuspectedNum(reportId);
|
|
|
+
|
|
|
+ //居家隔离
|
|
|
+ singleNum = msReportMapper.selectSingleRoomNum(reportId);
|
|
|
+
|
|
|
+ //正常
|
|
|
+ isSuspected = msReportMapper.selectisSuspectedNum(reportId);
|
|
|
+
|
|
|
+ //疑似
|
|
|
+ isNoSuspected = msReportMapper.selectisNoSuspectedNum(reportId);
|
|
|
+
|
|
|
+ //异常人数
|
|
|
+ abnormalNum = msReportMapper.selectAbnormalNum(reportId);
|
|
|
+
|
|
|
+ //今日居家
|
|
|
+ List<MsSuspected> list = msSuspectedMapper.selectByReportId(reportId);
|
|
|
+ if (list != null && list.size() > 0)
|
|
|
+ isFamliy = list.size();
|
|
|
+ MsReport msReport = msReportMapper.selectById(reportId);
|
|
|
+ if (msReport != null) {
|
|
|
+ msReport.setSureNum(trueNum);
|
|
|
+ msReport.setSingleNum(singleNum);
|
|
|
+ msReport.setSuspectedNum(isNoSuspected);
|
|
|
+ msReport.setNormalNum(isSuspected);
|
|
|
+ msReport.setSafetyNum(isFamliy);
|
|
|
+ if (isNoSuspected > 0 || abnormalNum > 0)
|
|
|
+ msReport.setMsStatus(2);
|
|
|
+ else
|
|
|
+ msReport.setMsStatus(1);
|
|
|
+ msReport.setReportStatus(1);
|
|
|
+ msReport.setReportDate(DateTime.now().toDate());
|
|
|
+ msReport.setTimeUpdate(DateTime.now());
|
|
|
+ msReportMapper.updateById(msReport);
|
|
|
+ }
|
|
|
+ }
|
|
|
//健康评估
|
|
|
@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
|
|
|
public MsSuspected getScore(Long susprectedId, String userName, Integer medical, BigDecimal temperature, Integer cough, Integer muscle, Integer dyspnea, Integer fatigue, Integer diarrhea, Long userCreate) {
|