From ca1e1982c1b6cf275b45ceb6d952465f84ed3830 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期二, 10 六月 2025 14:59:25 +0800
Subject: [PATCH] git ch

---
 server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java |   65 ++++++++++++++++++++++++--------
 1 files changed, 49 insertions(+), 16 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 71b3d50..ebd5b49 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
@@ -19,6 +19,7 @@
 import com.doumee.dao.business.model.*;
 import com.doumee.dao.business.vo.ApplyPowerVO;
 import com.doumee.dao.business.vo.CountCyclePriceVO;
+import com.doumee.dao.business.vo.dataBoard.InsuranceDataVO;
 import com.doumee.dao.system.SystemUserMapper;
 import com.doumee.dao.system.model.SystemUser;
 import com.doumee.service.business.InsuranceApplyService;
@@ -64,7 +65,6 @@
     private SmsEmailService smsEmailService;
     @Autowired
     private ApplyChangeJoinMapper applyChangeMapper;
-
     @Autowired
     private SystemDictDataBiz systemDictDataBiz;
     @Autowired
@@ -73,25 +73,20 @@
     private CompanyMapper companyMapper;
     @Autowired
     private MemberInsuranceJoinMapper memberInsuranceJoinMapper;
-
     @Autowired
     private ApplyDetailMapper applyDetailMapper;
     @Autowired
     private ApplyDetailJoinMapper applyDetailJoinMapper;
-
     @Autowired
     private ApplyLogMapper applyLogMapper;
     @Autowired
     private SignService signService;
     @Autowired
     private MultifileMapper multifileMapper;
-
     @Autowired
     private ApplyLogJoinMapper applyLogJoinMapper;
-
     @Autowired
     private SolutionsMapper solutionsMapper;
-
     @Autowired
     private MemberMapper memberMapper;
     @Autowired
@@ -106,7 +101,6 @@
     private DuWorkTypeJoinMapper duWorkTypeJoinMapper;
     @Autowired
     private SolutionWorktypeJoinMapper solutionWorktypeJoinMapper;
-
     @Autowired
     private NoticesMapper noticesMapper;
     @Autowired
@@ -121,7 +115,8 @@
     private SystemUserMapper systemUserMapper;
     @Autowired
     private CompanyDepartmentMapper companyDepartmentMapper;
-
+    @Autowired
+    private InsuranceMapper insuranceMapper;
 
     @Override
     @Transactional(rollbackFor = {Exception.class,BusinessException.class})
@@ -152,7 +147,6 @@
             }
             update.setStatus(Constants.InsuranceApplyStatus.WTB_RETURN.getKey());
         }
-
         update.setEditDate(new Date());
         update.setEditor(user.getId());
         update.setCheckDate(update.getEditDate());
@@ -160,7 +154,6 @@
         update.setCheckUserId(user.getId());
         update.setId(model.getId());
         insuranceApplyMapper.updateById(update);
-
         //瀛樺偍寰呭姙淇℃伅
         Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.INSURANCE_APPLY;
         //鍒犻櫎鍏朵粬寰呭姙
@@ -170,8 +163,6 @@
         Notices notices = new Notices(noticeObjectType,Constants.ONE,insuranceApply.getId(),solutions.getName(),
                 model.getCompanyId(), Constants.NoticeType.FOUR);
         noticesMapper.insert(notices);
-
-
         Constants.ApplyLogType applyLogType = Constants.ApplyLogType.PLATFORM_RETURN;
         String info =applyLogType.getInfo();
         info = info.replace("${param}", update.getCheckInfo());
@@ -225,7 +216,6 @@
                 ||StringUtils.isBlank( insuranceApply.getBaoxiandanFile() .getName())){
             throw  new BusinessException(ResponseStatus.BAD_REQUEST);
         }
-
         InsuranceApply model = insuranceApplyMapper.selectById(insuranceApply.getId());
         if(model == null ||!Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){
             throw  new BusinessException(ResponseStatus.DATA_EMPTY);
@@ -340,7 +330,7 @@
                 );
 
             }
-            memberInsuranceJoinMapper.insertBatchSomeColumn(memberInsuranceList);
+            memberInsuranceJoinMapper.insert(memberInsuranceList);
         }
 
         this.updateApplyCurrentFee(insuranceApply.getId(),null);
