Kaynağa Gözat

撤单修改

Qchen 1 yıl önce
ebeveyn
işleme
1b3d299429

+ 1 - 1
src/main/java/com/ydtech/modules/order/controller/YangGuangOrderApiController.java

@@ -87,7 +87,7 @@ public class YangGuangOrderApiController {
 
     @PostMapping("/autoWriteOff")
     @ApiOperation("投保单撤销")
-    public boolean autoWriteOff(@RequestSingleParam(value = "companyId") String companyId) throws Exception {
+    public HttpResult<Object> autoWriteOff(@RequestSingleParam(value = "companyId") String companyId) throws Exception {
         return this.yangGuangOrderApiService.autoWriteOff(companyId);
     }
 

+ 1 - 1
src/main/java/com/ydtech/modules/order/service/YangGuangOrderApiService.java

@@ -60,7 +60,7 @@ public interface YangGuangOrderApiService {
     /**
      *  投保单撤销
      */
-    boolean autoWriteOff(String companyId) throws Exception;
+    HttpResult<Object> autoWriteOff(String companyId) throws Exception;
 
     /**
      * 获取保单信息

+ 6 - 6
src/main/java/com/ydtech/modules/order/service/impl/YangGuangOrderApiServiceImpl.java

@@ -657,7 +657,7 @@ public class YangGuangOrderApiServiceImpl implements YangGuangOrderApiService {
 
 
     @Override
-    public boolean autoWriteOff(String companyId) throws Exception {
+    public HttpResult<Object> autoWriteOff(String companyId) throws Exception {
         InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(companyId);
         YangGuangConfigureParameters ygConfigureParameters = configureParametersComponents.toEntity(YangGuangConfigureParameters.class,
                 insAreaCompany.getAgreementId());
@@ -669,7 +669,7 @@ public class YangGuangOrderApiServiceImpl implements YangGuangOrderApiService {
             if (yangGuangAutoWriteOffResponse.getErrorCode().equals("0")) {
                 insAreaCompany.setOrderstatus(InsOrderStatusEnum.QUOTE_ING.getCode());
                 insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
-                return true;
+                return HttpResult.ok("撤单成功");
             }
         }
         // 单商
@@ -679,7 +679,7 @@ public class YangGuangOrderApiServiceImpl implements YangGuangOrderApiService {
             if (yangGuangAutoWriteOffResponse.getErrorCode().equals("0")) {
                 insAreaCompany.setOrderstatus(InsOrderStatusEnum.QUOTE_ING.getCode());
                 insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
-                return true;
+                return HttpResult.ok("撤单成功");
             }
         }
             //交商同保
@@ -691,12 +691,12 @@ public class YangGuangOrderApiServiceImpl implements YangGuangOrderApiService {
             if (yangGuangAutoWriteOffResponseJq.getErrorCode().equals("0") && yangGuangAutoWriteOffResponseSy.getErrorCode().equals("0")) {
                 insAreaCompany.setOrderstatus(InsOrderStatusEnum.QUOTE_ING.getCode());
                 insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
-                return true;
+                return HttpResult.ok("撤单成功");
             } else {
-                return false;
+                return HttpResult.error("撤单失败,原因:"+ yangGuangAutoWriteOffResponseSy.getErrorMessage() + yangGuangAutoWriteOffResponseJq.getErrorMessage());
             }
         }
-        return true;
+        return HttpResult.ok("撤单成功");
     }
 
     public QuoteRespVo getQuoteRespVo (YangGuangAccuracyCalculateResponse yangGuangAccuracyCalculateResponse, BaseQuoteInfoVo yaQuoteInfoVo, List<YgQuoteAccidentVo> accidentalDrivingVo, boolean isEnergy) {