|
@@ -45,7 +45,7 @@ public class MsTripService {
|
|
public Long addSuspectedTrip(Long suspectedId, String userName, Integer grender, Integer age, String familyStatus,
|
|
public Long addSuspectedTrip(Long suspectedId, String userName, Integer grender, Integer age, String familyStatus,
|
|
String statusDesp, Integer medical,Integer medicalState, BigDecimal temperature, Integer cough, Integer muscle,
|
|
String statusDesp, Integer medical,Integer medicalState, BigDecimal temperature, Integer cough, Integer muscle,
|
|
Integer dyspnea, Integer fatigue, Integer diarrhea, Integer singleRoom, String others, Long userCreate, Integer scoreRezult, Integer temperatureScore, Integer scoreHistroy, Integer score
|
|
Integer dyspnea, Integer fatigue, Integer diarrhea, Integer singleRoom, String others, Long userCreate, Integer scoreRezult, Integer temperatureScore, Integer scoreHistroy, Integer score
|
|
- , Integer isContact, Integer isSuspected, Integer workLocal, String workLocalOther, Integer todayLocal, String todayLocalOther, String autoLocal, String autoAddr, Integer isTrip, List<MsTripDet> listTripDet) {
|
|
|
|
|
|
+ , Integer isContact, Integer isSuspected, Integer workLocal, String workLocalOther, Integer todayLocal, String todayLocalOther, String autoLocal, String autoAddr, Integer isTrip, List<MsTripDet> listTripDet, String longitude, String latitude) {
|
|
Long reportId = 0L;
|
|
Long reportId = 0L;
|
|
//如果是当前日期 已经添加
|
|
//如果是当前日期 已经添加
|
|
Date t = new Date();
|
|
Date t = new Date();
|
|
@@ -70,6 +70,8 @@ public class MsTripService {
|
|
msReport.setTimeCreate(DateTime.now());
|
|
msReport.setTimeCreate(DateTime.now());
|
|
msReport.setUserUpdate(userCreate);
|
|
msReport.setUserUpdate(userCreate);
|
|
msReport.setTimeUpdate(DateTime.now());
|
|
msReport.setTimeUpdate(DateTime.now());
|
|
|
|
+ msReport.setLatitude(latitude);
|
|
|
|
+ msReport.setLongitude(longitude);
|
|
msReportMapper.insert(msReport);
|
|
msReportMapper.insert(msReport);
|
|
reportId = msReport.getReportId();
|
|
reportId = msReport.getReportId();
|
|
} else {
|
|
} else {
|
|
@@ -79,34 +81,43 @@ public class MsTripService {
|
|
//判断是否疑似
|
|
//判断是否疑似
|
|
Integer suspectedStatus = 0;
|
|
Integer suspectedStatus = 0;
|
|
//确诊
|
|
//确诊
|
|
- if (medical == 1)
|
|
|
|
|
|
+ if (medical == 1) {
|
|
suspectedStatus = 1;
|
|
suspectedStatus = 1;
|
|
|
|
+ }
|
|
//隔离
|
|
//隔离
|
|
- if (singleRoom == 1)
|
|
|
|
|
|
+ if (singleRoom == 1) {
|
|
suspectedStatus = 1;
|
|
suspectedStatus = 1;
|
|
|
|
+ }
|
|
//体温
|
|
//体温
|
|
- if (Conv.NFloat(temperature) < Conv.NFloat(35) || Conv.NFloat(temperature) > Conv.NFloat(37.3))
|
|
|
|
|
|
+ if (Conv.NFloat(temperature) < Conv.NFloat(35) || Conv.NFloat(temperature) > Conv.NFloat(37.3)) {
|
|
suspectedStatus = 1;
|
|
suspectedStatus = 1;
|
|
|
|
+ }
|
|
//咳嗽
|
|
//咳嗽
|
|
- if (cough > 0)
|
|
|
|
|
|
+ if (cough > 0) {
|
|
suspectedStatus = 1;
|
|
suspectedStatus = 1;
|
|
|
|
+ }
|
|
//肌肉酸痛
|
|
//肌肉酸痛
|
|
- if (muscle > 0)
|
|
|
|
|
|
+ if (muscle > 0) {
|
|
suspectedStatus = 1;
|
|
suspectedStatus = 1;
|
|
|
|
+ }
|
|
//呼吸困难
|
|
//呼吸困难
|
|
- if (dyspnea > 0)
|
|
|
|
|
|
+ if (dyspnea > 0) {
|
|
suspectedStatus = 1;
|
|
suspectedStatus = 1;
|
|
|
|
+ }
|
|
//乏力
|
|
//乏力
|
|
- if (fatigue > 0)
|
|
|
|
|
|
+ if (fatigue > 0) {
|
|
suspectedStatus = 1;
|
|
suspectedStatus = 1;
|
|
|
|
+ }
|
|
//腹泻
|
|
//腹泻
|
|
- if (diarrhea > 0)
|
|
|
|
|
|
+ if (diarrhea > 0) {
|
|
suspectedStatus = 1;
|
|
suspectedStatus = 1;
|
|
|
|
+ }
|
|
if (suspectedId == 0L) {
|
|
if (suspectedId == 0L) {
|
|
//判断家人是否同名
|
|
//判断家人是否同名
|
|
List<MsSuspected> list = msSuspectedMapper.selectUserNameNum(reportId, userName, reportDate);
|
|
List<MsSuspected> list = msSuspectedMapper.selectUserNameNum(reportId, userName, reportDate);
|
|
- if (list != null && list.size() > 0)
|
|
|
|
|
|
+ if (list != null && list.size() > 0) {
|
|
return 2L;
|
|
return 2L;
|
|
|
|
+ }
|
|
//判断是否评估
|
|
//判断是否评估
|
|
if (scoreRezult == 0) {
|
|
if (scoreRezult == 0) {
|
|
MsSuspected msSuspected1 = msSuspectedService.getScore(0L, userName, medical, temperature, cough, muscle, dyspnea, fatigue, diarrhea, userCreate);
|
|
MsSuspected msSuspected1 = msSuspectedService.getScore(0L, userName, medical, temperature, cough, muscle, dyspnea, fatigue, diarrhea, userCreate);
|
|
@@ -189,11 +200,13 @@ public class MsTripService {
|
|
//判断家人是否同名
|
|
//判断家人是否同名
|
|
List<MsSuspected> list = msSuspectedMapper.selectUserNameNum(reportId, userName, reportDate);
|
|
List<MsSuspected> list = msSuspectedMapper.selectUserNameNum(reportId, userName, reportDate);
|
|
if (list != null && list.size() > 0) {
|
|
if (list != null && list.size() > 0) {
|
|
- if (list.size() > 1)
|
|
|
|
|
|
+ if (list.size() > 1) {
|
|
return 2L;
|
|
return 2L;
|
|
|
|
+ }
|
|
else {
|
|
else {
|
|
- if (list.get(0).getSuspectedId().longValue() != suspectedId.longValue())
|
|
|
|
|
|
+ if (list.get(0).getSuspectedId().longValue() != suspectedId.longValue()) {
|
|
return 2L;
|
|
return 2L;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//判断是否出行
|
|
//判断是否出行
|
|
@@ -202,8 +215,9 @@ public class MsTripService {
|
|
if (unit != null) {
|
|
if (unit != null) {
|
|
if (unit.getUptownId() == 1238790987234L || unit.getUptownId() == 5 || unit.getUptownId() == 100000002L) {
|
|
if (unit.getUptownId() == 1238790987234L || unit.getUptownId() == 5 || unit.getUptownId() == 100000002L) {
|
|
Integer rezuitNum = msReportService.addReportLy(userCreate, isTrip, todayLocal, todayLocalOther);
|
|
Integer rezuitNum = msReportService.addReportLy(userCreate, isTrip, todayLocal, todayLocalOther);
|
|
- if (rezuitNum == 4)
|
|
|
|
|
|
+ if (rezuitNum == 4) {
|
|
return 4L;
|
|
return 4L;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -306,18 +320,21 @@ public class MsTripService {
|
|
@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
|
|
@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
|
|
public Integer addReportTest(Long userCreate, String reportDate) {
|
|
public Integer addReportTest(Long userCreate, String reportDate) {
|
|
List<MsReport> listReport = msReportMapper.selectByReportDate(reportDate, userCreate);
|
|
List<MsReport> listReport = msReportMapper.selectByReportDate(reportDate, userCreate);
|
|
- if (listReport == null || listReport.size() == 0)
|
|
|
|
|
|
+ if (listReport == null || listReport.size() == 0) {
|
|
return 0;
|
|
return 0;
|
|
|
|
+ }
|
|
|
|
|
|
//判断体温是否填写
|
|
//判断体温是否填写
|
|
List<MsSuspected> listSuspected = msSuspectedMapper.selectByReportId(Long.parseLong(listReport.get(0).getReportId().toString()));
|
|
List<MsSuspected> listSuspected = msSuspectedMapper.selectByReportId(Long.parseLong(listReport.get(0).getReportId().toString()));
|
|
- if (listSuspected == null || listSuspected.size() == 0)
|
|
|
|
|
|
+ if (listSuspected == null || listSuspected.size() == 0) {
|
|
return 3;
|
|
return 3;
|
|
|
|
+ }
|
|
else {
|
|
else {
|
|
for (MsSuspected msSuspected : listSuspected) {
|
|
for (MsSuspected msSuspected : listSuspected) {
|
|
//体温是否填写
|
|
//体温是否填写
|
|
- if (msSuspected.getTemperature().compareTo(new BigDecimal(0)) == 0)
|
|
|
|
|
|
+ if (msSuspected.getTemperature().compareTo(new BigDecimal(0)) == 0) {
|
|
return 2;
|
|
return 2;
|
|
|
|
+ }
|
|
|
|
|
|
//如果是凌云,判断出行是否填写异常
|
|
//如果是凌云,判断出行是否填写异常
|
|
UptownUnit unit = uptownUnitMapper.getUptownUnitByUser(userCreate);
|
|
UptownUnit unit = uptownUnitMapper.getUptownUnitByUser(userCreate);
|