| | |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.common.model.LocDto; |
| | | import com.zy.common.model.TaskDto; |
| | | import com.zy.common.web.BaseController; |
| | | import com.zy.system.entity.Config; |
| | | import com.zy.system.service.ConfigService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | |
| | | @Resource |
| | | private OrderPakoutService orderPakOutService; |
| | | |
| | | @Resource |
| | | private ConfigService configService; |
| | | |
| | | |
| | | @PostMapping("/out/pakout/orderDetlIds/auth") |
| | |
| | | // ----------------------------------------------------------------------------------------------- |
| | | for (TaskDto taskDto : taskDtos) { |
| | | BasDevp staNo = basDevpService.checkSiteStatus(taskDto.getStaNo()); |
| | | // 判断任务目标站点是否是出库模式 |
| | | if (staNo.getDevNo() == 1016 || staNo.getDevNo() == 1043) { |
| | | Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "inOrOutBoundMode").eq("status", 1)); |
| | | if (config != null && !Cools.isEmpty(config.getValue())) { |
| | | int value = Integer.parseInt(config.getValue()); |
| | | if (value != 2) { |
| | | throw new CoolException("目标站点" + staNo.getDevNo() + "不是出库模式,当前模式为:" + value); |
| | | } |
| | | } |
| | | } |
| | | workService.stockOut(staNo, taskDto, getUserId()); |
| | | } |
| | | return R.ok(); |