|
|
@@ -1,15 +1,15 @@
|
|
|
package com.sckw.order.controller;
|
|
|
|
|
|
import com.sckw.core.web.response.HttpResult;
|
|
|
-import com.sckw.order.model.vo.req.PurchaseOrderParam;
|
|
|
-import com.sckw.order.model.vo.req.UpdateOrderParam;
|
|
|
-import com.sckw.order.model.vo.req.ValetOrderParam;
|
|
|
+import com.sckw.order.model.vo.req.*;
|
|
|
import com.sckw.order.serivce.KwoTradeOrderService;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.springframework.http.MediaType;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
* @desc: 贸易订单相关
|
|
|
* @author: yzc
|
|
|
@@ -36,30 +36,29 @@ public class KwoTradeOrderController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @desc: 代客下单草稿
|
|
|
+ * @desc: 采购下单提交
|
|
|
* @author: yzc
|
|
|
* @date: 2023-07-07 15:29
|
|
|
- * @Param valetOrderParam:
|
|
|
+ * @Param purchaseOrderParam:
|
|
|
* @return: com.sckw.core.web.response.HttpResult
|
|
|
*/
|
|
|
- @PostMapping(value = "/addValetOrderDraft", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
- public HttpResult addValetOrderDraft(@RequestBody ValetOrderParam valetOrderParam) {
|
|
|
- kwoTradeOrderService.addValetOrderDraft(valetOrderParam);
|
|
|
- return HttpResult.ok("代客下单草稿保存成功");
|
|
|
+ @PostMapping(value = "/addPurchaseOrderSubmit", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
+ public HttpResult addPurchaseOrderSubmit(@RequestBody @Validated PurchaseOrderParam purchaseOrderParam) {
|
|
|
+ kwoTradeOrderService.addPurchaseOrderSubmit(purchaseOrderParam);
|
|
|
+ return HttpResult.ok("采购下单提交成功");
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
- * @desc: 采购下单提交
|
|
|
+ * @desc: 代客下单草稿
|
|
|
* @author: yzc
|
|
|
* @date: 2023-07-07 15:29
|
|
|
- * @Param purchaseOrderParam:
|
|
|
+ * @Param valetOrderParam:
|
|
|
* @return: com.sckw.core.web.response.HttpResult
|
|
|
*/
|
|
|
- @PostMapping(value = "/addPurchaseOrderSubmit", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
- public HttpResult addPurchaseOrderSubmit(@RequestBody @Validated PurchaseOrderParam purchaseOrderParam) {
|
|
|
- kwoTradeOrderService.addPurchaseOrderSubmit(purchaseOrderParam);
|
|
|
- return HttpResult.ok("采购下单提交成功");
|
|
|
+ @PostMapping(value = "/addValetOrderDraft", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
+ public HttpResult addValetOrderDraft(@RequestBody ValetOrderParam valetOrderParam) {
|
|
|
+ kwoTradeOrderService.addValetOrderDraft(valetOrderParam);
|
|
|
+ return HttpResult.ok("代客下单草稿保存成功");
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -98,7 +97,108 @@ public class KwoTradeOrderController {
|
|
|
@PostMapping(value = "/update", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
public HttpResult update(@RequestBody @Validated UpdateOrderParam updateOrderParam) {
|
|
|
kwoTradeOrderService.update(updateOrderParam);
|
|
|
- return HttpResult.ok("修改成功");
|
|
|
+ return HttpResult.ok("订单修改成功");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc: 订单受理
|
|
|
+ * @author: yzc
|
|
|
+ * @date: 2023-07-12 11:16
|
|
|
+ * @Param acceptanceOrderParam:
|
|
|
+ * @return: com.sckw.core.web.response.HttpResult
|
|
|
+ */
|
|
|
+ @PostMapping(value = "/acceptanceOrder", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
+ public HttpResult acceptanceOrder(@RequestBody @Validated AcceptanceOrderParam acceptanceOrderParam) {
|
|
|
+ kwoTradeOrderService.acceptanceOrder(acceptanceOrderParam);
|
|
|
+ return HttpResult.ok("订单受理成功");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc: 驳回订单
|
|
|
+ * @author: yzc
|
|
|
+ * @date: 2023-07-12 11:22
|
|
|
+ * @Param rejectOrderParam:
|
|
|
+ * @return: com.sckw.core.web.response.HttpResult
|
|
|
+ */
|
|
|
+ @PostMapping(value = "/rejectOrder", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
+ public HttpResult rejectOrder(@RequestBody @Validated RejectOrderParam rejectOrderParam) {
|
|
|
+ kwoTradeOrderService.rejectOrder(rejectOrderParam);
|
|
|
+ return HttpResult.ok("订单驳回成功");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc: 驳回订单原因查询
|
|
|
+ * @author: yzc
|
|
|
+ * @date: 2023-07-12 11:22
|
|
|
+ * @Param id:
|
|
|
+ * @return: com.sckw.core.web.response.HttpResult
|
|
|
+ */
|
|
|
+ @GetMapping("/rejectReason")
|
|
|
+ public HttpResult rejectReason(@RequestParam Long id) {
|
|
|
+ return HttpResult.ok(kwoTradeOrderService.rejectReason(id));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc: 完结订单
|
|
|
+ * @author: yzc
|
|
|
+ * @date: 2023-07-12 17:29
|
|
|
+ * @Param completeOrderParam:
|
|
|
+ * @return: com.sckw.core.web.response.HttpResult
|
|
|
+ */
|
|
|
+ @PostMapping(value = "/completeOrder", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
+ public HttpResult completeOrder(@RequestBody @Validated CompleteOrderParam completeOrderParam) {
|
|
|
+ kwoTradeOrderService.completeOrder(completeOrderParam);
|
|
|
+ return HttpResult.ok("订单完结成功");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc: 分页查询
|
|
|
+ * @author: yzc
|
|
|
+ * @date: 2023-07-12 17:31
|
|
|
+ * @Param completeOrderParam:
|
|
|
+ * @return: com.sckw.core.web.response.HttpResult
|
|
|
+ */
|
|
|
+ @PostMapping(value = "/select", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
+ public HttpResult select(@RequestBody @Validated OrderListSelectParam orderListSelectParam) {
|
|
|
+ return HttpResult.ok(kwoTradeOrderService.select(orderListSelectParam));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc: 订单统计
|
|
|
+ * @author: yzc
|
|
|
+ * @date: 2023-07-12 17:31
|
|
|
+ * @Param completeOrderParam:
|
|
|
+ * @return: com.sckw.core.web.response.HttpResult
|
|
|
+ */
|
|
|
+ @PostMapping(value = "/statistic", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
+ public HttpResult statistic(@RequestBody @Validated OrderListStatisticParam orderListStatisticParam) {
|
|
|
+ return HttpResult.ok(kwoTradeOrderService.statistic(orderListStatisticParam));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc: 订单列表导出
|
|
|
+ * @author: yzc
|
|
|
+ * @date: 2023-07-12 17:32
|
|
|
+ * @Param completeOrderParam:
|
|
|
+ * @return: com.sckw.core.web.response.HttpResult
|
|
|
+ */
|
|
|
+ @PostMapping(value = "/export", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
+ public HttpResult export(@RequestBody @Validated CompleteOrderParam completeOrderParam) {
|
|
|
+ kwoTradeOrderService.export(completeOrderParam);
|
|
|
+ return HttpResult.ok("订单完结成功");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc: 批量删除
|
|
|
+ * @author: yzc
|
|
|
+ * @date: 2023-07-12 17:34
|
|
|
+ * @Param ids:
|
|
|
+ * @return: com.sckw.core.web.response.HttpResult
|
|
|
+ */
|
|
|
+ @GetMapping("/batchDelete")
|
|
|
+ public HttpResult batchDelete(@RequestParam List<Long> ids) {
|
|
|
+ kwoTradeOrderService.batchDelete(ids);
|
|
|
+ return HttpResult.ok("订单批量删除成功");
|
|
|
}
|
|
|
|
|
|
}
|