Qchen hace 9 meses
padre
commit
2b2a5665b7

+ 3 - 0
commons/src/main/java/com/jzg/commons/entity/dto/InsOrdersParam.java

@@ -44,5 +44,8 @@ public class InsOrdersParam extends PageRequest {
     @Schema(description = "批改状态")
     private String adjustStatus;
 
+    @Schema(description = "租户code")
+    private String systemCode;
+
 
 }

+ 1 - 0
tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/client/OrgClient.java

@@ -31,6 +31,7 @@ public interface OrgClient {
 
     @GetMapping(value = "/agreement/getByCompanyId")
     public HttpResult<List<PtlAgreement>> getByCompanyId(@RequestParam("companyId") String companyId,
+                                                         @RequestParam("systemCode") String code,
                                                          @RequestHeader("Authorization") String authToken,
                                                          @RequestHeader("system_code")String systemCode);
     @GetMapping(value = "/agreement/getByAgreementId")

+ 17 - 1
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/controller/InsOrdersController.java

@@ -2,6 +2,7 @@ package com.jzg.quotation.summary.controller;
 
 
 import com.jzg.commons.aop.OperatorTrajectory;
+import com.jzg.commons.core.base.BaseController;
 import com.jzg.commons.core.page.HttpResult;
 import com.jzg.commons.entity.dto.InsOrdersParam;
 import com.jzg.commons.entity.po.InsFeeOrders;
@@ -17,10 +18,13 @@ import com.jzg.quotation.summary.service.InsTaskImagesService;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import jakarta.annotation.Resource;
+import jakarta.servlet.http.HttpServletRequest;
 import lombok.RequiredArgsConstructor;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
 
 import javax.validation.constraints.NotNull;
 
@@ -29,7 +33,7 @@ import javax.validation.constraints.NotNull;
 @Tag(name = "补录订单录入")
 @Validated
 @RequiredArgsConstructor
-public class InsOrdersController {
+public class InsOrdersController extends BaseController {
 
     @Resource
     private InsOrdersService insOrdersService;
@@ -40,6 +44,9 @@ public class InsOrdersController {
     @Autowired
     private InsOrdersCarInfoService insOrdersCarInfoService;
 
+    @Autowired
+    private BaseController baseController;
+
     @Resource
     private InsFeeOrdersService insFeeOrdersService;
 
@@ -80,6 +87,15 @@ public class InsOrdersController {
     @PostMapping("queryList")
     @Operation(summary = "查询订单列表")
     public HttpResult queryList(@RequestBody InsOrdersParam insOrdersParam) {
+        String systemCode = "";
+        //如果是APP登录的话 则传递SystemCode的头部字段
+        if (baseController.getUserSystemCode().equals("APP")) {
+            HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
+            systemCode = request.getHeader("system_code");
+        } else {
+            systemCode =  baseController.getUserSystemCode();
+        }
+        insOrdersParam.setSystemCode(systemCode);
         return HttpResult.ok(insOrdersService.queryList(insOrdersParam));
     }
 

+ 2 - 2
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/controller/UnifyOrderManager.java

@@ -218,7 +218,7 @@ public class UnifyOrderManager {
 
         //先默认第一个协议
         HttpResult<List<PtlAgreement>> byCompanyId = orgClient.getByCompanyId(esmInsCompanyHttpResult.getData()
-                .getId(), baseController.getToken(), systemCode);
+                .getId(),systemCode, baseController.getToken(), systemCode);
         if (byCompanyId.getData().isEmpty()) {
             AssertionUtils.isFail(true, "保司未配置协议");
         }
@@ -406,7 +406,7 @@ public class UnifyOrderManager {
         String systemCode = getSystemCode();
 
         //先默认第一个协议
-        HttpResult<List<PtlAgreement>> byCompanyId = orgClient.getByCompanyId(insOrders.getCompanyId(), baseController.getToken(), systemCode);
+        HttpResult<List<PtlAgreement>> byCompanyId = orgClient.getByCompanyId(insOrders.getCompanyId(),systemCode, baseController.getToken(), systemCode);
         if (byCompanyId.getData().isEmpty()) {
             AssertionUtils.isFail(true, "保司未配置协议");
         }

+ 1 - 1
tenant/insurance/quotation-summary/src/main/resources/mapper/InsOrdersMapper.xml

@@ -545,7 +545,7 @@
                 left join
             sys_user su on su.mobile = io.real_quote_user_id
                 left join
-            sys_user_jzg_info suji on suji.user_id = su.id
+            sys_user_jzg_info suji on suji.user_id = su.id and suji.system_code = #{insOrdersParam.systemCode}
                 left join
             sys_dept sd on sd.id = suji.dept_id
                 left join

+ 4 - 0
tenant/insurance/quotation-yongcheng/src/main/java/com/jzg/quotation/yongcheng/api/entity/request/QuoteRequest.java

@@ -577,6 +577,9 @@ public class QuoteRequest {
              */
             @JacksonXmlProperty(localName = "NPoWeight")
             private String NPoWeight;
+
+            @JacksonXmlProperty(localName = "WholeWeight")
+            private String WholeWeight;
             /**
              * 折旧价
              */
@@ -698,6 +701,7 @@ public class QuoteRequest {
                 vhl.setCBusType("0");
                 vhl.setCMortgageMrk("0");
                 vhl.setNPoWeight(carInfo.getCompleteKerbMass());
+                vhl.setWholeWeight(carInfo.getCompleteKerbMass());
                 //305005001:未验 305005002:已验车 305005003:免验车 305005004:需验车
                 vhl.setCInspectionCde("305005003");
                 vhl.setCDevice8Mrk("0");

+ 1 - 1
tenant/insurance/quotation-yongcheng/src/main/java/com/jzg/quotation/yongcheng/api/service/impl/YongChengApiRequestImpl.java

@@ -131,7 +131,7 @@ public class YongChengApiRequestImpl implements YongChengApiRequest {
     public QuoteResultsVo quote(QuoteVo quoteVo) throws JsonProcessingException {
         OrderBase order = quoteVo.getOrder();
         AttributionInformationVo attributionInformationVo = order.getAttributionInformationVo();
-        String url = getApiUrl(order.getInsuranceCompanyId());
+        String url = getApiUrl(order.getInsuranceCompanyCode());
         //1.车型获取
         YcApiConfigurationProperties configurationProperties = ConfigureParametersConversion.conversionEntity(YcApiConfigurationProperties.class, attributionInformationVo.getConfigInfo());
         ModelsQueryResponse.VehicleInfo vehicleInfo = gainVehicleModel(configurationProperties, quoteVo.getCarInfoVo(),url);

+ 2 - 2
tenant/organization/src/main/java/com/jzg/organization/controller/AgreementController.java

@@ -234,8 +234,8 @@ public class AgreementController extends BaseController {
 
     @Operation(summary = "根据保险公司查找协议")
     @GetMapping("/getByCompanyId")
-    public HttpResult getByCompanyCode(String companyId) {
-        return HttpResult.ok(agreementService.getByCompanyId(companyId));
+    public HttpResult getByCompanyCode(String companyId, String systemCode) {
+        return HttpResult.ok(agreementService.getByCompanyId(companyId, systemCode));
     }
 
     @Operation(summary = "根据协议id查找协议")

+ 1 - 1
tenant/organization/src/main/java/com/jzg/organization/service/PtlAgreementService.java

@@ -132,5 +132,5 @@ public interface PtlAgreementService extends IService<PtlAgreement> {
      */
     void contactEdit(AgreementContactEditParam param);
 
-    List<PtlAgreement> getByCompanyId(String companyId);
+    List<PtlAgreement> getByCompanyId(String companyId,String systemCode);
 }

+ 3 - 2
tenant/organization/src/main/java/com/jzg/organization/service/impl/PtlAgreementServiceImpl.java

@@ -502,9 +502,10 @@ public class PtlAgreementServiceImpl extends ServiceImpl<PtlAgreementMapper, Ptl
     }
 
     @Override
-    public List<PtlAgreement> getByCompanyId(String companyId) {
+    public List<PtlAgreement> getByCompanyId(String companyId,String systemCode) {
         List<PtlAgreement> ptlAgreements = baseMapper.selectList(new LambdaQueryWrapper<PtlAgreement>()
-                .eq(PtlAgreement::getCompanyId, companyId));
+                .eq(PtlAgreement::getCompanyId, companyId)
+                .eq(PtlAgreement::getSystemCode, systemCode));
         return ptlAgreements;
     }