Browse Source

Merge remote-tracking branch 'origin/develop' into release_temp

master
zxc 4 years ago
parent
commit
02f9318474
  1. 5
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmetuser/StatsStaffPatrolRecordDailyEntity.java
  2. 4
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java
  3. 8
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java
  4. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/user/result/StatsStaffPatrolRecordDailyDTO.java
  5. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java
  6. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/UserDao.java
  7. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/user/StatsStaffPatrolRecordDailyEntity.java
  8. 23
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/biz/impl/BizDataStatsServiceImpl.java
  9. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/UserService.java
  10. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/StatsStaffPatrolServiceImpl.java
  11. 13
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java
  12. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/StatsStaffPatrolRecordDailyDao.xml
  13. 10
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/UserDao.xml
  14. 8
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/BlockChainProjectController.java
  15. 3
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentRecordResultDTO.java
  16. 9
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java
  17. 2
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml
  18. 18
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/BlockChainUploadServiceImpl.java
  19. 2
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/PatrolRoutineWorkResult.java
  20. 5
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/StatsStaffPatrolRecordDailyEntity.java

5
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmetuser/StatsStaffPatrolRecordDailyEntity.java

@ -122,4 +122,9 @@ public class StatsStaffPatrolRecordDailyEntity extends BaseEpmetEntity {
*/ */
private String latestPatrolStatus; private String latestPatrolStatus;
/**
* 例行工作次数
*/
private Integer routineWorkCount;
} }

4
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java

@ -67,6 +67,10 @@ public class IndexController {
//area_code升级,新增此参数 //area_code升级,新增此参数
monthBarchartFormDTO.setCustomerId(customerId); monthBarchartFormDTO.setCustomerId(customerId);
ValidatorUtils.validateEntity(monthBarchartFormDTO, MonthBarchartFormDTO.MonthBarchart.class); ValidatorUtils.validateEntity(monthBarchartFormDTO, MonthBarchartFormDTO.MonthBarchart.class);
String monthId = monthBarchartFormDTO.getMonthId();
if ("202212".equals(monthId)){
monthBarchartFormDTO.setMonthId("202112");
}
return new Result<MonthBarchartResultDTO>().ok(indexService.monthBarchart(monthBarchartFormDTO)); return new Result<MonthBarchartResultDTO>().ok(indexService.monthBarchart(monthBarchartFormDTO));
} }

8
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java

