Browse Source

Merge branch 'dev_ic_platform' of http://git.elinkit.com.cn:7070/r/epmet-cloud into develop

 Conflicts:
	epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java
	epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java
	epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java
	epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java
dev_shibei_match
jianjun 4 years ago
parent
commit
07a305659a
  1. 1
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java
  2. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java
  3. 10
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/OperCustomizeOpenFeignClient.java
  4. 5
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/fallback/OperCustomizeOpenFeignClientFallback.java
  5. 11
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcFormItemOptionsController.java
  6. 13
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcFormItemOptionsDao.java
  7. 8
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcFormItemOptionsService.java
  8. 11
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormItemOptionsServiceImpl.java
  9. 15
      epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormItemOptionsDao.xml
  10. 6
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/PersonDataResultDTO.java
  11. 1
      epmet-user/epmet-user-server/src/main/java/com/epmet/constant/UserConstant.java
  12. 8
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java
  13. 5
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java
  14. 69
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java
  15. BIN
      epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_info_cid.xls
  16. 11
      epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

1
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java

@ -157,7 +157,6 @@ public interface GovOrgService {
*/
List<String> getStaffOrgList(String staffId);
/**
* @Description 查询组织信息
* @param agencyId

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java

@ -263,4 +263,6 @@ public interface CustomerAgencyService extends BaseService<CustomerAgencyEntity>
* @return
*/
AgencyTreeResultDTO getOrgTreeData(String staffId);
List<StaffOrgsResultDTO> getStaffOrgListByStaffId(String staffId);
}

10
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/OperCustomizeOpenFeignClient.java

@ -16,6 +16,7 @@ import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
import java.util.Set;
@ -113,6 +114,13 @@ public interface OperCustomizeOpenFeignClient {
@PostMapping("/oper/customize/resicategorystatsconfig/resicategorywarninfobyid")
Result<IcResiCategoryWarnConfigDTO> resiCategoryWarnInfoById(@RequestBody IcResiCategoryWarnConfigDTO dto);
/**
* @Description 查询志愿者类型
* @param volunteers
* @author zxc
* @date 2021/11/8 10:02 上午
*/
@PostMapping("/oper/customize/icformitemoptions/volunteerlabelbyvalues")
Result<List<String>> volunteerLabelByValues(@RequestBody List<String> volunteers,@RequestParam("customerId") String customerId);
}

5
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/fallback/OperCustomizeOpenFeignClientFallback.java

@ -101,4 +101,9 @@ public class OperCustomizeOpenFeignClientFallback implements OperCustomizeOpenFe
public Result<IcResiCategoryWarnConfigDTO> resiCategoryWarnInfoById(IcResiCategoryWarnConfigDTO dto) {
return ModuleUtils.feignConError(ServiceConstant.OPER_CUSTOMIZE_SERVER, "resiCategoryWarnInfoById",dto);
}
@Override
public Result<List<String>> volunteerLabelByValues(List<String> volunteers,String customerId) {
return ModuleUtils.feignConError(ServiceConstant.OPER_CUSTOMIZE_SERVER, "volunteerLabelByValues",volunteers,customerId);
}
}

11
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcFormItemOptionsController.java

@ -91,4 +91,15 @@ public class IcFormItemOptionsController {
ExcelUtils.exportExcelToTarget(response, null, list, IcFormItemOptionsExcel.class);
}
/**
* @Description 查询志愿者类型
* @param volunteers
* @author zxc
* @date 2021/11/8 10:02 上午
*/
@PostMapping("volunteerlabelbyvalues")
public Result<List<String>> volunteerLabelByValues(@RequestBody List<String> volunteers,@RequestParam("customerId") String customerId){
return new Result<List<String>>().ok(icFormItemOptionsService.volunteerLabelByValues(volunteers,customerId));
}
}

13
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcFormItemOptionsDao.java

