rev:修改
This commit is contained in:
@@ -91,6 +91,7 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
|
||||
param.put("blurry", "%" + whereJson.get("blurry") + "%");
|
||||
}
|
||||
param.put("device_type", whereJson.get("device_type"));
|
||||
param.put("region", whereJson.get("region"));
|
||||
JSONObject json = WQL.getWO("Qdevice_query_002").addParamMap(param).pageQuery(WqlUtil.getHttpContext(page), "is_config asc,seq_num desc,update_time desc");
|
||||
return json;
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
输入.methods_code TYPEAS s_string
|
||||
输入.methods_id TYPEAS s_string
|
||||
输入.blurry TYPEAS s_string
|
||||
输入.region TYPEAS s_string
|
||||
[临时表]
|
||||
--这边列出来的临时表就会在运行期动态创建
|
||||
|
||||
@@ -63,6 +64,9 @@
|
||||
OPTION 输入.device_type <> ""
|
||||
d.device_type = 输入.device_type
|
||||
ENDOPTION
|
||||
OPTION 输入.region <> ""
|
||||
d.region = 输入.region
|
||||
ENDOPTION
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
@@ -172,7 +172,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
jo.put("carId", carno);
|
||||
jo.put("taskType ", task.getTask_type());
|
||||
jo.put("feedbackStatus", "applyTake");
|
||||
log.info("请求wms取货完成参数:{}", jo);
|
||||
log.info("请求wms取货参数:{}", jo);
|
||||
HttpResponse result = acsToZDWmsService.taskFeedback(jo);
|
||||
JSONObject response = JSONObject.parseObject(result.body());
|
||||
int responseCode = response.getInteger("responseCode");
|
||||
@@ -242,8 +242,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
if ((StrUtil.startWith(task.getTask_code(), "-"))) {
|
||||
log.info("定点任务下发agv允许取货信号");
|
||||
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
|
||||
} else
|
||||
{
|
||||
} else {
|
||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
|
||||
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
||||
@@ -256,7 +255,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
jo.put("carId", carno);
|
||||
jo.put("taskType ", task.getTask_type());
|
||||
jo.put("feedbackStatus", "takeFinish");
|
||||
log.info("请求wms取货完成参数:{}", jo);
|
||||
log.info("请求wms取货完毕参数:{}", jo);
|
||||
HttpResponse result = acsToZDWmsService.taskFeedback(jo);
|
||||
JSONObject response = JSONObject.parseObject(result.body());
|
||||
int responseCode = response.getInteger("responseCode");
|
||||
@@ -443,7 +442,26 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
|
||||
} else {
|
||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||
if ("1".equals(task.getCreate_by())){
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("taskCode", task.getTask_code());
|
||||
jo.put("carId", carno);
|
||||
jo.put("taskType ", task.getTask_type());
|
||||
jo.put("feedbackStatus", "putFinish");
|
||||
log.info("请求wms放货完成参数:{}", jo);
|
||||
HttpResponse result = acsToZDWmsService.taskFeedback(jo);
|
||||
JSONObject response = JSONObject.parseObject(result.body());
|
||||
int responseCode = response.getInteger("responseCode");
|
||||
if (responseCode == 0) {
|
||||
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
|
||||
} else {
|
||||
log.error("请求wms放货失败参数:{}", response);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
|
||||
}
|
||||
|
||||
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
||||
Object ext_system = device.getExtraValue().get("ext_system");
|
||||
//检测站点,安全交互类型为中鼎的
|
||||
@@ -455,7 +473,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
jo.put("taskType ", task.getTask_type());
|
||||
jo.put("feedbackStatus", "putFinish");
|
||||
log.info("请求wms放货完成参数:{}", jo);
|
||||
HttpResponse result = acsToMesService.taskFeedback(jo);
|
||||
HttpResponse result = acsToZDWmsService.taskFeedback(jo);
|
||||
JSONObject response = JSONObject.parseObject(result.body());
|
||||
int responseCode = response.getInteger("responseCode");
|
||||
if (responseCode == 0) {
|
||||
@@ -912,10 +930,10 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
//agv电量
|
||||
electric_qty = ikey;
|
||||
} else if (phase == 0x74) {
|
||||
//三色灯状态
|
||||
status = ikey;
|
||||
//将小车状态写入DeviceManageDto
|
||||
deviceManageDto.setStatus(status);
|
||||
// //三色灯状态
|
||||
// status = ikey;
|
||||
// //将小车状态写入DeviceManageDto
|
||||
// deviceManageDto.setStatus(status);
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(data)) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + Bytes2HexString(data));
|
||||
|
||||
@@ -45,7 +45,7 @@ public class AcsToMesServiceImpl implements AcsToMesService {
|
||||
public HttpResponse taskFeedback(JSONObject whereJson) {
|
||||
//TODO:改成中鼎
|
||||
String wmsUrl = "10.10.188.151:8098";
|
||||
AddressDto addressDto = addressService.findByCode("feedAgvTaskStatus");
|
||||
AddressDto addressDto = addressService.findByCode("feedMesAgvTaskStatus");
|
||||
String methods_url = addressDto.getMethods_url();
|
||||
String url = wmsUrl + methods_url;
|
||||
HttpResponse result = null;
|
||||
|
||||
@@ -45,8 +45,8 @@ public class AcsToZDWmsServiceImpl implements AcsToZDWmsService {
|
||||
@Override
|
||||
public HttpResponse taskFeedback(JSONObject whereJson) {
|
||||
//TODO:改成中鼎
|
||||
String wmsUrl = null;
|
||||
AddressDto addressDto = addressService.findByCode("feedAgvTaskStatus");
|
||||
String wmsUrl = "172.30.15.32:30010";
|
||||
AddressDto addressDto = addressService.findByCode("feedZdAgvTaskStatus");
|
||||
String methods_url = addressDto.getMethods_url();
|
||||
String url = wmsUrl + methods_url;
|
||||
HttpResponse result = null;
|
||||
@@ -67,7 +67,7 @@ public class AcsToZDWmsServiceImpl implements AcsToZDWmsService {
|
||||
|
||||
@Override
|
||||
public HttpResponse taskDeprecate(JSONObject whereJson) {
|
||||
String wmsUrl = "10.10.188.151:8098";
|
||||
String wmsUrl = "172.30.15.32:30010";
|
||||
AddressDto addressDto = addressService.findByCode("acsCancelBack");
|
||||
String methods_url = addressDto.getMethods_url();
|
||||
String url = wmsUrl + methods_url;
|
||||
@@ -89,7 +89,7 @@ public class AcsToZDWmsServiceImpl implements AcsToZDWmsService {
|
||||
|
||||
@Override
|
||||
public HttpResponse deviceStatusUpdate(JSONObject whereJson) {
|
||||
String wmsUrl = "10.10.188.151:8098";
|
||||
String wmsUrl = "172.30.15.32:30010";
|
||||
AddressDto addressDto = addressService.findByCode("deviceStatusUpdate");
|
||||
String methods_url = addressDto.getMethods_url();
|
||||
String url = wmsUrl + methods_url;
|
||||
|
||||
@@ -12,6 +12,7 @@ import org.nl.acs.task.service.TaskService;
|
||||
import org.nl.acs.task.service.dto.TaskDto;
|
||||
import org.nl.modules.logging.service.LogService;
|
||||
import org.nl.modules.system.util.CodeUtil;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -136,23 +137,43 @@ public class MesToAcsServiceImpl implements MesToAcsService {
|
||||
String next_device_code2 = "";
|
||||
|
||||
|
||||
JSONObject start_device_json = WQLObject.getWQLObject("acs_storage_cell").query("parent_storage_code ='" + locationFrom + "'").uniqueResult(0);
|
||||
if (!ObjectUtil.isEmpty(start_device_json)) {
|
||||
start_device_code = (String) start_device_json.get("parent_storage_code") == null ? start_device_code : (String) start_device_json.get("storage_code");
|
||||
}
|
||||
JSONObject next_device_json = WQLObject.getWQLObject("acs_storage_cell").query("parent_storage_code ='" + locationTo + "'").uniqueResult(0);
|
||||
if (!ObjectUtil.isEmpty(next_device_json)) {
|
||||
next_device_code = (String) next_device_json.get("parent_storage_code") == null ? next_device_code : (String) next_device_json.get("storage_code");
|
||||
}
|
||||
|
||||
|
||||
JSONObject start_device_json2 = WQLObject.getWQLObject("acs_storage_cell").query("parent_storage_code ='" + locationFrom2 + "'").uniqueResult(0);
|
||||
if (!ObjectUtil.isEmpty(start_device_json2)) {
|
||||
start_device_code2 = (String) start_device_json2.get("parent_storage_code") == null ? start_device_code2 : (String) start_device_json2.get("storage_code");
|
||||
}
|
||||
JSONObject next_device_json2 = WQLObject.getWQLObject("acs_storage_cell").query("parent_storage_code ='" + locationTo2 + "'").uniqueResult(0);
|
||||
if (!ObjectUtil.isEmpty(next_device_json2)) {
|
||||
next_device_code2 = (String) next_device_json2.get("parent_storage_code") == null ? next_device_code2 : (String) next_device_json2.get("storage_code");
|
||||
}
|
||||
|
||||
|
||||
// if (start_point_code.indexOf("-") > 0) {
|
||||
// String str[] = start_point_code.split("-");
|
||||
// start_device_code = str[0];
|
||||
// } else {
|
||||
start_device_code = locationFrom;
|
||||
// start_device_code = locationFrom;
|
||||
// }
|
||||
|
||||
// if (next_point_code.indexOf("-") > 0) {
|
||||
// String str[] = next_point_code.split("-");
|
||||
// next_device_code = str[0];
|
||||
// } else {
|
||||
next_device_code = locationTo;
|
||||
// next_device_code = locationTo;
|
||||
// }
|
||||
|
||||
if (actionType.equals("2")) {
|
||||
start_device_code2 = locationFrom2;
|
||||
next_device_code2 = locationTo2;
|
||||
// start_device_code2 = locationFrom2;
|
||||
// next_device_code2 = locationTo2;
|
||||
}
|
||||
|
||||
// //查询wcs传过来的起点终点路由
|
||||
@@ -182,14 +203,14 @@ public class MesToAcsServiceImpl implements MesToAcsService {
|
||||
}
|
||||
|
||||
//判断设备是否还有未完成的任务
|
||||
int count1 = taskService.queryDeviceUnfinishTask(locationFrom);
|
||||
int count1 = taskService.queryDeviceUnfinishTask(start_device_code);
|
||||
if (count1 > 0) {
|
||||
map.put("status", "400");
|
||||
map.put("message", "设备"+locationFrom+"有未完成任务");
|
||||
map.put("data", null);
|
||||
return map;
|
||||
}
|
||||
int count2 = taskService.queryDeviceUnfinishTask(locationTo);
|
||||
int count2 = taskService.queryDeviceUnfinishTask(next_device_code);
|
||||
if (count2 > 0) {
|
||||
map.put("status", "400");
|
||||
map.put("message", "设备"+locationTo+"有未完成任务");
|
||||
@@ -199,14 +220,14 @@ public class MesToAcsServiceImpl implements MesToAcsService {
|
||||
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("task_code", taskCode);
|
||||
jo.put("start_point_code", locationFrom);
|
||||
jo.put("next_point_code", locationTo);
|
||||
jo.put("start_point_code", start_device_code);
|
||||
jo.put("next_point_code", next_device_code);
|
||||
jo.put("start_parent_code", locationFrom);
|
||||
jo.put("next_parent_code", locationTo);
|
||||
jo.put("start_device_code", start_device_code);
|
||||
jo.put("next_device_code", next_device_code);
|
||||
jo.put("start_point_code2", locationFrom2);
|
||||
jo.put("next_point_code2", locationTo2);
|
||||
jo.put("start_point_code2", start_device_code2);
|
||||
jo.put("next_point_code2", next_device_code2);
|
||||
jo.put("start_device_code2", start_device_code2);
|
||||
jo.put("next_device_code2", next_device_code2);
|
||||
jo.put("priority", priority);
|
||||
|
||||
@@ -12,6 +12,7 @@ import org.nl.acs.route.service.dto.RouteLineDto;
|
||||
import org.nl.acs.task.service.TaskService;
|
||||
import org.nl.acs.task.service.dto.TaskDto;
|
||||
import org.nl.modules.logging.service.LogService;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -140,24 +141,43 @@ public class WmsZDToAcsServiceImpl implements WmsZDToAcsService {
|
||||
String start_device_code2 = "";
|
||||
String next_device_code2 = "";
|
||||
|
||||
JSONObject start_device_json = WQLObject.getWQLObject("acs_storage_cell").query("parent_storage_code ='" + locationFrom + "'").uniqueResult(0);
|
||||
if (!ObjectUtil.isEmpty(start_device_json)) {
|
||||
start_device_code = (String) start_device_json.get("parent_storage_code") == null ? start_device_code : (String) start_device_json.get("storage_code");
|
||||
}
|
||||
JSONObject next_device_json = WQLObject.getWQLObject("acs_storage_cell").query("parent_storage_code ='" + locationTo + "'").uniqueResult(0);
|
||||
if (!ObjectUtil.isEmpty(next_device_json)) {
|
||||
next_device_code = (String) next_device_json.get("parent_storage_code") == null ? next_device_code : (String) next_device_json.get("storage_code");
|
||||
}
|
||||
|
||||
|
||||
JSONObject start_device_json2 = WQLObject.getWQLObject("acs_storage_cell").query("parent_storage_code ='" + locationFrom2 + "'").uniqueResult(0);
|
||||
if (!ObjectUtil.isEmpty(start_device_json2)) {
|
||||
start_device_code2 = (String) start_device_json2.get("parent_storage_code") == null ? start_device_code2 : (String) start_device_json2.get("storage_code");
|
||||
}
|
||||
JSONObject next_device_json2 = WQLObject.getWQLObject("acs_storage_cell").query("parent_storage_code ='" + locationTo2 + "'").uniqueResult(0);
|
||||
if (!ObjectUtil.isEmpty(next_device_json2)) {
|
||||
next_device_code2 = (String) next_device_json2.get("parent_storage_code") == null ? next_device_code2 : (String) next_device_json2.get("storage_code");
|
||||
}
|
||||
|
||||
|
||||
// if (start_point_code.indexOf("-") > 0) {
|
||||
// String str[] = start_point_code.split("-");
|
||||
// start_device_code = str[0];
|
||||
// } else {
|
||||
start_device_code = locationFrom;
|
||||
//start_device_code = locationFrom;
|
||||
// }
|
||||
|
||||
// if (next_point_code.indexOf("-") > 0) {
|
||||
// String str[] = next_point_code.split("-");
|
||||
// next_device_code = str[0];
|
||||
// } else {
|
||||
next_device_code = locationTo;
|
||||
//next_device_code = locationTo;
|
||||
// }
|
||||
|
||||
if (actionType.equals("2")) {
|
||||
start_device_code2 = locationFrom2;
|
||||
next_device_code2 = locationTo2;
|
||||
//start_device_code2 = locationFrom2;
|
||||
// next_device_code2 = locationTo2;
|
||||
}
|
||||
|
||||
// //查询wcs传过来的起点终点路由
|
||||
@@ -186,14 +206,14 @@ public class WmsZDToAcsServiceImpl implements WmsZDToAcsService {
|
||||
}
|
||||
}
|
||||
//判断设备是否还有未完成的任务
|
||||
int count1 = taskService.queryDeviceUnfinishTask(locationFrom);
|
||||
int count1 = taskService.queryDeviceUnfinishTask(start_device_code);
|
||||
if (count1 > 0) {
|
||||
map.put("status", "400");
|
||||
map.put("message", "设备"+locationFrom+"有未完成任务");
|
||||
map.put("data", null);
|
||||
return map;
|
||||
}
|
||||
int count2 = taskService.queryDeviceUnfinishTask(locationTo);
|
||||
int count2 = taskService.queryDeviceUnfinishTask(next_device_code);
|
||||
if (count2 > 0) {
|
||||
map.put("status", "400");
|
||||
map.put("message", "设备"+locationTo+"有未完成任务");
|
||||
@@ -203,14 +223,14 @@ public class WmsZDToAcsServiceImpl implements WmsZDToAcsService {
|
||||
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("task_code", taskCode);
|
||||
jo.put("start_point_code", locationFrom);
|
||||
jo.put("next_point_code", locationTo);
|
||||
jo.put("start_point_code", start_device_code);
|
||||
jo.put("next_point_code", next_device_code);
|
||||
jo.put("start_parent_code", locationFrom);
|
||||
jo.put("next_parent_code", locationTo);
|
||||
jo.put("start_device_code", start_device_code);
|
||||
jo.put("next_device_code", next_device_code);
|
||||
jo.put("start_point_code2", locationFrom2);
|
||||
jo.put("next_point_code2", locationTo2);
|
||||
jo.put("start_point_code2", start_device_code2);
|
||||
jo.put("next_point_code2", next_device_code2);
|
||||
jo.put("start_device_code2", start_device_code2);
|
||||
jo.put("next_device_code2", next_device_code2);
|
||||
jo.put("priority", priority);
|
||||
|
||||
@@ -344,4 +344,7 @@ public interface TaskService {
|
||||
*/
|
||||
Integer queryDeviceUnfinishTask(String device_code);
|
||||
|
||||
|
||||
List<TaskDto> queryAllByCache();
|
||||
|
||||
}
|
||||
|
||||
@@ -1268,13 +1268,13 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
String priority = acsTask.getPriority();
|
||||
String is_send = acsTask.getIs_send();
|
||||
|
||||
String start_device_code = acsTask.getStart_device_code();
|
||||
String start_device_code = acsTask.getStart_point_code();
|
||||
String start_point_code = acsTask.getStart_point_code();
|
||||
|
||||
String put_device_code = acsTask.getPut_device_code();
|
||||
String put_point_code = acsTask.getPut_point_code();
|
||||
|
||||
String next_device_code = acsTask.getNext_device_code();
|
||||
String next_device_code = acsTask.getNext_point_code();
|
||||
String next_point_code = acsTask.getNext_point_code();
|
||||
|
||||
String start_point_code2 = acsTask.getStart_point_code2();
|
||||
@@ -1295,8 +1295,6 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Instruction instdto = new Instruction();
|
||||
instdto.setInstruction_type(task_type);
|
||||
instdto.setInstruction_id(IdUtil.simpleUUID());
|
||||
@@ -1758,4 +1756,9 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
|
||||
return num;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TaskDto> queryAllByCache() {
|
||||
return this.tasks;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,18 @@
|
||||
>
|
||||
<el-option v-for="item in device_types" :key="item.id" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="query.region"
|
||||
clearable
|
||||
filterable
|
||||
size="small"
|
||||
placeholder="区域"
|
||||
class="filter-item"
|
||||
style="width: 200px"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option v-for="item in regions" :key="item.id" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
<rrOperation />
|
||||
</div>
|
||||
<crudOperation :permission="permission">
|
||||
|
||||
Reference in New Issue
Block a user