فهرست منبع

Merge remote-tracking branch 'origin/master'

wks 1 سال پیش
والد
کامیت
b71d61608e

+ 1 - 0
commons/src/main/java/com/jzg/commons/aop/aspect/OperatorTrajectoryAspect.java

@@ -194,6 +194,7 @@ public class OperatorTrajectoryAspect {
             case "U":
                 for (String s : ids) {
                     beforeData = GetSelectIdDataUtils.selectById(operatorTrajectory.entityClass(), operatorTrajectory.mapperClass(), s);
+                    trajectory.setId(IdGenerate.nextId());
                     trajectory.setPrimaryValue(s);
                     if (!Objects.isNull(beforeData)) {
                         trajectory.setBeforeJson(JSON.toJSONString(beforeData));

+ 2 - 2
commons/src/main/java/com/jzg/commons/entity/agreement/po/PtlAgreementAttribution.java

@@ -94,11 +94,11 @@ public class PtlAgreementAttribution implements Serializable {
     @TableField(exist = false)
     private String deptName;
 
-    public PtlAgreementAttribution(PtlAgreementAttributionSaveVo ptlAgreementAttributionSaveVo,PtlInsAttributionTemplate ptlInsAttributionTemplate) {
+    public PtlAgreementAttribution(PtlAgreementAttributionSaveVo ptlAgreementAttributionSaveVo,PtlInsAttributionTemplate ptlInsAttributionTemplate,String esmInsCompanyName) {
         this.id = IdGenerate.nextId();
         this.userDept = ptlAgreementAttributionSaveVo.getUserDept();
         this.insCompanyId = ptlInsAttributionTemplate.getInsCompanyId();
-        this.insCompanyName = ptlInsAttributionTemplate.getInsCompanyName();
+        this.insCompanyName = esmInsCompanyName;
         this.templateId = ptlInsAttributionTemplate.getId();
         this.apiType = ptlAgreementAttributionSaveVo.getApiType();
         this.fields = JSONArray.parseArray(JSONArray.toJSONString(ptlAgreementAttributionSaveVo.getFields()));

+ 16 - 0
commons/src/main/java/com/jzg/commons/service/impl/OperatorTrajectoryServiceImpl.java

@@ -1,6 +1,7 @@
 package com.jzg.commons.service.impl;
 
 import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.nacos.common.utils.CollectionUtils;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jzg.commons.constants.Crud;
@@ -15,6 +16,8 @@ import jakarta.annotation.Resource;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 
+import java.time.LocalDate;
+import java.time.LocalDateTime;
 import java.util.List;
 
 @Service
@@ -55,6 +58,19 @@ public class OperatorTrajectoryServiceImpl implements OperatorTrajectoryService
         LambdaQueryWrapper<OperatorTrajectory> lambdaQueryWrapper = new LambdaQueryWrapper<>();
         lambdaQueryWrapper.like(StringUtils.isNotEmpty(logParam.getOperator()),OperatorTrajectory::getCreateBy,logParam.getOperator());
         lambdaQueryWrapper.like(StringUtils.isNotEmpty(logParam.getFunction()),OperatorTrajectory::getModuleName,logParam.getFunction());
+        if (CollectionUtils.isNotEmpty(logParam.getOperatingTime())) {
+            List<LocalDate> dates = logParam.getOperatingTime();
+            if (dates.size() >= 2) {
+                // 获取开始日期和结束日期
+                LocalDate startDate = dates.get(0);
+                LocalDate endDate = dates.get(1);
+                // 转换为当天的开始和结束时间
+                LocalDateTime startTime = startDate.atStartOfDay();
+                LocalDateTime endTime = endDate.atTime(23, 59, 59);
+                // 添加日期范围条件
+                lambdaQueryWrapper.between(OperatorTrajectory::getCreateTime, startTime, endTime);
+            }
+        }
         Page page = operatorTrajectoryMapper.selectPage(logParam.getPage(), lambdaQueryWrapper);
         if (page.getTotal() > 0){
             List<OperatorTrajectory> list = page.getRecords();

+ 6 - 1
platform/src/main/java/com/jzg/service/impl/PtlAgreementAttributionImpl.java

@@ -11,6 +11,7 @@ import com.jzg.commons.entity.agreement.po.PtlAgreementUrl;
 import com.jzg.commons.entity.agreement.po.PtlInsAttributionTemplate;
 import com.jzg.commons.entity.agreement.vo.PtlAgreementAttributionQueryVo;
 import com.jzg.commons.entity.agreement.vo.PtlAgreementAttributionSaveVo;
+import com.jzg.commons.entity.po.EsmInsCompany;
 import com.jzg.commons.entity.po.PtlAgreement;
 import com.jzg.commons.entity.po.SysDept;
 import com.jzg.commons.exception.SystemException;
@@ -41,6 +42,9 @@ public class PtlAgreementAttributionImpl extends ServiceImpl<PtlAgreementAttribu
     @Resource
     private PtlAgreementUrlService ptlAgreementUrlService;
 
+    @Resource
+    private EsmInsCompanyService esmInsCompanyService;
+
     @Resource
     private PtlAgreementService ptlAgreementService;
 
@@ -54,7 +58,8 @@ public class PtlAgreementAttributionImpl extends ServiceImpl<PtlAgreementAttribu
             throw new RuntimeException("该保险公司模版不存在");
         }
         verifyAgreeAttribution(ptlAgreementAttributionSaveVo.getUserDept(),ptlAgreementAttributionSaveVo.getUsername());
-        PtlAgreementAttribution ptlAgreementAttribution = new PtlAgreementAttribution(ptlAgreementAttributionSaveVo,ptlInsAttributionTemplate);
+        EsmInsCompany esmInsCompany = esmInsCompanyService.getById(ptlAgreementAttributionSaveVo.getInsCompanyId());
+        PtlAgreementAttribution ptlAgreementAttribution = new PtlAgreementAttribution(ptlAgreementAttributionSaveVo,ptlInsAttributionTemplate,esmInsCompany.getName());
         save(ptlAgreementAttribution);
         return true;
     }

+ 14 - 1
platform/src/main/resources/mapper/PtlAgreementAttributionMapper.xml

@@ -8,13 +8,26 @@
 
     <select id="getAgreementAttributionList" resultType="com.jzg.commons.entity.agreement.po.PtlAgreementAttribution">
         select
-        *,
+        paa.id,
+        paa.template_id,
+        paa.api_type,
+        paa.login_url,
+        paa.api_type,
+        paa.username,
+        paa.password,
+        paa.user_abbr,
+        paa.user_dept,
+        paa.user_desc,
+        paa.use_status,
+        paa.quote_status,
+        eic.name_simple as insCompanyName,
         pau.url as url,
         sd.name as deptName
         from
         ptl_agreement_attribution paa
         left join ptl_agreement_url pau on paa.login_url = pau.id
         left join sys_dept sd on paa.user_dept = sd.id
+        left join esm_ins_company eic on paa.ins_company_id = eic.id
         where
         1=1
             and paa.is_delete = '0'

+ 1 - 1
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/api/service/BoHaiApiOrderService.java

@@ -11,7 +11,7 @@ import com.jzg.commons.entity.quote.vo.QuoteVo;
  * @date: 2025/3/6 11:27
  **/
 public interface BoHaiApiOrderService {
-    void save(QuoteVo quoteVo, QuotationResponse response, GenerateOrderNoResponse generateOrderNoResponse);
+    void save(QuoteVo quoteVo, QuotationResponse response, GenerateOrderNoResponse generateOrderNoResponse,  boolean quoteSuccess);
 
     BoHaiApiOrder findByOrdersNo(String ordersNo);
 

+ 6 - 2
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/api/service/impl/BoHaiApiOrderServiceImpl.java

@@ -25,11 +25,15 @@ public class BoHaiApiOrderServiceImpl implements BoHaiApiOrderService {
      * @param response
      */
     @Override
-    public void save(QuoteVo quoteVo, QuotationResponse response, GenerateOrderNoResponse generateOrderNoResponse) {
+    public void save(QuoteVo quoteVo, QuotationResponse response, GenerateOrderNoResponse generateOrderNoResponse, boolean quoteSuccess) {
         BoHaiApiOrder bohaiApiOrder = new BoHaiApiOrder();
         bohaiApiOrder.setId(quoteVo.getOrder().getOrdersNo());
         bohaiApiOrder.setOrdersNo(quoteVo.getOrder().getOrdersNo());
-        bohaiApiOrder.setBusUniqueId(response.getData().getBusUniqueId());
+        if (quoteSuccess) {
+            bohaiApiOrder.setBusUniqueId(response.getData().getBusUniqueId());
+        } else {
+            bohaiApiOrder.setBusUniqueId("");
+        }
         bohaiApiOrder.setOrderNo(generateOrderNoResponse.getData().getOrderNo());
         bohaiApiOrderRepository.save(bohaiApiOrder);
     }

+ 2 - 2
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/api/service/impl/BoHaiApiRequestImpl.java

@@ -161,10 +161,10 @@ public class BoHaiApiRequestImpl implements BoHaiApiRequest {
         QuotationResponse quotationResponse = repeatQuote(quotationRequest,parameters.getSysSourceCode(),quoteVo.getKindInfoVo(),null);
         //处理报价失败
         if(!ResponseCode.R_Z00001.getCode().equals(quotationResponse.getResponseCode())) {
-            boHaiApiOrderService.save(quoteVo, quotationResponse, generateOrderNoResponse);
+            boHaiApiOrderService.save(quoteVo, quotationResponse, generateOrderNoResponse,false);
             return BoHaiApiQuoteResultsVoBuild.buildQuoteFailResultsVo(quotationResponse);
         } else {
-            boHaiApiOrderService.save(quoteVo, quotationResponse, generateOrderNoResponse);
+            boHaiApiOrderService.save(quoteVo, quotationResponse, generateOrderNoResponse,true);
             return BoHaiApiQuoteResultsVoBuild.buildQuoteResultsVo(order.getOrdersNo(), quoteVo, quotationResponse);
         }
     }

+ 21 - 21
tenant/insurance/quotation-summary/src/main/resources/application-dev.yaml

@@ -89,30 +89,30 @@ dajia:
 
 
 #国任财险测试api
-#guoren:
-#  api:
-#    baseUrl: https://devyun.guorenpcic.com/api/grchannel-interface/httpCurrency/httpJsonCommonEntrance
-#    uploadUrl: https://devyun.guorenpcic.com/api/grecar/photo/upload
-#    redirectUrl: http://39.98.239.48/web-api/api/guoRen/callBack
-#    policyUrl: https://devyun.guorenpcic.com/api/grsavecarcore/savecarcore/getElePolicyForGrecar?certiNo=
-#    policyFlagUrl: https://devyun.guorenpcic.com/api/grsavecarcore/savecarcore/getElePolicyFlagForGrecar?certiNo=
-#    serveCode: GR0002
-#    channelCode: jindouyun
-#    interfaceUserCode: guoren_tp_jdy
-#    interfacePwd: Q31gIrhZgQc=
-#    iftest: Y
 guoren:
   api:
-    baseUrl: https://rbt.guorenpcic.com/api/grchannel-interface/httpCurrency/httpJsonCommonEntrance
-    uploadUrl: https://rbt.guorenpcic.com/api/grecar/photo/upload
-    redirectUrl: https://sxzgkj.baoxianzhanggui.com/web-api/api/guoRen/callBack
-    policyUrl: https://rbt.guorenpcic.com/api/grsavecarcore/savecarcore/getElePolicyForGrecar?certiNo=
-    policyFlagUrl: https://rbt.guorenpcic.com/api/grsavecarcore/savecarcore/getElePolicyFlagForGrecar?certiNo=
+    baseUrl: https://devyun.guorenpcic.com/api/grchannel-interface/httpCurrency/httpJsonCommonEntrance
+    uploadUrl: https://devyun.guorenpcic.com/api/grecar/photo/upload
+    redirectUrl: http://39.98.239.48/web-api/api/guoRen/callBack
+    policyUrl: https://devyun.guorenpcic.com/api/grsavecarcore/savecarcore/getElePolicyForGrecar?certiNo=
+    policyFlagUrl: https://devyun.guorenpcic.com/api/grsavecarcore/savecarcore/getElePolicyFlagForGrecar?certiNo=
     serveCode: GR0002
-    channelCode: TQDL
-    interfaceUserCode: TQDL
-    interfacePwd: $2a$04$r4neihDJh420OyWEji5w5OMbiyHqYEZHJGLZP0FHFEjXmr7nVW7te
-    iftest: N
+    channelCode: jindouyun
+    interfaceUserCode: guoren_tp_jdy
+    interfacePwd: Q31gIrhZgQc=
+    iftest: Y
+#guoren:
+#  api:
+#    baseUrl: https://rbt.guorenpcic.com/api/grchannel-interface/httpCurrency/httpJsonCommonEntrance
+#    uploadUrl: https://rbt.guorenpcic.com/api/grecar/photo/upload
+#    redirectUrl: https://sxzgkj.baoxianzhanggui.com/web-api/api/guoRen/callBack
+#    policyUrl: https://rbt.guorenpcic.com/api/grsavecarcore/savecarcore/getElePolicyForGrecar?certiNo=
+#    policyFlagUrl: https://rbt.guorenpcic.com/api/grsavecarcore/savecarcore/getElePolicyFlagForGrecar?certiNo=
+#    serveCode: GR0002
+#    channelCode: TQDL
+#    interfaceUserCode: TQDL
+#    interfacePwd: $2a$04$r4neihDJh420OyWEji5w5OMbiyHqYEZHJGLZP0FHFEjXmr7nVW7te
+#    iftest: N
 
 # 华泰
 huatai:

+ 19 - 0
tenant/organization/src/main/java/com/jzg/organization/service/impl/PtlAgreementServiceImpl.java

@@ -221,6 +221,25 @@ public class PtlAgreementServiceImpl extends ServiceImpl<PtlAgreementMapper, Ptl
     @Override
     @Transactional(rollbackFor = Exception.class)
     public boolean deleteByIds(List<String> ids) {
+        // 删除协议
+        baseMapper.deleteByIds(ids);
+
+        // 删除承保规则
+        agreementRulesService.remove(new LambdaQueryWrapper<PtlAgreementUndwrtRules>()
+                .in(PtlAgreementUndwrtRules::getAgreementId,ids));
+
+        // 获取关联的费用
+        List<PtlAgreementCost> costsList = agreementCostService.list(new LambdaQueryWrapper<PtlAgreementCost>()
+                .in(PtlAgreementCost::getPtlAgreementId, ids));
+        // 获取关联的费用id
+        List<String> costIds = costsList.stream().map(PtlAgreementCost::getId).collect(Collectors.toList());
+        // 删除关联的费用
+        agreementCostService.removeByIds(costIds);
+
+        // 删除费用关联的规则
+        agreementCostRuleService.remove(new LambdaQueryWrapper<PtlAgreementCostRule>()
+               .in(PtlAgreementCostRule::getPtlAgreementCostId, costIds));
+
         return baseMapper.deleteByIds(ids) > 0;
     }
 

+ 1 - 1
tenant/organization/src/main/resources/mapper/PtlAgreementMapper.xml

@@ -51,7 +51,7 @@
         pa.is_external,pa.custodian_id,pa.system_code,pa.attribution_id,
         pa.create_by,pa.create_time,pa.update_by,
         pa.create_by,pa.create_time,pa.update_by,
-        pa.update_time,pa.is_delete,paa.username,paa.user_abbr as userAbber,
+        pa.update_time,pa.is_delete,paa.username,paa.user_abbr as userAbbr,
         suji.name as managerName,sd.name as managerDeptName,suf.file_name as fileName,suf.file_size as fileSize,
         eic.name_simple as company,sdd.name as deptName,
         pa.api_type