Browse Source

回传mes加参数

master
DESKTOP-5DIJMF9\admin 3 months ago
parent
commit
1d1082b4f9
  1. 13
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java
  2. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/GeneralDefinition.java
  3. 9
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLRKTask.java

13
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java

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

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/GeneralDefinition.java

@ -67,6 +67,8 @@ public class GeneralDefinition {
// 参数名称
/** 是否连接 */
public static final String IS_CONNECT_ACS = "is_connect_acs";
/** 是否连接 */
public static final String IS_RETURN_MES = "is_return_mes";
/** ACS路径 */
public static final String ACS_URL = "acs_url";
/** 是否连接 */

9
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLRKTask.java

@ -9,6 +9,8 @@ import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import lombok.extern.slf4j.Slf4j;
import org.nl.common.exception.BadRequestException;
import org.nl.wms.ext.service.dto.to.BaseResponse;
@ -35,6 +37,7 @@ import org.nl.wms.sch.task_manage.enums.GroupStatusEnum;
import org.nl.wms.sch.task_manage.task.TaskType;
import org.nl.wms.sch.task_manage.task.core.TaskStatus;
import org.nl.wms.sch.task_manage.task.tasks.mapper.PointMapper;
import org.nl.wms.sch.workorder.service.dao.Workorder;
import org.nl.wms.util.PointUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
@ -293,6 +296,12 @@ public class YCLRKTask extends AbstractTask {
.body(JSON.toJSONString(qpmes062Request))
.execute().body();
log.info("QPMES062服务调用成功,反馈{}",resultMsg);
//更新接口表
UpdateWrapper<Material> updateWrapper = new UpdateWrapper<>();
updateWrapper.eq("PalletSN",taskObj.getVehicle_code2());
updateWrapper.eq("group_bind_material_status",GroupBindMaterialStatusEnum.BOUND.getValue());
updateWrapper.set("group_bind_material_status",GroupBindMaterialStatusEnum.UNBOUND.getValue());
materialMapper.update(null,updateWrapper);
}else{
log.error("当前子托盘:"+taskObj.getVehicle_code2()+"不存在未解绑的物料信息,请确认!");
}

Loading…
Cancel
Save