Browse Source

Merge branch 'master' into shibei_hlpt_master

feature/teamB_zz_wgh
YUJT 4 years ago
parent
commit
4fd93159c5
  1. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml
  2. 2
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java
  3. 5
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/ConditionResultDTO.java
  4. 7
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcFormQueryBuilderEntity.java
  5. 2
      epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.30__item_query.sql
  6. 3
      epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormItemDao.xml
  7. 4
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CollectListFormDTO.java
  8. 15
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectMemFormDTO.java
  9. 4
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiCollectFormDTO.java
  10. 17
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListResultDTO.java
  11. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiCollectDao.java
  12. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiCollectEntity.java
  13. 15
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiMemberEntity.java
  14. 41
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java
  15. 2
      epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.53__ic_resimember_huji.sql
  16. 2
      epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.54__ic_resicollect_reamrk.sql
  17. 22
      epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml
  18. 5
      epmet-user/epmet-user-server/src/main/resources/mapper/IcResiMemberDao.xml
  19. 10
      epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

2
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml

@ -4,7 +4,7 @@
<mapper namespace="com.epmet.dao.project.ProjectProcessDao">
<select id="selectProcessList" resultType="com.epmet.entity.project.ProjectProcessEntity">
SELECT
SELECT DISTINCT
pro.project_id AS "projectId",
pro.operation AS "operation",
DATE_FORMAT(pro.created_time, "%Y-%m-%d") AS "createdTime",

2
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java

@ -544,7 +544,7 @@ public class WxmpMessageServiceImpl implements WxmpMessageService {
throw new WxSubscribeException("clientType有误", "", openId);
}
} catch (Exception e) {
log.error("method exception", e);
log.warn("method exception,msg:{}", e.getMessage());
throw new WxSubscribeException("获取openId失败:" + e.getMessage(), "", "");
}
return openId;

5
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/ConditionResultDTO.java

@ -96,5 +96,10 @@ public class ConditionResultDTO implements Serializable {
* 这个表 是否支持添加 即是否是多对一 eg:居民需求是多个对一个
*/
private boolean supportAdd;
/**
* 是否为多选 1可以多选0单选
*/
private Integer multiSelect;
}

7
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcFormQueryBuilderEntity.java

