Browse Source

rev RGV日志,拆垛入库携带条码

master
周俊杰 1 year ago
parent
commit
96ff1a585e
  1. 10
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator_site/LnshPalletizingManipulatorSiteDeviceDriver.java
  2. 9
      acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java
  3. 39
      acs/nladmin-system/src/main/resources/log/LnshRGVDeviceDriver.xml

10
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator_site/LnshPalletizingManipulatorSiteDeviceDriver.java

@ -826,6 +826,7 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("apply_take_empty_vehicle") + "apply_take_empty_vehicle 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
@ -848,7 +849,8 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
/**
* 申请取走满料盅托盘
* 入库
*
*
* @param
*/
@ -904,8 +906,8 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
dto.setLogType(LogTypeEnum.DEVICE_LOG.getDesc());
dto.setRemark(JSON.toJSONString(request));
lucene.deviceExecuteLog(dto);
// lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
// log.info("{}",JSON.toJSONString(dto));
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
log.info("{}",JSON.toJSONString(dto));
// log.info("{}",JSON.toJSONString(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request))));
if (resp.getCode() == 200) {
@ -928,7 +930,7 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
}
/**
* 申请强制取走满料盅托盘
* 强制入库
*
* @param
*/

9
acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java

@ -10,7 +10,6 @@ import lombok.extern.slf4j.Slf4j;
import org.nl.acs.agv.AgvUtil;
import org.nl.acs.config.AcsConfig;
import org.nl.acs.device.service.DeviceService;
import org.nl.acs.device_driver.DeviceDriver;
import org.nl.acs.device_driver.basedriver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver;
import org.nl.acs.device_driver.lnsh.lnsh_Laminating_machine.ItemProtocol;
import org.nl.acs.device_driver.lnsh.lnsh_Laminating_machine.LnshLaminatingMachineDeviceDriver;
@ -30,7 +29,6 @@ import org.nl.acs.device_driver.lnsh.lnsh_rgv.LnshRGVDeviceDriver;
import org.nl.acs.device_driver.lnsh.lnsh_split_manipulator.LnshSplitManipulatorDeviceDriver;
import org.nl.acs.device_driver.lnsh.lnsh_station.LnshStationDeviceDriver;
import org.nl.acs.device_driver.standard_autodoor.StandardAutodoorDeviceDriver;
import org.nl.acs.ext.wms.data.AcsToWmsData.grab_place_station.GrabPlaceStationResponse;
import org.nl.acs.ext.wms.data.WmstoAcsData.createOrder.CreateOrderRequest;
import org.nl.acs.ext.wms.data.WmstoAcsData.createOrder.CreateOrderResponse;
import org.nl.acs.ext.wms.data.WmstoAcsData.createOrder.OrderDto;
@ -45,7 +43,6 @@ import org.nl.acs.instruction.service.dto.Instruction;
import org.nl.acs.opc.Device;
import org.nl.acs.opc.DeviceAppService;
import org.nl.acs.order.service.ProduceshiftorderService;
import org.nl.acs.order.service.dto.ProduceshiftorderDto;
import org.nl.acs.route.service.RouteLineService;
import org.nl.acs.route.service.dto.RouteLineDto;
import org.nl.acs.task.service.TaskService;
@ -82,10 +79,12 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
private String log_type = "WMS下发ACS";
@Override
public JSONObject createFromWms(JSONObject req) {
public JSONObject
createFromWms(JSONObject req) {
try {
MDC.put(log_file_type, log_type);
CreateTaskRequest tasks = JSON.toJavaObject(req, CreateTaskRequest.class);
log.info("LMS下发参数{}",tasks);
JSONObject resultJson = new JSONObject();
CreateTaskResponse resp = new CreateTaskResponse();
log.info("createFromWms - 请求参数 {}", JSON.toJSON(resp));
@ -116,6 +115,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
String next_parent_code = "";
//困料区需要方向
String direction=task.getDirection();
String put_device_code=task.getPut_device_code();
JSONObject start_device_json = WQLObject.getWQLObject("acs_storage_cell").query("parent_storage_code ='" + start_point_code + "'").uniqueResult(0);
if (!ObjectUtil.isEmpty(start_device_json)) {
@ -229,6 +229,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
jo.put("params", params);
jo.put("task_type", StrUtil.isEmpty(task_type) ? 1 : Integer.parseInt(task_type));
jo.put("direction",direction);
jo.put("put_device_code",put_device_code);
// 如果是无光电的设备 指令完成变更起点、终点状态
JSONObject startjo = new JSONObject();
startjo.put("device_code", start_device_code);

39
acs/nladmin-system/src/main/resources/log/LnshRGVDeviceDriver.xml

@ -1,14 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<included>
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/>
<property name="LOG_HOME" value="${logPath}"/>
<!-- 按照每天生成日志文件 -->
<appender name="LnshRGVDeviceDriver" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/RGV日志/%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
<!--单个日志最大容量 至少10MB才能看得出来-->
<maxFileSize>200MB</maxFileSize>
<!--所有日志最多占多大容量-->
<totalSizeCap>2GB</totalSizeCap>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
<charset>${log.charset}</charset>
</encoder>
<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
</appender>
<AnchorPane xmlns="http://javafx.com/javafx"
xmlns:fx="http://javafx.com/fxml"
fx:controller="$CONTROLLER_NAME$"
prefHeight="400.0" prefWidth="600.0">
<!-- <logger name="org.nl.start.Init" level="info" additivity="false">
<appender-ref ref="FILE3"/>
</logger>-->
</AnchorPane>
<!-- 打印sql -->
<logger name="org.nl.acs.device_driver.lnsh.lnsh_rgv.LnshRGVDeviceDriver" level="info" additivity="false">
<appender-ref ref="LnshRGVDeviceDriver"/>
</logger>
</included>

Loading…
Cancel
Save