| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import zy.cloud.wms.common.web.BaseController; |
| | | import zy.cloud.wms.manager.entity.Order; |
| | | import zy.cloud.wms.manager.entity.Pakout; |
| | | import zy.cloud.wms.manager.service.OrderService; |
| | | import zy.cloud.wms.manager.service.PakoutService; |
| | | |
| | | import java.util.ArrayList; |
| | |
| | | |
| | | @Autowired |
| | | private PakoutService pakoutService; |
| | | @Autowired |
| | | private OrderService orderService; |
| | | |
| | | @RequestMapping(value = "/pakout/{id}/auth") |
| | | @ManagerAuth |
| | |
| | | @RequestMapping(value = "/pakout/print/auth") |
| | | @ManagerAuth |
| | | public R print(@RequestParam String docNumber) { |
| | | List<Pakout> pakouts = pakoutService.selectList(new EntityWrapper<Pakout>().eq("doc_num", docNumber).eq("host_id", getHostId())); |
| | | if (!Cools.isEmpty(pakouts)) { |
| | | if (pakouts.get(0).getWrkSts() == 1) { |
| | | pakoutService.stockOutPrint(null, docNumber, getUserId(), getHostId()); |
| | | Order order_no = orderService.selectOne(new EntityWrapper<Order>() |
| | | .eq("order_no", docNumber)); |
| | | if (!Cools.isEmpty(order_no)) { |
| | | if (order_no.getSettle() == 2) { |
| | | order_no.setSettle(7L); |
| | | orderService.update(order_no,new EntityWrapper<Order>() |
| | | .eq("order_no",docNumber)); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | | return R.ok(); |
| | | return R.error(); |
| | | } |
| | | |
| | | } |