| | |
| | | import com.vincent.rsf.server.common.domain.KeyValVo; |
| | | import com.vincent.rsf.server.common.domain.PageParam; |
| | | import com.vincent.rsf.server.common.utils.ExcelUtil; |
| | | import com.vincent.rsf.server.common.utils.OptimisticLockUtils; |
| | | import com.vincent.rsf.server.manager.controller.params.AsnOrderAndItemsParams; |
| | | import com.vincent.rsf.server.manager.entity.excel.AsnOrderTemplate; |
| | | import com.vincent.rsf.server.manager.enums.AsnExceStatus; |
| | |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<WkOrder, BaseParam> pageParam = new PageParam<>(baseParam, WkOrder.class); |
| | | QueryWrapper<WkOrder> queryWrapper = pageParam.buildWrapper(true); |
| | | List<String> list = Arrays.asList(OrderType.ORDER_OUT.type); |
| | | queryWrapper.in("type", list); |
| | | // List<String> list = Arrays.asList(OrderType.ORDER_OUT.type); |
| | | // queryWrapper.in("type", list); |
| | | return R.ok().add(outStockService.page(pageParam, queryWrapper)); |
| | | } |
| | | |
| | |
| | | @PostMapping("/outStock/update") |
| | | @ApiOperation("更新") |
| | | public R update(@RequestBody WkOrder wkOrder) { |
| | | OptimisticLockUtils.requireVersion("出库单", wkOrder.getVersion()); |
| | | wkOrder.setType(OrderType.ORDER_OUT.type) |
| | | .setUpdateBy(getLoginUserId()) |
| | | .setUpdateTime(new Date()); |
| | |
| | | return outStockService.saveOutStock(params, getLoginUserId()); |
| | | } |
| | | |
| | | @GetMapping("/outStock/complete/{id}") |
| | | @ApiOperation("完成出库单") |
| | | @PreAuthorize("hasAuthority('manager:outStock:update')") |
| | | public R complete(@PathVariable Long id) { |
| | | if (Objects.isNull(id)) { |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | | return outStockService.completeOutOrderById(id); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("单据信息修改") |
| | | @PostMapping("/outStock/items/update") |
| | | @PreAuthorize("hasAuthority('manager:outStock:update')") |