Browse Source

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

master
yinzuomei 4 years ago
parent
commit
c66b86fde7
  1. 29
      epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.6__add_dict_data.sql
  2. 26
      epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/service/BaseService.java
  3. 55
      epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/service/impl/BaseServiceImpl.java
  4. 3
      epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/DisputeProcessMQMsg.java
  5. 3
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/EventInfoFormDTO.java
  6. 2
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/result/EventInfoResultDTO.java
  7. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectDataDao.java
  8. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/mq/ProjectChangedCustomListener.java
  9. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectDataService.java
  10. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java
  11. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java
  12. 12
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml
  13. 22
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/CancelAppointmentFormDTO.java
  14. 3
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AppointmentRecordResultDTO.java
  15. 13
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java
  16. 8
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java
  17. 19
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java
  18. 3
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcMatterAppointmentRecordDao.xml
  19. 15
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseDisputeProcessServiceImpl.java
  20. 2
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/ExDeptServiceImpl.java

29
epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.6__add_dict_data.sql

@ -0,0 +1,29 @@
-- 1、增加字典类型
INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (8, 'user_demand_status', '居民需求状态', '待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished', 8, 1067246875800000001, '2021-11-18 16:29:58', 1067246875800000001, '2021-11-18 16:29:58');
INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (9, 'user_demand_report_type', '居民需求上报类型', '社区帮办:community;楼长帮办:building_caption;党员帮办:party;自身上报:self_help', 9, 1067246875800000001, '2021-11-18 16:29:58', 1067246875800000001, '2021-11-18 16:29:58');
INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (10, 'user_demand_service_type', '居民需求服务方类型', '服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit;', 10, 1067246875800000001, '2021-11-18 16:29:58', 1067246875800000001, '2021-11-18 16:29:58');
INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000006, 'scale', '人员规模', '', 6, 1067246875800000001, '2021-11-18 16:29:58', 1067246875800000001, '2021-11-18 16:29:58');
INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000007, 'party_unit_type', '联建单位分类', '', 7, 1067246875800000001, '2021-11-18 16:29:58', 1067246875800000001, '2021-11-18 16:29:58');
-- 2、增加字典数据
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000200, 1000000000000000007, '楼宇党建', '0', '', 0, 1067246875800000001, '2020-03-08 16:29:58', 1067246875800000001, '2020-03-08 16:29:58');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000201, 1000000000000000007, '两新组织', '1', '', 1, 1067246875800000001, '2020-03-08 16:29:58', 1067246875800000001, '2020-03-08 16:29:58');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000202, 1000000000000000007, '区域单位党建', '2', '', 2, 1067246875800000001, '2020-03-08 16:29:58', 1067246875800000001, '2020-03-08 16:29:58');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000203, 1000000000000000007, '机关直属部门', '3', '', 3, 1067246875800000001, '2020-03-08 16:29:58', 1067246875800000001, '2020-03-08 16:29:58');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000204, 1000000000000000007, '其他', '4', '', 4, 1067246875800000001, '2020-03-08 16:29:58', 1067246875800000001, '2020-03-08 16:29:58');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000205, 8, '待处理', 'pending', '', 1, 1, '2021-11-23 14:00:59', 1, '2021-11-23 14:00:59');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000206, 8, '已取消', 'canceled', '', 2, 1, '2021-11-23 14:00:59', 1, '2021-11-23 14:00:59');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000207, 8, '已派单', 'assigned', '', 3, 1, '2021-11-23 14:00:59', 1, '2021-11-23 14:00:59');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000208, 8, '已接单', 'have_order', '', 4, 1, '2021-11-23 14:00:59', 1, '2021-11-23 14:00:59');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000209, 8, '已完成', 'finished', '', 5, 1, '2021-11-23 14:00:59', 1, '2021-11-23 14:00:59');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000210, 9, '社区帮办', 'community', '', 1, 1, '2021-11-23 14:03:22', 1, '2021-11-23 14:03:22');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000211, 9, '楼长帮办', 'building_caption', '', 2, 1, '2021-11-23 14:03:22', 1, '2021-11-23 14:03:22');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000212, 9, '党员帮办', 'party', '', 3, 1, '2021-11-23 14:03:22', 1, '2021-11-23 14:03:22');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000213, 10, '志愿者', 'volunteer', '', 1, 1, '2021-11-23 14:04:42', 1, '2021-11-23 14:04:42');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000214, 10, '社会组织', 'social_org', '', 2, 1, '2021-11-23 14:04:42', 1, '2021-11-23 14:04:42');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000215, 10, '社区自组织', 'community_org', '', 3, 1, '2021-11-23 14:04:42', 1, '2021-11-23 14:04:42');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000216, 10, '区域党建单位', 'party_unit', '', 4, 1, '2021-11-23 14:04:42', 1, '2021-11-23 14:04:42');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (2000000000000000000, 1000000000000000006, '10人以下', '0', '', 0, 1067246875800000001, '2021-11-18 16:29:58', 1067246875800000001, '2021-11-18 16:29:58');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (2000000000000000001, 1000000000000000006, '10-20人', '1', '', 1, 1067246875800000001, '2021-11-18 16:29:58', 1067246875800000001, '2021-11-18 16:29:58');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (2000000000000000002, 1000000000000000006, '21-40人', '2', '', 2, 1067246875800000001, '2021-11-18 16:29:58', 1067246875800000001, '2021-11-18 16:29:58');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (2000000000000000003, 1000000000000000006, '41-100人', '3', '', 3, 1067246875800000001, '2021-11-18 16:29:58', 1067246875800000001, '2021-11-18 16:29:58');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (2000000000000000004, 1000000000000000006, '100人以上', '4', '', 4, 1067246875800000001, '2021-11-18 16:29:58', 1067246875800000001, '2021-11-18 16:29:58');