@ -1,5 +1,6 @@
package com.epmet.datareport.service.evaluationindex.screen.impl; package com.epmet.datareport.service.evaluationindex.screen.impl;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.enums.CommonOperateTypeEnum; import com.epmet.commons.tools.enums.CommonOperateTypeEnum;
@ -12,6 +13,7 @@ import com.epmet.datareport.service.evaluationindex.screen.IndexService;
import com.epmet.evaluationindex.screen.constant.ScreenConstant; import com.epmet.evaluationindex.screen.constant.ScreenConstant;
import com.epmet.evaluationindex.screen.dto.form.*; import com.epmet.evaluationindex.screen.dto.form.*;
import com.epmet.evaluationindex.screen.dto.result.*; import com.epmet.evaluationindex.screen.dto.result.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -31,6 +33,7 @@ import java.util.stream.Collectors;
* @author yinzuomei@elink-cn.com * @author yinzuomei@elink-cn.com
* @date 2020/8/18 10:21 * @date 2020/8/18 10:21
*/ */
@Slf4j
@Service @Service
@DataSource(DataSourceConstant.EVALUATION_INDEX) @DataSource(DataSourceConstant.EVALUATION_INDEX)
public class IndexServiceImpl implements IndexService { public class IndexServiceImpl implements IndexService {
@ -118,6 +121,7 @@ public class IndexServiceImpl implements IndexService {
List<MonthBarchartResult> monthBarchartResults = screenIndexDataMonthlyDao.selectMonthBarchart(monthBarchartFormDTO.getAgencyId(), List<MonthBarchartResult> monthBarchartResults = screenIndexDataMonthlyDao.selectMonthBarchart(monthBarchartFormDTO.getAgencyId(),
monthBarchartFormDTO.getMonthId(), monthBarchartFormDTO.getMonthId(),
monthBarchartFormDTO.getCustomerId()); monthBarchartFormDTO.getCustomerId());
log.info("monthBarchart selectMonthBarchart return:{}", JSON.toJSONString(monthBarchartFormDTO));
if (monthBarchartResults.size() == NumConstant.ZERO){ if (monthBarchartResults.size() == NumConstant.ZERO){
for (int i = NumConstant.ZERO; i <= NumConstant.TWELVE; i++) { for (int i = NumConstant.ZERO; i <= NumConstant.TWELVE; i++) {
serviceAbilityData.add(NumConstant.ZERO_DOT_ZERO); serviceAbilityData.add(NumConstant.ZERO_DOT_ZERO);
@ -161,6 +165,7 @@ public class IndexServiceImpl implements IndexService {
}else{ }else{
_ymList=dateUtils.getXpro().keySet().stream().collect(Collectors.toList()); _ymList=dateUtils.getXpro().keySet().stream().collect(Collectors.toList());
} }
log.info("monthBarchart _ymList return:{}", _ymList);
//针对集合collect的游标 //针对集合collect的游标
int cursor = NumConstant.ZERO; int cursor = NumConstant.ZERO;
//针对X轴,数据集合不全则进行数据填充 //针对X轴,数据集合不全则进行数据填充
@ -178,6 +183,7 @@ public class IndexServiceImpl implements IndexService {
continue ; continue ;
} }
if(!StringUtils.equals(collect.get(cursor).getMonthId(),_ymList.get(i))){ if(!StringUtils.equals(collect.get(cursor).getMonthId(),_ymList.get(i))){
log.info("monthBarchart cursor not eq return:{}", _ymList.get(i));
//SET DEFAULT //SET DEFAULT
serviceAbilityData.add(NumConstant.ZERO_DOT_ZERO); serviceAbilityData.add(NumConstant.ZERO_DOT_ZERO);
partyDevAbilityData.add(NumConstant.ZERO_DOT_ZERO); partyDevAbilityData.add(NumConstant.ZERO_DOT_ZERO);
@ -194,6 +200,7 @@ public class IndexServiceImpl implements IndexService {
//保持cursor不变 //保持cursor不变
}else{ }else{
MonthBarchartResult data = collect.get(cursor); MonthBarchartResult data = collect.get(cursor);
log.info("monthBarchart collect.get return:{}", JSON.toJSONString(data));
//SET DATA //SET DATA
serviceAbilityData.add(null == data.getServiceAbility() ? NumConstant.ZERO_DOT_ZERO : data.getServiceAbility()); serviceAbilityData.add(null == data.getServiceAbility() ? NumConstant.ZERO_DOT_ZERO : data.getServiceAbility());
partyDevAbilityData.add(null == data.getPartyDevAbility() ? NumConstant.ZERO_DOT_ZERO : data.getPartyDevAbility()); partyDevAbilityData.add(null == data.getPartyDevAbility() ? NumConstant.ZERO_DOT_ZERO : data.getPartyDevAbility());
@ -233,6 +240,7 @@ public class IndexServiceImpl implements IndexService {
result.setServiceOriginScore(serviceOriginData); result.setServiceOriginScore(serviceOriginData);
result.setPartyOriginScore(partyOriginData); result.setPartyOriginScore(partyOriginData);
result.setGovernOriginScore(governOriginData); result.setGovernOriginScore(governOriginData);
log.info("monthBarchart final result:{}", JSON.toJSONString(result));
return result; return result;
} }

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/user/result/StatsStaffPatrolRecordDailyDTO.java

@ -124,6 +124,11 @@ public class StatsStaffPatrolRecordDailyDTO implements Serializable {
*/ */
private String latestPatrolStatus; private String latestPatrolStatus;
/**
* 例行工作次数
*/
private Integer routineWorkCount;
/** /**
* 删除标识 0.未删除 1.已删除 * 删除标识 0.未删除 1.已删除
*/ */

1
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java

@ -81,6 +81,7 @@ public interface ProjectConstant {
* 项目来源于 工作端立项 * 项目来源于 工作端立项
*/ */
String PROJECT_ORIGIN_AGENCY="agency"; String PROJECT_ORIGIN_AGENCY="agency";
String PROJECT_ORIGIN_EVENT="resi_event"; String PROJECT_ORIGIN_EVENT="resi_event";
/** /**
* 自办 * 自办

11
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/UserDao.java

@ -3,6 +3,7 @@ package com.epmet.dao.user;
import com.epmet.dto.extract.form.GridHeartedFormDTO; import com.epmet.dto.extract.form.GridHeartedFormDTO;
import com.epmet.dto.extract.form.StaffPatrolStatsFormDTO; import com.epmet.dto.extract.form.StaffPatrolStatsFormDTO;
import com.epmet.dto.extract.result.UserPartyResultDTO; import com.epmet.dto.extract.result.UserPartyResultDTO;
import com.epmet.dto.result.PatrolRoutineWorkResult;
import com.epmet.dto.screen.ScreenProjectDataDTO; import com.epmet.dto.screen.ScreenProjectDataDTO;
import com.epmet.dto.stats.form.GmUploadEventFormDTO; import com.epmet.dto.stats.form.GmUploadEventFormDTO;
import com.epmet.dto.user.form.StaffBaseInfoFormDTO; import com.epmet.dto.user.form.StaffBaseInfoFormDTO;
@ -42,7 +43,7 @@ public interface UserDao {
* @author zxc * @author zxc
* @date 2021/7/27 10:20 上午 * @date 2021/7/27 10:20 上午
*/ */
List<TotalAndIncrResultDTO> selectResiTotalAndIncrByGridIds(@Param("regOrPartiFlag") String regOrPartiFlag, @Param("gridIds") Set<String> gridIds, @Param("targetDate") Date targetDate,@Param("startDate")Date startDate); List<TotalAndIncrResultDTO> selectResiTotalAndIncrByGridIds(@Param("regOrPartiFlag") String regOrPartiFlag, @Param("gridIds") Set<String> gridIds, @Param("targetDate") Date targetDate, @Param("startDate") Date startDate);
/** /**
* @param * @param
@ -60,7 +61,7 @@ public interface UserDao {
* @author zxc * @author zxc
* @date 2021/7/27 5:08 下午 * @date 2021/7/27 5:08 下午
*/ */
List<PartyTotalAndIncrResultDTO> selectPartyTotalAndIncrNew(@Param("targetDate") Date targetDate,@Param("regOrPartiFlag") String regOrPartiFlag,@Param("startDate") Date startDate); List<PartyTotalAndIncrResultDTO> selectPartyTotalAndIncrNew(@Param("targetDate") Date targetDate, @Param("regOrPartiFlag") String regOrPartiFlag, @Param("startDate") Date startDate);
/** /**
* @param * @param
@ -81,7 +82,7 @@ public interface UserDao {
* @date 2021/7/27 1:31 下午 * @date 2021/7/27 1:31 下午
*/ */
List<WarmTotalAndIncrResultDTO> selectWarmTotalAndIncrByGrids(@Param("userIds") List<String> userIds, @Param("incrDailyUserIds") List<String> incrDailyUserIds, @Param("gridIds") Set<String> gridIds, List<WarmTotalAndIncrResultDTO> selectWarmTotalAndIncrByGrids(@Param("userIds") List<String> userIds, @Param("incrDailyUserIds") List<String> incrDailyUserIds, @Param("gridIds") Set<String> gridIds,
@Param("targetDate") Date targetDate,@Param("startDate") Date startDate,@Param("incrMonthlyUserIds") List<String> incrMonthlyUserIds); @Param("targetDate") Date targetDate, @Param("startDate") Date startDate, @Param("incrMonthlyUserIds") List<String> incrMonthlyUserIds);
/** /**
* @param * @param
@ -110,7 +111,7 @@ public interface UserDao {
* @date 2021/7/27 10:41 上午 * @date 2021/7/27 10:41 上午
*/ */
List<IncrAndTotalUserIdsResultDTO> selectIncrUserIdsByGrids(@Param("regOrPartiFlag") String regOrPartiFlag, @Param("gridIds") Set<String> gridIds, @Param("targetDate") Date targetDate, List<IncrAndTotalUserIdsResultDTO> selectIncrUserIdsByGrids(@Param("regOrPartiFlag") String regOrPartiFlag, @Param("gridIds") Set<String> gridIds, @Param("targetDate") Date targetDate,
@Param("startDate")Date startDate); @Param("startDate") Date startDate);
/** /**
* @Description 查询指定网格范围下单位时间内全部的注册用户Id新方法 * @Description 查询指定网格范围下单位时间内全部的注册用户Id新方法
@ -266,5 +267,7 @@ public interface UserDao {
List<MidPatrolDetailResult> getPatrolDetailList(MidPatrolFormDTO formDTO); List<MidPatrolDetailResult> getPatrolDetailList(MidPatrolFormDTO formDTO);
List<String> filterUserIds(@Param("userIds") List<String> userIds, @Param("roleKey") String roleKey); List<String> filterUserIds(@Param("userIds") List<String> userIds, @Param("roleKey") String roleKey);
List<PatrolRoutineWorkResult> selectRoutineWorkListByDateId(@Param("customerId") String customerId, @Param("dateId") String dateId);
} }

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/user/StatsStaffPatrolRecordDailyEntity.java

@ -123,5 +123,10 @@ public class StatsStaffPatrolRecordDailyEntity extends BaseEpmetEntity {
*/ */
private String latestPatrolStatus; private String latestPatrolStatus;
/**
* 例行工作次数
*/
private Integer routineWorkCount;
} }

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

@ -8,6 +8,7 @@ import com.epmet.constant.ProjectConstant;
import com.epmet.dto.ProjectDTO; import com.epmet.dto.ProjectDTO;
import com.epmet.dto.extract.form.BizDataFormDTO; import com.epmet.dto.extract.form.BizDataFormDTO;
import com.epmet.dto.extract.form.StaffPatrolStatsFormDTO; import com.epmet.dto.extract.form.StaffPatrolStatsFormDTO;
import com.epmet.dto.result.PatrolRoutineWorkResult;
import com.epmet.dto.user.result.CustomerGridStaffDTO; import com.epmet.dto.user.result.CustomerGridStaffDTO;
import com.epmet.dto.user.result.CustomerStaffDTO; import com.epmet.dto.user.result.CustomerStaffDTO;
import com.epmet.dto.user.result.StaffPatrolRecordResult; import com.epmet.dto.user.result.StaffPatrolRecordResult;
@ -128,12 +129,17 @@ public class BizDataStatsServiceImpl implements BizDataStatsService {
//获取昨日的立项项目数 //获取昨日的立项项目数
List<ProjectDTO> yesterdayProjectList = projectService.selectProjectListByDateId(formDTO.getCustomerId(), formDTO.getDateId(), ProjectConstant.PROJECT_ORIGIN_AGENCY); List<ProjectDTO> yesterdayProjectList = projectService.selectProjectListByDateId(formDTO.getCustomerId(), formDTO.getDateId(), ProjectConstant.PROJECT_ORIGIN_AGENCY);
//获取昨日的例行工作数据
List<PatrolRoutineWorkResult> yesterdayWorkList = userService.selectRoutineWorkListByDateId(formDTO.getCustomerId(), formDTO.getDateId());
//遍历网格员 设置其 巡查次数 巡查时常 上报项目数 //遍历网格员 设置其 巡查次数 巡查时常 上报项目数
yesterdayPatrolList.forEach(patrolRecord -> { yesterdayPatrolList.forEach(patrolRecord -> {
String key = patrolRecord.getGrid().concat(patrolRecord.getStaffId()); String key = patrolRecord.getGrid().concat(patrolRecord.getStaffId());
StatsStaffPatrolRecordDailyDTO patrolRecordDailyDTO = yesterdayStatsMap.get(key); StatsStaffPatrolRecordDailyDTO patrolRecordDailyDTO = yesterdayStatsMap.get(key);
if (patrolRecordDailyDTO != null) { if (patrolRecordDailyDTO == null) {
long total = (patrolRecord.getPatrolEndTime().getTime() - patrolRecord.getPatrolStartTime().getTime()) / 1000; return;
}
long total = (patrolRecord.getPatrolEndTime().getTime() - patrolRecord.getPatrolStartTime().getTime()) / NumConstant.ONE_THOUSAND;
if (patrolRecordDailyDTO.getTotalTime() == null) { if (patrolRecordDailyDTO.getTotalTime() == null) {
patrolRecordDailyDTO.setTotalTime(NumConstant.ZERO); patrolRecordDailyDTO.setTotalTime(NumConstant.ZERO);
} }
@ -147,7 +153,6 @@ public class BizDataStatsServiceImpl implements BizDataStatsService {
patrolRecordDailyDTO.setLatestPatrolTime(patrolRecord.getPatrolStartTime()); patrolRecordDailyDTO.setLatestPatrolTime(patrolRecord.getPatrolStartTime());
patrolRecordDailyDTO.setLatestPatrolStatus(patrolRecord.getStatus()); patrolRecordDailyDTO.setLatestPatrolStatus(patrolRecord.getStatus());
} }
}
}); });
//填充项目数 //填充项目数
yesterdayProjectList.forEach(projectDTO -> { yesterdayProjectList.forEach(projectDTO -> {
@ -164,10 +169,19 @@ public class BizDataStatsServiceImpl implements BizDataStatsService {
return; return;
} }
recordDailyDTO.setReportProjectCount(recordDailyDTO.getReportProjectCount() + 1); recordDailyDTO.setReportProjectCount(recordDailyDTO.getReportProjectCount() + NumConstant.ONE);
} }
}); });
}); });
yesterdayWorkList.forEach(work->{
String key = work.getGridId().concat(work.getUserId());
StatsStaffPatrolRecordDailyDTO patrolRecordDailyDTO = yesterdayStatsMap.get(key);
if (patrolRecordDailyDTO == null){
return;
}
patrolRecordDailyDTO.setRoutineWorkCount(patrolRecordDailyDTO.getRoutineWorkCount() + NumConstant.ONE);
});
Integer effectRow = statsStaffPatrolService.delAndInsertBatch(formDTO, insertList); Integer effectRow = statsStaffPatrolService.delAndInsertBatch(formDTO, insertList);
log.debug("initStaffPatrolStats insert rows:{}", effectRow); log.debug("initStaffPatrolStats insert rows:{}", effectRow);
@ -227,6 +241,7 @@ public class BizDataStatsServiceImpl implements BizDataStatsService {
record.setPatrolTotal(NumConstant.ZERO); record.setPatrolTotal(NumConstant.ZERO);
record.setLatestPatrolStatus("end"); record.setLatestPatrolStatus("end");
record.setReportProjectCount(NumConstant.ZERO); record.setReportProjectCount(NumConstant.ZERO);
record.setRoutineWorkCount(NumConstant.ZERO);
record.setSourceType("internal"); record.setSourceType("internal");
record.setSourceCustomerId(record.getCustomerId()); record.setSourceCustomerId(record.getCustomerId());

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/UserService.java

@ -4,6 +4,7 @@ import com.epmet.dto.AgencySubTreeDto;
import com.epmet.dto.extract.form.GridHeartedFormDTO; import com.epmet.dto.extract.form.GridHeartedFormDTO;
import com.epmet.dto.extract.form.StaffPatrolStatsFormDTO; import com.epmet.dto.extract.form.StaffPatrolStatsFormDTO;
import com.epmet.dto.org.result.OrgStaffDTO; import com.epmet.dto.org.result.OrgStaffDTO;
import com.epmet.dto.result.PatrolRoutineWorkResult;
import com.epmet.dto.screen.ScreenProjectDataDTO; import com.epmet.dto.screen.ScreenProjectDataDTO;
import com.epmet.dto.stats.form.GmUploadEventFormDTO; import com.epmet.dto.stats.form.GmUploadEventFormDTO;
import com.epmet.dto.stats.user.result.UserStatisticalData; import com.epmet.dto.stats.user.result.UserStatisticalData;
@ -148,4 +149,12 @@ public interface UserService {
List<MidPatrolDetailResult> getPatrolDetailList(MidPatrolFormDTO formDTO); List<MidPatrolDetailResult> getPatrolDetailList(MidPatrolFormDTO formDTO);
List<String> filterUserIds(List<String> userIds, String roleKey); List<String> filterUserIds(List<String> userIds, String roleKey);
/**
* desc:根据客户id和日期获取 例行工作数据
* @param customerId
* @param dateId
* @return
*/
List<PatrolRoutineWorkResult> selectRoutineWorkListByDateId(String customerId, String dateId);
} }

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

