Merge remote-tracking branch 'origin/master'

This commit is contained in:
2024-04-15 09:17:20 +08:00
44 changed files with 1008 additions and 1148 deletions

View File

@@ -801,7 +801,8 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
jo.put("task", task);
jo.put("walk_y", String.valueOf(this.walk_y));
jo.put("isOnline", this.getIsonline());
jo.put("error", this.getError());
jo.put("error", StrUtil.isNotEmpty(ErrorUtil.getDictDetail("nbjhj_error_type", String.valueOf(this.getError())))
?ErrorUtil.getDictDetail("nbjhj_error_type", String.valueOf(this.getError())):this.getError());
jo.put("isError", this.getIserror());
jo.put("message", this.getMessage());
jo.put("is_click", true);

View File

@@ -311,6 +311,8 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
mode = "单机";
} else if (this.getMode() == 2) {
mode = "联机";
} else if (this.getMode() == 3 && this.move2 == 1) {
mode = "等待人工吊卷";
} else if (this.getMode() == 3) {
mode = "运行中";
} else if (this.getMode() == 4) {
@@ -318,14 +320,14 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
}
if (this.getMove1() == 0 && this.getMove2() == 0) {
move1 = "无货";
move1 = "吊卷位";
move2 = "无货";
jo.put("hasGoods", false);
} else if (this.getMove1() == 1 || this.getMove2() == 1) {
if(this.getMove1() == 1){
move1 = "有货";
move1 = "下卷位";
}else if(this.getMove1() == 0){
move1 = "无货";
move2 = "吊卷位";
}
if(this.getMove2() == 1){
move2 = "有货";

View File

@@ -287,8 +287,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
param.put("product_area", paramService.findByCode("productArea").getValue());
acsToWmsService.sendDeviceStatus(param);
/*logServer.deviceItemValue(this.device_code, "error", String.valueOf(error));
logServer.deviceExecuteLog(this.device_code, "", "", "信号error" + last_error + "->" + error);*/
logServer.deviceItemValue(this.device_code, "error", String.valueOf(error));
logServer.deviceExecuteLog(this.device_code, "", "", "信号error" + last_error + "->" + error);
}
if (status != last_status) {
logServer.deviceItemValue(this.device_code, "status", String.valueOf(status));

View File

@@ -675,10 +675,10 @@ export default {
const obj = { name: '重量2', value: data[val] }
this.arr.push(obj)
} else if (val === 'move1') {
const obj = { name: '光电信号1', value: data[val] }
const obj = { name: '设备工位', value: data[val] }
this.arr.push(obj)
} else if (val === 'move2') {
const obj = { name: '光电信号2', value: data[val] }
const obj = { name: '设备有无货', value: data[val] }
this.arr.push(obj)
} else if (val === 'material1') {
const obj = { name: '物料1', value: this.dict.label.material[data[val]] }

View File

@@ -21,6 +21,7 @@ import org.nl.acs.device_driver.DeviceDriver;
import org.nl.acs.device_driver.RouteableDeviceDriver;
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
import org.nl.acs.device_driver.one_manipulator.box_package_manipulator.InteractionJsonDTO;
import org.nl.acs.enums.AcsToLmsApplyTaskTypeEnum;
import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl;
@@ -226,18 +227,17 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
container_type = this.itemProtocol.getContainer_type();
error = this.itemProtocol.getError();
task = this.itemProtocol.getTask();
container_no = this.itemProtocol.getContainer_no();
material_barcode= this.itemProtocol.getMaterialBarcode();
to_command = this.itemProtocol.getTo_command();
to_target = this.itemProtocol.getTotarget();
to_task = this.itemProtocol.getTo_task();
to_container_no = this.itemProtocol.getContainer_direction();
to_container_type = this.itemProtocol.getContainer_no();
if (mode != last_mode) {
requireSucess = false;
if(mode == 2){
clearWrite();
}
}
@@ -271,7 +271,7 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
break;
case 2:
//申请任务
if (move == 1 && !requireSucess && task==0) {
if (move == 1 && !requireSucess) {
instruction_require();
}
break;
@@ -320,9 +320,14 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
public void writing(int command) {
String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
+ "." + org.nl.acs.device_driver.conveyor.standard_conveyor_control_with_scanner.ItemProtocol.item_to_command;
Map<String, Object> itemMap = new HashMap<String, Object>();
itemMap.put(to_command, command);
this.control(itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
@@ -479,6 +484,9 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
String start_device_code = taskdto.getStart_device_code();
String route_plan_code = taskdto.getRoute_plan_code();
String next_device_code = "";
String interactionJson = taskdto.getInteraction_json();
InteractionJsonDTO interactionJsonDTO = JSON.parseObject(interactionJson, InteractionJsonDTO.class);
String containerType = interactionJsonDTO.getContainerType();
/**
* 开始平均分配
*/
@@ -517,7 +525,7 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
next_point_code = next_device_code;
}
Instruction instdto = new Instruction();
packageData(instdto, route_plan_code, taskdto, taskid, taskcode, start_device_code, next_device_code, start_point_code, next_point_code, priority);
packageData(instdto, route_plan_code, taskdto, taskid, taskcode, start_device_code, next_device_code, start_point_code, next_point_code, priority,containerType);
log.error("=================================,{}", instdto.getCreate_by());
try {
instructionService.create(instdto);
@@ -542,31 +550,33 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
}
private void writeData(String next_addr, List list, Instruction inst) {
List list1 = new ArrayList();
Map map = new HashMap();
map.put("code", "to_target");
map.put("value", next_addr);
list.add(map);
list1.add(map);
this.writing(list1);
List list2 = new ArrayList();
Map map1 = new HashMap();
map1.put("code", "to_task");
map1.put("value", inst.getInstruction_code());
list.add(map1);
Map map2 = new HashMap();
map2.put("code", "to_command");
map2.put("value", "1");
list.add(map2);
list2.add(map1);
this.writing(list2);
List list4 = new ArrayList();
Map map3 = new HashMap();
map3.put("code", "to_container_type");
map3.put("value", inst.getVehicle_type());
list.add(map3);
Map map4 = new HashMap();
map4.put("code", "to_container_no");
map4.put("value", "1");
list.add(map4);
this.writing(list);
list4.add(map3);
this.writing(list4);
List list3 = new ArrayList();
Map map2 = new HashMap();
map2.put("code", "to_command");
map2.put("value", "1");
list3.add(map2);
this.writing(list3);
}
private static void packageData(Instruction instdto, String route_plan_code, TaskDto taskdto, String taskid, String taskcode, String start_device_code, String next_device_code, String start_point_code, String next_point_code, String priority) {
private static void packageData(Instruction instdto, String route_plan_code, TaskDto taskdto, String taskid, String taskcode, String start_device_code, String next_device_code, String start_point_code, String next_point_code, String priority,String containerType) {
instdto.setInstruction_id(IdUtil.simpleUUID());
instdto.setRoute_plan_code(route_plan_code);
instdto.setRemark(taskdto.getRemark());
@@ -584,6 +594,7 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
instdto.setPriority(priority);
instdto.setInstruction_status("0");
instdto.setExecute_device_code(start_point_code);
instdto.setVehicle_type(containerType);
}
public void writeData(String next_addr, Instruction instdto, Map map) {
@@ -607,6 +618,11 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
}
}
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
try {
this.checkcontrol(itemMap);
} catch (Exception e) {
@@ -632,6 +648,11 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
//itemMap.put(to_param, Integer.parseInt(value));
this.control(itemMap);
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号设备号:" + device_code + ",下发电气:" + to_param + ",下发电气值:" + param);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
public synchronized boolean finish_instruction() throws Exception {
@@ -663,32 +684,19 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
jo.put("mode", mode);
jo.put("message", LangProcess.msg(message));
jo.put("error", this.getError());
String move = "无货";
if(this.move == 1){
move = "有货";
}
jo.put("move", move);
jo.put("task", task);
jo.put("type", container_type);
jo.put("is_click", true);
jo.put("isOnline", this.getIsonline());
jo.put("requireSucess", requireSucess);
return jo;
}
// /**
// * 获取任务信息
// */
// public JSONObject getLedMessage(Instruction instdto) {
// JSONObject json = new JSONObject();
// json.put("task_code", instdto.getTask_code());
// json.put("inst_code", instdto.getInstruction_code());
// json.put("start_device_code", instdto.getStart_device_code());
// json.put("next_device_code", instdto.getNext_device_code());
// json.put("material_type", instdto.getMaterial());
// json.put("quantity", instdto.getQuantity());
// json.put("vehicle_code", instdto.getVehicle_code());
// json.put("instruction_status", instdto.getInstruction_status());
// json.put("entry_time", instdto.getCreate_time());
// String acsIp = paramService.findByCode(AcsConfig.ACSIP).getValue();
// json.put("ip", acsIp);
// return json;
// }
/**
* 更新指令状态
@@ -762,4 +770,30 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
}
return true;
}
public void clearWrite() {
List list = new ArrayList();
Map map = new HashMap();
map.put("code", "to_target");
map.put("value", "0");
list.add(map);
Map map2 = new HashMap();
map2.put("code", "to_task");
map2.put("value", "0");
list.add(map2);
Map map3 = new HashMap();
map3.put("code", "to_command");
map3.put("value", "0");
list.add(map3);
Map map4 = new HashMap();
map4.put("code", "to_container_type");
map4.put("value", "0");
list.add(map4);
this.writing(list);
message = null;
vehicle_code = null;
}
}

View File

@@ -45,15 +45,6 @@ public class ItemProtocol {
* 任务号
*/
public static String item_task = "task";
/**
* 出数字托盘号
*/
public static String item_container_no = "container_no";
/**
* 子卷条码
*/
public static String item_material_barcode = "material_barcode";
/**
* 下发命令
@@ -63,10 +54,6 @@ public class ItemProtocol {
* 下发托盘类型
*/
public static String item_to_container_type = "to_container_type";
/**
* 下发接纯数字托盘号
*/
public static String item_to_container_no = "to_container_no";
/**
* 下发任务号
*/
@@ -76,11 +63,6 @@ public class ItemProtocol {
*/
public static String item_to_target = "to_target";
/**
* 托盘条码
*/
public static String item_barcode = "barcode";
@@ -90,9 +72,6 @@ public class ItemProtocol {
this.driver = driver;
}
public String getMaterialBarcode() {
return this.getOpcStringValue(item_material_barcode);
}
public int getHeartbeat() {
return this.getOpcIntegerValue(item_heartbeat);
}
@@ -117,9 +96,6 @@ public class ItemProtocol {
return this.getOpcIntegerValue(item_action);
}
public int getContainer_no() {
return this.getOpcIntegerValue(item_container_no);
}
public int getError() {
return this.getOpcIntegerValue(item_error);
@@ -133,9 +109,6 @@ public class ItemProtocol {
return this.getOpcIntegerValue(item_to_task);
}
public String getBarcode() {
return this.getOpcStringValue(item_barcode);
}
@@ -151,9 +124,6 @@ public class ItemProtocol {
return this.getOpcIntegerValue(item_to_container_type);
}
public int getTo_container_no() {
return this.getOpcIntegerValue(item_to_container_no);
}
Boolean isonline;
@@ -198,12 +168,9 @@ public class ItemProtocol {
list.add(new ItemDto(item_move, "光电信号", "DB101.B3"));
list.add(new ItemDto(item_container_direction, "托盘方向", "DB101.B4"));
list.add(new ItemDto(item_container_type, "托盘类型", "DB101.B5"));
list.add(new ItemDto(item_container_no, "纯数字托盘号", "DB101.D7"));
list.add(new ItemDto(item_action, "动作类型", "DB101.B6"));
list.add(new ItemDto(item_error, "报警", "DB101.B58"));
list.add(new ItemDto(item_task, "任务号", "DB101.D68"));
list.add(new ItemDto(item_material_barcode, "子卷条码", "DB601.STRING1.50"));
list.add(new ItemDto(item_barcode, "托盘条码", "DB602.STRING1.50"));
return list;
}
@@ -212,7 +179,6 @@ public class ItemProtocol {
list.add(new ItemDto(item_to_target, "下发仓位号", "DB102.W2"));
list.add(new ItemDto(item_to_command, "下发命令", "DB102.W4"));
list.add(new ItemDto(item_to_task, "下发任务号", "DB102.D1"));
list.add(new ItemDto(item_to_container_no, "下发接纯数字托盘号", "DB102.D3"));
list.add(new ItemDto(item_to_container_type, "下发托盘类型", "DB102.B5"));
return list;
}

View File

@@ -121,7 +121,7 @@ public class ItemProtocol {
/**
*木箱宽度
*/
public static String item_to_weight = "to_weight";
public static String item_to_weight = "to_width";
/**
*木箱高度
*/

View File

@@ -23,6 +23,7 @@ import org.nl.acs.device_driver.RouteableDeviceDriver;
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
import org.nl.acs.device_driver.led.led_screen.LedScreenDeviceDriver;
import org.nl.acs.device_driver.one_manipulator.box_package_manipulator.InteractionJsonDTO;
import org.nl.acs.enums.StorageTypeEnum;
import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.history.ErrorUtil;
@@ -144,9 +145,9 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
String hand_material_barcode = null;
//数量
int qty = 0;
int last_qty = 0;
//高度
int height = 0;
int last_height = 0;
//托盘方向
int carrier_direction = 0;
@@ -219,7 +220,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
to_container_type = this.itemProtocol.getTo_container_type();
container_type = this.itemProtocol.getContainer_type();
carrier_direction = this.itemProtocol.getCarrier_direction();
qty = this.itemProtocol.getQty();
height = this.itemProtocol.getHeight();
weight = this.itemProtocol.getWeight();
barcode = this.itemProtocol.getBarcode();
material_barcode = this.itemProtocol.getMaterialBarcode();
@@ -306,7 +307,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
if (mode != 2) {
remark = "universal_remark2";
}
if (move != 0) {
if (move != 1) {
remark = "universal_remark3";
}
if (task != 0) {
@@ -338,7 +339,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
last_hj_task = hj_task;
last_container_type = container_type;
last_carrier_direction = carrier_direction;
last_qty = qty;
last_height = height;
last_weight = weight;
last_barcode = barcode;
}
@@ -475,6 +476,9 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
String vehiclecode = taskdto.getVehicle_code();
String priority = taskdto.getPriority();
Instruction instdto = new Instruction();
String interactionJson = taskdto.getInteraction_json();
InteractionJsonDTO interactionJsonDTO = JSON.parseObject(interactionJson, InteractionJsonDTO.class);
String containerType = interactionJsonDTO.getContainerType();
if (TaskTypeEnum.AGV_Task.getIndex().equals(taskdto.getTask_type())){
String route_plan_code = taskdto.getRoute_plan_code();
@@ -489,17 +493,18 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
Integer start = 0;
String start_device_code = pathlist.get(start);
String next_device_code = pathlist.get(start+1);
//判断有无出入库任务是相同路线
TaskDto dto = taskserver.findByCodeAndExcute(taskdto.getNext_device_code(), taskdto.getStart_device_code());
if (ObjectUtil.isNotEmpty(dto)){
requireSucess = false;
return false;
}
packageInstrcutData(instdto, taskdto, taskid, taskcode, vehiclecode, priority,start_device_code,next_device_code);
packageInstrcutData(instdto, taskdto, taskid, taskcode, vehiclecode, priority,start_device_code,next_device_code,containerType);
}else {
packageInstrcutData(instdto, taskdto, taskid, taskcode, vehiclecode, priority,taskdto.getStart_device_code(),taskdto.getNext_device_code());
packageInstrcutData(instdto, taskdto, taskid, taskcode, vehiclecode, priority,taskdto.getStart_device_code(),taskdto.getNext_device_code(),containerType);
}
try {
instructionService.create(instdto);
@@ -525,9 +530,14 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
map2.put("value", instdto.getInstruction_code());
list.add(map2);
Map map3 = new HashMap();
map3.put("code", "to_container_type");
map3.put("value", instdto.getVehicle_type());
list.add(map3);
Map map4 = new HashMap();
map3.put("code", "to_command");
map3.put("value", "1");
list.add(map3);
list.add(map4);
this.writing(list);
led_message = getLedMessage(instdto);
List<String> deviceCodes = this.getExtraDeviceCodes("link_device_code");
@@ -601,7 +611,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
return json;
}
private void packageInstrcutData(Instruction instdto, TaskDto taskdto, String taskid, String taskcode, String vehiclecode, String priority,String startCode, String endCode) {
private void packageInstrcutData(Instruction instdto, TaskDto taskdto, String taskid, String taskcode, String vehiclecode, String priority,String startCode, String endCode,String containerType) {
instdto.setInstruction_id(IdUtil.simpleUUID());
instdto.setRoute_plan_code(taskdto.getRoute_plan_code());
instdto.setRemark(taskdto.getRemark());
@@ -621,6 +631,8 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
instdto.setInstruction_status("0");
instdto.setExecute_device_code(device_code);
instdto.setInstruction_type(taskdto.getTask_type());
instdto.setVehicle_type(containerType);
}

View File

@@ -32,9 +32,9 @@ public class ItemProtocol {
*/
public static String item_error = "error";
/**
* 数量
* 高度
*/
public static String item_qty = "qty";
public static String item_height = "height";
/**
* 任务号
*/
@@ -112,8 +112,8 @@ public class ItemProtocol {
return this.getOpcIntegerValue(item_task);
}
public int getQty(){
return this.getOpcIntegerValue(item_qty);
public int getHeight(){
return this.getOpcIntegerValue(item_height);
}
public int getCarrier_direction(){
@@ -189,7 +189,7 @@ public class ItemProtocol {
list.add(new ItemDto(item_task, "任务号", "DB1.D6"));
list.add(new ItemDto(item_container_type, "托盘类型", "DB1.B7"));
list.add(new ItemDto(item_carrier_direction, "托盘方向", "DB1.B8"));
list.add(new ItemDto(item_qty, "数量", "DB1.B9"));
list.add(new ItemDto(item_height, "高度", "DB1.B9"));
list.add(new ItemDto(item_weight, "重量", "DB1.B10"));
list.add(new ItemDto(item_barcode, "托盘条码", "DB602.STRING1.50"));
list.add(new ItemDto(item_material_barcode, "子卷条码", "DB601.STRING1.50"));

View File

@@ -213,7 +213,7 @@ public class BoxPackageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
List toInstructions;
//行架机械手申请任务
if (mode == 2 && move == 0 && task == 0 && !requireSucess) {
if (mode == 2 && move == 0 && !requireSucess) {
boolean res = applyTask();
if (res) {
notCreateInstMessage = "";
@@ -407,10 +407,10 @@ public class BoxPackageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
ManipulatorCacheDeviceDriver manipulatorCacheDeviceDriver;
if (startDevice.getDeviceDriver() instanceof ManipulatorCacheDeviceDriver) {
manipulatorCacheDeviceDriver = (ManipulatorCacheDeviceDriver) startDevice.getDeviceDriver();
if (manipulatorCacheDeviceDriver.getMode() != 2 && manipulatorCacheDeviceDriver.getAction() !=1) {
notCreateInstMessage = "universal_notCreateInstMessage3";
return false;
}
// if (manipulatorCacheDeviceDriver.getMode() != 2) {
// notCreateInstMessage = "universal_notCreateInstMessage3";
// return false;
// }
}
String taskid = taskDto.getTask_id();

View File

@@ -11,7 +11,7 @@ public class InteractionJsonDTO {
private String maxNo;
/**
*木箱最大数量
*木箱放入数量
*/
private String boxNo;
@@ -31,4 +31,9 @@ public class InteractionJsonDTO {
*子卷长度
*/
private String len;
/**
* 托盘类型
*/
private String containerType;
}

View File

@@ -233,8 +233,8 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
}
}
//放货完成
if (action == 4 && move == 0) {
//任务完成
if (action == 5 && move == 0) {
if (inst != null) {
try {
logServer.deviceExecuteLog(this.device_code, "", "", "放货完成");
@@ -351,7 +351,7 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
notCreateInstMessage = "universal_notCreateInstMessage1";
throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!");
}
//存在托盘才可以申请任务
/*//存在托盘才可以申请任务
BeltConveyorDeviceDriver beltConveyorDeviceDriver;
if (nextDevice.getDeviceDriver() instanceof BeltConveyorDeviceDriver) {
beltConveyorDeviceDriver = (BeltConveyorDeviceDriver) nextDevice.getDeviceDriver();
@@ -359,7 +359,7 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
notCreateInstMessage = "universal_notCreateInstMessage2";
return false;
}
}
}*/
String taskid = taskDto.getTask_id();
@@ -451,6 +451,12 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
map9.put("value", interactionJsonDTO.getLayer());
list.add(map9);
}
if (ObjectUtil.isNotEmpty(interactionJsonDTO.getContainerType())) {
Map<String, Object> map10 = new HashMap<>();
map10.put("code", "to_type");
map10.put("value", interactionJsonDTO.getContainerType());
list.add(map10);
}
}
this.writing(list);
}

View File

@@ -28,4 +28,9 @@ public class InteractionJsonDTO {
*/
private String layer;
/**
* 托盘类型
*/
private String containerType;
}

View File

@@ -37,6 +37,8 @@ import org.nl.acs.task.service.TaskService;
import org.nl.acs.task.service.dto.TaskDto;
import org.nl.config.SpringContextHolder;
import org.nl.config.language.LangProcess;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.Date;
@@ -69,6 +71,8 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
DeviceErrorLogService errorLogServer = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
@Autowired
AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsServiceImpl.class);
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
//工作模式
int mode = 0;
@@ -288,6 +292,11 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
if (ObjectUtil.isNotEmpty(itemMap)) {
this.control(itemMap);
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}

View File

@@ -532,7 +532,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
requireSucess = true;
break;
}
if (ObjectUtil.isNotNull(list)) {
if (list.size() != 0) {
this.writing(list);
}

View File

@@ -567,7 +567,7 @@ public class BlankManipulatorDeviceDriver extends AbstractOpcDeviceDriver implem
}
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content(LangProcess.msg("universal_message10") + itemMap)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}

View File

@@ -298,6 +298,11 @@ public class BlankingButtonDriver extends AbstractOpcDeviceDriver implements Dev
itemMap.put(to_param, Integer.parseInt(value));
this.control(itemMap);
logServer.deviceExecuteLog(deviceCode, "", "", "下发电气信号设备号:" + deviceCode + ",下发电气:" + to_param + ",下发电气值:" + value);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(deviceCode)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}

View File

@@ -236,6 +236,11 @@ public class GreenFoilMachineButtonDriver extends AbstractOpcDeviceDriver implem
itemMap.put(to_param, Integer.parseInt(value));
this.control(itemMap);
logServer.deviceExecuteLog(deviceCode, "", "", "下发电气信号设备号:" + deviceCode + ",下发电气:" + to_param + ",下发电气值:" + value);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(deviceCode)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}

View File

@@ -20,6 +20,8 @@ import org.nl.acs.monitor.DeviceStageMonitor;
import org.nl.acs.opc.DeviceAppService;
import org.nl.acs.route.service.RouteLineService;
import org.nl.acs.task.service.TaskService;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.nl.system.service.param.ISysParamService;
import org.nl.config.SpringContextHolder;
import org.springframework.beans.factory.annotation.Autowired;
@@ -52,6 +54,8 @@ public class HongXiangStationDeviceDriver extends AbstractOpcDeviceDriver implem
DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogService.class);
@Autowired
AgvService agvService = SpringContextHolder.getBean(AgvService.class);
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
private Date instruction_require_time = new Date();
private Date instruction_finished_time = new Date();
@@ -129,6 +133,11 @@ public class HongXiangStationDeviceDriver extends AbstractOpcDeviceDriver implem
Map<String, Object> itemMap = new HashMap<String, Object>();
itemMap.put(to_command, command);
this.control(itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
/**
@@ -158,6 +167,11 @@ public class HongXiangStationDeviceDriver extends AbstractOpcDeviceDriver implem
itemMap.put(to_param, value);
this.control(itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}

View File

@@ -27,6 +27,8 @@ import org.nl.acs.opc.DeviceAppService;
import org.nl.acs.route.service.RouteLineService;
import org.nl.acs.task.service.TaskService;
import org.nl.config.SpringContextHolder;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.*;
@@ -58,6 +60,8 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
AgvService agvService = SpringContextHolder.getBean(AgvService.class);
@Autowired
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
private String error_type = "hx_error_type";
@@ -243,6 +247,11 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
Map<String, Object> itemMap = new HashMap<String, Object>();
itemMap.put(to_command, command);
this.control(itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
public String getToParam() {
@@ -265,6 +274,11 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
if (ObjectUtil.isNotEmpty(itemMap)) {
this.checkcontrol(itemMap);
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}
@@ -299,6 +313,11 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
e.printStackTrace();
}
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号设备号:" + device_code + ",下发电气:" + to_param + ",下发电气值:" + value);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}

View File

@@ -24,6 +24,8 @@ import org.nl.acs.route.service.impl.RouteLineServiceImpl;
import org.nl.acs.task.service.TaskService;
import org.nl.config.SpringContextHolder;
import org.nl.config.language.LangProcess;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.HashMap;
@@ -51,6 +53,8 @@ public class InflatableShaftLibraryDeviceDriver extends AbstractOpcDeviceDriver
DeviceExtraService deviceExtraService = SpringContextHolder.getBean(DeviceExtraServiceImpl.class);
@Autowired
DeviceErrorLogService errorLogServer = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
//心跳
public int heartbeat = 0;
@@ -128,6 +132,11 @@ public class InflatableShaftLibraryDeviceDriver extends AbstractOpcDeviceDriver
itemMap.put(to_param, Integer.parseInt(value));
this.control(itemMap);
logServer.deviceExecuteLog(deviceCode, "", "", "下发电气信号设备号:" + deviceCode + ",下发电气:" + to_param + ",下发电气值:" + value);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(deviceCode)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}

View File

@@ -9,6 +9,8 @@ import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
import org.nl.acs.log.service.DeviceExecuteLogService;
import org.nl.config.SpringContextHolder;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.Date;
@@ -26,7 +28,8 @@ public class LampThreecolorDeviceDriver extends AbstractOpcDeviceDriver implemen
@Autowired
DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogService.class);
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
String container;
String container_type_desc;
String last_container_type_desc;
@@ -103,6 +106,11 @@ public class LampThreecolorDeviceDriver extends AbstractOpcDeviceDriver implemen
itemMap.put(to_param, Integer.parseInt(value));
this.control(itemMap);
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号设备号:" + device_code + ",下发电气:" + to_param + ",下发电气值:" + value);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}

View File

@@ -776,6 +776,11 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
if (ObjectUtil.isNotEmpty(itemMap)) {
this.checkcontrol(itemMap);
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}
@@ -1157,6 +1162,11 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
}
}
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号设备号:" + device_code + ",下发电气:" + to_param + ",下发电气值:" + value);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
public void writing(List list) {

View File

@@ -520,6 +520,11 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
}
}
logServer.deviceExecuteLog(deviceCode, "", "", "下发电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(deviceCode)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
this.control(itemMap);
}
@@ -534,6 +539,11 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
if (ObjectUtil.isNotEmpty(itemMap)) {
this.checkcontrol(itemMap);
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(deviceCode)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}
@@ -623,6 +633,11 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
itemMap.put(to_param, value);
// itemMap.put(to_param, Integer.parseInt(value));
this.control(itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(deviceCode)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}

View File

@@ -37,6 +37,8 @@ import org.nl.common.exception.BadRequestException;
import org.nl.common.utils.SecurityUtils;
import org.nl.config.SpringContextHolder;
import org.nl.config.language.LangProcess;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.*;
@@ -65,7 +67,8 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
DeviceExtraService deviceExtraService = SpringContextHolder.getBean(DeviceExtraServiceImpl.class);
@Autowired
DeviceErrorLogService errorLogServer = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
//工作模式
int mode = 0;
int lastMode = 0;
@@ -551,6 +554,11 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
if (ObjectUtil.isNotEmpty(itemMap)) {
this.control(itemMap);
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}

View File

@@ -36,6 +36,8 @@ import org.nl.common.exception.BadRequestException;
import org.nl.common.utils.SecurityUtils;
import org.nl.config.SpringContextHolder;
import org.nl.config.language.LangProcess;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.*;
@@ -63,6 +65,8 @@ public class PullTailManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
DeviceExtraService deviceExtraService = SpringContextHolder.getBean(DeviceExtraServiceImpl.class);
@Autowired
DeviceErrorLogService errorLogServer = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
//工作模式
int mode = 0;
@@ -499,6 +503,11 @@ public class PullTailManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
if (ObjectUtil.isNotEmpty(itemMap)) {
this.control(itemMap);
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}

View File

@@ -31,6 +31,8 @@ import org.nl.common.exception.BadRequestException;
import org.nl.common.utils.SecurityUtils;
import org.nl.config.SpringContextHolder;
import org.nl.config.language.LangProcess;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.openscada.opc.lib.da.Server;
import org.springframework.beans.factory.annotation.Autowired;
@@ -58,6 +60,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
DeviceAppService deviceAppservice = SpringContextHolder.getBean(DeviceAppServiceImpl.class);
DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl");
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
//分切行架机械手是否禁用 0否 1是
private int is_disable = 0;
@@ -551,6 +555,11 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
this.control(itemMap);
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号设备号:" + device_code + ",下发电气:" + to_param + ",下发电气值:" + value);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
public boolean exe_business() {
@@ -590,6 +599,11 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
Map<String, Object> itemMap = new HashMap<String, Object>();
itemMap.put(to_command, command);
this.control(itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
@@ -615,6 +629,11 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
}
}
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
this.control(itemMap);
}
@@ -804,6 +823,11 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
if (ObjectUtil.isNotEmpty(itemMap)) {
this.checkcontrol(itemMap);
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}
}

View File

@@ -24,6 +24,8 @@ import org.nl.acs.route.service.RouteLineService;
import org.nl.acs.task.service.TaskService;
import org.nl.config.SpringContextHolder;
import org.nl.config.language.LangProcess;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.nl.system.service.param.ISysParamService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -55,6 +57,8 @@ public class SubRollConveyorSiteDeviceDriver extends AbstractOpcDeviceDriver imp
DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogService.class);
@Autowired
AgvService agvService = SpringContextHolder.getBean(AgvService.class);
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
//工作模式
int mode = 0;
@@ -191,6 +195,11 @@ public class SubRollConveyorSiteDeviceDriver extends AbstractOpcDeviceDriver imp
if (ObjectUtil.isNotEmpty(itemMap)) {
this.control(itemMap);
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}
@@ -272,5 +281,10 @@ public class SubRollConveyorSiteDeviceDriver extends AbstractOpcDeviceDriver imp
itemMap.put(to_param, value);
// itemMap.put(to_param, Integer.parseInt(value));
this.control(itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}

View File

@@ -21,6 +21,8 @@ import org.nl.acs.log.service.DeviceExecuteLogService;
import org.nl.acs.monitor.DeviceStageMonitor;
import org.nl.config.SpringContextHolder;
import org.nl.config.language.LangProcess;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.*;
@@ -40,6 +42,8 @@ public class WasteFoilWeighingStationDriver extends AbstractOpcDeviceDriver impl
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogService.class);
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
private String error_type = "hx_error_type";
@@ -268,6 +272,11 @@ public class WasteFoilWeighingStationDriver extends AbstractOpcDeviceDriver impl
itemMap.put(to_param, Integer.parseInt(value));
this.control(itemMap);
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号设备号:" + device_code + ",下发电气:" + to_param + ",下发电气值:" + value);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
public String getToParam() {
@@ -290,6 +299,11 @@ public class WasteFoilWeighingStationDriver extends AbstractOpcDeviceDriver impl
if (ObjectUtil.isNotEmpty(itemMap)) {
this.control(itemMap);
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}

Binary file not shown.

Binary file not shown.

View File

@@ -252,8 +252,6 @@ import deviceCrud from '@/api/acs/device/device'
import { getDeviceByCodes } from '@/api/acs/device/deviceStageMonitor'
import '@logicflow/core/dist/style/index.css'
import '@logicflow/extension/lib/style/index.css'
import paramCrud from '@/api/system/param'
import { LogicFlow } from '@logicflow/core'
import { registerCustomElement } from '@/views/system/logicflow/editor/components/node'
import i18n from '@/i18n'
@@ -520,6 +518,9 @@ export default {
} else if (val === 'last_inst_message') {
const obj = { name: i18n.t('monitor.click.last_instruction_message'), value: data[val] }
this.arr.push(obj)
} else if (val === 'container_type') {
const obj = { name: '托盘类型', value: data[val] }
this.arr.push(obj)
} else if (val === 'barcode') {
const obj = { name: i18n.t('monitor.click.barcode'), value: data[val] }
this.arr.push(obj)

View File

@@ -146,13 +146,6 @@ public interface CheckOutBillService {
*/
void setPoint(JSONObject whereJson);
/**
* 设置一个站点
*
* @param whereJson /
*/
void oneSetPoint(JSONObject whereJson);
/**
* 设置一个站点
*

View File

@@ -24,7 +24,9 @@ import org.nl.wms.basedata.st.service.StorattrService;
import org.nl.wms.basedata.st.service.StructattrService;
import org.nl.wms.basedata.st.service.dto.StorattrDto;
import org.nl.wms.basedata.st.service.dto.StructattrDto;
import org.nl.wms.basedata.st.service.impl.StructattrServiceImpl;
import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl;
import org.nl.wms.pda.mps.eum.RegionTypeEnum;
import org.nl.wms.sch.manage.AbstractAcsTask;
import org.nl.wms.sch.manage.TaskStatusEnum;
import org.nl.wms.sch.service.PointService;
@@ -41,6 +43,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
/**
* PC端出入库新增
@@ -64,6 +67,7 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
private final RedissonClient redissonClient;
private JSONObject struct_jo = null;
@Override
public Map<String, Object> pageQuery(Map whereJson, Pageable page) {
@@ -551,6 +555,18 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
//判断是否为主存区,主存区调用自动分配,虚拟区调用普通查询
if (StrUtil.isNotEmpty(need_sect) && !"00".equals(need_sect_jo.getString("sect_type_attr"))) {
struct_jo = WQLObject.getWQLObject("st_ivt_structattr").query("sect_id = '" + need_sect + "' AND lock_type = '1' AND is_delete = '0' AND IFNULL( storagevehicle_code, '' ) = ''").uniqueResult(0);
// 如果为空则扩容
if (ObjectUtil.isEmpty(struct_jo)) {
JSONObject jsonParam = new JSONObject();
jsonParam.put("sect_id", whereJson.get("sect_id"));
jsonParam.put("stor_id", whereJson.get("stor_id"));
jsonParam.put("num", 50);
StructattrServiceImpl bean = SpringContextHolder.getBean(StructattrServiceImpl.class);
bean.oneCreate(jsonParam);
struct_jo = WQLObject.getWQLObject("st_ivt_structattr").query("sect_id = '" + need_sect + "' AND lock_type = '1' AND is_delete = '0' AND IFNULL( storagevehicle_code, '' ) = ''").uniqueResult(0);
}
} else {
jo_form.put("sect_id", whereJson.get("sect_id"));
struct_jo = this.autoDis(jo_form);
@@ -1359,8 +1375,6 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
* */
JSONObject struct_jo = new JSONObject();
String box_no = whereJson.getString("box_no");
String sect_id = whereJson.getString("sect_id");
@@ -1728,7 +1742,9 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
}
if (ObjectUtil.isEmpty(struct_jo)) {
throw new BadRequestException("未查询到可用的仓位!");
// 主存区类型更改成中转区类型:找一排主存区的更改中转区、把一排中转区的更改成主存区(只允许调用一次)
updateStructSect(col_num);
autoDisMove(whereJson);
}
return struct_jo;
}
@@ -2115,4 +2131,107 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
map.put("bill_status", "99");
dtl_wql.update(map, "iostorinv_id = '" + mst_row.get("iostorinv_id") + "'");
}
private void updateStructSect(String layer_num) {
WQLObject attr = WQLObject.getWQLObject("st_ivt_structattr");
WQLObject point = WQLObject.getWQLObject("sch_base_point");
/*
* 1.将主存区的一排更改为中转区
* 2.将中转区的一排更改为主存区
*/
String block_num = "";
String row_num = "";
// 1.找主存区数量小的一排转为中转区
// 根据块、排进行分组,优先空排 -> 有货数量少的
List<JSONObject> attrListAllEmp = WQL.getWO("ST_UPDATESTRUCTSECT_01").addParam("flag", "1")
.addParam("layer_num", layer_num).process().getResultJSONArray(0)
.toJavaList(JSONObject.class);
if (ObjectUtil.isEmpty(attrListAllEmp)) {
// 如果为空则查找有空位的排
List<JSONObject> attrListEmp = WQL.getWO("ST_UPDATESTRUCTSECT_01").addParam("flag", "2")
.addParam("layer_num", layer_num).process().getResultJSONArray(0)
.toJavaList(JSONObject.class);
if (ObjectUtil.isEmpty(attrListEmp)) {
throw new BadRequestException("自动扩容失败,主存区没有空位可扩容!");
}
// 判断是这排是否被锁住
String block_num_in = attrListEmp.stream()
.map(row -> row.getString("block_num"))
.collect(Collectors.joining("','"));
String row_num_in = attrListEmp.stream()
.map(row -> row.getString("row_num"))
.collect(Collectors.joining("','"));
List<JSONObject> rowList = attr.query("block_num in ('" + block_num_in + "') AND row_num in ('" + row_num_in + "') and layer_num = '" + layer_num + "' and sect_code = 'ZC01'")
.getResultJSONArray(0).toJavaList(JSONObject.class);
for (int i = 0; i < attrListEmp.size(); i++) {
JSONObject json = attrListEmp.get(i);
List<JSONObject> collect = rowList.stream()
.filter(row -> row.getString("block_num").equals(json.getString("block_num")) &&
row.getString("row_num").equals(json.getString("row_num"))
)
.collect(Collectors.toList());
// 判断是否全部都为未锁定
boolean isLock = collect.stream()
.allMatch(row -> row.getString("lock_type").equals("1"));
if (!isLock) {
continue;
}
block_num = json.getString("block_num");
row_num = json.getString("row_num");
break;
}
} else {
JSONObject json = attrListAllEmp.get(0);
block_num = json.getString("block_num");
row_num = json.getString("row_num");
}
// 2.将中转区的一排更改为主存区
// 查询中转区满的一排
List<JSONObject> attrListAllNoEmp = WQL.getWO("ST_UPDATESTRUCTSECT_01").addParam("flag", "3")
.addParam("layer_num", layer_num).process().getResultJSONArray(0)
.toJavaList(JSONObject.class);
if (ObjectUtil.isNotEmpty(attrListAllNoEmp)) {
// 更新仓位为主存区
JSONObject jsonParam2 = new JSONObject();
jsonParam2.put("sect_id", RegionTypeEnum.ZC01.getId());
jsonParam2.put("sect_code", "ZC01");
jsonParam2.put("sect_name", RegionTypeEnum.ZC01.getName());
JSONObject json = attrListAllNoEmp.get(0);
// 更新仓位
attr.update(jsonParam2,"sect_code = 'ZZ01' AND block_num = '"+json.getString("block_num")+"' AND row_num = '"+json.getString("row_num")+"' AND layer_num = '"+layer_num+"'");
// 更新点位
jsonParam2.put("region_id", RegionTypeEnum.ZC01.getId());
jsonParam2.put("region_code", "ZC01");
jsonParam2.put("region_name", RegionTypeEnum.ZC01.getName());
point.update(jsonParam2,"region_code = 'ZZ01' AND block_num = '"+json.getString("block_num")+"' AND row_num = '"+json.getString("row_num")+"' AND layer_num = '"+layer_num+"'");
}
// 更新仓位为中转区
JSONObject jsonParam = new JSONObject();
jsonParam.put("sect_id", RegionTypeEnum.ZZ01.getId());
jsonParam.put("sect_code", "ZZ01");
jsonParam.put("sect_name", RegionTypeEnum.ZZ01.getName());
attr.update(jsonParam,"sect_code = 'ZC01' AND block_num = '"+block_num+"' AND row_num = '"+row_num+"' AND layer_num = '"+layer_num+"'");
// 更新点位
jsonParam.put("region_id", RegionTypeEnum.ZZ01.getId());
jsonParam.put("region_code", "ZZ01");
jsonParam.put("region_name", RegionTypeEnum.ZZ01.getName());
point.update(jsonParam,"region_code = 'ZC01' AND block_num = '"+block_num+"' AND row_num = '"+row_num+"' AND layer_num = '"+layer_num+"'");
}
}

View File

@@ -0,0 +1,214 @@
[交易说明]
交易名: 更新仓位属性查询
所属模块:
功能简述:
版权所有:
表引用:
版本经历:
[数据库]
--指定数据库为空采用默认值默认为db.properties中列出的第一个库
[IO定义]
#################################################
## 表字段对应输入参数
#################################################
输入.flag TYPEAS s_string
输入.layer_num TYPEAS s_string
[临时表]
--这边列出来的临时表就会在运行期动态创建
[临时变量]
--所有中间过程变量均可在此处定义
[业务过程]
##########################################
# 1、输入输出检查 #
##########################################
##########################################
# 2、主过程前处理 #
##########################################
##########################################
# 3、业务主过程 #
##########################################
IF 输入.flag = "1"
QUERY
SELECT
*
FROM
(
SELECT
sa.block_num,
sa.row_num,
COUNT( sa.struct_code ) AS struct_num
FROM
st_ivt_structattr sa
WHERE
sa.is_delete = '0'
AND sa.is_used = '1'
AND sa.sect_code = 'ZC01'
OPTION 输入.layer_num <> ""
sa.layer_num = 输入.layer_num
ENDOPTION
GROUP BY
sa.block_num,
sa.row_num
) a
WHERE
EXISTS (
SELECT
*
FROM
(
SELECT
block_num,
row_num,
COUNT( sa2.struct_code ) AS struct_num
FROM
st_ivt_structattr sa2
WHERE
sa2.lock_type = '1'
AND sa2.is_used = '1'
AND sa2.is_delete = '0'
AND sa2.sect_code = 'ZC01'
AND IFNULL( sa2.storagevehicle_code, '' ) = ''
OPTION 输入.layer_num <> ""
sa2.layer_num = 输入.layer_num
ENDOPTION
GROUP BY
sa2.block_num,
sa2.row_num
) b
WHERE
b.block_num = a.block_num
AND b.row_num = a.row_num
AND a.struct_num = b.struct_num
) ORDER BY struct_num DESC
ENDSELECT
ENDQUERY
ENDIF
IF 输入.flag = "2"
QUERY
SELECT
*
FROM
(
SELECT
sa.block_num,
sa.row_num,
COUNT( sa.struct_code ) AS struct_num
FROM
st_ivt_structattr sa
WHERE
sa.is_delete = '0'
AND sa.is_used = '1'
AND sa.lock_type = '1'
AND sa.sect_code = 'ZC01'
OPTION 输入.layer_num <> ""
sa.layer_num = 输入.layer_num
ENDOPTION
GROUP BY
sa.block_num,
sa.row_num
) a
WHERE
EXISTS (
SELECT
*
FROM
(
SELECT
block_num,
row_num,
COUNT( sa2.struct_code ) AS struct_num
FROM
st_ivt_structattr sa2
WHERE
sa2.lock_type = '1'
AND sa2.is_used = '1'
AND sa2.is_delete = '0'
AND sa2.sect_code = 'ZC01'
AND IFNULL( sa2.storagevehicle_code, '' ) = ''
OPTION 输入.layer_num <> ""
sa2.layer_num = 输入.layer_num
ENDOPTION
GROUP BY
sa2.block_num,
sa2.row_num
) b
WHERE
b.block_num = a.block_num
AND b.row_num = a.row_num
) ORDER BY struct_num DESC
ENDSELECT
ENDQUERY
ENDIF
IF 输入.flag = "3"
QUERY
SELECT
*
FROM
(
SELECT
sa.block_num,
sa.row_num,
COUNT( sa.struct_code ) AS struct_num
FROM
st_ivt_structattr sa
WHERE
sa.is_delete = '0'
AND sa.is_used = '1'
AND sa.lock_type = '1'
AND sa.sect_code = 'ZZ01'
OPTION 输入.layer_num <> ""
sa.layer_num = 输入.layer_num
ENDOPTION
GROUP BY
sa.block_num,
sa.row_num
) a
WHERE
EXISTS (
SELECT
*
FROM
(
SELECT
block_num,
row_num,
COUNT( sa2.struct_code ) AS struct_num
FROM
st_ivt_structattr sa2
WHERE
sa2.lock_type = '1'
AND sa2.is_used = '1'
AND sa2.is_delete = '0'
AND sa2.sect_code = 'ZZ01'
AND IFNULL( sa2.storagevehicle_code, '' ) <> ''
OPTION 输入.layer_num <> ""
sa2.layer_num = 输入.layer_num
ENDOPTION
GROUP BY
sa2.block_num,
sa2.row_num
) b
WHERE
b.block_num = a.block_num
AND b.row_num = a.row_num
AND a.struct_num = b.struct_num
) ORDER BY struct_num DESC
ENDSELECT
ENDQUERY
ENDIF

View File

@@ -150,14 +150,6 @@ public class CheckOutBillController {
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@PostMapping("/oneSetPoint")
@Log("设置一个站点")
public ResponseEntity<Object> oneSetPoint(@RequestBody JSONObject whereJson) {
checkOutBillService.oneSetPoint(whereJson);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@PostMapping("/oneSetPoint2")
@Log("设置一个站点")

View File

@@ -601,29 +601,6 @@ export default {
})
}
},
oneSetPoint() {
if (this.form2.point_code === '') {
this.crud.notify('请先选择站点!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (this.currentDis.point_code) {
this.crud.notify('站点已设置!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (this.currentDis.work_status !== '00') {
this.crud.notify('任务已生成!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (this.currentDis.iostorinvdis_id !== null) {
this.currentDis.point_code = this.form2.point_code
checkoutbill.oneSetPoint(this.currentDis).then(res => {
this.queryTableDdis(this.currentDis.iostorinvdtl_id)
this.crud.notify('设置成功!', CRUD.NOTIFICATION_TYPE.INFO)
}).catch(() => {
this.currentDis.point_code = ''
})
}
},
oneSetPoint2() {
if (this.form2.point_code === '') {
this.crud.notify('请先选择站点!', CRUD.NOTIFICATION_TYPE.INFO)