26
epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/service/BaseService.java

@ -123,5 +123,31 @@ public interface BaseService<T> {
*/ */
boolean deleteBatchIds(Collection<? extends Serializable> idList); boolean deleteBatchIds(Collection<? extends Serializable> idList);
/**
* <p>
* 存在更新记录否插入一条记录
* </p>
*
* @param entity 实体对象
*/
boolean saveOrUpdate(T entity);
/**
* <p>
* 批量修改插入
* </p>
*
* @param entityList 实体对象集合
*/
boolean saveOrUpdateBatch(Collection<T> entityList);
/**
* <p>
* 批量修改插入
* </p>
*
* @param entityList 实体对象集合
* @param batchSize 更新批次数量
*/
boolean saveOrUpdateBatch(Collection<T> entityList, int batchSize);
} }

55
epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/service/impl/BaseServiceImpl.java

@ -13,6 +13,8 @@ import com.baomidou.mybatisplus.core.enums.SqlMethod;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.OrderItem; import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.baomidou.mybatisplus.core.metadata.TableInfo;
import com.baomidou.mybatisplus.core.metadata.TableInfoHelper;
import com.baomidou.mybatisplus.core.toolkit.*; import com.baomidou.mybatisplus.core.toolkit.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.toolkit.SqlHelper; import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
@ -31,6 +33,7 @@ import java.io.Serializable;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects;
/** /**
* 基础服务类所有Service都要继承 * 基础服务类所有Service都要继承
@ -298,4 +301,56 @@ public abstract class BaseServiceImpl<M extends BaseMapper<T>, T> implements Bas
public boolean deleteBatchIds(Collection<? extends Serializable> idList) { public boolean deleteBatchIds(Collection<? extends Serializable> idList) {
return SqlHelper.delBool(baseDao.deleteBatchIds(idList)); return SqlHelper.delBool(baseDao.deleteBatchIds(idList));
} }
@Transactional(rollbackFor = Exception.class)
@Override
public boolean saveOrUpdate(T entity) {
if (null != entity) {
Class<?> cls = entity.getClass();
TableInfo tableInfo = TableInfoHelper.getTableInfo(cls);
Assert.notNull(tableInfo, "error: can not execute. because can not find cache of TableInfo for entity!");
String keyProperty = tableInfo.getKeyProperty();
Assert.notEmpty(keyProperty, "error: can not execute. because can not find column for id from entity!");
Object idVal = ReflectionKit.getMethodValue(cls, entity, tableInfo.getKeyProperty());
return StringUtils.checkValNull(idVal) || Objects.isNull(selectById((Serializable) idVal)) ? insert(entity) : updateById(entity);
}
return false;
}
@Transactional(rollbackFor = Exception.class)
@Override
public boolean saveOrUpdateBatch(Collection<T> entityList) {
return saveOrUpdateBatch(entityList, 100);
}
@Transactional(rollbackFor = Exception.class)
@Override
public boolean saveOrUpdateBatch(Collection<T> entityList, int batchSize) {
Assert.notEmpty(entityList, "error: entityList must not be empty");
Class<?> cls = currentModelClass();
TableInfo tableInfo = TableInfoHelper.getTableInfo(cls);
Assert.notNull(tableInfo, "error: can not execute. because can not find cache of TableInfo for entity!");
String keyProperty = tableInfo.getKeyProperty();
Assert.notEmpty(keyProperty, "error: can not execute. because can not find column for id from entity!");
try (SqlSession batchSqlSession = sqlSessionBatch()) {
int i = 0;
for (T entity : entityList) {
Object idVal = ReflectionKit.getMethodValue(cls, entity, keyProperty);
if (StringUtils.checkValNull(idVal) || Objects.isNull(selectById((Serializable) idVal))) {
batchSqlSession.insert(sqlStatement(SqlMethod.INSERT_ONE), entity);
} else {
MapperMethod.ParamMap<T> param = new MapperMethod.ParamMap<>();
param.put(Constants.ENTITY, entity);
batchSqlSession.update(sqlStatement(SqlMethod.UPDATE_BY_ID), param);
}
// 不知道以后会不会有人说更新失败了还要执行插入 😂😂😂
if (i >= 1 && i % batchSize == 0) {
batchSqlSession.flushStatements();
}
i++;
}
batchSqlSession.flushStatements();
}
return true;
}
} }

3
epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/DisputeProcessMQMsg.java

@ -4,6 +4,7 @@ import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.List;
/** /**
* @Description * @Description
@ -14,7 +15,7 @@ import java.io.Serializable;
@AllArgsConstructor @AllArgsConstructor
public class DisputeProcessMQMsg implements Serializable { public class DisputeProcessMQMsg implements Serializable {
private String customerId; private String customerId;
private String projectId; private List<String> projectId;
/** /**
* 操作类型新增:add 修改删除:edit * 操作类型新增:add 修改删除:edit
*/ */

