add:新增拔前行架二次分配逻辑
This commit is contained in:
@@ -139,10 +139,12 @@ public class BoxStorageOutConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
private Date instruction_require_time = new Date();
|
||||
private Date require_apply_labeling_time = new Date();
|
||||
private Date require_apply_strangulation_time = new Date();
|
||||
private Date require_apply_manipulatorTask_time = new Date();
|
||||
private Date require_empty_in_time = new Date();
|
||||
private Date require_empty_out_time = new Date();
|
||||
|
||||
private int instruction_require_time_out = 3000;
|
||||
private int require_apply_manipulatorTask_time_out = 3000;
|
||||
//行架机械手申请任务成功标识
|
||||
boolean requireSucess = false;
|
||||
boolean requireEmptyInSuccess = false;
|
||||
@@ -363,10 +365,11 @@ public class BoxStorageOutConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
|
||||
private void applyManipulatorTask() {
|
||||
Date date = new Date();
|
||||
if (date.getTime() - this.instruction_require_time.getTime() < (long) this.instruction_require_time_out) {
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||
if (date.getTime() - this.require_apply_manipulatorTask_time.getTime() < (long) this.require_apply_manipulatorTask_time_out) {
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.require_apply_manipulatorTask_time_out);
|
||||
return;
|
||||
} else {
|
||||
this.require_apply_manipulatorTask_time = date;
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("device_code", device_code);
|
||||
param.put("material_barcode", material_barcode);
|
||||
|
||||
@@ -655,7 +655,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
}
|
||||
|
||||
|
||||
private void erroBlock() {
|
||||
private void erroBlock() throws Exception {
|
||||
|
||||
message = "universal_message3";
|
||||
//指定库位满入
|
||||
@@ -672,7 +672,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
if (error == 6) {
|
||||
try {
|
||||
updateEXcuteMessage(error.toString());
|
||||
applyUpdatePointCode(StandarStirageErroEnum.VOIDANCE.getType());
|
||||
applyUpdatePointCode1(StandarStirageErroEnum.VOIDANCE.getType());
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
@@ -711,7 +711,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
*
|
||||
* @param type
|
||||
*/
|
||||
private void applyUpdatePointCode(String type) {
|
||||
private void applyUpdatePointCode(String type) throws Exception {
|
||||
Date date = new Date();
|
||||
if (date.getTime() - this.update_point_require_time.getTime() < (long) this.update_point_require_time_out) {
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.update_point_require_time_out);
|
||||
@@ -794,16 +794,108 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 申请更新点位
|
||||
*
|
||||
* @param type
|
||||
*/
|
||||
private void applyUpdatePointCode1(String type) throws Exception {
|
||||
Date date = new Date();
|
||||
if (date.getTime() - this.update_point_require_time.getTime() < (long) this.update_point_require_time_out) {
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.update_point_require_time_out);
|
||||
return;
|
||||
} else {
|
||||
this.update_point_require_time = new Date();
|
||||
Instruction instruction = checkInst();
|
||||
if (ObjectUtil.isEmpty(instruction)) {
|
||||
message = "one_message9";
|
||||
return;
|
||||
}
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("task_code", instruction.getTask_code());
|
||||
param.put("task_id", instruction.getTask_id());
|
||||
param.put("type", type);
|
||||
LuceneLogDto logDto1 = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("申请更新点位,参数:" + param)
|
||||
.build();
|
||||
logDto1.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto1);
|
||||
String response = acsToWmsService.applyUpdatePointCode(param);
|
||||
JSONObject jo = JSON.parseObject(response);
|
||||
if (jo.getInteger("status") == 200) {
|
||||
try {
|
||||
verifyPoint(type,jo);
|
||||
//清警
|
||||
cleanErro();
|
||||
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("申请更新点位,参数,接口返回:" + jo)
|
||||
.build();
|
||||
logDto2.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto2);
|
||||
String poinCode = jo.getString("point_code");
|
||||
String vehicleCode = jo.getString("vehicle_code");
|
||||
if (StrUtil.isNotEmpty(poinCode)) {
|
||||
String[] split = poinCode.split("-");
|
||||
Device point = deviceAppService.findDeviceByCode(split[0]);
|
||||
if (ObjectUtil.isEmpty(point)) {
|
||||
message = "one_message18";
|
||||
}
|
||||
|
||||
if (type.equals(StandarStirageErroEnum.BLOCK_IN.getType()) || type.equals(StandarStirageErroEnum.FILL.getType())) {
|
||||
updateData2(poinCode, point, split, vehicleCode);
|
||||
List list = new ArrayList();
|
||||
String x = point.getExtraValue().get("x").toString();
|
||||
String y = split[1];
|
||||
String z = split[2];
|
||||
pakagePLCData(list, x, y, z, "2", task.toString());
|
||||
}
|
||||
if (type.equals(StandarStirageErroEnum.VOIDANCE.getType())) {
|
||||
updateData1(poinCode, point, split, vehicleCode);
|
||||
List list = new ArrayList();
|
||||
String x = point.getExtraValue().get("x").toString();
|
||||
String y = split[1];
|
||||
String z = split[2];
|
||||
pakagePLCData(list, x, y, z, "1", task.toString());
|
||||
}
|
||||
}
|
||||
//取货潜货位阻挡做完移库任务
|
||||
if (type.equals(StandarStirageErroEnum.BLOCK_OUT.getType())) {
|
||||
errorInst = checkInst();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
this.errorRequireSucess = false;
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
this.errorRequireSucess = true;
|
||||
} else {
|
||||
instructionService.cancel(instruction.getInstruction_id());
|
||||
//清警
|
||||
cleanErro();
|
||||
this.errorRequireSucess = false;
|
||||
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("申请更新点位,返回参数:" + jo)
|
||||
.build();
|
||||
logDto2.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验点位是否存在路由
|
||||
* @param jo
|
||||
*/
|
||||
private void verifyPoint(String type,JSONObject jo) {
|
||||
Instruction instruction = checkInst();
|
||||
String[] point_codes = jo.getString("point_code").split("-");
|
||||
String point_code = jo.getString("point_code");
|
||||
String[] split = point_code.split("-");
|
||||
if (type.equals(StandarStirageErroEnum.BLOCK_IN.getType()) || type.equals(StandarStirageErroEnum.FILL.getType())) {
|
||||
List<RouteLineDto> routeLineDtos = routeLineService.getShortPathLines(instruction.getStart_device_code(),
|
||||
point_codes[0], instruction.getRoute_plan_code());
|
||||
split[0], instruction.getRoute_plan_code());
|
||||
if(CollUtil.isEmpty(routeLineDtos)){
|
||||
errorPoint(jo, instruction);
|
||||
}
|
||||
@@ -813,7 +905,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
errorPoint(jo, instruction);
|
||||
}
|
||||
} else if(type.equals(StandarStirageErroEnum.VOIDANCE.getType())){
|
||||
List<RouteLineDto> routeLineDtos = routeLineService.getShortPathLines(point_codes[0],instruction.getNext_device_code(),
|
||||
List<RouteLineDto> routeLineDtos = routeLineService.getShortPathLines(split[0],instruction.getNext_device_code(),
|
||||
instruction.getRoute_plan_code());
|
||||
if(CollUtil.isEmpty(routeLineDtos)){
|
||||
errorPoint(jo, instruction);
|
||||
|
||||
@@ -77,6 +77,10 @@ public class ItemProtocol {
|
||||
public static String item_to_size3 = "to_size3";
|
||||
//套拔轴纸管2尺寸
|
||||
public static String item_to_size4 = "to_size4";
|
||||
//下发新取货点
|
||||
public static String item_to_getpoint = "to_getpoint";
|
||||
//下发新放货点
|
||||
public static String item_to_putpoint = "to_putpoint";
|
||||
|
||||
|
||||
private PullHeadManipulatorDeviceDriver driver;
|
||||
@@ -142,6 +146,14 @@ public class ItemProtocol {
|
||||
return this.getOpcIntegerValue(item_to_command);
|
||||
}
|
||||
|
||||
public int getTo_getpoint() {
|
||||
return this.getOpcIntegerValue(item_to_getpoint);
|
||||
}
|
||||
|
||||
public int getTo_putpoint() {
|
||||
return this.getOpcIntegerValue(item_to_putpoint);
|
||||
}
|
||||
|
||||
public int getTo_target() {
|
||||
return this.getOpcIntegerValue(item_to_target);
|
||||
}
|
||||
@@ -238,6 +250,8 @@ public class ItemProtocol {
|
||||
list.add(new ItemDto(item_to_qty2, "拔轴纸管数量", "DB12.W20"));
|
||||
list.add(new ItemDto(item_to_size3, "拔轴纸管1尺寸", "DB12.W22"));
|
||||
list.add(new ItemDto(item_to_size4, "拔轴纸管2尺寸", "DB12.W24"));
|
||||
list.add(new ItemDto(item_to_getpoint, "下发新取货点", "DB12.W26"));
|
||||
list.add(new ItemDto(item_to_putpoint, "下发新放货点", "DB12.W28"));
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,10 @@ import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||
import org.nl.acs.device_driver.one_manipulator.box_storage_manipulator.InteractionJsonDTO;
|
||||
import org.nl.acs.device_driver.two_conveyor.plug_pull_device_site.PlugPullDeviceSiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.two_conveyor.pull_head_manipulator.ItemProtocol;
|
||||
import org.nl.acs.ext.wms.data.ManipulatorApplyPointRequest;
|
||||
import org.nl.acs.ext.wms.data.ManipulatorApplyPointResponse;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl;
|
||||
import org.nl.acs.history.ErrorUtil;
|
||||
import org.nl.acs.history.service.DeviceErrorLogService;
|
||||
import org.nl.acs.history.service.impl.DeviceErrorLogServiceImpl;
|
||||
@@ -77,6 +81,8 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
DeviceErrorLogService errorLogServer = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
||||
@Autowired
|
||||
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
|
||||
@Autowired
|
||||
AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsServiceImpl.class);
|
||||
//工作模式
|
||||
int mode = 0;
|
||||
int lastMode = 0;
|
||||
@@ -110,6 +116,12 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
int toTarget = 0;
|
||||
int lastToTarget = 0;
|
||||
|
||||
int to_getpoint = 0;
|
||||
int last_to_getpoint = 0;
|
||||
|
||||
int to_putpoint = 0;
|
||||
int last_to_putpoint = 0;
|
||||
|
||||
int toTask = 0;
|
||||
int lastToTask = 0;
|
||||
|
||||
@@ -134,7 +146,11 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
String message = null;
|
||||
Boolean iserror = false;
|
||||
private Date instruction_update_time = new Date();
|
||||
private int instruction_update_time_out = 1000;
|
||||
private Date apply_action_time = new Date();
|
||||
private Date apply_action_time1 = new Date();
|
||||
private int instruction_update_time_out = 3000;
|
||||
private int apply_action_time_out = 3000;
|
||||
private int apply_action_time_out1 = 3000;
|
||||
Integer heartbeat_tag;
|
||||
private Date instruction_require_time = new Date();
|
||||
|
||||
@@ -162,6 +178,8 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
String notCreateTaskMessage = "";
|
||||
String notCreateInstMessage = "";
|
||||
String feedMessage = "";
|
||||
//反馈成功表示
|
||||
boolean feedbackSucess = false;
|
||||
|
||||
|
||||
List<String> getDeviceCodeList = null;
|
||||
@@ -194,11 +212,16 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
toOnset = this.itemProtocol.getTo_onset();
|
||||
xPosition = this.itemProtocol.getX_position();
|
||||
yPosition = this.itemProtocol.getY_position();
|
||||
to_getpoint = this.itemProtocol.getTo_getpoint();
|
||||
to_putpoint = this.itemProtocol.getTo_putpoint();
|
||||
|
||||
if (mode != lastMode) {
|
||||
requireSucess = false;
|
||||
}
|
||||
if (mode == 3 && !requireSucess) {
|
||||
if (action != lastAction) {
|
||||
this.setFeedbackSucess(false);
|
||||
}
|
||||
if (task > 0 && !feedbackSucess) {
|
||||
inst = checkInst();
|
||||
if (null != inst) {
|
||||
TaskDto dto = taskserver.findByCode(inst.getTask_code());
|
||||
@@ -212,6 +235,83 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
update_instruction_status();
|
||||
}
|
||||
|
||||
//申请取货点
|
||||
if (mode == 3 && action == 6) {
|
||||
Date date = new Date();
|
||||
if (date.getTime() - this.apply_action_time.getTime() < (long) this.apply_action_time_out) {
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.apply_action_time_out);
|
||||
|
||||
} else {
|
||||
this.apply_action_time = date;
|
||||
ManipulatorApplyPointRequest manipulatorApplyPointRequest = new ManipulatorApplyPointRequest();
|
||||
ManipulatorApplyPointResponse manipulatorApplyPointResponse;
|
||||
inst = checkInst();
|
||||
String task_code = inst.getTask_code();
|
||||
manipulatorApplyPointRequest.setType("1");
|
||||
manipulatorApplyPointRequest.setTask_code(task_code);
|
||||
if (toCommand != 6) {
|
||||
manipulatorApplyPointResponse = acsToWmsService.manipulatorApplyPointRequest(manipulatorApplyPointRequest);
|
||||
if (manipulatorApplyPointResponse.getstatus() == 200) {
|
||||
LuceneLogDto logDto1 = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("向LMS申请气胀轴库取货点位,返回参数" + manipulatorApplyPointResponse)
|
||||
.build();
|
||||
logDto1.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto1);
|
||||
String get_device_code = manipulatorApplyPointResponse.getDevice_code();
|
||||
Device device = deviceAppService.findDeviceByCode(get_device_code);
|
||||
String to_new_getpoint = device.getExtraValue().get("address").toString();
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("to_command", "6");
|
||||
map.put("to_getpoint", Integer.parseInt(to_new_getpoint));
|
||||
this.writing(map);
|
||||
message = "申请新取货点成功";
|
||||
} else {
|
||||
message = "申请新取货点失败";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//申请放货点
|
||||
if (mode == 3 && action == 7) {
|
||||
Date date = new Date();
|
||||
if (date.getTime() - this.apply_action_time1.getTime() < (long) this.apply_action_time_out1) {
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.apply_action_time_out1);
|
||||
|
||||
} else {
|
||||
this.apply_action_time1 = date;
|
||||
ManipulatorApplyPointRequest manipulatorApplyPointRequest = new ManipulatorApplyPointRequest();
|
||||
ManipulatorApplyPointResponse manipulatorApplyPointResponse;
|
||||
inst = checkInst();
|
||||
String task_code = inst.getTask_code();
|
||||
manipulatorApplyPointRequest.setType("2");
|
||||
manipulatorApplyPointRequest.setTask_code(task_code);
|
||||
if (toCommand != 7) {
|
||||
manipulatorApplyPointResponse = acsToWmsService.manipulatorApplyPointRequest(manipulatorApplyPointRequest);
|
||||
if (manipulatorApplyPointResponse.getstatus() == 200) {
|
||||
LuceneLogDto logDto1 = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("向LMS申请气胀轴库放货点位,返回参数" + manipulatorApplyPointResponse)
|
||||
.build();
|
||||
logDto1.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto1);
|
||||
String put_device_code = manipulatorApplyPointResponse.getDevice_code();
|
||||
Device device = deviceAppService.findDeviceByCode(put_device_code);
|
||||
String to_new_putpoint = device.getExtraValue().get("address").toString();
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("to_command", "7");
|
||||
map.put("to_putpoint", Integer.parseInt(to_new_putpoint));
|
||||
this.writing(map);
|
||||
message = "申请新放货点成功";
|
||||
} else {
|
||||
message = "申请新放货点失败";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception var17) {
|
||||
var17.printStackTrace();
|
||||
@@ -285,6 +385,8 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
lastToSleeve = toSleeve;
|
||||
lastToSize = toSize;
|
||||
lastToBarcode = toBarcode;
|
||||
last_to_getpoint = to_getpoint;
|
||||
last_to_putpoint = to_putpoint;
|
||||
}
|
||||
|
||||
public synchronized void update_instruction_status() throws Exception {
|
||||
@@ -295,15 +397,13 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
} else {
|
||||
this.instruction_update_time = date;
|
||||
// 更新指令状态
|
||||
if (task > 0) {
|
||||
Instruction inst = checkInst();
|
||||
if (inst != null) {
|
||||
if (StrUtil.equals(inst.getInstruction_status(), "0")) {
|
||||
inst.setInstruction_status(CommonFinalParam.ONE);
|
||||
inst.setExecute_device_code(this.device_code);
|
||||
inst.setUpdate_time(DateUtil.now());
|
||||
instructionService.update(inst);
|
||||
}
|
||||
Instruction inst = checkInst();
|
||||
if (inst != null) {
|
||||
if (StrUtil.equals(inst.getInstruction_status(), "0")) {
|
||||
inst.setInstruction_status(CommonFinalParam.ONE);
|
||||
inst.setExecute_device_code(this.device_code);
|
||||
inst.setUpdate_time(DateUtil.now());
|
||||
instructionService.update(inst);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -319,8 +419,10 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
message = "universal_message1";
|
||||
try {
|
||||
finish_instruction(inst2);
|
||||
feedbackSucess = true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
feedbackSucess = false;
|
||||
}
|
||||
feedMessage = "";
|
||||
}
|
||||
@@ -339,6 +441,8 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -450,78 +554,62 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
taskDtosReady = this.sortTask(taskDtosReady);
|
||||
for (int j = 0; j < taskDtosReady.size(); j++) {
|
||||
//按照优先级排序 优先级相等按照创建时间排序
|
||||
task = taskDtosReady.get(j);
|
||||
// 6 行架任务 8烘箱任务
|
||||
if (!StrUtil.equals(task.getTask_type(), "6")) {
|
||||
task = null;
|
||||
continue;
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(task)) {
|
||||
Device nextdevice = deviceAppService.findDeviceByCode(task.getNext_device_code());
|
||||
Device startdevice = deviceAppService.findDeviceByCode(task.getStart_device_code());
|
||||
if (startdevice.getDeviceDriver() instanceof PlugPullDeviceSiteDeviceDriver) {
|
||||
plugPullDeviceSiteDeviceDriver = (PlugPullDeviceSiteDeviceDriver) startdevice.getDeviceDriver();
|
||||
if (plugPullDeviceSiteDeviceDriver.getAction() != 1 && plugPullDeviceSiteDeviceDriver.getMove() != 1) {
|
||||
notCreateInstMessage = "就绪任务未创建指令原因->" + task.getStart_device_code() + "工位状态为不允许取或者无货,无法生成指令";
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content(notCreateInstMessage + task.getStart_device_code() + "工位action值:" + plugPullDeviceSiteDeviceDriver.getAction() + "move值:" + plugPullDeviceSiteDeviceDriver.getMove())
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
continue;
|
||||
}
|
||||
TaskDto taskReady = taskDtosReady.get(j);
|
||||
String start_device_code = taskReady.getStart_device_code();
|
||||
String next_device_code = taskReady.getNext_device_code();
|
||||
Device nextdevice = deviceAppService.findDeviceByCode(taskReady.getNext_device_code());
|
||||
Device startdevice = deviceAppService.findDeviceByCode(taskReady.getStart_device_code());
|
||||
if (startdevice.getDeviceDriver() instanceof PlugPullDeviceSiteDeviceDriver) {
|
||||
plugPullDeviceSiteDeviceDriver = (PlugPullDeviceSiteDeviceDriver) startdevice.getDeviceDriver();
|
||||
if (plugPullDeviceSiteDeviceDriver.getAction() == 1 && plugPullDeviceSiteDeviceDriver.getMove() == 1) {
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("当前任务号:" + taskReady.getTask_code() + " " + start_device_code + "当前move值为:" + plugPullDeviceSiteDeviceDriver.getMove() + ",当前action值为:" + plugPullDeviceSiteDeviceDriver.getAction())
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
task = taskReady;
|
||||
break start;
|
||||
} else {
|
||||
notCreateInstMessage = "就绪任务未创建指令原因->" + taskReady.getStart_device_code() + "工位状态为不允许取或者无货,无法生成指令";
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("当前任务号:" + taskReady.getTask_code() + " " + start_device_code + "当前move值为:" + plugPullDeviceSiteDeviceDriver.getMove() + ",当前action值为:" + plugPullDeviceSiteDeviceDriver.getAction())
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (nextdevice.getDeviceDriver() instanceof PlugPullDeviceSiteDeviceDriver) {
|
||||
plugPullDeviceSiteDeviceDriver = (PlugPullDeviceSiteDeviceDriver) nextdevice.getDeviceDriver();
|
||||
if (plugPullDeviceSiteDeviceDriver.getAction() != 2 && plugPullDeviceSiteDeviceDriver.getMove() != 0) {
|
||||
notCreateInstMessage = "就绪任务未创建指令原因->" + task.getNext_device_code() + "工位状态为不允许放或者有货,无法生成指令";
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content(notCreateInstMessage + task.getStart_device_code() + "工位action值:" + plugPullDeviceSiteDeviceDriver.getAction() + "move值:" + plugPullDeviceSiteDeviceDriver.getMove())
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
continue;
|
||||
}
|
||||
if (nextdevice.getDeviceDriver() instanceof PlugPullDeviceSiteDeviceDriver) {
|
||||
plugPullDeviceSiteDeviceDriver = (PlugPullDeviceSiteDeviceDriver) nextdevice.getDeviceDriver();
|
||||
if (plugPullDeviceSiteDeviceDriver.getAction() == 2 && plugPullDeviceSiteDeviceDriver.getMove() == 0) {
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("当前任务号:" + taskReady.getTask_code() + " " + start_device_code + "当前move值为:" + plugPullDeviceSiteDeviceDriver.getMove() + ",当前action值为:" + plugPullDeviceSiteDeviceDriver.getAction())
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
task = taskReady;
|
||||
break start;
|
||||
} else {
|
||||
notCreateInstMessage = "就绪任务未创建指令原因->" + taskReady.getNext_device_code() + "工位状态为不允许放或者有货,无法生成指令";
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("当前任务号:" + taskReady.getTask_code() + " " + next_device_code + "当前move值为:" + plugPullDeviceSiteDeviceDriver.getMove() + ",当前action值为:" + plugPullDeviceSiteDeviceDriver.getAction())
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
continue;
|
||||
}
|
||||
break start;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(task)) {
|
||||
Device nextdevice = deviceAppService.findDeviceByCode(task.getNext_device_code());
|
||||
Device startdevice = deviceAppService.findDeviceByCode(task.getStart_device_code());
|
||||
if (startdevice.getDeviceDriver() instanceof PlugPullDeviceSiteDeviceDriver) {
|
||||
plugPullDeviceSiteDeviceDriver = (PlugPullDeviceSiteDeviceDriver) startdevice.getDeviceDriver();
|
||||
if (plugPullDeviceSiteDeviceDriver.getAction() != 1 && plugPullDeviceSiteDeviceDriver.getMove() != 1) {
|
||||
notCreateInstMessage = "就绪任务未创建指令原因->" + task.getStart_device_code() + "工位状态为不允许取或者无货,无法生成指令";
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content(notCreateInstMessage + task.getStart_device_code() + "工位action值:" + plugPullDeviceSiteDeviceDriver.getAction() + "move值:" + plugPullDeviceSiteDeviceDriver.getMove())
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (nextdevice.getDeviceDriver() instanceof PlugPullDeviceSiteDeviceDriver) {
|
||||
plugPullDeviceSiteDeviceDriver = (PlugPullDeviceSiteDeviceDriver) nextdevice.getDeviceDriver();
|
||||
if (plugPullDeviceSiteDeviceDriver.getAction() != 2 && plugPullDeviceSiteDeviceDriver.getMove() != 0) {
|
||||
notCreateInstMessage = "就绪任务未创建指令原因->" + task.getNext_device_code() + "工位状态为不允许放或者有货,无法生成指令";
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content(notCreateInstMessage + task.getStart_device_code() + "工位action值:" + plugPullDeviceSiteDeviceDriver.getAction() + "move值:" + plugPullDeviceSiteDeviceDriver.getMove())
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
String taskId = task.getTask_id();
|
||||
String taskCode = task.getTask_code();
|
||||
String vehicleCode = task.getVehicle_code();
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package org.nl.acs.ext.wms.data;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ManipulatorApplyPointRequest extends BaseRequest{
|
||||
/**
|
||||
* 1-申请取货点
|
||||
* 2-申请放货点
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 任务号
|
||||
*/
|
||||
private String task_code;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.nl.acs.ext.wms.data;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class ManipulatorApplyPointResponse extends BaseResponse{
|
||||
|
||||
private Map<String, String> data = new HashMap();
|
||||
/**
|
||||
* 取放货点
|
||||
*/
|
||||
private String device_code;
|
||||
}
|
||||
@@ -119,5 +119,12 @@ public class WmsToAcsController {
|
||||
return new ResponseEntity<>(wmstoacsService.getTubeMes(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/returnBox")
|
||||
@Log("lms下发退木箱流程")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> returnBox(@RequestBody JSONObject param) throws Exception {
|
||||
return new ResponseEntity<>(wmstoacsService.returnBox(param), HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -218,4 +218,11 @@ public interface AcsToWmsService {
|
||||
void actionFinishRequest2(JSONObject jsonObject);
|
||||
|
||||
String forceMove(JSONObject param);
|
||||
|
||||
/**
|
||||
* 向LMS申请气胀轴库点位
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
ManipulatorApplyPointResponse manipulatorApplyPointRequest(ManipulatorApplyPointRequest param);
|
||||
}
|
||||
|
||||
@@ -118,4 +118,6 @@ public interface WmsToAcsService {
|
||||
Map<String, Object> putWeightAction(String jsonObject) throws Exception;
|
||||
|
||||
Map<String, Object> getTubeMes(String whereJson) throws Exception;
|
||||
|
||||
JSONObject returnBox(JSONObject param);
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
log.info("applyTaskToWms-----输出参数{}", msg);
|
||||
//网络不通
|
||||
}
|
||||
if(ObjectUtil.isEmpty(result2)){
|
||||
if (ObjectUtil.isEmpty(result2)) {
|
||||
log.info("applyTaskToWms-----输出参数{}", "返回结果为空");
|
||||
return null;
|
||||
}
|
||||
@@ -110,7 +110,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
type = "error";
|
||||
}
|
||||
log.info("applyTaskToWms-----输出参数{}", result2.body());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"applyTaskToWms", String.valueOf(result2.getStatus()),
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "applyTaskToWms", String.valueOf(result2.getStatus()),
|
||||
JSON.toJSONString(jo), String.valueOf(result2.body()), "ACS向LMS申请生箔按钮任务");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
return result2.body();
|
||||
@@ -217,7 +217,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
log.info("applySendOutTwo-----输出参数{}", msg);
|
||||
//网络不通
|
||||
}
|
||||
if(ObjectUtil.isEmpty(result2)){
|
||||
if (ObjectUtil.isEmpty(result2)) {
|
||||
log.info("applySendOutTwo-----输出参数{}", "返回结果为空");
|
||||
return null;
|
||||
}
|
||||
@@ -228,7 +228,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
type = "error";
|
||||
}
|
||||
log.info("applySendOutTwo-----输出参数{}", result2.body());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"applySendOutTwo", String.valueOf(result2.getStatus()),
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "applySendOutTwo", String.valueOf(result2.getStatus()),
|
||||
JSON.toJSONString(param), String.valueOf(result2.body()), "二期发货申请任务");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
return result2.body();
|
||||
@@ -259,7 +259,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
log.info("deviceApplyTwo-----输出参数{}", msg);
|
||||
//网络不通
|
||||
}
|
||||
if(ObjectUtil.isEmpty(result2)){
|
||||
if (ObjectUtil.isEmpty(result2)) {
|
||||
log.info("deviceApplyTwo-----输出参数{}", "返回结果为空");
|
||||
return null;
|
||||
}
|
||||
@@ -298,7 +298,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
log.info("sendProductToFirstFloor-----输出参数{}", msg);
|
||||
//网络不通
|
||||
}
|
||||
if(ObjectUtil.isEmpty(result2)){
|
||||
if (ObjectUtil.isEmpty(result2)) {
|
||||
log.info("sendProductToFirstFloor-----输出参数{}", "返回结果为空");
|
||||
return null;
|
||||
}
|
||||
@@ -309,7 +309,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
type = "error";
|
||||
}
|
||||
log.info("sendProductToFirstFloor-----输出参数{}", result2.body());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"sendProductToFirstFloor", String.valueOf(result2.getStatus()),
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "sendProductToFirstFloor", String.valueOf(result2.getStatus()),
|
||||
JSON.toJSONString(param), String.valueOf(result2.body()), "二期发货申请捆扎、贴标");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
return result2.body();
|
||||
@@ -325,8 +325,6 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public HttpResponse feedTaskStatus(JSONArray data) {
|
||||
//feedTaskStatus
|
||||
@@ -356,7 +354,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
|
||||
// //System.out.println(result2);
|
||||
log.info("feedbackTaskStatusToWms-----执行反馈{}", result2);
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"feedTaskStatus", String.valueOf(result2.getStatus()),
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "feedTaskStatus", String.valueOf(result2.getStatus()),
|
||||
String.valueOf(data), String.valueOf(result2.body()), "ACS向WMS反馈任务状态");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
} catch (Exception e) {
|
||||
@@ -376,7 +374,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
type = "info";
|
||||
JSONObject jo = JSONObject.parseObject(result2.body());
|
||||
log.info("feedbackTaskStatusToWms-----输出参数{}", jo.toString());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"feedTaskStatus", String.valueOf(result2.getStatus()),
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "feedTaskStatus", String.valueOf(result2.getStatus()),
|
||||
String.valueOf(data), String.valueOf(result2.body()), "ACS向WMS反馈任务状态");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
return result2;
|
||||
@@ -396,34 +394,34 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
|
||||
@Override
|
||||
public ApplyGreenFoilButtonResponse applyGreenFoilButtonTask(ApplyGreenFoilButtonRequest param) {
|
||||
ApplyGreenFoilButtonResponse applyGreenFoilButtonResponse = new ApplyGreenFoilButtonResponse();
|
||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) {
|
||||
String wmsUrl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
||||
AddressDto addressDto = addressService.findByCode("applyGreenFoilButtonTask");
|
||||
String methods_url = addressDto.getMethods_url();
|
||||
String url = wmsUrl + methods_url;
|
||||
log.info("ApplyGreenFoilButtonRequest----请求参数{}", param);
|
||||
try {
|
||||
ApplyGreenFoilButtonResponse applyGreenFoilButtonResponse = new ApplyGreenFoilButtonResponse();
|
||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) {
|
||||
String wmsUrl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
||||
AddressDto addressDto = addressService.findByCode("applyGreenFoilButtonTask");
|
||||
String methods_url = addressDto.getMethods_url();
|
||||
String url = wmsUrl + methods_url;
|
||||
log.info("ApplyGreenFoilButtonRequest----请求参数{}", param);
|
||||
try {
|
||||
// String result = "";
|
||||
String result = HttpRequest.post(url)
|
||||
.addInterceptor(tLogHutoolhttpInterceptor)
|
||||
.header(Header.USER_AGENT, "Hutool http")
|
||||
.body(JSON.toJSONString(param))
|
||||
.execute().body();
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
log.info("ApplyGreenFoilButtonResponse----返回参数{}", result);
|
||||
applyGreenFoilButtonResponse = JSONObject.toJavaObject(jsonObject, ApplyGreenFoilButtonResponse.class);
|
||||
} catch (Exception e) {
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("status", 400);
|
||||
map.put("message", e.getMessage());
|
||||
return JSONObject.toJavaObject(map, ApplyGreenFoilButtonResponse.class);
|
||||
}
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"applyGreenFoilButtonTask", String.valueOf(applyGreenFoilButtonResponse.getCode()),
|
||||
JSON.toJSONString(param), String.valueOf(applyGreenFoilButtonResponse.getMessage()), "ACS向LMS申请生箔按钮任务");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
String result = HttpRequest.post(url)
|
||||
.addInterceptor(tLogHutoolhttpInterceptor)
|
||||
.header(Header.USER_AGENT, "Hutool http")
|
||||
.body(JSON.toJSONString(param))
|
||||
.execute().body();
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
log.info("ApplyGreenFoilButtonResponse----返回参数{}", result);
|
||||
applyGreenFoilButtonResponse = JSONObject.toJavaObject(jsonObject, ApplyGreenFoilButtonResponse.class);
|
||||
} catch (Exception e) {
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("status", 400);
|
||||
map.put("message", e.getMessage());
|
||||
return JSONObject.toJavaObject(map, ApplyGreenFoilButtonResponse.class);
|
||||
}
|
||||
return applyGreenFoilButtonResponse;
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "applyGreenFoilButtonTask", String.valueOf(applyGreenFoilButtonResponse.getCode()),
|
||||
JSON.toJSONString(param), String.valueOf(applyGreenFoilButtonResponse.getMessage()), "ACS向LMS申请生箔按钮任务");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
}
|
||||
return applyGreenFoilButtonResponse;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -464,7 +462,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
|
||||
@Override
|
||||
public ApplyPlugPullSitResponse applyPlugPullSiteRequest(ApplyPlugPullSiteRequest param) {
|
||||
log.info("向lms申请套管工位请求,请求参数{}",param);
|
||||
log.info("向lms申请套管工位请求,请求参数{}", param);
|
||||
String result = "";
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
@@ -537,11 +535,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
JSON.toJSONString(param), message, "向LMS反馈子卷重量");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
}
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"applyfeedbackSubVolumeWeightRequest", String.valueOf(applyfeedbackSubVolumeWeightResponse.getCode()),
|
||||
JSON.toJSONString(param), String.valueOf(applyfeedbackSubVolumeWeightResponse.getMessage()), "ACS反馈LMS子卷重量");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
}
|
||||
return applyfeedbackSubVolumeWeightResponse;
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "applyfeedbackSubVolumeWeightRequest", String.valueOf(applyfeedbackSubVolumeWeightResponse.getCode()),
|
||||
JSON.toJSONString(param), String.valueOf(applyfeedbackSubVolumeWeightResponse.getMessage()), "ACS反馈LMS子卷重量");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
}
|
||||
return applyfeedbackSubVolumeWeightResponse;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -549,35 +547,35 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
log.info("RGV工位上有货申请行架任务,请求参数{}", param);
|
||||
String result = "";
|
||||
ApplyManipulatorActionResponse applyManipulatorActionResponse = new ApplyManipulatorActionResponse();
|
||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) {
|
||||
String wmsUrl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
||||
AddressDto addressDto = addressService.findByCode("applyManipulatorAction");
|
||||
String methods_url = addressDto.getMethods_url();
|
||||
String url = wmsUrl + methods_url;
|
||||
log.info("RGV工位上有货申请行架任务----请求参数:{}", JSONObject.toJSONString(param));
|
||||
try {
|
||||
result = HttpRequest.post(url)
|
||||
.addInterceptor(tLogHutoolhttpInterceptor)
|
||||
.header(Header.USER_AGENT, "Hutool http")
|
||||
.body(JSON.toJSONString(param))
|
||||
.execute().body();
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
log.info("RGV工位上有货申请行架任务----返回参数{}", result);
|
||||
applyManipulatorActionResponse = JSONObject.toJavaObject(jsonObject, ApplyManipulatorActionResponse.class);
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "applyManipulatorAction", String.valueOf(applyManipulatorActionResponse.getCode()),
|
||||
JSON.toJSONString(param), String.valueOf(result), "RGV工位上有货申请行架任务");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
} catch (Exception e) {
|
||||
String message = e.getMessage();
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
log.info("RGV工位上有货申请行架任务----返回参数{}", result);
|
||||
applyManipulatorActionResponse = JSONObject.toJavaObject(jsonObject, ApplyManipulatorActionResponse.class);
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "applyManipulatorAction", String.valueOf(applyManipulatorActionResponse.getCode()),
|
||||
JSON.toJSONString(param), String.valueOf(result), "RGV工位上有货申请行架任务失败");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
}
|
||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) {
|
||||
String wmsUrl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
||||
AddressDto addressDto = addressService.findByCode("applyManipulatorAction");
|
||||
String methods_url = addressDto.getMethods_url();
|
||||
String url = wmsUrl + methods_url;
|
||||
log.info("RGV工位上有货申请行架任务----请求参数:{}", JSONObject.toJSONString(param));
|
||||
try {
|
||||
result = HttpRequest.post(url)
|
||||
.addInterceptor(tLogHutoolhttpInterceptor)
|
||||
.header(Header.USER_AGENT, "Hutool http")
|
||||
.body(JSON.toJSONString(param))
|
||||
.execute().body();
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
log.info("RGV工位上有货申请行架任务----返回参数{}", result);
|
||||
applyManipulatorActionResponse = JSONObject.toJavaObject(jsonObject, ApplyManipulatorActionResponse.class);
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "applyManipulatorAction", String.valueOf(applyManipulatorActionResponse.getCode()),
|
||||
JSON.toJSONString(param), String.valueOf(result), "RGV工位上有货申请行架任务");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
} catch (Exception e) {
|
||||
String message = e.getMessage();
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
log.info("RGV工位上有货申请行架任务----返回参数{}", result);
|
||||
applyManipulatorActionResponse = JSONObject.toJavaObject(jsonObject, ApplyManipulatorActionResponse.class);
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "applyManipulatorAction", String.valueOf(applyManipulatorActionResponse.getCode()),
|
||||
JSON.toJSONString(param), String.valueOf(result), "RGV工位上有货申请行架任务失败");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
}
|
||||
return applyManipulatorActionResponse;
|
||||
}
|
||||
return applyManipulatorActionResponse;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -608,7 +606,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
map.put("message", e.getMessage());
|
||||
return JSONObject.toJavaObject(map, GetWasteFoilWeightResponse.class);
|
||||
}
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"feedbackWeight", String.valueOf(getWasteFoilWeightResponse.getCode()),
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "feedbackWeight", String.valueOf(getWasteFoilWeightResponse.getCode()),
|
||||
JSON.toJSONString(param), String.valueOf(getWasteFoilWeightResponse), "ACS向LMS申请反馈");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
}
|
||||
@@ -640,7 +638,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
log.info("getBoxInfo-----输出参数{}", msg);
|
||||
//网络不通
|
||||
}
|
||||
if(ObjectUtil.isEmpty(result2)){
|
||||
if (ObjectUtil.isEmpty(result2)) {
|
||||
log.info("getBoxInfo-----输出参数{}", "返回结果为空");
|
||||
return null;
|
||||
}
|
||||
@@ -651,7 +649,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
type = "error";
|
||||
}
|
||||
log.info("getBoxInfo-----输出参数{}", result2.body());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"getBoxInfo", String.valueOf(result2.getStatus()),
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "getBoxInfo", String.valueOf(result2.getStatus()),
|
||||
JSON.toJSONString(param), String.valueOf(result2.body()), "申请高度等级");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
return result2.body();
|
||||
@@ -682,7 +680,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
log.info("getIsUncap-----输出参数{}", msg);
|
||||
//网络不通
|
||||
}
|
||||
if(ObjectUtil.isEmpty(result2)){
|
||||
if (ObjectUtil.isEmpty(result2)) {
|
||||
log.info("getIsUncap-----输出参数{}", "返回结果为空");
|
||||
return null;
|
||||
}
|
||||
@@ -693,7 +691,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
type = "error";
|
||||
}
|
||||
log.info("getIsUncap-----输出参数{}", result2.body());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"getIsUncap", String.valueOf(result2.getStatus()),
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "getIsUncap", String.valueOf(result2.getStatus()),
|
||||
JSON.toJSONString(param), String.valueOf(result2.body()), "申请开盖");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
return result2.body();
|
||||
@@ -704,8 +702,6 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String secondaryAllocationPoint(JSONObject param) {
|
||||
try {
|
||||
@@ -727,7 +723,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
log.info("secondaryAllocationPoint-----输出参数{}", msg);
|
||||
//网络不通
|
||||
}
|
||||
if(ObjectUtil.isEmpty(result2)){
|
||||
if (ObjectUtil.isEmpty(result2)) {
|
||||
log.info("secondaryAllocationPoint-----输出参数{}", "返回结果为空");
|
||||
return null;
|
||||
}
|
||||
@@ -738,7 +734,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
type = "error";
|
||||
}
|
||||
log.info("secondaryAllocationPoint-----输出参数{}", result2.body());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"secondaryAllocationPoint", String.valueOf(result2.getStatus()),
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "secondaryAllocationPoint", String.valueOf(result2.getStatus()),
|
||||
JSON.toJSONString(param), String.valueOf(result2.body()), "追加诺宝动作块");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
return result2.body();
|
||||
@@ -770,7 +766,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
log.info("forceMove-----输出参数{}", msg);
|
||||
//网络不通
|
||||
}
|
||||
if(ObjectUtil.isEmpty(result2)){
|
||||
if (ObjectUtil.isEmpty(result2)) {
|
||||
log.info("forceMove-----输出参数{}", "返回结果为空");
|
||||
return null;
|
||||
}
|
||||
@@ -781,7 +777,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
type = "error";
|
||||
}
|
||||
log.info("forceMove-----输出参数{}", result2.body());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"forceMove", String.valueOf(result2.getStatus()),
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "forceMove", String.valueOf(result2.getStatus()),
|
||||
JSON.toJSONString(param), String.valueOf(result2.body()), "追加诺宝动作块");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
return result2.body();
|
||||
@@ -790,6 +786,42 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
MDC.remove(log_file_type);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManipulatorApplyPointResponse manipulatorApplyPointRequest(ManipulatorApplyPointRequest param) {
|
||||
log.info("向LMS申请气胀轴库点位,请求参数{}", JSONObject.toJSONString(param));
|
||||
String result = "";
|
||||
ManipulatorApplyPointResponse manipulatorApplyPointResponse = new ManipulatorApplyPointResponse();
|
||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) {
|
||||
String wmsUrl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
||||
AddressDto addressDto = addressService.findByCode("manipulatorApplyPointRequest");
|
||||
String methods_url = addressDto.getMethods_url();
|
||||
String url = wmsUrl + methods_url;
|
||||
try {
|
||||
result = HttpRequest.post(url)
|
||||
.addInterceptor(tLogHutoolhttpInterceptor)
|
||||
.header(Header.USER_AGENT, "Hutool http")
|
||||
.body(JSON.toJSONString(param))
|
||||
.execute().body();
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
log.info("向LMS申请气胀轴库点位----返回参数{}", result);
|
||||
manipulatorApplyPointResponse = JSONObject.toJavaObject(jsonObject, ManipulatorApplyPointResponse.class);
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "manipulatorApplyPointRequest", String.valueOf(manipulatorApplyPointResponse.getCode()),
|
||||
JSON.toJSONString(param), String.valueOf(result), "向LMS申请气胀轴库" + ("1".equals(param.getType()) ? "取货点位" : "放货点位"));
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
} catch (Exception e) {
|
||||
String message = e.getMessage();
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
log.info("向LMS申请气胀轴库点位----返回参数{}", result);
|
||||
manipulatorApplyPointResponse = JSONObject.toJavaObject(jsonObject, ManipulatorApplyPointResponse.class);
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "manipulatorApplyPointRequest", String.valueOf(manipulatorApplyPointResponse.getCode()),
|
||||
JSON.toJSONString(param), String.valueOf(result), "向LMS申请气胀轴库点位失败");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
}
|
||||
}
|
||||
return manipulatorApplyPointResponse;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionFinishRequest2(JSONObject jsonObject) {
|
||||
HttpResponse execute = null;
|
||||
@@ -807,18 +839,18 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
String msg = e.getMessage();
|
||||
log.info("feedbackDie-----输出参数{}", msg);
|
||||
//网络不通
|
||||
LuceneLogDto luceneLogDto1 = new LuceneLogDto(4,"actionFinishRequest2", String.valueOf(execute.getStatus()),
|
||||
LuceneLogDto luceneLogDto1 = new LuceneLogDto(4, "actionFinishRequest2", String.valueOf(execute.getStatus()),
|
||||
String.valueOf(jsonObject),
|
||||
String.valueOf(execute.body()), jsonObject.getString("task_code") + "设备工位取货完成反馈失败");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto1);
|
||||
}
|
||||
log.info("actionFinishRequest2 - 设备工位取货完成反馈{}", jsonObject);
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"actionFinishRequest2", "",
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "actionFinishRequest2", "",
|
||||
String.valueOf(jsonObject),
|
||||
"", jsonObject.getString("task_code") + "设备工位取货完成反馈");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
} catch (Exception e) {
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"actionFinishRequest2", String.valueOf(execute.getStatus()),
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "actionFinishRequest2", String.valueOf(execute.getStatus()),
|
||||
JSON.toJSONString(execute.body()),
|
||||
String.valueOf(execute.body()), jsonObject.getString("task_code") + "设备工位取货完成反馈失败");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
@@ -846,13 +878,13 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
//网络不通
|
||||
}
|
||||
log.info("feedbackDie - 反馈管芯{}", result2.body());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"feedbackDie", String.valueOf(result2.getStatus()),
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "feedbackDie", String.valueOf(result2.getStatus()),
|
||||
String.valueOf(param),
|
||||
String.valueOf(result2.body()), "反馈管芯抓取");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
return result2;
|
||||
} catch (Exception e) {
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"feedbackDie", String.valueOf(result2.getStatus()),
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "feedbackDie", String.valueOf(result2.getStatus()),
|
||||
JSON.toJSONString(result2.body()),
|
||||
String.valueOf(result2.body()), "反馈管芯抓取报错");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
@@ -882,13 +914,13 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
//网络不通
|
||||
}
|
||||
log.info("callShaftFromCache - 请求密集库出气胀轴,申请行架任务{}", result2.body());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"callShaftFromCache", String.valueOf(result2.getStatus()),
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "callShaftFromCache", String.valueOf(result2.getStatus()),
|
||||
String.valueOf(param),
|
||||
String.valueOf(result2.body()), "请求密集库出气胀轴,申请行架任务");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
return result2;
|
||||
} catch (Exception e) {
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"callShaftFromCache", String.valueOf(result2.getStatus()),
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "callShaftFromCache", String.valueOf(result2.getStatus()),
|
||||
JSON.toJSONString(result2.body()),
|
||||
String.valueOf(result2.body()), "请求密集库出气胀轴,申请行架任务报错");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
@@ -913,7 +945,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
.body();
|
||||
log.info("gccQueryStationState - 响应参数{}", responseBody);
|
||||
JSONObject jsonObject = JSONObject.parseObject(responseBody);
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"gccQueryStationState", String.valueOf(jsonObject.get("code")),
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "gccQueryStationState", String.valueOf(jsonObject.get("code")),
|
||||
JSON.toJSONString("StartStationCode=" + inst.getStart_point_code() + "&EndStationCode=" + inst.getNext_point_code()),
|
||||
String.valueOf(jsonObject), "ACS查询站点有无货状态");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
@@ -925,6 +957,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
// @Async
|
||||
public void sendDeviceStatus(JSONObject param) {
|
||||
@@ -944,7 +977,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
.body(param.toString())
|
||||
.execute();
|
||||
log.info("sendDeviceStatus - 返回参数 {}", response.body());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"sendDeviceStatus", String.valueOf(response.getStatus()),
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "sendDeviceStatus", String.valueOf(response.getStatus()),
|
||||
String.valueOf(param),
|
||||
String.valueOf(response.body()), "向LMS发送设备状态");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
@@ -988,7 +1021,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
type = "error";
|
||||
}
|
||||
log.info("applyUpdatePointCode-----输出参数{}", result2.body());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"deviceApplyExceptional", String.valueOf(result2.getStatus()),
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "deviceApplyExceptional", String.valueOf(result2.getStatus()),
|
||||
JSON.toJSONString(param), String.valueOf(result2.body()), "申请更新点位");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
return result2.body();
|
||||
|
||||
@@ -748,6 +748,11 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
return resultJson;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject returnBox(JSONObject whereJson) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> queryDevice(String jsonObject) throws Exception {
|
||||
try {
|
||||
|
||||
@@ -1318,6 +1318,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
entity.setUpdate_time(now);
|
||||
entity.setUpdate_by(currentUsername);
|
||||
entity.setInstruction_status(InstructionStatusEnum.CANCEL.getIndex());
|
||||
entity.setRemark("堆垛机空出取消指令");
|
||||
InstructionMybatis ins = ConvertUtil.convert(entity, InstructionMybatis.class);
|
||||
instructionMapper.updateById(ins);
|
||||
DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class);
|
||||
|
||||
@@ -327,6 +327,15 @@ public interface TaskService extends CommonService<Task> {
|
||||
void cancelAndInst(String ids) throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* 强制取消任务和指令
|
||||
*
|
||||
* @param ids
|
||||
* @throws Exception
|
||||
*/
|
||||
void forceCancelAndInst(String ids) throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* 手动创建指令
|
||||
*
|
||||
|
||||
@@ -247,7 +247,8 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
||||
|
||||
String task_code = (String) whereJson.get("task_code");
|
||||
String vehicle_code = (String) whereJson.get("vehicle_code2");
|
||||
String vehicle_code = (String) whereJson.get("vehicle_code");
|
||||
String vehicle_code2 = (String) whereJson.get("vehicle_code2");
|
||||
String material_type = (String) whereJson.get("material_type");
|
||||
String status = (String) whereJson.get("status");
|
||||
String point_code = (String) whereJson.get("point_code");
|
||||
@@ -262,6 +263,9 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
if (!StrUtil.isEmpty(vehicle_code)) {
|
||||
wrapper.eq(Task::getVehicle_code, vehicle_code);
|
||||
}
|
||||
if (!StrUtil.isEmpty(vehicle_code2)) {
|
||||
wrapper.like(Task::getVehicle_code2, vehicle_code2);
|
||||
}
|
||||
if (!StrUtil.isEmpty(material_type)) {
|
||||
wrapper.eq(Task::getMaterial, material_type);
|
||||
}
|
||||
@@ -292,6 +296,7 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
public Map<String, Object> queryAllByCache(Map whereJson, Pageable page) {
|
||||
String task_code = (String) whereJson.get("task_code");
|
||||
String vehicle_code = (String) whereJson.get("vehicle_code");
|
||||
String vehicle_code2 = (String) whereJson.get("vehicle_code2");
|
||||
String material_type = (String) whereJson.get("material_type");
|
||||
String status = (String) whereJson.get("status");
|
||||
String point_code = (String) whereJson.get("point_code");
|
||||
@@ -933,6 +938,38 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void forceCancelAndInst(String id) throws Exception {
|
||||
TaskDto entity = this.findById(id);
|
||||
if (entity == null) {
|
||||
throw new BadRequestException(LangProcess.msg("error_sysAuth"));
|
||||
}
|
||||
|
||||
InstructionDto instdto = instructionService.findByTaskid(id, "instruction_status <2 ");
|
||||
if (instdto != null) {
|
||||
instructionService.cancel(instdto.getInstruction_id());
|
||||
}
|
||||
|
||||
String currentUsername = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
entity.setUpdate_time(now);
|
||||
entity.setUpdate_by(currentUsername);
|
||||
entity.setTask_status(TaskStatusEnum.CANCEL.getIndex());
|
||||
entity.setRemark("堆垛机空出");
|
||||
|
||||
Task task = ConvertUtil.convert(entity, Task.class);
|
||||
taskMapper.updateById(task);
|
||||
|
||||
//移除任务缓存信息
|
||||
this.removeByCodeFromCache(entity.getTask_code());
|
||||
//反馈上位系统任务状态
|
||||
// this.feedWmsTaskStatus(entity);
|
||||
//关闭仙工运单序列
|
||||
if(StrUtil.equals(task.getTask_type(),TaskTypeEnum.Standard_AGV_Task.getCode()) && (StrUtil.equals(task.getAgv_system_type(), AgvSystemTypeEnum.One_NDC_System_Type.getCode())||StrUtil.equals(task.getAgv_system_type(), AgvSystemTypeEnum.XG_System_Type.getCode()))) {
|
||||
this.markComplete(entity);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void cancelAndInst(String id) throws Exception {
|
||||
|
||||
@@ -6,7 +6,7 @@ spring:
|
||||
freemarker:
|
||||
check-template-location: false
|
||||
profiles:
|
||||
active: dev
|
||||
active: prod
|
||||
jackson:
|
||||
time-zone: GMT+8
|
||||
data:
|
||||
@@ -58,8 +58,8 @@ spring:
|
||||
queueTimeout: 100
|
||||
executors: # 动态线程池配置,都有默认值,采用默认值的可以不配置该项,减少配置量
|
||||
- threadPoolName: cool_pool # 线程池名称,必填dtpExecutor1
|
||||
threadPoolAliasName: core_thread # 线程池别名,可选
|
||||
executorType: common # 线程池类型 common、eager、ordered、scheduled、priority,默认 common
|
||||
threadPoolAliasName: core_thread # 线程池别名,可选
|
||||
executorType: common # 线程池类型 common、eager、ordered、scheduled、priority,默认 common
|
||||
corePoolSize: 30 # 核心线程数,默认1
|
||||
maximumPoolSize: 50 # 最大线程数,默认cpu核数
|
||||
queueCapacity: 1024 # 队列容量,默认1024
|
||||
@@ -70,9 +70,9 @@ spring:
|
||||
tryInterrupt: true
|
||||
allowCoreThreadTimeOut: true # 是否允许核心线程池超时,默认false
|
||||
waitForTasksToCompleteOnShutdown: true # 参考spring线程池设计,优雅关闭线程池,默认true
|
||||
awaitTerminationSeconds: 15 # 优雅关闭线程池时,阻塞等待线程池中任务执行时间,默认3,单位(s)
|
||||
awaitTerminationSeconds: 5 # 优雅关闭线程池时,阻塞等待线程池中任务执行时间,默认3,单位(s)
|
||||
preStartAllCoreThreads: false # 是否预热所有核心线程,默认false
|
||||
runTimeout: 10000 # 任务执行超时阈值,单位(ms),默认0(不统计)
|
||||
runTimeout: 2000 # 任务执行超时阈值,单位(ms),默认0(不统计)
|
||||
queueTimeout: 1000 # 任务在队列等待超时阈值,单位(ms),默认0(不统计)
|
||||
- threadPoolName: scheduled_pool # 线程池名称,必填
|
||||
threadPoolAliasName: scheduled_thread # 线程池别名,可选
|
||||
@@ -89,7 +89,7 @@ spring:
|
||||
waitForTasksToCompleteOnShutdown: true # 参考spring线程池设计,优雅关闭线程池,默认true
|
||||
awaitTerminationSeconds: 5 # 优雅关闭线程池时,阻塞等待线程池中任务执行时间,默认3,单位(s)
|
||||
preStartAllCoreThreads: false # 是否预热所有核心线程,默认false
|
||||
runTimeout: 5000 # 任务执行超时阈值,单位(ms),默认0(不统计)
|
||||
runTimeout: 2000 # 任务执行超时阈值,单位(ms),默认0(不统计)
|
||||
queueTimeout: 1000 # 任务在队列等待超时阈值,单位(ms),默认0(不统计)
|
||||
task:
|
||||
pool:
|
||||
@@ -158,8 +158,4 @@ mybatis-plus:
|
||||
lucene:
|
||||
index:
|
||||
path: C:\acs\lucene\indexl
|
||||
tlog:
|
||||
pattern: "[$preApp][$preIp][$spanId][$traceId]"
|
||||
enable-invoke-time-print: true
|
||||
id-generator: org.nl.config.TlogIdGenerator
|
||||
|
||||
|
||||
Reference in New Issue
Block a user