| | |
| | | package com.zy.asrs.wcs.rcs.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.zy.asrs.framework.exception.CoolException; |
| | | import com.zy.asrs.wcs.core.model.enums.DeviceCtgType; |
| | |
| | | public Motion selectOfNext(String uuid, Motion motion) { |
| | | return this.baseMapper.selectOfNext(uuid, motion.getPriority(), motion.getHostId()); |
| | | } |
| | | |
| | | @Override |
| | | public int batchInsert(List<Motion> motionList, String uuid, Integer taskNo) { |
| | | int i = motionList.size(); |
| | | for (Motion motion : motionList) { |
| | | motion.setPriority(i); |
| | | motion.setWrkNo(taskNo); |
| | | motion.setUuid(uuid); |
| | | if (!this.save(motion)) { |
| | | throw new CoolException(JSON.toJSONString(motion) + "动作保存失败"); |
| | | } |
| | | i -= 1; |
| | | } |
| | | return motionList.size(); |
| | | } |
| | | } |