fix: 规约修改
This commit is contained in:
@@ -50,20 +50,38 @@ public enum RequestMethodEnum {
|
|||||||
press_request_material(19, "pressRequestMaterial", "压机叫料", "0");
|
press_request_material(19, "pressRequestMaterial", "压机叫料", "0");
|
||||||
|
|
||||||
|
|
||||||
//驱动索引
|
/**
|
||||||
|
* 驱动索引
|
||||||
|
*/
|
||||||
private int index;
|
private int index;
|
||||||
//驱动编码
|
/**
|
||||||
|
* 驱动编码
|
||||||
|
*/
|
||||||
private String code;
|
private String code;
|
||||||
// 驱动名字
|
/**
|
||||||
|
* 驱动名字
|
||||||
|
*/
|
||||||
private String name;
|
private String name;
|
||||||
//驱动描述
|
/**
|
||||||
|
* 驱动描述
|
||||||
|
*/
|
||||||
private String desc;
|
private String desc;
|
||||||
//设备驱动类型
|
/**
|
||||||
|
* 设备驱动类型
|
||||||
|
*/
|
||||||
private String type;
|
private String type;
|
||||||
//是否隐藏显示 0否1是
|
/**
|
||||||
|
* 是否隐藏显示 0否1是
|
||||||
|
*/
|
||||||
private String isHidden;
|
private String isHidden;
|
||||||
|
|
||||||
// 构造方法
|
/**
|
||||||
|
* 构造方法
|
||||||
|
* @param index
|
||||||
|
* @param code
|
||||||
|
* @param name
|
||||||
|
* @param isHidden
|
||||||
|
*/
|
||||||
RequestMethodEnum(int index, String code, String name, String isHidden) {
|
RequestMethodEnum(int index, String code, String name, String isHidden) {
|
||||||
this.index = index;
|
this.index = index;
|
||||||
this.code = code;
|
this.code = code;
|
||||||
@@ -72,7 +90,10 @@ public enum RequestMethodEnum {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//只反馈未隐藏的
|
/**
|
||||||
|
* 只反馈未隐藏的
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public static JSONArray getList() {
|
public static JSONArray getList() {
|
||||||
JSONArray arr = new JSONArray();
|
JSONArray arr = new JSONArray();
|
||||||
for (RequestMethodEnum em : RequestMethodEnum.values()) {
|
for (RequestMethodEnum em : RequestMethodEnum.values()) {
|
||||||
|
|||||||
@@ -56,7 +56,9 @@ public class XgagvDeviceDriver extends AbstractOpcDeviceDriver implements Device
|
|||||||
;
|
;
|
||||||
@Autowired
|
@Autowired
|
||||||
AcsToWmsService acsToWmsService = SpringContextHolder.getBean("acsToWmsServiceImpl");
|
AcsToWmsService acsToWmsService = SpringContextHolder.getBean("acsToWmsServiceImpl");
|
||||||
//车辆ip 0-未知;1-需充电;2-可执行任务;3-充满电
|
/**
|
||||||
|
* 车辆ip 0-未知;1-需充电;2-可执行任务;3-充满电
|
||||||
|
*/
|
||||||
String agv_mode = "0";
|
String agv_mode = "0";
|
||||||
|
|
||||||
String last_mode = "0";
|
String last_mode = "0";
|
||||||
@@ -124,15 +126,25 @@ public class XgagvDeviceDriver extends AbstractOpcDeviceDriver implements Device
|
|||||||
Instruction inst = null;
|
Instruction inst = null;
|
||||||
protected ItemProtocol itemProtocol = new ItemProtocol(this);
|
protected ItemProtocol itemProtocol = new ItemProtocol(this);
|
||||||
|
|
||||||
//最小电量
|
/**
|
||||||
|
* 最小电量
|
||||||
|
*/
|
||||||
double min_electric = 0.0;
|
double min_electric = 0.0;
|
||||||
//最大电量
|
/**
|
||||||
|
* 最大电量
|
||||||
|
*/
|
||||||
double cancle_electric = 0.0;
|
double cancle_electric = 0.0;
|
||||||
//执行任务电量
|
/**
|
||||||
|
* 执行任务电量
|
||||||
|
*/
|
||||||
double task_electric = 0.0;
|
double task_electric = 0.0;
|
||||||
//休息点
|
/**
|
||||||
|
* 休息点
|
||||||
|
*/
|
||||||
int relax_point = 0;
|
int relax_point = 0;
|
||||||
//充电点
|
/**
|
||||||
|
* 充电点
|
||||||
|
*/
|
||||||
int charge_point = 0;
|
int charge_point = 0;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -173,11 +185,6 @@ public class XgagvDeviceDriver extends AbstractOpcDeviceDriver implements Device
|
|||||||
stop = this.itemProtocol.getStop();
|
stop = this.itemProtocol.getStop();
|
||||||
|
|
||||||
if (home_relocation != last_home_relocation) {
|
if (home_relocation != last_home_relocation) {
|
||||||
// LuceneLogDto logDto = LuceneLogDto.builder()
|
|
||||||
// .device_code(device_code)
|
|
||||||
// .content("信号" + this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.device_code + "." + ItemProtocol.to_home_relocation + "变更从" + this.last_home_relocation + "->" + this.home_relocation)
|
|
||||||
// .build();
|
|
||||||
// luceneExecuteLogService.deviceExecuteLog(logDto);
|
|
||||||
luceneExecuteLogService.deviceExecuteLog(
|
luceneExecuteLogService.deviceExecuteLog(
|
||||||
new LuceneLogDto(this.getDevice().getOpc_server_code(), this.getDevice().getOpc_plc_code(), this.device_code, ItemProtocol.to_home_relocation, this.last_home_relocation, this.home_relocation));
|
new LuceneLogDto(this.getDevice().getOpc_server_code(), this.getDevice().getOpc_plc_code(), this.device_code, ItemProtocol.to_home_relocation, this.last_home_relocation, this.home_relocation));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,9 +10,11 @@ import java.io.Serializable;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class Paper implements Serializable {
|
public class Paper implements Serializable {
|
||||||
//设备号
|
/**
|
||||||
|
* 设备号
|
||||||
|
*/
|
||||||
private String device_code;
|
private String device_code;
|
||||||
//
|
|
||||||
private String material_code;
|
private String material_code;
|
||||||
private String qty;
|
private String qty;
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,9 @@ public class ItemProtocol {
|
|||||||
* 行走列
|
* 行走列
|
||||||
*/
|
*/
|
||||||
public static String item_to_command = "to_command";
|
public static String item_to_command = "to_command";
|
||||||
//下发起始站
|
/**
|
||||||
|
* 下发起始站
|
||||||
|
*/
|
||||||
public static String item_to_onset = "to_onset";
|
public static String item_to_onset = "to_onset";
|
||||||
/**
|
/**
|
||||||
* 下发目标站
|
* 下发目标站
|
||||||
|
|||||||
@@ -100,7 +100,9 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
private Date instruction_require_time = new Date();
|
private Date instruction_require_time = new Date();
|
||||||
|
|
||||||
private int instruction_require_time_out;
|
private int instruction_require_time_out;
|
||||||
//行架机械手申请任务成功标识
|
/**
|
||||||
|
* 行架机械手申请任务成功标识
|
||||||
|
*/
|
||||||
boolean requireSucess = false;
|
boolean requireSucess = false;
|
||||||
|
|
||||||
private int instruction_finished_time_out;
|
private int instruction_finished_time_out;
|
||||||
@@ -108,12 +110,16 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
int branchProtocol = 0;
|
int branchProtocol = 0;
|
||||||
|
|
||||||
|
|
||||||
//暂定 0就绪 1请求取货 2取货完成 3请求放货 4放货完成 5取货完成离开 6放货完成离开 7请求进入区域 8请求离开区域
|
/**
|
||||||
|
* 暂定 0就绪 1请求取货 2取货完成 3请求放货 4放货完成 5取货完成离开 6放货完成离开 7请求进入区域 8请求离开区域
|
||||||
|
*/
|
||||||
int flag;
|
int flag;
|
||||||
|
|
||||||
String device_code;
|
String device_code;
|
||||||
|
|
||||||
//0 无任务执行 1更新指令状态 2下发电气信号 3允许取货 允许放货 5放货完成
|
/**
|
||||||
|
* 0 无任务执行 1更新指令状态 2下发电气信号 3允许取货 允许放货 5放货完成
|
||||||
|
*/
|
||||||
int now_steps_type = 0;
|
int now_steps_type = 0;
|
||||||
String notCreateTaskMessage = "";
|
String notCreateTaskMessage = "";
|
||||||
String notCreateInstMessage = "";
|
String notCreateInstMessage = "";
|
||||||
@@ -675,7 +681,12 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
this.control(itemMap);
|
this.control(itemMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
//判断取货位或放货位为烘箱设备时关联的同一列烘箱设备是否有开门
|
/**
|
||||||
|
* 判断取货位或放货位为烘箱设备时关联的同一列烘箱设备是否有开门
|
||||||
|
* @param start_device_code
|
||||||
|
* @param next_device_code
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public boolean judgeCloseDoor(String start_device_code, String next_device_code) {
|
public boolean judgeCloseDoor(String start_device_code, String next_device_code) {
|
||||||
Boolean isClose = false;
|
Boolean isClose = false;
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,9 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
|
|
||||||
private StorageCellMapper storageCellMapper;
|
private StorageCellMapper storageCellMapper;
|
||||||
|
|
||||||
//当前指令
|
/**
|
||||||
|
* 当前指令
|
||||||
|
*/
|
||||||
Instruction inst = null;
|
Instruction inst = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -96,7 +98,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
int last_carrier_direction = 0;
|
int last_carrier_direction = 0;
|
||||||
/**
|
/**
|
||||||
* 报警
|
* 报警
|
||||||
*/信号
|
*/
|
||||||
int error = 0;
|
int error = 0;
|
||||||
int last_error = 0;
|
int last_error = 0;
|
||||||
/**
|
/**
|
||||||
@@ -136,9 +138,13 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
String inst_message;
|
String inst_message;
|
||||||
String last_inst_message;
|
String last_inst_message;
|
||||||
|
|
||||||
//当前指令
|
/**
|
||||||
|
* 当前指令
|
||||||
|
*/
|
||||||
|
|
||||||
//暂定 0就绪 1请求取货 2取货完成 3请求放货 4放货完成 5取货完成离开 6放货完成离开 7请求进入区域 8请求离开区域
|
/**
|
||||||
|
* 暂定 0就绪 1请求取货 2取货完成 3请求放货 4放货完成 5取货完成离开 6放货完成离开 7请求进入区域 8请求离开区域
|
||||||
|
*/
|
||||||
int flag;
|
int flag;
|
||||||
|
|
||||||
String device_code;
|
String device_code;
|
||||||
@@ -301,13 +307,17 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
//申请捆扎
|
/**
|
||||||
|
* 申请捆扎
|
||||||
|
*/
|
||||||
if (move > 0) {
|
if (move > 0) {
|
||||||
applyLaStrangulation();
|
applyLaStrangulation();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
//申请贴标
|
/**
|
||||||
|
* 申请贴标
|
||||||
|
*/
|
||||||
if (move > 0 && !requireSucess) {
|
if (move > 0 && !requireSucess) {
|
||||||
applyLabeling();
|
applyLabeling();
|
||||||
|
|
||||||
@@ -704,7 +714,9 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//申请贴标
|
/**
|
||||||
|
* 申请贴标
|
||||||
|
*/
|
||||||
public synchronized void applyLabeling() {
|
public synchronized void applyLabeling() {
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
if (date.getTime() - this.require_apply_labeling_time.getTime() < (long) this.instruction_require_time_out) {
|
if (date.getTime() - this.require_apply_labeling_time.getTime() < (long) this.instruction_require_time_out) {
|
||||||
@@ -759,7 +771,9 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//申请捆扎
|
/**
|
||||||
|
* 申请捆扎
|
||||||
|
*/
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
public synchronized void applyLaStrangulation() {
|
public synchronized void applyLaStrangulation() {
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
|
|||||||
@@ -76,7 +76,9 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
@Autowired
|
@Autowired
|
||||||
StorageCellMapper storageCellMapper;
|
StorageCellMapper storageCellMapper;
|
||||||
|
|
||||||
//当前指令
|
/**
|
||||||
|
* 当前指令
|
||||||
|
*/
|
||||||
Instruction inst = null;
|
Instruction inst = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -96,7 +98,7 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
int last_carrier_direction = 0;
|
int last_carrier_direction = 0;
|
||||||
/**
|
/**
|
||||||
* 报警
|
* 报警
|
||||||
*/信号
|
*/
|
||||||
int error = 0;
|
int error = 0;
|
||||||
int last_error = 0;
|
int last_error = 0;
|
||||||
/**
|
/**
|
||||||
@@ -122,7 +124,9 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
private Date require_empty_out_time = new Date();
|
private Date require_empty_out_time = new Date();
|
||||||
|
|
||||||
private int instruction_require_time_out = 3000;
|
private int instruction_require_time_out = 3000;
|
||||||
//行架机械手申请任务成功标识
|
/**
|
||||||
|
* 行架机械手申请任务成功标识
|
||||||
|
*/
|
||||||
boolean requireSucess = false;
|
boolean requireSucess = false;
|
||||||
boolean requireApplyLabelingSuccess = false;
|
boolean requireApplyLabelingSuccess = false;
|
||||||
boolean requireApplyLaStrangulationSuccess = false;
|
boolean requireApplyLaStrangulationSuccess = false;
|
||||||
@@ -135,7 +139,9 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
String inst_message;
|
String inst_message;
|
||||||
String last_inst_message;
|
String last_inst_message;
|
||||||
|
|
||||||
//当前指令
|
/**
|
||||||
|
* 当前指令
|
||||||
|
*/
|
||||||
|
|
||||||
//暂定 0就绪 1请求取货 2取货完成 3请求放货 4放货完成 5取货完成离开 6放货完成离开 7请求进入区域 8请求离开区域
|
//暂定 0就绪 1请求取货 2取货完成 3请求放货 4放货完成 5取货完成离开 6放货完成离开 7请求进入区域 8请求离开区域
|
||||||
int flag;
|
int flag;
|
||||||
@@ -694,7 +700,9 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//申请贴标
|
/**
|
||||||
|
* 申请贴标
|
||||||
|
*/
|
||||||
public synchronized void applyLabeling() {
|
public synchronized void applyLabeling() {
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
if (date.getTime() - this.require_apply_labeling_time.getTime() < (long) this.instruction_require_time_out) {
|
if (date.getTime() - this.require_apply_labeling_time.getTime() < (long) this.instruction_require_time_out) {
|
||||||
@@ -746,7 +754,9 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//申请捆扎
|
/**
|
||||||
|
* 申请捆扎
|
||||||
|
*/
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
public synchronized void applyLaStrangulation() {
|
public synchronized void applyLaStrangulation() {
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
|
|||||||
@@ -82,22 +82,34 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
StorageCellMapper storageCellMapper;
|
StorageCellMapper storageCellMapper;
|
||||||
// 当前指令
|
/**
|
||||||
|
* 当前指令
|
||||||
|
*/
|
||||||
Instruction inst = null;
|
Instruction inst = null;
|
||||||
|
|
||||||
// 工作模式
|
/**
|
||||||
|
* 工作模式
|
||||||
|
*/
|
||||||
int mode = 0;
|
int mode = 0;
|
||||||
int last_mode = 0;
|
int last_mode = 0;
|
||||||
// 光电信号
|
/**
|
||||||
|
* 光电信号
|
||||||
|
*/
|
||||||
int move = 0;
|
int move = 0;
|
||||||
int last_move = 0;
|
int last_move = 0;
|
||||||
// 托盘方向
|
/**
|
||||||
|
* 托盘方向
|
||||||
|
*/
|
||||||
int carrier_direction = 0;
|
int carrier_direction = 0;
|
||||||
int last_carrier_direction = 0;
|
int last_carrier_direction = 0;
|
||||||
// 报警信号
|
/**
|
||||||
|
* 报警信号
|
||||||
|
*/
|
||||||
int error = 0;
|
int error = 0;
|
||||||
int last_error = 0;
|
int last_error = 0;
|
||||||
// 任务号
|
/**
|
||||||
|
* 任务号
|
||||||
|
*/
|
||||||
int task = 0;
|
int task = 0;
|
||||||
int weight = 0;
|
int weight = 0;
|
||||||
int last_task = 0;
|
int last_task = 0;
|
||||||
@@ -118,7 +130,9 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
|||||||
private Date require_empty_out_time = new Date();
|
private Date require_empty_out_time = new Date();
|
||||||
|
|
||||||
private int instruction_require_time_out;
|
private int instruction_require_time_out;
|
||||||
// 行架机械手申请任务成功标识
|
/**
|
||||||
|
* 行架机械手申请任务成功标识
|
||||||
|
*/
|
||||||
boolean requireSucess = false;
|
boolean requireSucess = false;
|
||||||
boolean requireApplyLabelingSuccess = false;
|
boolean requireApplyLabelingSuccess = false;
|
||||||
boolean requireApplyLaStrangulationSuccess = false;
|
boolean requireApplyLaStrangulationSuccess = false;
|
||||||
@@ -129,9 +143,13 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
|||||||
int branchProtocol = 0;
|
int branchProtocol = 0;
|
||||||
String inst_message;
|
String inst_message;
|
||||||
|
|
||||||
// 当前指令
|
/**
|
||||||
|
* 当前指令
|
||||||
|
*/
|
||||||
|
|
||||||
// 暂定 0就绪 1请求取货 2取货完成 3请求放货 4放货完成 5取货完成离开 6放货完成离开 7请求进入区域 8请求离开区域
|
/**
|
||||||
|
* 暂定 0就绪 1请求取货 2取货完成 3请求放货 4放货完成 5取货完成离开 6放货完成离开 7请求进入区域 8请求离开区域
|
||||||
|
*/
|
||||||
int flag;
|
int flag;
|
||||||
|
|
||||||
String device_code;
|
String device_code;
|
||||||
@@ -274,7 +292,9 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
// 申请贴标
|
/**
|
||||||
|
* 申请贴标
|
||||||
|
*/
|
||||||
if (move > 0 && !requireSucess) {
|
if (move > 0 && !requireSucess) {
|
||||||
applyLabeling();
|
applyLabeling();
|
||||||
}
|
}
|
||||||
@@ -703,7 +723,9 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 申请贴标
|
/**
|
||||||
|
* 申请贴标
|
||||||
|
*/
|
||||||
public synchronized void applyLabeling() {
|
public synchronized void applyLabeling() {
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
if (date.getTime() - this.require_apply_labeling_time.getTime()
|
if (date.getTime() - this.require_apply_labeling_time.getTime()
|
||||||
@@ -773,7 +795,9 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 申请捆扎
|
/**
|
||||||
|
* 申请捆扎
|
||||||
|
*/
|
||||||
public synchronized void applyLaStrangulation() {
|
public synchronized void applyLaStrangulation() {
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
if (date.getTime() - this.require_apply_strangulation_time.getTime()
|
if (date.getTime() - this.require_apply_strangulation_time.getTime()
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class ItemProtocol {
|
|||||||
public static String item_walk_y = "walk_y";
|
public static String item_walk_y = "walk_y";
|
||||||
/**
|
/**
|
||||||
* 报警
|
* 报警
|
||||||
*/信号
|
*/
|
||||||
public static String item_error = "error";
|
public static String item_error = "error";
|
||||||
//任务类型
|
//任务类型
|
||||||
public static String item_type = "type";
|
public static String item_type = "type";
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
Instruction inst2 = instructionService.findByCodeFromCache(String.valueOf(task2));
|
Instruction inst2 = instructionService.findByCodeFromCache(String.valueOf(task2));
|
||||||
if (inst2 != null) {
|
if (inst2 != null) {
|
||||||
if (StrUtil.equals(inst2.getInstruction_status(), InstructionStatusEnum.READY.getIndex())) {
|
if (StrUtil.equals(inst2.getInstruction_status(), InstructionStatusEnum.READY.getIndex())) {
|
||||||
//当前指令更新状态
|
//指令更新状态
|
||||||
now_steps_type2 = 1;
|
now_steps_type2 = 1;
|
||||||
inst2.setInstruction_status(InstructionStatusEnum.BUSY.getIndex());
|
inst2.setInstruction_status(InstructionStatusEnum.BUSY.getIndex());
|
||||||
inst2.setExecute_device_code(this.device_code);
|
inst2.setExecute_device_code(this.device_code);
|
||||||
@@ -273,7 +273,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
Instruction inst2 = instructionService.findByCodeFromCache(String.valueOf(task1));
|
Instruction inst2 = instructionService.findByCodeFromCache(String.valueOf(task1));
|
||||||
if (inst2 != null) {
|
if (inst2 != null) {
|
||||||
if (StrUtil.equals(inst2.getInstruction_status(), InstructionStatusEnum.READY.getIndex())) {
|
if (StrUtil.equals(inst2.getInstruction_status(), InstructionStatusEnum.READY.getIndex())) {
|
||||||
//当前指令更新状态
|
//指令更新状态
|
||||||
inst2.setInstruction_status(InstructionStatusEnum.BUSY.getIndex());
|
inst2.setInstruction_status(InstructionStatusEnum.BUSY.getIndex());
|
||||||
inst2.setExecute_device_code(this.device_code);
|
inst2.setExecute_device_code(this.device_code);
|
||||||
instructionService.update(inst2);
|
instructionService.update(inst2);
|
||||||
|
|||||||
@@ -127,11 +127,15 @@ public class StandardCoveyorControlDeviceDriver extends AbstractOpcDeviceDriver
|
|||||||
int branchProtocol = 0;
|
int branchProtocol = 0;
|
||||||
//备注
|
//备注
|
||||||
String remark;
|
String remark;
|
||||||
//数量
|
/**
|
||||||
|
* 数量
|
||||||
|
*/
|
||||||
String qty;
|
String qty;
|
||||||
//物料
|
//物料
|
||||||
String material;
|
String material;
|
||||||
//当前指令
|
/**
|
||||||
|
* 当前指令
|
||||||
|
*/
|
||||||
Instruction inst = null;
|
Instruction inst = null;
|
||||||
//上次指令
|
//上次指令
|
||||||
Instruction last_inst = null;
|
Instruction last_inst = null;
|
||||||
|
|||||||
@@ -128,11 +128,15 @@ public class StandardCoveyorControlWithPlcScannerDeviceDriver extends AbstractOp
|
|||||||
int branchProtocol = 0;
|
int branchProtocol = 0;
|
||||||
//备注
|
//备注
|
||||||
String remark;
|
String remark;
|
||||||
//数量
|
/**
|
||||||
|
* 数量
|
||||||
|
*/
|
||||||
String qty;
|
String qty;
|
||||||
//物料
|
//物料
|
||||||
String material;
|
String material;
|
||||||
//当前指令
|
/**
|
||||||
|
* 当前指令
|
||||||
|
*/
|
||||||
Instruction inst = null;
|
Instruction inst = null;
|
||||||
//上次指令
|
//上次指令
|
||||||
Instruction last_inst = null;
|
Instruction last_inst = null;
|
||||||
|
|||||||
@@ -77,7 +77,9 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
|||||||
private Date instruction_finished_time = new Date();
|
private Date instruction_finished_time = new Date();
|
||||||
private Date instruction_apply_time = new Date();
|
private Date instruction_apply_time = new Date();
|
||||||
private int instruction_require_time_out = 3000;
|
private int instruction_require_time_out = 3000;
|
||||||
//当前指令
|
/**
|
||||||
|
* 当前指令
|
||||||
|
*/
|
||||||
Instruction inst = null;
|
Instruction inst = null;
|
||||||
int heartbeat = 0;
|
int heartbeat = 0;
|
||||||
int mode = 0;
|
int mode = 0;
|
||||||
@@ -114,7 +116,9 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
|||||||
*/
|
*/
|
||||||
Boolean requireSucess = false;
|
Boolean requireSucess = false;
|
||||||
|
|
||||||
//申请成功标记
|
/**
|
||||||
|
* 申请成功标记
|
||||||
|
*/
|
||||||
Boolean applySucess = false;
|
Boolean applySucess = false;
|
||||||
|
|
||||||
public boolean exe_declaration() {
|
public boolean exe_declaration() {
|
||||||
|
|||||||
@@ -60,9 +60,13 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
|||||||
String container_type_desc;
|
String container_type_desc;
|
||||||
String last_container_type_desc;
|
String last_container_type_desc;
|
||||||
String last_container;
|
String last_container;
|
||||||
//放货准备锁
|
/**
|
||||||
|
* 放货准备锁
|
||||||
|
*/
|
||||||
String putReadyLock = null;
|
String putReadyLock = null;
|
||||||
//有货标记
|
/**
|
||||||
|
* 有货标记
|
||||||
|
*/
|
||||||
protected boolean has_goods_tag = false;
|
protected boolean has_goods_tag = false;
|
||||||
|
|
||||||
private Date time = new Date();
|
private Date time = new Date();
|
||||||
@@ -108,26 +112,44 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
|||||||
private int instruction_finished_time_out;
|
private int instruction_finished_time_out;
|
||||||
|
|
||||||
int branchProtocol = 0;
|
int branchProtocol = 0;
|
||||||
//备注
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
String remark;
|
String remark;
|
||||||
//数量
|
/**
|
||||||
|
* 数量
|
||||||
|
*/
|
||||||
String qty;
|
String qty;
|
||||||
//物料
|
/**
|
||||||
|
* 物料
|
||||||
|
*/
|
||||||
String material;
|
String material;
|
||||||
//批次
|
/**
|
||||||
|
* 批次
|
||||||
|
*/
|
||||||
String batch;
|
String batch;
|
||||||
//当前指令
|
/**
|
||||||
|
* 当前指令
|
||||||
|
*/
|
||||||
Instruction inst = null;
|
Instruction inst = null;
|
||||||
//上次指令
|
/**
|
||||||
|
* 上次指令
|
||||||
|
*/
|
||||||
Instruction last_inst = null;
|
Instruction last_inst = null;
|
||||||
|
|
||||||
//触摸屏手动触发任务
|
/**
|
||||||
|
* 触摸屏手动触发任务
|
||||||
|
*/
|
||||||
private Boolean is_has_task = false;
|
private Boolean is_has_task = false;
|
||||||
|
|
||||||
//满盅入库请求标记
|
/**
|
||||||
|
* 满盅入库请求标记
|
||||||
|
*/
|
||||||
boolean Sucess = false;
|
boolean Sucess = false;
|
||||||
|
|
||||||
//暂定 0就绪 1请求取货 2取货完成 3请求放货 4放货完成 5取货完成离开 6放货完成离开 7请求进入区域 8请求离开区域
|
/**
|
||||||
|
* 暂定 0就绪 1请求取货 2取货完成 3请求放货 4放货完成 5取货完成离开 6放货完成离开 7请求进入区域 8请求离开区域
|
||||||
|
*/
|
||||||
int flag;
|
int flag;
|
||||||
|
|
||||||
String devicecode;
|
String devicecode;
|
||||||
|
|||||||
@@ -62,37 +62,63 @@ public class StandardOrdinarySiteDeviceDriver extends AbstractDeviceDriver imple
|
|||||||
|
|
||||||
int branchProtocol = 0;
|
int branchProtocol = 0;
|
||||||
int last_branchProtocol = 0;
|
int last_branchProtocol = 0;
|
||||||
//是否需要输入物料
|
/**
|
||||||
|
* 是否需要输入物料
|
||||||
|
*/
|
||||||
String input_material = "0";
|
String input_material = "0";
|
||||||
//备注
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
String remark = "";
|
String remark = "";
|
||||||
//数量
|
/**
|
||||||
|
* 数量
|
||||||
|
*/
|
||||||
String qty = "";
|
String qty = "";
|
||||||
//批次
|
/**
|
||||||
|
* 批次
|
||||||
|
*/
|
||||||
String batch = "";
|
String batch = "";
|
||||||
//物料
|
/**
|
||||||
|
* 物料
|
||||||
|
*/
|
||||||
String material = "";
|
String material = "";
|
||||||
//目标点位
|
/**
|
||||||
|
* 目标点位
|
||||||
|
*/
|
||||||
String purpose = "";
|
String purpose = "";
|
||||||
//当前指令
|
/**
|
||||||
|
* 当前指令
|
||||||
|
*/
|
||||||
Instruction inst = null;
|
Instruction inst = null;
|
||||||
//上次指令
|
/**
|
||||||
|
* 上次指令
|
||||||
|
*/
|
||||||
Instruction last_inst = null;
|
Instruction last_inst = null;
|
||||||
|
|
||||||
boolean requireSucess = false;
|
boolean requireSucess = false;
|
||||||
|
|
||||||
//触摸屏手动触发任务
|
/**
|
||||||
|
* 触摸屏手动触发任务
|
||||||
|
*/
|
||||||
private Boolean is_has_task = false;
|
private Boolean is_has_task = false;
|
||||||
|
|
||||||
//申请搬运任务
|
/**
|
||||||
|
* 申请搬运任务
|
||||||
|
*/
|
||||||
private Boolean apply_handling = false;
|
private Boolean apply_handling = false;
|
||||||
//申请物料
|
/**
|
||||||
|
* 申请物料
|
||||||
|
*/
|
||||||
private Boolean apply_material = false;
|
private Boolean apply_material = false;
|
||||||
|
|
||||||
// 1取货完成 2放货完成 3进入区域 4离开区域
|
/**
|
||||||
|
* 1取货完成 2放货完成 3进入区域 4离开区域
|
||||||
|
*/
|
||||||
private int flag;
|
private int flag;
|
||||||
|
|
||||||
//人工确认信号 默认0 agv到达后请求置1 等人工确认后变为2 反馈agv后继续为0
|
/**
|
||||||
|
* 人工确认信号 默认0 agv到达后请求置1 等人工确认后变为2 反馈agv后继续为0
|
||||||
|
*/
|
||||||
private int manua_confirm = 0;
|
private int manua_confirm = 0;
|
||||||
|
|
||||||
String device_code = null;
|
String device_code = null;
|
||||||
|
|||||||
@@ -168,6 +168,8 @@ public class ItemProtocol {
|
|||||||
public static String item_fork_runingTimes = "fork_runingTimes";
|
public static String item_fork_runingTimes = "fork_runingTimes";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* 心跳
|
||||||
|
*/
|
||||||
public static String item_to_heartbeat = "to_heartbeat";
|
public static String item_to_heartbeat = "to_heartbeat";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -178,7 +180,9 @@ public class ItemProtocol {
|
|||||||
* 轴运行次数
|
* 轴运行次数
|
||||||
*/
|
*/
|
||||||
public static String item_to_command = "to_command";
|
public static String item_to_command = "to_command";
|
||||||
//物料类型
|
/**
|
||||||
|
* 物料类型
|
||||||
|
*/
|
||||||
public static String item_to_type = "to_type";
|
public static String item_to_type = "to_type";
|
||||||
/**
|
/**
|
||||||
* 任务号
|
* 任务号
|
||||||
|
|||||||
@@ -91,10 +91,14 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
*/
|
*/
|
||||||
Integer task = 0;
|
Integer task = 0;
|
||||||
Integer last_task = 0;
|
Integer last_task = 0;
|
||||||
//y轴报警(载货台)
|
/**
|
||||||
|
* y轴报警(载货台)
|
||||||
|
*/
|
||||||
Integer error = 0;
|
Integer error = 0;
|
||||||
Integer last_error = 0;
|
Integer last_error = 0;
|
||||||
//行走排号
|
/**
|
||||||
|
* 行走排号
|
||||||
|
*/
|
||||||
Integer z = 0;
|
Integer z = 0;
|
||||||
Integer last_z = 0;
|
Integer last_z = 0;
|
||||||
/**
|
/**
|
||||||
@@ -102,7 +106,9 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
*/
|
*/
|
||||||
Integer x = null;
|
Integer x = null;
|
||||||
Integer last_x = null;
|
Integer last_x = null;
|
||||||
//行走层号
|
/**
|
||||||
|
* 行走层号
|
||||||
|
*/
|
||||||
Integer y = 0;
|
Integer y = 0;
|
||||||
Integer last_y = 0;
|
Integer last_y = 0;
|
||||||
/**
|
/**
|
||||||
@@ -110,7 +116,9 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
*/
|
*/
|
||||||
Float move = 0F;
|
Float move = 0F;
|
||||||
Float last_move = 0F;
|
Float last_move = 0F;
|
||||||
//载货台开关信号
|
/**
|
||||||
|
* 载货台开关信号
|
||||||
|
*/
|
||||||
Float cargoMove = 0F;
|
Float cargoMove = 0F;
|
||||||
Float last_cargoMove = 0F;
|
Float last_cargoMove = 0F;
|
||||||
/**
|
/**
|
||||||
@@ -123,7 +131,9 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
*/
|
*/
|
||||||
Integer distancex = 0;
|
Integer distancex = 0;
|
||||||
Integer last_distancex = 0;
|
Integer last_distancex = 0;
|
||||||
//起升激光数值
|
/**
|
||||||
|
* 起升激光数值
|
||||||
|
*/
|
||||||
Integer distancey = 0;
|
Integer distancey = 0;
|
||||||
Integer last_distancey = 0;
|
Integer last_distancey = 0;
|
||||||
/**
|
/**
|
||||||
@@ -166,7 +176,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
*/
|
*/
|
||||||
Float storage_cache = 0F;
|
Float storage_cache = 0F;
|
||||||
Float last_storage_cache = 0F;
|
Float last_storage_cache = 0F;
|
||||||
/* /**
|
/**
|
||||||
* 速度(转/分钟)
|
* 速度(转/分钟)
|
||||||
*/
|
*/
|
||||||
Integer stacker_rpm = 0;
|
Integer stacker_rpm = 0;
|
||||||
@@ -225,7 +235,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
*货叉轴运行次数
|
*货叉轴运行次数
|
||||||
*/
|
*/
|
||||||
Integer fork_runingTimes = 0;
|
Integer fork_runingTimes = 0;
|
||||||
Integer last_fork_runingTimes = 0;*/
|
Integer last_fork_runingTimes = 0;
|
||||||
|
|
||||||
String message = null;
|
String message = null;
|
||||||
|
|
||||||
@@ -245,7 +255,9 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
*/
|
*/
|
||||||
Boolean requireSucess = false;
|
Boolean requireSucess = false;
|
||||||
|
|
||||||
//当前指令
|
/**
|
||||||
|
* 当前指令
|
||||||
|
*/
|
||||||
Instruction inst = null;
|
Instruction inst = null;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ import java.util.Map;
|
|||||||
|
|
||||||
public interface WmsToAcsService {
|
public interface WmsToAcsService {
|
||||||
|
|
||||||
|
org.nl.acs.ext.wms.data.CreateTaskResponse crateTask(String param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建任务
|
* 创建任务
|
||||||
*
|
*
|
||||||
@@ -47,7 +49,7 @@ public interface WmsToAcsService {
|
|||||||
* @param jsonObject 条件
|
* @param jsonObject 条件
|
||||||
* @return Map<String, Object>
|
* @return Map<String, Object>
|
||||||
*/
|
*/
|
||||||
PutActionResponse putAction(String jsonObject) throws Exception;
|
org.nl.acs.ext.wms.data.PutActionResponse putAction(String jsonObject) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询设备状态
|
* 查询设备状态
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ import java.util.*;
|
|||||||
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
|
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
|
||||||
public class MaterialbaseServiceImpl extends CommonServiceImpl<MaterialbaseMapper, Materialbase> implements MaterialbaseService {
|
public class MaterialbaseServiceImpl extends CommonServiceImpl<MaterialbaseMapper, Materialbase> implements MaterialbaseService {
|
||||||
|
|
||||||
// private final RedisUtils redisUtils;
|
|
||||||
private final MaterialbaseMapper materialbaseMapper;
|
private final MaterialbaseMapper materialbaseMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ import java.util.*;
|
|||||||
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
|
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
|
||||||
public class OpcPlcServiceImpl extends CommonServiceImpl<OpcPlcMapper, OpcPlc> implements OpcPlcService {
|
public class OpcPlcServiceImpl extends CommonServiceImpl<OpcPlcMapper, OpcPlc> implements OpcPlcService {
|
||||||
|
|
||||||
// private final RedisUtils redisUtils;
|
|
||||||
private final OpcPlcMapper opcPlcMapper;
|
private final OpcPlcMapper opcPlcMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ import java.util.*;
|
|||||||
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
|
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
|
||||||
public class ProduceshiftorderServiceImpl extends CommonServiceImpl<ProduceshiftorderMapper, Produceshiftorder> implements ProduceshiftorderService {
|
public class ProduceshiftorderServiceImpl extends CommonServiceImpl<ProduceshiftorderMapper, Produceshiftorder> implements ProduceshiftorderService {
|
||||||
|
|
||||||
// private final RedisUtils redisUtils;
|
|
||||||
private final ProduceshiftorderMapper produceshiftorderMapper;
|
private final ProduceshiftorderMapper produceshiftorderMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -70,12 +70,15 @@ public class RouteLineServiceImpl extends CommonServiceImpl<RouteLineMapper, Rou
|
|||||||
Map<String, RoutePlanDto> routePlans = new HashMap();
|
Map<String, RoutePlanDto> routePlans = new HashMap();
|
||||||
Map<Integer, String> routeIndex = new HashMap();
|
Map<Integer, String> routeIndex = new HashMap();
|
||||||
Map<String, List> routeLines = new HashMap();
|
Map<String, List> routeLines = new HashMap();
|
||||||
//用来确定设备在 路由二维数组中的坐标
|
/**
|
||||||
|
* 用来确定设备在 路由二维数组中的坐标
|
||||||
|
*/
|
||||||
Map<String, Integer> deviceCoordinate = null;
|
Map<String, Integer> deviceCoordinate = null;
|
||||||
//路由二维数组
|
/**
|
||||||
|
* 路由二维数组
|
||||||
|
*/
|
||||||
Map<String, String>[][] routeChart = null;
|
Map<String, String>[][] routeChart = null;
|
||||||
List<Map> routePlansList = new ArrayList<>();
|
List<Map> routePlansList = new ArrayList<>();
|
||||||
// private final RedisUtils redisUtils;
|
|
||||||
private final RouteLineMapper routeLineMapper;
|
private final RouteLineMapper routeLineMapper;
|
||||||
private final DeviceMapper deviceMapper;
|
private final DeviceMapper deviceMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|||||||
@@ -84,7 +84,6 @@ import java.util.stream.Collectors;
|
|||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
@Slf4j
|
@Slf4j
|
||||||
// @CacheConfig(cacheNames = TaskService.CACHE_KEY)
|
|
||||||
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
|
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
|
||||||
public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> implements TaskService, ApplicationAutoInitial {
|
public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> implements TaskService, ApplicationAutoInitial {
|
||||||
|
|
||||||
|
|||||||
@@ -6,10 +6,6 @@ import lombok.Data;
|
|||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import org.nl.common.enums.QueryTEnum;
|
import org.nl.common.enums.QueryTEnum;
|
||||||
|
|
||||||
/*
|
|
||||||
* @author ZZQ
|
|
||||||
* @Date 2022/12/15 1:41 下午
|
|
||||||
*/
|
|
||||||
@Builder
|
@Builder
|
||||||
public class QParam {
|
public class QParam {
|
||||||
public String[] k;
|
public String[] k;
|
||||||
|
|||||||
@@ -7,10 +7,7 @@ import org.nl.common.domain.query.LConsumer;
|
|||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
/*
|
|
||||||
* @author ZZQ
|
|
||||||
* @Date 2022/12/14 8:26 下午
|
|
||||||
*/
|
|
||||||
@Getter
|
@Getter
|
||||||
public enum QueryTEnum {
|
public enum QueryTEnum {
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -21,23 +21,35 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|||||||
@Configuration
|
@Configuration
|
||||||
public class SaTokenConfigure implements WebMvcConfigurer {
|
public class SaTokenConfigure implements WebMvcConfigurer {
|
||||||
|
|
||||||
// 白名单
|
/**
|
||||||
|
* 白名单
|
||||||
|
*/
|
||||||
@Autowired
|
@Autowired
|
||||||
private SecurityProperties securityProperties;
|
private SecurityProperties securityProperties;
|
||||||
|
|
||||||
// Sa-Token 整合 jwt (Simple 简单模式)
|
/**
|
||||||
|
* Sa-Token 整合 jwt (Simple 简单模式)
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
public StpLogic getStpLogicJwt() {
|
public StpLogic getStpLogicJwt() {
|
||||||
return new StpLogicJwtForSimple();
|
return new StpLogicJwtForSimple();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 注册 Sa-Token 拦截器,打开注解式鉴权功能
|
/**
|
||||||
|
* 注册 Sa-Token 拦截器,打开注解式鉴权功能
|
||||||
|
* @param registry
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void addInterceptors(InterceptorRegistry registry) {
|
public void addInterceptors(InterceptorRegistry registry) {
|
||||||
// 注册 Sa-Token 拦截器,打开注解式鉴权功能
|
/**
|
||||||
|
* 注册 Sa-Token 拦截器,打开注解式鉴权功能
|
||||||
|
*/
|
||||||
registry.addInterceptor(new SaInterceptor(handle -> StpUtil.checkLogin()))
|
registry.addInterceptor(new SaInterceptor(handle -> StpUtil.checkLogin()))
|
||||||
.addPathPatterns("/**")
|
.addPathPatterns("/**")
|
||||||
// 白名单
|
/**
|
||||||
|
* 白名单
|
||||||
|
*/
|
||||||
.excludePathPatterns(securityProperties.getExcludes());
|
.excludePathPatterns(securityProperties.getExcludes());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,12 @@
|
|||||||
package org.nl.config;
|
package org.nl.config;
|
||||||
|
|
||||||
|
|
||||||
import org.checkerframework.checker.units.qual.K;
|
|
||||||
import org.springframework.util.CollectionUtils;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
||||||
/*
|
|
||||||
* @author ZZQ
|
|
||||||
* @Date 2022/11/29 2:55 下午
|
|
||||||
*/
|
|
||||||
public class MapOf implements Serializable {
|
public class MapOf implements Serializable {
|
||||||
|
|
||||||
public static <K> HashMap of(K... key){
|
public static <K> HashMap of(K... key){
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ import java.util.List;
|
|||||||
public class SpringContextHolder implements ApplicationContextAware, DisposableBean {
|
public class SpringContextHolder implements ApplicationContextAware, DisposableBean {
|
||||||
|
|
||||||
private static ApplicationContext applicationContext = null;
|
private static ApplicationContext applicationContext = null;
|
||||||
//数据库连接的bean名字
|
/**
|
||||||
|
* 数据库连接的bean名字
|
||||||
|
*/
|
||||||
public static String dataSourceBeanName="dataSource";
|
public static String dataSourceBeanName="dataSource";
|
||||||
private static final List<CallBack> CALL_BACKS = new ArrayList<>();
|
private static final List<CallBack> CALL_BACKS = new ArrayList<>();
|
||||||
private static boolean addCallback = true;
|
private static boolean addCallback = true;
|
||||||
|
|||||||
@@ -9,7 +9,9 @@ import org.springframework.context.annotation.Configuration;
|
|||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
public class StaticConfig {
|
public class StaticConfig {
|
||||||
//日志索引目录
|
/**
|
||||||
|
* 日志索引目录
|
||||||
|
*/
|
||||||
@Value("${lucene.index.path}")
|
@Value("${lucene.index.path}")
|
||||||
private String luceneDir;
|
private String luceneDir;
|
||||||
|
|
||||||
|
|||||||
@@ -7,10 +7,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
/*
|
|
||||||
* @author ZZQ
|
|
||||||
* @Date 2022/11/28 10:58 上午
|
|
||||||
*/
|
|
||||||
@Configuration
|
@Configuration
|
||||||
public class SaInitCOnfig {
|
public class SaInitCOnfig {
|
||||||
|
|
||||||
|
|||||||
@@ -84,7 +84,6 @@ public class UserController {
|
|||||||
|
|
||||||
@Log("修改用户:个人中心")
|
@Log("修改用户:个人中心")
|
||||||
@ApiOperation("修改用户:个人中心")
|
@ApiOperation("修改用户:个人中心")
|
||||||
// @PutMapping(value = "center")
|
|
||||||
public ResponseEntity<Object> center(@RequestBody SysUser resources){
|
public ResponseEntity<Object> center(@RequestBody SysUser resources){
|
||||||
if(!resources.getUser_id().equals(StpUtil.getLoginIdAsLong())){
|
if(!resources.getUser_id().equals(StpUtil.getLoginIdAsLong())){
|
||||||
throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||||
@@ -96,7 +95,6 @@ public class UserController {
|
|||||||
@Log("删除用户")
|
@Log("删除用户")
|
||||||
@ApiOperation("删除用户")
|
@ApiOperation("删除用户")
|
||||||
@DeleteMapping
|
@DeleteMapping
|
||||||
// @SaCheckPermission("user:del")
|
|
||||||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||||
userService.removeByIds(ids);
|
userService.removeByIds(ids);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
|||||||
@@ -11,61 +11,101 @@ import lombok.NoArgsConstructor;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class LuceneLogDto {
|
public class LuceneLogDto {
|
||||||
|
|
||||||
/* 日志标识 */
|
/**
|
||||||
|
* 日志标识
|
||||||
|
*/
|
||||||
private String log_uuid;
|
private String log_uuid;
|
||||||
/*日志类型*/
|
/**
|
||||||
|
* 日志类型
|
||||||
|
*/
|
||||||
private String logType;
|
private String logType;
|
||||||
/*设备编号*/
|
/**
|
||||||
|
* 设备编号
|
||||||
|
*/
|
||||||
private String device_code;
|
private String device_code;
|
||||||
/*内容详情*/
|
/**
|
||||||
|
* 内容详情
|
||||||
|
*/
|
||||||
private String content;
|
private String content;
|
||||||
|
|
||||||
/* 任务编码 */
|
/**
|
||||||
|
* 任务编码
|
||||||
|
*/
|
||||||
private String task_code;
|
private String task_code;
|
||||||
|
|
||||||
/* 指令编码 */
|
/**
|
||||||
|
* 指令编码
|
||||||
|
*/
|
||||||
private String instruct_code;
|
private String instruct_code;
|
||||||
|
|
||||||
/* 任务标识 */
|
/**
|
||||||
|
* 任务标识
|
||||||
|
*/
|
||||||
private String task_id;
|
private String task_id;
|
||||||
|
|
||||||
/* 载具号 */
|
/**
|
||||||
|
* 载具号
|
||||||
|
*/
|
||||||
private String vehicle_code;
|
private String vehicle_code;
|
||||||
|
|
||||||
/* 备注 */
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
/* 日志类型 */
|
/**
|
||||||
|
* 日志类型
|
||||||
|
*/
|
||||||
private String log_type;
|
private String log_type;
|
||||||
|
|
||||||
/* 方法 */
|
/**
|
||||||
|
* 方法
|
||||||
|
*/
|
||||||
private String method;
|
private String method;
|
||||||
|
|
||||||
/* 请求参数 */
|
/**
|
||||||
|
* 请求参数
|
||||||
|
*/
|
||||||
private String requestparam;
|
private String requestparam;
|
||||||
|
|
||||||
/* 响应参数 */
|
/**
|
||||||
|
* 响应参数
|
||||||
|
*/
|
||||||
private String responseparam;
|
private String responseparam;
|
||||||
|
|
||||||
/* 请求地址 */
|
/**
|
||||||
|
* 请求地址
|
||||||
|
*/
|
||||||
private String requesturl;
|
private String requesturl;
|
||||||
|
|
||||||
/* 状态码 */
|
/**
|
||||||
|
* 状态码
|
||||||
|
*/
|
||||||
private String status_code;
|
private String status_code;
|
||||||
|
|
||||||
/* 是否删除 1:是;0:否 */
|
/**
|
||||||
|
* 是否删除 1:是;0:否
|
||||||
|
*/
|
||||||
private String is_delete;
|
private String is_delete;
|
||||||
|
|
||||||
/* 创建者 */
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
private String create_by;
|
private String create_by;
|
||||||
|
|
||||||
/* 创建时间 YYYY-MM-DD hh:mm:ss */
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
private String create_time;
|
private String create_time;
|
||||||
|
|
||||||
/* 修改者 */
|
/**
|
||||||
|
* 修改者
|
||||||
|
*/
|
||||||
private String update_by;
|
private String update_by;
|
||||||
|
|
||||||
/* 修改时间 */
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
private String update_time;
|
private String update_time;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,9 @@ import java.util.Map;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class LuceneServiceImpl implements LuceneService {
|
public class LuceneServiceImpl implements LuceneService {
|
||||||
|
|
||||||
//日志索引目录
|
/**
|
||||||
|
* 日志索引目录
|
||||||
|
*/
|
||||||
@Value("${lucene.index.path}")
|
@Value("${lucene.index.path}")
|
||||||
private String luceneUrl;
|
private String luceneUrl;
|
||||||
|
|
||||||
|
|||||||
@@ -8,10 +8,7 @@ import org.nl.system.service.user.dao.SysUser;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/*
|
|
||||||
* @author ZZQ
|
|
||||||
* @Date 2022/12/16 10:02 上午
|
|
||||||
*/
|
|
||||||
@Data
|
@Data
|
||||||
public class SysUserDetail extends SysUser {
|
public class SysUserDetail extends SysUser {
|
||||||
private List<SysDept> depts;
|
private List<SysDept> depts;
|
||||||
|
|||||||
@@ -6,10 +6,7 @@ import org.nl.common.domain.query.QParam;
|
|||||||
import org.nl.common.enums.QueryTEnum;
|
import org.nl.common.enums.QueryTEnum;
|
||||||
import org.nl.system.service.user.dao.SysUser;
|
import org.nl.system.service.user.dao.SysUser;
|
||||||
|
|
||||||
/*
|
|
||||||
* @author ZZQ
|
|
||||||
* @Date 2022/12/15 9:53 上午
|
|
||||||
*/
|
|
||||||
@Data
|
@Data
|
||||||
public class UserQuery extends BaseQuery<SysUser> {
|
public class UserQuery extends BaseQuery<SysUser> {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user