3
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/EventInfoFormDTO.java

@ -4,6 +4,7 @@ import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.List;
/** /**
* @Description * @Description
@ -14,7 +15,7 @@ import java.io.Serializable;
public class EventInfoFormDTO extends PageFormDTO implements Serializable { public class EventInfoFormDTO extends PageFormDTO implements Serializable {
private static final long serialVersionUID = 8479649048108914555L; private static final long serialVersionUID = 8479649048108914555L;
private String customerId; private String customerId;
private String projectId; private List<String> projectId;
/** /**
* 操作类型新增:add 修改删除:edit * 操作类型新增:add 修改删除:edit
*/ */

2
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/result/EventInfoResultDTO.java

@ -24,7 +24,7 @@ public class EventInfoResultDTO implements Serializable {
*/ */
private String customerId; private String customerId;
private Integer detpId; private String orgId;
private String reporterId; private String reporterId;

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectDataDao.java

@ -68,7 +68,7 @@ public interface ScreenProjectDataDao extends BaseDao<ScreenProjectDataEntity> {
int updateProjectSatisfactionScore(@Param("projectId")String projectId, @Param("score")BigDecimal score); int updateProjectSatisfactionScore(@Param("projectId")String projectId, @Param("score")BigDecimal score);
List<ScreenProjectDataDTO> selectProjectList(@Param("customerId") String customerId, @Param("projectId") String projectId); List<ScreenProjectDataDTO> selectProjectList(@Param("customerId") String customerId, @Param("projectIds") List<String> projectIds);
/** /**
* @Description 查询网格下的项目分类 * @Description 查询网格下的项目分类

7
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/mq/ProjectChangedCustomListener.java

@ -27,6 +27,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import javax.annotation.PreDestroy; import javax.annotation.PreDestroy;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
@ -154,14 +155,18 @@ public class ProjectChangedCustomListener implements MessageListenerConcurrently
logger.info("consumer projectChanged msg success,{}",aBoolean); logger.info("consumer projectChanged msg success,{}",aBoolean);
//发送项目数据上报的mq消息 //发送项目数据上报的mq消息
if ("issue_shift_project".equals(msgObj.getOperation()) || "created".equals(msgObj.getOperation()) || "close".equals(msgObj.getOperation())) {
String type; String type;
if ("issue_shift_project".equals(msgObj.getOperation()) || "created".equals(msgObj.getOperation())) { if ("issue_shift_project".equals(msgObj.getOperation()) || "created".equals(msgObj.getOperation())) {
type = SystemMessageType.PROJECT_ADD; type = SystemMessageType.PROJECT_ADD;
} else { } else {
type = SystemMessageType.PROJECT_EDIT; type = SystemMessageType.PROJECT_EDIT;
} }
DisputeProcessMQMsg msg = new DisputeProcessMQMsg(customerId, msgObj.getProjectId(), type); List<String> projectList = new ArrayList<>();
projectList.add(msgObj.getProjectId());
DisputeProcessMQMsg msg = new DisputeProcessMQMsg(customerId, projectList, type);
SpringContextUtils.getBean(ScreenProjectDataService.class).sendProjectChangeMq(msg); SpringContextUtils.getBean(ScreenProjectDataService.class).sendProjectChangeMq(msg);
}
} catch (RenException e) { } catch (RenException e) {
// 如果是我们手动抛出的异常,说明在业务可控范围内。目前不需要MQ重试 // 如果是我们手动抛出的异常,说明在业务可控范围内。目前不需要MQ重试
logger.error("【RocketMQ】消费项目变动消息失败:",e); logger.error("【RocketMQ】消费项目变动消息失败:",e);

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectDataService.java

@ -137,7 +137,7 @@ public interface ScreenProjectDataService extends BaseService<ScreenProjectDataE
* @Author zhaoqifeng * @Author zhaoqifeng
* @Date 2021/10/15 14:22 * @Date 2021/10/15 14:22
*/ */
List<ScreenProjectDataDTO> getProjectList(String customerId, String projectId, Integer pageNo, Integer pageSize); List<ScreenProjectDataDTO> getProjectList(String customerId, List<String> projectId, Integer pageNo, Integer pageSize);
/** /**
* 项目变更MQ * 项目变更MQ

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java

@ -48,12 +48,12 @@ import com.epmet.service.evaluationindex.screen.ScreenProjectDataService;
import com.epmet.service.stats.CustomerProjectCategoryDictService; import com.epmet.service.stats.CustomerProjectCategoryDictService;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.ListUtils; import org.apache.commons.collections4.ListUtils;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal; import java.math.BigDecimal;
@ -298,7 +298,7 @@ public class ScreenProjectDataServiceImpl extends BaseServiceImpl<ScreenProjectD
* @Date 2021/10/15 14:22 * @Date 2021/10/15 14:22
*/ */
@Override @Override
public List<ScreenProjectDataDTO> getProjectList(String customerId, String projectId, Integer pageNo, Integer pageSize) { public List<ScreenProjectDataDTO> getProjectList(String customerId, List<String> projectId, Integer pageNo, Integer pageSize) {
PageHelper.startPage(pageNo, pageSize); PageHelper.startPage(pageNo, pageSize);
return baseDao.selectProjectList(customerId, projectId); return baseDao.selectProjectList(customerId, projectId);
} }

6
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java

@ -164,15 +164,17 @@ public class DataReportingServiceImpl implements DataReportingService {
} }
Map<String, CustomerProjectCategoryDictEntity> codeMap = customerProjectCategoryDictService.getByCategoryCodeMap(formDTO.getCustomerId());; Map<String, CustomerProjectCategoryDictEntity> codeMap = customerProjectCategoryDictService.getByCategoryCodeMap(formDTO.getCustomerId());;
//项目ID不为空时,因为只有一条,可以直接处理 //项目ID不为空时,因为只有一条,可以直接处理
if (StringUtils.isNotEmpty(formDTO.getProjectId())) { if (CollectionUtils.isNotEmpty(formDTO.getProjectId())) {
list = projectList.stream().map(project -> { list = projectList.stream().map(project -> {
EventInfoResultDTO dto = getEventInfoResultDTO(project, epmetCodeMap, codeMap); EventInfoResultDTO dto = getEventInfoResultDTO(project, epmetCodeMap, codeMap);
if (OrgTypeConstant.AGENCY.equals(project.getOrgType())) { if (OrgTypeConstant.AGENCY.equals(project.getOrgType())) {
ScreenCustomerAgencyEntity agency = screenCustomerAgencyService.getAgencyById(project.getOrgId()); ScreenCustomerAgencyEntity agency = screenCustomerAgencyService.getAgencyById(project.getOrgId());
dto.setOrgId(project.getOrgId());
dto.setOrgCode(agency.getCode()); dto.setOrgCode(agency.getCode());
dto.setOrgName(agency.getAgencyName()); dto.setOrgName(agency.getAgencyName());
} else { } else {
ScreenCustomerGridDTO grid = screenCustomerGridService.getGridById(project.getOrgId()); ScreenCustomerGridDTO grid = screenCustomerGridService.getGridById(project.getOrgId());
dto.setOrgId(project.getOrgId());
dto.setOrgCode(grid.getCode()); dto.setOrgCode(grid.getCode());
dto.setOrgName(grid.getGridName()); dto.setOrgName(grid.getGridName());
} }
@ -186,10 +188,12 @@ public class DataReportingServiceImpl implements DataReportingService {
EventInfoResultDTO dto = getEventInfoResultDTO(project, epmetCodeMap, codeMap); EventInfoResultDTO dto = getEventInfoResultDTO(project, epmetCodeMap, codeMap);
if (OrgTypeConstant.AGENCY.equals(project.getOrgType())) { if (OrgTypeConstant.AGENCY.equals(project.getOrgType())) {
ScreenCustomerAgencyEntity agency = agencyMap.get(project.getOrgId()); ScreenCustomerAgencyEntity agency = agencyMap.get(project.getOrgId());
dto.setOrgId(project.getOrgId());
dto.setOrgCode(agency.getCode()); dto.setOrgCode(agency.getCode());
dto.setOrgName(agency.getAgencyName()); dto.setOrgName(agency.getAgencyName());
} else { } else {
ScreenCustomerGridDTO grid = gridMap.get(project.getOrgId()); ScreenCustomerGridDTO grid = gridMap.get(project.getOrgId());
dto.setOrgId(project.getOrgId());
dto.setOrgCode(grid.getCode()); dto.setOrgCode(grid.getCode());
dto.setOrgName(grid.getGridName()); dto.setOrgName(grid.getGridName());
} }

12
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml

@ -253,8 +253,10 @@
<if test='null != customerId and "" != customerId'> <if test='null != customerId and "" != customerId'>
AND b.CUSTOMER_ID = #{customerId} AND b.CUSTOMER_ID = #{customerId}
</if> </if>
<if test='null != projectId and "" != projectId'> <if test='null != projectIds and projectIds.size()>0'>
AND b.PROJECT_ID = #{projectId} <foreach collection="projectIds" item="projectId" open="AND (" separator=" OR " close=" )">
b.PROJECT_ID = #{projectId}
</foreach>
</if> </if>
LEFT JOIN screen_customer_agency c ON b.HANDLER_ID = c.AGENCY_ID LEFT JOIN screen_customer_agency c ON b.HANDLER_ID = c.AGENCY_ID
WHERE a.DEL_FLAG = '0' WHERE a.DEL_FLAG = '0'
@ -263,8 +265,10 @@
<if test='null != customerId and "" != customerId'> <if test='null != customerId and "" != customerId'>
AND a.CUSTOMER_ID = #{customerId} AND a.CUSTOMER_ID = #{customerId}
</if> </if>
<if test='null != projectId and "" != projectId'> <if test='null != projectIds and projectIds.size()>0'>
AND a.PROJECT_ID = #{projectId} <foreach collection="projectIds" item="projectId" open="AND (" separator=" OR " close=" )">
a.PROJECT_ID = #{projectId}
</foreach>
</if> </if>
ORDER BY ORDER BY
a.CREATED_TIME ASC a.CREATED_TIME ASC

22
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/CancelAppointmentFormDTO.java

@ -0,0 +1,22 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/11/26 5:19 下午
* @DESC
*/
@Data
public class CancelAppointmentFormDTO implements Serializable {
private static final long serialVersionUID = 8646430374802086292L;
public interface CancelAppointmentForm{}
@NotBlank(message = "recordId不能为空",groups = CancelAppointmentForm.class)
private String recordId;
}

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 String recordId;
/** /**
* 预约时间 * 预约时间
*/ */
@ -55,5 +57,6 @@ public class AppointmentRecordResultDTO implements Serializable {
this.appointmentPhone = ""; this.appointmentPhone = "";
this.remark = ""; this.remark = "";
this.appointmentTime = new ArrayList<>(); this.appointmentTime = new ArrayList<>();
this.recordId = "";
} }
} }

13
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java

@ -190,4 +190,17 @@ public class IcPartyServiceCenterController {
return new Result<List<AppointmentRecordResultDTO>>().ok(icPartyServiceCenterService.appointmentRecord(formDTO)); return new Result<List<AppointmentRecordResultDTO>>().ok(icPartyServiceCenterService.appointmentRecord(formDTO));
} }
/**
* @Description 取消预约
* @param formDTO
* @author zxc
* @date 2021/11/26 5:21 下午
*/
@PostMapping("cancelappointment")
public Result cancelAppointment(@RequestBody CancelAppointmentFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO,CancelAppointmentFormDTO.CancelAppointmentForm.class);
icPartyServiceCenterService.cancelAppointment(formDTO);
return new Result();
}
} }

8
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPartyServiceCenterService.java

@ -158,4 +158,12 @@ public interface IcPartyServiceCenterService extends BaseService<IcPartyServiceC
*/ */
List<AppointmentRecordResultDTO> appointmentRecord(AppointmentRecordFormDTO formDTO); List<AppointmentRecordResultDTO> appointmentRecord(AppointmentRecordFormDTO formDTO);
/**
* @Description 取消预约
* @param formDTO
* @author zxc
* @date 2021/11/26 5:21 下午
*/
void cancelAppointment(CancelAppointmentFormDTO formDTO);
} }

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