@ -20,6 +20,9 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.IcFormItemOptionsEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 表单项的选项
@ -29,5 +32,13 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface IcFormItemOptionsDao extends BaseDao<IcFormItemOptionsEntity> {
/**
* @Description 查询志愿者类型
* @param volunteers
* @author zxc
* @date 2021/11/8 10:02 上午
*/
List<String> volunteerLabelByValues(@Param("volunteers") List<String> volunteers,@Param("customerId")String customerId);
}

8
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcFormItemOptionsService.java

@ -92,4 +92,12 @@ public interface IcFormItemOptionsService extends BaseService<IcFormItemOptionsE
* @date 2021-10-26
*/
void delete(String[] ids);
/**
* @Description 查询志愿者类型
* @param volunteers
* @author zxc
* @date 2021/11/8 10:02 上午
*/
List<String> volunteerLabelByValues(List<String> volunteers, String customerId);
}

11
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormItemOptionsServiceImpl.java

@ -97,4 +97,15 @@ public class IcFormItemOptionsServiceImpl extends BaseServiceImpl<IcFormItemOpti
baseDao.deleteBatchIds(Arrays.asList(ids));
}
/**
* @Description 查询志愿者类型
* @param volunteers
* @author zxc
* @date 2021/11/8 10:02 上午
*/
@Override
public List<String> volunteerLabelByValues(List<String> volunteers,String customerId) {
return baseDao.volunteerLabelByValues(volunteers,customerId);
}
}

15
epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcFormItemOptionsDao.xml

@ -3,6 +3,17 @@
<mapper namespace="com.epmet.dao.IcFormItemOptionsDao">
<!-- 查询志愿者类型 -->
<select id="volunteerLabelByValues" resultType="java.lang.String">
SELECT
OPTION_LABEL
FROM ic_form_item_options
WHERE DEL_FLAG = 0
AND CUSTOMER_ID = #{customerId}
AND OPTION_VALUE IN(
<foreach collection="volunteers" item="v" separator=",">
#{v}
</foreach>
)
</select>
</mapper>

6
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/PersonDataResultDTO.java

@ -78,4 +78,10 @@ public class PersonDataResultDTO implements Serializable {
*/
@JsonIgnore
private String isVolunteer;
@JsonIgnore
private String customerId;
@JsonIgnore
private String gridId;
}

1
epmet-user/epmet-user-server/src/main/java/com/epmet/constant/UserConstant.java

