|
@@ -3,6 +3,8 @@ package com.ruoyi.lnst.service.impl;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.ruoyi.common.core.exception.ServiceException;
|
|
|
import com.ruoyi.common.core.utils.StringUtils;
|
|
|
+import com.ruoyi.common.security.utils.EncryptionUtils;
|
|
|
+import com.ruoyi.common.security.utils.SecurityUtils;
|
|
|
import com.ruoyi.lnst.domain.InLnstLrxx;
|
|
|
import com.ruoyi.lnst.domain.ZwywJclrYcxx;
|
|
|
import com.ruoyi.lnst.mapper.ZwywJclrYcxxMapper;
|
|
@@ -86,11 +88,12 @@ public class ZwywJclrYcxxServiceImpl implements IZwywJclrYcxxService {
|
|
|
*/
|
|
|
@Override
|
|
|
public int insertZwywJclrYcxx(ZwywJclrYcxx zwywJclrYcxx) {
|
|
|
- InLnstLrxx lrxx = zwywLrJbxxMapper.selectZwywLrJbxxByJmZjhm(zwywJclrYcxx.getLrZjhm());
|
|
|
+ InLnstLrxx lrxx = zwywLrJbxxMapper.selectOne(new LambdaQueryWrapper<InLnstLrxx>().eq(InLnstLrxx::getLrZjhm,
|
|
|
+ SecurityUtils.sm4encrypt_ECB(EncryptionUtils.key, zwywJclrYcxx.getSfzh())));
|
|
|
if (ObjectUtils.isEmpty(lrxx)) {
|
|
|
throw new ServiceException("未查询到该老人信息");
|
|
|
}
|
|
|
- if (StringUtils.equals(lrxx.getLzzt(), "99")) {
|
|
|
+ if (StringUtils.equals(lrxx.getLzzt(), "0")) {
|
|
|
throw new ServiceException("该账号已被停用");
|
|
|
}
|
|
|
if (StringUtils.isNotEmpty(zwywJclrYcxx.getSfzh())) {
|
|
@@ -103,7 +106,7 @@ public class ZwywJclrYcxxServiceImpl implements IZwywJclrYcxxService {
|
|
|
}
|
|
|
|
|
|
private String getXb(String sfzh) {
|
|
|
- return Integer.parseInt(String.valueOf(sfzh.charAt(sfzh.length() - 2))) % 2 == 1 ? "1" : "2";
|
|
|
+ return Integer.parseInt(String.valueOf(sfzh.charAt(sfzh.length() - 2))) % 2 == 1 ? "男" : "女";
|
|
|
}
|
|
|
|
|
|
private String getCsrq(String sfzh) {
|