userStatNew(FactUserHouseFormDTO formDTO);
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java
index 4120ed76c5..ce6447a5e4 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java
@@ -238,6 +238,8 @@ public class FactGridGovernDailyEntity extends BaseEpmetEntity {
this.eventUnResolvedCount=NumConstant.ZERO;
this.workEventResolvedCount=NumConstant.ZERO;
this.workEventUnResolvedCount=NumConstant.ZERO;
+ this.icEventResolvedCount = NumConstant.ZERO;
+ this.icEventUnResolvedCount = NumConstant.ZERO;
this.inGroupTopicResolvedCount=NumConstant.ZERO;
this.inGroupTopicUnResolvedCount=NumConstant.ZERO;
this.fromIssueResolvedInGridCount=NumConstant.ZERO;
@@ -248,5 +250,6 @@ public class FactGridGovernDailyEntity extends BaseEpmetEntity {
this.communityClosedCount=NumConstant.ZERO;
this.streetClosedCount=NumConstant.ZERO;
this.districtDeptClosedCount=NumConstant.ZERO;
+
}
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/org/IcHouseEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/org/IcHouseEntity.java
new file mode 100644
index 0000000000..889f5b3d86
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/org/IcHouseEntity.java
@@ -0,0 +1,110 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.entity.org;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+
+/**
+ * 房屋信息
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-10-25
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("ic_house")
+public class IcHouseEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户id
+ */
+ private String customerId;
+
+ /**
+ * 小区id
+ */
+ private String neighborHoodId;
+
+ /**
+ * 片区id,neighbor_hood_part.id,可为空。
+ */
+ private String partId;
+
+ /**
+ * 所属楼栋id
+ */
+ private String buildingId;
+
+ /**
+ * 所属单元id
+ */
+ private String buildingUnitId;
+
+ /**
+ * 房屋名字后台插入时生成
+ */
+ private String houseName;
+
+ /**
+ * 门牌号
+ */
+ private String doorName;
+
+ /**
+ * 房屋类型,这里存储字典value就可以
+ */
+ private String houseType;
+
+ /**
+ * 存储字典value
+ */
+ private String purpose;
+
+ /**
+ * 1出租;0未出租
+ */
+ private Integer rentFlag;
+
+ /**
+ * 房主姓名
+ */
+ private String ownerName;
+
+ /**
+ * 房主电话
+ */
+ private String ownerPhone;
+
+ /**
+ * 房主身份证号
+ */
+ private String ownerIdCard;
+
+ /**
+ * 排序
+ */
+ private BigDecimal sort;
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactAgencyUserHouseDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactAgencyUserHouseDailyEntity.java
new file mode 100644
index 0000000000..2426a984d5
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactAgencyUserHouseDailyEntity.java
@@ -0,0 +1,118 @@
+package com.epmet.entity.stats;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 人房信息统计数,按天统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-27
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("fact_agency_user_house_daily")
+public class FactAgencyUserHouseDailyEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户id
+ */
+ private String customerId;
+
+ /**
+ * 数据更新至:yyyyMMdd;
+ */
+ private String dateId;
+
+ /**
+ * 组织id
+ */
+ private String agencyId;
+
+ /**
+ * agency_id所属的机关级别(社区级:community,
+乡(镇、街道)级:street,
+区县级: district,
+市级: city
+省级:province)
+ */
+ private String level;
+
+ /**
+ * 组织i所属的组织id
+ */
+ private String pid;
+
+ /**
+ * 组织i所有上级id
+ */
+ private String pids;
+
+ /**
+ * 小区总数
+ */
+ private Integer neighbourhoodsCount;
+
+ /**
+ * 房屋总数
+ */
+ private Integer houseCount;
+
+ /**
+ * 自住房屋总数
+ */
+ private Integer houseSelfCount;
+
+ /**
+ * 出租房屋总数
+ */
+ private Integer houseLeaseCount;
+
+ /**
+ * 闲置房屋总数
+ */
+ private Integer houseIdleCount;
+
+ /**
+ * 居民总数
+ */
+ private Integer userCount;
+
+ /**
+ * 常住居民总数
+ */
+ private Integer userResiCount;
+
+ /**
+ * 流动居民总数
+ */
+ private Integer userFloatCount;
+
+ /**
+ * 当日新增房屋数
+ */
+ private Integer houseIncr;
+
+ /**
+ * 当日修改房屋数
+ */
+ private Integer houseModify;
+
+ /**
+ * 当日新增居民数
+ */
+ private Integer userIncr;
+
+ /**
+ * 当日修改居民数
+ */
+ private Integer userModify;
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactGridUserHouseDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactGridUserHouseDailyEntity.java
new file mode 100644
index 0000000000..58075e335e
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactGridUserHouseDailyEntity.java
@@ -0,0 +1,109 @@
+package com.epmet.entity.stats;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 网格的人房信息统计数,按天统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-27
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("fact_grid_user_house_daily")
+public class FactGridUserHouseDailyEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户id
+ */
+ private String customerId;
+
+ /**
+ * 数据更新至:yyyyMMdd;
+ */
+ private String dateId;
+
+ /**
+ * 网格id
+ */
+ private String gridId;
+
+ /**
+ * 网格所属的组织id
+ */
+ private String pid;
+
+ /**
+ * 网格所有上级id
+ */
+ private String pids;
+
+ /**
+ * 小区总数
+ */
+ private Integer neighbourhoodsCount;
+
+ /**
+ * 房屋总数
+ */
+ private Integer houseCount;
+
+ /**
+ * 自住房屋总数
+ */
+ private Integer houseSelfCount;
+
+ /**
+ * 出租房屋总数
+ */
+ private Integer houseLeaseCount;
+
+ /**
+ * 闲置房屋总数
+ */
+ private Integer houseIdleCount;
+
+ /**
+ * 居民总数
+ */
+ private Integer userCount;
+
+ /**
+ * 常住居民总数
+ */
+ private Integer userResiCount;
+
+ /**
+ * 流动居民总数
+ */
+ private Integer userFloatCount;
+
+ /**
+ * 当日新增房屋数
+ */
+ private Integer houseIncr;
+
+ /**
+ * 当日修改房屋数
+ */
+ private Integer houseModify;
+
+ /**
+ * 当日新增居民数
+ */
+ private Integer userIncr;
+
+ /**
+ * 当日修改居民数
+ */
+ private Integer userModify;
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactNeighborhoodUserHouseDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactNeighborhoodUserHouseDailyEntity.java
new file mode 100644
index 0000000000..2c48798b2c
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactNeighborhoodUserHouseDailyEntity.java
@@ -0,0 +1,119 @@
+package com.epmet.entity.stats;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 网格的人房信息统计数,按天统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-06-01
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("fact_neighborhood_user_house_daily")
+public class FactNeighborhoodUserHouseDailyEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户id
+ */
+ private String customerId;
+
+ /**
+ * 数据更新至:yyyyMMdd;
+ */
+ private String dateId;
+
+ /**
+ * 网格id
+ */
+ private String gridId;
+
+ /**
+ * 网格所属的组织id
+ */
+ private String pid;
+
+ /**
+ * 网格所有上级id
+ */
+ private String pids;
+
+ /**
+ * 小区ID
+ */
+ private String neighbourhoodsId;
+
+ /**
+ * 小区名称
+ */
+ private String neighborHoodName;
+
+ /**
+ * 房屋总数
+ */
+ private Integer houseCount;
+
+ /**
+ * 小区总数
+ */
+ private Integer neighbourhoodsCount;
+
+ /**
+ * 自住房屋总数
+ */
+ private Integer houseSelfCount;
+
+ /**
+ * 出租房屋总数
+ */
+ private Integer houseLeaseCount;
+
+ /**
+ * 闲置房屋总数
+ */
+ private Integer houseIdleCount;
+
+ /**
+ * 居民总数
+ */
+ private Integer userCount;
+
+ /**
+ * 常住居民总数
+ */
+ private Integer userResiCount;
+
+ /**
+ * 流动居民总数
+ */
+ private Integer userFloatCount;
+
+ /**
+ * 当日新增房屋数
+ */
+ private Integer houseIncr;
+
+ /**
+ * 当日修改房屋数
+ */
+ private Integer houseModify;
+
+ /**
+ * 当日新增居民数
+ */
+ private Integer userIncr;
+
+ /**
+ * 当日修改居民数
+ */
+ private Integer userModify;
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/user/IcResiUserEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/user/IcResiUserEntity.java
new file mode 100644
index 0000000000..4a2260b045
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/user/IcResiUserEntity.java
@@ -0,0 +1,513 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.entity.user;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 用户基础信息
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-10-26
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("ic_resi_user")
+public class IcResiUserEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户Id customer.id
+ */
+ private String customerId;
+
+ /**
+ *
+ */
+ private String agencyId;
+
+ /**
+ *
+ */
+ private String pids;
+
+ /**
+ * 网格ID
+ */
+ private String gridId;
+
+ /**
+ * 所属小区ID
+ */
+ private String villageId;
+
+ /**
+ * 所属楼宇Id
+ */
+ private String buildId;
+
+ /**
+ * 单元id
+ */
+ private String unitId;
+
+ /**
+ * 所属家庭Id
+ */
+ private String homeId;
+
+ /**
+ * 是否本地户籍
+ */
+ private String isBdhj;
+
+ /**
+ * 姓名
+ */
+ private String name;
+
+ /**
+ * 手机号
+ */
+ private String mobile;
+
+ /**
+ * 性别
+ */
+ private String gender;
+
+ /**
+ * 身份证号
+ */
+ private String idCard;
+
+ /**
+ * 出生日期
+ */
+ private String birthday;
+
+ /**
+ * 备注
+ */
+ private String remarks;
+
+ /**
+ * 联系人
+ */
+ private String contacts;
+
+ /**
+ * 联系人电话
+ */
+ private String contactsMobile;
+
+ /**
+ * 九小场所url
+ */
+ private String ninePlace;
+
+ /**
+ * 是否党员
+ */
+ private String isParty;
+
+ /**
+ * 是否低保户
+ */
+ private String isDbh;
+
+ /**
+ * 是否保障房
+ */
+ private String isEnsureHouse;
+
+ /**
+ * 是否失业
+ */
+ private String isUnemployed;
+
+ /**
+ * 是否育龄妇女
+ */
+ private String isYlfn;
+
+ /**
+ * 是否退役军人
+ */
+ private String isVeterans;
+
+ /**
+ * 是否统战人员
+ */
+ private String isUnitedFront;
+
+ /**
+ * 是否信访人员
+ */
+ private String isXfry;
+
+ /**
+ * 是否志愿者
+ */
+ private String isVolunteer;
+
+ /**
+ * 是否老年人
+ */
+ private String isOldPeople;
+
+ /**
+ * 是否空巢
+ */
+ private String isKc;
+
+ /**
+ * 是否失独
+ */
+ private String isSd;
+
+ /**
+ * 是否失能
+ */
+ private String isSn;
+
+ /**
+ * 是否失智
+ */
+ private String isSz;
+
+ /**
+ * 是否残疾
+ */
+ private String isCj;
+
+ /**
+ * 是否大病
+ */
+ private String isDb;
+
+ /**
+ * 是否慢病
+ */
+ private String isMb;
+
+ /**
+ * 是否特殊人群
+ */
+ private String isSpecial;
+
+ /**
+ * 是否租户【是:1 否:0】
+ */
+ private String isTenant;
+
+ /**
+ * 是否流动人口【是:1 否:0】
+ */
+ private String isFloating;
+
+ /**
+ * 文化程度【字典表】
+ */
+ private String culture;
+
+ /**
+ * 文化程度备注
+ */
+ private String cultureRemakes;
+
+ /**
+ * 特长【字典表】
+ */
+ private String specialSkill;
+
+ /**
+ * 兴趣爱好
+ */
+ private String hobby;
+
+ /**
+ * 兴趣爱好备注
+ */
+ private String hobbyRemakes;
+
+ /**
+ * 宗教信仰
+ */
+ private String faith;
+
+ /**
+ * 宗教信仰备注
+ */
+ private String faithRemakes;
+
+ /**
+ * 残疾类别【字典表】
+ */
+ private String cjlb;
+
+ /**
+ * 残疾登记(状况)【字典表】
+ */
+ private String cjzk;
+
+ /**
+ * 残疾证号
+ */
+ private String cjzh;
+
+ /**
+ * 残疾说明
+ */
+ private String cjsm;
+
+ /**
+ * 有无监护人【yes no】
+ */
+ private String ynJdr;
+
+ /**
+ * 有无技能特长【yes no】
+ */
+ private String ynJntc;
+
+ /**
+ * 有无劳动能力
+ */
+ private String ynLdnl;
+
+ /**
+ * 有无非义务教育阶段助学【yes no】
+ */
+ private String ynFywjyjdzx;
+
+ /**
+ * 所患大病
+ */
+ private String shdb;
+
+ /**
+ * 患大病时间
+ */
+ private String dbsj;
+
+ /**
+ * 所患慢性病
+ */
+ private String shmxb;
+
+ /**
+ * 患慢性病时间
+ */
+ private String mxbsj;
+
+ /**
+ * 是否参保
+ */
+ private String isCb;
+
+ /**
+ * 自付金额
+ */
+ private String zfje;
+
+ /**
+ * 救助金额
+ */
+ private String jzje;
+
+ /**
+ * 救助时间[yyyy-MM-dd]
+ */
+ private String jzsj;
+
+ /**
+ * 享受救助明细序号
+ */
+ private String jzmxxh;
+
+ /**
+ * 健康信息备注
+ */
+ private String healthRemakes;
+
+ /**
+ * 工作单位
+ */
+ private String gzdw;
+
+ /**
+ * 职业
+ */
+ private String zy;
+
+ /**
+ * 离退休时间
+ */
+ private String ltxsj;
+
+ /**
+ * 工作信息备注
+ */
+ private String workRemake;
+
+ /**
+ * 退休金额
+ */
+ private String txje;
+
+ /**
+ * 月收入
+ */
+ private String ysr;
+
+ /**
+ * 籍贯
+ */
+ private String jg;
+
+ /**
+ * 户籍所在地
+ */
+ private String hjszd;
+
+ /**
+ * 现居住地
+ */
+ private String xjzd;
+
+ /**
+ * 人户情况
+ */
+ private String rhzk;
+
+ /**
+ * 居住信息备注
+ */
+ private String jzxxRemakes;
+
+ /**
+ * 民族【字典表】
+ */
+ private String mz;
+
+ /**
+ * 与户主关系【字典表】
+ */
+ private String yhzgx;
+
+ /**
+ * 居住情况【字典表】
+ */
+ private String jzqk;
+
+ /**
+ * 婚姻状况【字典表】
+ */
+ private String hyzk;
+
+ /**
+ * 配偶情况【字典表】
+ */
+ private String poqk;
+
+ /**
+ * 有无赡养人
+ */
+ private String ynSyr;
+
+ /**
+ * 与赡养人关系【字典表】
+ */
+ private String ysyrgx;
+
+ /**
+ * 赡养人电话
+ */
+ private String syrMobile;
+
+ /**
+ * 家庭信息备注
+ */
+ private String jtxxRemakes;
+
+ /**
+ * 用户状态【0:正常;1:迁出;2:注销】
+ */
+ private String status;
+
+ /**
+ * 用户详细状态:01:新增、02:导入、03:迁入、04:新生、11:迁出、21死亡
+ */
+ private String subStatus;
+
+ /**
+ * 预留字段1
+ */
+ private String field1;
+
+ /**
+ * 预留字段2
+ */
+ private String field2;
+
+ /**
+ * 预留字段3
+ */
+ private String field3;
+
+ /**
+ * 预留字段4
+ */
+ private String field4;
+
+ /**
+ * 预留字段5
+ */
+ private String field5;
+
+ /**
+ * 预留字段6
+ */
+ private String field6;
+
+ /**
+ * 预留字段7
+ */
+ private String field7;
+
+ /**
+ * 预留字段8
+ */
+ private String field8;
+
+ /**
+ * 预留字段9
+ */
+ private String field9;
+
+ /**
+ * 预留字段10
+ */
+ private String field10;
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/excel/FactUserHouseExcel.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/excel/FactUserHouseExcel.java
new file mode 100644
index 0000000000..47e4445591
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/excel/FactUserHouseExcel.java
@@ -0,0 +1,56 @@
+package com.epmet.excel;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 人房信息统计数,按天统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-27
+ */
+@Data
+public class FactUserHouseExcel {
+
+ @Excel(name = "组织结构")
+ private String agencyName;
+
+ @Excel(name = "小区数")
+ private Integer neighbourhoodsCount;
+
+ @Excel(name = "房屋数")
+ private Integer houseCount;
+
+ @Excel(name = "自住房屋数")
+ private Integer houseSelfCount;
+
+ @Excel(name = "出租房屋数")
+ private Integer houseLeaseCount;
+
+ @Excel(name = "闲置房屋数")
+ private Integer houseIdleCount;
+
+ @Excel(name = "居民总数")
+ private Integer userCount;
+
+ @Excel(name = "常住人口数")
+ private Integer userResiCount;
+
+ @Excel(name = "流动人口数")
+ private Integer userFloatCount;
+
+ @Excel(name = "新增房屋数")
+ private Integer houseIncr;
+
+ @Excel(name = "新增人口数")
+ private Integer userIncr;
+
+ @Excel(name = "修改房屋数")
+ private Integer houseModify;
+
+ @Excel(name = "修改人口数")
+ private Integer userModify;
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/HouseService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/HouseService.java
new file mode 100644
index 0000000000..5eafd8cc88
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/HouseService.java
@@ -0,0 +1,73 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service.org;
+
+import com.epmet.dto.stats.form.FactUserHouseFormDTO;
+import com.epmet.dto.stats.result.FactUserHouseResultDTO;
+
+import java.util.List;
+
+/**
+ * 小区表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-10-25
+ */
+public interface HouseService {
+
+ /**
+ * 房屋统计
+ *
+ * @param formDTO
+ * @return java.util.List
+ * @author zhy
+ * @date 2022/5/30 13:33
+ */
+ List houseStat(FactUserHouseFormDTO formDTO);
+
+ /**
+ * 房屋统计(小区)
+ *
+ * @param formDTO
+ * @return java.util.List
+ * @author wgf
+ * @date 2022/5/30 13:33
+ */
+ List houseStatNew(FactUserHouseFormDTO formDTO);
+
+ /**
+ * 小区统计
+ *
+ * @param formDTO
+ * @return java.util.List
+ * @author zhy
+ * @date 2022/5/30 13:33
+ */
+ List neighborhoodStat(FactUserHouseFormDTO formDTO);
+
+ /**
+ * 小区统计(小区)
+ *
+ * @param formDTO
+ * @return java.util.List
+ * @author wgf
+ * @date 2022/5/30 13:33
+ */
+ List neighborhoodStatNew(FactUserHouseFormDTO formDTO);
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/HouseServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/HouseServiceImpl.java
new file mode 100644
index 0000000000..f6e74ac689
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/HouseServiceImpl.java
@@ -0,0 +1,42 @@
+package com.epmet.service.org.impl;
+
+import com.epmet.commons.dynamic.datasource.annotation.DataSource;
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.commons.tools.feign.ResultDataResolver;
+import com.epmet.constant.DataSourceConstant;
+import com.epmet.dao.org.IcHouseDao;
+import com.epmet.dto.stats.form.FactUserHouseFormDTO;
+import com.epmet.dto.stats.result.FactUserHouseResultDTO;
+import com.epmet.entity.org.IcHouseEntity;
+import com.epmet.service.org.HouseService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Slf4j
+@DataSource(DataSourceConstant.GOV_ORG)
+@Service
+public class HouseServiceImpl extends BaseServiceImpl implements HouseService, ResultDataResolver {
+
+ @Override
+ public List houseStat(FactUserHouseFormDTO formDTO) {
+ return baseDao.houseStat(formDTO);
+ }
+
+ @Override
+ public List houseStatNew(FactUserHouseFormDTO formDTO) {
+ return baseDao.houseStatNew(formDTO);
+ }
+
+ @Override
+ public List neighborhoodStat(FactUserHouseFormDTO formDTO) {
+ return baseDao.neighborhoodStatStat(formDTO);
+ }
+
+ @Override
+ public List neighborhoodStatNew(FactUserHouseFormDTO formDTO) {
+ return baseDao.neighborhoodStatStatNew(formDTO);
+ }
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactAgencyUserHouseDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactAgencyUserHouseDailyService.java
new file mode 100644
index 0000000000..9a31152d55
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactAgencyUserHouseDailyService.java
@@ -0,0 +1,111 @@
+package com.epmet.service.stats;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.dto.stats.FactAgencyUserHouseDailyDTO;
+import com.epmet.dto.stats.FactGridUserHouseDailyDTO;
+import com.epmet.dto.stats.form.FactUserHouseFormDTO;
+import com.epmet.dto.stats.result.FactUserHouseResultDTO;
+import com.epmet.entity.stats.FactAgencyUserHouseDailyEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 人房信息统计数,按天统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-27
+ */
+public interface FactAgencyUserHouseDailyService extends BaseService {
+
+ /**
+ * 默认分页
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2022-05-27
+ */
+ PageData page(Map params);
+
+ /**
+ * 分页合计
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2022-05-27
+ */
+ FactUserHouseResultDTO getTotal(Map params);
+
+ /**
+ * 默认查询
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2022-05-27
+ */
+ List list(Map params);
+
+ /**
+ * 查询导出数据
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2022-05-27
+ */
+ List listExport(Map params);
+
+ /**
+ * 单条查询
+ *
+ * @param id
+ * @return FactAgencyUserHouseDailyDTO
+ * @author generator
+ * @date 2022-05-27
+ */
+ FactAgencyUserHouseDailyDTO get(String id);
+
+ /**
+ * 默认保存
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2022-05-27
+ */
+ void save(FactAgencyUserHouseDailyDTO dto);
+
+ /**
+ * 默认更新
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2022-05-27
+ */
+ void update(FactAgencyUserHouseDailyDTO dto);
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return void
+ * @author generator
+ * @date 2022-05-27
+ */
+ void delete(String[] ids);
+
+ /**
+ * 物理删除历史数据
+ *
+ * @param formDTO
+ * @return void
+ * @author zhy
+ * @date 2022/5/30 13:32
+ */
+ void deleteByDateId(FactUserHouseFormDTO formDTO);
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGridUserHouseDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGridUserHouseDailyService.java
new file mode 100644
index 0000000000..36dd9046a5
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGridUserHouseDailyService.java
@@ -0,0 +1,120 @@
+package com.epmet.service.stats;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.dto.stats.FactGridUserHouseDailyDTO;
+import com.epmet.dto.stats.form.FactUserHouseFormDTO;
+import com.epmet.dto.stats.result.FactUserHouseResultDTO;
+import com.epmet.entity.stats.FactGridUserHouseDailyEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 网格的人房信息统计数,按天统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-27
+ */
+public interface FactGridUserHouseDailyService extends BaseService {
+
+ /**
+ * 默认分页
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2022-05-27
+ */
+ PageData page(Map params);
+
+ /**
+ * 页面合计
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2022-05-27
+ */
+ FactUserHouseResultDTO getTotal(Map params);
+
+ /**
+ * 默认查询
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2022-05-27
+ */
+ List list(Map params);
+
+ /**
+ * 查询导出数据
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2022-05-27
+ */
+ List listExport(Map params);
+
+ /**
+ * 单条查询
+ *
+ * @param id
+ * @return FactGridUserHouseDailyDTO
+ * @author generator
+ * @date 2022-05-27
+ */
+ FactGridUserHouseDailyDTO get(String id);
+
+ /**
+ * 默认保存
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2022-05-27
+ */
+ void save(FactGridUserHouseDailyDTO dto);
+
+ /**
+ * 默认更新
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2022-05-27
+ */
+ void update(FactGridUserHouseDailyDTO dto);
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return void
+ * @author generator
+ * @date 2022-05-27
+ */
+ void delete(String[] ids);
+
+ /**
+ * 物理删除历史数据
+ *
+ * @param formDTO
+ * @return void
+ * @author zhy
+ * @date 2022/5/30 13:32
+ */
+ void deleteByDateId(FactUserHouseFormDTO formDTO);
+
+ /**
+ * 根据网格统计组织数据
+ *
+ * @param formDTO
+ * @return java.util.List
+ * @author zhy
+ * @date 2022/5/30 13:32
+ */
+ List statAgency(FactUserHouseFormDTO formDTO);
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactNeighborhoodUserHouseDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactNeighborhoodUserHouseDailyService.java
new file mode 100644
index 0000000000..4c8905bae4
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactNeighborhoodUserHouseDailyService.java
@@ -0,0 +1,113 @@
+package com.epmet.service.stats;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.dto.stats.FactNeighborhoodUserHouseDailyDTO;
+import com.epmet.dto.stats.form.FactUserHouseFormDTO;
+import com.epmet.dto.stats.result.FactUserHouseResultDTO;
+import com.epmet.entity.stats.FactNeighborhoodUserHouseDailyEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 网格的人房信息统计数,按天统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-06-01
+ */
+public interface FactNeighborhoodUserHouseDailyService extends BaseService {
+
+ /**
+ * 默认分页
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2022-06-01
+ */
+ PageData page(Map params);
+
+ /**
+ * 默认查询
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2022-06-01
+ */
+ List list(Map params);
+
+ /**
+ * 单条查询
+ *
+ * @param id
+ * @return FactNeighborhoodUserHouseDailyDTO
+ * @author generator
+ * @date 2022-06-01
+ */
+ FactNeighborhoodUserHouseDailyDTO get(String id);
+
+ /**
+ * 默认保存
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2022-06-01
+ */
+ void save(FactNeighborhoodUserHouseDailyDTO dto);
+
+ /**
+ * 默认更新
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2022-06-01
+ */
+ void update(FactNeighborhoodUserHouseDailyDTO dto);
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return void
+ * @author generator
+ * @date 2022-06-01
+ */
+ void delete(String[] ids);
+
+
+ /**
+ * 物理删除历史数据
+ *
+ * @param formDTO
+ * @return void
+ * @author wgf
+ * @date 2022/5/30 13:32
+ */
+ void deleteByDateId(FactUserHouseFormDTO formDTO);
+
+ /**
+ * 查询导出数据
+ *
+ * @param params
+ * @return java.util.List
+ * @author wgf
+ * @date 2022-05-27
+ */
+ List listExport(Map params);
+
+ /**
+ * 页面合计
+ *
+ * @param params
+ * @return PageData
+ * @author wgf
+ * @date 2022-05-27
+ */
+ FactUserHouseResultDTO getTotal(Map params);
+
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactUserHouseService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactUserHouseService.java
new file mode 100644
index 0000000000..9221627c48
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactUserHouseService.java
@@ -0,0 +1,78 @@
+package com.epmet.service.stats;
+
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.dto.stats.FactAgencyUserHouseDailyDTO;
+import com.epmet.dto.stats.form.FactUserHouseFormDTO;
+import com.epmet.dto.stats.result.FactUserHouseResultDTO;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 人房信息统计数,按天统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-27
+ */
+public interface FactUserHouseService {
+
+ /**
+ * 默认分页
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2022-05-27
+ */
+ PageData page(Map params);
+
+ /**
+ * 页面合计
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2022-05-27
+ */
+ FactUserHouseResultDTO total(Map params);
+
+ /**
+ * 默认查询
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2022-05-27
+ */
+ List list(Map params);
+
+ /**
+ * 人房网格数据
+ *
+ * @param formDTO
+ * @return void
+ * @author zhy
+ * @date 2022/5/30 13:31
+ */
+ void statGrid(FactUserHouseFormDTO formDTO);
+
+ /**
+ * 人房小区数据
+ *
+ * @param formDTO
+ * @return void
+ * @author wgf
+ * @date 2022/5/30 13:31
+ */
+ void statNeighborhood(FactUserHouseFormDTO formDTO);
+
+ /**
+ * 人房组织数据
+ *
+ * @param formDTO
+ * @return void
+ * @author zhy
+ * @date 2022/5/30 13:31
+ */
+ void statAgency(FactUserHouseFormDTO formDTO);
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java
index 9ff2671fbb..044f6e63d1 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java
@@ -81,9 +81,11 @@ public class DimGridServiceImpl extends BaseServiceImpl getWrapper(Map params){
String id = (String)params.get(FieldConstant.ID_HUMP);
+ String customerId = (String)params.get("customerId");
QueryWrapper wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
+ wrapper.eq(StringUtils.isNotBlank(customerId), "CUSTOMER_ID", customerId);
return wrapper;
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyUserHouseDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyUserHouseDailyServiceImpl.java
new file mode 100644
index 0000000000..8fbf82b671
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyUserHouseDailyServiceImpl.java
@@ -0,0 +1,121 @@
+package com.epmet.service.stats.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.commons.tools.constant.FieldConstant;
+import com.epmet.commons.tools.constant.NumConstant;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.security.user.LoginUserUtil;
+import com.epmet.commons.tools.utils.ConvertUtils;
+import com.epmet.dao.stats.FactAgencyUserHouseDailyDao;
+import com.epmet.dto.stats.FactAgencyUserHouseDailyDTO;
+import com.epmet.dto.stats.form.FactUserHouseFormDTO;
+import com.epmet.dto.stats.result.FactUserHouseResultDTO;
+import com.epmet.entity.stats.FactAgencyUserHouseDailyEntity;
+import com.epmet.service.stats.FactAgencyUserHouseDailyService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 人房信息统计数,按天统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-27
+ */
+@Service
+public class FactAgencyUserHouseDailyServiceImpl extends BaseServiceImpl implements FactAgencyUserHouseDailyService {
+
+ @Autowired
+ private LoginUserUtil loginUserUtil;
+
+ @Override
+ public PageData page(Map params) {
+ params.put("customerId", loginUserUtil.getLoginUserCustomerId());
+ IPage page = getPage(params);
+ List list = baseDao.listPage(params);
+ return new PageData<>(list, page.getTotal());
+ }
+
+ @Override
+ public FactUserHouseResultDTO getTotal(Map params) {
+ params.put("customerId", loginUserUtil.getLoginUserCustomerId());
+ List list = baseDao.getTotal(params);
+
+ // 只有当日数据直接展示,否则需要统计时间段内两天差值进行Incr和Modify数据计算
+ if (list.size() == NumConstant.ZERO) {
+ return null;
+ } else if (list.size() == NumConstant.ONE) {
+ return list.get(0);
+ } else {
+ FactUserHouseResultDTO first = list.get(0);
+ FactUserHouseResultDTO last = list.get(list.size() - 1);
+ FactUserHouseResultDTO dto = last;
+ dto.setHouseIncr(last.getHouseIncr() - first.getHouseIncr());
+ dto.setHouseModify(last.getHouseModify() - first.getHouseModify());
+ dto.setUserIncr(last.getUserIncr() - first.getUserIncr());
+ dto.setUserModify(last.getUserModify() - first.getUserModify());
+ return dto;
+ }
+ }
+
+ @Override
+ public List list(Map params) {
+ List entityList = baseDao.selectList(getWrapper(params));
+
+ return ConvertUtils.sourceToTarget(entityList, FactAgencyUserHouseDailyDTO.class);
+ }
+
+ @Override
+ public List listExport(Map params) {
+ return baseDao.listPage(params);
+ }
+
+ private QueryWrapper getWrapper(Map params) {
+ String id = (String) params.get(FieldConstant.ID_HUMP);
+
+ QueryWrapper wrapper = new QueryWrapper<>();
+ wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
+
+ return wrapper;
+ }
+
+ @Override
+ public FactAgencyUserHouseDailyDTO get(String id) {
+ FactAgencyUserHouseDailyEntity entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, FactAgencyUserHouseDailyDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(FactAgencyUserHouseDailyDTO dto) {
+ FactAgencyUserHouseDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactAgencyUserHouseDailyEntity.class);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(FactAgencyUserHouseDailyDTO dto) {
+ FactAgencyUserHouseDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactAgencyUserHouseDailyEntity.class);
+ updateById(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delete(String[] ids) {
+ // 逻辑删除(@TableLogic 注解)
+ baseDao.deleteBatchIds(Arrays.asList(ids));
+ }
+
+ @Override
+ public void deleteByDateId(FactUserHouseFormDTO formDTO) {
+ baseDao.deleteByDateId(formDTO);
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridUserHouseDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridUserHouseDailyServiceImpl.java
new file mode 100644
index 0000000000..7aef227b16
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridUserHouseDailyServiceImpl.java
@@ -0,0 +1,138 @@
+package com.epmet.service.stats.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.commons.tools.constant.FieldConstant;
+import com.epmet.commons.tools.constant.NumConstant;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.security.user.LoginUserUtil;
+import com.epmet.commons.tools.utils.ConvertUtils;
+import com.epmet.dao.stats.FactGridUserHouseDailyDao;
+import com.epmet.dto.stats.FactGridUserHouseDailyDTO;
+import com.epmet.dto.stats.form.FactUserHouseFormDTO;
+import com.epmet.dto.stats.result.FactUserHouseResultDTO;
+import com.epmet.entity.stats.FactGridUserHouseDailyEntity;
+import com.epmet.service.stats.FactGridUserHouseDailyService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 网格的人房信息统计数,按天统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-27
+ */
+@Service
+public class FactGridUserHouseDailyServiceImpl extends BaseServiceImpl implements FactGridUserHouseDailyService {
+
+ @Autowired
+ private LoginUserUtil loginUserUtil;
+
+ @Override
+ public PageData page(Map params) {
+ params.put("customerId", loginUserUtil.getLoginUserCustomerId());
+ IPage page = getPage(params);
+ List list = baseDao.listPage(params);
+ return new PageData<>(list, page.getTotal());
+ }
+
+ @Override
+ public FactUserHouseResultDTO getTotal(Map params) {
+ params.put("customerId", loginUserUtil.getLoginUserCustomerId());
+ List list = baseDao.getTotal(params);
+
+ // 只有当日数据直接展示,否则需要统计时间段内两天差值进行Incr和Modify数据计算
+ if (list.size() == NumConstant.ZERO) {
+ return null;
+ } else if (list.size() == NumConstant.ONE) {
+ return list.get(0);
+ } else {
+ Integer houseIncr = 0;
+ Integer houseModify = 0;
+ Integer userIncr = 0;
+ Integer userModify = 0;
+ for(FactUserHouseResultDTO factUserHouseResultDTO : list){
+ houseIncr = houseIncr + factUserHouseResultDTO.getHouseIncr();
+ houseModify = houseModify + factUserHouseResultDTO.getHouseModify();
+ userIncr = userIncr + factUserHouseResultDTO.getUserIncr();
+ userModify = userModify + factUserHouseResultDTO.getUserModify();
+ }
+ FactUserHouseResultDTO dto = list.get(list.size() - 1);
+ dto.setHouseIncr(houseIncr);
+ dto.setHouseModify(houseModify);
+ dto.setUserIncr(userIncr);
+ dto.setUserModify(userModify);
+ return dto;
+ }
+ }
+
+ @Override
+ public List list(Map params) {
+ List entityList = baseDao.selectList(getWrapper(params));
+
+ return ConvertUtils.sourceToTarget(entityList, FactGridUserHouseDailyDTO.class);
+ }
+
+ @Override
+ public List listExport(Map params) {
+ return baseDao.listPage(params);
+ }
+
+ private QueryWrapper getWrapper(Map params) {
+ String id = (String) params.get(FieldConstant.ID_HUMP);
+ String dateId = (String) params.get("dateId");
+ String customerId = (String) params.get("customerId");
+
+ QueryWrapper wrapper = new QueryWrapper<>();
+ wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
+ wrapper.eq(StringUtils.isNotBlank(dateId), "DATE_ID", dateId);
+ wrapper.eq(StringUtils.isNotBlank(customerId), "CUSTOMER_ID", customerId);
+
+ return wrapper;
+ }
+
+ @Override
+ public FactGridUserHouseDailyDTO get(String id) {
+ FactGridUserHouseDailyEntity entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, FactGridUserHouseDailyDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(FactGridUserHouseDailyDTO dto) {
+ FactGridUserHouseDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactGridUserHouseDailyEntity.class);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(FactGridUserHouseDailyDTO dto) {
+ FactGridUserHouseDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactGridUserHouseDailyEntity.class);
+ updateById(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delete(String[] ids) {
+ // 逻辑删除(@TableLogic 注解)
+ baseDao.deleteBatchIds(Arrays.asList(ids));
+ }
+
+ @Override
+ public void deleteByDateId(FactUserHouseFormDTO formDTO) {
+ baseDao.deleteByDateId(formDTO);
+ }
+
+ @Override
+ public List statAgency(FactUserHouseFormDTO formDTO) {
+ return baseDao.statAgency(formDTO);
+ }
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactNeighborhoodUserHouseDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactNeighborhoodUserHouseDailyServiceImpl.java
new file mode 100644
index 0000000000..8772511aa0
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactNeighborhoodUserHouseDailyServiceImpl.java
@@ -0,0 +1,129 @@
+package com.epmet.service.stats.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.commons.tools.constant.NumConstant;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.security.user.LoginUserUtil;
+import com.epmet.commons.tools.utils.ConvertUtils;
+import com.epmet.commons.tools.constant.FieldConstant;
+import com.epmet.commons.tools.utils.DateUtils;
+import com.epmet.dao.stats.FactNeighborhoodUserHouseDailyDao;
+import com.epmet.dto.stats.FactNeighborhoodUserHouseDailyDTO;
+import com.epmet.dto.stats.form.FactUserHouseFormDTO;
+import com.epmet.dto.stats.result.FactUserHouseResultDTO;
+import com.epmet.entity.stats.FactGridUserHouseDailyEntity;
+import com.epmet.entity.stats.FactNeighborhoodUserHouseDailyEntity;
+import com.epmet.service.stats.FactNeighborhoodUserHouseDailyService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.*;
+
+/**
+ * 网格的人房信息统计数,按天统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-06-01
+ */
+@Service
+public class FactNeighborhoodUserHouseDailyServiceImpl extends BaseServiceImpl implements FactNeighborhoodUserHouseDailyService {
+
+ @Autowired
+ private LoginUserUtil loginUserUtil;
+
+ @Override
+ public PageData page(Map params) {
+ params.put("customerId", loginUserUtil.getLoginUserCustomerId());
+ IPage page = getPage(params);
+ List list = baseDao.listPage(params);
+ return new PageData<>(list, page.getTotal());
+ }
+
+ @Override
+ public List list(Map params) {
+ List entityList = baseDao.selectList(getWrapper(params));
+
+ return ConvertUtils.sourceToTarget(entityList, FactNeighborhoodUserHouseDailyDTO.class);
+ }
+
+ private QueryWrapper getWrapper(Map params){
+ String id = (String)params.get(FieldConstant.ID_HUMP);
+
+ QueryWrapper wrapper = new QueryWrapper<>();
+ wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
+
+ return wrapper;
+ }
+
+ @Override
+ public FactNeighborhoodUserHouseDailyDTO get(String id) {
+ FactNeighborhoodUserHouseDailyEntity entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, FactNeighborhoodUserHouseDailyDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(FactNeighborhoodUserHouseDailyDTO dto) {
+ FactNeighborhoodUserHouseDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactNeighborhoodUserHouseDailyEntity.class);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(FactNeighborhoodUserHouseDailyDTO dto) {
+ FactNeighborhoodUserHouseDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactNeighborhoodUserHouseDailyEntity.class);
+ updateById(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delete(String[] ids) {
+ // 逻辑删除(@TableLogic 注解)
+ baseDao.deleteBatchIds(Arrays.asList(ids));
+ }
+
+ @Override
+ public void deleteByDateId(FactUserHouseFormDTO formDTO) {
+ baseDao.deleteByDateId(formDTO);
+ }
+
+ @Override
+ public List listExport(Map params) {
+ return baseDao.listPage(params);
+ }
+
+ @Override
+ public FactUserHouseResultDTO getTotal(Map params) {
+ params.put("customerId", loginUserUtil.getLoginUserCustomerId());
+ List list = baseDao.getTotal(params);
+
+ // 只有当日数据直接展示,否则需要统计时间段内两天差值进行Incr和Modify数据计算
+ if (list.size() == NumConstant.ZERO) {
+ return null;
+ } else if (list.size() == NumConstant.ONE) {
+ return list.get(0);
+ } else {
+ Integer houseIncr = 0;
+ Integer houseModify = 0;
+ Integer userIncr = 0;
+ Integer userModify = 0;
+ for(FactUserHouseResultDTO factUserHouseResultDTO : list){
+ houseIncr = houseIncr + factUserHouseResultDTO.getHouseIncr();
+ houseModify = houseModify + factUserHouseResultDTO.getHouseModify();
+ userIncr = userIncr + factUserHouseResultDTO.getUserIncr();
+ userModify = userModify + factUserHouseResultDTO.getUserModify();
+ }
+ FactUserHouseResultDTO dto = list.get(list.size() - 1);
+ dto.setHouseIncr(houseIncr);
+ dto.setHouseModify(houseModify);
+ dto.setUserIncr(userIncr);
+ dto.setUserModify(userModify);
+ return dto;
+ }
+ }
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java
new file mode 100644
index 0000000000..db20e4ccc6
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactUserHouseServiceImpl.java
@@ -0,0 +1,307 @@
+package com.epmet.service.stats.impl;
+
+import com.epmet.commons.tools.constant.NumConstant;
+import com.epmet.commons.tools.enums.OrgLevelEnum;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.utils.ConvertUtils;
+import com.epmet.commons.tools.utils.DateUtils;
+import com.epmet.dto.stats.FactGridUserHouseDailyDTO;
+import com.epmet.dto.stats.form.FactUserHouseFormDTO;
+import com.epmet.dto.stats.result.FactUserHouseResultDTO;
+import com.epmet.entity.stats.FactAgencyUserHouseDailyEntity;
+import com.epmet.entity.stats.FactGridUserHouseDailyEntity;
+import com.epmet.entity.stats.FactNeighborhoodUserHouseDailyEntity;
+import com.epmet.service.org.HouseService;
+import com.epmet.service.stats.*;
+import com.epmet.service.user.IcResiUserService;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.*;
+
+/**
+ * 人房信息统计数,按天统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-27
+ */
+@Service
+@Slf4j
+public class FactUserHouseServiceImpl implements FactUserHouseService {
+
+ @Autowired
+ private FactAgencyUserHouseDailyService factAgencyUserHouseDailyService;
+
+ @Autowired
+ private FactGridUserHouseDailyService factGridUserHouseDailyService;
+
+ @Autowired
+ private FactNeighborhoodUserHouseDailyService factNeighborhoodUserHouseDailyService;
+
+ @Autowired
+ private HouseService houseService;
+
+ @Autowired
+ private IcResiUserService icResiUserService;
+
+ @Autowired
+ private DimGridService dimGridService;
+
+ @Override
+ public PageData page(Map params) {
+ PageData page = null;
+ if (params.containsKey("startTime") && params.containsKey("endTime")) {
+ if (StringUtils.isNotBlank(params.get("startTime").toString()) && StringUtils.isNotBlank(params.get("endTime").toString())) {
+ params.put("dateId", StringUtils.EMPTY);
+ } else {
+ params.put("dateId", DateUtils.getBeforeNDay(NumConstant.ONE));
+ }
+ } else {
+ params.put("dateId", DateUtils.getBeforeNDay(NumConstant.ONE));
+ }
+ if (params.containsKey("level")) {
+ if("neighborhood".equals(params.get("level").toString()) || OrgLevelEnum.GRID.getCode().equals(params.get("level").toString())){
+ page = factNeighborhoodUserHouseDailyService.page(params);
+
+ }else if (OrgLevelEnum.COMMUNITY.getCode().equals(params.get("level").toString())) {
+ page = factGridUserHouseDailyService.page(params);
+ } else {
+ page = factAgencyUserHouseDailyService.page(params);
+ }
+ }
+ return page;
+ }
+
+ @Override
+ public FactUserHouseResultDTO total(Map params) {
+ FactUserHouseResultDTO dto = null;
+ // 不查询时间段默认查询当天
+ if (params.containsKey("startTime") && params.containsKey("endTime")) {
+ if (StringUtils.isNotBlank(params.get("startTime").toString()) && StringUtils.isNotBlank(params.get("endTime").toString())) {
+ params.put("dateId", StringUtils.EMPTY);
+ } else {
+ params.put("dateId", DateUtils.getBeforeNDay(NumConstant.ONE));
+ }
+ } else {
+ params.put("dateId", DateUtils.getBeforeNDay(NumConstant.ONE));
+ }
+ // 网格纬度查询网格统计表,其余纬度查询组织统计表
+ if (params.containsKey("level")) {
+ if("neighborhood".equals(params.get("level").toString())){
+ dto = factNeighborhoodUserHouseDailyService.getTotal(params);
+ }else if (OrgLevelEnum.GRID.getCode().equals(params.get("level").toString())) {
+ dto = factGridUserHouseDailyService.getTotal(params);
+ } else {
+ dto = factAgencyUserHouseDailyService.getTotal(params);
+ }
+ }
+ return dto;
+ }
+
+ @Override
+ public List list(Map params) {
+ List list = new ArrayList<>();
+ if (params.containsKey("level")) {
+ if("neighborhood".equals(params.get("level").toString()) || OrgLevelEnum.GRID.getCode().equals(params.get("level").toString())){
+ list = factNeighborhoodUserHouseDailyService.listExport(params);
+ }else if (OrgLevelEnum.COMMUNITY.getCode().equals(params.get("level").toString())) {
+ list = factGridUserHouseDailyService.listExport(params);
+ } else {
+ list = factAgencyUserHouseDailyService.listExport(params);
+ }
+ }
+ FactUserHouseResultDTO dto = total(params);
+ if (dto != null) {
+ dto.setAgencyName("合计");
+ }
+ list.add(dto);
+ return list;
+ }
+
+ @Override
+ public void statGrid(FactUserHouseFormDTO formDTO) {
+ if (StringUtils.isBlank(formDTO.getDateId())) {
+ formDTO.setDateId(DateUtils.getBeforeNDay(NumConstant.ONE));
+ }
+ String dateId = formDTO.getDateId();
+ String customerId = formDTO.getCustomerId();
+
+ // 先删除历史
+ factGridUserHouseDailyService.deleteByDateId(formDTO);
+
+ // 保证小区是全部网格后,其余数据进行循环匹配
+ List neiList = houseService.neighborhoodStat(formDTO);
+ List houseList = houseService.houseStat(formDTO);
+ List userList = icResiUserService.userStat(formDTO);
+
+ List addList = new ArrayList<>();
+
+ neiList.forEach(item -> {
+ String gridId = item.getGridId();
+ FactUserHouseResultDTO dto = new FactUserHouseResultDTO();
+ dto.setCustomerId(formDTO.getCustomerId());
+ dto.setDateId(dateId);
+ dto.setGridId(gridId);
+ dto.setPid(item.getPid());
+ dto.setPids(item.getPids());
+ dto.setNeighbourhoodsCount(item.getNeighbourhoodsCount());
+
+ Optional houseOptional = houseList.stream().filter(house -> gridId.equals(house.getGridId()) && customerId.equals(house.getCustomerId())).findFirst();
+ if (houseOptional.isPresent()) {
+ dto.setHouseCount(houseOptional.get().getHouseCount());
+ dto.setHouseSelfCount(houseOptional.get().getHouseSelfCount());
+ dto.setHouseLeaseCount(houseOptional.get().getHouseLeaseCount());
+ dto.setHouseIdleCount(houseOptional.get().getHouseIdleCount());
+ dto.setHouseIncr(houseOptional.get().getHouseIncr());
+ dto.setHouseModify(houseOptional.get().getHouseModify());
+ } else {
+ dto.setHouseCount(NumConstant.ZERO);
+ dto.setHouseSelfCount(NumConstant.ZERO);
+ dto.setHouseLeaseCount(NumConstant.ZERO);
+ dto.setHouseIdleCount(NumConstant.ZERO);
+ dto.setHouseIncr(NumConstant.ZERO);
+ dto.setHouseModify(NumConstant.ZERO);
+ }
+
+ Optional userOptional = userList.stream().filter(user -> gridId.equals(user.getGridId()) && customerId.equals(user.getCustomerId())).findFirst();
+ if (userOptional.isPresent()) {
+ dto.setUserCount(userOptional.get().getUserCount());
+ dto.setUserResiCount(userOptional.get().getUserResiCount());
+ dto.setUserFloatCount(userOptional.get().getUserFloatCount());
+ dto.setUserIncr(userOptional.get().getUserIncr());
+ dto.setUserModify(userOptional.get().getUserModify());
+ } else {
+ dto.setUserCount(NumConstant.ZERO);
+ dto.setUserResiCount(NumConstant.ZERO);
+ dto.setUserFloatCount(NumConstant.ZERO);
+ dto.setUserIncr(NumConstant.ZERO);
+ dto.setUserModify(NumConstant.ZERO);
+ }
+ addList.add(dto);
+ });
+
+ List entityList = ConvertUtils.sourceToTarget(addList, FactGridUserHouseDailyEntity.class);
+ factGridUserHouseDailyService.insertBatch(entityList);
+ }
+
+
+ /**
+ * 小区
+ * @author wgf
+ * @param formDTO
+ */
+ @Override
+ public void statNeighborhood(FactUserHouseFormDTO formDTO) {
+ log.info("$$$进入业务逻辑");
+ if (StringUtils.isBlank(formDTO.getDateId())) {
+ formDTO.setDateId(DateUtils.getBeforeNDay(NumConstant.ONE));
+ }
+ String dateId = formDTO.getDateId();
+ String customerId = formDTO.getCustomerId();
+
+ // 先删除历史
+ factNeighborhoodUserHouseDailyService.deleteByDateId(formDTO);
+ log.info("$$$删除历史完成");
+ // 保证小区是全部网格后,其余数据进行循环匹配
+ List neiList = houseService.neighborhoodStatNew(formDTO);
+ List houseList = houseService.houseStatNew(formDTO);
+ List userList = icResiUserService.userStatNew(formDTO);
+
+ List addList = new ArrayList<>();
+
+ neiList.forEach(item -> {
+ String gridId = item.getGridId() == null ? "" : item.getGridId();
+ String neighborHoodsId = item.getNeighbourhoodsId();
+ FactUserHouseResultDTO dto = new FactUserHouseResultDTO();
+ dto.setCustomerId(formDTO.getCustomerId());
+ dto.setDateId(dateId);
+ dto.setGridId(gridId);
+ dto.setPid(item.getPid() == null ? "" : item.getPid());
+ dto.setPids(item.getPids() == null ? "" : item.getPids());
+ dto.setNeighbourhoodsCount(item.getNeighbourhoodsCount());
+ dto.setNeighbourhoodsId(item.getNeighbourhoodsId());
+ dto.setNeighborHoodName(item.getNeighborHoodName());
+
+ Optional houseOptional = houseList.stream().filter(house -> neighborHoodsId.equals(house.getNeighbourhoodsId()) && customerId.equals(house.getCustomerId())).findFirst();
+ if (houseOptional.isPresent()) {
+ dto.setHouseCount(houseOptional.get().getHouseCount());
+ dto.setHouseSelfCount(houseOptional.get().getHouseSelfCount());
+ dto.setHouseLeaseCount(houseOptional.get().getHouseLeaseCount());
+ dto.setHouseIdleCount(houseOptional.get().getHouseIdleCount());
+ } else {
+ dto.setHouseCount(NumConstant.ZERO);
+ dto.setHouseSelfCount(NumConstant.ZERO);
+ dto.setHouseLeaseCount(NumConstant.ZERO);
+ dto.setHouseIdleCount(NumConstant.ZERO);
+ }
+
+ Optional userOptional = userList.stream().filter(user -> neighborHoodsId.equals(user.getNeighbourhoodsId()) && customerId.equals(user.getCustomerId())).findFirst();
+ if (userOptional.isPresent()) {
+ dto.setUserCount(userOptional.get().getUserCount());
+ dto.setUserResiCount(userOptional.get().getUserResiCount());
+ dto.setUserFloatCount(userOptional.get().getUserFloatCount());
+ } else {
+ dto.setUserCount(NumConstant.ZERO);
+ dto.setUserResiCount(NumConstant.ZERO);
+ dto.setUserFloatCount(NumConstant.ZERO);
+ }
+ addList.add(dto);
+ });
+ log.info("$$$addList:::::" + addList);
+ List entityList = ConvertUtils.sourceToTarget(addList, FactNeighborhoodUserHouseDailyEntity.class);
+ factNeighborhoodUserHouseDailyService.insertBatch(entityList);
+ }
+
+ @Override
+ public void statAgency(FactUserHouseFormDTO formDTO) {
+ if (StringUtils.isBlank(formDTO.getDateId())) {
+ formDTO.setDateId(DateUtils.getBeforeNDay(NumConstant.ONE));
+ }
+
+ Map params = new HashMap<>();
+ params.put("dateId", formDTO.getDateId());
+ params.put("customerId", formDTO.getCustomerId());
+ List list = factGridUserHouseDailyService.list(params);
+ if (list.isEmpty()) {
+ return;
+ }
+
+ // 先删除历史
+ factAgencyUserHouseDailyService.deleteByDateId(formDTO);
+
+ // 使用机构表左关联,对不同纬度的机构进行分组统计
+ formDTO.setLevel("community");
+ List commList = factGridUserHouseDailyService.statAgency(formDTO);
+ if (!commList.isEmpty()) {
+ commList.forEach(item -> item.setDateId(formDTO.getDateId()));
+ factAgencyUserHouseDailyService.insertBatch(ConvertUtils.sourceToTarget(commList, FactAgencyUserHouseDailyEntity.class));
+ }
+ formDTO.setLevel("street");
+ List streetList = factGridUserHouseDailyService.statAgency(formDTO);
+ if (!streetList.isEmpty()) {
+ streetList.forEach(item -> item.setDateId(formDTO.getDateId()));
+ factAgencyUserHouseDailyService.insertBatch(ConvertUtils.sourceToTarget(streetList, FactAgencyUserHouseDailyEntity.class));
+ }
+ formDTO.setLevel("district");
+ List districtList = factGridUserHouseDailyService.statAgency(formDTO);
+ if (!districtList.isEmpty()) {
+ districtList.forEach(item -> item.setDateId(formDTO.getDateId()));
+ factAgencyUserHouseDailyService.insertBatch(ConvertUtils.sourceToTarget(districtList, FactAgencyUserHouseDailyEntity.class));
+ }
+ formDTO.setLevel("city");
+ List cityList = factGridUserHouseDailyService.statAgency(formDTO);
+ if (!cityList.isEmpty()) {
+ cityList.forEach(item -> item.setDateId(formDTO.getDateId()));
+ factAgencyUserHouseDailyService.insertBatch(ConvertUtils.sourceToTarget(cityList, FactAgencyUserHouseDailyEntity.class));
+ }
+ formDTO.setLevel("province");
+ List provinceList = factGridUserHouseDailyService.statAgency(formDTO);
+ if (!provinceList.isEmpty()) {
+ provinceList.forEach(item -> item.setDateId(formDTO.getDateId()));
+ factAgencyUserHouseDailyService.insertBatch(ConvertUtils.sourceToTarget(provinceList, FactAgencyUserHouseDailyEntity.class));
+ }
+
+ }
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/IcResiUserService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/IcResiUserService.java
new file mode 100644
index 0000000000..a3c689b8a8
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/IcResiUserService.java
@@ -0,0 +1,55 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service.user;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.dto.stats.form.FactUserHouseFormDTO;
+import com.epmet.dto.stats.result.FactUserHouseResultDTO;
+import com.epmet.entity.user.IcResiUserEntity;
+
+import java.util.List;
+
+/**
+ * 用户基础信息
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-10-26
+ */
+public interface IcResiUserService extends BaseService {
+
+ /**
+ * 居民统计
+ *
+ * @param formDTO
+ * @return java.util.List
+ * @author zhy
+ * @date 2022/5/30 13:33
+ */
+ List userStat(FactUserHouseFormDTO formDTO);
+
+ /**
+ * 居民统计(小区)
+ *
+ * @param formDTO
+ * @return java.util.List
+ * @author wgf
+ * @date 2022/5/30 13:33
+ */
+ List userStatNew(FactUserHouseFormDTO formDTO);
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/IcResiUserServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/IcResiUserServiceImpl.java
new file mode 100644
index 0000000000..e1f1e9ef1e
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/IcResiUserServiceImpl.java
@@ -0,0 +1,55 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service.user.impl;
+
+import com.epmet.commons.dynamic.datasource.annotation.DataSource;
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.commons.tools.feign.ResultDataResolver;
+import com.epmet.constant.DataSourceConstant;
+import com.epmet.dao.user.IcResiUserDao;
+import com.epmet.dto.stats.form.FactUserHouseFormDTO;
+import com.epmet.dto.stats.result.FactUserHouseResultDTO;
+import com.epmet.entity.user.IcResiUserEntity;
+import com.epmet.service.user.IcResiUserService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 用户基础信息
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-10-26
+ */
+@Slf4j
+@DataSource(DataSourceConstant.EPMET_USER)
+@Service
+public class IcResiUserServiceImpl extends BaseServiceImpl implements IcResiUserService, ResultDataResolver {
+
+ @Override
+ public List userStat(FactUserHouseFormDTO formDTO) {
+ return baseDao.userStat(formDTO);
+ }
+
+ @Override
+ public List userStatNew(FactUserHouseFormDTO formDTO) {
+ return baseDao.userStatNew(formDTO);
+ }
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.32__fact_grid_user_house_daily.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.32__fact_grid_user_house_daily.sql
new file mode 100644
index 0000000000..a5ce1a6c8b
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.32__fact_grid_user_house_daily.sql
@@ -0,0 +1,85 @@
+/*
+ Navicat Premium Data Transfer
+
+ Source Server : epmet_cloud_dev_statistical
+ Source Server Type : MySQL
+ Source Server Version : 50726
+ Source Host : 192.168.1.140:3306
+ Source Schema : epmet_data_statistical
+
+ Target Server Type : MySQL
+ Target Server Version : 50726
+ File Encoding : 65001
+
+ Date: 31/05/2022 13:29:46
+*/
+
+SET NAMES utf8mb4;
+SET FOREIGN_KEY_CHECKS = 0;
+
+-- ----------------------------
+-- Table structure for fact_grid_user_house_daily
+-- ----------------------------
+DROP TABLE IF EXISTS `fact_grid_user_house_daily`;
+CREATE TABLE `fact_grid_user_house_daily` (
+ `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键,customer_id+grid_id+date_id只有一条记录',
+ `CUSTOMER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户id',
+ `DATE_ID` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '数据更新至:yyyyMMdd; ',
+ `GRID_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '网格id',
+ `PID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '网格所属的组织id',
+ `PIDS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '网格所有上级id',
+ `NEIGHBOURHOODS_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '小区总数',
+ `HOUSE_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '房屋总数',
+ `HOUSE_SELF_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '自住房屋总数',
+ `HOUSE_LEASE_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '出租房屋总数',
+ `HOUSE_IDLE_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '闲置房屋总数',
+ `USER_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '居民总数',
+ `USER_RESI_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '常住居民总数',
+ `USER_FLOAT_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '流动居民总数',
+ `HOUSE_INCR` int(11) NOT NULL DEFAULT 0 COMMENT '当日新增房屋数',
+ `HOUSE_MODIFY` int(11) NOT NULL DEFAULT 0 COMMENT '当日修改房屋数',
+ `USER_INCR` int(11) NOT NULL DEFAULT 0 COMMENT '当日新增居民数',
+ `USER_MODIFY` int(11) NOT NULL DEFAULT 0 COMMENT '当日修改居民数',
+ `DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除',
+ `REVISION` int(11) NOT NULL DEFAULT 0 COMMENT '乐观锁',
+ `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人',
+ `CREATED_TIME` datetime NOT NULL COMMENT '创建时间:第一次提交审核的时间,注意和历史表的第一条记录时间一致',
+ `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人',
+ `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
+ PRIMARY KEY (`ID`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '网格的人房信息统计数,按天统计' ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Table structure for fact_agency_user_house_daily
+-- ----------------------------
+DROP TABLE IF EXISTS `fact_agency_user_house_daily`;
+CREATE TABLE `fact_agency_user_house_daily` (
+ `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键,customer_id+AGENCY_ID+date_id只有一条记录',
+ `CUSTOMER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户id',
+ `DATE_ID` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '数据更新至:yyyyMMdd; ',
+ `AGENCY_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '组织id',
+ `LEVEL` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'agency_id所属的机关级别(社区级:community,\r\n乡(镇、街道)级:street,\r\n区县级: district,\r\n市级: city\r\n省级:province)',
+ `PID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '组织i所属的组织id',
+ `PIDS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '组织i所有上级id',
+ `NEIGHBOURHOODS_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '小区总数',
+ `HOUSE_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '房屋总数',
+ `HOUSE_SELF_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '自住房屋总数',
+ `HOUSE_LEASE_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '出租房屋总数',
+ `HOUSE_IDLE_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '闲置房屋总数',
+ `USER_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '居民总数',
+ `USER_RESI_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '常住居民总数',
+ `USER_FLOAT_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '流动居民总数',
+ `HOUSE_INCR` int(11) NOT NULL DEFAULT 0 COMMENT '当日新增房屋数',
+ `HOUSE_MODIFY` int(11) NOT NULL DEFAULT 0 COMMENT '当日修改房屋数',
+ `USER_INCR` int(11) NOT NULL DEFAULT 0 COMMENT '当日新增居民数',
+ `USER_MODIFY` int(11) NOT NULL DEFAULT 0 COMMENT '当日修改居民数',
+ `DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除',
+ `REVISION` int(11) NOT NULL DEFAULT 0 COMMENT '乐观锁',
+ `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人',
+ `CREATED_TIME` datetime NOT NULL COMMENT '创建时间:第一次提交审核的时间,注意和历史表的第一条记录时间一致',
+ `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人',
+ `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
+ PRIMARY KEY (`ID`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '人房信息统计数,按天统计' ROW_FORMAT = DYNAMIC;
+
+SET FOREIGN_KEY_CHECKS = 1;
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/logback-spring.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/logback-spring.xml
index 90d3242709..1a92303138 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/logback-spring.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/logback-spring.xml
@@ -138,11 +138,35 @@
+
+
+
+ ${log.path}/rocketmqclient.log
+
+
+ %d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%X{Transaction-Serial}] %-5level %logger{50} - %msg%n
+ UTF-8
+
+
+
+ ${log.path}/rocketmqclient-%d{yyyy-MM-dd}.%i.log
+
+ 100MB
+
+
+ 15
+
+
+
+
+
+
+
@@ -166,6 +190,10 @@
+
+
+
+
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml
new file mode 100644
index 0000000000..1510478bc4
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/IcHouseDao.xml
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+ SELECT
+ g.CUSTOMER_ID,
+ g.id AS GRID_ID,
+ g.PID,
+ g.PIDS,
+ sum( CASE WHEN t.RENT_FLAG = '0' THEN 1 ELSE 0 END ) AS houseSelfCount,
+ sum( CASE WHEN t.RENT_FLAG = '1' THEN 1 ELSE 0 END ) AS houseLeaseCount,
+ sum( CASE WHEN t.RENT_FLAG = '2' THEN 1 ELSE 0 END ) AS houseIdleCount,
+ sum( CASE WHEN t.id IS NOT NULL THEN 1 ELSE 0 END ) AS houseCount,
+ sum( CASE WHEN (t.id IS NOT NULL and DATE_FORMAT(t.CREATED_TIME,'%Y-%m-%d') = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 DAY ),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS houseIncr,
+ sum( CASE WHEN (t.id IS NOT NULL and t.CREATED_TIME != t.UPDATED_TIME and DATE_FORMAT(t.UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 DAY ),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS houseModify
+ FROM
+ customer_grid g
+ LEFT JOIN (
+ SELECT
+ h.id,
+ h.RENT_FLAG,
+ n.GRID_ID,
+ h.CREATED_TIME,
+ h.UPDATED_TIME
+ FROM
+ ic_house h
+ LEFT JOIN ic_neighbor_hood n ON h.NEIGHBOR_HOOD_ID = n.id
+ WHERE h.CREATED_TIME < DATE_ADD( DATE_FORMAT(#{dateId},'%Y-%m-%d'), INTERVAL 1 DAY )
+ AND n.DEL_FLAG = '0'
+ AND h.DEL_FLAG = '0'
+ ) t ON t.GRID_ID = g.ID
+ WHERE
+ g.DEL_FLAG = '0'
+
+ AND g.CUSTOMER_ID = #{customerId}
+
+ GROUP BY
+ g.CUSTOMER_ID,
+ g.id
+
+
+
+ SELECT
+ t.NEIGHBOR_HOOD_ID as NEIGHBOURHOODS_ID,
+ g.CUSTOMER_ID,
+ g.id AS GRID_ID,
+ g.PID,
+ g.PIDS,
+ sum( CASE WHEN t.RENT_FLAG = '0' THEN 1 ELSE 0 END ) AS houseSelfCount,
+ sum( CASE WHEN t.RENT_FLAG = '1' THEN 1 ELSE 0 END ) AS houseLeaseCount,
+ sum( CASE WHEN t.RENT_FLAG = '2' THEN 1 ELSE 0 END ) AS houseIdleCount,
+ sum( CASE WHEN t.id IS NOT NULL THEN 1 ELSE 0 END ) AS houseCount,
+ sum( CASE WHEN (t.id IS NOT NULL and DATE_FORMAT(t.CREATED_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS houseIncr,
+ sum( CASE WHEN (t.id IS NOT NULL and t.CREATED_TIME != t.UPDATED_TIME and DATE_FORMAT(t.UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS houseModify
+ FROM (
+ SELECT
+ h.id,
+ h.RENT_FLAG,
+ n.GRID_ID,
+ h.CREATED_TIME,
+ h.UPDATED_TIME,
+ h.NEIGHBOR_HOOD_ID
+ FROM
+ ic_house h
+ LEFT JOIN ic_neighbor_hood n ON h.NEIGHBOR_HOOD_ID = n.id
+ WHERE h.CREATED_TIME < DATE_ADD( DATE_FORMAT(#{dateId},'%Y-%m-%d'), INTERVAL 1 DAY )
+ AND n.DEL_FLAG = '0'
+ AND h.DEL_FLAG = '0'
+ ) t
+ left join customer_grid g on g.id = t.GRID_ID and g.DEL_FLAG = '0'
+ WHERE 1=1
+
+ AND g.CUSTOMER_ID = #{customerId}
+
+ GROUP BY
+ g.CUSTOMER_ID,t.NEIGHBOR_HOOD_ID
+
+
+
+ SELECT
+ g.CUSTOMER_ID,
+ g.id AS GRID_ID,
+ g.PID,
+ g.PIDS,
+ count( n.id ) AS neighbourhoodsCount
+ FROM
+ customer_grid g
+ LEFT JOIN ic_neighbor_hood n ON n.GRID_ID = g.id
+ AND n.CREATED_TIME < DATE_ADD( DATE_FORMAT(#{dateId},'%Y-%m-%d'), INTERVAL 1 DAY )
+ AND n.DEL_FLAG = '0'
+ WHERE
+ g.DEL_FLAG = '0'
+
+ AND g.CUSTOMER_ID = #{customerId}
+
+ GROUP BY
+ g.CUSTOMER_ID,
+ g.id;
+
+
+
+ SELECT
+ n.ID as NEIGHBOURHOODS_ID,
+ n.NEIGHBOR_HOOD_NAME,
+ n.CUSTOMER_ID,
+ g.id AS GRID_ID,
+ g.PID,
+ g.PIDS,
+ 1 AS neighbourhoodsCount
+ FROM
+ ic_neighbor_hood n
+ LEFT JOIN customer_grid g ON n.GRID_ID = g.id and g.DEL_FLAG = '0'
+ AND n.CREATED_TIME < DATE_ADD( DATE_FORMAT(#{dateId},'%Y-%m-%d'), INTERVAL 1 DAY )
+ WHERE n.DEL_FLAG = '0'
+
+ AND n.CUSTOMER_ID = #{customerId}
+
+ GROUP BY
+ n.CUSTOMER_ID,n.ID;
+
+
+
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml
index a1e6a233d0..2ee065b4b5 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml
@@ -4,7 +4,7 @@
- SELECT
+ SELECT DISTINCT
pro.project_id AS "projectId",
pro.operation AS "operation",
DATE_FORMAT(pro.created_time, "%Y-%m-%d") AS "createdTime",
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyUserHouseDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyUserHouseDailyDao.xml
new file mode 100644
index 0000000000..9752b42407
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyUserHouseDailyDao.xml
@@ -0,0 +1,138 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SELECT
+ d.AGENCY_NAME AS AGENCY_NAME,
+ max( NEIGHBOURHOODS_COUNT ) AS NEIGHBOURHOODS_COUNT,
+ max( HOUSE_COUNT ) AS HOUSE_COUNT,
+ max( HOUSE_SELF_COUNT ) AS HOUSE_SELF_COUNT,
+ max( HOUSE_LEASE_COUNT ) AS HOUSE_LEASE_COUNT,
+ max( HOUSE_IDLE_COUNT ) AS HOUSE_IDLE_COUNT,
+ max( USER_COUNT ) AS USER_COUNT,
+ max( USER_RESI_COUNT ) AS USER_RESI_COUNT,
+ max( USER_FLOAT_COUNT ) AS USER_FLOAT_COUNT,
+ max( HOUSE_INCR ) AS HOUSE_INCR,
+ max( HOUSE_MODIFY ) AS HOUSE_MODIFY,
+ max( USER_INCR ) AS USER_INCR,
+ max( USER_MODIFY ) AS USER_MODIFY
+ FROM
+ fact_agency_user_house_daily a
+ LEFT JOIN dim_agency d ON d.id = a.AGENCY_ID
+ WHERE
+ d.DEL_FLAG = '0'
+
+ AND a.CUSTOMER_ID = #{customerId}
+ AND d.CUSTOMER_ID = #{customerId}
+
+
+ AND a.DATE_ID = #{dateId}
+
+
+ AND a.LEVEL = 'community'
+ AND a.PID = #{agencyId}
+
+
+ AND a.LEVEL = 'street'
+ AND a.PID = #{agencyId}
+
+
+ AND a.LEVEL = 'district'
+ AND a.PID = #{agencyId}
+
+
+ AND a.LEVEL = 'city'
+ AND a.PID = #{agencyId}
+
+
+ AND DATE_FORMAT( a.DATE_ID, '%Y-%m-%d' ) >= DATE_FORMAT( #{startTime}, '%Y-%m-%d' )
+
+
+ AND DATE_FORMAT( a.DATE_ID, '%Y-%m-%d' ) <= DATE_FORMAT( #{endTime}, '%Y-%m-%d' )
+
+ GROUP BY
+ a.AGENCY_ID
+
+
+
+ SELECT
+ d.AGENCY_NAME AS AGENCY_NAME,
+ sum( NEIGHBOURHOODS_COUNT ) AS NEIGHBOURHOODS_COUNT,
+ sum( HOUSE_COUNT ) AS HOUSE_COUNT,
+ sum( HOUSE_SELF_COUNT ) AS HOUSE_SELF_COUNT,
+ sum( HOUSE_LEASE_COUNT ) AS HOUSE_LEASE_COUNT,
+ sum( HOUSE_IDLE_COUNT ) AS HOUSE_IDLE_COUNT,
+ sum( USER_COUNT ) AS USER_COUNT,
+ sum( USER_RESI_COUNT ) AS USER_RESI_COUNT,
+ sum( USER_FLOAT_COUNT ) AS USER_FLOAT_COUNT,
+ sum( HOUSE_INCR ) AS HOUSE_INCR,
+ sum( HOUSE_MODIFY ) AS HOUSE_MODIFY,
+ sum( USER_INCR ) AS USER_INCR,
+ sum( USER_MODIFY ) AS USER_MODIFY
+ FROM
+ fact_agency_user_house_daily a
+ LEFT JOIN dim_agency d ON d.id = a.AGENCY_ID
+ WHERE
+ d.DEL_FLAG = '0'
+
+ AND a.CUSTOMER_ID = #{customerId}
+ AND d.CUSTOMER_ID = #{customerId}
+
+
+ AND a.AGENCY_ID = #{agencyId}
+
+
+ AND a.DATE_ID = #{dateId}
+
+
+ AND DATE_FORMAT( a.DATE_ID, '%Y-%m-%d' ) >= DATE_FORMAT( #{startTime}, '%Y-%m-%d' )
+
+
+ AND DATE_FORMAT( a.DATE_ID, '%Y-%m-%d' ) <= DATE_FORMAT( #{endTime}, '%Y-%m-%d' )
+
+ GROUP BY
+ a.DATE_ID
+ ORDER BY
+ a.DATE_ID ASC
+
+
+
+ DELETE
+ FROM
+ fact_agency_user_house_daily
+ WHERE
+ DATE_ID = #{dateId}
+ AND CUSTOMER_ID = #{customerId}
+
+
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml
new file mode 100644
index 0000000000..b46b9467eb
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml
@@ -0,0 +1,237 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SELECT
+ g.GRID_NAME AS AGENCY_NAME,
+ max( NEIGHBOURHOODS_COUNT ) AS NEIGHBOURHOODS_COUNT,
+ max( HOUSE_COUNT ) AS HOUSE_COUNT,
+ max( HOUSE_SELF_COUNT ) AS HOUSE_SELF_COUNT,
+ max( HOUSE_LEASE_COUNT ) AS HOUSE_LEASE_COUNT,
+ max( HOUSE_IDLE_COUNT ) AS HOUSE_IDLE_COUNT,
+ max( USER_COUNT ) AS USER_COUNT,
+ max( USER_RESI_COUNT ) AS USER_RESI_COUNT,
+ max( USER_FLOAT_COUNT ) AS USER_FLOAT_COUNT,
+ max( HOUSE_INCR ) AS HOUSE_INCR,
+ max( HOUSE_MODIFY ) AS HOUSE_MODIFY,
+ max( USER_INCR ) AS USER_INCR,
+ max( USER_MODIFY ) AS USER_MODIFY
+ FROM
+ fact_grid_user_house_daily d
+ LEFT JOIN dim_grid g ON g.id = d.GRID_ID
+ WHERE
+ g.DEL_FLAG = '0'
+
+ AND g.CUSTOMER_ID = #{customerId}
+ AND d.CUSTOMER_ID = #{customerId}
+
+
+ AND d.GRID_ID = #{agencyId}
+
+
+ AND d.PID = #{agencyId}
+
+
+ AND d.DATE_ID = #{dateId}
+
+
+ AND DATE_FORMAT( d.DATE_ID, '%Y-%m-%d' ) >= DATE_FORMAT( #{startTime}, '%Y-%m-%d' )
+
+
+ AND DATE_FORMAT( d.DATE_ID, '%Y-%m-%d' ) <= DATE_FORMAT( #{endTime}, '%Y-%m-%d' )
+
+ GROUP BY
+ GRID_ID
+
+
+
+ SELECT
+ g.GRID_NAME AS AGENCY_NAME,
+ sum( NEIGHBOURHOODS_COUNT ) AS NEIGHBOURHOODS_COUNT,
+ sum( HOUSE_COUNT ) AS HOUSE_COUNT,
+ sum( HOUSE_SELF_COUNT ) AS HOUSE_SELF_COUNT,
+ sum( HOUSE_LEASE_COUNT ) AS HOUSE_LEASE_COUNT,
+ sum( HOUSE_IDLE_COUNT ) AS HOUSE_IDLE_COUNT,
+ sum( USER_COUNT ) AS USER_COUNT,
+ sum( USER_RESI_COUNT ) AS USER_RESI_COUNT,
+ sum( USER_FLOAT_COUNT ) AS USER_FLOAT_COUNT,
+ sum( HOUSE_INCR ) AS HOUSE_INCR,
+ sum( HOUSE_MODIFY ) AS HOUSE_MODIFY,
+ sum( USER_INCR ) AS USER_INCR,
+ sum( USER_MODIFY ) AS USER_MODIFY
+ FROM
+ fact_grid_user_house_daily d
+ LEFT JOIN dim_grid g ON g.id = d.GRID_ID
+ LEFT JOIN dim_agency a ON a.id = d.PID
+ WHERE
+ g.DEL_FLAG = '0'
+
+ AND g.CUSTOMER_ID = #{customerId}
+ AND d.CUSTOMER_ID = #{customerId}
+
+
+ AND d.GRID_ID = #{agencyId}
+
+
+ AND d.DATE_ID = #{dateId}
+
+
+ AND DATE_FORMAT( d.DATE_ID, '%Y-%m-%d' ) >= DATE_FORMAT( #{startTime}, '%Y-%m-%d' )
+
+
+ AND DATE_FORMAT( d.DATE_ID, '%Y-%m-%d' ) <= DATE_FORMAT( #{endTime}, '%Y-%m-%d' )
+
+ GROUP BY
+ d.DATE_ID
+ ORDER BY
+ d.DATE_ID ASC
+
+
+
+ SELECT
+ t.*,
+ ag.id AS AGENCY_ID,
+ ag.CUSTOMER_ID,
+ ag.`LEVEL`,
+ ag.PID,
+ ag.PIDS
+ FROM
+ dim_agency ag
+ LEFT JOIN (
+ SELECT
+
+ c.id AS AGENCY,
+
+
+ s.id AS AGENCY,
+
+
+ di.id AS AGENCY,
+
+
+ ci.id AS AGENCY,
+
+
+ p.id AS AGENCY,
+
+ sum( NEIGHBOURHOODS_COUNT ) AS NEIGHBOURHOODS_COUNT,
+ sum( HOUSE_COUNT ) AS HOUSE_COUNT,
+ sum( HOUSE_SELF_COUNT ) AS HOUSE_SELF_COUNT,
+ sum( HOUSE_LEASE_COUNT ) AS HOUSE_LEASE_COUNT,
+ sum( HOUSE_IDLE_COUNT ) AS HOUSE_IDLE_COUNT,
+ sum( USER_COUNT ) AS USER_COUNT,
+ sum( USER_RESI_COUNT ) AS USER_RESI_COUNT,
+ sum( USER_FLOAT_COUNT ) AS USER_FLOAT_COUNT,
+ sum( HOUSE_INCR ) AS HOUSE_INCR,
+ sum( HOUSE_MODIFY ) AS HOUSE_MODIFY,
+ sum( USER_INCR ) AS USER_INCR,
+ sum( USER_MODIFY ) AS USER_MODIFY
+ FROM
+ fact_grid_user_house_daily d
+ INNER JOIN dim_grid g ON g.id = d.GRID_ID
+ INNER JOIN dim_agency c ON c.id = g.AGENCY_ID
+
+ WHERE
+ d.DATE_ID = #{dateId}
+ AND d.CUSTOMER_ID = #{customerId}
+ GROUP BY
+ c.id
+
+
+ INNER JOIN dim_agency s ON s.id = c.pid
+ WHERE
+ d.DATE_ID = #{dateId}
+ AND d.CUSTOMER_ID = #{customerId}
+ GROUP BY
+ s.id
+
+
+ INNER JOIN dim_agency s ON s.id = c.pid
+ INNER JOIN dim_agency di ON di.id = s.pid
+ WHERE
+ d.DATE_ID = #{dateId}
+ AND d.CUSTOMER_ID = #{customerId}
+ GROUP BY
+ di.id
+
+
+ INNER JOIN dim_agency s ON s.id = c.pid
+ INNER JOIN dim_agency di ON di.id = s.pid
+ INNER JOIN dim_agency ci ON ci.id = di.pid
+ INNER JOIN dim_agency p ON p.id = ci.pid
+ WHERE
+ d.DATE_ID = #{dateId}
+ AND d.CUSTOMER_ID = #{customerId}
+ GROUP BY
+ ci.id
+
+
+ INNER JOIN dim_agency s ON s.id = c.pid
+ INNER JOIN dim_agency di ON di.id = s.pid
+ INNER JOIN dim_agency ci ON ci.id = di.pid
+ INNER JOIN dim_agency p ON p.id = ci.pid
+ WHERE
+ d.DATE_ID = #{dateId}
+ AND d.CUSTOMER_ID = #{customerId}
+ GROUP BY
+ p.id
+
+ ) t ON t.AGENCY = ag.id
+ WHERE
+ ag.CUSTOMER_ID = #{customerId}
+ AND ag.AGENCY_DIM_TYPE = 'all'
+
+ AND ag.`LEVEL` = 'community'
+
+
+ AND ag.`LEVEL` = 'street'
+
+
+ AND ag.`LEVEL` = 'district'
+
+
+ AND ag.`LEVEL` = 'city'
+
+
+ AND ag.`LEVEL` = 'province'
+
+
+
+
+ DELETE
+ FROM
+ fact_grid_user_house_daily
+ WHERE
+ DATE_ID = #{dateId}
+ AND CUSTOMER_ID = #{customerId}
+
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactNeighborhoodUserHouseDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactNeighborhoodUserHouseDailyDao.xml
new file mode 100644
index 0000000000..4ff079453d
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactNeighborhoodUserHouseDailyDao.xml
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DELETE
+ FROM
+ fact_neighborhood_user_house_daily
+ WHERE
+ DATE_ID = #{dateId}
+ AND CUSTOMER_ID = #{customerId}
+
+
+
+ SELECT
+ d.NEIGHBOR_HOOD_NAME AS AGENCY_NAME,
+ d.NEIGHBOURHOODS_ID,
+ d.NEIGHBOR_HOOD_NAME,
+ max( NEIGHBOURHOODS_COUNT ) AS NEIGHBOURHOODS_COUNT,
+ max( HOUSE_COUNT ) AS HOUSE_COUNT,
+ max( HOUSE_SELF_COUNT ) AS HOUSE_SELF_COUNT,
+ max( HOUSE_LEASE_COUNT ) AS HOUSE_LEASE_COUNT,
+ max( HOUSE_IDLE_COUNT ) AS HOUSE_IDLE_COUNT,
+ max( USER_COUNT ) AS USER_COUNT,
+ max( USER_RESI_COUNT ) AS USER_RESI_COUNT,
+ max( USER_FLOAT_COUNT ) AS USER_FLOAT_COUNT,
+ max( HOUSE_INCR ) AS HOUSE_INCR,
+ max( HOUSE_MODIFY ) AS HOUSE_MODIFY,
+ max( USER_INCR ) AS USER_INCR,
+ max( USER_MODIFY ) AS USER_MODIFY
+ FROM
+ fact_neighborhood_user_house_daily d
+ LEFT JOIN dim_grid g ON g.id = d.GRID_ID
+ WHERE
+ g.DEL_FLAG = '0'
+
+ AND g.CUSTOMER_ID = #{customerId}
+ AND d.CUSTOMER_ID = #{customerId}
+
+
+ AND d.NEIGHBOURHOODS_ID = #{agencyId}
+
+
+ AND d.GRID_ID = #{agencyId}
+
+
+ AND d.DATE_ID = #{dateId}
+
+
+ AND DATE_FORMAT( d.DATE_ID, '%Y-%m-%d' ) >= DATE_FORMAT( #{startTime}, '%Y-%m-%d' )
+
+
+ AND DATE_FORMAT( d.DATE_ID, '%Y-%m-%d' ) <= DATE_FORMAT( #{endTime}, '%Y-%m-%d' )
+
+ GROUP BY d.NEIGHBOURHOODS_ID
+
+
+
+ SELECT
+ d.NEIGHBOR_HOOD_NAME AS AGENCY_NAME,
+ sum( NEIGHBOURHOODS_COUNT ) AS NEIGHBOURHOODS_COUNT,
+ sum( HOUSE_COUNT ) AS HOUSE_COUNT,
+ sum( HOUSE_SELF_COUNT ) AS HOUSE_SELF_COUNT,
+ sum( HOUSE_LEASE_COUNT ) AS HOUSE_LEASE_COUNT,
+ sum( HOUSE_IDLE_COUNT ) AS HOUSE_IDLE_COUNT,
+ sum( USER_COUNT ) AS USER_COUNT,
+ sum( USER_RESI_COUNT ) AS USER_RESI_COUNT,
+ sum( USER_FLOAT_COUNT ) AS USER_FLOAT_COUNT,
+ sum( HOUSE_INCR ) AS HOUSE_INCR,
+ sum( HOUSE_MODIFY ) AS HOUSE_MODIFY,
+ sum( USER_INCR ) AS USER_INCR,
+ sum( USER_MODIFY ) AS USER_MODIFY
+ FROM
+ fact_neighborhood_user_house_daily d
+ WHERE d.DEL_FLAG = '0'
+
+ AND d.CUSTOMER_ID = #{customerId}
+
+
+ AND d.NEIGHBOURHOODS_ID = #{agencyId}
+
+
+ AND d.DATE_ID = #{dateId}
+
+
+ AND DATE_FORMAT( d.DATE_ID, '%Y-%m-%d' ) >= DATE_FORMAT( #{startTime}, '%Y-%m-%d' )
+
+
+ AND DATE_FORMAT( d.DATE_ID, '%Y-%m-%d' ) <= DATE_FORMAT( #{endTime}, '%Y-%m-%d' )
+
+ GROUP BY
+ d.DATE_ID
+ ORDER BY
+ d.DATE_ID ASC
+
+
+
+
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml
new file mode 100644
index 0000000000..94ed1819ee
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/IcResiUserDao.xml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+ SELECT
+ CUSTOMER_ID,
+ GRID_ID,
+ sum( CASE WHEN IS_FLOATING = '0' THEN 1 ELSE 0 END ) AS userResiCount,
+ sum( CASE WHEN IS_FLOATING = '1' THEN 1 ELSE 0 END ) AS userFloatCount,
+ sum( CASE WHEN id IS NOT NULL THEN 1 ELSE 0 END ) AS userCount,
+ sum( CASE WHEN (id IS NOT NULL and DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 DAY ),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS userIncr,
+ sum( CASE WHEN (id IS NOT NULL and CREATED_TIME != UPDATED_TIME and DATE_FORMAT(UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 DAY ),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS userModify
+ FROM
+ ic_resi_user
+ WHERE
+ del_flag = '0'
+ AND STATUS = '0'
+ AND CREATED_TIME <= DATE_ADD( DATE_FORMAT(#{dateId},'%Y-%m-%d'), INTERVAL 1 DAY )
+ GROUP BY
+ CUSTOMER_ID,
+ GRID_ID
+
+
+
+ SELECT
+ CUSTOMER_ID,
+ GRID_ID,
+ VILLAGE_ID as NEIGHBOURHOODS_ID,
+ sum( CASE WHEN IS_FLOATING = '0' THEN 1 ELSE 0 END ) AS userResiCount,
+ sum( CASE WHEN IS_FLOATING = '1' THEN 1 ELSE 0 END ) AS userFloatCount,
+ sum( CASE WHEN id IS NOT NULL THEN 1 ELSE 0 END ) AS userCount,
+ sum( CASE WHEN (id IS NOT NULL and DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS userIncr,
+ sum( CASE WHEN (id IS NOT NULL and CREATED_TIME != UPDATED_TIME and DATE_FORMAT(UPDATED_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d')) THEN 1 ELSE 0 END ) AS userModify
+ FROM
+ ic_resi_user
+ WHERE
+ del_flag = '0'
+ AND STATUS = '0'
+ AND CREATED_TIME <= DATE_ADD( DATE_FORMAT(#{dateId},'%Y-%m-%d'), INTERVAL 1 DAY )
+ GROUP BY
+ CUSTOMER_ID,
+ VILLAGE_ID
+
+
+
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceOrgDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceOrgDTO.java
new file mode 100644
index 0000000000..42d8fcf19b
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceOrgDTO.java
@@ -0,0 +1,115 @@
+package com.epmet.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+ * 服务组织表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-27
+ */
+@Data
+public class IcServiceOrgDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * ID
+ */
+ private String id;
+
+ /**
+ * 客户Id
+ */
+ private String customerId;
+
+ /**
+ * 所属组织机构Id
+ */
+ private String agencyId;
+
+ /**
+ * agencyId的所有上级,包含自己
+ */
+ private String agencyIdPath;
+
+ /**
+ * 服务类别【字典表 ic_service_type】多个值逗号分隔
+ */
+ private String serviceType;
+
+ /**
+ * 服务组织名称
+ */
+ private String orgName;
+
+ /**
+ * 组织描述
+ */
+ private String orgDescribe;
+
+ /**
+ * 负责人姓名
+ */
+ private String principalName;
+
+ /**
+ * 负责人电话
+ */
+ private String principalMobile;
+
+ /**
+ * 经度
+ */
+ private String longitude;
+
+ /**
+ * 纬度
+ */
+ private String latitude;
+
+ /**
+ * 地址
+ */
+ private String address;
+
+ /**
+ * 备注
+ */
+ private String remark;
+
+ /**
+ * 删除标识
+ */
+ private String delFlag;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectAttachmentDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectAttachmentDTO.java
new file mode 100644
index 0000000000..6919112fde
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectAttachmentDTO.java
@@ -0,0 +1,116 @@
+package com.epmet.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+
+/**
+ * 事件附件表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-27
+ */
+@Data
+public class IcServiceProjectAttachmentDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ private String id;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 事件Id
+ */
+ private String icServiceId;
+
+ private String attachTo;
+
+ /**
+ * 附件名
+ */
+ private String attachmentName;
+ private String name;
+
+ /**
+ * 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS)
+ */
+ private String attachmentFormat;
+ private String format;
+
+ /**
+ * 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc))
+ */
+ private String attachmentType;
+ private String type;
+
+ /**
+ * 附件地址
+ */
+ private String attachmentUrl;
+ private String url;
+
+ /**
+ * 排序字段
+ */
+ private Integer sort;
+
+ /**
+ * 附件状态(审核中:auditing;
+auto_passed: 自动通过;
+review:结果不确定,需要人工审核;
+block: 结果违规;
+rejected:人工审核驳回;
+approved:人工审核通过)
+现在图片是同步审核的,所以图片只有auto_passed一种状态
+ */
+ private String status;
+
+ /**
+ * 失败原因
+ */
+ private String reason;
+
+ /**
+ * 语音或视频时长,秒
+ */
+ private Integer duration;
+
+ /**
+ * 删除标记 0:未删除,1:已删除
+ */
+ private String delFlag;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectDTO.java
new file mode 100644
index 0000000000..3d3a6c733f
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectDTO.java
@@ -0,0 +1,104 @@
+package com.epmet.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+
+/**
+ * 服务项目管理表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-27
+ */
+@Data
+public class IcServiceProjectDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * ID
+ */
+ private String id;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 组织ID
+ */
+ private String agencyId;
+
+ /**
+ * 组织ID的上级
+ */
+ private String pid;
+
+ /**
+ * 组织ID的所有上级[包括自己]
+ */
+ private String agencyIdPath;
+
+ /**
+ * 服务类别值
+ */
+ private String serviceCategoryKey;
+
+ /**
+ * 服务名称
+ */
+ private String serviceName;
+
+ /**
+ * 服务内容
+ */
+ private String serviceContent;
+
+ /**
+ * 政策级别,0市级;1区级;2街道级
+ */
+ private String policyLevel;
+
+ /**
+ * 政策依据
+ */
+ private String policyGround;
+
+ /**
+ * 启用状态,0启用,1禁用
+ */
+ private Integer enabled;
+
+ /**
+ *
+ */
+ private Integer delFlag;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceEditFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceEditFormDTO.java
new file mode 100644
index 0000000000..140e8269c1
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceEditFormDTO.java
@@ -0,0 +1,49 @@
+package com.epmet.dto.form;
+
+
+import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 【服务项目记录】修改
+ */
+@Data
+public class IcServiceEditFormDTO implements Serializable {
+ public interface AddUserInternalGroup {
+ }
+
+ public interface AddUserShowGroup extends CustomerClientShowGroup {
+ }
+
+ @NotBlank(message = "", groups = AddUserInternalGroup.class)
+ private String serviceRecordId;
+ private String principalName;
+ private String principalContact;
+ /**
+ * 服务时间
+ */
+ @NotNull(message = "起始服务时间不能为空", groups = AddUserShowGroup.class)
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ private Date serviceTimeStart;
+
+ /**
+ * 服务截止时间
+ */
+ @NotNull(message = "截止服务时间不能为空", groups = AddUserShowGroup.class)
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ private Date serviceTimeEnd;
+
+ /**
+ * 备注
+ */
+ private String remark;
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgAddEditFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgAddEditFormDTO.java
new file mode 100644
index 0000000000..3b95afef3f
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgAddEditFormDTO.java
@@ -0,0 +1,71 @@
+package com.epmet.dto.form;
+
+import com.epmet.commons.tools.validator.group.AddGroup;
+import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
+import com.epmet.commons.tools.validator.group.UpdateGroup;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * @Description 服务组织新增/修改
+ * @Author sun
+ */
+@Data
+public class IcServiceOrgAddEditFormDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+ public interface Del extends CustomerClientShowGroup {
+ }
+
+ /**
+ * 服务组织Id
+ */
+ @NotBlank(message = "服务组织Id不能为空", groups = {UpdateGroup.class, Del.class})
+ private String icServiceOrgId;
+ /**
+ * 服务类型,多个值逗号分隔,字典值,字典key:ic_service_type
+ */
+ @NotBlank(message = "服务类型不能为空", groups = {AddGroup.class})
+ private String serviceType;
+ /**
+ * 服务组织名称
+ */
+ @NotBlank(message = "服务组织名称不能为空", groups = {AddGroup.class})
+ private String orgName;
+ /**
+ * 组织描述
+ */
+ private String orgDescribe;
+ /**
+ * 负责人姓名
+ */
+ @NotBlank(message = "负责人姓名不能为空", groups = {AddGroup.class})
+ private String principalName;
+ /**
+ * 联系方式
+ */
+ @NotBlank(message = "联系方式不能为空", groups = {AddGroup.class})
+ private String principalMobile;
+ /**
+ * 经度
+ */
+ private String longitude;
+ /**
+ * 维度
+ */
+ private String latitude;
+ /**
+ * 服务地址
+ */
+ private String address;
+ /**
+ * 备注信息
+ */
+ private String remark;
+
+ private String customerId;
+ private String userId;
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgListFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgListFormDTO.java
new file mode 100644
index 0000000000..b0cceaeb79
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgListFormDTO.java
@@ -0,0 +1,46 @@
+package com.epmet.dto.form;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Description 【组织】服务组织列表--接口入参
+ * @Author sun
+ */
+@Data
+public class IcServiceOrgListFormDTO implements Serializable {
+ private static final long serialVersionUID = 9156247659994638103L;
+
+ /**
+ * 服务类型,字典值
+ */
+ private String serviceType;
+ /**
+ * 服务组织名称
+ */
+ private String orgName;
+ /**
+ * 服务地址
+ */
+ private String address;
+ /**
+ * 备注信息
+ */
+ private String remark;
+ /**
+ * 页码
+ */
+ private Integer pageNo = 1;
+ /**
+ * 每页显示数量
+ */
+ private Integer pageSize = 20;
+
+ private Boolean isPage = true;
+ private String icServiceOrgId;
+ private String customerId;
+ private String staffId;
+ private String agencyId;
+
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFeedbackFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFeedbackFormDTO.java
new file mode 100644
index 0000000000..231ab79b95
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFeedbackFormDTO.java
@@ -0,0 +1,57 @@
+package com.epmet.dto.form;
+
+import lombok.Data;
+
+import javax.validation.Valid;
+import javax.validation.constraints.NotBlank;
+import java.util.List;
+
+@Data
+public class ServiceProjectFeedbackFormDTO {
+
+ /**
+ * 反馈接口分组
+ */
+ public interface FeedbackGroup {}
+
+ /**
+ * 发起服务接口分组
+ */
+ public interface InitiateGroup {}
+
+ @NotBlank(message = "服务记录id不能为空", groups = { FeedbackGroup.class })
+ private String serviceRecordId;
+ private String serviceProjectId;
+ private String serviceGoal;
+ private String serviceEffect;
+ private Integer servicePeopleNumber;
+ /**
+ * 服务状态。in_service服务中;completed:已完成
+ */
+ @NotBlank(message = "服务状态不能为空", groups = { FeedbackGroup.class, InitiateGroup.class })
+ private String serviceStatus;
+ /**
+ * 满意度。不满意:bad、基本满意:good、非常满意:perfect
+ * 按理说,服务完成的时候才可以选,不完成应该不能选,可是谁知道呢,原型也没写
+ */
+ private String satisfaction;
+ private String longitude;
+ private String latitude;
+ private String address;
+
+ @Valid
+ private List attachmentList;
+
+ @Data
+ public static class Attachment {
+
+ @NotBlank(message = "附件名称不能为空", groups = { FeedbackGroup.class, InitiateGroup.class })
+ private String attachmentName;
+ @NotBlank(message = "附件格式不能为空", groups = { FeedbackGroup.class, InitiateGroup.class })
+ private String attachmentFormat;
+ @NotBlank(message = "附件类型不能为空", groups = { FeedbackGroup.class, InitiateGroup.class })
+ private String attachmentType;
+ @NotBlank(message = "附件url不能为空", groups = { FeedbackGroup.class, InitiateGroup.class })
+ private String attachmentUrl;
+ }
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFormDTO.java
new file mode 100644
index 0000000000..524628e95c
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFormDTO.java
@@ -0,0 +1,53 @@
+package com.epmet.dto.form;
+
+import com.epmet.dto.IcServiceProjectAttachmentDTO;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @Author zxc
+ * @DateTime 2022/5/27 15:53
+ * @DESC
+ */
+@Data
+public class ServiceProjectFormDTO implements Serializable {
+
+ private static final long serialVersionUID = -4573264697450644498L;
+
+ public interface ServiceProjectAddForm{}
+ public interface ServiceProjectUpdateForm{}
+
+ @NotBlank(message = "服务类别不能为空",groups = {ServiceProjectAddForm.class})
+ private String serviceCategoryKey;
+
+ @NotBlank(message = "服务名称不能为空",groups = {ServiceProjectAddForm.class,ServiceProjectUpdateForm.class})
+ private String serviceName;
+
+ @NotBlank(message = "服务内容不能为空",groups = {ServiceProjectAddForm.class,ServiceProjectUpdateForm.class})
+ private String serviceContent;
+
+ /**
+ * 政策依据
+ */
+ private String policyGround;
+
+ /**
+ * 政策级别,0市级;1区级;2街道级
+ */
+ private String policyLevel;
+
+ private String customerId;
+
+ private String userId;
+
+ @NotBlank(message = "serviceProjectId不能为空",groups = {ServiceProjectUpdateForm.class})
+ private String serviceProjectId;
+
+ /**
+ * 附件集合
+ */
+ private List attachmentList;
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectListFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectListFormDTO.java
new file mode 100644
index 0000000000..ff265a8a44
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectListFormDTO.java
@@ -0,0 +1,32 @@
+package com.epmet.dto.form;
+
+import com.epmet.commons.tools.dto.form.PageFormDTO;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2022/5/27 16:42
+ * @DESC
+ */
+@Data
+public class ServiceProjectListFormDTO extends PageFormDTO implements Serializable {
+
+ private static final long serialVersionUID = -6508966695564469253L;
+
+ public interface ServiceProjectDetail{}
+
+ private String serviceCategoryKey;
+ private String serviceName;
+ private String serviceContent;
+ private String policyGround;
+ private String customerId;
+ private String userId;
+ private String agencyId;
+
+ @NotBlank(message = "serviceProjectId不能为空",groups = ServiceProjectDetail.class)
+ private String serviceProjectId;
+
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectRecordFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectRecordFormDTO.java
new file mode 100644
index 0000000000..59d86bfac5
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectRecordFormDTO.java
@@ -0,0 +1,66 @@
+package com.epmet.dto.form;
+
+import com.epmet.dto.result.IcServiceScopeDTO;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import javax.validation.Valid;
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class ServiceProjectRecordFormDTO {
+
+ /**
+ * 发起服务
+ */
+ public interface Initiate {}
+
+ @NotBlank(message = "服务类别key不能为空", groups = { Initiate.class })
+ private String serviceCategoryKey;
+
+ @NotBlank(message = "服务项目Id不能为空", groups = { Initiate.class })
+ private String serviceProjectId;
+
+ private String serviceProjectName;
+
+ @NotBlank(message = "服务组织Id不能为空", groups = { Initiate.class })
+ private String serviceOrgId;
+
+ private String serviceOrgName;
+
+ @NotEmpty(message = "发布范围不能为空", groups = { Initiate.class })
+ private List serviceScope;
+
+ @NotNull(message = "服务起始时间不能为空", groups = { Initiate.class })
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ private Date serviceTimeStart;
+
+ @NotNull(message = "服务结束时间不能为空", groups = { Initiate.class })
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ private Date serviceTimeEnd;
+ private String serviceStatus;
+ private String satisfaction;
+
+ private String principalName;
+
+ private String principalContact;
+
+ /**
+ * 备注
+ */
+ private String remark;
+
+ @Valid
+ private ServiceProjectFeedbackFormDTO feedback;
+
+ private Integer pageNo = 1;
+ private Integer pageSize = 20;
+
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceFeedbackResDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceFeedbackResDTO.java
new file mode 100644
index 0000000000..394b5b6b40
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceFeedbackResDTO.java
@@ -0,0 +1,64 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 服务记录反馈
+ */
+@Data
+public class IcServiceFeedbackResDTO implements Serializable {
+
+ /**
+ * 反馈记录id
+ */
+ private String feedBackId;
+
+ /**
+ * 服务目标
+ */
+ private String serviceGoal;
+
+ /**
+ * 服务效果
+ */
+ private String serviceEffect;
+
+ /**
+ * 服务人数
+ */
+ // private Integer servicePeopleNumber;
+
+ /**
+ * 满意度。满意度 - 不满意:bad、基本满意:good、非常满意:perfect
+ */
+ private String satisfaction;
+
+ /**
+ * 地址经度
+ */
+ private String longitude;
+
+ /**
+ * 地址纬度
+ */
+ private String latitude;
+
+ /**
+ * 地址
+ */
+ private String address;
+
+ private List attachmentList;
+
+ @Data
+ public static class Attachment {
+ private String attachmentName;
+ private String attachmentFormat;
+ private String attachmentType;
+ private String attachmentUrl;
+ }
+
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgListResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgListResultDTO.java
new file mode 100644
index 0000000000..30164b69c4
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgListResultDTO.java
@@ -0,0 +1,81 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @Description 【组织】服务组织列表--接口返参
+ * @Author sun
+ */
+@Data
+public class IcServiceOrgListResultDTO implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 服务组织Id
+ */
+ private String icServiceOrgId;
+ /**
+ * 组织Id
+ */
+ private String agencyId;
+ /**
+ * 服务类别
+ */
+ private List serviceTypeList;
+ /**
+ * 服务类别,多个值逗号分隔
+ */
+ private String serviceType;
+ /**
+ * 服务类别,多个值顿号分隔
+ */
+ private String serviceTypeName;
+ /**
+ * 服务组织名称
+ */
+ private String orgName;
+ /**
+ * 组织描述
+ */
+ private String orgDescribe;
+ /**
+ * 负责人名称
+ */
+ private String principalName;
+ /**
+ * 负责人电话
+ */
+ private String principalMobile;
+ /**
+ * 经度
+ */
+ private String longitude;
+ /**
+ * 纬度
+ */
+ private String latitude;
+ /**
+ * 地址
+ */
+ private String address;
+ /**
+ * 备注
+ */
+ private String remark;
+
+ @Data
+ public static class ServiceType {
+ /**
+ * 服务类别值
+ */
+ private String value;
+ /**
+ * 服务类别名
+ */
+ private String name;
+ }
+
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgSelectListResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgSelectListResultDTO.java
new file mode 100644
index 0000000000..30f5ef457b
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgSelectListResultDTO.java
@@ -0,0 +1,24 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Description 【组织】服务组织列表_下拉框使用--接口返参
+ * @Author sun
+ */
+@Data
+public class IcServiceOrgSelectListResultDTO implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 服务组织Id
+ */
+ private String icServiceOrgId;
+ /**
+ * 服务组织名称
+ */
+ private String orgName;
+
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceRecDetailRes.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceRecDetailRes.java
new file mode 100644
index 0000000000..d1ef78ab5f
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceRecDetailRes.java
@@ -0,0 +1,90 @@
+package com.epmet.dto.result;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class IcServiceRecDetailRes implements Serializable {
+
+
+ /**
+ * 联系方式
+ */
+ private String principalContact;
+
+ /**
+ * 经办人姓名
+ */
+ private String principalName;
+
+ /**
+ * 备注
+ */
+ private String remark;
+
+ /**
+ * 服务类别ID
+ */
+ private String serviceCategoryKey;
+
+ /**
+ * 服务类别ID
+ */
+ private String serviceCategoryName;
+
+ /**
+ * 服务组织ID
+ */
+ private String serviceOrgId;
+
+ /**
+ * 服务组织名称
+ */
+ private String serviceOrgName;
+
+ /**
+ * 服务项目ID
+ */
+ private String serviceProjectId;
+
+ /**
+ * 服务项目名称
+ */
+ private String serviceProjectName;
+
+ /**
+ * 服务时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ private Date serviceTimeStart;
+
+ /**
+ * 服务截止时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ private Date serviceTimeEnd;
+
+ /**
+ * in_service服务中;completed:已完成
+ */
+ private String serviceStatus;
+
+ /**
+ * 发布范围
+ */
+ private List serviceScope;
+
+ /**
+ * 服务人数
+ */
+ private Integer servicePeopleNumber;
+
+ /**
+ * 反馈详情
+ */
+ private IcServiceFeedbackResDTO feedBack;
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceScopeDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceScopeDTO.java
new file mode 100644
index 0000000000..1a2be3dca0
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceScopeDTO.java
@@ -0,0 +1,15 @@
+package com.epmet.dto.result;
+
+
+import lombok.Data;
+
+@Data
+public class IcServiceScopeDTO {
+ private String objectId;
+ private String objectName;
+ private String objectType;
+ /**
+ * 发布范围的组织ID PATH
+ */
+ private String objectIdPath;
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceProjectListResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceProjectListResultDTO.java
new file mode 100644
index 0000000000..eadf11a78a
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceProjectListResultDTO.java
@@ -0,0 +1,63 @@
+package com.epmet.dto.result;
+
+import com.epmet.commons.tools.dto.form.PageFormDTO;
+import com.epmet.dto.IcServiceProjectAttachmentDTO;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @Author zxc
+ * @DateTime 2022/5/27 16:42
+ * @DESC
+ */
+@Data
+public class ServiceProjectListResultDTO implements Serializable {
+
+ private static final long serialVersionUID = -6508966695564469113L;
+
+ /**
+ * 服务类别
+ */
+ private String serviceCategory;
+ private String serviceCategoryKey;
+
+ /**
+ * 服务项目ID
+ */
+ private String serviceProjectId;
+
+ /**
+ * 服务名称
+ */
+ private String serviceName;
+
+ /**
+ * 服务内容
+ */
+ private String serviceContent;
+
+ /**
+ * 政策依据
+ */
+ private String policyGround;
+
+ /**
+ * 政策级别
+ */
+ private String policyLevel;
+ private String policyLevelName;
+
+ private List attachmentList;
+
+ public ServiceProjectListResultDTO() {
+ this.serviceCategory = "";
+ this.serviceProjectId = "";
+ this.serviceName = "";
+ this.serviceContent = "";
+ this.policyGround = "";
+ this.policyLevel = "";
+ this.policyLevelName = "";
+ }
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceProjectRecordResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceProjectRecordResultDTO.java
new file mode 100644
index 0000000000..940a8ae9f1
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceProjectRecordResultDTO.java
@@ -0,0 +1,18 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+@Data
+public class ServiceProjectRecordResultDTO {
+ private String serviceRecordId;
+ private String serviceCategoryKey;
+ private String serviceCategoryName;
+ private String serviceProjectId;
+ private String serviceProjectName;
+ private String serviceOrgId;
+ private String serviceOrgName;
+ private String serviceTimeStart;
+ private String serviceTimeEnd;
+ private String serviceStatus;
+ private String servicePeopleNumber;
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/pom.xml b/epmet-module/epmet-heart/epmet-heart-server/pom.xml
index bc2955d8b7..af7bb32c5d 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/pom.xml
+++ b/epmet-module/epmet-heart/epmet-heart-server/pom.xml
@@ -132,6 +132,14 @@
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+ 8
+ 8
+
+
${project.basedir}/src/main/java
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceOrgController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceOrgController.java
new file mode 100644
index 0000000000..2232830346
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceOrgController.java
@@ -0,0 +1,91 @@
+package com.epmet.controller;
+
+import com.epmet.commons.tools.annotation.LoginUser;
+import com.epmet.commons.tools.aop.NoRepeatSubmit;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.validator.ValidatorUtils;
+import com.epmet.commons.tools.validator.group.AddGroup;
+import com.epmet.commons.tools.validator.group.DefaultGroup;
+import com.epmet.commons.tools.validator.group.UpdateGroup;
+import com.epmet.dto.IcServiceOrgDTO;
+import com.epmet.dto.form.IcServiceOrgAddEditFormDTO;
+import com.epmet.dto.form.IcServiceOrgListFormDTO;
+import com.epmet.dto.result.IcServiceOrgListResultDTO;
+import com.epmet.dto.result.IcServiceOrgSelectListResultDTO;
+import com.epmet.service.IcServiceOrgService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+
+/**
+ * 服务组织表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-27
+ */
+@RestController
+@RequestMapping("icServiceOrg")
+public class IcServiceOrgController {
+
+ @Autowired
+ private IcServiceOrgService icServiceOrgService;
+
+ @RequestMapping("list")
+ public Result> list(@LoginUser TokenDto tokenDto, @RequestBody IcServiceOrgListFormDTO formDTO){
+ formDTO.setCustomerId(tokenDto.getCustomerId());
+ formDTO.setStaffId(tokenDto.getUserId());
+ return new Result>().ok(icServiceOrgService.list(formDTO));
+ }
+
+ @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET})
+ public Result get(@PathVariable("id") String id){
+ IcServiceOrgDTO data = icServiceOrgService.get(id);
+ return new Result().ok(data);
+ }
+
+ @NoRepeatSubmit
+ @PostMapping("add")
+ public Result save(@LoginUser TokenDto tokenDto, @RequestBody IcServiceOrgAddEditFormDTO dto) {
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+ dto.setCustomerId(tokenDto.getCustomerId());
+ dto.setUserId(tokenDto.getUserId());
+ icServiceOrgService.save(dto);
+ return new Result();
+ }
+
+ @NoRepeatSubmit
+ @PostMapping("edit")
+ public Result edit(@LoginUser TokenDto tokenDto, @RequestBody IcServiceOrgAddEditFormDTO dto){
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+ dto.setCustomerId(tokenDto.getCustomerId());
+ dto.setUserId(tokenDto.getUserId());
+ icServiceOrgService.update(dto);
+ return new Result();
+ }
+
+ @PostMapping("del")
+ public Result delete(@LoginUser TokenDto tokenDto, @RequestBody IcServiceOrgAddEditFormDTO formDTO){
+ ValidatorUtils.validateEntity(formDTO, IcServiceOrgAddEditFormDTO.Del.class);
+ formDTO.setCustomerId(tokenDto.getCustomerId());
+ formDTO.setUserId(tokenDto.getUserId());
+ icServiceOrgService.delete(formDTO);
+ return new Result();
+ }
+
+ @RequestMapping("detail")
+ public Result detail(@RequestBody IcServiceOrgListFormDTO formDTO) {
+ return new Result().ok(icServiceOrgService.detail(formDTO));
+ }
+
+ @RequestMapping("selectlist")
+ public Result> selectList(@LoginUser TokenDto tokenDto, @RequestBody IcServiceOrgListFormDTO formDTO){
+ formDTO.setCustomerId(tokenDto.getCustomerId());
+ formDTO.setStaffId(tokenDto.getUserId());
+ return new Result>().ok(icServiceOrgService.selectList(formDTO));
+ }
+
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectAttachmentController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectAttachmentController.java
new file mode 100644
index 0000000000..07e07b0d92
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectAttachmentController.java
@@ -0,0 +1,72 @@
+package com.epmet.controller;
+
+import com.epmet.commons.tools.aop.NoRepeatSubmit;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.utils.ExcelUtils;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.validator.AssertUtils;
+import com.epmet.commons.tools.validator.ValidatorUtils;
+import com.epmet.commons.tools.validator.group.AddGroup;
+import com.epmet.commons.tools.validator.group.UpdateGroup;
+import com.epmet.commons.tools.validator.group.DefaultGroup;
+import com.epmet.dto.IcServiceProjectAttachmentDTO;
+import com.epmet.service.IcServiceProjectAttachmentService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * 事件附件表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-27
+ */
+@RestController
+@RequestMapping("icServiceProjectAttachment")
+public class IcServiceProjectAttachmentController {
+
+ @Autowired
+ private IcServiceProjectAttachmentService icServiceProjectAttachmentService;
+
+ @RequestMapping("page")
+ public Result> page(@RequestParam Map params){
+ PageData page = icServiceProjectAttachmentService.page(params);
+ return new Result>().ok(page);
+ }
+
+ @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET})
+ public Result get(@PathVariable("id") String id){
+ IcServiceProjectAttachmentDTO data = icServiceProjectAttachmentService.get(id);
+ return new Result().ok(data);
+ }
+
+ @NoRepeatSubmit
+ @PostMapping("save")
+ public Result save(@RequestBody IcServiceProjectAttachmentDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+ icServiceProjectAttachmentService.save(dto);
+ return new Result();
+ }
+
+ @NoRepeatSubmit
+ @PostMapping("update")
+ public Result update(@RequestBody IcServiceProjectAttachmentDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+ icServiceProjectAttachmentService.update(dto);
+ return new Result();
+ }
+
+ @PostMapping("delete")
+ public Result delete(@RequestBody String[] ids){
+ //效验数据
+ AssertUtils.isArrayEmpty(ids, "id");
+ icServiceProjectAttachmentService.delete(ids);
+ return new Result();
+ }
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java
new file mode 100644
index 0000000000..abcf757f89
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java
@@ -0,0 +1,244 @@
+package com.epmet.controller;
+
+import com.epmet.commons.tools.annotation.LoginUser;
+import com.epmet.commons.tools.aop.NoRepeatSubmit;
+import com.epmet.commons.tools.exception.EpmetErrorCode;
+import com.epmet.commons.tools.exception.EpmetException;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.validator.AssertUtils;
+import com.epmet.commons.tools.validator.ValidatorUtils;
+import com.epmet.commons.tools.validator.group.AddGroup;
+import com.epmet.commons.tools.validator.group.DefaultGroup;
+import com.epmet.commons.tools.validator.group.UpdateGroup;
+import com.epmet.dto.IcServiceProjectDTO;
+import com.epmet.dto.form.*;
+import com.epmet.dto.result.IcServiceRecDetailRes;
+import com.epmet.dto.result.ServiceProjectListResultDTO;
+import com.epmet.dto.result.ServiceProjectRecordResultDTO;
+import com.epmet.entity.IcServiceRecordEntity;
+import com.epmet.service.IcServiceProjectService;
+import com.epmet.service.IcServiceRecordService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * 服务项目管理表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-27
+ */
+@RestController
+@RequestMapping("icServiceProject")
+public class IcServiceProjectController {
+
+ @Autowired
+ private IcServiceProjectService icServiceProjectService;
+ @Autowired
+ private IcServiceRecordService icServiceRecordService;
+
+
+ @RequestMapping("page")
+ public Result> page(@RequestParam Map params){
+ PageData page = icServiceProjectService.page(params);
+ return new Result>().ok(page);
+ }
+
+ @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET})
+ public Result get(@PathVariable("id") String id){
+ IcServiceProjectDTO data = icServiceProjectService.get(id);
+ return new Result().ok(data);
+ }
+
+ @NoRepeatSubmit
+ @PostMapping("save")
+ public Result save(@RequestBody IcServiceProjectDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+ icServiceProjectService.save(dto);
+ return new Result();
+ }
+
+ @NoRepeatSubmit
+ @PostMapping("update")
+ public Result update(@RequestBody IcServiceProjectDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+ icServiceProjectService.update(dto);
+ return new Result();
+ }
+
+ @PostMapping("delete")
+ public Result delete(@RequestBody String[] ids){
+ //效验数据
+ AssertUtils.isArrayEmpty(ids, "id");
+ icServiceProjectService.delete(ids);
+ return new Result();
+ }
+
+ /**
+ * Desc: 服务项目新增
+ * @param tokenDto
+ * @param formDTO
+ * @author zxc
+ * @date 2022/5/27 16:04
+ */
+ @PostMapping("serviceProjectAdd")
+ public Result serviceProjectAdd(@LoginUser TokenDto tokenDto,@RequestBody ServiceProjectFormDTO formDTO){
+ ValidatorUtils.validateEntity(formDTO, ServiceProjectFormDTO.ServiceProjectAddForm.class);
+ formDTO.setUserId(tokenDto.getUserId());
+ formDTO.setCustomerId(tokenDto.getCustomerId());
+ icServiceProjectService.serviceProjectAdd(formDTO);
+ return new Result();
+ }
+
+ /**
+ * Desc: 服务项目列表
+ * @param formDTO
+ * @author zxc
+ * @date 2022/5/27 16:46
+ */
+ @PostMapping("serviceProjectList")
+ public Result serviceProjectList(@LoginUser TokenDto tokenDto,@RequestBody ServiceProjectListFormDTO formDTO){
+ formDTO.setCustomerId(tokenDto.getCustomerId());
+ formDTO.setUserId(tokenDto.getUserId());
+ return new Result().ok(icServiceProjectService.serviceProjectList(formDTO));
+ }
+
+ /**
+ * Desc: 服务项目详情
+ * @param formDTO
+ * @author zxc
+ * @date 2022/5/30 15:46
+ */
+ @PostMapping("serviceProjectDetail")
+ public Result serviceProjectDetail(@RequestBody ServiceProjectListFormDTO formDTO){
+ ValidatorUtils.validateEntity(formDTO, ServiceProjectListFormDTO.ServiceProjectDetail.class);
+ return new Result().ok(icServiceProjectService.serviceProjectDetail(formDTO));
+ }
+
+ /**
+ * Desc: 修改【服务项目】
+ * @param formDTO
+ * @author zxc
+ * @date 2022/5/30 09:36
+ */
+ @PostMapping("serviceProjectEdit")
+ public Result serviceProjectEdit(@RequestBody ServiceProjectFormDTO formDTO,@LoginUser TokenDto tokenDto){
+ ValidatorUtils.validateEntity(formDTO, ServiceProjectFormDTO.ServiceProjectUpdateForm.class);
+ formDTO.setCustomerId(tokenDto.getCustomerId());
+ icServiceProjectService.serviceProjectEdit(formDTO);
+ return new Result();
+ }
+
+ /**
+ * Desc: 上下架【服务项目】
+ * @param ids
+ * @author zxc
+ * @date 2022/5/30 10:17
+ */
+ @PostMapping("serviceProjectEnabled")
+ public Result serviceProjectEnabled(@RequestBody List ids){
+ icServiceProjectService.serviceProjectEnabled(ids);
+ return new Result();
+ }
+
+ /**
+ * http://yapi.elinkservice.cn/project/245/interface/api/7820
+ *
+ * @param serviceId
+ * @return 【服务项目记录】取消:进行中的项目可以取消。删除该记录
+ */
+ @PostMapping("service/cancel/{service-id}")
+ public Result cancelService(@PathVariable("service-id") String serviceId) {
+ icServiceRecordService.cancelService(serviceId, "yzm");
+ return new Result();
+ }
+
+ /**
+ * http://yapi.elinkservice.cn/project/245/interface/api/7821
+ * @param serviceId
+ * @return 【服务项目记录】详情
+ */
+ @PostMapping("service/detail/{service-id}")
+ public Result queryServiceDetail(@PathVariable("service-id") String serviceId) {
+ return new Result().ok(icServiceRecordService.queryServiceDetail(serviceId));
+ }
+
+ /**
+ * 【服务项目记录】修改
+ *
+ * @param formDTO
+ * @return
+ */
+ @PostMapping("service/update")
+ public Result updateServiceRecord(@RequestBody IcServiceEditFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO, IcServiceEditFormDTO.AddUserShowGroup.class, IcServiceEditFormDTO.AddUserInternalGroup.class);
+ icServiceRecordService.updateServiceRecord(formDTO);
+ return new Result();
+ }
+
+ /**
+ * 服务列表
+ * @param input
+ * @return
+ */
+ @PostMapping("/service/recordList")
+ public Result listServiceRecords(@RequestBody ServiceProjectRecordFormDTO input) {
+
+ PageData page = icServiceRecordService.listServiceRecords(
+ input.getServiceCategoryKey(), input.getServiceProjectName(), input.getServiceOrgName(), input.getServiceTimeStart(),
+ input.getServiceTimeEnd(), input.getServiceStatus(), input.getSatisfaction(), input.getPageNo(), input.getPageSize());
+
+ return new Result().ok(page);
+ }
+
+ /**
+ * 发起服务
+ * @param input
+ * @return
+ */
+ @PostMapping("/service/initiate")
+ public Result initiateService(@RequestBody ServiceProjectRecordFormDTO input) {
+
+ ValidatorUtils.validateEntity(input, ServiceProjectRecordFormDTO.Initiate.class, ServiceProjectFeedbackFormDTO.InitiateGroup.class);
+ icServiceRecordService.initiateService(input);
+
+ return new Result();
+ }
+
+ /**
+ * 反馈
+ * @param input
+ * @return
+ */
+ @PostMapping("/service/feedback")
+ public Result serviceFeedback(@RequestBody ServiceProjectFeedbackFormDTO input) {
+ ValidatorUtils.validateEntity(input, ServiceProjectFeedbackFormDTO.FeedbackGroup.class);
+ String serviceRecordId = input.getServiceRecordId();
+
+ // 做状态检查,未反馈的,服务状态为服务中的才可以反馈
+ IcServiceRecordEntity serviceRecord = icServiceRecordService.selectById(serviceRecordId);
+ if (serviceRecord == null) {
+ String msg = "未找到服务记录";
+ throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), msg, msg);
+ }
+
+ if ("completed".equals(serviceRecord.getServiceStatus())) {
+ String msg = "服务已完成,不能再次反馈";
+ throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), msg, msg);
+ }
+
+ icServiceRecordService.serviceFeedback(serviceRecord.getServiceCategoryKey(),
+ serviceRecord.getServiceOrgId(),
+ serviceRecord.getServiceProjectId(),
+ serviceRecord.getId(),
+ input);
+ return new Result();
+ }
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java
index 9c53742254..3405c0c019 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java
@@ -44,9 +44,9 @@ import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.service.*;
import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -83,6 +83,7 @@ public class IcUserDemandRecController implements ResultDataResolver {
@Autowired
private EpmetUserOpenFeignClient userOpenFeignClient;
+
/**
* 根据服务方类型查询 下拉框
* 服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit;
@@ -219,28 +220,33 @@ public class IcUserDemandRecController implements ResultDataResolver {
&& null != finishResultDTO.getAwardPoint()
&& finishResultDTO.getAwardPoint() > NumConstant.ZERO
&& UserDemandConstant.RESOLVED.equals(finishResultDTO.getFinishResult())) {
- // 志愿者发放积分
- List actPointEventMsgList = new ArrayList<>();
- BasePointEventMsg actPointEventMsg = new BasePointEventMsg();
- actPointEventMsg.setCustomerId(formDTO.getCustomerId());
- actPointEventMsg.setSourceType(MqConstant.SOURCE_TYPE_DEMAND);
- actPointEventMsg.setSourceId(formDTO.getDemandRecId());
- actPointEventMsg.setUserId(finishResultDTO.getServerId());
- actPointEventMsg.setActionFlag(MqConstant.PLUS);
- actPointEventMsg.setIsCommon(false);
- actPointEventMsg.setRemark(finishResultDTO.getRemark());
- actPointEventMsg.setEventTag(EventEnum.FINISH_USER_DEMAND.getEventTag());
- actPointEventMsg.setEventClass(EventEnum.FINISH_USER_DEMAND.getEventClass());
- actPointEventMsg.setEventName(finishResultDTO.getFirstCategoryName());
- actPointEventMsg.setObjectId(finishResultDTO.getCategoryCode());
- actPointEventMsg.setPoint(finishResultDTO.getAwardPoint());
- actPointEventMsgList.add(actPointEventMsg);
- SystemMsgFormDTO sendMsgForm = new SystemMsgFormDTO();
- sendMsgForm.setContent(actPointEventMsgList);
- sendMsgForm.setMessageType(SystemMessageType.FINISH_USER_DEMAND);
- Result mqResult = epmetMessageOpenFeignClient.sendSystemMsgByMQ(sendMsgForm);
- if (!mqResult.success()) {
- log.error(String.format("demandRecId:%s,给志愿者发放积分失败", formDTO.getDemandRecId()));
+ Result> userIdRes = userOpenFeignClient.getUserId(finishResultDTO.getServerId());
+ if (userIdRes.success() && CollectionUtils.isNotEmpty(userIdRes.getData())) {
+ userIdRes.getData().forEach(userId -> {
+ // 志愿者发放积分
+ List actPointEventMsgList = new ArrayList<>();
+ BasePointEventMsg actPointEventMsg = new BasePointEventMsg();
+ actPointEventMsg.setCustomerId(formDTO.getCustomerId());
+ actPointEventMsg.setSourceType(MqConstant.SOURCE_TYPE_DEMAND);
+ actPointEventMsg.setSourceId(formDTO.getDemandRecId());
+ actPointEventMsg.setUserId(userId);
+ actPointEventMsg.setActionFlag(MqConstant.PLUS);
+ actPointEventMsg.setIsCommon(false);
+ actPointEventMsg.setRemark(finishResultDTO.getRemark());
+ actPointEventMsg.setEventTag(EventEnum.FINISH_USER_DEMAND.getEventTag());
+ actPointEventMsg.setEventClass(EventEnum.FINISH_USER_DEMAND.getEventClass());
+ actPointEventMsg.setEventName(finishResultDTO.getFirstCategoryName());
+ actPointEventMsg.setObjectId(finishResultDTO.getCategoryCode());
+ actPointEventMsg.setPoint(finishResultDTO.getAwardPoint());
+ actPointEventMsgList.add(actPointEventMsg);
+ SystemMsgFormDTO sendMsgForm = new SystemMsgFormDTO();
+ sendMsgForm.setContent(actPointEventMsgList);
+ sendMsgForm.setMessageType(SystemMessageType.FINISH_USER_DEMAND);
+ Result mqResult = epmetMessageOpenFeignClient.sendSystemMsgByMQ(sendMsgForm);
+ if (!mqResult.success()) {
+ log.error(String.format("demandRecId:%s,给志愿者发放积分失败", formDTO.getDemandRecId()));
+ }
+ });
}
}
}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java
index 5899abc96f..3ba576777b 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java
@@ -73,4 +73,6 @@ public interface IcCommunitySelfOrganizationDao extends BaseDao queryCategoryList(CategorySelfOrgFormDTO formDTO);
List queryCoordinateList(CategorySelfOrgFormDTO formDTO);
+
+ List selectByIds(@Param("communityOrgIds") List communityOrgIds);
}
\ No newline at end of file
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java
index fd36187bd8..0c02e737b7 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java
@@ -19,7 +19,6 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.commons.tools.dto.result.OptionDataResultDTO;
-import com.epmet.dto.form.PartyTypepercentFormDTO;
import com.epmet.dto.form.PartyUnitListbriefFormDTO;
import com.epmet.dto.result.PartyTypepercentResultDTO;
import com.epmet.dto.result.PartyUnitDistributionResultDTO;
@@ -32,7 +31,6 @@ import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal;
import java.util.List;
-import java.util.Map;
/**
* 联建单位
@@ -97,7 +95,7 @@ public interface IcPartyUnitDao extends BaseDao