|
|
|
@ -10,6 +10,7 @@ import com.shkj.common.utils.DateUtils; |
|
|
|
import com.shkj.common.utils.SecurityUtils; |
|
|
|
import com.shkj.common.utils.SecurityUtils; |
|
|
|
import com.shkj.common.utils.StringUtils; |
|
|
|
import com.shkj.common.utils.StringUtils; |
|
|
|
import com.shkj.system.service.ISysParameterService; |
|
|
|
import com.shkj.system.service.ISysParameterService; |
|
|
|
|
|
|
|
import com.shkj.wms.bo.AssingEmptyLocBo; |
|
|
|
import com.shkj.wms.bo.BasePointDeviceQueryBo; |
|
|
|
import com.shkj.wms.bo.BasePointDeviceQueryBo; |
|
|
|
import com.shkj.wms.domain.*; |
|
|
|
import com.shkj.wms.domain.*; |
|
|
|
import com.shkj.wms.enums.TaskStatusEnum; |
|
|
|
import com.shkj.wms.enums.TaskStatusEnum; |
|
|
|
@ -75,6 +76,9 @@ public class IBusinContainerUpkeepServiceImpl extends ServiceImpl<BusinContainer |
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
BaseContainerMapper baseContainerMapper; |
|
|
|
BaseContainerMapper baseContainerMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
IBaseLocationService iBaseLocationService; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public List<BusinContainerUpkeepVo> getContainerUpkeepDate(BusinContainerUpkeepQueryBo bo) { |
|
|
|
public List<BusinContainerUpkeepVo> getContainerUpkeepDate(BusinContainerUpkeepQueryBo bo) { |
|
|
|
//治具保养周期
|
|
|
|
//治具保养周期
|
|
|
|
@ -90,6 +94,8 @@ public class IBusinContainerUpkeepServiceImpl extends ServiceImpl<BusinContainer |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Result<Boolean> saveBusintContainerUpkeepEnd(BusinContainerUpkeepAddBo bo) { |
|
|
|
public Result<Boolean> saveBusintContainerUpkeepEnd(BusinContainerUpkeepAddBo bo) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
log.info("治具入库参数:"+JsonUtil.toJSONString(bo)); |
|
|
|
|
|
|
|
|
|
|
|
//更新保养的记录,新增
|
|
|
|
//更新保养的记录,新增
|
|
|
|
BusinContainerUpkeep businContainerUpkeep = this.baseMapper.selectById(bo.getId()); |
|
|
|
BusinContainerUpkeep businContainerUpkeep = this.baseMapper.selectById(bo.getId()); |
|
|
|
if(businContainerUpkeep != null){ |
|
|
|
if(businContainerUpkeep != null){ |
|
|
|
@ -134,12 +140,27 @@ public class IBusinContainerUpkeepServiceImpl extends ServiceImpl<BusinContainer |
|
|
|
//TODO 呼叫AGV,判断任务是否有需要空治具的任务,如果有,则送达
|
|
|
|
//TODO 呼叫AGV,判断任务是否有需要空治具的任务,如果有,则送达
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map map = iBusinEnptyContainerServiceImpl.checkWareForEmptycon(); |
|
|
|
// Map map = iBusinEnptyContainerServiceImpl.checkWareForEmptycon();
|
|
|
|
if(ObjectUtils.isEmpty(map)){ |
|
|
|
|
|
|
|
|
|
|
|
AssingEmptyLocBo emptyLocBo =null; |
|
|
|
|
|
|
|
Result<BaseLocationVo> locationVoResult=iBaseLocationService.assignEmptyLocationAll(emptyLocBo); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!Result.isOk(locationVoResult)){ |
|
|
|
return Result.err().msg("暂无空治具存放区域"); |
|
|
|
return Result.err().msg("暂无空治具存放区域"); |
|
|
|
} |
|
|
|
} |
|
|
|
BasePointDeviceVo pointDeviceVo = BeanUtil.toBean(map.get("basePointDeviceVo"),BasePointDeviceVo.class); |
|
|
|
|
|
|
|
BaseLocationVo locationVo = BeanUtil.toBean(map.get("locationVo"), BaseLocationVo.class); |
|
|
|
BasePointDeviceVo pointDeviceVo = null; |
|
|
|
|
|
|
|
BaseLocationVo locationVo =locationVoResult.getData(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BasePointDeviceQueryBo pointDeviceQueryBo = new BasePointDeviceQueryBo(); |
|
|
|
|
|
|
|
pointDeviceQueryBo.setTunnel(locationVo.getTunnel()); |
|
|
|
|
|
|
|
pointDeviceQueryBo.setDirection("0"); |
|
|
|
|
|
|
|
List<BasePointDeviceVo> basePointDeviceVos = baseLocationPlcMapper.selectBasePointByGroupno(pointDeviceQueryBo); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (basePointDeviceVos.size() > 0) { |
|
|
|
|
|
|
|
pointDeviceVo = basePointDeviceVos.get(0); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
String agvType= String.valueOf(RCSTaskTypeEnum.A_TO_B_HAND_PUT.getValue()); |
|
|
|
String agvType= String.valueOf(RCSTaskTypeEnum.A_TO_B_HAND_PUT.getValue()); |
|
|
|
String toPpoint = pointDeviceVo.getPointNo(); |
|
|
|
String toPpoint = pointDeviceVo.getPointNo(); |
|
|
|
Long dspPlcId =Long.valueOf(sysParameterService.selectConfigByKey(ParameterConstants.ParameterSystem.LK_plc_id)); |
|
|
|
Long dspPlcId =Long.valueOf(sysParameterService.selectConfigByKey(ParameterConstants.ParameterSystem.LK_plc_id)); |
|
|
|
@ -223,12 +244,12 @@ public class IBusinContainerUpkeepServiceImpl extends ServiceImpl<BusinContainer |
|
|
|
// BasePoint basePoint1 = basePointService.selectBasePointByPointNo(pointDevice.getPointNo());
|
|
|
|
// BasePoint basePoint1 = basePointService.selectBasePointByPointNo(pointDevice.getPointNo());
|
|
|
|
// basePoint1.setIsOccupy("0");
|
|
|
|
// basePoint1.setIsOccupy("0");
|
|
|
|
// basePointService.updateById(basePoint1);
|
|
|
|
// basePointService.updateById(basePoint1);
|
|
|
|
|
|
|
|
//取货完成后,不释放码头空闲状态,待AGV取货后,进行释放
|
|
|
|
BasePoint basePoint = new BasePoint(); |
|
|
|
/* BasePoint basePoint = new BasePoint(); |
|
|
|
basePoint.setPointNo(bo.getPointNo()); |
|
|
|
basePoint.setPointNo(bo.getPointNo()); |
|
|
|
basePoint = iBasePointService.selectBasePoint(basePoint); |
|
|
|
basePoint = iBasePointService.selectBasePoint(basePoint); |
|
|
|
basePoint.setIsOccupy("0"); |
|
|
|
basePoint.setIsOccupy("0"); |
|
|
|
iBasePointService.updateById(basePoint); |
|
|
|
iBasePointService.updateById(basePoint);*/ |
|
|
|
//更新货位状态为已分配
|
|
|
|
//更新货位状态为已分配
|
|
|
|
if (locationVo!=null){ |
|
|
|
if (locationVo!=null){ |
|
|
|
BaseLocation baseLocation = BeanUtil.toBean(locationVo,BaseLocation.class); |
|
|
|
BaseLocation baseLocation = BeanUtil.toBean(locationVo,BaseLocation.class); |
|
|
|
|