Просмотр исходного кода

客户采购单,对账单下载接口添加文档注解

guq 7 лет назад
Родитель
Сommit
6f997cb4ca

+ 40 - 0
applications/money/money-dto/src/main/java/com/usoftchina/saas/money/dto/ApcheckDTO.java

@@ -1,5 +1,7 @@
 package com.usoftchina.saas.money.dto;
 
+import io.swagger.annotations.ApiModelProperty;
+
 import java.io.Serializable;
 import java.util.Date;
 
@@ -9,36 +11,52 @@ import java.util.Date;
  **/
 public class ApcheckDTO implements Serializable {
 
+    @ApiModelProperty(value = "平台来源Id")
     private Long ac_b2bid;//平台来源Id
 
+    @ApiModelProperty(value = "对账日期")
     private Date ac_date;//对账日期
 
+    @ApiModelProperty(value = "应付日期")
     private Date ac_apdate;//应付日期
 
+    @ApiModelProperty(value = "对账起始日期")
     private Date ac_fromdate;//对账起始日期
 
+    @ApiModelProperty(value = "对账截至日期")
     private Date ac_todate;//对账截至日期
 
+    @ApiModelProperty(value = "供应商uu")
     private Long ac_venduu;//供应商uu
 
+    @ApiModelProperty(value = "币别")
     private String ac_currency;//币别
 
+    @ApiModelProperty(value = "汇率")
     private Double ac_rate;//汇率
 
+    @ApiModelProperty(value = "对账金额")
     private Double ac_checkamount;//对账金额
 
+    @ApiModelProperty(value = "备注")
     private String ac_remark;//备注
 
+    @ApiModelProperty(value = "本期应付金额")
     private Double ac_thisamount;//本期应付金额
 
+    @ApiModelProperty(value = "本期未对账")
     private Double ac_thisuncheck;//本期未对账
 
+    @ApiModelProperty(value = "本期已付")
     private Double ac_thispay;//本期已付
 
+    @ApiModelProperty(value = "本期发货")
     private Double ac_thissend;//本期发货
 
+    @ApiModelProperty(value = "本期已对账")
     private Double ac_thischeck;//本期已对账
 
+    @ApiModelProperty(value = "应付总额")
     private Double ac_payamont;//应付总额
 
     public Long getAc_b2bid() {
@@ -168,4 +186,26 @@ public class ApcheckDTO implements Serializable {
     public void setAc_payamont(Double ac_payamont) {
         this.ac_payamont = ac_payamont;
     }
+
+    @Override
+    public String toString() {
+        return "ApcheckDTO{" +
+                "ac_b2bid=" + ac_b2bid +
+                ", ac_date=" + ac_date +
+                ", ac_apdate=" + ac_apdate +
+                ", ac_fromdate=" + ac_fromdate +
+                ", ac_todate=" + ac_todate +
+                ", ac_venduu=" + ac_venduu +
+                ", ac_currency='" + ac_currency + '\'' +
+                ", ac_rate=" + ac_rate +
+                ", ac_checkamount=" + ac_checkamount +
+                ", ac_remark='" + ac_remark + '\'' +
+                ", ac_thisamount=" + ac_thisamount +
+                ", ac_thisuncheck=" + ac_thisuncheck +
+                ", ac_thispay=" + ac_thispay +
+                ", ac_thissend=" + ac_thissend +
+                ", ac_thischeck=" + ac_thischeck +
+                ", ac_payamont=" + ac_payamont +
+                '}';
+    }
 }

+ 12 - 4
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/controller/ApCheckController.java

@@ -4,16 +4,16 @@ import com.usoftchina.saas.auth.client.annotation.IgnoreAuth;
 import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.exception.BizException;
+import com.usoftchina.saas.money.dto.ApcheckDTO;
 import com.usoftchina.saas.money.dto.ApcheckFormDTO;
 import com.usoftchina.saas.transfers.auth.annotation.IgnoreOpenApiAuth;
 import com.usoftchina.saas.transfers.service.ApCheckService;
 import com.usoftchina.saas.utils.JsonUtils;
 import com.usoftchina.saas.utils.StringUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.io.UnsupportedEncodingException;
 import java.net.URLDecoder;
@@ -27,12 +27,14 @@ import java.util.List;
 @IgnoreAuth
 @RestController
 @RequestMapping("/b2b/apcheck")
+@Api(value = "ApcheckController", description = "对账单下载接口")
 public class ApCheckController {
 
 
     @Autowired
     private ApCheckService apcheckService;
 
+    @ApiOperation(value = "对账单下载")
     @PostMapping("/save")
     public Result saveApcheck(@RequestParam("data") String data) throws UnsupportedEncodingException {
         if (StringUtils.isEmpty(data)) {
@@ -43,4 +45,10 @@ public class ApCheckController {
         String ids = apcheckService.save(forms);
         return Result.success(ids);
     }
+
+    @PostMapping("/test")
+    @ApiOperation(value = "测试")
+    public void test(@RequestBody ApcheckDTO apcheckDTO) {
+        System.out.println(apcheckDTO);
+    }
 }

+ 6 - 0
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/controller/SaleDownController.java

@@ -10,6 +10,8 @@ import com.usoftchina.saas.transfers.auth.annotation.IgnoreOpenApiAuth;
 import com.usoftchina.saas.transfers.service.SaleDownService;
 import com.usoftchina.saas.utils.JsonUtils;
 import com.usoftchina.saas.utils.StringUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -26,6 +28,7 @@ import java.util.List;
 @IgnoreAuth
 @RestController
 @RequestMapping("/b2b/saledown")
+@Api(value = "SaleDownController", description = "客户订单下载、更新")
 public class SaleDownController {
 
     @Autowired
@@ -35,6 +38,7 @@ public class SaleDownController {
      *从b2b下载客户采购单
      * @return
      */
+    @ApiOperation(value = "客户订单下载")
     @PostMapping("/save")
     public Result<String> saveSaleDown(@RequestParam("data") String data) throws UnsupportedEncodingException {
         if (StringUtils.isEmpty(data)) {
@@ -50,6 +54,7 @@ public class SaleDownController {
      *从b2b更新为结案
      * @return
      */
+    @ApiOperation(value = "结案更新")
     @PostMapping("/close")
     public Result<String> closeSaleDown(@RequestParam("data") String data) throws UnsupportedEncodingException {
         if (StringUtils.isEmpty(data)) {
@@ -64,6 +69,7 @@ public class SaleDownController {
      *从b2b更新为结案
      * @return
      */
+    @ApiOperation(value = "反结案更新")
     @PostMapping("/resClose")
     public Result<String> resCloseSaleDown(@RequestParam("data") String data) throws UnsupportedEncodingException {
         if (StringUtils.isEmpty(data)) {