Merge remote-tracking branch 'origin/devlop-phyz' into devlop-phyz
| New file |
| | |
| | | package com.vincent.rsf.server.api.controller.pda; |
| | | |
| | | 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.framework.common.R; |
| | | import com.vincent.rsf.server.api.service.PdaOtherService; |
| | | import com.vincent.rsf.server.manager.entity.WkOrder; |
| | | import com.vincent.rsf.server.manager.enums.OrderType; |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | @Api(tags = "PDA综合操作接口") |
| | | @RequestMapping("/pda") |
| | | @RestController |
| | | public class PdaOtherController extends BaseController { |
| | | |
| | | @Autowired |
| | | private PdaOtherService pdaOtherService; |
| | | |
| | | |
| | | @RequestMapping(value = "/other/transferPage") |
| | | public R transferPage(@RequestParam(required = true) String orderNo, |
| | | @RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "5") Integer limit) { |
| | | |
| | | return pdaOtherService.transferPage(orderNo,curr,limit); |
| | | } |
| | | } |
| | |
| | | |
| | | @RequestMapping(value = "/orderOut/list") |
| | | public R pdaPageList(@RequestParam(required = true) String orderNo, |
| | | @RequestParam(required = true) String orderType, |
| | | @RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "5") Integer limit) { |
| | | |
| | | Page<WkOrder> page = new Page<>(curr, limit); |
| | | LambdaQueryWrapper<WkOrder> wkOrderLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | wkOrderLambdaQueryWrapper.eq(WkOrder::getType, OrderType.ORDER_OUT.type); |
| | | wkOrderLambdaQueryWrapper.eq(WkOrder::getWkType, orderType); |
| | | wkOrderLambdaQueryWrapper.eq(!Cools.isEmpty(orderNo), WkOrder::getCode, orderNo); |
| | | Page<WkOrder> wkOrderPage = outStockService.page(page, wkOrderLambdaQueryWrapper); |
| | | return R.ok(wkOrderPage); |
| New file |
| | |
| | | package com.vincent.rsf.server.api.service; |
| | | |
| | | import com.vincent.rsf.framework.common.R; |
| | | |
| | | public interface PdaOtherService { |
| | | R transferPage(String orderNo, Integer curr, Integer limit); |
| | | } |
| New file |
| | |
| | | package com.vincent.rsf.server.api.service.impl; |
| | | |
| | | 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.framework.common.R; |
| | | import com.vincent.rsf.server.api.service.PdaOtherService; |
| | | import com.vincent.rsf.server.manager.entity.Transfer; |
| | | import com.vincent.rsf.server.manager.entity.WkOrder; |
| | | import com.vincent.rsf.server.manager.enums.OrderType; |
| | | import com.vincent.rsf.server.manager.service.TransferService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class PdaOtherServiceImpl implements PdaOtherService { |
| | | |
| | | @Autowired |
| | | private TransferService transferService; |
| | | |
| | | @Override |
| | | public R transferPage(String orderNo, Integer curr, Integer limit) { |
| | | Page<Transfer> page = new Page<>(curr, limit); |
| | | LambdaQueryWrapper<Transfer> transferLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | transferLambdaQueryWrapper.eq(!Cools.isEmpty(orderNo), Transfer::getCode, orderNo); |
| | | Page<Transfer> page1 = transferService.page(page, transferLambdaQueryWrapper); |
| | | return R.ok(page1); |
| | | } |
| | | } |