| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- package com.dk.mdm.controller.sale;
- import com.dk.common.model.pojo.PageList;
- import com.dk.common.response.ResponseResultVO;
- import com.dk.mdm.model.pojo.sale.Order;
- import com.dk.common.service.BaseService;
- import com.dk.mdm.model.query.sale.OrderQuery;
- import com.dk.mdm.model.response.sale.OrderResponse;
- import com.dk.mdm.model.vo.sale.OrderVO;
- import io.swagger.annotations.ApiOperation;
- import org.springframework.web.bind.annotation.*;
- import org.springframework.beans.factory.annotation.Autowired;
- import io.swagger.annotations.Api;
- import com.dk.mdm.service.sale.OrderService;
- import java.util.Map;
- @Api(tags = "销售订单API接口")
- @RestController
- @RequestMapping("/sale/order")
- public class OrderController {
- public BaseService<Order> getService() {
- return orderService;
- }
- @Autowired
- private OrderService orderService;
- /**
- * @desc : 条件查询
- * @author : 付斌
- * @date : 2023/1/9 10:36
- */
- @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
- @PostMapping({"list_by"})
- public ResponseResultVO<PageList<OrderResponse>> selectByCond(@RequestBody OrderQuery orderQuery) {
- return orderService.selectByCond(orderQuery);
- }
- /**
- * @desc :查询订单明细(货物、收款、附件)
- * @author : 付斌
- * @date : 2024-02-28 13:24
- */
- @PostMapping({"select_order_item_by_id/{id}"})
- public ResponseResultVO<Map<String, Object>> selectOrderItemById(@PathVariable String id) {
- return orderService.selectOrderItemById(id);
- }
- /**
- * @desc : 通过ID查询
- * @author : 付斌
- * @date : 2023/1/9 10:41
- */
- @PostMapping({"/{id}"})
- public ResponseResultVO selectById(@PathVariable String id) {
- return orderService.selectById(id);
- }
- /**
- * @desc : 新建员工
- * @author : 付斌
- * @date : 2023/1/9 10:48
- */
- @ApiOperation(value = "新建员工", notes = "新建员工")
- @PostMapping({"insert"})
- public ResponseResultVO<?> insert(@RequestBody OrderVO orderVO) {
- return orderService.insert(orderVO);
- }
- /**
- * @desc : 编辑员工
- * @author : 付斌
- * @date : 2023/1/9 10:49
- */
- @ApiOperation(value = "编辑员工", notes = "编辑员工")
- @PostMapping({"update"})
- public ResponseResultVO<Boolean> update(@RequestBody OrderVO orderVO) {
- return orderService.update(orderVO);
- }
- }
|