@ -61,6 +61,7 @@ import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
/** /**
* 党群服务中心 * 党群服务中心
@ -259,7 +260,12 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl<IcPartyServ
records.forEach(r -> { records.forEach(r -> {
timeIds.addAll(Arrays.asList(r.getTimeId().split(","))); timeIds.addAll(Arrays.asList(r.getTimeId().split(",")));
}); });
if (timeIds.containsAll(Arrays.asList(formDTO.getTimeId().split(",")))){ List<String> formTimeId = Arrays.asList(formDTO.getTimeId().split(","));
int before = timeIds.size() + formTimeId.size();
List<String> endTimeId = new ArrayList<>();
endTimeId.addAll(timeIds);endTimeId.addAll(formTimeId);
List<String> collect = endTimeId.stream().distinct().collect(Collectors.toList());
if (collect.size() < before){
throw new RenException(EpmetErrorCode.APPOINTMENT_TIME_ERROR.getCode()); throw new RenException(EpmetErrorCode.APPOINTMENT_TIME_ERROR.getCode());
} }
} }
@ -394,6 +400,17 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl<IcPartyServ
return result; return result;
} }
/**
* @Description 取消预约
* @param formDTO
* @author zxc
* @date 2021/11/26 5:21 下午
*/
@Override
public void cancelAppointment(CancelAppointmentFormDTO formDTO) {
matterAppointmentRecordDao.deleteById(formDTO.getRecordId());
}
public List<TimeDTO> getTimeList(String start,String end,Integer interval){ public List<TimeDTO> getTimeList(String start,String end,Integer interval){
List<TimeDTO> result = new ArrayList<>(); List<TimeDTO> result = new ArrayList<>();
List<String> intervalTimeList = getIntervalTimeList(start, end, interval); List<String> intervalTimeList = getIntervalTimeList(start, end, interval);

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

@ -10,7 +10,8 @@
ar.APPOINTMENT_PHONE, ar.APPOINTMENT_PHONE,
ar.REMARK, ar.REMARK,
ar.TIME_ID, ar.TIME_ID,
cm.MATTER_NAME cm.MATTER_NAME,
ar.ID AS recordId
FROM ic_matter_appointment_record ar FROM ic_matter_appointment_record ar
LEFT JOIN ic_party_service_center_matter cm ON (cm.ID = ar.MATTER_ID AND cm.DEL_FLAG = 0) LEFT JOIN ic_party_service_center_matter cm ON (cm.ID = ar.MATTER_ID AND cm.DEL_FLAG = 0)
WHERE ar.DEL_FLAG = 0 WHERE ar.DEL_FLAG = 0

15
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseDisputeProcessServiceImpl.java

@ -69,6 +69,7 @@ public class BaseDisputeProcessServiceImpl extends BaseServiceImpl<BaseDisputePr
*/ */
@Override @Override
public void getEventinfo(EventInfoFormDTO formDTO) { public void getEventinfo(EventInfoFormDTO formDTO) {
formDTO.setPageSize(1000);
Result<List<EventInfoResultDTO>> result = dataStatisticalOpenFeignClient.getEventInfo(formDTO); Result<List<EventInfoResultDTO>> result = dataStatisticalOpenFeignClient.getEventInfo(formDTO);
if (!result.success()) { if (!result.success()) {
throw new RenException(result.getInternalMsg()); throw new RenException(result.getInternalMsg());
@ -94,19 +95,20 @@ public class BaseDisputeProcessServiceImpl extends BaseServiceImpl<BaseDisputePr
List<BaseConflictsResolveEntity> resolveList = list.stream().map(item -> { List<BaseConflictsResolveEntity> resolveList = list.stream().map(item -> {
BaseConflictsResolveEntity entity = new BaseConflictsResolveEntity(); BaseConflictsResolveEntity entity = new BaseConflictsResolveEntity();
entity.setId(item.getId()); entity.setId(item.getId());
entity.setGridId(deptMap.get(item.getOrgCode())); entity.setGridId(deptMap.get(item.getOrgId()));
entity.setGridName(item.getOrgName()); entity.setGridName(item.getOrgName());
entity.setEventName(item.getEventName()); entity.setEventName(item.getEventName());
entity.setHappenDate(item.getHappenDate()); entity.setHappenDate(item.getHappenDate());
entity.setHappenPlace(item.getHappenPlace()); entity.setHappenPlace(item.getHappenPlace());
entity.setEventDescription(item.getEventDescription()); entity.setEventDescription(item.getEventDescription());
entity.setLng(item.getLng().toString()); entity.setLng(item.getLng().toPlainString());
entity.setLat(item.getLat().toString()); entity.setLat(item.getLat().toPlainString());
entity.setCreateBy(String.valueOf(userMap.get(item.getReporterId()))); entity.setCreateBy(null == userMap.get(item.getReporterId())?null:String.valueOf(userMap.get(item.getReporterId())));
entity.setCreateDate(item.getReportTime()); entity.setCreateDate(item.getReportTime());
entity.setUpdateDate(new Date()); entity.setUpdateDate(new Date());
entity.setStatus(item.getStatus()); entity.setStatus(item.getStatus());
entity.setFirstEventCategory(item.getParentEventCategory()); entity.setFirstEventCategory(item.getParentEventCategory());
entity.setSource("01");
entity.setSecondEventCategory(item.getEventCategory()); entity.setSecondEventCategory(item.getEventCategory());
entity.setResolveWay(item.getWaysOfResolving()); entity.setResolveWay(item.getWaysOfResolving());
entity.setResolveGridLevel(item.getCompleteLevel()); entity.setResolveGridLevel(item.getCompleteLevel());
@ -118,11 +120,10 @@ public class BaseDisputeProcessServiceImpl extends BaseServiceImpl<BaseDisputePr
}).collect(Collectors.toList()); }).collect(Collectors.toList());
if(SystemMessageType.PROJECT_ADD.equals(formDTO.getType())){ if(SystemMessageType.PROJECT_ADD.equals(formDTO.getType())){
baseConflictsResolveService.insertBatch(resolveList); baseConflictsResolveService.saveOrUpdateBatch(resolveList, formDTO.getPageSize());
}else { }else {
baseConflictsResolveService.updateBatchById(resolveList); baseConflictsResolveService.saveOrUpdateBatch(resolveList, formDTO.getPageSize());
} }
} }
} }
} }

2
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/ExDeptServiceImpl.java

@ -109,7 +109,7 @@ public class ExDeptServiceImpl extends BaseServiceImpl<ExDeptDao, ExDeptEntity>
if (CollectionUtils.isEmpty(entityList)) { if (CollectionUtils.isEmpty(entityList)) {
return Collections.emptyMap(); return Collections.emptyMap();
} }
return entityList.stream().collect(Collectors.toMap(ExDeptEntity::getGridCode, ExDeptEntity::getDeptId, (key1, key2) -> key2)); return entityList.stream().collect(Collectors.toMap(ExDeptEntity::getQxDeptId, ExDeptEntity::getDeptId, (key1, key2) -> key2));
} }
} }
Loading…
Cancel
Save