@ -13,6 +13,7 @@ import com.epmet.service.user.StatsStaffPatrolService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
@ -30,6 +31,7 @@ public class StatsStaffPatrolServiceImpl implements StatsStaffPatrolService {
@Autowired @Autowired
private StatsStaffPatrolRecordDailyDao statsStaffPatrolRecordDailyDao; private StatsStaffPatrolRecordDailyDao statsStaffPatrolRecordDailyDao;
@Transactional(rollbackFor = Exception.class)
@Override @Override
public Integer delAndInsertBatch(StaffPatrolStatsFormDTO formDTO, List<StatsStaffPatrolRecordDailyDTO> insertList) { public Integer delAndInsertBatch(StaffPatrolStatsFormDTO formDTO, List<StatsStaffPatrolRecordDailyDTO> insertList) {
int delete = statsStaffPatrolRecordDailyDao.deleteInternal(formDTO); int delete = statsStaffPatrolRecordDailyDao.deleteInternal(formDTO);

13
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java

@ -13,6 +13,7 @@ import com.epmet.dto.extract.form.GridHeartedFormDTO;
import com.epmet.dto.extract.form.StaffPatrolStatsFormDTO; import com.epmet.dto.extract.form.StaffPatrolStatsFormDTO;
import com.epmet.dto.extract.result.UserPartyResultDTO; import com.epmet.dto.extract.result.UserPartyResultDTO;
import com.epmet.dto.org.result.OrgStaffDTO; import com.epmet.dto.org.result.OrgStaffDTO;
import com.epmet.dto.result.PatrolRoutineWorkResult;
import com.epmet.dto.screen.ScreenProjectDataDTO; import com.epmet.dto.screen.ScreenProjectDataDTO;
import com.epmet.dto.stats.form.GmUploadEventFormDTO; import com.epmet.dto.stats.form.GmUploadEventFormDTO;
import com.epmet.dto.stats.user.*; import com.epmet.dto.stats.user.*;
@ -1113,4 +1114,16 @@ public class UserServiceImpl implements UserService {
public List<String> filterUserIds(List<String> userIds, String roleKey) { public List<String> filterUserIds(List<String> userIds, String roleKey) {
return userDao.filterUserIds(userIds, roleKey); return userDao.filterUserIds(userIds, roleKey);
} }
/**
* desc:根据客户id和日期获取 例行工作数据
*
* @param customerId
* @param dateId
* @return
*/
@Override
public List<PatrolRoutineWorkResult> selectRoutineWorkListByDateId(String customerId, String dateId) {
return userDao.selectRoutineWorkListByDateId(customerId, dateId);
}
} }

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

@ -23,6 +23,7 @@
REPORT_PROJECT_COUNT, REPORT_PROJECT_COUNT,
LATEST_PATROL_TIME, LATEST_PATROL_TIME,
LATEST_PATROL_STATUS, LATEST_PATROL_STATUS,
ROUTINE_WORK_COUNT,
DEL_FLAG, DEL_FLAG,
REVISION, REVISION,
CREATED_BY, CREATED_BY,
@ -50,6 +51,7 @@
#{item.reportProjectCount}, #{item.reportProjectCount},
#{item.latestPatrolTime}, #{item.latestPatrolTime},
#{item.latestPatrolStatus}, #{item.latestPatrolStatus},
#{item.routineWorkCount},
'0', '0',
0, 0,
'APP_USER', 'APP_USER',

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

@ -620,7 +620,7 @@
</select> </select>
<select id="selectStaffPatrolListByDateId" resultType="com.epmet.dto.user.result.StaffPatrolRecordResult"> <select id="selectStaffPatrolListByDateId" resultType="com.epmet.dto.user.result.StaffPatrolRecordResult">
SELECT SELECT
r.* r.ID, CUSTOMER_ID, GRID, GRID_PIDS, STAFF_ID, AGENCY_ID, PATROL_START_TIME, PATROL_END_TIME, ACTRUAL_END_TIME, TOTAL_TIME, STATUS, IS_HAND_END, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME
FROM FROM
staff_patrol_record r staff_patrol_record r
WHERE WHERE
@ -1065,5 +1065,13 @@
</foreach> </foreach>
and er.ROLE_KEY = #{roleKey} and er.ROLE_KEY = #{roleKey}
</select> </select>
<select id="selectRoutineWorkListByDateId" resultType="com.epmet.dto.result.PatrolRoutineWorkResult">
SELECT id, GRID_ID,USER_ID FROM patrol_routine_work
WHERE
DATE_FORMAT( CREATED_TIME, '%Y%m%d' ) = #{dateId}
AND DEL_FLAG = '0'
AND CUSTOMER_ID = #{customerId}
</select>
</mapper> </mapper>

8
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/BlockChainProjectController.java

@ -28,8 +28,8 @@ public class BlockChainProjectController {
*/ */
@PostMapping("create") @PostMapping("create")
public Result blockChainCreateProject(@RequestBody BlockChainCreateProjectFormDTO input) { public Result blockChainCreateProject(@RequestBody BlockChainCreateProjectFormDTO input) {
//ValidatorUtils.validateEntity(input); ValidatorUtils.validateEntity(input);
//blockChainProjectService.blockChainCreateProject(input); blockChainProjectService.blockChainCreateProject(input);
return new Result(); return new Result();
} }
@ -40,8 +40,8 @@ public class BlockChainProjectController {
*/ */
@PostMapping("process") @PostMapping("process")
public Result blockChainProcessProject(@RequestBody BlockChainProcessProjectFormDTO input) { public Result blockChainProcessProject(@RequestBody BlockChainProcessProjectFormDTO input) {
//ValidatorUtils.validateEntity(input); ValidatorUtils.validateEntity(input);
//blockChainProjectService.blockChainProcessProject(input); blockChainProjectService.blockChainProcessProject(input);
return new Result(); return new Result();
} }
} }

3
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentRecordResultDTO.java

@ -40,6 +40,8 @@ public class AppointmentRecordResultDTO implements Serializable {
*/ */
private String remark; private String remark;
private Boolean isCancel;
private String recordId; private String recordId;
private String centerName; private String centerName;
private String address; private String address;
@ -65,5 +67,6 @@ public class AppointmentRecordResultDTO implements Serializable {
this.appointmentTime = new ArrayList<>(); this.appointmentTime = new ArrayList<>();
this.recordId = ""; this.recordId = "";
this.appointmentDate = ""; this.appointmentDate = "";
this.isCancel = true;
} }
} }

