|
|
@@ -1,5 +1,6 @@
|
|
|
package com.jzg.organization.controller;
|
|
|
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.jzg.commons.constants.dict.InsOrderStatusEnum;
|
|
|
import com.jzg.commons.core.page.HttpResult;
|
|
|
@@ -12,6 +13,8 @@ import com.jzg.commons.util.AssertionUtils;
|
|
|
import com.jzg.organization.service.ReceivableService;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
@@ -22,17 +25,19 @@ import java.util.List;
|
|
|
import java.util.Objects;
|
|
|
|
|
|
/**
|
|
|
+ * 财务应收Controller
|
|
|
+ *
|
|
|
* @author jzg
|
|
|
* @version 1.0
|
|
|
- * @create 2024-04-28 15:07
|
|
|
- * @description: 财务应收Controller
|
|
|
+ * @date 2024-04-28 15:07
|
|
|
*/
|
|
|
-
|
|
|
@Tag(name = "财务应收")
|
|
|
@RequestMapping("/receivable")
|
|
|
@RestController
|
|
|
public class ReceivableController {
|
|
|
|
|
|
+ private static final Logger log = LoggerFactory.getLogger(ReceivableController.class);
|
|
|
+
|
|
|
@Autowired
|
|
|
private ReceivableService receivableService;
|
|
|
|
|
|
@@ -161,8 +166,14 @@ public class ReceivableController {
|
|
|
|
|
|
@PostMapping("settlement")
|
|
|
@Operation(summary = "结算")
|
|
|
- public HttpResult settlement(@RequestBody SettlementVo settlementVo){
|
|
|
- return receivableService.settlement(settlementVo) ? HttpResult.ok("结算成功") : HttpResult.error("结算失败");
|
|
|
+ public HttpResult<String> settlement(@RequestBody SettlementVo settlementVo){
|
|
|
+ try{
|
|
|
+ boolean settlement = receivableService.settlement(settlementVo);
|
|
|
+ return settlement ? HttpResult.ok("结算成功") : HttpResult.error("结算失败");
|
|
|
+ }catch (Exception e){
|
|
|
+ log.error("结算失败",e);
|
|
|
+ return HttpResult.error(e.getMessage());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@PostMapping("settlementList")
|
|
|
@@ -197,7 +208,9 @@ public class ReceivableController {
|
|
|
@PostMapping("/getPlatFormReceivableList")
|
|
|
@Operation(summary = "获取平台协议列表")
|
|
|
public HttpResult getPlatFormReceivableList(@RequestBody ReceivableQueryVo receivableQueryVo){
|
|
|
- receivableQueryVo.setQueryType("1");
|
|
|
+ if (StrUtil.isBlank(receivableQueryVo.getQueryType())){
|
|
|
+ receivableQueryVo.setQueryType("1");
|
|
|
+ }
|
|
|
return HttpResult.ok(receivableService.getPlatFormReceivableList(receivableQueryVo));
|
|
|
}
|
|
|
|