@@ -2462,7 +2452,7 @@
                 this.checkMemberSolution(solutions.getParentId(),member.getIdcardNo(),member.getName(),insuranceApply.getStartTime(),insuranceApply.getEndTime(),insuranceApply.getId());
             }
             if(CollectionUtils.isNotEmpty(addMemberList)){
-                memberJoinMapper.insertBatchSomeColumn(addMemberList);
+                memberJoinMapper.insert(addMemberList);
             }
             memberList.addAll(addMemberList);
             for (int i = 0; i < applyDetailList.size(); i++) {
@@ -2549,7 +2539,7 @@
             }
             Long end = System.currentTimeMillis();
             logger.error("澶勭悊鍗曟暟鎹粨鏉熸椂闂�:=========================>"+end +";鑰楁椂锛�====銆�"+(end-start));
-            applyDetailJoinMapper.insertBatchSomeColumn(applyDetailList);
+            applyDetailJoinMapper.insert(applyDetailList);
         }
     }
 
@@ -2599,6 +2589,47 @@
             }
 
         };
+    }
+
+
+    public static void checkStaticMemberSolutionNew(Integer solutionId,Integer memberId,String memberIdCard,String memberName,Date startTime,
+                                                 Date endTime,ApplyDetailJoinMapper applyDetailJoinMapper){
+        List<ApplyDetail> applyDetailList = new ArrayList<ApplyDetail>();
+        try {
+            applyDetailList = applyDetailJoinMapper.selectJoinList(ApplyDetail.class,
+                    new MPJLambdaWrapper<ApplyDetail>()
+                            .selectAll(ApplyDetail.class)
+                            .selectAs(InsuranceApply::getCode,ApplyDetail::getApplyCode)
+                            .selectAs(Company::getName,ApplyDetail::getCompanyName)
+                            .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyDetail::getApplyId)
+                            .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId)
+                            .leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId)
+                            .eq(ApplyDetail::getIdcardNo,memberIdCard)
+                            .eq(Solutions::getBaseId,solutionId)
+                            .eq(ApplyDetail::getIsdeleted,Constants.ZERO)
+                            .notIn(InsuranceApply::getStatus
+                                    ,Constants.InsuranceApplyStatus.CLOSE.getKey()
+                                    ,Constants.InsuranceApplyStatus.WTB_CLOSED.getKey() )
+                            .apply(" ( " +
+                                    " '"+DateUtil.getPlusTime(startTime)+"'  <= t.start_time AND t.start_time < '"+DateUtil.getPlusTime(endTime)+"' " +
+                                    " or " +
+                                    "  ( '"+DateUtil.getPlusTime(startTime)+"' < t.end_time AND t.end_time < '"+DateUtil.getPlusTime(endTime)+"' )  " +
+                                    " or " +
+                                    " ( '"+DateUtil.getPlusTime(startTime)+"' > t.start_time AND '"+DateUtil.getPlusTime(endTime)+"' < t.end_time )" +
+                                    " ) " ));
+        }catch (Exception e){
+
+        }
+        if(applyDetailList.size() >Constants.ZERO){
+            String companyName = applyDetailList.get(Constants.ZERO).getCompanyName();
+            String idCode = applyDetailList.get(Constants.ZERO).getIdcardNo();
+            if(StringUtils.isNotBlank(companyName)){
+                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"璇ュ憳宸ャ��"+memberName+" "+idCode+"銆戝凡鍦ㄣ��"+companyName+"銆戝瓨鍦ㄤ繚闄�,璇疯仈绯诲鏈嶇‘璁�");
+            }else{
+                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"璇ュ憳宸ャ��"+memberName+" "+idCode+"銆戝湪璇ヤ繚闄╂柟妗堜笅宸插瓨鍦ㄦ姇淇濊褰曪紝鏃犳硶杩涜璇ユ搷浣�");
+            }
+        };
+
     }
 
     public static void checkStaticMemberSolution(Integer solutionId,Integer memberId,String memberIdCard,String memberName,Date startTime,
@@ -3776,6 +3807,8 @@
         return applyPowerVO;
     }
 
+
+
 }
 
 

--
Gitblit v1.9.3