9
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java

@ -35,6 +35,7 @@ import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.PartyServiceCenterConstant; import com.epmet.constant.PartyServiceCenterConstant;
import com.epmet.dao.IcMatterAppointmentRecordDao; import com.epmet.dao.IcMatterAppointmentRecordDao;
@ -487,6 +488,10 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl<IcPartyServ
List<String> list = Arrays.asList(r.getTimeId().split(",")); List<String> list = Arrays.asList(r.getTimeId().split(","));
list.forEach(l -> timeList.stream().filter( t -> l.equals(t.getTimeId())).forEach(t -> time.add(t.getTime()))); list.forEach(l -> timeList.stream().filter( t -> l.equals(t.getTimeId())).forEach(t -> time.add(t.getTime())));
r.setAppointmentTime(time); r.setAppointmentTime(time);
String endTime = time.get(time.size() - NumConstant.ONE).substring(6, 11);
if (LocalDateTime.now().isBefore(LocalDateTime.parse(r.getAppointmentDate() + "T" + endTime))){
r.setIsCancel(false);
}
}); });
return result; return result;
} }
@ -545,6 +550,10 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl<IcPartyServ
List<String> list = Arrays.asList(r.getTimeId().split(",")); List<String> list = Arrays.asList(r.getTimeId().split(","));
list.forEach(l -> timeList.stream().filter( t -> l.equals(t.getTimeId())).forEach(t -> time.add(t.getTime()))); list.forEach(l -> timeList.stream().filter( t -> l.equals(t.getTimeId())).forEach(t -> time.add(t.getTime())));
r.setAppointmentTime(time); r.setAppointmentTime(time);
String endTime = time.get(time.size() - NumConstant.ONE).substring(6, 11);
if (LocalDateTime.now().isBefore(LocalDateTime.parse(r.getAppointmentDate() + "T" + endTime))){
r.setIsCancel(false);
}
} }
}); });
}); });

