手持fix
This commit is contained in:
@@ -47,259 +47,54 @@ import java.util.Map;
|
|||||||
public class GuhuashiSiteDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
|
public class GuhuashiSiteDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
|
||||||
protected ItemProtocol itemProtocol = new ItemProtocol(this);
|
protected ItemProtocol itemProtocol = new ItemProtocol(this);
|
||||||
|
|
||||||
InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl");
|
|
||||||
|
|
||||||
DeviceService deviceservice = SpringContextHolder.getBean("deviceServiceImpl");
|
|
||||||
|
|
||||||
RouteLineService routelineserver = SpringContextHolder.getBean("routeLineServiceImpl");
|
|
||||||
|
|
||||||
TaskService taskserver = SpringContextHolder.getBean("taskServiceImpl");
|
|
||||||
|
|
||||||
TaskMapper taskMapper;
|
|
||||||
|
|
||||||
AcsToWmsService acsToWmsService = SpringContextHolder.getBean("acsToWmsServiceImpl");
|
|
||||||
|
|
||||||
String container;
|
|
||||||
String container_type_desc;
|
|
||||||
String last_container_type_desc;
|
|
||||||
String last_container;
|
|
||||||
//放货准备锁
|
|
||||||
String putReadyLock = null;
|
|
||||||
//有货标记
|
|
||||||
protected boolean has_goods_tag = false;
|
|
||||||
|
|
||||||
private Date time = new Date();
|
|
||||||
|
|
||||||
int mode = 0;
|
|
||||||
int error = 0;
|
|
||||||
int move = 0;
|
|
||||||
int task = 0;
|
|
||||||
int action = 0;
|
|
||||||
int last_mode = 0;
|
|
||||||
int last_error = 0;
|
|
||||||
int last_move = 0;
|
|
||||||
int last_task = 0;
|
|
||||||
Boolean isonline = true;
|
|
||||||
int hasGoods = 0;
|
|
||||||
String message = null;
|
|
||||||
Boolean iserror = false;
|
|
||||||
|
|
||||||
int io_action = 0;
|
|
||||||
int last_io_action = 0;
|
|
||||||
int material_type = 0;
|
|
||||||
int last_material_type = 0;
|
|
||||||
int barcode = 0;
|
|
||||||
int last_barcode = 0;
|
|
||||||
|
|
||||||
|
|
||||||
boolean hasVehicle = false;
|
|
||||||
boolean isReady = false;
|
|
||||||
protected int instruction_num = 0;
|
|
||||||
protected int instruction_num_truth = 0;
|
|
||||||
boolean isFold = false;
|
|
||||||
private String assemble_check_tag;
|
|
||||||
|
|
||||||
protected String current_stage_instruction_message;
|
|
||||||
protected String last_stage_instruction_message;
|
|
||||||
Integer heartbeat_tag;
|
|
||||||
private Date instruction_require_time = new Date();
|
|
||||||
private Date instruction_finished_time = new Date();
|
|
||||||
|
|
||||||
private int instruction_require_time_out;
|
|
||||||
boolean requireSucess = false;
|
|
||||||
|
|
||||||
private int instruction_finished_time_out;
|
|
||||||
|
|
||||||
int branchProtocol = 0;
|
|
||||||
//备注
|
|
||||||
String remark;
|
|
||||||
//数量
|
|
||||||
String qty;
|
|
||||||
//物料
|
|
||||||
String material;
|
|
||||||
//批次
|
|
||||||
String batch;
|
|
||||||
//当前指令
|
|
||||||
Instruction inst = null;
|
|
||||||
//上次指令
|
|
||||||
Instruction last_inst = null;
|
|
||||||
|
|
||||||
//触摸屏手动触发任务
|
|
||||||
private Boolean is_has_task = false;
|
|
||||||
|
|
||||||
//满盅入库请求标记
|
|
||||||
boolean Sucess = false;
|
|
||||||
|
|
||||||
//暂定 0就绪 1请求取货 2取货完成 3请求放货 4放货完成 5取货完成离开 6放货完成离开 7请求进入区域 8请求离开区域
|
|
||||||
int flag;
|
|
||||||
|
|
||||||
String devicecode;
|
String devicecode;
|
||||||
|
|
||||||
int status = 0;
|
|
||||||
int last_status = 0;
|
|
||||||
int start_time = 0;
|
|
||||||
int last_start_time = 0;
|
|
||||||
int stop_time = 0;
|
|
||||||
int last_stop_time = 0;
|
|
||||||
int open_time = 0;
|
|
||||||
int last_open_time = 0;
|
|
||||||
int standby_time = 0;
|
|
||||||
int last_standby_time = 0;
|
|
||||||
int production_time = 0;
|
|
||||||
int last_production_time = 0;
|
|
||||||
int error_time = 0;
|
|
||||||
int last_error_time = 0;
|
|
||||||
int end_time = 0;
|
|
||||||
int last_end_time = 0;
|
|
||||||
int temperature = 0;
|
|
||||||
int temperature_setting = 0;
|
|
||||||
int humidity = 0;
|
|
||||||
int humidity_setting = 0;
|
|
||||||
int current_stage = 0;
|
|
||||||
int total_running_time = 0;
|
|
||||||
int executing_stage_num = 0;
|
|
||||||
int front_door = 0;
|
|
||||||
int front_door_off = 0;
|
|
||||||
int back_door = 0;
|
|
||||||
int back_door_off = 0;
|
|
||||||
int device_code = 0;
|
|
||||||
int device_name = 0;
|
|
||||||
int last_temperature;
|
|
||||||
int last_temperature_setting;
|
|
||||||
int last_humidity;
|
|
||||||
int last_humidity_setting;
|
|
||||||
int last_current_stage;
|
|
||||||
int last_total_running_time;
|
|
||||||
int last_executing_stage_num;
|
|
||||||
int last_front_door;
|
|
||||||
int last_front_door_off;
|
|
||||||
int last_back_door;
|
|
||||||
int last_back_door_off;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Device getDevice() {
|
public Device getDevice() {
|
||||||
return this.device;
|
return this.device;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int VW7010 = 0;
|
||||||
|
int VW7012 = 0;
|
||||||
|
int VW7014 = 0;
|
||||||
|
int VW7016 = 0;
|
||||||
|
int VW7018 = 0;
|
||||||
|
int VW7020 = 0;
|
||||||
|
int VW7022 = 0;
|
||||||
|
int VW7024 = 0;
|
||||||
|
int VW7026 = 0;
|
||||||
|
int VW7028 = 0;
|
||||||
|
int VW7030 = 0;
|
||||||
|
int VW7032 = 0;
|
||||||
|
int VW7034 = 0;
|
||||||
|
int VW7036 = 0;
|
||||||
|
int VW7038 = 0;
|
||||||
|
int VW7040 = 0;
|
||||||
|
int VW7042 = 0;
|
||||||
|
int VW7044 = 0;
|
||||||
|
int VW7046 = 0;
|
||||||
|
int VW7056 = 0;
|
||||||
|
int VW7058 = 0;
|
||||||
|
int VW7076 = 0;
|
||||||
|
int VW70001 = 0;
|
||||||
|
int VW70002 = 0;
|
||||||
|
int VW70003 = 0;
|
||||||
|
int VW70004 = 0;
|
||||||
|
int VW70005 = 0;
|
||||||
|
int VW70006 = 0;
|
||||||
|
int VW70007 = 0;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
String message = null;
|
String message = null;
|
||||||
try {
|
try {
|
||||||
devicecode = this.getDeviceCode();
|
devicecode = this.getDeviceCode();
|
||||||
mode = this.itemProtocol.getMode();
|
|
||||||
error = this.itemProtocol.getError();
|
|
||||||
status = this.itemProtocol.getStatus();
|
|
||||||
temperature = this.itemProtocol.getTemperature();
|
|
||||||
temperature_setting = this.itemProtocol.getTemperatureSetting();
|
|
||||||
humidity = this.itemProtocol.getHumidity();
|
|
||||||
humidity_setting = this.itemProtocol.getHumiditySetting();
|
|
||||||
current_stage = this.itemProtocol.getCurrentStage();
|
|
||||||
total_running_time = this.itemProtocol.getTotalRunningTime();
|
|
||||||
executing_stage_num = this.itemProtocol.getExecutingStageNum();
|
|
||||||
front_door = this.itemProtocol.getFrontDoor();
|
|
||||||
front_door_off = this.itemProtocol.getFrontDoorOff();
|
|
||||||
back_door = this.itemProtocol.getBackDoor();
|
|
||||||
back_door_off = this.itemProtocol.getBackDoorOff();
|
|
||||||
if (mode != last_mode) {
|
|
||||||
this.setRequireSucess(false);
|
|
||||||
if (mode == 2) {
|
|
||||||
this.writing(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (move != last_move) {
|
|
||||||
}
|
|
||||||
if (error != last_error) {
|
|
||||||
}
|
|
||||||
if (status != last_status) {
|
|
||||||
if (devicecode.startsWith("GHS")) {
|
|
||||||
//ACS反馈LMS固化室状态
|
|
||||||
BaseRequest request = new BaseRequest();
|
|
||||||
request.setState(String.valueOf(status));
|
|
||||||
request.setDevice_code(this.devicecode);
|
|
||||||
request.setType("1");
|
|
||||||
acsToWmsService.notify(request);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (Exception var17) {
|
} catch (Exception var17) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!this.itemProtocol.getIsonline()) {
|
|
||||||
this.setIsonline(false);
|
|
||||||
this.setIserror(true);
|
|
||||||
message = "信号量同步异常";
|
|
||||||
//未联机
|
|
||||||
} else if (mode == 0) {
|
|
||||||
this.setIsonline(false);
|
|
||||||
this.setIserror(true);
|
|
||||||
message = "未联机";
|
|
||||||
//有报警
|
|
||||||
} else if (error != 0) {
|
|
||||||
this.setIsonline(false);
|
|
||||||
this.setIserror(true);
|
|
||||||
message = "有报警";
|
|
||||||
//无报警
|
|
||||||
} else {
|
|
||||||
this.setIsonline(true);
|
|
||||||
this.setIserror(false);
|
|
||||||
message = "";
|
|
||||||
Instruction instruction = null;
|
|
||||||
List toInstructions;
|
|
||||||
switch (mode) {
|
|
||||||
case 1:
|
|
||||||
log.debug("设备运转模式:等待工作");
|
|
||||||
return;
|
|
||||||
case 2:
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
//todo 称重模式,带上重量、数量和向lms请求
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
switch (flag) {
|
|
||||||
//取货完成
|
|
||||||
case 1:
|
|
||||||
writing(2);
|
|
||||||
return;
|
|
||||||
//放货完成
|
|
||||||
case 2:
|
|
||||||
writing(3);
|
|
||||||
return;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
last_mode = mode;
|
|
||||||
last_error = error;
|
|
||||||
last_status = status;
|
|
||||||
last_start_time = start_time;
|
|
||||||
last_stop_time = stop_time;
|
|
||||||
last_open_time = open_time;
|
|
||||||
last_standby_time = standby_time;
|
|
||||||
last_production_time = production_time;
|
|
||||||
last_error_time = error_time;
|
|
||||||
last_end_time = end_time;
|
|
||||||
last_temperature = temperature;
|
|
||||||
last_temperature_setting = temperature_setting;
|
|
||||||
last_humidity = humidity;
|
|
||||||
last_humidity_setting = humidity_setting;
|
|
||||||
last_current_stage = current_stage;
|
|
||||||
last_total_running_time = total_running_time;
|
|
||||||
last_executing_stage_num = executing_stage_num;
|
|
||||||
last_front_door = front_door;
|
|
||||||
last_front_door_off = front_door_off;
|
|
||||||
last_back_door = back_door;
|
|
||||||
last_back_door_off = back_door_off;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public boolean exe_error() {
|
|
||||||
if (this.error == 0) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
log.debug("设备报警");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -307,15 +102,6 @@ public class GuhuashiSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
|||||||
this.control(itemMap);
|
this.control(itemMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void writing(int command) {
|
|
||||||
String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
|
||||||
+ "." + ItemProtocol.item_to_command;
|
|
||||||
//String opcservcerid = this.getDevice().getOpc_server_id();
|
|
||||||
//Server server = ReadUtil.getServer(opcservcerid);
|
|
||||||
Map<String, Object> itemMap = new HashMap<>();
|
|
||||||
itemMap.put(to_command, command);
|
|
||||||
this.control(itemMap);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void writing(String param, int command) {
|
public void writing(String param, int command) {
|
||||||
String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
||||||
@@ -328,37 +114,6 @@ public class GuhuashiSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
|||||||
@Override
|
@Override
|
||||||
public JSONObject getDeviceStatusName() {
|
public JSONObject getDeviceStatusName() {
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
String mode = "";
|
|
||||||
String action = "";
|
|
||||||
String move = "";
|
|
||||||
if (this.getMode() == 0) {
|
|
||||||
mode = "未联机";
|
|
||||||
} else if (this.getMode() == 1) {
|
|
||||||
mode = "单机";
|
|
||||||
} else if (this.getMode() == 2) {
|
|
||||||
mode = "联机";
|
|
||||||
} else if (this.getMode() == 3) {
|
|
||||||
mode = "运行中";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.getMove() == 0) {
|
|
||||||
move = "无货";
|
|
||||||
jo.put("hasGoods", false);
|
|
||||||
} else if (this.getMove() == 1) {
|
|
||||||
move = "有货";
|
|
||||||
jo.put("hasGoods", true);
|
|
||||||
} else if (this.getMove() == 2) {
|
|
||||||
move = "有托盘有货";
|
|
||||||
jo.put("hasGoods", true);
|
|
||||||
}
|
|
||||||
jo.put("device_name", this.getDevice().getDevice_name());
|
|
||||||
jo.put("mode", mode);
|
|
||||||
jo.put("move", move);
|
|
||||||
jo.put("action", action);
|
|
||||||
jo.put("isOnline", this.getIsonline());
|
|
||||||
jo.put("error", this.getError());
|
|
||||||
jo.put("isError", this.getIserror());
|
|
||||||
jo.put("task", this.getTask());
|
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,32 +11,49 @@ import java.util.List;
|
|||||||
@Data
|
@Data
|
||||||
public class ItemProtocol {
|
public class ItemProtocol {
|
||||||
|
|
||||||
public static String item_heartbeat = "heartbeat";
|
//读取信号
|
||||||
public static String item_mode = "mode";
|
public static String item_VW7010 = "VW7010";
|
||||||
public static String item_status = "status";
|
public static String item_VW7012 = "VW7012";
|
||||||
public static String item_error = "error";
|
public static String item_VW7014 = "VW7014";
|
||||||
public static String item_start_time = "start_time";
|
public static String item_VW7016 = "VW7016";
|
||||||
public static String item_stop_time = "stop_time";
|
public static String item_VW7018 = "VW7018";
|
||||||
public static String item_open_time = "open_time";
|
public static String item_VW7020 = "VW7020";
|
||||||
public static String item_standby_time = "standby_time";
|
public static String item_VW7022 = "VW7022";
|
||||||
public static String item_production_time = "production_time";
|
public static String item_VW7024 = "VW7024";
|
||||||
public static String item_error_time = "error_time";
|
public static String item_VW7026 = "VW7026";
|
||||||
public static String item_end_time = "end_time";
|
public static String item_VW7028 = "VW7028";
|
||||||
public static String item_to_command = "to_command";
|
public static String item_VW7030 = "VW7030";
|
||||||
public static String item_temperature = "temperature";
|
public static String item_VW7032 = "VW7032";
|
||||||
public static String item_temperature_setting = "temperature_setting";
|
public static String item_VW7034 = "VW7034";
|
||||||
public static String item_humidity = "humidity";
|
public static String item_VW7036 = "VW7036";
|
||||||
public static String item_humidity_setting = "humidity_setting";
|
public static String item_VW7038 = "VW7038";
|
||||||
public static String item_current_stage = "current_stage";
|
public static String item_VW7040 = "VW7040";
|
||||||
public static String item_total_running_time = "total_running_time";
|
public static String item_VW7042 = "VW7042";
|
||||||
public static String item_executing_stage_num = "executing_stage_num";
|
public static String item_VW7044 = "VW7044";
|
||||||
public static String item_front_door = "front_door";
|
public static String item_VW7046 = "VW7046";
|
||||||
public static String item_front_door_off = "front_door_off";
|
public static String item_VW7056 = "VW7056";
|
||||||
public static String item_back_door = "back_door";
|
public static String item_VW7058 = "VW7058";
|
||||||
public static String item_back_door_off = "back_door_off";
|
public static String item_VW7076 = "VW7076";
|
||||||
public static String item_device_code = "device_code";
|
public static String item_VW70001 = "VW7000.1";
|
||||||
public static String item_device_name = "device_name";
|
public static String item_VW70002 = "VW7000.2";
|
||||||
|
public static String item_VW70003 = "VW7000.3";
|
||||||
|
public static String item_VW70004 = "VW7000.4";
|
||||||
|
public static String item_VW70005 = "VW7000.5";
|
||||||
|
public static String item_VW70006 = "VW7000.6";
|
||||||
|
public static String item_VW70007 = "VW7000.7";
|
||||||
|
|
||||||
|
//写入信号
|
||||||
|
public static String item_VW70040 = "VW7004.0";
|
||||||
|
public static String item_VW70041 = "VW7004.1";
|
||||||
|
public static String item_VW70042 = "VW7004.2";
|
||||||
|
public static String item_VW70043 = "VW7004.3";
|
||||||
|
public static String item_VW70044 = "VW7004.4";
|
||||||
|
public static String item_VW70045 = "VW7004.5";
|
||||||
|
public static String item_VW70050 = "VW7005.0";
|
||||||
|
public static String item_VW70051 = "VW7005.1";
|
||||||
|
public static String item_VW70052 = "VW7005.2";
|
||||||
|
public static String item_VW70053 = "VW7005.3";
|
||||||
|
public static String item_VW70054 = "VW7005.4";
|
||||||
|
|
||||||
private GuhuashiSiteDeviceDriver driver;
|
private GuhuashiSiteDeviceDriver driver;
|
||||||
|
|
||||||
@@ -44,109 +61,111 @@ public class ItemProtocol {
|
|||||||
this.driver = driver;
|
this.driver = driver;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getHeartbeat() {
|
public int getVW7010() {
|
||||||
return this.getOpcIntegerValue(item_heartbeat);
|
return this.getOpcIntegerValue(item_VW7010);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMode() {
|
public int getVW7012() {
|
||||||
return this.getOpcIntegerValue(item_mode);
|
return this.getOpcIntegerValue(item_VW7012);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getVW7014() {
|
||||||
|
return this.getOpcIntegerValue(item_VW7014);
|
||||||
public int getStatus() {
|
|
||||||
return this.getOpcIntegerValue(item_status);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getTemperature() {
|
public int getVW7016() {
|
||||||
return this.getOpcIntegerValue(item_temperature);
|
return this.getOpcIntegerValue(item_VW7016);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getTemperatureSetting() {
|
public int getVW7018() {
|
||||||
return this.getOpcIntegerValue(item_temperature_setting);
|
return this.getOpcIntegerValue(item_VW7018);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getVW7020() {
|
||||||
public int getHumidity() {
|
return this.getOpcIntegerValue(item_VW7020);
|
||||||
return this.getOpcIntegerValue(item_humidity);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getVW7022() {
|
||||||
public int getHumiditySetting() {
|
return this.getOpcIntegerValue(item_VW7022);
|
||||||
return this.getOpcIntegerValue(item_humidity_setting);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getVW7024() {
|
||||||
public int getCurrentStage() {
|
return this.getOpcIntegerValue(item_VW7024);
|
||||||
return this.getOpcIntegerValue(item_current_stage);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getVW7026() {
|
||||||
public int getTotalRunningTime() {
|
return this.getOpcIntegerValue(item_VW7026);
|
||||||
return this.getOpcIntegerValue(item_total_running_time);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getExecutingStageNum() {
|
public int getVW7028() {
|
||||||
return this.getOpcIntegerValue(item_executing_stage_num);
|
return this.getOpcIntegerValue(item_VW7028);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getError() {
|
public int getVW7030() {
|
||||||
return this.getOpcIntegerValue(item_error);
|
return this.getOpcIntegerValue(item_VW7030);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getVW7032() {
|
||||||
public int getFrontDoor() {
|
return this.getOpcIntegerValue(item_VW7032);
|
||||||
return this.getOpcIntegerValue(item_front_door);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getVW7034() {
|
||||||
public int getFrontDoorOff() {
|
return this.getOpcIntegerValue(item_VW7034);
|
||||||
return this.getOpcIntegerValue(item_front_door_off);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getVW7036() {
|
||||||
public int getBackDoor() {
|
return this.getOpcIntegerValue(item_VW7036);
|
||||||
return this.getOpcIntegerValue(item_back_door);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getBackDoorOff() {
|
public int getVW7038() {
|
||||||
return this.getOpcIntegerValue(item_back_door_off);
|
return this.getOpcIntegerValue(item_VW7038);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getVW7040() {
|
||||||
|
return this.getOpcIntegerValue(item_VW7040);
|
||||||
public int getItem_start_time() {
|
|
||||||
return this.getOpcIntegerValue(item_start_time);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getItem_stop_time() {
|
public int getVW7042() {
|
||||||
return this.getOpcIntegerValue(item_stop_time);
|
return this.getOpcIntegerValue(item_VW7042);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getVW7044() {
|
||||||
public int getItem_open_time() {
|
return this.getOpcIntegerValue(item_VW7044);
|
||||||
return this.getOpcIntegerValue(item_open_time);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getItem_standby_time() {
|
public int getVW7046() {
|
||||||
return this.getOpcIntegerValue(item_standby_time);
|
return this.getOpcIntegerValue(item_VW7046);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getItem_production_time() {
|
public int getVW7056() {
|
||||||
return this.getOpcIntegerValue(item_production_time);
|
return this.getOpcIntegerValue(item_VW7056);
|
||||||
}
|
}
|
||||||
|
public int getVW7058() {
|
||||||
public int getItem_error_time() {
|
return this.getOpcIntegerValue(item_VW7058);
|
||||||
return this.getOpcIntegerValue(item_error_time);
|
|
||||||
}
|
}
|
||||||
|
public int getVW7076() {
|
||||||
public int getItem_end_time() {
|
return this.getOpcIntegerValue(item_VW7076);
|
||||||
return this.getOpcIntegerValue(item_end_time);
|
|
||||||
}
|
}
|
||||||
|
public int getVW70001() {
|
||||||
|
return this.getOpcIntegerValue(item_VW70001);
|
||||||
public int getToCommand() {
|
}
|
||||||
return this.getOpcIntegerValue(item_to_command);
|
public int getVW70002() {
|
||||||
|
return this.getOpcIntegerValue(item_VW70002);
|
||||||
|
}
|
||||||
|
public int getVW70003() {
|
||||||
|
return this.getOpcIntegerValue(item_VW70003);
|
||||||
|
}
|
||||||
|
public int getVW70004() {
|
||||||
|
return this.getOpcIntegerValue(item_VW70004);
|
||||||
|
}
|
||||||
|
public int getVW70005() {
|
||||||
|
return this.getOpcIntegerValue(item_VW70005);
|
||||||
|
}
|
||||||
|
public int getVW70006() {
|
||||||
|
return this.getOpcIntegerValue(item_VW70006);
|
||||||
|
}
|
||||||
|
public int getVW70007() {
|
||||||
|
return this.getOpcIntegerValue(item_VW70007);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -168,30 +187,70 @@ public class ItemProtocol {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getOpcStringValue(String protocol) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
String value = this.driver.getStringValue(protocol);
|
||||||
|
if (value == null) {
|
||||||
|
// log.error(this.getDriver().getDeviceCode() + ":protocol " + protocol + " 信号同步异常!");
|
||||||
|
setIsonline(false);
|
||||||
|
} else {
|
||||||
|
setIsonline(true);
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
return "0";
|
||||||
|
}
|
||||||
|
|
||||||
public static List<ItemDto> getReadableItemDtos() {
|
public static List<ItemDto> getReadableItemDtos() {
|
||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
list.add(new ItemDto(item_mode, "工作状态", "DB600.B2", Boolean.valueOf(true)));
|
list.add(new ItemDto(item_VW7010, "温度设定", "VW7010"));
|
||||||
list.add(new ItemDto(item_status, "设备状态", "DB600.B3"));
|
list.add(new ItemDto(item_VW7012, "温度显示", "VW7012"));
|
||||||
list.add(new ItemDto(item_error, "error", "DB600.B4"));
|
list.add(new ItemDto(item_VW7014, "湿度设定", "VW7014"));
|
||||||
list.add(new ItemDto(item_temperature, "温度显示", "DB600.B4"));
|
list.add(new ItemDto(item_VW7016, "湿度显示", "VW7016"));
|
||||||
list.add(new ItemDto(item_temperature_setting, "温度设定", "DB600.B4"));
|
list.add(new ItemDto(item_VW7018, "设定阶段时", "VW7018"));
|
||||||
list.add(new ItemDto(item_humidity, "湿度显示", "DB600.B4"));
|
list.add(new ItemDto(item_VW7020, "设定阶段分", "VW7020"));
|
||||||
list.add(new ItemDto(item_humidity_setting, "湿度设定", "DB600.B4"));
|
list.add(new ItemDto(item_VW7022, "温度传感器选择", "VW7022"));
|
||||||
list.add(new ItemDto(item_current_stage, "当前阶段", "DB600.B4"));
|
list.add(new ItemDto(item_VW7024, "控制数组", "VW7024"));
|
||||||
list.add(new ItemDto(item_total_running_time, "阶段累加时", "DB600.B4"));
|
list.add(new ItemDto(item_VW7026, "实际显示总阶段数", "VW7026"));
|
||||||
list.add(new ItemDto(item_executing_stage_num, "正在执行的阶段数", "DB600.B4"));
|
list.add(new ItemDto(item_VW7028, "总运行累加时", "VW7028"));
|
||||||
list.add(new ItemDto(item_front_door, "固化室前门已开信号", "DB600.B4"));
|
list.add(new ItemDto(item_VW7030, "总运行累加分", "VW7030"));
|
||||||
list.add(new ItemDto(item_front_door_off, "固化室前门已关信号", "DB600.B4"));
|
list.add(new ItemDto(item_VW7032, "主风机风量设定%", "VW7032"));
|
||||||
list.add(new ItemDto(item_back_door, "固化室后门已开信号", "DB600.B4"));
|
list.add(new ItemDto(item_VW7034, "排湿风机风量设定%", "VW7034"));
|
||||||
list.add(new ItemDto(item_back_door_off, "固化室后门已关信号", "DB600.B4"));
|
list.add(new ItemDto(item_VW7036, "固化/干燥", "VW7036"));
|
||||||
list.add(new ItemDto(item_device_code, "设备编号", "DB600.B4"));
|
list.add(new ItemDto(item_VW7038, "阶段累加时", "VW7038"));
|
||||||
list.add(new ItemDto(item_device_name, "设备名称", "DB600.B4"));
|
list.add(new ItemDto(item_VW7040, "阶段累加分", "VW7040"));
|
||||||
|
list.add(new ItemDto(item_VW7042, "实际运行程序套数", "VW7042"));
|
||||||
|
list.add(new ItemDto(item_VW7044, "正在执行的阶段数", "VW7044"));
|
||||||
|
list.add(new ItemDto(item_VW7046, "报警内容", "VW7046"));
|
||||||
|
list.add(new ItemDto(item_VW7056, "工作模式", "VW7056"));
|
||||||
|
list.add(new ItemDto(item_VW7058, "设备状态", "VW7058"));
|
||||||
|
list.add(new ItemDto(item_VW7076, "心跳", "VW7076"));
|
||||||
|
list.add(new ItemDto(item_VW70001, "工艺运行中信号", "VW7004.0"));
|
||||||
|
list.add(new ItemDto(item_VW70002, "工艺运行结束信号", "VW7004.1"));
|
||||||
|
list.add(new ItemDto(item_VW70003, "固化室内允许进板或出板信号(室内温度低于允许进入温度)", "VW7004.2"));
|
||||||
|
list.add(new ItemDto(item_VW70004, "固化室前门已开信号", "VW7004.3"));
|
||||||
|
list.add(new ItemDto(item_VW70005, "固化室前门已关信号", "VW7004.4"));
|
||||||
|
list.add(new ItemDto(item_VW70006, "固化室后门已开信号", "VW7005.0"));
|
||||||
|
list.add(new ItemDto(item_VW70007, "固化室后门已关信号", "VW7005.1"));
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<ItemDto> getWriteableItemDtos() {
|
public static List<ItemDto> getWriteableItemDtos() {
|
||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
list.add(new ItemDto(item_to_command, "作业命令", "DB601.W2", Boolean.valueOf(true)));
|
list.add(new ItemDto(item_VW70040, "", "VW7004.0"));
|
||||||
|
list.add(new ItemDto(item_VW70041, "", "VW7004.1"));
|
||||||
|
list.add(new ItemDto(item_VW70042, "", "VW7004.2"));
|
||||||
|
list.add(new ItemDto(item_VW70043, "", "VW7004.3"));
|
||||||
|
list.add(new ItemDto(item_VW70044, "", "VW7004.4"));
|
||||||
|
list.add(new ItemDto(item_VW70045, "", "VW7004.5"));
|
||||||
|
list.add(new ItemDto(item_VW70050, "", "VW7005.0"));
|
||||||
|
list.add(new ItemDto(item_VW70051, "", "VW7005.1"));
|
||||||
|
list.add(new ItemDto(item_VW70052, "", "VW7005.2"));
|
||||||
|
list.add(new ItemDto(item_VW70053, "", "VW7005.3"));
|
||||||
|
list.add(new ItemDto(item_VW70054, "", "VW7005.4"));
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -103,6 +103,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
AbstractTask task = taskFactory.getTask(requestMethodCode);
|
AbstractTask task = taskFactory.getTask(requestMethodCode);
|
||||||
// 执行创建任务
|
// 执行创建任务
|
||||||
task.apply(param);
|
task.apply(param);
|
||||||
|
// acs对接记录
|
||||||
|
interactRecordService.saveRecord(requestMethodName, param, result, GeneralDefinition.ACS_LMS);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
String message =e.getMessage();
|
String message =e.getMessage();
|
||||||
log.error("ACS请求LMS出现错误: {}", message);
|
log.error("ACS请求LMS出现错误: {}", message);
|
||||||
@@ -113,8 +115,6 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
noticeService.createNotice("异常信息:" + message, "acsApply: " + param.getString("request_medthod_code"),
|
noticeService.createNotice("异常信息:" + message, "acsApply: " + param.getString("request_medthod_code"),
|
||||||
NoticeTypeEnum.EXCEPTION.getCode());
|
NoticeTypeEnum.EXCEPTION.getCode());
|
||||||
}
|
}
|
||||||
// acs对接记录
|
|
||||||
interactRecordService.saveRecord(requestMethodName, param, result, GeneralDefinition.ACS_LMS);
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -161,12 +161,13 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
try {
|
try {
|
||||||
abstractTask.updateTaskStatus(taskCode, status);
|
abstractTask.updateTaskStatus(taskCode, status);
|
||||||
result.setMessage("任务状态反馈成功!");
|
result.setMessage("任务状态反馈成功!");
|
||||||
|
interactRecordService.saveRecord(requestMethodName, param, result, GeneralDefinition.ACS_LMS);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("任务状态更新失败: {}", message);
|
log.error("任务状态更新失败: {}", message);
|
||||||
result.setCode(HttpStatus.HTTP_BAD_REQUEST);
|
result.setCode(HttpStatus.HTTP_BAD_REQUEST);
|
||||||
result.setMessage("任务:[" + taskCode + "]状态更新失败," + message);
|
result.setMessage("任务:[" + taskCode + "]状态更新失败," + message);
|
||||||
}
|
}
|
||||||
interactRecordService.saveRecord(requestMethodName, param, result, GeneralDefinition.ACS_LMS);
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -205,6 +206,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
// id / code
|
// id / code
|
||||||
String pointCode = task1.againApply(task.getString("task_id"));
|
String pointCode = task1.againApply(task.getString("task_id"));
|
||||||
result.setNext_point_code(pointCode);
|
result.setNext_point_code(pointCode);
|
||||||
|
// acs对接记录
|
||||||
|
interactRecordService.saveRecord(task.getString("request_method_name"), task, result, GeneralDefinition.ACS_LMS);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
String message = ObjectUtil.isEmpty(e.getMessage())
|
String message = ObjectUtil.isEmpty(e.getMessage())
|
||||||
? ((InvocationTargetException) e).getTargetException().getMessage()
|
? ((InvocationTargetException) e).getTargetException().getMessage()
|
||||||
@@ -214,8 +217,6 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
result.setMessage(message);
|
result.setMessage(message);
|
||||||
result.setRequestNo(task.getString("requestNo"));
|
result.setRequestNo(task.getString("requestNo"));
|
||||||
}
|
}
|
||||||
// acs对接记录
|
|
||||||
interactRecordService.saveRecord(task.getString("request_method_name"), task, result, GeneralDefinition.ACS_LMS);
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import io.swagger.annotations.ApiOperation;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.common.logging.annotation.Log;
|
import org.nl.common.logging.annotation.Log;
|
||||||
import org.nl.wms.pda.service.PdaService;
|
import org.nl.wms.pda.service.PdaService;
|
||||||
|
import org.nl.wms.pda.service.dao.dto.ChangePointQtylDto;
|
||||||
import org.nl.wms.pda.service.dao.dto.ManualSortingDto;
|
import org.nl.wms.pda.service.dao.dto.ManualSortingDto;
|
||||||
import org.nl.wms.pda.service.dao.dto.SendMaterialDto;
|
import org.nl.wms.pda.service.dao.dto.SendMaterialDto;
|
||||||
import org.nl.wms.pda.service.dao.vo.DropdownListVo;
|
import org.nl.wms.pda.service.dao.vo.DropdownListVo;
|
||||||
@@ -87,4 +88,18 @@ public class PdaController {
|
|||||||
public ResponseEntity<List<DropdownListVo>> materialList(){
|
public ResponseEntity<List<DropdownListVo>> materialList(){
|
||||||
return new ResponseEntity<>(pdaService.getmaterialList(), HttpStatus.OK);
|
return new ResponseEntity<>(pdaService.getmaterialList(), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/getGhsPointList")
|
||||||
|
@Log("固化室点位编码列表")
|
||||||
|
@ApiOperation("固化室点位编码列表")
|
||||||
|
public ResponseEntity<Object> getGhsPointList(){
|
||||||
|
return new ResponseEntity<>(pdaService.getGhsPointList(), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/changePointQty")
|
||||||
|
@Log("更改库存")
|
||||||
|
@ApiOperation("更改库存")
|
||||||
|
public ResponseEntity<Object> changePointQty(@RequestBody ChangePointQtylDto changePointQtylDto){
|
||||||
|
return new ResponseEntity<>(pdaService.changePointQty(changePointQtylDto), HttpStatus.OK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package org.nl.wms.pda.service;
|
package org.nl.wms.pda.service;
|
||||||
|
|
||||||
|
import org.nl.wms.pda.service.dao.dto.ChangePointQtylDto;
|
||||||
import org.nl.wms.pda.service.dao.dto.ManualSortingDto;
|
import org.nl.wms.pda.service.dao.dto.ManualSortingDto;
|
||||||
import org.nl.wms.pda.service.dao.dto.SendMaterialDto;
|
import org.nl.wms.pda.service.dao.dto.SendMaterialDto;
|
||||||
import org.nl.wms.pda.service.dao.vo.*;
|
import org.nl.wms.pda.service.dao.vo.*;
|
||||||
@@ -60,4 +61,8 @@ public interface PdaService {
|
|||||||
* @return List<DropdownListVo>
|
* @return List<DropdownListVo>
|
||||||
*/
|
*/
|
||||||
List<DropdownListVo> getmaterialList();
|
List<DropdownListVo> getmaterialList();
|
||||||
|
|
||||||
|
List<GhsPointVo> getGhsPointList();
|
||||||
|
|
||||||
|
PdaResponseVo changePointQty(ChangePointQtylDto changePointQtylDto);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package org.nl.wms.pda.service.dao.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ChangePointQtylDto {
|
||||||
|
/**
|
||||||
|
* 组盘号
|
||||||
|
*/
|
||||||
|
private String group_id;
|
||||||
|
/**
|
||||||
|
* 物料数量
|
||||||
|
*/
|
||||||
|
private Integer qty;
|
||||||
|
}
|
||||||
@@ -1,9 +1,6 @@
|
|||||||
package org.nl.wms.pda.service.dao.mapper;
|
package org.nl.wms.pda.service.dao.mapper;
|
||||||
|
|
||||||
import org.nl.wms.pda.service.dao.vo.DropdownListVo;
|
import org.nl.wms.pda.service.dao.vo.*;
|
||||||
import org.nl.wms.pda.service.dao.vo.ManualWorkOrderVo;
|
|
||||||
import org.nl.wms.pda.service.dao.vo.MaterialInventoryVo;
|
|
||||||
import org.nl.wms.pda.service.dao.vo.TaskShowVo;
|
|
||||||
import org.nl.wms.sch.point.service.dto.SchBasePointDto;
|
import org.nl.wms.sch.point.service.dto.SchBasePointDto;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -44,4 +41,8 @@ public interface PdaMapper {
|
|||||||
|
|
||||||
|
|
||||||
List<SchBasePointDto> getPointList();
|
List<SchBasePointDto> getPointList();
|
||||||
|
|
||||||
|
List<GhsPointVo> getGhsPointList();
|
||||||
|
|
||||||
|
void changePointQty(String group_id,int qty);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,4 +87,24 @@
|
|||||||
LEFT JOIN sch_base_point p1 ON p1.point_code = p.parent_point_code AND p1.point_type = '1' AND p1.region_code = 'TBX'
|
LEFT JOIN sch_base_point p1 ON p1.point_code = p.parent_point_code AND p1.point_type = '1' AND p1.region_code = 'TBX'
|
||||||
WHERE p.point_type = 2 AND p.region_code = 'TBX' AND p.can_vehicle_type = '1'
|
WHERE p.point_type = 2 AND p.region_code = 'TBX' AND p.can_vehicle_type = '1'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getGhsPointList" resultType="org.nl.wms.pda.service.dao.vo.GhsPointVo">
|
||||||
|
SELECT
|
||||||
|
p.point_code,
|
||||||
|
v.group_id,
|
||||||
|
m.material_name,
|
||||||
|
v.material_qty
|
||||||
|
FROM
|
||||||
|
sch_base_point p,
|
||||||
|
sch_base_vehiclematerialgroup v,
|
||||||
|
md_base_material m
|
||||||
|
WHERE
|
||||||
|
p.region_code = 'GH'
|
||||||
|
AND p.vehicle_code = v.vehicle_code
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="changePointQty">
|
||||||
|
update sch_base_vehiclematerialgroup set material_qty= #{qty}
|
||||||
|
where group_id = #{group_id}
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package org.nl.wms.pda.service.dao.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class GhsPointVo {
|
||||||
|
private String point_code;
|
||||||
|
private String vehicle_name;
|
||||||
|
private String group_id;
|
||||||
|
private String material_qty;
|
||||||
|
}
|
||||||
@@ -8,6 +8,7 @@ import org.nl.common.exception.BadRequestException;
|
|||||||
import org.nl.wms.database.material.service.IMdBaseMaterialService;
|
import org.nl.wms.database.material.service.IMdBaseMaterialService;
|
||||||
import org.nl.wms.database.material.service.dao.MdBaseMaterial;
|
import org.nl.wms.database.material.service.dao.MdBaseMaterial;
|
||||||
import org.nl.wms.pda.service.PdaService;
|
import org.nl.wms.pda.service.PdaService;
|
||||||
|
import org.nl.wms.pda.service.dao.dto.ChangePointQtylDto;
|
||||||
import org.nl.wms.pda.service.dao.dto.ManualSortingDto;
|
import org.nl.wms.pda.service.dao.dto.ManualSortingDto;
|
||||||
import org.nl.wms.pda.service.dao.dto.SendMaterialDto;
|
import org.nl.wms.pda.service.dao.dto.SendMaterialDto;
|
||||||
import org.nl.wms.pda.service.dao.mapper.PdaMapper;
|
import org.nl.wms.pda.service.dao.mapper.PdaMapper;
|
||||||
@@ -121,6 +122,10 @@ public class PdaServiceImpl implements PdaService {
|
|||||||
return pdaMapper.getPointList();
|
return pdaMapper.getPointList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<GhsPointVo> getGhsPointList(){
|
||||||
|
return pdaMapper.getGhsPointList();
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public List<TaskShowVo> coatedWireIntoStorageTaskShow() {
|
public List<TaskShowVo> coatedWireIntoStorageTaskShow() {
|
||||||
return pdaMapper.getRunningTaskByConfigAndCreateMode("TBXMLTask", GeneralDefinition.PDA_CREATION);
|
return pdaMapper.getRunningTaskByConfigAndCreateMode("TBXMLTask", GeneralDefinition.PDA_CREATION);
|
||||||
@@ -135,4 +140,10 @@ public class PdaServiceImpl implements PdaService {
|
|||||||
public List<DropdownListVo> getmaterialList() {
|
public List<DropdownListVo> getmaterialList() {
|
||||||
return pdaMapper.getmaterialList();
|
return pdaMapper.getmaterialList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PdaResponseVo changePointQty(ChangePointQtylDto changePointQtylDto){
|
||||||
|
pdaMapper.changePointQty(changePointQtylDto.getGroup_id(),changePointQtylDto.getQty());
|
||||||
|
return PdaResponseVo.pdaResultOk("固化室点位库存数量更新成功");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,6 +117,7 @@ public class TBXMLTask extends AbstractTask {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 不创建半条任务,直接创建完整任务
|
* 不创建半条任务,直接创建完整任务
|
||||||
|
*
|
||||||
* @param task
|
* @param task
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@@ -291,7 +292,7 @@ public class TBXMLTask extends AbstractTask {
|
|||||||
: "");
|
: "");
|
||||||
groupEntity.setMaterial_qty(ObjectUtil.isNotEmpty(qty) && qty > 0
|
groupEntity.setMaterial_qty(ObjectUtil.isNotEmpty(qty) && qty > 0
|
||||||
? qty
|
? qty
|
||||||
: Integer.valueOf(materialObj.getStandard_qty()));
|
: ObjectUtil.isEmpty(materialObj.getMaterial_spec()) ? 0 : Integer.parseInt(materialObj.getMaterial_spec()) * 11);
|
||||||
groupEntity.setCreate_id(GeneralDefinition.ACS_ID);
|
groupEntity.setCreate_id(GeneralDefinition.ACS_ID);
|
||||||
groupEntity.setCreate_name(GeneralDefinition.ACS_NAME);
|
groupEntity.setCreate_name(GeneralDefinition.ACS_NAME);
|
||||||
groupEntity.setCreate_time(DateUtil.now());
|
groupEntity.setCreate_time(DateUtil.now());
|
||||||
@@ -393,10 +394,11 @@ public class TBXMLTask extends AbstractTask {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 再次请求
|
* 再次请求
|
||||||
|
*
|
||||||
* @param task_id: 任务标识
|
* @param task_id: 任务标识
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String againApplyLocal(SchBaseTask task,String waitPoint,String task_id) {
|
public String againApplyLocal(SchBaseTask task, String waitPoint, String task_id) {
|
||||||
if (ObjectUtil.isEmpty(task)) {
|
if (ObjectUtil.isEmpty(task)) {
|
||||||
throw new BadRequestException("任务:[" + task_id + "]不存在!");
|
throw new BadRequestException("任务:[" + task_id + "]不存在!");
|
||||||
}
|
}
|
||||||
@@ -446,7 +448,7 @@ public class TBXMLTask extends AbstractTask {
|
|||||||
throw new BadRequestException("找不到任务:[" + task_id + "]等待点!");
|
throw new BadRequestException("找不到任务:[" + task_id + "]等待点!");
|
||||||
}
|
}
|
||||||
if (ObjectUtil.isNotEmpty(task.getPoint_code2())) {
|
if (ObjectUtil.isNotEmpty(task.getPoint_code2())) {
|
||||||
log.info("该任务{}已经二次分配完毕,直接反馈之前计算点位{}",task.getTask_code(),task.getPoint_code2());
|
log.info("该任务{}已经二次分配完毕,直接反馈之前计算点位{}", task.getTask_code(), task.getPoint_code2());
|
||||||
return task.getPoint_code2();
|
return task.getPoint_code2();
|
||||||
}
|
}
|
||||||
// 根据任务上等待点的位置获取准确的固化室位置。
|
// 根据任务上等待点的位置获取准确的固化室位置。
|
||||||
|
|||||||
Reference in New Issue
Block a user