|
@@ -58,8 +58,9 @@ public class MsTripService {
|
|
|
//首次进入。没有今日报告
|
|
|
DateTime data = DateTime.now();
|
|
|
if (listReport == null || listReport.size() == 0) {
|
|
|
+ reportId = IdWorker.getId();
|
|
|
MsReport msReport = new MsReport();
|
|
|
- msReport.setReportId(IdWorker.getId());
|
|
|
+ msReport.setReportId(reportId);
|
|
|
msReport.setHouseId(houseId);
|
|
|
msReport.setSafetyNum(0);
|
|
|
msReport.setSureNum(0);
|
|
@@ -76,19 +77,6 @@ public class MsTripService {
|
|
|
msReport.setLatitude(latitude);
|
|
|
msReport.setLongitude(longitude);
|
|
|
msReportMapper.insert(msReport);
|
|
|
- reportId = msReport.getReportId();
|
|
|
- // 记录打卡日志
|
|
|
- MsReportLog msReportLog = new MsReportLog();
|
|
|
- msReportLog.setLogId(IdWorker.getId());
|
|
|
- msReportLog.setReportId(msReport.getReportId());
|
|
|
- msReportLog.setUserId(userCreate);
|
|
|
- msReportLog.setReportDate(data.toDate());
|
|
|
- msReportLog.setLongitude(longitude);
|
|
|
- msReportLog.setLatitude(latitude);
|
|
|
- msReportLog.setCity(autoLocal);
|
|
|
- msReportLog.setAddr(autoAddr);
|
|
|
- msReportLog.setTimeCreate(data);
|
|
|
- msReportLogMapper.insert(msReportLog);
|
|
|
} else {
|
|
|
reportId = listReport.get(0).getReportId();
|
|
|
}
|
|
@@ -175,6 +163,19 @@ public class MsTripService {
|
|
|
msSuspected.setTimeUpdate(DateTime.now());
|
|
|
msSuspectedMapper.insert(msSuspected);
|
|
|
|
|
|
+ // 记录打卡日志
|
|
|
+ MsReportLog msReportLog = new MsReportLog();
|
|
|
+ msReportLog.setLogId(IdWorker.getId());
|
|
|
+ msReportLog.setReportId(reportId);
|
|
|
+ msReportLog.setUserId(userCreate);
|
|
|
+ msReportLog.setReportDate(data.toDate());
|
|
|
+ msReportLog.setLongitude(longitude);
|
|
|
+ msReportLog.setLatitude(latitude);
|
|
|
+ msReportLog.setCity(autoLocal);
|
|
|
+ msReportLog.setAddr(autoAddr);
|
|
|
+ msReportLog.setTimeCreate(data);
|
|
|
+ msReportLogMapper.insert(msReportLog);
|
|
|
+
|
|
|
//添加出行
|
|
|
if (todayLocal >= 0 && workLocal >= 0) {
|
|
|
MsTrip msTrip = new MsTrip();
|