合同接口新增国贸2.0系统推送合同、国贸2.0系统合同分页查询接口

This commit is contained in:
guojunyun
2025-10-31 09:27:52 +08:00
parent 8287b0aa25
commit 559c36b78f
2 changed files with 25 additions and 0 deletions

View File

@@ -30,4 +30,5 @@ public interface ErrorCodeConstants {
ErrorCode CONTRACT_SUBMIT_ERP_FAIL = new ErrorCode(1_027_000_015, "合同提交erp失败{}"); ErrorCode CONTRACT_SUBMIT_ERP_FAIL = new ErrorCode(1_027_000_015, "合同提交erp失败{}");
ErrorCode CONTRACT_UNKNOWN_OPERATE = new ErrorCode(1_027_000_016, "未知的操作"); ErrorCode CONTRACT_UNKNOWN_OPERATE = new ErrorCode(1_027_000_016, "未知的操作");
ErrorCode CONTRACT_PARTNER_NOT_EXISTS = new ErrorCode(1_027_000_017, "客商信息不存在"); ErrorCode CONTRACT_PARTNER_NOT_EXISTS = new ErrorCode(1_027_000_017, "客商信息不存在");
ErrorCode CONTRACT_PUSH_FAIL = new ErrorCode(1_027_000_019, "推送合同失败:{}");
} }

View File

@@ -5,7 +5,10 @@ import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
import com.zt.plat.framework.common.pojo.CommonResult; import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.framework.common.pojo.PageResult; import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.common.util.object.BeanUtils; import com.zt.plat.framework.common.util.object.BeanUtils;
import com.zt.plat.module.contractorder.api.ContractApi;
import com.zt.plat.module.contractorder.api.vo.contract.*; 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.dal.dataobject.contract.ContractMainDO; import com.zt.plat.module.contractorder.dal.dataobject.contract.ContractMainDO;
import com.zt.plat.module.contractorder.service.contract.ContractService; import com.zt.plat.module.contractorder.service.contract.ContractService;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
@@ -23,6 +26,7 @@ import java.util.List;
import static com.zt.plat.framework.common.pojo.CommonResult.error; import static com.zt.plat.framework.common.pojo.CommonResult.error;
import static com.zt.plat.framework.common.pojo.CommonResult.success; import static com.zt.plat.framework.common.pojo.CommonResult.success;
import static com.zt.plat.module.contractorder.enums.ErrorCodeConstants.CONTRACT_PUSH_FAIL;
import static com.zt.plat.module.contractorder.enums.ErrorCodeConstants.CONTRACT_SUBMIT_ERP_FAIL; import static com.zt.plat.module.contractorder.enums.ErrorCodeConstants.CONTRACT_SUBMIT_ERP_FAIL;
@Slf4j @Slf4j
@@ -34,6 +38,8 @@ public class ContractController implements BusinessControllerMarker {
@Resource @Resource
private ContractService contractService; private ContractService contractService;
@Resource
private ContractApi contractApi;
@GetMapping("/page") @GetMapping("/page")
@Operation(summary = "获得合同分页列表") @Operation(summary = "获得合同分页列表")
@@ -186,4 +192,22 @@ public class ContractController implements BusinessControllerMarker {
public CommonResult<Boolean> relation(@RequestBody RelationReqVo reqVo) { public CommonResult<Boolean> relation(@RequestBody RelationReqVo reqVo) {
return success(contractService.relation(reqVo)); return success(contractService.relation(reqVo));
} }
@PostMapping("/push")
@Operation(summary = "国贸2.0系统推送合同")
@PreAuthorize("@ss.hasPermission('base:contract:create')")
CommonResult<Boolean> push(@Valid @RequestBody IntContract reqVO) {
try {
return contractApi.push(reqVO);
} catch (Exception e) {
return error(CONTRACT_PUSH_FAIL, e.getMessage());
}
}
@PostMapping("/logistics/list/page")
@Operation(summary = "国贸2.0系统合同分页查询")
@PreAuthorize("@ss.hasPermission('base:contract:query')")
CommonResult<PageResult<IntContract>> logisticsListPage(IntContractPageReq pageReq) {
return contractApi.logisticsListPage(pageReq);
}
} }