k94314517
2025-06-12 7257c9bc44ca11551c121a18133f304f209db32e
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
@@ -2025,6 +2025,7 @@
                ){
                    throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,投保员工信息数据缺失,请按照要求填写员工的有效信息!");
                }
                applyDetail.setId(null);
                applyDetail.setChangeStatus(Constants.ZERO);
                applyDetail.setCreateDate(new Date());
                applyDetail.setCreator(loginUserInfo.getId());
@@ -2097,7 +2098,7 @@
            }
            Long end = System.currentTimeMillis();
            logger.error("处理单数据结束时间:=========================>"+end +";耗时:====》"+(end-start));
            applyDetailJoinMapper.insert(applyDetailList);
            applyDetailMapper.insert(applyDetailList);
        }
    }
@@ -2397,7 +2398,8 @@
        queryWrapper.selectAs(Solutions::getPrice,InsuranceApply::getPrice);
        queryWrapper.selectAs(Solutions::getTimeUnit,InsuranceApply::getTimeUnit);
        queryWrapper.select("( select ifnull(sum(ad.FEE),0) from apply_chagne_detail ad left join  apply_change a on a.id = ad.APPLY_CHANGE_ID  where t.id = a.APPLY_ID  and a.status = 2  )",InsuranceApply::getChangeMoney);
        queryWrapper.select(" DATEDIFF( t.END_TIME ,now()  ) AS loseEfficacyDays  ");
//        queryWrapper.select(" case when t.START_TIME > now() then  0 when t.END_TIME >= now() then DATEDIFF(   now() ,t.START_TIME  ) when t.END_TIME <= now() then  DATEDIFF( t.END_TIME,  t.START_TIME )+1  else 0 end loseEfficacyDays   ");
        queryWrapper.select(" DATEDIFF( t.END_TIME,  t.START_TIME )+1 as loseEfficacyDays ");
        queryWrapper.select(" ( select count(DISTINCT(ad.MEMBER_ID)) from apply_detail ad  where ad.apply_id = t.id   ) as insureNum");
        queryWrapper.select(" ( select count(DISTINCT(ad.MEMBER_ID)) from apply_detail ad inner join insurance_apply a on ad.apply_id = a.id  and a.status in ( 5 , 27 )  where ad.apply_id = t.id and ad.END_TIME > now() and ad.START_TIME < now() ) as guaranteeNum");
        if(!Objects.isNull(pageWrap.getModel())&&!Objects.isNull(pageWrap.getModel().getType())){