2
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml

@ -18,6 +18,7 @@
SELECT SELECT
ar.APPOINTMENT_NAME, ar.APPOINTMENT_NAME,
ar.APPOINTMENT_PHONE, ar.APPOINTMENT_PHONE,
ar.APPOINTMENT_Date,
ar.REMARK, ar.REMARK,
ar.TIME_ID, ar.TIME_ID,
cm.MATTER_NAME, cm.MATTER_NAME,
@ -67,5 +68,6 @@
AND ar.ORG_ID = #{orgId} AND ar.ORG_ID = #{orgId}
AND ar.CREATED_BY = #{userId} AND ar.CREATED_BY = #{userId}
AND ar.`STATUS` = 'appointing' AND ar.`STATUS` = 'appointing'
ORDER BY ar.APPOINTMENT_DATE
</select> </select>
</mapper> </mapper>

18
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/BlockChainUploadServiceImpl.java

@ -1,6 +1,7 @@
package com.epmet.service.impl; package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.ProjectStaffDao; import com.epmet.dao.ProjectStaffDao;
import com.epmet.dto.form.*; import com.epmet.dto.form.*;
import com.epmet.entity.ProjectEntity; import com.epmet.entity.ProjectEntity;
@ -8,6 +9,7 @@ import com.epmet.entity.ProjectProcessEntity;
import com.epmet.entity.ProjectStaffEntity; import com.epmet.entity.ProjectStaffEntity;
import com.epmet.feign.EpmetThirdOpenFeignClient; import com.epmet.feign.EpmetThirdOpenFeignClient;
import com.epmet.service.BlockChainUploadService; import com.epmet.service.BlockChainUploadService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -21,6 +23,7 @@ import java.util.stream.Collectors;
* 区块链上链service实现 * 区块链上链service实现
*/ */
@Service @Service
@Slf4j
public class BlockChainUploadServiceImpl implements BlockChainUploadService { public class BlockChainUploadServiceImpl implements BlockChainUploadService {
@Autowired @Autowired
@ -37,10 +40,6 @@ public class BlockChainUploadServiceImpl implements BlockChainUploadService {
@Override @Override
public void send2BlockChain(ProjectEntity projectEntity, ProjectProcessEntity processEntity, List<ProjectStaffEntity> assignedStaffEntities, String projectStaffId) { public void send2BlockChain(ProjectEntity projectEntity, ProjectProcessEntity processEntity, List<ProjectStaffEntity> assignedStaffEntities, String projectStaffId) {
if (true) {
return;
}
// 1.项目主信息 // 1.项目主信息
BlockChainProjectFormDTO project = null; BlockChainProjectFormDTO project = null;
@ -133,20 +132,27 @@ public class BlockChainUploadServiceImpl implements BlockChainUploadService {
handledStaff.setProjectId(handledStaffEntity.getProjectId()); handledStaff.setProjectId(handledStaffEntity.getProjectId());
} }
Result result;
if (project == null) { if (project == null) {
// 处理 // 处理
BlockChainProcessProjectFormDTO processForm = new BlockChainProcessProjectFormDTO(); BlockChainProcessProjectFormDTO processForm = new BlockChainProcessProjectFormDTO();
processForm.setProcess(process); processForm.setProcess(process);
processForm.setAssignedStaffs(assignedStaffs); processForm.setAssignedStaffs(assignedStaffs);
processForm.setHandledStaff(handledStaff); processForm.setHandledStaff(handledStaff);
thirdOpenFeignClient.blockChainProcessProject(processForm); result = thirdOpenFeignClient.blockChainProcessProject(processForm);
} else { } else {
// 立项 // 立项
BlockChainCreateProjectFormDTO createForm = new BlockChainCreateProjectFormDTO(); BlockChainCreateProjectFormDTO createForm = new BlockChainCreateProjectFormDTO();
createForm.setProject(project); createForm.setProject(project);
createForm.setProcess(process); createForm.setProcess(process);
createForm.setAssignedStaffs(assignedStaffs); createForm.setAssignedStaffs(assignedStaffs);
thirdOpenFeignClient.blockChainCreateProject(createForm); result = thirdOpenFeignClient.blockChainCreateProject(createForm);
}
if (result == null || !result.success()) {
log.error("项目处理信息,上链失败");
} else {
log.info("项目处理信息,上链成功");
} }
} }
} }

2
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/PatrolRoutineWorkResult.java

@ -25,6 +25,8 @@ public class PatrolRoutineWorkResult implements Serializable {
private String title; private String title;
private String userId;
/** /**
* 一级工作类型 code * 一级工作类型 code
*/ */

5
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/StatsStaffPatrolRecordDailyEntity.java

@ -123,5 +123,10 @@ public class StatsStaffPatrolRecordDailyEntity extends BaseEpmetEntity {
*/ */
private String latestPatrolStatus; private String latestPatrolStatus;
/**
* 例行工作次数
*/
private Integer routineWorkCount;
} }

Loading…
Cancel
Save