From d5d7a8461c6fd350806fbfbd738917b14f70c9e9 Mon Sep 17 00:00:00 2001 From: k94314517 <8417338+k94314517@user.noreply.gitee.com> Date: 星期二, 02 四月 2024 11:47:44 +0800 Subject: [PATCH] git ch --- server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java | 104 +++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 87 insertions(+), 17 deletions(-) diff --git a/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java index fe292ef..68e0d51 100644 --- a/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java +++ b/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java @@ -519,6 +519,13 @@ .eq(Notices::getObjId,model.getId())); Notices notices = new Notices(noticeObjectType,Constants.ZERO,model.getId(),model.getSolutionsName(),model.getCompanyId(),Constants.NoticeType.TWO); noticesMapper.insert(notices); + Solutions solutions = solutionsMapper.selectById(model.getSolutionId()); + if(Objects.nonNull(solutions)&&Objects.nonNull(solutions.getShopId())){ + Notices shopNotices = new Notices(noticeObjectType,Constants.TWO,model.getId(),model.getSolutionsName(),solutions.getShopId(),Constants.NoticeType.TWO); + noticesMapper.insert(shopNotices); + } + + Multifile f = new Multifile(); f.setIsdeleted(Constants.ZERO); @@ -648,10 +655,24 @@ multifileMapper.insert(f); + + //鏁版嵁鏃ュ織 Constants.ApplyLogType applyLogType = Constants.ApplyLogType.WTB_FINISH_MEMBER_LIST; ApplyLog log = new ApplyLog(update,applyLogType.getName(), null ,update.getId(),applyLogType.getKey(),JSONObject.toJSONString(model), JSONObject.toJSONString(update)); applyLogMapper.insert(log); + + Solutions solutions = solutionsMapper.selectById(model.getSolutionId()); + //寰呭姙閫氱煡 + if(Objects.nonNull(solutions)&&Objects.nonNull(solutions.getShopId())){ + Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.INSURANCE_APPLY; + Notices notices = new Notices(noticeObjectType,Constants.TWO,model.getId(),model.getSolutionsName(), + solutions.getShopId(), Constants.NoticeType.SEVEN); + notices.setParam1(model.getId().toString()); + noticesMapper.insert(notices); + } + + return f; } @@ -681,6 +702,15 @@ companyId, Constants.NoticeType.TWO); notices.setParam1(model.getApplyId().toString()); noticesMapper.insert(notices); + + Solutions solutions = solutionsMapper.selectById(model.getSolutionsId()); + //鍟嗘埛寰呭姙 + if(Objects.nonNull(solutions)&&Objects.nonNull(solutions.getShopId())){ + Notices shopNotices = new Notices(noticeObjectType,Constants.TWO, + model.getId(),solutions.getName(),solutions.getShopId(),Constants.NoticeType.TWO); + notices.setParam1(model.getApplyId().toString()); + noticesMapper.insert(shopNotices); + } Multifile f = new Multifile(); f.setIsdeleted(Constants.ZERO); @@ -732,6 +762,19 @@ ApplyLog log = new ApplyLog(update,applyLogType.getName(), null,update.getId(),applyLogType.getKey(),JSONObject.toJSONString(model), JSONObject.toJSONString(update)); applyLogMapper.insert(log); + + Solutions solutions = solutionsMapper.selectById(model.getSolutionsId()); + //寰呭姙閫氱煡 + if(Objects.nonNull(solutions)&&Objects.nonNull(solutions.getShopId())){ + Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.APPLY_CHANGE; + if(model.getType().equals(Constants.ONE)){ + noticeObjectType = Constants.NoticeObjectType.CHANGE_FACTORY; + } + Notices notices = new Notices(noticeObjectType,Constants.TWO,model.getId(),model.getSolutionsName(), + solutions.getShopId(), Constants.NoticeType.SEVEN); + notices.setParam1(model.getApplyId().toString()); + noticesMapper.insert(notices); + } return f; } @@ -958,6 +1001,7 @@ .selectAll(ApplyChange.class) .selectAs(Solutions::getName,InsuranceApply::getSolutionsName) .selectAs(Solutions::getEmail,InsuranceApply::getSolutionEmail) + .selectAs(Solutions::getId,ApplyChange::getSolutionsId) .selectAs(Company::getName,InsuranceApply::getCompanyName) .selectAs(InsuranceApply::getCompanyId,ApplyChange::getCompanyId) .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyChange::getApplyId) @@ -983,11 +1027,13 @@ } } + //濮旀墭淇� 鍔犲噺淇�/鎹㈠巶 绛剧讲浜哄憳鍚嶅崟 chagneList = applyChangeMapper.selectJoinList(ApplyChange.class, new MPJLambdaWrapper<ApplyChange>() .selectAll(ApplyChange.class) .selectAs(Solutions::getName,InsuranceApply::getSolutionsName) .selectAs(Solutions::getEmail,InsuranceApply::getSolutionEmail) + .selectAs(Solutions::getId,ApplyChange::getSolutionsId) .selectAs(Company::getName,InsuranceApply::getCompanyName) .selectAs(InsuranceApply::getCompanyId,ApplyChange::getCompanyId) .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyChange::getApplyId) @@ -1179,6 +1225,7 @@ .selectAll(ApplyChange.class) .selectAs(Solutions::getName,InsuranceApply::getSolutionsName) .selectAs(Solutions::getEmail,InsuranceApply::getSolutionEmail) + .selectAs(Solutions::getId,ApplyChange::getSolutionsId) .selectAs(Company::getName,InsuranceApply::getCompanyName) .selectAs(InsuranceApply::getCompanyId,ApplyChange::getCompanyId) .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyChange::getApplyId) @@ -1202,6 +1249,7 @@ .selectAll(ApplyChange.class) .selectAs(Solutions::getName,InsuranceApply::getSolutionsName) .selectAs(Solutions::getEmail,InsuranceApply::getSolutionEmail) + .selectAs(Solutions::getId,ApplyChange::getSolutionsId) .selectAs(Company::getName,InsuranceApply::getCompanyName) .selectAs(InsuranceApply::getCompanyId,ApplyChange::getCompanyId) .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyChange::getApplyId) @@ -1413,10 +1461,20 @@ //瀛樺偍寰呭姙淇℃伅 Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.INSURANCE_APPLY; - //鍒犻櫎鍏朵粬寰呭姙 - noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()) - .ne(Notices::getType,Constants.NoticeType.SIX.getStatus()) - .eq(Notices::getObjId,model.getId())); + if(Constants.equalsObject(solutions.getType(),Constants.ZERO)) { + //鍒犻櫎鍏朵粬寰呭姙 + noticesMapper.delete(new QueryWrapper<Notices>().lambda() + .eq(Notices::getObjType, noticeObjectType.getKey()) + .ne(Notices::getType, Constants.NoticeType.SIX.getStatus()) + .eq(Notices::getObjId, model.getId())); + }else{ + //鍒犻櫎鍏ㄩ儴寰呭姙 + noticesMapper.delete(new QueryWrapper<Notices>().lambda() + .eq(Notices::getObjType, noticeObjectType.getKey()) + .eq(Notices::getObjId, model.getId())); + } + + String info =applyLogType.getInfo(); if(StringUtils.isNotBlank(update.getCheckInfo())){ info = info.replace("${param}", update.getCheckInfo()); @@ -1497,17 +1555,25 @@ // info = info.replace("${param}", update.getCheckInfo()); ApplyLog log = new ApplyLog(insuranceApply,applyLogType.getName(),info,insuranceApply.getId(),applyLogType.getKey(),null, null); applyLogMapper.insert(log); - - - //鍙戦�佸緟鍔炰笟鍔� - //瀛樺偍寰呭姙淇℃伅 - Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.INSURANCE_APPLY; - //鍒犻櫎鍏朵粬寰呭姙 - noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()) - .ne(Notices::getType,Constants.NoticeType.SIX.getStatus()) - .eq(Notices::getObjId,insuranceApply.getId())); - Notices notices = new Notices(noticeObjectType,Constants.ZERO,insuranceApply.getId(),solutions.getName(),insuranceApply.getCompanyId(),Constants.NoticeType.ZERO); - noticesMapper.insert(notices); + + //鐩翠繚涓氬姟鍙戦�佸緟鍔� + if(Constants.equalsInteger(solutions.getType(),Constants.ZERO)){ + //瀛樺偍寰呭姙淇℃伅 + Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.INSURANCE_APPLY; + //鍒犻櫎鍏朵粬寰呭姙 + noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()) + .ne(Notices::getType,Constants.NoticeType.SIX.getStatus()) + .eq(Notices::getObjId,insuranceApply.getId())); + //瀛樺偍骞冲彴寰呭姙 + Notices notices = new Notices(noticeObjectType,Constants.ZERO,insuranceApply.getId(),solutions.getName(),insuranceApply.getCompanyId(),Constants.NoticeType.ZERO); + noticesMapper.insert(notices); + //鍟嗘埛寰呭姙 + if(Objects.nonNull(solutions.getShopId())){ + Notices shopNotices = new Notices(noticeObjectType,Constants.TWO, + insuranceApply.getId(),solutions.getName(),solutions.getShopId(),Constants.NoticeType.ZERO); + noticesMapper.insert(shopNotices); + } + } return insuranceApply.getId(); } @@ -2270,8 +2336,12 @@ Notices notices = new Notices(noticeObjectType,Constants.ZERO,insuranceApply.getId(),solutions.getName(), insuranceApply.getCompanyId(), Constants.NoticeType.THREE); noticesMapper.insert(notices); - - + //鍟嗘埛寰呭姙 + if(Objects.nonNull(solutions.getShopId())){ + Notices shopNotices = new Notices(noticeObjectType,Constants.TWO, + insuranceApply.getId(),solutions.getName(),solutions.getShopId(),Constants.NoticeType.THREE); + noticesMapper.insert(shopNotices); + } }else if(insuranceApplyOptDTO.getOptType().equals(Constants.TWO)){ insuranceApplyStatus = Constants.InsuranceApplyStatus.CLOSE; if(insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.CLOSE.getKey())){ -- Gitblit v1.9.3