| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @RestController |
| | | public class InventoryCheckOrderController extends BaseController { |
| | |
| | | return R.ok().add(orders); |
| | | } |
| | | |
| | | @RequestMapping(value = "/inventoryCheckOrder/nav/auth") |
| | | @ManagerAuth |
| | | public R navList() { |
| | | EntityWrapper<InventoryCheckOrder> wrapper = new EntityWrapper<>(); |
| | | List<InventoryCheckOrder> orders = inventoryCheckOrderService.selectList(wrapper.eq("status", "1")); |
| | | List<String> locNoList = orders.stream().map(InventoryCheckOrder::getOrderNo).distinct().collect(Collectors.toList()); |
| | | return R.ok().add(locNoList); |
| | | } |
| | | |
| | | @RequestMapping(value = "/inventoryCheckOrder/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(InventoryCheckOrder.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | return R.ok(inventoryCheckOrderService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | |
| | | return R.parse("单据编号已经存在:" + orderNo); |
| | | } |
| | | |
| | | inventoryCheckOrder.setCreateBy(getUserId().toString()); |
| | | inventoryCheckOrder.setCreateBy(getUserId()); |
| | | inventoryCheckOrder.setCreateTime(new Date()); |
| | | inventoryCheckOrder.setStatus("1"); |
| | | |