fix
This commit is contained in:
@@ -19,7 +19,8 @@ public class ItemProtocol {
|
||||
public static String item_task = "task";
|
||||
public static String item_weight = "weight";
|
||||
public static String item_material_type = "material_type";
|
||||
public static String item_barcode = "barcode";
|
||||
public static String item_sub_tray = "sub_tray";
|
||||
public static String item_mother_tray = "mother_tray";
|
||||
public static String item_to_command = "to_command";
|
||||
public static String item_to_target = "to_target";
|
||||
public static String item_to_task = "to_task";
|
||||
@@ -59,8 +60,12 @@ public class ItemProtocol {
|
||||
public int getMaterialType() {
|
||||
return this.getOpcIntegerValue(item_material_type);
|
||||
}
|
||||
public int getBarcode() {
|
||||
return this.getOpcIntegerValue(item_barcode);
|
||||
public int getSubTray() {
|
||||
return this.getOpcIntegerValue(item_sub_tray);
|
||||
}
|
||||
|
||||
public int getMotherTray() {
|
||||
return this.getOpcIntegerValue(item_mother_tray);
|
||||
}
|
||||
|
||||
public int getToCommand() {
|
||||
@@ -105,7 +110,8 @@ public class ItemProtocol {
|
||||
list.add(new ItemDto(item_task, "任务号", "DB600.D4"));
|
||||
list.add(new ItemDto(item_weight, "重量", "DB600.D4"));
|
||||
list.add(new ItemDto(item_material_type, "物料类型", "DB600.D4"));
|
||||
list.add(new ItemDto(item_barcode, "条码", "DB600.D4"));
|
||||
list.add(new ItemDto(item_sub_tray, "子托盘条码", "DB600.D4"));
|
||||
list.add(new ItemDto(item_mother_tray, "母托盘条码", "DB600.D4"));
|
||||
list.add(new ItemDto(item_error, "报警信号", "DB600.B5"));
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -81,8 +81,10 @@ public class SsxSiteDeviceDriver extends AbstractOpcDeviceDriver implements Devi
|
||||
double last_weight = 0;
|
||||
int material_type = 0;
|
||||
int last_material_type =0;
|
||||
int barcode = 0;
|
||||
int last_barcode =0;
|
||||
int sub_tray = 0;
|
||||
int last_sub_tray =0;
|
||||
int mother_tray = 0;
|
||||
int last_mother_tray =0;
|
||||
|
||||
|
||||
boolean hasVehicle = false;
|
||||
@@ -148,7 +150,8 @@ public class SsxSiteDeviceDriver extends AbstractOpcDeviceDriver implements Devi
|
||||
action = this.itemProtocol.getAction();
|
||||
weight = this.itemProtocol.getWeight();
|
||||
material_type = this.itemProtocol.getMaterialType();
|
||||
barcode = this.itemProtocol.getBarcode();
|
||||
mother_tray = this.itemProtocol.getMotherTray();
|
||||
sub_tray = this.itemProtocol.getSubTray();
|
||||
if (mode != last_mode) {
|
||||
this.setRequireSucess(false);
|
||||
if(mode==2){
|
||||
@@ -220,7 +223,8 @@ public class SsxSiteDeviceDriver extends AbstractOpcDeviceDriver implements Devi
|
||||
last_task = task;
|
||||
last_weight = weight;
|
||||
last_material_type = material_type;
|
||||
last_barcode = barcode;
|
||||
last_sub_tray = sub_tray;
|
||||
last_mother_tray = mother_tray;
|
||||
last_action = action;
|
||||
|
||||
}
|
||||
@@ -337,6 +341,9 @@ public class SsxSiteDeviceDriver extends AbstractOpcDeviceDriver implements Devi
|
||||
request.setRequest_medthod_name(RequestMethodEnum.apply_ssxbkj.getName());
|
||||
}else if (type==8) {
|
||||
//原材料入库
|
||||
request.setSub_tray(String.valueOf(sub_tray));
|
||||
request.setMother_tray(String.valueOf(mother_tray));
|
||||
request.setWeight(String.valueOf(weight));
|
||||
request.setRequest_medthod_code(RequestMethodEnum.apply_yclrk.getCode());
|
||||
request.setRequest_medthod_name(RequestMethodEnum.apply_yclrk.getName());
|
||||
}
|
||||
|
||||
@@ -51,5 +51,19 @@ public class FeedBackTaskStatusRequest extends BaseRequest {
|
||||
*/
|
||||
private String tier;
|
||||
|
||||
/**
|
||||
* 重量
|
||||
*/
|
||||
private String weight;
|
||||
|
||||
/**
|
||||
* 母托盘号
|
||||
*/
|
||||
private String mother_tray;
|
||||
|
||||
/**
|
||||
* 子托盘号
|
||||
*/
|
||||
private String sub_tray;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package org.nl;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.nl.acs.device.service.DeviceService;
|
||||
import org.nl.acs.device.service.dto.DeviceDto;
|
||||
import org.nl.system.service.user.ISysUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
@@ -13,9 +15,15 @@ import org.springframework.boot.test.context.SpringBootTest;
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
public class ApplicationTest {
|
||||
@Autowired
|
||||
private ISysUserService userService;
|
||||
private DeviceService deviceService;
|
||||
@Test
|
||||
void contextLoads() {
|
||||
System.out.println(userService.list());
|
||||
DeviceDto dto=new DeviceDto();
|
||||
for(int i=1;i<=30;i++) {
|
||||
dto.setDevice_code("FL"+i);
|
||||
dto.setDevice_name("FL"+i);
|
||||
dto.setDevice_type("conveyor");
|
||||
deviceService.create(dto);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user