jiangping
2024-06-25 79c9232338cddb4af6d38d8c024120d3d2d4df61
server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java
@@ -156,7 +156,8 @@
                 .selectAs(UnionApply::getCode,UnionChange::getApplyCode)
                .selectAs(Solutions::getName,UnionChange::getSolutionsName)
                .selectAs(UnionApply::getStartTime,UnionChange::getStartTime)
                .selectAs(UnionApply::getEndTime,UnionChange::getEndTime)
                .selectAs(UnionApply::getEndTime,UnionChange::getEndTime)
                .selectAs(Solutions::getDelOnlyReplace,UnionChange::getDelOnlyReplace)
                .selectAs(Company::getName,UnionChange::getShopName)
                .select("( select count(1) from apply_chagne_detail ad where t.id = ad.UNION_CHANGE_ID and ad.TYPE = 0  )",UnionChange::getAddNum)
                .select("( select count(1) from apply_chagne_detail ad where t.id = ad.UNION_CHANGE_ID and ad.TYPE = 1  )",UnionChange::getDelNum)
@@ -827,9 +828,6 @@
                ,unionChange.getId(),applyLogType.getKey(),null, JSONObject.toJSONString(unionChange));
        applyLogMapper.insert(log);
        if(true){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED);
        }
    }
@@ -841,8 +839,6 @@
        bigDecimalVO.setTotalFee(BigDecimal.ZERO);
        bigDecimalVO.setCurrentFee(BigDecimal.ZERO);
        InsuranceApply insuranceApply = insuranceApplyMapper.selectById(applyChange.getApplyId());
        List<ApplyChagneDetail> addList = applyChagneDetailList.stream().filter(f->Constants.equalsInteger(f.getType(),Constants.ZERO)).collect(Collectors.toList());
        List<ApplyChagneDetail> reduceList = applyChagneDetailList.stream().filter(f->Constants.equalsInteger(f.getType(),Constants.ONE)).collect(Collectors.toList());
        List<ApplyChagneDetail> changeList = applyChagneDetailList.stream().filter(f->Constants.equalsInteger(f.getType(),Constants.TWO)).collect(Collectors.toList());
@@ -891,7 +887,7 @@
    public void addChangeDetailData(ApplyChange applyChange, ApplyChagneDetail detail,InsuranceApply insuranceApply,Solutions solutions
            , BigDecimalVO bigDecimalVO,List<ApplyChagneDetail> reduceList,Integer i){
        //查询人员信息是否存在相同的方案下是否存在 冲突数据
        InsuranceApplyServiceImpl.checkStaticMemberSolution(solutions.getId(),
        InsuranceApplyServiceImpl.checkStaticMemberSolution(solutions.getBaseId(),
                detail.getIdcardNo(),detail.getMemberName(),DateUtil.getMontageDate(applyChange.getApplyStartTime(),1),DateUtil.getMontageDate(detail.getEndTime(),2),
                applyDetailJoinMapper);
@@ -957,13 +953,14 @@
                .set(Member::getStartTime,memberInsurance.getStartTime())
                .set(Member::getEndTime,memberInsurance.getEndTime())
                .set(Member::getDuId,memberInsurance.getDuId())
                .set(Member::getEditDate,applyChange.getEditDate())
                .set(Member::getEditor,applyChange.getEditor())
                .set(Member::getWorktypeId,memberInsurance.getWorktypeId())
                .eq(Member::getId, memberInsurance.getMemberId())
        );
//        if(1==1){
//            throw new BusinessException(ResponseStatus.NOT_ALLOWED);
//        }
//      if(1==1){
//          throw new BusinessException(ResponseStatus.NOT_ALLOWED);
//      }
    }
    /**
@@ -1064,7 +1061,7 @@
        //实际批单生效日期
        Date applyStartTime = DateUtil.getMontageDate(applyChange.getApplyStartTime(),1);
        //查询减保人员是否存在 冲突的 保单明细数据
        if(applyDetailJoinMapper.selectCount(new QueryWrapper<ApplyDetail>()
        /*if(applyDetailJoinMapper.selectCount(new QueryWrapper<ApplyDetail>()
                .lambda()
                .eq(ApplyDetail::getApplyId,applyChange.getApplyId())
                .eq(ApplyDetail::getIdcardNo,detail.getIdcardNo())
@@ -1073,7 +1070,7 @@
        )<=Constants.ZERO){
            throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "当前保单下,换厂人员【" + detail.getMemberName() + "】未查询到符合批单日期的数据");
        }
*/
        //查询员工是在主单下 是否存在生效中的数据
        ApplyDetail oldModel = applyDetailJoinMapper.selectOne(new QueryWrapper<ApplyDetail>().lambda()
                .eq(ApplyDetail::getApplyId, applyChange.getApplyId())