|
|
@ -23,10 +23,14 @@ import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter; |
|
|
|
import com.epmet.dao.DataSyncRecordDisabilityDao; |
|
|
|
import com.epmet.dto.DataSyncRecordDisabilityDTO; |
|
|
|
import com.epmet.dto.IcResiUserDTO; |
|
|
|
import com.epmet.dto.form.CustomerFormQueryDTO; |
|
|
|
import com.epmet.dto.form.IcFormOptionsQueryFormDTO; |
|
|
|
import com.epmet.dto.form.dataSync.DataSyncRecordDisabilityFormDTO; |
|
|
|
import com.epmet.dto.form.dataSync.ResiInfoDTO; |
|
|
|
import com.epmet.dto.result.FormItemResult; |
|
|
|
import com.epmet.entity.DataSyncRecordDisabilityEntity; |
|
|
|
import com.epmet.excel.DataSyncRecordDisabilityExcel; |
|
|
|
import com.epmet.feign.OperCustomizeOpenFeignClient; |
|
|
|
import com.epmet.service.DataSyncRecordDisabilityService; |
|
|
|
import com.epmet.service.IcResiUserService; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
@ -55,6 +59,8 @@ public class DataSyncRecordDisabilityServiceImpl extends BaseServiceImpl<DataSyn |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private IcResiUserService icResiUserService; |
|
|
|
@Autowired |
|
|
|
private OperCustomizeOpenFeignClient operCustomizeOpenFeignClient; |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageData<DataSyncRecordDisabilityDTO> page(Map<String, Object> params) { |
|
|
@ -171,4 +177,56 @@ public class DataSyncRecordDisabilityServiceImpl extends BaseServiceImpl<DataSyn |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Desc: 批量更新 |
|
|
|
* 更新 ic_resi_user的是否残疾,cjlb,cjzk,cjzh |
|
|
|
* 添加 变更记录 |
|
|
|
* 回填残疾表状态 |
|
|
|
* @param ids |
|
|
|
* @author zxc |
|
|
|
* @date 2022/10/13 16:18 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public void batchUpdate(String[] ids, String customerId) { |
|
|
|
if (null == ids || ids.length == NumConstant.ZERO){ |
|
|
|
return; |
|
|
|
} |
|
|
|
List<String> all = Arrays.asList(ids); |
|
|
|
List<DataSyncRecordDisabilityEntity> entities = baseDao.selectBatchIds(all); |
|
|
|
IcFormOptionsQueryFormDTO formDTO = new IcFormOptionsQueryFormDTO(); |
|
|
|
formDTO.setCustomerId(customerId); |
|
|
|
formDTO.setFormCode("resi_base_info"); |
|
|
|
formDTO.setColumnName("CJZK"); |
|
|
|
Result<Map<String, String>> cjzkOptionsMap = operCustomizeOpenFeignClient.getOptionsMap(formDTO); |
|
|
|
if (!cjzkOptionsMap.success()){ |
|
|
|
throw new EpmetException("operCustomizeOpenFeignClient.getOptionsMap执行失败"); |
|
|
|
} |
|
|
|
formDTO.setColumnName("CJLB"); |
|
|
|
Result<Map<String, String>> cjlbOptionsMap = operCustomizeOpenFeignClient.getOptionsMap(formDTO); |
|
|
|
if (!cjlbOptionsMap.success()){ |
|
|
|
throw new EpmetException("operCustomizeOpenFeignClient.getOptionsMap执行失败"); |
|
|
|
} |
|
|
|
Map<String, String> cjlbMap = cjlbOptionsMap.getData(); |
|
|
|
Map<String, String> cjzkMap = cjzkOptionsMap.getData(); |
|
|
|
entities.forEach(e -> { |
|
|
|
cjlbMap.forEach((k,v) ->{ |
|
|
|
if (e.getCjlbCn().equals(v)){ |
|
|
|
e.setCjlb(k); |
|
|
|
} |
|
|
|
}); |
|
|
|
cjzkMap.forEach((k,v) -> { |
|
|
|
if (e.getCjzkCn().equals(v)){ |
|
|
|
e.setCjzk(k); |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
// 变更记录
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void disposeDisabilitybatchUpdate(List<DataSyncRecordDisabilityEntity> entities){ |
|
|
|
baseDao.batchUpdateResiDisability(entities); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|