Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -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系统合同分页查询")
|
||||
|
||||
@@ -236,6 +236,9 @@ public class ContractRespDTO {
|
||||
@Schema(description = "代理方名称")
|
||||
private String agentName;
|
||||
|
||||
@Schema(description = "货权转移类型(字典:ASY_MTNG_TP)")
|
||||
private String meteringType;
|
||||
|
||||
// 物料信息
|
||||
private List<DetailRespDTO> detail;
|
||||
|
||||
|
||||
@@ -242,6 +242,9 @@ public class ContractRespVO {
|
||||
@Schema(description = "代理方名称")
|
||||
private String agentName;
|
||||
|
||||
@Schema(description = "货权转移类型(字典:ASY_MTNG_TP)")
|
||||
private String meteringType;
|
||||
|
||||
// 物料信息
|
||||
private List<DetailRespVO> detail;
|
||||
|
||||
|
||||
@@ -211,6 +211,9 @@ public class ContractSaveReqVO {
|
||||
@Schema(description = "代理方名称")
|
||||
private String agentName;
|
||||
|
||||
@Schema(description = "货权转移类型(字典:ASY_MTNG_TP)")
|
||||
private String meteringType;
|
||||
|
||||
// 物料信息
|
||||
private List<DetailSaveReqVO> detail;
|
||||
|
||||
|
||||
@@ -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
@@ -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);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.contractorder;
|
||||
|
||||
import com.zt.plat.module.contractorder.api.dto.order.PurchaseOrderWithDetailsDTO;
|
||||
import com.zt.plat.module.contractorder.service.contract.ContractService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
@@ -20,10 +23,12 @@ import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
@RequestMapping("/admin/contract-order/contract-order")
|
||||
public class ContractOrderController {
|
||||
|
||||
@Resource
|
||||
private ContractService contractService;
|
||||
|
||||
@GetMapping("/hello")
|
||||
@Operation(summary = "Hello ContractOrder")
|
||||
public CommonResult<String> hello() {
|
||||
return success("Hello, ContractOrder!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user