| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.approve.bean.vo.ApproveProcessVO; |
| | | import com.ruoyi.approve.service.impl.ApproveProcessServiceImpl; |
| | | import com.ruoyi.approve.vo.ApproveProcessVO; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.sales.dto.ShippingInfoDto; |
| | | import com.ruoyi.sales.mapper.ShippingInfoMapper; |
| | | import com.ruoyi.sales.pojo.ShippingInfo; |
| | | import com.ruoyi.sales.service.ShippingInfoService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/shippingInfo") |
| | | @Api(tags = "发货信息管理") |
| | | @Tag(name = "发货信息管理") |
| | | @AllArgsConstructor |
| | | public class ShippingInfoController extends BaseController { |
| | | |
| | |
| | | |
| | | |
| | | @GetMapping("/listPage") |
| | | @ApiOperation("发货信息列表") |
| | | @Operation(summary = "发货信息列表") |
| | | public AjaxResult listPage(Page page, ShippingInfo req) { |
| | | IPage<ShippingInfoDto> listPage = shippingInfoService.listPage(page,req); |
| | | return AjaxResult.success(listPage); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @ApiOperation("添加发货信息") |
| | | @Operation(summary = "添加发货信息") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Log(title = "发货信息管理", businessType = BusinessType.INSERT) |
| | | public AjaxResult add(@RequestBody ShippingInfoDto req) throws Exception { |
| | |
| | | // 添加发货消息 |
| | | req.setShippingNo(sh); |
| | | req.setStatus("待审核"); |
| | | boolean save = shippingInfoService.save(req); |
| | | boolean save = shippingInfoService.add(req); |
| | | return save ? AjaxResult.success() : AjaxResult.error(); |
| | | } |
| | | |
| | | @ApiOperation("发货扣库存") |
| | | @Operation(summary = "发货扣库存") |
| | | @PostMapping("/deductStock") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Log(title = "发货信息管理", businessType = BusinessType.UPDATE) |
| | |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | | @ApiOperation("修改发货信息") |
| | | @Operation(summary = "修改发货信息") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Log(title = "发货信息管理", businessType = BusinessType.UPDATE) |
| | | public AjaxResult update(@RequestBody ShippingInfo req) { |
| | |
| | | } |
| | | |
| | | @DeleteMapping("/delete") |
| | | @ApiOperation("删除发货信息") |
| | | @Operation(summary = "删除发货信息") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Log(title = "发货信息管理", businessType = BusinessType.DELETE) |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { |
| | |
| | | * 导出发货信息管理 |
| | | */ |
| | | @PostMapping("/export") |
| | | @ApiOperation("导出发货信息") |
| | | @Operation(summary = "导出发货信息") |
| | | public void export(HttpServletResponse response) { |
| | | List<ShippingInfo> list = shippingInfoMapper.listAll(); |
| | | ExcelUtil<ShippingInfo> util = new ExcelUtil<ShippingInfo>(ShippingInfo.class); |
| | |
| | | |
| | | |
| | | @GetMapping("/getByCustomerName") |
| | | @ApiOperation("通过客户名称查询") |
| | | @Operation(summary = "通过客户名称查询") |
| | | public AjaxResult getByCustomerName(String customerName) { |
| | | return AjaxResult.success(shippingInfoService.getShippingInfoByCustomerName(customerName)); |
| | | } |
| | | |
| | | @GetMapping("/getDateil/{id}") |
| | | public R getDateil(@PathVariable("id") Long id) { |
| | | return R.ok(shippingInfoService.getDetail(id)); |
| | | } |
| | | } |