|
@@ -81,6 +81,9 @@ public class GljtSqSqServiceImpl implements IGljtSqSqService
|
|
@Autowired
|
|
@Autowired
|
|
private RemoteSysConfigService remoteConfigService;
|
|
private RemoteSysConfigService remoteConfigService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private GljtJfxxMapper gljtJfxxMapper;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 查询高龄津贴申请信息
|
|
* 查询高龄津贴申请信息
|
|
*
|
|
*
|
|
@@ -219,6 +222,7 @@ public class GljtSqSqServiceImpl implements IGljtSqSqService
|
|
if (StringUtils.equals(gljtSqSq.getStatus(), GljtAdStatus.MONTH.getCode())) {
|
|
if (StringUtils.equals(gljtSqSq.getStatus(), GljtAdStatus.MONTH.getCode())) {
|
|
lr.setStatus(GljtLrStatus.FF.getCode());
|
|
lr.setStatus(GljtLrStatus.FF.getCode());
|
|
try {
|
|
try {
|
|
|
|
+ asyncIn(gljtSqSq);
|
|
gljtSqUtils.insertLrHi(lr, "0");
|
|
gljtSqUtils.insertLrHi(lr, "0");
|
|
} catch (Exception ignored) {}
|
|
} catch (Exception ignored) {}
|
|
} else {
|
|
} else {
|
|
@@ -241,6 +245,7 @@ public class GljtSqSqServiceImpl implements IGljtSqSqService
|
|
public int updateGljtSqSq(GljtSqSq gljtSqSq) {
|
|
public int updateGljtSqSq(GljtSqSq gljtSqSq) {
|
|
GljtSqSq old = gljtSqSqMapper.selectById(gljtSqSq.getId());
|
|
GljtSqSq old = gljtSqSqMapper.selectById(gljtSqSq.getId());
|
|
if (ObjectUtils.isEmpty(old)) throw new ServiceException("该申请已被变更,请刷新后再次尝试");
|
|
if (ObjectUtils.isEmpty(old)) throw new ServiceException("该申请已被变更,请刷新后再次尝试");
|
|
|
|
+ EncryptionUtils.decryptForPlaintext(old);
|
|
if (StringUtils.equals(old.getStatus(), GljtAdStatus.CG.getCode())) {
|
|
if (StringUtils.equals(old.getStatus(), GljtAdStatus.CG.getCode())) {
|
|
if (StringUtils.isEmpty(gljtSqSq.getSqShjg())) {
|
|
if (StringUtils.isEmpty(gljtSqSq.getSqShjg())) {
|
|
// 草稿
|
|
// 草稿
|
|
@@ -281,6 +286,7 @@ public class GljtSqSqServiceImpl implements IGljtSqSqService
|
|
lr.setStatus(GljtLrStatus.FF.getCode());
|
|
lr.setStatus(GljtLrStatus.FF.getCode());
|
|
lr.setFfyf(old.getFfyf());
|
|
lr.setFfyf(old.getFfyf());
|
|
try {
|
|
try {
|
|
|
|
+ asyncIn(old);
|
|
BeanUtil.copyProperties(gljtSqSq, gljtSqLr, new CopyOptions().ignoreNullValue());
|
|
BeanUtil.copyProperties(gljtSqSq, gljtSqLr, new CopyOptions().ignoreNullValue());
|
|
gljtSqLr.setStatus(GljtLrStatus.FF.getCode());
|
|
gljtSqLr.setStatus(GljtLrStatus.FF.getCode());
|
|
gljtSqUtils.insertLrHi(gljtSqLr, "0");
|
|
gljtSqUtils.insertLrHi(gljtSqLr, "0");
|
|
@@ -295,6 +301,33 @@ public class GljtSqSqServiceImpl implements IGljtSqSqService
|
|
return gljtSqSqMapper.updateById(gljtSqSq);
|
|
return gljtSqSqMapper.updateById(gljtSqSq);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private void asyncIn(GljtSqSq sq) {
|
|
|
|
+ if (StringUtils.isNotEmpty(sq.getSqbfys()) && !StringUtils.equals(sq.getSqbfys(), "0")) {
|
|
|
|
+ List<GljtJfxx> res = new ArrayList<>();
|
|
|
|
+ GljtXmpz pz = gljtSqUtils.getXmpz();
|
|
|
|
+ GljtSqLr lr = gljtSqLrMapper.selectById(sq.getLrId());
|
|
|
|
+ if (ObjectUtils.isEmpty(lr)) throw new ServiceException("该老人已被变更请刷新后重试");
|
|
|
|
+ EncryptionUtils.decryptForPlaintext(lr);
|
|
|
|
+ List<String> monthList = DateUtils.getMonthsBetween(sq.getFfyf(), DateUtils.getMonthAfter(sq.getFfyf(), Integer.parseInt(sq.getSqbfys()) - 1));
|
|
|
|
+ for (String ffyf: monthList) {
|
|
|
|
+ if (gljtJfxxMapper.selectCount(new LambdaQueryWrapper<GljtJfxx>()
|
|
|
|
+ .eq(GljtJfxx::getLrId, lr.getId()).eq(GljtJfxx::getFfyf, ffyf)) == 0) {
|
|
|
|
+ GljtJfxx in = new GljtJfxx();
|
|
|
|
+ BeanUtil.copyProperties(lr, in, new CopyOptions().ignoreNullValue());
|
|
|
|
+ in.setFfyf(ffyf);
|
|
|
|
+ in.setLrId(lr.getId());
|
|
|
|
+ GljtSqUtils.checkBtbz(in, lr, ffyf, pz);
|
|
|
|
+ in.setJkzk(lr.getJkzkDjzt());
|
|
|
|
+ in.setLrzt("1");
|
|
|
|
+ in.setFflx("1"); // 0当发1补发2追缴3补追缴
|
|
|
|
+ in.setStatus("0");
|
|
|
|
+ res.add(in);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ gljtJfxxMapper.batchInsert(res);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public int editFj(GljtSqSq gljtSqSq) {
|
|
public int editFj(GljtSqSq gljtSqSq) {
|
|
if (StringUtils.isAnyEmpty(gljtSqSq.getId(), gljtSqSq.getSqbfj())) throw new ServiceException("申请及附件不能为空");
|
|
if (StringUtils.isAnyEmpty(gljtSqSq.getId(), gljtSqSq.getSqbfj())) throw new ServiceException("申请及附件不能为空");
|
|
@@ -360,9 +393,9 @@ public class GljtSqSqServiceImpl implements IGljtSqSqService
|
|
Map<String, String> res = new LinkedHashMap<>();
|
|
Map<String, String> res = new LinkedHashMap<>();
|
|
if (StringUtils.isNotEmpty(gljtSqSq.getFfyf()) && StringUtils.isNotEmpty(gljtSqSq.getCsrq())) {
|
|
if (StringUtils.isNotEmpty(gljtSqSq.getFfyf()) && StringUtils.isNotEmpty(gljtSqSq.getCsrq())) {
|
|
try {
|
|
try {
|
|
- Date ffDate = DateUtils.dateTime("yyyyMM", gljtSqSq.getFfyf());
|
|
|
|
|
|
+ Date ffDate = DateUtils.dateTime("yyyyMM", gljtSqSq.getFfyf());
|
|
if (ObjectUtils.isNotEmpty(ffDate) && ffDate.before(new Date())) {
|
|
if (ObjectUtils.isNotEmpty(ffDate) && ffDate.before(new Date())) {
|
|
- int bfys = DateUtils.calculateMonthsBetween(ffDate, new Date());
|
|
|
|
|
|
+ int bfys = DateUtils.calculateMonthsBetween(ffDate, new Date());
|
|
int after80 = DateUtils.checkFor80(gljtSqSq.getCsrq());
|
|
int after80 = DateUtils.checkFor80(gljtSqSq.getCsrq());
|
|
if (after80 < bfys) {
|
|
if (after80 < bfys) {
|
|
bfys = after80;
|
|
bfys = after80;
|
|
@@ -377,8 +410,9 @@ public class GljtSqSqServiceImpl implements IGljtSqSqService
|
|
int start90 = 90 * 12;
|
|
int start90 = 90 * 12;
|
|
int start100 = 100 * 12;
|
|
int start100 = 100 * 12;
|
|
int month = DateUtils.getMonthByBirth(gljtSqSq.getCsrq(), gljtSqSq.getFfyf() + "01");
|
|
int month = DateUtils.getMonthByBirth(gljtSqSq.getCsrq(), gljtSqSq.getFfyf() + "01");
|
|
|
|
+ if (month < 960) month = 960;
|
|
for (int i = 0; i < bfys; i++) {
|
|
for (int i = 0; i < bfys; i++) {
|
|
- int ffyfMonth = month - i;
|
|
|
|
|
|
+ int ffyfMonth = month + i;
|
|
if (ffyfMonth >= start80 && ffyfMonth < start90) {
|
|
if (ffyfMonth >= start80 && ffyfMonth < start90) {
|
|
if (StringUtils.equals(gljtSqSq.getIsdb(), "1")) {
|
|
if (StringUtils.equals(gljtSqSq.getIsdb(), "1")) {
|
|
sum = sum.add(new BigDecimal(xm.getBtzjEd()));
|
|
sum = sum.add(new BigDecimal(xm.getBtzjEd()));
|