Browse Source

Merge remote-tracking branch 'origin/dev_compare_data'

dev
yinzuomei 3 years ago
parent
commit
95dc31ae8c
  1. 8
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/DataSyncRecordDisabilityServiceImpl.java
  2. 2
      epmet-user/epmet-user-server/src/main/resources/mapper/DataSyncRecordDisabilityDao.xml

8
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/DataSyncRecordDisabilityServiceImpl.java

@ -11,6 +11,7 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.enums.GenderEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
@ -97,7 +98,10 @@ public class DataSyncRecordDisabilityServiceImpl extends BaseServiceImpl<DataSyn
public DataSyncRecordDisabilityDTO get(String id) { public DataSyncRecordDisabilityDTO get(String id) {
DataSyncRecordDisabilityEntity entity = baseDao.selectById(id); DataSyncRecordDisabilityEntity entity = baseDao.selectById(id);
DataSyncRecordDisabilityDTO result = ConvertUtils.sourceToTarget(entity, DataSyncRecordDisabilityDTO.class); DataSyncRecordDisabilityDTO result = ConvertUtils.sourceToTarget(entity, DataSyncRecordDisabilityDTO.class);
result.setGenderCn(GenderEnum.UN_KNOWN.getName());
if (null != result.getGender()){
result.setGenderCn(result.getGender() == NumConstant.ONE ? "男" : "女"); result.setGenderCn(result.getGender() == NumConstant.ONE ? "男" : "女");
}
IcResiUserDTO icResiUserDTO = icResiUserService.get(entity.getIcResiUserId()); IcResiUserDTO icResiUserDTO = icResiUserService.get(entity.getIcResiUserId());
ResiInfoDTO resiInfoDTO = ConvertUtils.sourceToTarget(icResiUserDTO, ResiInfoDTO.class); ResiInfoDTO resiInfoDTO = ConvertUtils.sourceToTarget(icResiUserDTO, ResiInfoDTO.class);
resiInfoDTO.setGenderCn(resiInfoDTO.getGender().equals(NumConstant.ONE_STR) ? "男" : "女"); resiInfoDTO.setGenderCn(resiInfoDTO.getGender().equals(NumConstant.ONE_STR) ? "男" : "女");
@ -241,6 +245,7 @@ public class DataSyncRecordDisabilityServiceImpl extends BaseServiceImpl<DataSyn
String customerId = tokenDto.getCustomerId(); String customerId = tokenDto.getCustomerId();
String userId = tokenDto.getUserId(); String userId = tokenDto.getUserId();
List<String> all = Arrays.asList(ids); List<String> all = Arrays.asList(ids);
// 根据IDs查询烟台拉取的残疾信息
List<DataSyncRecordDisabilityEntity> entities = baseDao.selectBatchIds(all); List<DataSyncRecordDisabilityEntity> entities = baseDao.selectBatchIds(all);
IcFormOptionsQueryFormDTO formDTO = new IcFormOptionsQueryFormDTO(); IcFormOptionsQueryFormDTO formDTO = new IcFormOptionsQueryFormDTO();
formDTO.setCustomerId(customerId); formDTO.setCustomerId(customerId);
@ -269,7 +274,8 @@ public class DataSyncRecordDisabilityServiceImpl extends BaseServiceImpl<DataSyn
} }
}); });
}); });
entities.stream().filter(e -> StringUtils.isBlank(e.getCjzk()) || StringUtils.isBlank(e.getCjlb())).forEach(e -> e.setUpdateStatus(true)); // cjzk,cjlb为空的,处理结果赋值 处理失败
// entities.stream().filter(e -> StringUtils.isBlank(e.getCjzk()) || StringUtils.isBlank(e.getCjlb())).forEach(e -> e.setUpdateStatus(true));
// 变更记录 // 变更记录
List<CategoryStatusAndIdDTO> collect = entities.stream().map(m -> { List<CategoryStatusAndIdDTO> collect = entities.stream().map(m -> {
CategoryStatusAndIdDTO dto = new CategoryStatusAndIdDTO(); CategoryStatusAndIdDTO dto = new CategoryStatusAndIdDTO();

2
epmet-user/epmet-user-server/src/main/resources/mapper/DataSyncRecordDisabilityDao.xml

@ -112,7 +112,7 @@
when id = #{item.id} then '处理失败' when id = #{item.id} then '处理失败'
</when> </when>
<otherwise> <otherwise>
when id = #{item.id} then '处理成功' when id = #{item.id} then ''
</otherwise> </otherwise>
</choose> </choose>
</foreach> </foreach>

Loading…
Cancel
Save