| | |
| | | package com.vincent.rsf.server.manager.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | |
| | | import com.vincent.rsf.server.common.domain.BaseParam; |
| | | import com.vincent.rsf.server.common.domain.KeyValVo; |
| | | import com.vincent.rsf.server.common.domain.PageParam; |
| | | import com.vincent.rsf.server.manager.entity.AsnOrder; |
| | | import com.vincent.rsf.server.manager.entity.AsnOrderLog; |
| | | import com.vincent.rsf.server.manager.service.AsnOrderLogService; |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @PreAuthorize("hasAuthority('manager:asnOrderLog:list')") |
| | | @PostMapping("/asnOrderLog/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(asnOrderLogService.list(), AsnOrderLog.class), response); |
| | | List<AsnOrderLog> orders = new ArrayList<>(); |
| | | if (!Objects.isNull(map.get("ids"))) { |
| | | List<Long> ids = JSONArray.parseArray(JSONObject.toJSONString(map.get("ids")), Long.class); |
| | | if (!ids.isEmpty()) { |
| | | orders = asnOrderLogService.list(new LambdaQueryWrapper<AsnOrderLog>().in(AsnOrderLog::getId, ids)); |
| | | } else { |
| | | orders = asnOrderLogService.list(new LambdaQueryWrapper<>()); |
| | | } |
| | | } else { |
| | | orders = asnOrderLogService.list(new LambdaQueryWrapper<>()); |
| | | } |
| | | ExcelUtil.build(ExcelUtil.create(orders, AsnOrderLog.class), response); |
| | | } |
| | | |
| | | @ApiOperation("继续收货") |
| | | @PreAuthorize("hasAuthority('manager:asnOrderLog:update')") |
| | | @PostMapping("/asnOrderLog/continue/{id}") |
| | | public R continuRcpt(@PathVariable Long id) { |
| | | if (Objects.isNull(id)) { |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | | return asnOrderLogService.continueRecipt(id); |
| | | } |
| | | |
| | | } |