Browse Source

opt:提取mes请求url为系统参数,可配置

master
DESKTOP-5DIJMF9\admin 3 months ago
parent
commit
16c5db066d
  1. 4
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java
  2. 4
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/POINTTask.java
  3. 10
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLCKTask.java
  4. 3
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLRKTask.java

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

@ -202,9 +202,7 @@ public abstract class AbstractTask {
} }
//判断是否校验mes组盘记录 //判断是否校验mes组盘记录
Param isConnectAcs = paramService.findByCode(GeneralDefinition.IS_RETURN_MES); Param isConnectAcs = paramService.findByCode(GeneralDefinition.IS_RETURN_MES);
if (ObjectUtil.isEmpty(isConnectAcs)) { Assert.notNull(isConnectAcs, "找不到配置文件,请确认系统参数[is_return_mes]配置是否存在!");
Assert.notNull(taskConfig, "找不到配置文件,请确认系统参数[is_return_mes]配置是否存在!");
}
String isReturn = isConnectAcs.getValue(); String isReturn = isConnectAcs.getValue();
if("1".equals(isReturn)){ if("1".equals(isReturn)){
//若不是缓存区托盘,校验mes接口组盘记录 //若不是缓存区托盘,校验mes接口组盘记录

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

@ -87,9 +87,7 @@ public class POINTTask extends AbstractTask {
if(task.getPoint_code2().startsWith("DKT")){ if(task.getPoint_code2().startsWith("DKT")){
//判断叠盘机最大叠盘数量 //判断叠盘机最大叠盘数量
Param max_dkt_qty = paramService.findByCode(GeneralDefinition.MAX_DKT_QTY); Param max_dkt_qty = paramService.findByCode(GeneralDefinition.MAX_DKT_QTY);
if (ObjectUtil.isEmpty(max_dkt_qty)) { Assert.notNull(max_dkt_qty, "找不到配置文件,请确认系统参数[max_dkt_qty]配置是否存在!");
Assert.notNull(taskConfig, "找不到配置文件,请确认系统参数[max_dkt_qty]配置是否存在!");
}
Integer max_qty = Integer.valueOf(max_dkt_qty.getValue()); Integer max_qty = Integer.valueOf(max_dkt_qty.getValue());
//如果是叠盘位,根据当前数量+1为目标地址 //如果是叠盘位,根据当前数量+1为目标地址
int qty=nextSchBasePoint.getVehicle_qty()+1; int qty=nextSchBasePoint.getVehicle_qty()+1;

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

@ -3,6 +3,7 @@ package org.nl.wms.sch.task_manage.task.tasks;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateTime; import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.http.HttpRequest; import cn.hutool.http.HttpRequest;
@ -12,6 +13,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.nl.common.exception.BadRequestException; import org.nl.common.exception.BadRequestException;
import org.nl.system.service.param.ISysParamService;
import org.nl.system.service.param.dao.Param;
import org.nl.wms.ext.service.dto.to.BaseResponse; import org.nl.wms.ext.service.dto.to.BaseResponse;
import org.nl.wms.mes.domain.Head; import org.nl.wms.mes.domain.Head;
import org.nl.wms.mes.domain.QPMES065Request; import org.nl.wms.mes.domain.QPMES065Request;
@ -77,6 +80,8 @@ public class YCLCKTask extends AbstractTask {
private MaterialMapper materialMapper; private MaterialMapper materialMapper;
@Autowired @Autowired
private MaterialDataMapper materialDataMapper; private MaterialDataMapper materialDataMapper;
@Autowired
private ISysParamService paramService;
@Override @Override
@ -294,7 +299,10 @@ public class YCLCKTask extends AbstractTask {
try { try {
if (ObjectUtil.isNotEmpty(materialList)) { if (ObjectUtil.isNotEmpty(materialList)) {
//自动化领料出库后经由AGV将出库信息同步至MES,从原材料库到回温库完成后自动调用 //自动化领料出库后经由AGV将出库信息同步至MES,从原材料库到回温库完成后自动调用
String url = "http://192.168.9.124/sitAppWebApi/PDSToWMS/Api/QPMES065"; //String url = "http://192.168.9.124/sitAppWebApi/PDSToWMS/Api/QPMES065";
Param mes_url = paramService.findByCode(GeneralDefinition.MES_URL);
Assert.notNull(mes_url, "找不到配置文件,请确认系统参数[mes_url]配置是否存在!");
String url = mes_url.getValue()+"QPMES065";
QPMES065Request qpmes065Request = new QPMES065Request(); QPMES065Request qpmes065Request = new QPMES065Request();
List<QPMES065RequestBody> qpmes065RequestBodyList=new ArrayList<>(); List<QPMES065RequestBody> qpmes065RequestBodyList=new ArrayList<>();
Head head=new Head(); Head head=new Head();

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

@ -3,6 +3,7 @@ package org.nl.wms.sch.task_manage.task.tasks;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateTime; import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.http.HttpRequest; import cn.hutool.http.HttpRequest;
@ -13,6 +14,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.nl.common.exception.BadRequestException; import org.nl.common.exception.BadRequestException;
import org.nl.system.service.param.dao.Param;
import org.nl.wms.ext.service.dto.to.BaseResponse; import org.nl.wms.ext.service.dto.to.BaseResponse;
import org.nl.wms.mes.domain.Head; import org.nl.wms.mes.domain.Head;
import org.nl.wms.mes.domain.QPMES062Request; import org.nl.wms.mes.domain.QPMES062Request;
@ -32,6 +34,7 @@ import org.nl.wms.sch.task.service.ISchBaseTaskconfigService;
import org.nl.wms.sch.task.service.dao.SchBaseTask; import org.nl.wms.sch.task.service.dao.SchBaseTask;
import org.nl.wms.sch.task.service.dao.SchBaseTaskconfig; import org.nl.wms.sch.task.service.dao.SchBaseTaskconfig;
import org.nl.wms.sch.task_manage.AbstractTask; import org.nl.wms.sch.task_manage.AbstractTask;
import org.nl.wms.sch.task_manage.GeneralDefinition;
import org.nl.wms.sch.task_manage.enums.GroupBindMaterialStatusEnum; import org.nl.wms.sch.task_manage.enums.GroupBindMaterialStatusEnum;
import org.nl.wms.sch.task_manage.enums.GroupStatusEnum; 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.TaskType;

Loading…
Cancel
Save