@@ -9,6 +9,7 @@ import com.zt.plat.module.contractorder.api.dto.order.PurchaseOrderWithDetailsDT
|
||||
import com.zt.plat.module.contractorder.api.dto.order.SalesOrdDtlDTO;
|
||||
import com.zt.plat.module.contractorder.api.vo.contract.international.IntContract;
|
||||
import com.zt.plat.module.contractorder.api.vo.contract.international.IntContractPageReq;
|
||||
import com.zt.plat.module.contractorder.api.vo.contract.international.IntPushContractReqVO;
|
||||
import com.zt.plat.module.contractorder.enums.ApiConstants;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@@ -44,7 +45,7 @@ public interface ContractApi {
|
||||
|
||||
@PostMapping(PREFIX + "/push")
|
||||
@Operation(summary = "国贸2.0系统推送合同")
|
||||
CommonResult<Boolean> push(@Valid @RequestBody IntContract reqVO);
|
||||
void push(@Valid @RequestBody IntPushContractReqVO pushReqVO);
|
||||
|
||||
@GetMapping(PREFIX + "/logistics/list/page")
|
||||
@Operation(summary = "国贸2.0系统合同分页查询")
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.zt.plat.module.contractorder.api;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.module.contractorder.api.dto.order.OrderDTO;
|
||||
import com.zt.plat.module.contractorder.enums.ApiConstants;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@FeignClient(name = ApiConstants.NAME)
|
||||
@Tag(name = "RPC 服务 - 订单")
|
||||
public interface OrderApi {
|
||||
String PREFIX = ApiConstants.PREFIX + "/order";
|
||||
@PostMapping(PREFIX + "/order-by-order-ids")
|
||||
@Operation(summary = "通过订单id获取订单信息", description = "通过订单编号获取订单信息")
|
||||
CommonResult<List<OrderDTO>> getOrderByOrderIds(@RequestBody List<Long> ids);
|
||||
|
||||
@PostMapping(PREFIX + "/order-by-order-nos")
|
||||
@Operation(summary = "通过订单号批量获取订单信息", description = "通过订单编号获取订单信息")
|
||||
CommonResult<List<OrderDTO>> getOrderByOrderNos(@RequestBody List<String> orderNoS);
|
||||
}
|
||||
@@ -99,6 +99,11 @@ public class OrdDtlDTO {
|
||||
*/
|
||||
private String taxNum;
|
||||
|
||||
/**
|
||||
* 税率 Y
|
||||
*/
|
||||
private BigDecimal taxRte;
|
||||
|
||||
// ========================== 采购订单特有属性(PrchOrdDtlDTO 独有)==========================
|
||||
/**
|
||||
* 含税单价;推送ERP(必须)
|
||||
@@ -271,10 +276,6 @@ public class OrdDtlDTO {
|
||||
*/
|
||||
private BigDecimal gross;
|
||||
|
||||
/**
|
||||
* 税率 Y
|
||||
*/
|
||||
private BigDecimal taxRte;
|
||||
|
||||
/**
|
||||
* 价格条件详情;推送ERP(必须):JSON
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,24 @@
|
||||
package com.zt.plat.module.contractorder.api.vo.contract.international;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "国贸2.0系统推送合同 Request VO")
|
||||
@Data
|
||||
public class IntPushContractReqVO {
|
||||
|
||||
@Schema(description = "接口请求号")
|
||||
private String __requestId_;
|
||||
@Schema(description = "接口类型")
|
||||
private String __interfaceType__;
|
||||
@Schema(description = "操作标志")
|
||||
private String operateFlag;
|
||||
@Schema(description = "发送时间 yyyyMMddHHmmss")
|
||||
private String datetime;
|
||||
@Schema(description = "单据号")
|
||||
private String busiBillCode;
|
||||
@Schema(description = "发送方系统")
|
||||
private String system;
|
||||
@Schema(description = "发送数据")
|
||||
private IntContract data;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.zt.plat.module.contractorder.api.vo.contract.international;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "国贸2.0系统推送合同 Response VO")
|
||||
@Data
|
||||
public class IntPushContractRespVO {
|
||||
|
||||
@Schema(description = "接口请求号")
|
||||
private String __requestId_;
|
||||
@Schema(description = "接口类型")
|
||||
private String __interfaceType__;
|
||||
@Schema(description = "单据号")
|
||||
private String busiBillCode;
|
||||
@Schema(description = "返回状态")
|
||||
private Integer code;
|
||||
@Schema(description = "返回信息")
|
||||
private String message;
|
||||
@Schema(description = "返回时间 yyyyMMddHHmmss")
|
||||
private String datetime;
|
||||
@Schema(description = "返回方系统")
|
||||
private String system;
|
||||
@Schema(description = "操作标志")
|
||||
private String operateFlag;
|
||||
@Schema(description = "返回数据")
|
||||
private JSONObject data;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,34 @@
|
||||
package com.zt.plat.module.contractorder.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.client.ClientHttpRequestFactory;
|
||||
import org.springframework.http.client.SimpleClientHttpRequestFactory;
|
||||
import org.springframework.http.converter.StringHttpMessageConverter;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
/**
|
||||
* RestTemplate配置类
|
||||
* @author ChenZhaoxue
|
||||
* @date 2025/3/27
|
||||
*/
|
||||
@Configuration
|
||||
public class RestTemplateConfig {
|
||||
|
||||
@Bean
|
||||
public RestTemplate restTemplate(ClientHttpRequestFactory factory){
|
||||
RestTemplate restTemplate = new RestTemplate(factory);
|
||||
restTemplate.getMessageConverters().set(1, new StringHttpMessageConverter(Charset.forName("UTF-8")));
|
||||
return restTemplate;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ClientHttpRequestFactory simpleClientHttpRequestFactory(){
|
||||
SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
|
||||
factory.setConnectTimeout(10000);//单位为ms
|
||||
factory.setReadTimeout(30000);//单位为ms
|
||||
return factory;
|
||||
}
|
||||
}
|
||||
@@ -6,9 +6,11 @@ import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.contractorder.api.ContractApi;
|
||||
import com.zt.plat.module.contractorder.api.dto.order.PurchaseOrderWithDetailsDTO;
|
||||
import com.zt.plat.module.contractorder.api.vo.contract.*;
|
||||
import com.zt.plat.module.contractorder.api.vo.contract.international.IntContract;
|
||||
import com.zt.plat.module.contractorder.api.vo.contract.international.IntContractPageReq;
|
||||
import com.zt.plat.module.contractorder.api.vo.contract.international.IntPushContractReqVO;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.contract.ContractMainDO;
|
||||
import com.zt.plat.module.contractorder.service.contract.ContractService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
@@ -195,14 +197,21 @@ public class ContractController implements BusinessControllerMarker {
|
||||
@PostMapping("/push")
|
||||
@Operation(summary = "国贸2.0系统推送合同")
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:create')")
|
||||
CommonResult<Boolean> push(@Valid @RequestBody IntContract reqVO) {
|
||||
return contractApi.push(reqVO);
|
||||
public void push(@Valid @RequestBody IntPushContractReqVO pushReqVO) {
|
||||
contractApi.push(pushReqVO);
|
||||
}
|
||||
|
||||
@PostMapping("/logistics/list/page")
|
||||
@Operation(summary = "国贸2.0系统合同分页查询")
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:query')")
|
||||
CommonResult<PageResult<IntContract>> logisticsListPage(IntContractPageReq pageReq) {
|
||||
public CommonResult<PageResult<IntContract>> logisticsListPage(IntContractPageReq pageReq) {
|
||||
return contractApi.logisticsListPage(pageReq);
|
||||
}
|
||||
|
||||
@PostMapping("/order-by-order-no")
|
||||
@Operation(summary = "通过订单编号获取订单信息", description = "通过订单编号获取订单信息")
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:query')")
|
||||
public CommonResult<List<PurchaseOrderWithDetailsDTO>> getOrderByOrderNo(@RequestBody List<String> orderNoS){
|
||||
return contractApi.getOrderByOrderNo(orderNoS);
|
||||
};
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user