@ -99,6 +99,7 @@ public interface UserConstant {
String MAN_WOMAN = "先生/女士";
String GRID_ID="GRID_ID";
String GRID_NAME="GRID_NAME";
String GENDER="GENDER";
String HOUSE_TYPE_KEY="HOUSE_TYPE";
String HOME_ID = "HOME_ID";

8
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java

@ -72,14 +72,14 @@ public class IcResiUserController {
private static final String BASE_TABLE_NAME = "ic_resi_user";
private Path IC_RESI_UPLOAD_DIR;
@Autowired
private OperCustomizeOpenFeignClient operCustomizeOpenFeignClient;
@Autowired
private IcResiUserService icResiUserService;
@Autowired
private IcResiUserImportService icResiUserImportService;
{
// 初始化上传目录
String home = System.getProperty("user.home");
@ -212,7 +212,7 @@ public class IcResiUserController {
}
}
Map<String, Map<String, Object>> resiMainList = icResiUserService.getDataForExport(otherSheetItems.get(BASE_TABLE_NAME), pageFormDTO.getCustomerId(), pageFormDTO.getFormCode(), BASE_TABLE_NAME, pageFormDTO.getConditions());
Map<String, Map<String, Object>> resiMainList = icResiUserService.getDataForExport(otherSheetItems.get(BASE_TABLE_NAME),new HashMap<>(), pageFormDTO.getCustomerId(), pageFormDTO.getFormCode(), BASE_TABLE_NAME, pageFormDTO.getConditions());
//resiMainList = (List<Map<String, Object>>)JSON.parse("[{\"IS_BDHJ\":\"1\",\"IS_SPECIAL\":\"1\",\"IS_XFRY\":\"0\",\"REMARKS\":\"beizhu\",\"IS_PARTY\":\"1\",\"icResiUserId\":\"yzmtest2\",\"HOME_ID\":\"中海国际社区一里城1号楼1单元101\",\"HOUSE_TYPE\":\"平房\",\"UNIT_NAME\":\"1单元\",\"GRID_ID\":\"市北区-市北区第三网格3\",\"IS_DB\":\"0\",\"GENDER\":\"男\",\"BIRTHDAY\":\"2021-10-04\",\"IS_VETERANS\":\"0\",\"IS_MB\":\"0\",\"IS_UNEMPLOYED\":\"0\",\"DEMAND_NAME\":null,\"IS_KC\":\"0\",\"IS_ENSURE_HOUSE\":\"0\",\"IS_SD\":\"0\",\"NAME\":\"尹作梅\",\"RDSJ\":null,\"IS_VOLUNTEER\":\"1\",\"GRID_ID_VALUE\":\"e74829ffc43d5470eba6b5e060c11e63\",\"IS_SZ\":\"0\",\"IS_CJ\":\"0\",\"HOME_ID_VALUE\":\"200\",\"DEMAND_CATEGORY_IDS\":null,\"VILLAGE_NAME\":\"中海国际社区一里城\",\"IS_DBH\":\"0\",\"IS_SN\":\"0\",\"BUILD_NAME\":\"1号楼\",\"IS_YLFN\":\"0\",\"IS_UNITED_FRONT\":\"0\",\"ID_CARD\":\"371325199310260529\",\"MOBILE\":\"15764229697\",\"IS_OLD_PEOPLE\":\"0\",\"DOOR_NAME\":\"101\"},{\"IS_SPECIAL\":\"1\",\"IS_XFRY\":\"0\",\"REMARKS\":\"beizhu\",\"IS_PARTY\":\"1\",\"icResiUserId\":\"yzmtest\",\"HOME_ID\":\"中海国际社区一里城1号楼1单元101\",\"HOUSE_TYPE\":\"平房\",\"UNIT_NAME\":\"1单元\",\"GRID_ID\":\"市北区-市北区第三网格3\",\"IS_DB\":\"0\",\"GENDER\":\"男\",\"BIRTHDAY\":\"2021-10-04\",\"IS_VETERANS\":\"0\",\"IS_MB\":\"0\",\"IS_UNEMPLOYED\":\"0\",\"DEMAND_NAME\":\"心理咨询\",\"IS_KC\":\"0\",\"IS_ENSURE_HOUSE\":\"0\",\"IS_SD\":\"0\",\"NAME\":\"尹作梅\",\"RDSJ\":\"2021-10-28 00:00:00\",\"IS_VOLUNTEER\":\"1\",\"GRID_ID_VALUE\":\"e74829ffc43d5470eba6b5e060c11e63\",\"IS_SZ\":\"0\",\"IS_CJ\":\"0\",\"HOME_ID_VALUE\":\"200\",\"DEMAND_CATEGORY_IDS\":\"10180002\",\"VILLAGE_NAME\":\"中海国际社区一里城\",\"IS_DBH\":\"0\",\"IS_SN\":\"0\",\"BUILD_NAME\":\"1号楼\",\"IS_YLFN\":\"0\",\"IS_UNITED_FRONT\":\"0\",\"ID_CARD\":\"371325199310260529\",\"MOBILE\":\"15764229697\",\"IS_OLD_PEOPLE\":\"0\",\"DOOR_NAME\":\"101\"}]");
log.info("resiMainList:{}", JSON.toJSONString(resiMainList));
String templatePath = "excel/ic_resi_info_cid.xls";
@ -228,7 +228,7 @@ public class IcResiUserController {
if (item.getChildGroup() != null) {
if (!item.getChildGroup().getTableName().equals(BASE_TABLE_NAME)) {
Map<String, FormItem> itemMap1 = otherSheetItems.get(item.getChildGroup().getTableName());
Map<String, Map<String, Object>> resiChildMap = icResiUserService.getDataForExport(itemMap1, pageFormDTO.getCustomerId(), pageFormDTO.getFormCode(), item.getChildGroup().getTableName(), pageFormDTO.getConditions());
Map<String, Map<String, Object>> resiChildMap = icResiUserService.getDataForExport(itemMap1,resiMainList, pageFormDTO.getCustomerId(), pageFormDTO.getFormCode(), item.getChildGroup().getTableName(), pageFormDTO.getConditions());
resiChildMap.forEach((key, value) -> value.putAll(resiMainList.get(key)));
Map<String, Object> mapData2 = new HashMap<>();

5
epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java

@ -75,7 +75,7 @@ public interface IcResiUserService extends BaseService<IcResiUserEntity> {
*/
Map queryIcResiDetail(IcResiDetailFormDTO pageFormDTO);
List<Map<String,Object>> dynamicQuery(String customerId,
String formCode,
@ -104,13 +104,14 @@ public interface IcResiUserService extends BaseService<IcResiUserEntity> {
* desc:条件导出
*
* @param itemList
* @param resiMainList
* @param customerId
* @param formCode
* @param baseTableName
* @param conditions
* @return
*/
Map<String, Map<String, Object>> getDataForExport(Map<String, FormItem> itemList, String customerId, String formCode, String baseTableName, List<ResiUserQueryValueDTO> conditions);
Map<String, Map<String, Object>> getDataForExport(Map<String, FormItem> itemList, Map<String, Map<String, Object>> resiMainList, String customerId, String formCode, String baseTableName, List<ResiUserQueryValueDTO> conditions);
/**
* @Description 家庭关系

69
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

@ -31,7 +31,9 @@ import com.epmet.commons.tools.enums.HouseTypeEnum;
import com.epmet.commons.tools.enums.RelationshipEnum;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
@ -496,12 +498,33 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
// 志愿者处理
if (personData.getIsVolunteer().equals(NumConstant.ONE_STR)){
List<String> volunteers = baseDao.selectVolunteerByUserId(formDTO.getUserId());
volunteers.forEach(v -> {
});
List<String> volunteerList = baseDao.selectVolunteerByUserId(formDTO.getUserId());
if (!CollectionUtils.isEmpty(volunteerList)){
List<String> volunteers = new ArrayList<>();
List<String> finalVolunteers = volunteers;
volunteerList.forEach(v -> {
List<String> collect = Arrays.stream(v.split(",")).collect(Collectors.toList());
finalVolunteers.addAll(collect);
});
volunteers = volunteers.stream().distinct().collect(Collectors.toList());
// 去customize 查询志愿者类别
Result<List<String>> volunteerResult = operCustomizeOpenFeignClient.volunteerLabelByValues(volunteers, personData.getCustomerId());
if (!volunteerResult.success()){
throw new RenException("查询志愿者类别失败...");
}
personData.setVolunteerCategory(volunteerResult.getData());
}
}
// TODO
// 网格名
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(personData.getGridId());
if (null != gridInfo){
personData.setGridName(gridInfo.getGridNamePath());
}
/**
* 人员类别
* 先查询customize配置的
* 再根据配置去查询字段
*/
return personData;
}
@ -534,7 +557,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
* desc:条件导出
*
*
* @param formItemMap
* @param formItemMap key 表名 value formItem
* @param resiMainList
* @param customerId
* @param formCode
* @param baseTableName
@ -542,11 +566,21 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
* @return
*/
@Override
public Map<String, Map<String, Object>> getDataForExport(Map<String, FormItem> formItemMap, String customerId, String formCode, String baseTableName, List<ResiUserQueryValueDTO> conditions) {
public Map<String, Map<String, Object>> getDataForExport(Map<String, FormItem> formItemMap, Map<String, Map<String, Object>> resiMainList, String customerId, String formCode, String baseTableName, List<ResiUserQueryValueDTO> conditions) {
List<Map<String, Object>> mapList = this.dynamicQuery(customerId, formCode, baseTableName, conditions);
Map<String, Map<String, Object>> result = new LinkedHashMap<>();
mapList.stream().filter(Objects::nonNull).forEach(map -> {
String resiId = (String) map.getOrDefault(UserConstant.IC_RESI_USER, "");
if ("ic_resi_user".equals(baseTableName)) {
resiId = (String) map.get("ID");
}
if (StringUtils.isBlank(resiId)){
log.error("getDataForExport error,resiId:{}",resiId);
return;
}
result.put(resiId, map);
for (Map.Entry<String, FormItem> e : formItemMap.entrySet()) {
String k = e.getKey();
FormItem v = e.getValue();
@ -554,8 +588,16 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
if (temp != null) {
if (v.getOptionSourceType().equals("remote")) {
try {
Map<String, IcResiUserImportServiceImpl.ColumnWrapper> columnWrappers = new HashMap<>();
if(v.getItemId().equals("1078")){
Map<String, Object> userMap = resiMainList.get(map.get(UserConstant.IC_RESI_USER));
Object gridId = userMap.get(UserConstant.GRID_ID);
IcResiUserImportServiceImpl.ColumnWrapper value = new IcResiUserImportServiceImpl.ColumnWrapper();
value.setColValue(gridId.toString());
columnWrappers.put("1001", value);
}
//todo 获取 options
Map<String, String> stringMap = icResiUserImportService.listRemoteOptions(new HashMap<>(), v.getOptionSourceValue(), null);
Map<String, String> stringMap = icResiUserImportService.listRemoteOptions(columnWrappers, v.getOptionSourceValue(), null);
if ("checkbox".equals(v.getItemType())) {
stringMap.forEach((label, value) -> map.put(value, temp.toString().contains(value) ? "是" : "否"));
} else if ("select".equals(v.getItemType())) {
@ -590,15 +632,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
}
}
}
if ("ic_resi_user".equals(baseTableName)) {
resiId = (String) map.get("ID");
}
if (StringUtils.isBlank(resiId)){
log.error("getDataForExport error,resiId:{}",resiId);
return;
}
result.put(resiId, map);
if (!"ic_resi_user".equals(baseTableName)) {
map.putAll(resiMainList.get(resiId));
return;
}
Object gridId = map.get(UserConstant.GRID_ID);
@ -607,7 +642,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
formDTO.setGridId(gridId.toString());
Result<CustomerGridDTO> gridInfoRes = govOrgOpenFeignClient.getGridBaseInfoByGridId(formDTO);
if (gridInfoRes != null && gridInfoRes.success() && gridInfoRes.getData() != null) {
map.put(UserConstant.GRID_ID, gridInfoRes.getData().getGridName());
map.put(UserConstant.GRID_NAME, gridInfoRes.getData().getGridName());
}
}
Object homeId = map.get(UserConstant.HOME_ID);

BIN
epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_info_cid.xls

Binary file not shown.

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

@ -153,6 +153,10 @@
<resultMap id="selectPersonData" type="com.epmet.dto.result.PersonDataResultDTO">
<result column="GZDW" property="workUnit"/>
<result column="ID_CARD" property="idCard"/>
<result column="name" property="name"/>
<result column="isVolunteer" property="isVolunteer"/>
<result column="CUSTOMER_ID" property="customerId"/>
<result column="GRID_ID" property="gridId"/>
<collection property="financialSituation" ofType="com.epmet.dto.FinancialSituationDTO">
<result column="YSR" property="monthlyIncome"/>
<result column="TXJE" property="retirementAmount"/>
@ -160,11 +164,14 @@
</resultMap>
<select id="personData" resultMap="selectPersonData">
SELECT
GZDW AS workUnit,
GZDW,
name,
YSR,
TXJE,
ID_CARD
ID_CARD,
IFNULL(IS_VOLUNTEER,'0') AS isVolunteer,
CUSTOMER_ID,
GRID_ID
FROM ic_resi_user
WHERE DEL_FLAG = '0'
AND ID = #{userId}

Loading…
Cancel
Save