更新
This commit is contained in:
0
hd/logPath_IS_UNDEFINED/2022-08-17.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/2022-08-17.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/ACS请求ERP/2022-08-17.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/ACS请求ERP/2022-08-17.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/ACS请求WMS/2022-08-17.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/ACS请求WMS/2022-08-17.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/AGV请求离开/2022-08-17.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/AGV请求离开/2022-08-17.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/NDC/2022-08-17.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/NDC/2022-08-17.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/WMS下发ACS/2022-08-17.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/WMS下发ACS/2022-08-17.0.log
Normal file
2300
hd/logPath_IS_UNDEFINED/反馈AGV请求/2022-08-17.0.log
Normal file
2300
hd/logPath_IS_UNDEFINED/反馈AGV请求/2022-08-17.0.log
Normal file
File diff suppressed because it is too large
Load Diff
0
hd/logPath_IS_UNDEFINED/扫码记录/2022-08-17.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/扫码记录/2022-08-17.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/查询AGV指令状态/2022-08-17.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/查询AGV指令状态/2022-08-17.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/自动创建指令/2022-08-17.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/自动创建指令/2022-08-17.0.log
Normal file
@@ -1501,21 +1501,20 @@ public class AgvServiceImpl implements AgvService {
|
||||
jo.put("complete", true);
|
||||
jo.put("blocks", createBlocksData(inst));
|
||||
log.info("任务号:{},指令号{},下发agv订单序列参数:{}", inst.getTask_code(), inst.getInstruction_code(), jo.toString());
|
||||
logServer.log(inst.getTask_code(),"sendOrderSequencesToXZ","",jo.toString(),"", "","",inst.getVehicle_code());
|
||||
|
||||
if (StrUtil.equals(acsConfigService.findConfigFromCache().get(AcsConfig.FORKAGV).toString(), "1")) {
|
||||
String agvurl = acsConfigService.findConfigFromCache().get(AcsConfig.AGVURL);
|
||||
String agvport = acsConfigService.findConfigFromCache().get(AcsConfig.AGVPORT);
|
||||
|
||||
agvurl = agvurl + ":" + agvport + "/setOrder";
|
||||
|
||||
System.out.println("请求地址为:"+agvurl);
|
||||
HttpResponse result = HttpRequest.post(agvurl)
|
||||
.body(String.valueOf(jo))//表单内容
|
||||
.timeout(20000)//超时,毫秒
|
||||
.execute();
|
||||
System.out.println("返回结果为:"+result);
|
||||
log.info(agvurl);
|
||||
log.info("任务号:{},指令号{},状态{},下发agv订单序列反馈:{}", inst.getTask_code(), inst.getInstruction_code(), result.getStatus(), result.body());
|
||||
logServer.log(inst.getTask_code(),"sendOrderSequencesToXZ","info",jo.toString(),result.body(), String.valueOf(result.getStatus()),agvurl,inst.getVehicle_code());
|
||||
logServer.log(inst.getTask_code(),"sendOrderSequencesToXZ","info","",result.body(), String.valueOf(result.getStatus()),agvurl,inst.getVehicle_code());
|
||||
return result;
|
||||
} else {
|
||||
return null;
|
||||
|
||||
@@ -73,6 +73,7 @@ public class AbstractDriverService<T> implements DriverDeviceService {
|
||||
Method methodHasGoods = null;
|
||||
Method methodMaterial = null;
|
||||
Method methodBatch = null;
|
||||
Method methodMove = null;
|
||||
|
||||
if (StrUtil.isEmpty(hasGoodStatus)) {
|
||||
hasGoodStatus = "0";
|
||||
@@ -85,7 +86,13 @@ public class AbstractDriverService<T> implements DriverDeviceService {
|
||||
}
|
||||
|
||||
try {
|
||||
methodHasGoods = driverClass.getMethod("setHasGoods", Integer.class);
|
||||
methodHasGoods = driverClass.getMethod("setHasGoods", int.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
try {
|
||||
methodMove = driverClass.getMethod("setMove", int.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -115,7 +122,16 @@ public class AbstractDriverService<T> implements DriverDeviceService {
|
||||
|
||||
if (ObjectUtil.isNotEmpty(methodHasGoods)){
|
||||
try {
|
||||
methodHasGoods.invoke("setHasGoods",Integer.parseInt(hasGoodStatus));
|
||||
methodHasGoods.invoke(driver,Integer.parseInt(hasGoodStatus));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
if (ObjectUtil.isNotEmpty(methodMove)){
|
||||
try {
|
||||
int move = Integer.parseInt(hasGoodStatus);
|
||||
methodMove.invoke(driver,move);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -123,7 +139,7 @@ public class AbstractDriverService<T> implements DriverDeviceService {
|
||||
|
||||
if (ObjectUtil.isNotEmpty(methodMaterial)){
|
||||
try {
|
||||
methodMaterial.invoke("setMaterial",material_type);
|
||||
methodMaterial.invoke(driver,material_type);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -131,7 +147,7 @@ public class AbstractDriverService<T> implements DriverDeviceService {
|
||||
|
||||
if (ObjectUtil.isNotEmpty(methodBatch)){
|
||||
try {
|
||||
methodBatch.invoke("setBatch",batch);
|
||||
methodBatch.invoke(driver,batch);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
package org.nl.acs.common.aspect;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @author geng by
|
||||
*/
|
||||
@Target({ElementType.TYPE,ElementType.METHOD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
public @interface TaskAnnotation {
|
||||
String module() default "";
|
||||
String operator() default "";
|
||||
}
|
||||
@@ -1,203 +0,0 @@
|
||||
package org.nl.acs.common.aspect;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Pointcut;
|
||||
import org.aspectj.lang.reflect.MethodSignature;
|
||||
import org.nl.acs.task.service.TaskService;
|
||||
import org.nl.acs.task.service.dto.TaskDto;
|
||||
import org.nl.modules.system.util.CodeUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author geng by
|
||||
*/
|
||||
@Component
|
||||
@Aspect
|
||||
@Slf4j
|
||||
public class TaskAspect {
|
||||
|
||||
@Autowired
|
||||
TaskService taskserver;
|
||||
|
||||
@Pointcut("@annotation(org.nl.acs.common.aspect.TaskAnnotation)")
|
||||
public void pt() {
|
||||
}
|
||||
|
||||
//使用环绕通知.proceedingJoinPoint接口表示连接点,目标方法的对象
|
||||
@Around("pt()")
|
||||
public synchronized Object around(ProceedingJoinPoint pjp) {
|
||||
|
||||
MethodSignature signature = (MethodSignature) pjp.getSignature();
|
||||
|
||||
/*Method method = signature.getMethod();
|
||||
Class<?> targetDriverClass = method.getDeclaringClass();*/
|
||||
String res = null;
|
||||
Object[] args = pjp.getArgs();
|
||||
Object arg = args[0];
|
||||
Class<?> targetDriverClass = arg.getClass();
|
||||
Field instruction_apply_time = null;
|
||||
try {
|
||||
instruction_apply_time = targetDriverClass.getDeclaredField("instruction_apply_time");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
String instruction_apply_timeName = null;
|
||||
if (ObjectUtil.isNotEmpty(instruction_apply_time)) {
|
||||
instruction_apply_time.setAccessible(true);
|
||||
instruction_apply_timeName = instruction_apply_time.getName();
|
||||
}
|
||||
Date nowDate = null;
|
||||
if (ObjectUtil.isNotEmpty(instruction_apply_timeName)) {
|
||||
try {
|
||||
nowDate = (Date) instruction_apply_time.get(instruction_apply_timeName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
Field instruction_require_time_out = null;
|
||||
try {
|
||||
instruction_require_time_out = targetDriverClass.getDeclaredField("instruction_require_time_out");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
String instruction_require_time_outName = "";
|
||||
if (ObjectUtil.isNotEmpty(instruction_require_time_out)) {
|
||||
instruction_require_time_out.setAccessible(true);
|
||||
instruction_require_time_outName = instruction_require_time_out.getName();
|
||||
}
|
||||
long minTime = 0L;
|
||||
try {
|
||||
minTime = (long) instruction_require_time_out.get(instruction_require_time_outName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (minTime != 0L) {
|
||||
Date date = new Date();
|
||||
if (date.getTime() - nowDate.getTime() < minTime) {
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", minTime);
|
||||
return false;
|
||||
} else {
|
||||
Boolean flag = false;
|
||||
try {
|
||||
res = (String) pjp.proceed();
|
||||
} catch (Throwable throwable) {
|
||||
throwable.printStackTrace();
|
||||
}
|
||||
if (StrUtil.isNotEmpty(res)) {
|
||||
String start_device_code = "";
|
||||
String next_device_code = "";
|
||||
String reqsucess = "";
|
||||
if (StrUtil.isNotEmpty(res)) {
|
||||
String[] ress = res.split("\\,");
|
||||
if (ress.length == 3) {
|
||||
start_device_code = ress[0];
|
||||
next_device_code = ress[1];
|
||||
reqsucess = ress[2];
|
||||
}
|
||||
TaskDto onedto = new TaskDto();
|
||||
String now = DateUtil.now();
|
||||
onedto.setTask_id(IdUtil.simpleUUID());
|
||||
//onedto.setQuantity(String.valueOf(full_number));
|
||||
onedto.setCreate_by("auto");
|
||||
onedto.setUpdate_by("auto");
|
||||
onedto.setRoute_plan_code("normal");
|
||||
String taskcode = CodeUtil.getNewCode("TASK_NO");
|
||||
onedto.setTask_code("-" + taskcode);
|
||||
onedto.setTask_type("7");
|
||||
onedto.setTask_status("0");
|
||||
onedto.setPriority("1");
|
||||
onedto.setStart_device_code(start_device_code);
|
||||
onedto.setStart_point_code(start_device_code);
|
||||
onedto.setNext_device_code(next_device_code);
|
||||
onedto.setNext_point_code(next_device_code);
|
||||
onedto.setUpdate_time(now);
|
||||
onedto.setCreate_time(now);
|
||||
try {
|
||||
taskserver.create(onedto);
|
||||
flag = true;
|
||||
} catch (Exception e) {
|
||||
//logServer.deviceLogToacs(this.device_code, "", "", device_code + ":创建任务失败," + String.valueOf(e.getMessage()));
|
||||
}
|
||||
/* if (ress.length == 4){
|
||||
String start_device_code = ress[0];
|
||||
String next_device_code = ress[1];
|
||||
String reqsucess = ress[2];
|
||||
}*/
|
||||
}
|
||||
//生成任务成功
|
||||
if (flag) {
|
||||
Method reqMethod = null;
|
||||
//logServer.deviceLogToacs(this.device_code, "", "", device_code + ":缺料请求任务生成成功");
|
||||
try {
|
||||
reqMethod = targetDriverClass.getMethod("set" + initialUpperCase(reqsucess), boolean.class);
|
||||
} catch (NoSuchMethodException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(reqMethod)) {
|
||||
try {
|
||||
reqMethod.invoke(arg, true);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//logServer.deviceLogToacs(this.device_code, "", "", device_code + ":分配任务缓存线");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
//首字母转大写
|
||||
public String initialUpperCase(String str) {
|
||||
return str.substring(0, 1).toUpperCase() + str.substring(1, str.length());
|
||||
}
|
||||
|
||||
private void recordLog(ProceedingJoinPoint pjp, long time) {
|
||||
MethodSignature signature = (MethodSignature) pjp.getSignature();
|
||||
Method method = signature.getMethod();
|
||||
//注解
|
||||
TaskAnnotation annotation = method.getAnnotation(TaskAnnotation.class);
|
||||
Class<?> targetClass = method.getDeclaringClass();
|
||||
//方法
|
||||
String target = targetClass.getName() + "#" + method.getName();
|
||||
|
||||
//参数名
|
||||
String[] strings = signature.getParameterNames();
|
||||
//参数值
|
||||
Object[] method_args = pjp.getArgs();
|
||||
|
||||
String params = "";
|
||||
if (strings != null && strings.length > 0) {
|
||||
for (int i = 0; i < strings.length; i++) {
|
||||
params += strings[i] + "=" + method_args[i] + ",";
|
||||
}
|
||||
//拼接参数和参数值
|
||||
params = params.substring(0, params.length() - 1);
|
||||
}
|
||||
|
||||
String module = annotation.module();
|
||||
String operator = annotation.operator();
|
||||
log.info("==============================log start===============================");
|
||||
log.info("module:{}", module);
|
||||
log.info("operator:{}", operator);
|
||||
log.info("执行的方法{}:", target);
|
||||
log.info("请求的参数{}:", params);
|
||||
log.info("===============================log end================================");
|
||||
|
||||
}
|
||||
}
|
||||
@@ -20,19 +20,24 @@ public class StandardConveyorLineDevice extends AbstractDriverService {
|
||||
public JSONObject getDeviceInfo(Device device) {
|
||||
standardConveyorLineDeviceDriver = (StandardConveyorLineDeviceDriver) device.getDeviceDriver();
|
||||
JSONObject jo = this.getCommonDeviceInfo(standardConveyorLineDeviceDriver);
|
||||
jo.put("is_click",true);
|
||||
jo.put("hasGoods",standardConveyorLineDeviceDriver.getMove());
|
||||
jo.put("device_type","conveyor");
|
||||
return jo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean createInstCheckStartPoint(Device device, TaskDto taskDto) throws Exception {
|
||||
standardConveyorLineDeviceDriver = (StandardConveyorLineDeviceDriver) device.getDeviceDriver();
|
||||
return this.checkStartPoint(standardConveyorLineDeviceDriver, taskDto, InstEnum.standard_conveyor_line_start.getMode(), InstEnum.standard_conveyor_line_start.getMove());
|
||||
//standardConveyorLineDeviceDriver = (StandardConveyorLineDeviceDriver) device.getDeviceDriver();
|
||||
//return this.checkStartPoint(standardConveyorLineDeviceDriver, taskDto, InstEnum.standard_conveyor_line_start.getMode(), InstEnum.standard_conveyor_line_start.getMove());
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean createInstCheckNextPoint(Device device, TaskDto taskDto) throws Exception {
|
||||
standardConveyorLineDeviceDriver = (StandardConveyorLineDeviceDriver) device.getDeviceDriver();
|
||||
return this.checkNextPoint(standardConveyorLineDeviceDriver, taskDto,InstEnum.standard_conveyor_line_next.getMode(), InstEnum.standard_conveyor_line_next.getMove());
|
||||
//standardConveyorLineDeviceDriver = (StandardConveyorLineDeviceDriver) device.getDeviceDriver();
|
||||
// return this.checkNextPoint(standardConveyorLineDeviceDriver, taskDto,InstEnum.standard_conveyor_line_next.getMode(), InstEnum.standard_conveyor_line_next.getMove());
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -5,7 +5,6 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.common.aspect.TaskAnnotation;
|
||||
import org.nl.acs.device.device_driver.standard_inspect.ReadUtil;
|
||||
import org.nl.acs.device.service.DeviceService;
|
||||
import org.nl.acs.device_driver.DeviceDriver;
|
||||
@@ -20,8 +19,6 @@ import org.nl.acs.task.service.TaskService;
|
||||
import org.nl.utils.SpringContextHolder;
|
||||
import org.openscada.opc.lib.da.Server;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@@ -119,7 +116,6 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
public synchronized void execute() {
|
||||
device_code = this.getDeviceCode();
|
||||
this.signalIsException(this);
|
||||
this.createTask();
|
||||
}
|
||||
|
||||
//判断是否符合生成任务的条件
|
||||
@@ -135,23 +131,10 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
return "";
|
||||
|
||||
}
|
||||
return "createTask";
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
public void createTask(){
|
||||
createTask(this);
|
||||
}
|
||||
|
||||
@TaskAnnotation(module = "a", operator="b")
|
||||
public String createTask(StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver){
|
||||
String name = "2";
|
||||
if ( 2 > 1){
|
||||
String a = "a";
|
||||
}
|
||||
return "a,b,requireSucess";
|
||||
}
|
||||
|
||||
protected void executing(Instruction instruction) {
|
||||
this.executing(1, instruction, "");
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.nl.acs.ext.wms.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
@@ -23,6 +24,7 @@ import org.nl.acs.route.service.RouteLineService;
|
||||
import org.nl.acs.route.service.dto.RouteLineDto;
|
||||
import org.nl.acs.task.service.TaskService;
|
||||
import org.nl.acs.task.service.dto.TaskDto;
|
||||
import org.nl.exception.BadRequestException;
|
||||
import org.nl.exception.WDKException;
|
||||
import org.nl.utils.SpringContextHolder;
|
||||
import org.nl.wql.core.bean.WQLObject;
|
||||
@@ -195,7 +197,7 @@ public class AcsToWmsZDServiceImpl implements AcsToWmsZDService {
|
||||
}
|
||||
String type = "";
|
||||
if(!ObjectUtil.isEmpty(result)){
|
||||
if (result.getStatus() == 200) {
|
||||
if (result.getStatus() == 0) {
|
||||
type = "info";
|
||||
} else {
|
||||
type = "error";
|
||||
@@ -214,32 +216,51 @@ public class AcsToWmsZDServiceImpl implements AcsToWmsZDService {
|
||||
public Map<String, Object> taskDeprecate(Map whereJson) throws Exception {
|
||||
InstructionService instructionService = SpringContextHolder.getBean(InstructionService.class);
|
||||
log.info("taskDeprecate--------------:输入参数" + whereJson.toString());
|
||||
String reason = whereJson.get("reason").toString();
|
||||
String task_code = whereJson.get("taskCode").toString();
|
||||
|
||||
if (StrUtil.isEmpty(task_code)) {
|
||||
throw new WDKException("任务号不能为空");
|
||||
}
|
||||
TaskDto taskDto = taskService.findByCode(task_code);
|
||||
String task_id = taskDto.getTask_id();
|
||||
String cancelTaskCheck = acsConfigService.findConfigFromCache().get(AcsConfig.CANCELTASKCHECK);
|
||||
if (StrUtil.equals(cancelTaskCheck, "1")) {
|
||||
taskService.cancel(task_id);
|
||||
} else if (StrUtil.equals(cancelTaskCheck, "0")) {
|
||||
Instruction inst = instructionService.findByTaskcode(task_code);
|
||||
if (inst == null) {
|
||||
taskService.cancel(task_id);
|
||||
} else {
|
||||
throw new RuntimeException("指令正在执行中,操作失败!");
|
||||
}
|
||||
String taskCode = MapUtil.getStr(whereJson,"task_code");
|
||||
String houseCode =MapUtil.getStr(whereJson,"taskhouseCode_code");
|
||||
Object parameters = whereJson.get("parameters");
|
||||
String systemCode = MapUtil.getStr(whereJson,"systemCode");
|
||||
String reason = MapUtil.getStr(whereJson,"reason");
|
||||
if(ObjectUtil.isEmpty(taskCode)){
|
||||
throw new BadRequestException("任务编号不能为空");
|
||||
}
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("houseCode",houseCode);
|
||||
map.put("systemCode",systemCode);
|
||||
map.put("parameters",parameters);
|
||||
map.put("taskCode",taskCode);
|
||||
map.put("reason",reason);
|
||||
HttpResponse result = null;
|
||||
AddressDto addressDto = addressService.findByCode("deprecateTask");
|
||||
String wcsurl = acsConfigService.findConfigFromCache().get(AcsConfig.WCSURL);
|
||||
String methods_url = addressDto.getMethods_url();
|
||||
String url = wcsurl + methods_url;
|
||||
try {
|
||||
result = HttpRequest.post(url)
|
||||
.header("Authorization", token).body(String.valueOf(whereJson))
|
||||
.execute();
|
||||
} catch (Exception e) {
|
||||
String msg = e.getMessage();
|
||||
//网络不通
|
||||
System.out.println(msg);
|
||||
logServer.log(taskCode, "taskFeedback", "error", whereJson.toString(), msg, String.valueOf(result.getStatus()), url, "");
|
||||
log.info("taskFeedback-----异常输出参数{}", msg);
|
||||
}
|
||||
String type = "";
|
||||
if(!ObjectUtil.isEmpty(result)){
|
||||
if (result.getStatus() == 0) {
|
||||
type = "info";
|
||||
} else {
|
||||
type = "error";
|
||||
}
|
||||
} else {
|
||||
type = "error";
|
||||
}
|
||||
|
||||
JSONObject resultJson = new JSONObject();
|
||||
resultJson.put("responseCode", 0);
|
||||
resultJson.put("responseMessage", "操作成功");
|
||||
resultJson.put("parameters", new JSONObject());
|
||||
log.info("taskDeprecate--------------:输出参数" + resultJson.toString());
|
||||
return resultJson;
|
||||
logServer.log(taskCode, "taskDeprecate", type, whereJson.toString(), result.body(), String.valueOf(result.getStatus()), url, "");
|
||||
JSONObject jo = JSONObject.fromObject(result.body());
|
||||
log.info("taskDeprecate-----输出参数{}", jo.toString());
|
||||
return jo;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,59 +1,22 @@
|
||||
package org.nl.acs.ext.wms.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.sf.json.JSONArray;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.nl.acs.common.deviceInfo.StandardConveyorLineDevice;
|
||||
import org.nl.acs.common.deviceInfo.StandardInspectSiteDevice;
|
||||
import org.nl.acs.config.AcsConfig;
|
||||
import org.nl.acs.config.server.AcsConfigService;
|
||||
import org.nl.acs.device.service.DeviceService;
|
||||
import org.nl.acs.device.service.StorageCellService;
|
||||
import org.nl.acs.device_driver.DeviceDriver;
|
||||
import org.nl.acs.device_driver.electric_fence.ElectricFenceDeviceDriver;
|
||||
import org.nl.acs.device_driver.machines_site.MachinesSiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.non_line_inspect_site.NonLineInspectSiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.non_line_manipulator_inspect_site.NonLineManipulatorInspectSiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.special_ordinary_site.SpecialOrdinarySiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_autodoor.StandardAutodoorDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_conveyor_control.StandardCoveyorControlDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_conveyor_control_with_plcscanner.StandardCoveyorControlWithPlcScannerDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_conveyor_control_with_scanner.StandardCoveyorControlWithScannerDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_conveyor_line.StandardConveyorLineDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_conveyor_monitor.StandardCoveyorMonitorDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_emptypallet_site.StandardEmptyPalletSiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_inspect_site.StandardInspectSiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_manipulator_inspect_site.StandardManipulatorInspectSiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_manipulator_stacking_site.StandardManipulatorStackingSiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_photoelectric_inspect_site.StandardPhotoelectricInspectSiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_scanner.StandardScannerDeviceDriver;
|
||||
import org.nl.acs.device_driver.weighing_site.WeighingSiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.whxr.whxr_ball_mill_device.BallMillDeviceDriver;
|
||||
import org.nl.acs.device_driver.whxr.whxr_ball_mill_device.ItemProtocol;
|
||||
import org.nl.acs.device_driver.whxr.whxr_spary_tower_device.SparyTowerDeviceDriver;
|
||||
import org.nl.acs.ext.wms.service.AgvToAcsService;
|
||||
import org.nl.acs.ext.wms.service.WmsToAcsService;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.instruction.service.dto.Instruction;
|
||||
import org.nl.acs.log.service.LogServer;
|
||||
import org.nl.acs.opc.Device;
|
||||
import org.nl.acs.opc.DeviceAppService;
|
||||
import org.nl.acs.route.service.RouteLineService;
|
||||
import org.nl.acs.route.service.dto.RouteLineDto;
|
||||
import org.nl.acs.task.service.TaskService;
|
||||
import org.nl.acs.task.service.dto.TaskDto;
|
||||
import org.nl.utils.SpringContextHolder;
|
||||
import org.nl.wql.core.bean.WQLObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
@@ -74,7 +37,6 @@ public class AgvToAcsServiceImpl implements AgvToAcsService {
|
||||
// TODO 待定
|
||||
String inst_code = param.getString("task_code");
|
||||
String address = param.getString("address");
|
||||
StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver;
|
||||
StandardConveyorLineDeviceDriver standardConveyorLineDeviceDriver;
|
||||
Instruction instructionDto = instructionService.findByCode(inst_code);
|
||||
String task_code = instructionDto.getTask_code();
|
||||
@@ -84,7 +46,8 @@ public class AgvToAcsServiceImpl implements AgvToAcsService {
|
||||
feedMap.put("taskType", instructionDto.getInstruction_type());
|
||||
if (ObjectUtil.isEmpty(instructionDto)) {
|
||||
map.put("status", 400);
|
||||
map.put("message", "操作失败");
|
||||
map.put("message", "请求失败,指令为空!");
|
||||
logServer.log(task_code, "waitpointRequest", "erro", param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
||||
return map;
|
||||
}
|
||||
String type = "";
|
||||
@@ -97,51 +60,56 @@ public class AgvToAcsServiceImpl implements AgvToAcsService {
|
||||
standardConveyorLineDeviceDriver = (StandardConveyorLineDeviceDriver) deviceNow.getDeviceDriver();
|
||||
if (start_device_code.equals(deviceCodeNow)) {
|
||||
if (standardConveyorLineDeviceDriver.getMove() == 1) {
|
||||
feedMap.put("feedbackStatus", "applyTake");
|
||||
Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap);
|
||||
int responseCode = Integer.parseInt((String) feedback.get("responseCode"));
|
||||
String responseMessage = (String) feedback.get("responseMessage");
|
||||
if (responseCode == 0) {
|
||||
feedback.put("feedbackStatus","“taking");
|
||||
acsToWmsZDService.taskFeedback(feedMap);
|
||||
map.put("status", 200);
|
||||
map.put("message", "操作成功");
|
||||
type = "info";
|
||||
} else {
|
||||
logServer.log(inst_code, "waitpointRequest", "waitpointRequest", param.toString(), feedback.toString(), responseCode + "", "", "");
|
||||
map.put("status", 400);
|
||||
map.put("message", "操作失败");
|
||||
type = "erro";
|
||||
}
|
||||
// feedMap.put("feedbackStatus", "applyTake");
|
||||
//Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap);
|
||||
//int responseCode = Integer.parseInt((String) feedback.get("responseCode"));
|
||||
//String responseMessage = (String) feedback.get("responseMessage");
|
||||
//if (responseCode == 0) {
|
||||
// feedback.put("feedbackStatus","“taking");
|
||||
// acsToWmsZDService.taskFeedback(feedMap);
|
||||
map.put("status", 200);
|
||||
map.put("message", "请求成功");
|
||||
type = "info";
|
||||
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
||||
//} else {
|
||||
// map.put("status", 400);
|
||||
// map.put("message", "操作失败");
|
||||
// type = "erro";
|
||||
// logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
||||
//}
|
||||
} else {
|
||||
map.put("status", 400);
|
||||
map.put("message", "操作失败");
|
||||
map.put("message", "请求失败,起点位置无货!");
|
||||
type = "erro";
|
||||
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
||||
}
|
||||
} else if (deviceCodeNow.equals(next_device_code)) {
|
||||
if (standardConveyorLineDeviceDriver.getMove() != 0) {
|
||||
map.put("status", 400);
|
||||
map.put("message", "操作失败");
|
||||
map.put("message", "请求失败,终点位置有货!");
|
||||
type = "erro";
|
||||
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
||||
} else {
|
||||
feedMap.put("feedbackStatus", "applyPut");
|
||||
Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap);
|
||||
int responseCode = Integer.parseInt((String) feedback.get("responseCode")) ;
|
||||
String responseMessage = (String) feedback.get("responseMessage");
|
||||
if (responseCode == 0) {
|
||||
feedback.put("feedbackStatus","puting");
|
||||
acsToWmsZDService.taskFeedback(feedMap);
|
||||
map.put("status", 200);
|
||||
map.put("message", "操作成功");
|
||||
type = "info";
|
||||
} else {
|
||||
logServer.log(inst_code, "waitpointRequest", "waitpointRequest", param.toString(), feedback.toString(), responseCode + "", "", "");
|
||||
map.put("status", 400);
|
||||
map.put("message", "操作失败");
|
||||
type = "erro";
|
||||
}
|
||||
}
|
||||
//feedMap.put("feedbackStatus", "applyPut");
|
||||
//Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap);
|
||||
// int responseCode = Integer.parseInt((String) feedback.get("responseCode")) ;
|
||||
// String responseMessage = (String) feedback.get("responseMessage");
|
||||
// if (responseCode == 0) {
|
||||
//feedback.put("feedbackStatus","puting");
|
||||
//acsToWmsZDService.taskFeedback(feedMap);
|
||||
map.put("status", 200);
|
||||
map.put("message", "请求成功");
|
||||
type = "info";
|
||||
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
||||
// } else {
|
||||
//logServer.log(task_code, "waitpointRequest", "waitpointRequest", param.toString(), feedback.toString(), responseCode + "", "", "");
|
||||
// map.put("status", 400);
|
||||
// map.put("message", "操作失败");
|
||||
// type = "erro";
|
||||
// }
|
||||
//}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
@@ -154,53 +122,58 @@ public class AgvToAcsServiceImpl implements AgvToAcsService {
|
||||
if (start_device_code.equals(deviceCodeNow)) {
|
||||
if (standardConveyorLineDeviceDriver.getMove() == 0) {
|
||||
//standardConveyorLineDeviceDriver.writing(1,2);
|
||||
feedMap.put("feedbackStatus", "takeFinish");
|
||||
Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap);
|
||||
int responseCode = (int) feedback.get("responseCode");
|
||||
String responseMessage = (String) feedback.get("responseMessage");
|
||||
if (responseCode == 0) {
|
||||
map.put("status", 200);
|
||||
map.put("message", "操作成功");
|
||||
type = "info";
|
||||
} else {
|
||||
logServer.log(inst_code, "waitpointRequest", "waitpointRequest", param.toString(), feedback.toString(), responseCode + "", "", "");
|
||||
map.put("status", 400);
|
||||
map.put("message", "操作失败");
|
||||
type = "erro";
|
||||
}
|
||||
//feedMap.put("feedbackStatus", "takeFinish");
|
||||
// Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap);
|
||||
//int responseCode = (int) feedback.get("responseCode");
|
||||
// String responseMessage = (String) feedback.get("responseMessage");
|
||||
// if (responseCode == 0) {
|
||||
map.put("status", 200);
|
||||
map.put("message", "请求成功");
|
||||
type = "info";
|
||||
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
||||
// } else {
|
||||
// logServer.log(task_code, "waitpointRequest", "waitpointRequest", param.toString(), feedback.toString(), responseCode + "", "", "");
|
||||
// map.put("status", 400);
|
||||
// map.put("message", "操作失败");
|
||||
// type = "erro";
|
||||
// }
|
||||
} else {
|
||||
map.put("status", 400);
|
||||
map.put("message", "操作失败");
|
||||
map.put("message", "请求失败,起点位置有货!");
|
||||
type = "erro";
|
||||
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
||||
}
|
||||
} else if (next_device_code.equals(deviceCodeNow)) {
|
||||
if (standardConveyorLineDeviceDriver.getMove() == 0) {
|
||||
map.put("status", 400);
|
||||
map.put("message", "操作失败");
|
||||
type = "info";
|
||||
logServer.log(inst_code, "waitpointRequest", type, param.toString(), "取货完成时,光电信号为0", "400", "waitpointRequest", "");
|
||||
map.put("message", "请求失败,终点位置无货!");
|
||||
type = "erro";
|
||||
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
||||
} else {
|
||||
//standardConveyorLineDeviceDriver.writing(1,2);
|
||||
feedMap.put("feedbackStatus", "putFinish");
|
||||
Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap);
|
||||
int responseCode = (int) feedback.get("responseCode");
|
||||
String responseMessage = (String) feedback.get("responseMessage");
|
||||
if (responseCode == 0) {
|
||||
map.put("status", 200);
|
||||
map.put("message", "操作成功");
|
||||
type = "info";
|
||||
} else {
|
||||
map.put("status", 400);
|
||||
map.put("message", "操作失败");
|
||||
type = "erro";
|
||||
}
|
||||
// standardConveyorLineDeviceDriver.writing(1,2);
|
||||
// feedMap.put("feedbackStatus", "putFinish");
|
||||
// Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap);
|
||||
// int responseCode = (int) feedback.get("responseCode");
|
||||
// String responseMessage = (String) feedback.get("responseMessage");
|
||||
// if (responseCode == 0) {
|
||||
map.put("status", 200);
|
||||
map.put("message", "请求成功");
|
||||
type = "info";
|
||||
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
||||
// } else{
|
||||
// map.put("status", 400);
|
||||
// map.put("message", "操作失败");
|
||||
// type = "erro";
|
||||
// logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
map.put("status",400);
|
||||
map.put("message","操作失败,IN OUT 站点错误!");
|
||||
map.put("status", 400);
|
||||
map.put("message", "请求失败,IN OUT 站点错误!");
|
||||
logServer.log(task_code, "waitpointRequest", "erro", param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import org.nl.acs.device_driver.standard_inspect_site.StandardInspectSiteDeviceD
|
||||
import org.nl.acs.device_driver.standard_manipulator_inspect_site.StandardManipulatorInspectSiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsZDService;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.instruction.service.dto.Instruction;
|
||||
import org.nl.acs.instruction.service.dto.InstructionDto;
|
||||
@@ -84,6 +85,8 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
@Autowired
|
||||
AcsToWmsService acstowmsService;
|
||||
@Autowired
|
||||
AcsToWmsZDService acsToWmsZDService;
|
||||
@Autowired
|
||||
TaskFeedbackService taskFeedbackService;
|
||||
@Autowired
|
||||
AcsConfigService acsConfigService;
|
||||
@@ -769,93 +772,10 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
//判断是否为WMS下发的任务,如果是反馈任务状态给WMS
|
||||
String hasWms = acsConfigService.findConfigFromCache().get(AcsConfig.HASWMS);
|
||||
if (!StrUtil.startWith(entity.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) {
|
||||
TaskFeedbackDto feefbackdto = taskFeedbackService.findByCode(entity.getTask_code());
|
||||
JSONObject feed_jo = new JSONObject();
|
||||
feed_jo.put("pkg_sequence", entity.getExt_task_uuid());
|
||||
feed_jo.put("task_code", entity.getTask_code());
|
||||
feed_jo.put("task_status", entity.getTask_status());
|
||||
JSONArray ja = new JSONArray();
|
||||
ja.add(feed_jo);
|
||||
String message = null;
|
||||
HttpResponse body = null;
|
||||
boolean flag = false;
|
||||
try {
|
||||
body = acstowmsService.feedbackTaskStatusToWms(ja);
|
||||
} catch (Exception e) {
|
||||
flag = true;
|
||||
message = e.getMessage();
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
|
||||
}
|
||||
if (flag) {
|
||||
if (ObjectUtil.isEmpty(feefbackdto)) {
|
||||
feefbackdto = new TaskFeedbackDto();
|
||||
feefbackdto.setTask_id(entity.getTask_id());
|
||||
feefbackdto.setTask_code(entity.getTask_code());
|
||||
feefbackdto.setTask_status(entity.getTask_status());
|
||||
feefbackdto.setVehicle_type(entity.getVehicle_type());
|
||||
feefbackdto.setVehicle_code(entity.getVehicle_code());
|
||||
feefbackdto.setStart_device_code(entity.getStart_device_code());
|
||||
feefbackdto.setStart_point_code(entity.getStart_point_code());
|
||||
feefbackdto.setNext_device_code(entity.getNext_device_code());
|
||||
feefbackdto.setNext_point_code(entity.getNext_point_code());
|
||||
feefbackdto.setError_code("400");
|
||||
feefbackdto.setIs_finished("0");
|
||||
feefbackdto.setRemark(message);
|
||||
taskFeedbackService.create(feefbackdto);
|
||||
} else {
|
||||
feefbackdto.setTask_status(entity.getTask_status());
|
||||
feefbackdto.setStart_device_code(entity.getStart_device_code());
|
||||
feefbackdto.setStart_point_code(entity.getStart_point_code());
|
||||
feefbackdto.setNext_device_code(entity.getNext_device_code());
|
||||
feefbackdto.setNext_point_code(entity.getNext_point_code());
|
||||
feefbackdto.setError_code("400");
|
||||
feefbackdto.setRemark(message);
|
||||
taskFeedbackService.update(feefbackdto);
|
||||
}
|
||||
} else {
|
||||
int status = body.getStatus();
|
||||
JSONObject jo = JSONObject.fromObject(body.body());
|
||||
if (ObjectUtil.isEmpty(feefbackdto)) {
|
||||
feefbackdto = new TaskFeedbackDto();
|
||||
feefbackdto.setTask_id(entity.getTask_id());
|
||||
feefbackdto.setTask_code(entity.getTask_code());
|
||||
feefbackdto.setTask_status(entity.getTask_status());
|
||||
feefbackdto.setVehicle_type(entity.getVehicle_type());
|
||||
feefbackdto.setVehicle_code(entity.getVehicle_code());
|
||||
feefbackdto.setError_code(String.valueOf(body.getStatus()));
|
||||
feefbackdto.setStart_device_code(entity.getStart_device_code());
|
||||
feefbackdto.setStart_point_code(entity.getNext_point_code());
|
||||
feefbackdto.setNext_device_code(entity.getNext_device_code());
|
||||
feefbackdto.setNext_point_code(entity.getNext_point_code());
|
||||
if (status == 200) {
|
||||
if (StrUtil.equals(entity.getTask_status(), "2")) {
|
||||
feefbackdto.setIs_finished("1");
|
||||
} else {
|
||||
feefbackdto.setIs_finished("0");
|
||||
}
|
||||
} else {
|
||||
feefbackdto.setIs_finished("0");
|
||||
feefbackdto.setRemark(jo.getString("message"));
|
||||
}
|
||||
taskFeedbackService.create(feefbackdto);
|
||||
} else {
|
||||
feefbackdto.setTask_status(entity.getTask_status());
|
||||
if (status == 200) {
|
||||
if (StrUtil.equals(entity.getTask_status(), "2")) {
|
||||
feefbackdto.setIs_finished("1");
|
||||
} else {
|
||||
feefbackdto.setIs_finished("0");
|
||||
}
|
||||
} else {
|
||||
feefbackdto.setIs_finished("0");
|
||||
feefbackdto.setRemark(jo.getString("message"));
|
||||
}
|
||||
taskFeedbackService.update(feefbackdto);
|
||||
}
|
||||
}
|
||||
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("task_code",entity.getTask_code());
|
||||
// map.put("reason",entity.getTask_code());
|
||||
acsToWmsZDService.taskDeprecate(map);
|
||||
}
|
||||
List<RouteLineDto> shortPathsList = routeLineService.getShortPathLines(entity.getStart_device_code(), entity.getNext_device_code(), entity.getRoute_plan_code());
|
||||
String type = shortPathsList.get(0).getType();
|
||||
|
||||
@@ -9,11 +9,11 @@ spring:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||
#url: jdbc:log4jdbc:mysql://${DB_HOST:47.111.78.178}:${DB_PORT:3306}/${DB_NAME:lx_rs_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:zdtn_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:zdtn_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
username: ${DB_USER:root}
|
||||
password: ${DB_PWD:P@ssw0rd}
|
||||
#password: ${DB_PWD:123456}
|
||||
password: ${DB_PWD:Root.123456}
|
||||
#password: ${DB_PWD:P@ssw0rd}
|
||||
#password: ${DB_PWD:Root.123456}
|
||||
password: ${DB_PWD:password}
|
||||
|
||||
# 初始连接数
|
||||
initial-size: 5
|
||||
@@ -133,3 +133,8 @@ file:
|
||||
# 文件大小 /M
|
||||
maxSize: 100
|
||||
avatarMaxSize: 5
|
||||
|
||||
agvToAcs:
|
||||
addr: http://127.0.0.1:8010/api/agv/waitpointRequest
|
||||
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@ spring:
|
||||
druid:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:47.111.78.178}:${DB_PORT:3306}/${DB_NAME:lx_rs_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:zdtn_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
username: ${DB_USER:root}
|
||||
password: ${DB_PWD:P@ssw0rd}
|
||||
password: ${DB_PWD:123456}
|
||||
# 初始连接数
|
||||
initial-size: 5
|
||||
# 最小连接数
|
||||
@@ -135,3 +135,6 @@ file:
|
||||
# 文件大小 /M
|
||||
maxSize: 100
|
||||
avatarMaxSize: 5
|
||||
|
||||
agvToAcs:
|
||||
addr: http://192.168.200.128:8010
|
||||
|
||||
@@ -2,7 +2,7 @@ spring:
|
||||
freemarker:
|
||||
check-template-location: false
|
||||
profiles:
|
||||
active: dev
|
||||
active: prod
|
||||
jackson:
|
||||
time-zone: GMT+8
|
||||
data:
|
||||
|
||||
16
hd/nladmin-system/src/test/java/Test.java
Normal file
16
hd/nladmin-system/src/test/java/Test.java
Normal file
@@ -0,0 +1,16 @@
|
||||
import java.net.Inet4Address;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
/**
|
||||
* @author: geng by
|
||||
* @createDate: 2022/8/1
|
||||
*/
|
||||
public class Test {
|
||||
|
||||
@org.junit.Test
|
||||
public void test() throws UnknownHostException {
|
||||
InetAddress localHost = Inet4Address.getLocalHost();
|
||||
System.out.println(localHost.getHostAddress());
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,8 @@ ENV = 'production'
|
||||
|
||||
# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置
|
||||
# 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http
|
||||
VUE_APP_BASE_API = 'http://192.168.81.122:8010'
|
||||
#VUE_APP_BASE_API = 'http://127.0.0.1:8010'
|
||||
VUE_APP_BASE_API = 'http://192.168.200.128:8010'
|
||||
#VUE_APP_BASE_API = 'http://192.168.200.128:8010'
|
||||
# 如果接口是 http 形式, wss 需要改为 ws
|
||||
VUE_APP_WS_API = 'ws://192.168.81.122:8010'
|
||||
#VUE_APP_WS_API = 'ws://127.0.0.1:8010'
|
||||
|
||||
@@ -137,8 +137,8 @@
|
||||
<el-form-item label="设备状态" label-width="80px">
|
||||
<el-radio-group v-model="form.hasGoodStatus">
|
||||
<el-radio-button :label="0">无货</el-radio-button>
|
||||
<el-radio-button :label="1">有托盘</el-radio-button>
|
||||
<el-radio-button :label="2">有托盘有货</el-radio-button>
|
||||
<el-radio-button :label="1">有货</el-radio-button>
|
||||
<!-- <el-radio-button :label="2">有托盘有货</el-radio-button>-->
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -236,6 +236,8 @@ export default {
|
||||
if (clickObj.data.is_click !== true) {
|
||||
return
|
||||
}
|
||||
console.log(clickObj.data)
|
||||
|
||||
if (clickObj.data.device_type === 'scanner') {
|
||||
this.dialogFormVisible1 = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user