|
@ -6,7 +6,11 @@ import com.alibaba.fastjson.JSONObject; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import org.nl.common.exception.BadRequestException; |
|
|
import org.nl.common.exception.BadRequestException; |
|
|
import org.nl.common.utils.SecurityUtils; |
|
|
import org.nl.common.utils.SecurityUtils; |
|
|
|
|
|
import org.nl.config.SpringContextHolder; |
|
|
|
|
|
import org.nl.system.service.param.dao.Param; |
|
|
|
|
|
import org.nl.system.service.param.impl.SysParamServiceImpl; |
|
|
import org.nl.wms.ext.service.dto.to.BaseResponse; |
|
|
import org.nl.wms.ext.service.dto.to.BaseResponse; |
|
|
|
|
|
import org.nl.wms.ext.service.dto.to.wms.AcsResponse; |
|
|
import org.nl.wms.sch.material.service.dao.Material; |
|
|
import org.nl.wms.sch.material.service.dao.Material; |
|
|
import org.nl.wms.sch.material.service.dao.mapper.MaterialMapper; |
|
|
import org.nl.wms.sch.material.service.dao.mapper.MaterialMapper; |
|
|
import org.nl.wms.sch.point.service.ISchBasePointService; |
|
|
import org.nl.wms.sch.point.service.ISchBasePointService; |
|
@ -180,15 +184,24 @@ public abstract class AbstractTask { |
|
|
Assert.notNull(taskConfig, "找不到配置文件,请确认[" + config_code + "]配置是否存在!"); |
|
|
Assert.notNull(taskConfig, "找不到配置文件,请确认[" + config_code + "]配置是否存在!"); |
|
|
//输送线相关任务不做处理
|
|
|
//输送线相关任务不做处理
|
|
|
if(apply_point_code.startsWith("SSX")){ |
|
|
if(apply_point_code.startsWith("SSX")){ |
|
|
//输送线入库任务,校验入库单是否存在载具号
|
|
|
SysParamServiceImpl sysParamService = SpringContextHolder.getBean(SysParamServiceImpl.class); |
|
|
if("YCLRKTask".equals(config_code)){ |
|
|
//判断是否回传mes
|
|
|
//组盘表需要关联外部mes晶棒数据,一对多
|
|
|
Param isConnectAcs = sysParamService.findByCode(GeneralDefinition.IS_RETURN_MES); |
|
|
LambdaQueryWrapper<Material> wrapper = new LambdaQueryWrapper<>(); |
|
|
if (ObjectUtil.isEmpty(isConnectAcs)) { |
|
|
wrapper.eq(Material::getPalletSN,sub_tray); |
|
|
Assert.notNull(taskConfig, "找不到配置文件,请确认系统参数[is_return_mes]配置是否存在!"); |
|
|
wrapper.eq(Material::getGroup_bind_material_status, GroupBindMaterialStatusEnum.BOUND.getValue()); |
|
|
} |
|
|
Integer list_size = materialMapper.selectCount(wrapper); |
|
|
String isReturn = isConnectAcs.getValue(); |
|
|
Assert.isFalse(list_size<=0, |
|
|
if("1".equals(isReturn)){ |
|
|
"该任务申请子托盘["+sub_tray+"]异常,无原材料入库单据信息!"); |
|
|
//输送线入库任务,校验入库单是否存在载具号
|
|
|
|
|
|
if("YCLRKTask".equals(config_code)){ |
|
|
|
|
|
//组盘表需要关联外部mes晶棒数据,一对多
|
|
|
|
|
|
LambdaQueryWrapper<Material> wrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
|
wrapper.eq(Material::getPalletSN,sub_tray); |
|
|
|
|
|
wrapper.eq(Material::getGroup_bind_material_status, GroupBindMaterialStatusEnum.BOUND.getValue()); |
|
|
|
|
|
Integer list_size = materialMapper.selectCount(wrapper); |
|
|
|
|
|
Assert.isFalse(list_size<=0, |
|
|
|
|
|
"该任务申请子托盘["+sub_tray+"]异常,无原材料入库单据信息!"); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}else{ |
|
|
}else{ |
|
|
//判断该申请点位是否存在起点或终点的未完成任务
|
|
|
//判断该申请点位是否存在起点或终点的未完成任务
|
|
|