Browse Source

初始化数据代码

master
jianjun 4 years ago
parent
commit
05b972456d
  1. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/biz/impl/BizDataStatsServiceImpl.java
  2. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/StatsStaffPatrolServiceImpl.java
  3. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/UserDao.xml

1
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/biz/impl/BizDataStatsServiceImpl.java

@ -68,6 +68,7 @@ public class BizDataStatsServiceImpl implements BizDataStatsService {
gridStaff.setTotalTime(NumConstant.ZERO); gridStaff.setTotalTime(NumConstant.ZERO);
gridStaff.setPatrolTotal(NumConstant.ZERO); gridStaff.setPatrolTotal(NumConstant.ZERO);
gridStaff.setLatestPatrolStatus("end"); gridStaff.setLatestPatrolStatus("end");
gridStaff.setReportProjectCount(NumConstant.ZERO);
//最后巡查时间 //最后巡查时间
gridStaff.setLatestPatrolTime(null); gridStaff.setLatestPatrolTime(null);
if (recordDailyDTO != null) { if (recordDailyDTO != null) {

1
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/StatsStaffPatrolServiceImpl.java

@ -26,7 +26,6 @@ public class StatsStaffPatrolServiceImpl implements StatsStaffPatrolService {
@Override @Override
public Integer insertBatch(List<StatsStaffPatrolRecordDailyDTO> insertList) { public Integer insertBatch(List<StatsStaffPatrolRecordDailyDTO> insertList) {
System.out.println("=====:"+JSON.toJSONString(insertList));
return statsStaffPatrolRecordDailyDao.insertBatch(insertList); return statsStaffPatrolRecordDailyDao.insertBatch(insertList);
} }
} }

2
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/UserDao.xml

@ -591,7 +591,7 @@
t.PATROL_START_TIME latestPatrolTime, t.PATROL_START_TIME latestPatrolTime,
t.STATUS latestPatrolStatus t.STATUS latestPatrolStatus
FROM FROM
( SELECT GRID, STAFF_ID, max( CREATED_TIME ) AS CREATED_TIME FROM staff_patrol_record GROUP BY GRID, STAFF_ID ) a ( SELECT DEL_FLAG,CUSTOMER_ID,GRID, STAFF_ID, max( CREATED_TIME ) AS CREATED_TIME FROM staff_patrol_record GROUP BY GRID, STAFF_ID ) a
LEFT JOIN staff_patrol_record t ON t.GRID = a.GRID LEFT JOIN staff_patrol_record t ON t.GRID = a.GRID
AND t.STAFF_ID = a.STAFF_ID AND t.STAFF_ID = a.STAFF_ID
AND t.CREATED_TIME = a.CREATED_TIME AND t.CREATED_TIME = a.CREATED_TIME

Loading…
Cancel
Save