|
@@ -3,12 +3,16 @@ package com.ruoyi.gljt.service.impl;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.ruoyi.common.core.utils.DateUtils;
|
|
|
import com.ruoyi.common.core.utils.StringUtils;
|
|
|
+import com.ruoyi.common.security.utils.DictUtils;
|
|
|
import com.ruoyi.common.security.utils.EncryptionUtils;
|
|
|
import com.ruoyi.common.security.utils.SecurityUtils;
|
|
|
import com.ruoyi.common.security.utils.SysDeptJlUtils;
|
|
|
import com.ruoyi.gljt.domain.GljtSqLrHi;
|
|
|
+import com.ruoyi.gljt.domain.GljtXmpz;
|
|
|
import com.ruoyi.gljt.mapper.GljtSqLrHiMapper;
|
|
|
+import com.ruoyi.gljt.mapper.GljtXmpzMapper;
|
|
|
import com.ruoyi.gljt.service.IGljtSqLrHiService;
|
|
|
+import com.ruoyi.system.api.domain.SysDictData;
|
|
|
import com.ruoyi.system.mapper.SysDeptJlMapper;
|
|
|
import com.ruoyi.system.utils.SubCodeUtil;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
@@ -37,6 +41,9 @@ public class GljtSqLrHiServiceImpl implements IGljtSqLrHiService
|
|
|
@Autowired
|
|
|
private SysDeptJlMapper sysDeptJlMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private GljtXmpzMapper gljtXmpzMapper;
|
|
|
+
|
|
|
/**
|
|
|
* 查询高龄津贴申请老人信息历史
|
|
|
*
|
|
@@ -103,6 +110,42 @@ public class GljtSqLrHiServiceImpl implements IGljtSqLrHiService
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<GljtSqLrHi> programList(GljtSqLrHi gljtSqLrHi) {
|
|
|
+ EncryptionUtils.encryptionForPlaintext(gljtSqLrHi);
|
|
|
+ LambdaQueryWrapper<GljtSqLrHi> lqw = new LambdaQueryWrapper<>(gljtSqLrHi)
|
|
|
+ .orderByDesc(GljtSqLrHi::getCreateTimeStr);
|
|
|
+ List<GljtSqLrHi> res = gljtSqLrHiMapper.selectList(lqw);
|
|
|
+ List<SysDictData> pcDictDataList = DictUtils.getDictCache("GL013");
|
|
|
+ res.forEach(r -> {
|
|
|
+ EncryptionUtils.decryptForPlaintext(r);
|
|
|
+ r.setXzqhName(SysDeptJlUtils.getDeptCache(r.getXzqh()));
|
|
|
+ if (StringUtils.isNotEmpty(r.getXjdxzqh())) {
|
|
|
+ r.setXjdxzqhName(sysDeptJlMapper.getXzqhNames(r.getXjdxzqh()));
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ r.setAge(DateUtils.getCurrentAgeByMonth(r.getCsrq()) + "岁");
|
|
|
+ } catch (Exception ignored) {}
|
|
|
+ StringBuilder status = new StringBuilder();
|
|
|
+ GljtXmpz xmpz = gljtXmpzMapper.selectOne(new LambdaQueryWrapper<GljtXmpz>()
|
|
|
+ .likeRight(GljtXmpz::getXzqh, r.getXzqh().substring(0, 6)));
|
|
|
+ if (CollectionUtils.isNotEmpty(pcDictDataList) && ObjectUtils.isNotEmpty(xmpz)) {
|
|
|
+ String pcName = pcDictDataList.stream().filter(p -> StringUtils.equals(p.getDictValue(), r.getPc()))
|
|
|
+ .findFirst().orElse(new SysDictData()).getDictLabel();
|
|
|
+ String pcJe = null;
|
|
|
+ if (StringUtils.equals(r.getPc(), "0")) pcJe = xmpz.getBtzjE();
|
|
|
+ if (StringUtils.equals(r.getPc(), "1")) pcJe = xmpz.getBtzjN();
|
|
|
+ if (StringUtils.equals(r.getPc(), "2")) pcJe = xmpz.getBtzjH();
|
|
|
+ if (StringUtils.equals(r.getPc(), "3")) pcJe = xmpz.getBtzjEd();
|
|
|
+ if (StringUtils.equals(r.getPc(), "4")) pcJe = xmpz.getBtzjNd();
|
|
|
+ if (StringUtils.equals(r.getPc(), "5")) pcJe = xmpz.getBtzjHd();
|
|
|
+ status.append(pcName).append(" ").append(pcJe).append("/月");
|
|
|
+ r.setProgramStatus(status.toString());
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 新增高龄津贴申请老人信息历史
|
|
|
*
|