rev:注释不必要的日志记录
This commit is contained in:
@@ -245,7 +245,6 @@ public class NDCAgvServiceImpl implements NDCAgvService {
|
||||
|
||||
};
|
||||
log.info("下发AGV充电任务--{}", str1);
|
||||
|
||||
try{
|
||||
OneNDCSocketConnectionAutoRun.write(b);
|
||||
} catch (Exception e){
|
||||
|
||||
@@ -14,11 +14,11 @@ import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.instruction.service.impl.InstructionServiceImpl;
|
||||
import org.nl.acs.log.service.DeviceExecuteLogService;
|
||||
import org.nl.acs.opc.DeviceAppService;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
import org.nl.system.service.dict.ISysDictService;
|
||||
import org.nl.system.service.dict.dao.Dict;
|
||||
import org.nl.system.service.lucene.LuceneExecuteLogService;
|
||||
import org.nl.system.service.param.ISysParamService;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
import org.nl.system.service.param.impl.SysParamServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
@@ -187,45 +187,33 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
//任务删除确认
|
||||
//(需要WCS反馈)
|
||||
else if (phase == 0xFF) {
|
||||
|
||||
if (!ObjectUtil.isEmpty(inst)) {
|
||||
if (!ObjectUtil.isEmpty(inst)) {
|
||||
instructionService.cancelNOSendAgv(inst.getInstruction_id());
|
||||
}
|
||||
}
|
||||
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0);
|
||||
|
||||
//充电任务下发成功上报
|
||||
}else if (phase == 0x64){
|
||||
log.info("AGV车号{}反馈充电任务下发成功,锁定充电桩{}",agvaddr,station);
|
||||
List<Dict> dictList= dictService.getDictByName("station");
|
||||
for(Dict dict : dictList){
|
||||
if (Integer.parseInt(dict.getPara1())==station){
|
||||
} else if (phase == 0x64) {
|
||||
log.info("充电任务,NDC反馈phase值64,AGV车号{}充电任务下发成功,锁定充电桩{}", agvaddr, station);
|
||||
List<Dict> dictList = dictService.getDictByName("station");
|
||||
for (Dict dict : dictList) {
|
||||
if (Integer.parseInt(dict.getPara1()) == station) {
|
||||
dict.setValue("1");
|
||||
dict.setPara2(String.valueOf(agvaddr));
|
||||
dictService.updateDetail(dict);
|
||||
break;
|
||||
}
|
||||
}
|
||||
//充电成功
|
||||
}else if (phase == 0x65){
|
||||
log.info("AGV车号{}反馈充电中,充电桩{}",agvaddr,station);
|
||||
// log.info("AGV车号{}反馈充电成功,释放充电桩{}",agvaddr,station);
|
||||
// List<Dict> dictList= dictService.getDictByName("station");
|
||||
// for(Dict dict : dictList){
|
||||
// if (Integer.parseInt(dict.getPara1())==station){
|
||||
// dict.setValue("0");
|
||||
// dict.setPara2("");
|
||||
// dictService.updateDetail(dict);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//充电中
|
||||
} else if (phase == 0x65) {
|
||||
log.info("充电任务,NDC反馈phase值65,AGV车号{}状态为正在充电中,占用充电桩{}值为1", agvaddr, station);
|
||||
//充电取消上报
|
||||
}else if (phase == 0x66){
|
||||
log.info("AGV车号{}反馈充电任务已取消,释放充电桩{}",agvaddr,station);
|
||||
List<Dict> dictList= dictService.getDictByName("station");
|
||||
for(Dict dict : dictList){
|
||||
if (Integer.parseInt(dict.getPara1())==station){
|
||||
} else if (phase == 0x66) {
|
||||
log.info("充电任务,NDC反馈phase值66,AGV车号{}充电任务完成或已手动取消,释放充电桩{}值为0", agvaddr, station);
|
||||
List<Dict> dictList = dictService.getDictByName("station");
|
||||
for (Dict dict : dictList) {
|
||||
if (Integer.parseInt(dict.getPara1()) == station) {
|
||||
dict.setValue("0");
|
||||
dict.setPara2("");
|
||||
dictService.updateDetail(dict);
|
||||
@@ -235,8 +223,8 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
} else {
|
||||
//上报异常信息
|
||||
//(不需要WCS反馈)
|
||||
if (phase == 0x67 ||phase == 0x70 || phase == 0x71 || phase == 0x72 || phase == 0x73 || phase == 0x74) {
|
||||
device = deviceAppService.findDeviceByCode("AGV0" +agvaddr);
|
||||
if (phase == 0x67 || phase == 0x70 || phase == 0x71 || phase == 0x72 || phase == 0x73 || phase == 0x74) {
|
||||
device = deviceAppService.findDeviceByCode("AGV0" + agvaddr);
|
||||
} else {
|
||||
device = deviceAppService.findDeviceByCode("AGV0" + Integer.toString(arr[20]));
|
||||
}
|
||||
|
||||
@@ -324,28 +324,15 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
SiteDeviceDriver siteDeviceDriver = (SiteDeviceDriver) device.getDeviceDriver();
|
||||
try {
|
||||
siteDeviceDriver.writing(12);
|
||||
siteDeviceDriver.writing(12);
|
||||
siteDeviceDriver.writing(12);
|
||||
siteDeviceDriver.writing(12);
|
||||
siteDeviceDriver.writing(12);
|
||||
siteDeviceDriver.writing(12);
|
||||
siteDeviceDriver.writing(12);
|
||||
siteDeviceDriver.writing(12);
|
||||
siteDeviceDriver.writing(12);
|
||||
siteDeviceDriver.writing(12);
|
||||
log.error("tofix子母车放货完成,离开,写入{}输送线信号:12成功!", siteDeviceDriver.getDeviceCode());
|
||||
log.error("子母车放货完成,离开,写入{}输送线信号:12成功!", siteDeviceDriver.getDeviceCode());
|
||||
} catch (Exception e) {
|
||||
for (int i = 0; i < 15; i++) {
|
||||
try {
|
||||
siteDeviceDriver.writing(12);
|
||||
siteDeviceDriver.writing(12);
|
||||
siteDeviceDriver.writing(12);
|
||||
siteDeviceDriver.writing(12);
|
||||
siteDeviceDriver.writing(12);
|
||||
log.error("tofix子母车放货完成,离开,写入{}输送线信号:12失败,再次写入,成功!{}{}", siteDeviceDriver.getDeviceCode(), e, e.getMessage());
|
||||
log.error("子母车放货完成,离开,写入{}输送线信号:12失败,再次写入,成功!{}{}", siteDeviceDriver.getDeviceCode(), e, e.getMessage());
|
||||
return;
|
||||
} catch (Exception e1) {
|
||||
log.error("tofix子母车放货完成,离开,写入{}输送线信号:12失败:{}{}", siteDeviceDriver.getDeviceCode(), e, e.getMessage());
|
||||
log.error("子母车放货完成,离开,写入{}输送线信号:12失败:{}{}", siteDeviceDriver.getDeviceCode(), e, e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -289,8 +289,6 @@ public class SiteDeviceDriver extends AbstractOpcDeviceDriver implements DeviceD
|
||||
public void writing(int command) {
|
||||
String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
||||
+ "." + ItemProtocol.item_to_command;
|
||||
//String opcservcerid = this.getDevice().getOpc_server_id();
|
||||
//Server server = ReadUtil.getServer(opcservcerid);
|
||||
Map<String, Object> itemMap = new HashMap<String, Object>();
|
||||
itemMap.put(to_command, command);
|
||||
this.control(itemMap);
|
||||
|
||||
@@ -6,10 +6,10 @@ spring:
|
||||
druid:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:stand_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:acs_xftn}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:stand_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true&useOldAliasMetadataBehavior=true
|
||||
username: ${DB_USER:root}
|
||||
# password: ${DB_PWD:Root.123456}
|
||||
# password: ${DB_PWD:Root.123456}
|
||||
password: ${DB_PWD:123456}
|
||||
# 初始连接数
|
||||
initial-size: 5
|
||||
@@ -72,8 +72,8 @@ spring:
|
||||
redis:
|
||||
#数据库索引
|
||||
database: ${REDIS_DB:2}
|
||||
# host: ${REDIS_HOST:10.44.101.19}
|
||||
host: ${REDIS_HOST:127.0.0.1}
|
||||
host: ${REDIS_HOST:10.44.101.19}
|
||||
# host: ${REDIS_HOST:127.0.0.1}
|
||||
port: ${REDIS_PORT:6379}
|
||||
# password: ${REDIS_PWD:}
|
||||
|
||||
@@ -166,13 +166,13 @@ sa-token:
|
||||
# ---- 除了以上配置项,你还需要为 Sa-Token 配置http请求处理器(文档有步骤说明)
|
||||
is-read-cookie: true
|
||||
is-print: false
|
||||
# 未登录 StpUtil.getTokenSession() 设置值,获取值 @SaIgnore 得忽略接口
|
||||
# 未登录 StpUtil.getTokenSession() 设置值,获取值 @SaIgnore 得忽略接口
|
||||
token-session-check-login: false
|
||||
alone-redis:
|
||||
# Redis数据库索引(默认为0)
|
||||
database: 2
|
||||
# Redis服务器地址
|
||||
host: 127.0.0.1
|
||||
host: 10.44.101.19
|
||||
# Redis服务器连接端口
|
||||
port: 6379
|
||||
# Redis服务器连接密码(默认为空)
|
||||
|
||||
@@ -2,7 +2,7 @@ spring:
|
||||
freemarker:
|
||||
check-template-location: false
|
||||
profiles:
|
||||
active: prod
|
||||
active: dev
|
||||
jackson:
|
||||
time-zone: GMT+8
|
||||
data:
|
||||
|
||||
@@ -22,10 +22,6 @@
|
||||
|
||||
</appender>
|
||||
|
||||
<!-- <logger name="org.nl.start.Init" level="info" additivity="false">
|
||||
<appender-ref ref="FILE3"/>
|
||||
</logger>-->
|
||||
|
||||
<!-- 打印sql -->
|
||||
<logger name="org.nl.acs.auto.run.OneNDCSocketConnectionAutoRun" level="info" additivity="false">
|
||||
<appender-ref ref="OneNDCSocketConnectionAutoRun"/>
|
||||
|
||||
@@ -1,23 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--配置说明:
|
||||
https://www.cnblogs.com/jybky/p/12204586.html
|
||||
https://blog.csdn.net/wzygis/article/details/103189490
|
||||
https://www.cnblogs.com/xrq730/p/8628945.html
|
||||
https://www.jianshu.com/p/af5a7bab0e59
|
||||
https://blog.csdn.net/wzygis/article/details/103189490
|
||||
https://juejin.cn/post/6844903775631572999
|
||||
-->
|
||||
|
||||
<configuration scan="true" scanPeriod="30 seconds" debug="false">
|
||||
<contextName>nlAdmin</contextName>
|
||||
<property name="log.charset" value="utf-8"/>
|
||||
<property name="log.pattern"
|
||||
value="%black(%contextName-) %red(%d{yyyy-MM-dd HH:mm:ss.SSS}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}) - %gray(%msg%n)"/>
|
||||
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/>
|
||||
<!-- <springProperty scope="context" name="lokiUrl" source="loki.url"/>-->
|
||||
<!-- <springProperty scope="context" name="systemName" source="loki.systemName"/>-->
|
||||
<!-- <property name="LOKI_URL" value="${lokiUrl}"/>-->
|
||||
<!-- <property name="SYSTEM_NAME" value="${systemName}"/>-->
|
||||
<property name="SYSTEM_NAME" value="acs"/>
|
||||
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
|
||||
<property name="LOG_HOME" value="${logPath}"/>
|
||||
<!--引入默认的一些设置-->
|
||||
@@ -25,6 +13,7 @@ https://juejin.cn/post/6844903775631572999
|
||||
<include resource="log/AcsToWms.xml"/>
|
||||
<include resource="log/WmsToAcs.xml"/>
|
||||
<include resource="log/NDCSocketConnectionAutoRun.xml"/>
|
||||
<include resource="log/OneNDCSocketConnectionAutoRun.xml"/>
|
||||
<include resource="log/AgvNdcOneDeviceDriver.xml"/>
|
||||
<include resource="log/NDCAgvServiceImpl.xml"/>
|
||||
|
||||
@@ -44,7 +33,7 @@ https://juejin.cn/post/6844903775631572999
|
||||
<!--日志文件保留天数-->
|
||||
<maxHistory>15</maxHistory>
|
||||
<!--单个日志最大容量 至少10MB才能看得出来-->
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
<maxFileSize>60MB</maxFileSize>
|
||||
<!--所有日志最多占多大容量-->
|
||||
<totalSizeCap>20GB</totalSizeCap>
|
||||
</rollingPolicy>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
window.g = {
|
||||
dev: {
|
||||
VUE_APP_BASE_API: 'http://127.0.0.1:8011'
|
||||
VUE_APP_BASE_API: 'http://127.0.0.1:8010'
|
||||
},
|
||||
prod: {
|
||||
VUE_APP_BASE_API: 'http://127.0.0.1:8011'
|
||||
VUE_APP_BASE_API: 'http://127.0.0.1:8010'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user