rev:代码更新

This commit is contained in:
ludj
2023-12-18 16:38:34 +08:00
parent 98e2b430bf
commit 45e68235c2
4 changed files with 23 additions and 21 deletions

View File

@@ -106,6 +106,7 @@ public class StructFindUtil {
.addParam("point_code", point_code). .addParam("point_code", point_code).
process().uniqueResult(0); process().uniqueResult(0);
} }
if (ObjectUtil.isEmpty(result)) throw new BadRequestException("工单或物料木托盘类型不对,请修改物料木托盘类型");
result.put("vehicle_type",vehicle_type); result.put("vehicle_type",vehicle_type);
return result; return result;
} }

View File

@@ -299,7 +299,17 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
if (ObjectUtil.isEmpty(produceInfoByCode)) { if (ObjectUtil.isEmpty(produceInfoByCode)) {
throw new BadRequestException("未找到点位为'" + device_code + "'对应机械手的生产工单!"); throw new BadRequestException("未找到点位为'" + device_code + "'对应机械手的生产工单!");
} }
jsonObject.put("vehicle_type", produceInfoByCode.getString("vehicle_type")); jsonObject.put("vehicle_type", produceInfoByCode.getString("vehicle_type"));
//分拣找木托盘时候,工单上木托盘类型为空的时候从物料上取
material_id = produceInfoByCode.getString("material_id");
if (StrUtil.isNotEmpty(material_id) && "0".equals(jsonObject.get("vehicle_type"))){
materialObj = WQLObject.getWQLObject("MD_ME_Material").query("material_id='" + material_id + "'").uniqueResult(0);
jsonObject.put("vehicle_type", materialObj.getString("vehicle_type"));
System.out.println();
}
// 需要更新堆叠位的点位状态 // 需要更新堆叠位的点位状态
JSONArray pointarr = WQL.getWO("ACSTOMES_001").addParam("point_code", "KTPDDW5").addParam("flag", "4").process().getResultJSONArray(0); JSONArray pointarr = WQL.getWO("ACSTOMES_001").addParam("point_code", "KTPDDW5").addParam("flag", "4").process().getResultJSONArray(0);
PointUpdateUtil.updatePoint(pointarr); PointUpdateUtil.updatePoint(pointarr);

View File

@@ -1,51 +1,43 @@
package org.nl.wms.pdm.service.impl; package org.nl.wms.pdm.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.map.MapUtil; import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.hutool.poi.excel.ExcelReader; import cn.hutool.poi.excel.ExcelReader;
import cn.hutool.poi.excel.ExcelUtil; import cn.hutool.poi.excel.ExcelUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.fasterxml.jackson.annotation.JsonAlias; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.common.utils.UserInfoUtil;
import org.nl.exception.BadRequestException; import org.nl.exception.BadRequestException;
import org.nl.modules.system.util.CodeUtil; import org.nl.modules.system.util.CodeUtil;
import org.nl.utils.SpringContextHolder; import org.nl.utils.SpringContextHolder;
import org.nl.wms.ext.acs.service.AcsToWmsService;
import org.nl.wms.ext.acs.service.WmsToAcsService; import org.nl.wms.ext.acs.service.WmsToAcsService;
import org.nl.wms.ext.acs.service.impl.WmsToJnServiceImpl; import org.nl.wms.ext.acs.service.impl.WmsToJnServiceImpl;
import org.nl.wms.pdm.service.DeviceService; import org.nl.wms.pdm.service.DeviceService;
import org.nl.wms.pdm.service.ProducetaskService; import org.nl.wms.pdm.service.ProducetaskService;
import org.nl.wms.pdm.service.dto.DeviceDto; import org.nl.wms.pdm.service.dto.DeviceDto;
import org.nl.wms.pdm.service.dto.ProducetaskDto; import org.nl.wms.pdm.service.dto.ProducetaskDto;
import org.nl.wms.sch.AcsUtil;
import org.nl.wql.WQL; import org.nl.wql.WQL;
import org.nl.wql.core.bean.WQLObject;
import org.nl.wql.util.WqlUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.data.domain.Pageable; import javax.servlet.http.HttpServletRequest;
import java.io.InputStream; import java.io.InputStream;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.nl.common.utils.UserInfoUtil;
import org.nl.wql.core.bean.ResultBean;
import org.nl.wql.core.bean.WQLObject;
import org.nl.wql.util.WqlUtil;
import lombok.extern.slf4j.Slf4j;
import cn.hutool.core.util.ObjectUtil;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
/** /**
* @author geng by * @author geng by
* @description 服务实现 * @description 服务实现

View File

@@ -206,7 +206,6 @@ public class CallEmptyVehicleTask extends AbstractAcsTask {
JSONObject produceObj = WQLObject.getWQLObject("PDM_MG_produceTask").query("device_id='" + device_id + "' and producetask_status in('02','03','04')").uniqueResult(0); JSONObject produceObj = WQLObject.getWQLObject("PDM_MG_produceTask").query("device_id='" + device_id + "' and producetask_status in('02','03','04')").uniqueResult(0);
if (ObjectUtil.isEmpty(produceObj)) if (ObjectUtil.isEmpty(produceObj))
throw new BadRequestException("设备未设置工单或者工单状态不正确请检查LMS设备工单状态!"); throw new BadRequestException("设备未设置工单或者工单状态不正确请检查LMS设备工单状态!");
vehicle_type = produceObj.getString("vehicle_type");
start_area = AreaEnum.MTPQ.getCode(); start_area = AreaEnum.MTPQ.getCode();
is_auto_issue = "0"; is_auto_issue = "0";
break; break;