| | |
| | | import com.zy.asrs.entity.result.StockVo; |
| | | import com.zy.asrs.mapper.TagMapper; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.utils.MatUtils; |
| | | import com.zy.asrs.utils.OrderInAndOutUtil; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.common.constant.ArmConstant; |
| | | import com.zy.common.model.DetlDto; |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import com.zy.common.utils.NodeUtils; |
| | | import com.zy.erp.kingdee.utils.PostMesDataUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | .eq("status", 1) |
| | | ); |
| | | if (Cools.isEmpty(basArm)){ |
| | | throw new CoolException("机械臂配置异常,查询不到机械臂数据!!!"+ JSON.toJSONString(param)); |
| | | return; |
| | | // throw new CoolException("机械臂配置异常,查询不到机械臂数据!!!"+ JSON.toJSONString(param)); |
| | | } |
| | | |
| | | try{ |
| | |
| | | if (Cools.isEmpty(basArmMast)){ |
| | | throw new CoolException("未查询到相关机械臂拆码垛任务!!!"+ JSON.toJSONString(param)); |
| | | } |
| | | basArmMastService.updateArmMastStatus(param.getArm_no(),basArmMast.getSortingLine(),2,3); |
| | | basArmMastService.updateArmMastStatus(param.getArm_no(),basArmMast.getSortingLine(),basArmMast.getStaNo(),1,3); |
| | | basArmMastService.updateArmMastStatus(param.getArm_no(),basArmMast.getSortingLine(),basArmMast.getStaNo(),2,3); |
| | | } |
| | | |
| | | @Override |
| | |
| | | .eq("status", 5) |
| | | ); |
| | | if (!Cools.isEmpty(basArmMast)){ |
| | | basArmMastService.updateArmMastStatus(param.getArm_no(),basArmMast.getSortingLine(), 5,6); |
| | | basArmMastService.updateArmMastStatus(param.getArm_no(),basArmMast.getSortingLine(),basArmMast.getStaNo(), 5,6); |
| | | } |
| | | } |
| | | |
| | |
| | | if (param == null) { |
| | | throw new CoolException("参数不能为空"); |
| | | } |
| | | Integer devpId = 1; |
| | | // 创建对象(构造函数中已生成 timestamp) |
| | | BasAgvMast basAgvMast = new BasAgvMast(); |
| | | // 生成 WMS 任务号(如无外部传入,可以使用雪花ID 或自增) |
| | |
| | | basAgvMast.setAppeTime(new Date()); // 添加时间 |
| | | basAgvMast.setModiTime(new Date()); // 修改时间 |
| | | basAgvMast.setIoType(param.getIoType());// 任务类型 |
| | | basAgvMast.setDevpId(devpId); |
| | | basAgvMast.setFloorNo(param.getFloorNo()); //楼层 |
| | | |
| | | // 插入数据库 |
| | | basAgvMastService.insert(basAgvMast); |
| | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | @Transactional |
| | | public boolean agvApplicationPassedTheGrating(ArmAgvGratingParam arm) { |
| | | ReturnT<String> result = new PostMesDataUtils().postMesDataArmGrating("光栅请求下发:", ArmConstant.getArmUrl(arm.getArmNo()), ArmConstant.ARM_ADAPTOR_GRATING_AGVENTER, arm); |
| | | if (result.getCode()==200){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | } |