| | |
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void conveyorStart() {
|
| | | List<Task> tasks = taskService.list(new LambdaQueryWrapper<Task>()
|
| | | .eq(Task::getTaskSts, TaskStsType.WCS_CONTAINER_RECEIVE.id).eq(Task::getStatus, 1));
|
| | | .eq(Task::getTaskSts, TaskStsType.WCS_CONTAINER_RECEIVE.id)
|
| | | .eq(Task::getStatus, 1));
|
| | | tasks.forEach(task -> {
|
| | | try {
|
| | | ConveyorStarParam conveyorStarParam = new ConveyorStarParam();
|
| | |
| | | if (task == null) {
|
| | | return R.error("任务不存在!!");
|
| | | }
|
| | | log.info("容器到达接收,任务号:{},当前状态:{},上报状态:{}",task.getTaskNo(),task.getTaskSts$(),TaskStsType.WCS_CONTAINER_RECEIVE.desc);
|
| | | log.info("容器到达接收,任务号:{},当前状态:{},上报状态:{}, 接收参数:{}",task.getTaskNo(),task.getTaskSts$(),TaskStsType.WCS_CONTAINER_RECEIVE.desc, JSONObject.toJSONString(arrivedParam));
|
| | |
|
| | | taskType = task.getTaskType() > 100 ? "outStock":"inStock";
|
| | |
|
| | |
| | | if (task.getTaskSts() == TaskStsType.WCS_EXECUTE_OUT_ARRIVED.id
|
| | | || task.getTaskSts() == TaskStsType.WCS_EXECUTE_OUT_TASK_DONE.id ) {
|
| | | // 到达拣选位,控制播种墙亮灯
|
| | | List<CacheSite> cacheSites = cacheSiteService.list(new LambdaQueryWrapper<CacheSite>().eq(CacheSite::getBarcode, task.getBarcode()));
|
| | | List<CacheSite> cacheSites = cacheSiteService.list(new LambdaQueryWrapper<CacheSite>()
|
| | | .eq(CacheSite::getBarcode, task.getBarcode()));
|
| | | if(cacheSites.size() == 0) {
|
| | | log.error("条码:{},未找到播种墙亮灯",task.getBarcode());
|
| | | throw new CoolException("未找到播种墙");
|
| | |
| | | }
|
| | | if (str.startsWith("PK")) {
|
| | | ordersParam.setInType(OrderType.PK_IN_ORDER.id);
|
| | | } else {
|
| | | ordersParam.setInType(OrderType.UTC_OUT_ORDER.id);
|
| | | }
|
| | | boolean result = mobileService.batchMergeOrders(ordersParam);
|
| | | if (result) {
|
| | |
| | | * 播种墙库位容器码
|
| | | */
|
| | | @ApiModelProperty(value = "播种墙库位容器码")
|
| | | @TableField(updateStrategy = FieldStrategy.IGNORED)
|
| | | private String barcode;
|
| | |
|
| | | public CacheSite() {}
|
| | |
|
| | | public CacheSite(String siteNo,Integer siteStatus,Long orderId,String orderNo,Long hostId,Integer status,Integer deleted,Date createTime,Long createBy,Date updateTime,Long updateBy,String memo) {
|
| | | public CacheSite(String siteNo,Integer siteStatus,Long orderId,String orderNo,Long hostId,Integer status, String barcode,Integer deleted,Date createTime,Long createBy,Date updateTime,Long updateBy,String memo) {
|
| | | this.siteNo = siteNo;
|
| | | this.siteStatus = siteStatus;
|
| | | this.orderId = orderId;
|
| | | this.orderNo = orderNo;
|
| | | this.barcode = barcode;
|
| | | this.hostId = hostId;
|
| | | this.status = status;
|
| | | this.deleted = deleted;
|
| | |
| | | cacheSite.setSiteStatus(CacheSiteStatusType.O.id);
|
| | | cacheSite.setOrderId(null);
|
| | | cacheSite.setOrderNo(null);
|
| | | cacheSite.setBarcode(null);
|
| | | cacheSite.setUpdateTime(new Date());
|
| | | if (!cacheSiteService.updateById(cacheSite)) {
|
| | | throw new CoolException("缓存站清空失败");
|
| | |
| | | .setMatnr(orderdetl.getMatnr())
|
| | | .setDetlId(orderdetl.getDetlId())
|
| | | .setIoStatus(0)
|
| | | .setOrderNo(orderdetl.getOrderNo()).setOrderId(orderdetl.getOrderId()).setStatus(1);
|
| | | .setOrderNo(orderdetl.getOrderNo())
|
| | | .setOrderId(orderdetl.getOrderId())
|
| | | .setStatus(1);
|
| | | waitPakins.add(waitPakin);
|
| | | });
|
| | |
|
| | |
| | | WaitPakinLog pakinLog = new WaitPakinLog();
|
| | | BeanUtils.copyProperties(waitPakin, pakinLog);
|
| | | pakinLog.setIoStatus(1);
|
| | | pakinLog.setId(null);
|
| | | if (!waitPakinLogService.saveOrUpdate(pakinLog)) {
|
| | | throw new CoolException("组拖历史档更新失败");
|
| | | }
|
| | |
| | | order.setOrderSettle(OrderSettleType.COMPLETE.val());
|
| | | OrderLog orderLog = new OrderLog();
|
| | | BeanUtils.copyProperties(order, orderLog);
|
| | | orderLog.setId(null);
|
| | | if (!orderLogService.save(orderLog)) {
|
| | | throw new CoolException("历史单据更新失败!!");
|
| | | }
|
| | |
| | | BeanUtils.copyProperties(delt, detlLog);
|
| | | detlLog.setQty(delt.getWorkQty());
|
| | | detlLog.setWorkQty(0.0);
|
| | | detlLog.setId(null);
|
| | | detlLogs.add(detlLog);
|
| | | });
|
| | |
|
| | |
| | | if (Objects.isNull(order)) {
|
| | | throw new CoolException("绑定订单不存在!!");
|
| | | }
|
| | | siteNo.setOrderNo(order.getOrderNo()).setOrderId(order.getId()).setSiteStatus(CacheSiteStatusType.R.id).setBarcode(param.get("barcode").toString());
|
| | | siteNo.setOrderNo(order.getOrderNo())
|
| | | .setOrderId(order.getId())
|
| | | .setSiteStatus(CacheSiteStatusType.R.id)
|
| | | .setBarcode(param.get("barcode").toString());
|
| | | if (cacheSiteMapper.updateById(siteNo) < 1) {
|
| | | throw new CoolException("订单播种位绑定失败!!" );
|
| | | }
|
| | |
| | | if (StringUtil.isNullOrEmpty(siteNo.getOrderNo())) {
|
| | | throw new CoolException("当前播种站点未绑定订单!!");
|
| | | }
|
| | | siteNo.setOrderId(null).setOrderNo(null).setSiteNo("0");
|
| | | siteNo.setOrderId(null).setOrderNo(null).setBarcode(null).setSiteNo("0");
|
| | | if (cacheSiteMapper.updateById(siteNo) < 1) {
|
| | | throw new CoolException("订单与播种位解绑失败!!" );
|
| | | }
|
| | |
| | | import com.zy.asrs.wms.asrs.entity.Wave;
|
| | | import com.zy.asrs.wms.asrs.mapper.OrderNoRuleMapper;
|
| | | import com.zy.asrs.wms.asrs.entity.OrderNoRule;
|
| | | import com.zy.asrs.wms.asrs.service.OrderNoRuleService;
|
| | | import com.zy.asrs.wms.asrs.service.*;
|
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
| | | import com.zy.asrs.wms.asrs.service.OrderService;
|
| | | import com.zy.asrs.wms.asrs.service.OrderTypeService;
|
| | | import com.zy.asrs.wms.asrs.service.WaveService;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | |
| | | private OrderTypeService orderTypeService;
|
| | | @Autowired
|
| | | private WaveService waveService;
|
| | | @Autowired
|
| | | private CacheSiteService cacheSiteService;
|
| | |
|
| | | @Override
|
| | | public String getOrderNo(Integer orderType) {
|
| | |
| | |
|
| | | SimpleDateFormat format = new SimpleDateFormat(pattern);
|
| | | buffer.append(format.format(new Date()));//订单时间
|
| | |
|
| | |
|
| | | if(orderType == 1 || orderType == 2) {
|
| | | //查当天订单数量
|
| | |
| | | cacheSite.setOrderId(null);
|
| | | cacheSite.setOrderNo(null);
|
| | | cacheSite.setPlatformId(null);
|
| | | cacheSite.setBarcode(null);
|
| | | cacheSite.setPlatformNo(null);
|
| | | cacheSite.setUpdateTime(new Date());
|
| | | if (!cacheSiteService.updateById(cacheSite)) {
|