@ -76,7 +76,12 @@ public class IcFormQueryBuilderEntity extends BaseEpmetEntity {
* 手机号mobile; 身份证id_card只能输入数字:num
*/
private String validType;
/**
* 是否为多选 1可以多选0单选
*/
private Integer multiSelect;
/**
* 排序
*/

2
epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.30__item_query.sql

@ -0,0 +1,2 @@
alter TABLE ic_form_query_builder add COLUMN `MULTI_SELECT` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1可以多选,0单选,默认0' after VALID_TYPE;

3
epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormItemDao.xml

@ -85,7 +85,8 @@
IFNULL(i.PLACEHOLDER,'') as PLACEHOLDER,
IFNULL(i.COLUMN_NAME,'')as COLUMN_NAME,
b.QUERY_TYPE,
b.FUN_TYPE
b.FUN_TYPE,
b.MULTI_SELECT as multiSelect
FROM ic_form_query_builder b
inner join ic_form_item i on(i.id=b.FORM_ITEM_ID and i.DEL_FLAG='0')
LEFT JOIN ic_form_item_group g ON ( i.ITEM_GROUP_ID = g.id )

4
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CollectListFormDTO.java

@ -24,6 +24,10 @@ public class CollectListFormDTO extends PageFormDTO {
*/
private String startDate;
private String endDate;
/**
* 户籍所在地
*/
private String domicilePlace;
private String userId;
private String customerId;

15
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectMemFormDTO.java

@ -49,11 +49,26 @@ public class IcResiCollectMemFormDTO implements Serializable {
*/
private String domicilePlace;
/**
* 户籍所在地行政地区编码
*/
private String domicilePlaceCode;
/**
* 户籍所在地行政地区编码全路径包含自己,英文逗号隔开例如37,3702,370203
*/
private String domicilePlaceCodePath;
/**
* 学校或公司
*/
private String workPlace;
/**
* 备注
*/
private String remark;
/**
* 社区居民信息登记-查询返参用
*/

4
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiCollectFormDTO.java

@ -86,9 +86,9 @@ public class ResiCollectFormDTO implements Serializable {
private String address;
/**
* 1自有0租住
* 房屋状态与ic_house表的RENT_FLAG一致取值1出租 0自住 2闲置 3未售出
*/
@NotBlank(message = "房子属于自有还是租住?", groups = {InternalShowGroup.class})
@NotBlank(message = "房子状态不能为空", groups = {InternalShowGroup.class})
private String houseType;
/**

17
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListResultDTO.java

@ -1,5 +1,6 @@
package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
@ -38,6 +39,8 @@ public class CollectListResultDTO implements Serializable {
*/
private Integer totalResi;
private String domicilePlace;
private List<CollectListMemberResultDTO> list;
@ -73,10 +76,24 @@ public class CollectListResultDTO implements Serializable {
*/
private String domicilePlace;
/**
* 户籍所在地行政地区编码
*/
private String domicilePlaceCode;
/**
* 户籍所在地行政地区编码全路径包含自己,英文逗号隔开例如37,3702,370203
*/
private String domicilePlaceCodePath;
/**
* 学校或公司
*/
private String workPlace;
/**
* 备注
*/
private String remark;
}
}

2
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiCollectDao.java

@ -34,6 +34,8 @@ public interface IcResiCollectDao extends BaseDao<IcResiCollectEntity> {
*/
List<CollectListResultDTO> getCollectList(CollectListFormDTO formDTO);
List<CollectListResultDTO.CollectListMemberResultDTO> selectMemberList(@Param("id") String id, @Param("domicilePlace") String domicilePlace);
/**
* 我上次提交的主表记录
* @param customerId

2
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiCollectEntity.java

@ -69,7 +69,7 @@ public class IcResiCollectEntity extends BaseEpmetEntity {
private String address;
/**
* 1自由0租住
* 房屋状态与ic_house表的RENT_FLAG一致取值1出租 0自住 2闲置 3未售出
*/
private String houseType;

15
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiMemberEntity.java

@ -58,8 +58,23 @@ public class IcResiMemberEntity extends BaseEpmetEntity {
*/
private String domicilePlace;
/**
* 户籍所在地行政地区编码
*/
private String domicilePlaceCode;
/**
* 户籍所在地行政地区编码全路径包含自己,英文逗号隔开例如37,3702,370203
*/
private String domicilePlaceCodePath;
/**
* 学校或公司
*/
private String workPlace;
/**
* 备注
*/
private String remark;
}

41
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java

@ -17,6 +17,7 @@
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
@ -45,7 +46,6 @@ import com.epmet.service.IcUserChangeRecordService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.ListUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -175,7 +175,6 @@ public class IcUserChangeRecordServiceImpl extends BaseServiceImpl<IcUserChangeR
* @Author sun
* @Description 按客户初始化客户下居民的变更记录变更明细数据
**/
@Transactional(rollbackFor = Exception.class)
public void initIcUserChange(String customerId) throws ParseException {
log.info("开始初始客户下居民的变更记录和变更明细数据,客户Id->"+customerId);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@ -198,15 +197,15 @@ public class IcUserChangeRecordServiceImpl extends BaseServiceImpl<IcUserChangeR
List<Map<String, String>> icUserList = new ArrayList<>();
do {
//一千条一循环查询客户下居民数据
PageHelper.startPage(pageNo, NumConstant.ONE_THOUSAND);
PageHelper.startPage(pageNo, NumConstant.ONE_THOUSAND,false);
icUserList = icResiUserDao.getIcUserList(customerId, columns);
pageNo++;
//不需要分页了 因为sql中已经去掉了一些存在变更记录的数据了
//pageNo++;
//3.遍历封装数据
for (Map<String,String> map : icUserList){
//存放一个人的类别为是的变更明细数据
List<IcUserChangeDetailedEntity> subList = new ArrayList<>();
String changeId = UUID.randomUUID().toString().replaceAll("-", "");
String changeId = IdWorker.getIdStr();
for (IcResiCategoryStatsConfigDTO dto : categoryListResult.getData()){
if(map.containsKey(dto.getColumnName())&&"1".equals(map.get(dto.getColumnName()))){
detailed = new IcUserChangeDetailedEntity();
@ -228,12 +227,10 @@ public class IcUserChangeRecordServiceImpl extends BaseServiceImpl<IcUserChangeR
detailed.setCreatedTime(sdf.parse(map.get("CREATED_TIME")));
detailed.setUpdatedBy("APP_USER");
detailed.setUpdatedTime(new Date());
subList.add(detailed);
detailedList.add(detailed);
}
}
if (subList.size() > NumConstant.ZERO) {
detailedList.addAll(subList);
}
if (!hash.containsKey(map.get("CREATED_BY"))) {
CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(customerId, map.get("CREATED_BY"));
//被删除或被移除的工作人员,名字为空
@ -256,21 +253,35 @@ public class IcUserChangeRecordServiceImpl extends BaseServiceImpl<IcUserChangeR
change.setUpdatedBy("APP_USER");
change.setUpdatedTime(new Date());
changeList.add(change);
//每500个居民处理一批
if (changeList.size()>= NumConstant.FIVE_HUNDRED){
delAndInsertChangeRecord(customerId, changeList, detailedList);
}
}
} while (icUserList.size() == NumConstant.ONE_THOUSAND);
//4.批量新增数据,先删后增【只删除新增节点的历史数据】
//4-1.删除待处理的人员数据【这类人是指在变更记录表中不存在新增节点数据的人】
//最后再处理一批
delAndInsertChangeRecord(customerId, changeList, detailedList);
}
@Transactional(rollbackFor = Exception.class)
public void delAndInsertChangeRecord(String customerId, List<IcUserChangeRecordEntity> changeList, List<IcUserChangeDetailedEntity> detailedList) {
if (CollectionUtils.isEmpty(changeList)) {
log.info("customerId:{}初始变更记录数据 已完成!", customerId);
return;
}
List<String> icUserIdList = changeList.stream().map(IcUserChangeRecordEntity::getIcUserId).collect(Collectors.toList());
List<List<String>> partition = ListUtils.partition(icUserIdList, NumConstant.FIVE_HUNDRED);
partition.forEach(part -> {
baseDao.delByCustomerId(customerId, "add", part);
icUserChangeDetailedService.delByCustomerId(customerId, "add", part);
});
baseDao.delByCustomerId(customerId, "add", icUserIdList);
icUserChangeDetailedService.delByCustomerId(customerId, "add", icUserIdList);
log.info("初始变更记录数据,总条数->" + changeList.size());
icUserChangeRecordService.insertBatch(changeList);
log.info("初始变更记录明细数据,总条数->" + detailedList.size());
icUserChangeDetailedService.insertBatch(detailedList);
changeList.clear();
detailedList.clear();
icUserIdList.clear();
}
}

2
epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.53__ic_resimember_huji.sql

@ -0,0 +1,2 @@
alter table ic_resi_member add COLUMN DOMICILE_PLACE_CODE VARCHAR(64) DEFAULT '' comment '户籍所在地行政地区编码' AFTER DOMICILE_PLACE;
alter table ic_resi_member add COLUMN DOMICILE_PLACE_CODE_PATH VARCHAR(255) DEFAULT '' comment '户籍所在地行政地区编码全路径,包含自己,英文逗号隔开例如:37,3702,370203' AFTER DOMICILE_PLACE_CODE;

2
epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.54__ic_resicollect_reamrk.sql

@ -0,0 +1,2 @@
alter table ic_resi_collect MODIFY COLUMN `HOUSE_TYPE` varchar(1) NOT NULL COMMENT '房屋状态与ic_house表的RENT_FLAG一致取值1:出租 0:自住 2:闲置 3:未售出';
alter table ic_resi_member add COLUMN REMARK VARCHAR(512) DEFAULT '' COMMENT '备注' AFTER WORK_PLACE;

22
epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml

@ -16,16 +16,19 @@
<result property="address" column="address"/>
<result property="houseType" column="houseType"/>
<result property="totalResi" column="totalResi"/>
<collection property="list" ofType="com.epmet.dto.result.CollectListResultDTO$CollectListMemberResultDTO" column="id" select="selectMemberList"/>
<result property="domicilePlace" column="domicilePlace"></result>
<collection property="list" ofType="com.epmet.dto.result.CollectListResultDTO$CollectListMemberResultDTO" column="{id=id,domicilePlace=domicile_place}" select="selectMemberList"/>
</resultMap>
<select id="getCollectList" resultMap="getCollectListMap">
SELECT
c.id as id,
distinct c.id as id,
c.HOUSE_HOLDER_NAME AS houseHolderName,
c.ADDRESS AS address,
c.HOUSE_TYPE AS houseType,
c.TOTAL_RESI AS totalResi
c.TOTAL_RESI AS totalResi,
#{domicilePlace} as domicile_place
FROM ic_resi_collect c
left join ic_resi_member m on(c.id=m.IC_RESI_COLLECT_ID and m.del_flag='0')
WHERE c.DEL_FLAG = 0
<if test='orgId != null and orgId != "" '>
AND CONCAT(c.PIDS,':',c.AGENCY_ID) LIKE CONCAT('%',#{orgId},'%')
@ -42,9 +45,12 @@
<if test='id != null and id != "" '>
AND c.id=#{id}
</if>
<if test='domicilePlace != null and domicilePlace != "" '>
AND m.DOMICILE_PLACE LIKE CONCAT('%',#{domicilePlace},'%')
</if>
ORDER BY c.CREATED_TIME DESC
</select>
<select id="selectMemberList" resultType="com.epmet.dto.result.CollectListResultDTO$CollectListMemberResultDTO">
<select id="selectMemberList" parameterType="map" resultType="com.epmet.dto.result.CollectListResultDTO$CollectListMemberResultDTO">
select
m.`NAME` AS memberName,
m.ID_NUM AS memberIdNum,
@ -52,10 +58,16 @@
m.HE_SUAN_COUNT AS heSuanCount,
m.YMJZ AS ymjz,
m.DOMICILE_PLACE as domicilePlace,
m.WORK_PLACE as workPlace
m.DOMICILE_PLACE_CODE as domicilePlaceCode,
m.DOMICILE_PLACE_CODE_PATH as domicilePlaceCodePath,
m.WORK_PLACE as workPlace,
m.REMARK as remark
from ic_resi_member m
where m.DEL_FLAG = 0
and m.IC_RESI_COLLECT_ID = #{id}
<if test='domicilePlace != null and domicilePlace != "" '>
AND m.DOMICILE_PLACE LIKE CONCAT('%',#{domicilePlace},'%')
</if>
</select>
<update id="updateRec" parameterType="map">

5
epmet-user/epmet-user-server/src/main/resources/mapper/IcResiMemberDao.xml

@ -14,7 +14,10 @@
m.HE_SUAN_COUNT,
m.YMJZ,
m.DOMICILE_PLACE,
m.WORK_PLACE
m.WORK_PLACE,
m.DOMICILE_PLACE_CODE,
m.DOMICILE_PLACE_CODE_PATH,
m.REMARK
FROM
ic_resi_member m
WHERE

10
epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

@ -128,6 +128,16 @@
${subCondition.tableName}.${subCondition.columnName} like concat('%',#{colValue},'%')
</foreach>
</if>
<if test="subCondition.queryType!= null and subCondition.queryType == 'resi_category' ">
<if test="null!=subCondition.columnValue[0] and ''!=subCondition.columnValue[0]">
<foreach collection="subCondition.columnValue" item="colValue" open="" separator="" close="">
<if test="colValue != null and colValue != ''">
and ${subCondition.tableName}.${colValue} ='1'
</if>
</foreach>
</if>
</if>
</if>
</foreach>
</if>

Loading…
Cancel
Save