修改移出记录的显示

This commit is contained in:
zhouxy 2026-01-08 18:08:46 +08:00
parent e4d24bd57a
commit 36460fd1bf
1 changed files with 24 additions and 32 deletions

View File

@ -405,46 +405,38 @@ public class AbnListController extends BaseController {
.isNotNull(TSAbnList::getRemdate)
.orderByDesc(TSAbnList::getLauptime);
list = tsAbnListService.list(wrapper);
// 处理移出原因 移出时间在上线前的对应旧系统(泰富)的移出原因
// 处理移出原因
if (CollectionUtils.isNotEmpty(list)){
for (TSAbnList tsAbnList : list) {
String enttype = tsAbnList.getEnttype();
String remexcpres = tsAbnList.getRemexcpres();
LocalDate date = LocalDate.parse("2021-10-10");// 上线时间
String reas = null;
if (date.isAfter(tsAbnList.getRemdate())){ //旧数据
if("9100".equals(enttype) || "9200".equals(enttype)){ // 农合
reas = Constant.OLD_ABN_FARMER_OUT.get(remexcpres);
}else if("9910".equals(enttype)){// 个体
reas = Constant.OLD_ABN_INDIVIDUAL_OUT.get(remexcpres);
}else {// 企业
reas = Constant.OLD_ABN_COMPANY_OUT.get(remexcpres);
if("9100".equals(enttype) || "9200".equals(enttype)){ // 农合
Map<String, TRBaseCode> remCodeMap = baseCodeService.getBaseCodeMapFormCache("CD78");
TRBaseCode code = remCodeMap.get(remexcpres);
if(code != null) {
reas = code.getName();
}
// 同时旧的移出机关与列入机关回显为同一个
tsAbnList.setRemDecorgCn(tsAbnList.getIntoDecorg());
}else {
if("9100".equals(enttype) || "9200".equals(enttype)){ // 农合
Map<String, TRBaseCode> remCodeMap = baseCodeService.getBaseCodeMapFormCache("CD78");
TRBaseCode code = remCodeMap.get(remexcpres);
if(code != null) {
reas = code.getName();
}
}else if("9910".equals(enttype)){// 个体
Map<String, TRBaseCode> remCodeMap = baseCodeService.getBaseCodeMapFormCache("CD76");
TRBaseCode code = remCodeMap.get(remexcpres);
if(code != null) {
reas = code.getName();
}
}else {// 企业
Map<String, TRBaseCode> remCodeMap = baseCodeService.getBaseCodeMapFormCache("CD72");
TRBaseCode code = remCodeMap.get(remexcpres);
if(code != null) {
reas = code.getName();
}
}else if("9910".equals(enttype)){// 个体
Map<String, TRBaseCode> remCodeMap = baseCodeService.getBaseCodeMapFormCache("CD76");
TRBaseCode code = remCodeMap.get(remexcpres);
if(code != null) {
reas = code.getName();
}
}else {// 企业
Map<String, TRBaseCode> remCodeMap = baseCodeService.getBaseCodeMapFormCache("CD72");
TRBaseCode code = remCodeMap.get(remexcpres);
if(code != null) {
reas = code.getName();
}
tsAbnList.setRemDecorgCn(gzaiccodeService.getNameByCode(tsAbnList.getRemDecorg()));
}
tsAbnList.setRemexcpresCn(reas);
//设置移出机关中文
String remDecorgCn = StringUtils.isNotEmpty(tsAbnList.getRemDecorg())
? tsAbnList.getRemDecorg() : gzaiccodeService.getNameByCode(tsAbnList.getReDecorg());
tsAbnList.setRemDecorgCn(remDecorgCn);
//设置移出原因中文
tsAbnList.setRemexcpresCn(StringUtils.isNotEmpty(tsAbnList.getRemreasons())
? tsAbnList.getRemreasons() : reas);
}
}
}