|
@@ -10,6 +10,8 @@ import com.sckw.core.web.constant.HttpStatus;
|
|
|
import com.sckw.core.web.response.BaseResult;
|
|
import com.sckw.core.web.response.BaseResult;
|
|
|
import com.sckw.core.web.response.HttpResult;
|
|
import com.sckw.core.web.response.HttpResult;
|
|
|
import com.sckw.core.web.response.result.PageDataResult;
|
|
import com.sckw.core.web.response.result.PageDataResult;
|
|
|
|
|
+import io.swagger.v3.oas.annotations.Operation;
|
|
|
|
|
+import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
import jakarta.servlet.http.HttpServletResponse;
|
|
import jakarta.servlet.http.HttpServletResponse;
|
|
|
import jakarta.validation.Valid;
|
|
import jakarta.validation.Valid;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
@@ -28,6 +30,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
@RestController
|
|
@RestController
|
|
|
@RequestMapping("kwcSale")
|
|
@RequestMapping("kwcSale")
|
|
|
@RequiredArgsConstructor
|
|
@RequiredArgsConstructor
|
|
|
|
|
+@Tag(name = "贸易合同相关接口")
|
|
|
public class KwcContractSaleController {
|
|
public class KwcContractSaleController {
|
|
|
|
|
|
|
|
private final KwcContractTradeService kwcContractTradeService;
|
|
private final KwcContractTradeService kwcContractTradeService;
|
|
@@ -40,6 +43,7 @@ public class KwcContractSaleController {
|
|
|
* @return HttpResult
|
|
* @return HttpResult
|
|
|
*/
|
|
*/
|
|
|
@PostMapping("/queryListByPage")
|
|
@PostMapping("/queryListByPage")
|
|
|
|
|
+ @Operation(summary = "分页查询贸易合同")
|
|
|
public BaseResult<PageResult> queryListByPage(@RequestBody QueryListReqVo reqVo) {
|
|
public BaseResult<PageResult> queryListByPage(@RequestBody QueryListReqVo reqVo) {
|
|
|
reqVo.setEntType(EntTypeEnum.SUPPLIER.getCode());
|
|
reqVo.setEntType(EntTypeEnum.SUPPLIER.getCode());
|
|
|
return BaseResult.success(kwcContractTradeService.queryListByPage(reqVo));
|
|
return BaseResult.success(kwcContractTradeService.queryListByPage(reqVo));
|
|
@@ -53,6 +57,7 @@ public class KwcContractSaleController {
|
|
|
* @date: 2023/7/18
|
|
* @date: 2023/7/18
|
|
|
*/
|
|
*/
|
|
|
@PostMapping("/addTradeContract")
|
|
@PostMapping("/addTradeContract")
|
|
|
|
|
+ @Operation(summary = "新增贸易合同")
|
|
|
public BaseResult<String> addTradeContract(@Valid @RequestBody ContractTradeReqVo reqVo) {
|
|
public BaseResult<String> addTradeContract(@Valid @RequestBody ContractTradeReqVo reqVo) {
|
|
|
kwcContractTradeService.addTradeContract(reqVo);
|
|
kwcContractTradeService.addTradeContract(reqVo);
|
|
|
return BaseResult.success(HttpStatus.MSG_003);
|
|
return BaseResult.success(HttpStatus.MSG_003);
|
|
@@ -66,6 +71,7 @@ public class KwcContractSaleController {
|
|
|
* @date: 2023/7/18
|
|
* @date: 2023/7/18
|
|
|
*/
|
|
*/
|
|
|
@PostMapping("/addSupplyTradeContract")
|
|
@PostMapping("/addSupplyTradeContract")
|
|
|
|
|
+ @Operation(summary = "补充合同")
|
|
|
public BaseResult<String> addSupplyTradeContract(@Valid @RequestBody SupplyContractTradeReq req) {
|
|
public BaseResult<String> addSupplyTradeContract(@Valid @RequestBody SupplyContractTradeReq req) {
|
|
|
kwcContractTradeService.addSupplyTradeContract(req);
|
|
kwcContractTradeService.addSupplyTradeContract(req);
|
|
|
return BaseResult.success(HttpStatus.MSG_003);
|
|
return BaseResult.success(HttpStatus.MSG_003);
|
|
@@ -116,6 +122,7 @@ public class KwcContractSaleController {
|
|
|
* @return HttpResult
|
|
* @return HttpResult
|
|
|
*/
|
|
*/
|
|
|
@PostMapping("/updateTradeContract")
|
|
@PostMapping("/updateTradeContract")
|
|
|
|
|
+ @Operation(summary = "修改贸易合同")
|
|
|
public BaseResult<String> updateTradeContract(@Valid @RequestBody ContractTradeReqVo reqVo) {
|
|
public BaseResult<String> updateTradeContract(@Valid @RequestBody ContractTradeReqVo reqVo) {
|
|
|
kwcContractTradeService.update(reqVo);
|
|
kwcContractTradeService.update(reqVo);
|
|
|
return BaseResult.success();
|
|
return BaseResult.success();
|
|
@@ -224,6 +231,7 @@ public class KwcContractSaleController {
|
|
|
* 修改合同状态 (审核,手动完结)
|
|
* 修改合同状态 (审核,手动完结)
|
|
|
*/
|
|
*/
|
|
|
@PostMapping("/updateStatus")
|
|
@PostMapping("/updateStatus")
|
|
|
|
|
+ @Operation(summary = "审批完结贸易合同")
|
|
|
public BaseResult<Boolean> updateStatus(@Valid @RequestBody ApprovalReq req) {
|
|
public BaseResult<Boolean> updateStatus(@Valid @RequestBody ApprovalReq req) {
|
|
|
return BaseResult.success(kwcContractTradeService.updateStatus(req));
|
|
return BaseResult.success(kwcContractTradeService.updateStatus(req));
|
|
|
}
|
|
}
|
|
@@ -233,6 +241,7 @@ public class KwcContractSaleController {
|
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
@PostMapping("/queryContractDetail")
|
|
@PostMapping("/queryContractDetail")
|
|
|
|
|
+ @Operation(summary = "查询贸易合同详情")
|
|
|
public BaseResult<ContractDetailResp> queryContractDetail(@Valid @RequestBody ContractDetailReq req) {
|
|
public BaseResult<ContractDetailResp> queryContractDetail(@Valid @RequestBody ContractDetailReq req) {
|
|
|
return BaseResult.success(kwcContractTradeService.queryContractDetail(req));
|
|
return BaseResult.success(kwcContractTradeService.queryContractDetail(req));
|
|
|
}
|
|
}
|