| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.dto.ConsignmentDto; |
| | | import com.yuanchu.mom.service.SaleService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | |
| | | import com.yuanchu.mom.service.ConsignmentService; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | @ApiImplicitParam(name = "orderNumber", value = "订单编号", dataTypeClass = String.class, required = true) |
| | | }) |
| | | @GetMapping("/selSale") |
| | | public Result selSale(String orderNumber ) { |
| | | public Result selSale(String orderNumber) { |
| | | return Result.success(saleService.selSale(orderNumber)); |
| | | } |
| | | |
| | |
| | | return Result.success(consignmentService.addCon(data.get("name").replaceAll("\"", ""), consignmentDto)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "查询发货记录列表") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "pageSize", value = "页数", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "countSize", value = "条数/页", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "name", value = "产品名称", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "specifications", value = "产品型号", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "time", value = "发货日期", dataTypeClass = String.class) |
| | | }) |
| | | @GetMapping("/selectAllCon") |
| | | public Result selectAllCon(int pageSize, int countSize, String name, String specifications, String time) { |
| | | IPage<Map<String, Object>> consignmentPage = consignmentService.selectAllCon(new Page<Object>(pageSize, countSize), name, specifications, time); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("total", consignmentPage.getTotal()); |
| | | map.put("row", consignmentPage.getRecords()); |
| | | return Result.success(map); |
| | | } |
| | | @ApiOperation(value = "根据发货id删除") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "id", value = "发货id", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @PostMapping("/delCon") |
| | | public Result delCon(Integer id) { |
| | | consignmentService.delCon(id); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "批量删除") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "ids", value = "ids", dataTypeClass = Integer.class, dataType = "List", required = true) |
| | | }) |
| | | @PostMapping("/delAllCon") |
| | | public Result delAllCon(@RequestParam("ids") List<Integer> ids) { |
| | | consignmentService.delAllCon(ids); |
| | | return Result.success(); |
| | | } |
| | | |
| | | } |
| | | |