瀏覽代碼

1.非车开票结算接口调整

wuhp 2 年之前
父節點
當前提交
dc42fbcc23

+ 5 - 2
src/main/java/com/ydtech/modules/fnc/controller/InsPlyIncomeController.java

@@ -134,13 +134,14 @@ public class InsPlyIncomeController extends BaseController {
     @PutMapping("/batchInvoic")
     @ApiModelProperty(value = "开票跟单费")
     public HttpResult<Object> batchInvoic(@RequestBody InsPlyIncomeVo insPlyIncomeVo) {
-
+        insPlyIncomeVo.setIsNotCar("0");  // 非车状态为1  保险为0
         return insPlyIncomeService.batchInvoic(insPlyIncomeVo);
     }
 
     @PutMapping("/singleInvoic")
     @ApiModelProperty(value = "批量开票跟单费")
     public HttpResult<Object> singleInvoic(@RequestBody InsPlyIncomeVo insPlyIncomeVo) {
+        insPlyIncomeVo.setIsNotCar("0");  // 非车状态为1  保险为0
         return insPlyIncomeService.singleInvoic(insPlyIncomeVo);
     }
 
@@ -153,7 +154,7 @@ public class InsPlyIncomeController extends BaseController {
     @PutMapping("/batchSumBalance")
     @ApiModelProperty(value = "批次批量結算")
     public HttpResult<Object> batchSumBalance(@RequestBody InsPlyIncomeVo insPlyIncomeVo) {
-
+        insPlyIncomeVo.setIsNotCar("0");  // 非车状态为1  保险为0
         return insPlyIncomeService.batchSumBalance(insPlyIncomeVo);
     }
 
@@ -344,6 +345,7 @@ public class InsPlyIncomeController extends BaseController {
     @PutMapping("/batchInvoicing")
     @ApiModelProperty(value = "保险手续费批量开票")
     public HttpResult<Object> batchInvoicing(@RequestBody InsPlyIncomeVo insPlyIncomeVo) {
+        insPlyIncomeVo.setIsNotCar("0");  // 保险手续费0
         return insPlyIncomeService.batchInvoicing(insPlyIncomeVo);
     }
 
@@ -362,6 +364,7 @@ public class InsPlyIncomeController extends BaseController {
     @PutMapping("/batchBxBalance")
     @ApiModelProperty(value = "保险批量结算")
     public HttpResult<Object> batchBxBalance(@RequestBody InsPlyIncomeVo insPlyIncomeVo) {
+        insPlyIncomeVo.setIsNotCar("0");  // 非车状态为1  保险为0
         return insPlyIncomeService.batchBxBalance(insPlyIncomeVo);
     }
 

+ 58 - 0
src/main/java/com/ydtech/modules/fnc/controller/InsPlyNoIncomeController.java

@@ -0,0 +1,58 @@
+package com.ydtech.modules.fnc.controller;
+
+import com.ydtech.core.page.HttpResult;
+import com.ydtech.modules.fnc.service.ImportAsyncService;
+import com.ydtech.modules.fnc.service.InsPlyIncomeService;
+import com.ydtech.modules.fnc.vo.InsPlyIncomeVo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiModelProperty;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@Api(tags = "非车保司费用")
+@RequestMapping("/fnc/noPlyFee")
+public class InsPlyNoIncomeController {
+
+    @Autowired
+    private InsPlyIncomeService insPlyIncomeService;
+
+    @PutMapping("/noBatchInvoicing")
+    @ApiModelProperty(value = "非车保险手续费批量开票")
+    public HttpResult<Object> batchInvoicing(@RequestBody InsPlyIncomeVo insPlyIncomeVo) {
+        insPlyIncomeVo.setIsNotCar("1");  // 非车状态为1
+        return insPlyIncomeService.batchInvoicing(insPlyIncomeVo);
+    }
+
+    @PutMapping("/noBatchBxBalance")
+    @ApiModelProperty(value = "非车保险批量结算")
+    public HttpResult<Object> batchBxBalance(@RequestBody InsPlyIncomeVo insPlyIncomeVo) {
+        insPlyIncomeVo.setIsNotCar("1");  // 非车状态为1
+        return insPlyIncomeService.batchBxBalance(insPlyIncomeVo);
+    }
+    @PutMapping("/noBatchInvoic")
+    @ApiModelProperty(value = "非车开票跟单费")
+    public HttpResult<Object> batchInvoic(@RequestBody InsPlyIncomeVo insPlyIncomeVo) {
+        insPlyIncomeVo.setIsNotCar("1");  // 非车状态为1
+        return insPlyIncomeService.batchInvoic(insPlyIncomeVo);
+    }
+
+    @PutMapping("/noSingleInvoic")
+    @ApiModelProperty(value = "批量开票跟单费")
+    public HttpResult<Object> singleInvoic(@RequestBody InsPlyIncomeVo insPlyIncomeVo) {
+        insPlyIncomeVo.setIsNotCar("1");  // 非车状态为1
+        return insPlyIncomeService.singleInvoic(insPlyIncomeVo);
+    }
+
+    @PutMapping("/noBatchSumBalance")
+    @ApiModelProperty(value = "批次批量結算")
+    public HttpResult<Object> batchSumBalance(@RequestBody InsPlyIncomeVo insPlyIncomeVo) {
+        insPlyIncomeVo.setIsNotCar("1");  // 非车状态为1
+        return insPlyIncomeService.batchSumBalance(insPlyIncomeVo);
+    }
+
+
+}

+ 3 - 11
src/main/java/com/ydtech/modules/fnc/service/impl/InsPlyIncomeServiceImpl.java

@@ -1480,17 +1480,9 @@ handlingProportion,
                 }
             } else {
 //                因为跟单没有关联表 也无法关联到开票表所以只能按照 条件去进行判断
-                String partnerCompaniesId = insPlyIncome.getPartnerCompaniesId();   // 保司机构id
-                if (StringUtils.isEmpty(partnerCompaniesId)) {
-                    throw new SystemException("该单据没有保司机构id");
-                }
-                LambdaQueryWrapper<SettlementDocumentaryFeesEntity> queryWrapper = new LambdaQueryWrapper<>();
-                queryWrapper.eq(SettlementDocumentaryFeesEntity::getPartnerCompaniesId, partnerCompaniesId)
-                        .eq(SettlementDocumentaryFeesEntity::getSettlementStatus, "2");
-                List<SettlementDocumentaryFeesEntity> settlementDocumentaryFeesEntities = settlementDocumentaryFeesService.getBaseMapper().selectList(queryWrapper);
-                if (settlementDocumentaryFeesEntities.size() > 0) {
-                    throw new SystemException("已开票不能进行删除");
-                }
+               if(StringUtils.isNotEmpty( insPlyIncome.getSettleOtherStatus())  && "1".equals( insPlyIncome.getSettleOtherStatus())){
+                   throw new SystemException("已经对账不能进行删除");
+               }
             }
         }
         baseMapper.deleteById(insPlyIncomeVo.getId());   //删除 结算  然后删除结算表