no message

This commit is contained in:
18188916393
2022-11-22 00:04:51 +08:00
parent 02dc9d35e2
commit a7cdfc6fcf
3 changed files with 39 additions and 17 deletions

View File

@@ -532,6 +532,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
public Map<String, Object> inKiln(Map jsonObject) { public Map<String, Object> inKiln(Map jsonObject) {
String vehicle_code = String.valueOf(jsonObject.get("vehicle_code")); String vehicle_code = String.valueOf(jsonObject.get("vehicle_code"));
KilnUtil.inKiln(vehicle_code); KilnUtil.inKiln(vehicle_code);
JSONObject jo = new JSONObject();
jo.put("vehicle_code",vehicle_code);
//调用wms的接口
WmsToJnServiceImpl wmsToJnService = new WmsToJnServiceImpl();
wmsToJnService.feedBackInKiln(jo);
JSONObject result = new JSONObject(); JSONObject result = new JSONObject();
result.put("status", HttpStatus.OK.value()); result.put("status", HttpStatus.OK.value());
result.put("message", "任务状态反馈成功!"); result.put("message", "任务状态反馈成功!");

View File

@@ -145,10 +145,10 @@ public class CallMaterialTask extends AbstractAcsTask {
jo.put("task_id", task_id); jo.put("task_id", task_id);
WmsToJnServiceImpl wmsToJnServiceImpl = new WmsToJnServiceImpl(); WmsToJnServiceImpl wmsToJnServiceImpl = new WmsToJnServiceImpl();
if (StrUtil.equals(point_type, AreaEnum.CYHCHJ.getCode())) { if (StrUtil.equals(point_type, AreaEnum.CYHCHJ.getCode())) {
wmsToJnServiceImpl.feedBackOutWait(jo); wmsToJnServiceImpl.feedBackOutWait(jo);
} }
if (StrUtil.equals(point_type, AreaEnum.MTPQ.getCode())) { if (StrUtil.equals(point_type, AreaEnum.MTPQ.getCode())) {
wmsToJnServiceImpl.feedBackOutPartStock(jo); wmsToJnServiceImpl.feedBackOutPartStock(jo);
} }
} }
@@ -319,17 +319,25 @@ public class CallMaterialTask extends AbstractAcsTask {
param.put("group_device", group_device); param.put("group_device", group_device);
JSONObject outStructObj = StructFindUtil.getOutStruct(param); JSONObject outStructObj = StructFindUtil.getOutStruct(param);
if (ObjectUtil.isEmpty(outStructObj) && !StrUtil.equals(ivt_workprocedure_id, WorkProcedureEnum.YZGX.getId())) { if (ObjectUtil.isEmpty(outStructObj) && !StrUtil.equals(ivt_workprocedure_id, WorkProcedureEnum.YZGX.getId())) {
//假如没有货且下料位两个都为空下发acs动作信号 //假如没有货,且下料位两个都为空,并且没有执行中的任务 下发acs动作信号
WQLObject point_table = WQLObject.getWQLObject("sch_base_point"); WQLObject point_table = WQLObject.getWQLObject("sch_base_point");
WmsToAcsServiceImpl wmsToAcsService = new WmsToAcsServiceImpl(); WmsToAcsServiceImpl wmsToAcsService = new WmsToAcsServiceImpl();
//更新分拣机械手 上下料位置的点位状态 //更新分拣机械手 上下料位置的点位状态
JSONArray parr = WQL.getWO("ACSTOMES_001").addParam("area_type", AreaEnum.FJQY.getCode()).addParam("flag", "4").process().getResultJSONArray(0); JSONArray parr = WQL.getWO("ACSTOMES_001").addParam("area_type", AreaEnum.FJQY.getCode()).addParam("flag", "4").process().getResultJSONArray(0);
//JSONArray parr = point_table.query("area_type ='27'").getResultJSONArray(0); //JSONArray parr = point_table.query("area_type ='27'").getResultJSONArray(0);
PointUpdateUtil.updatePoint(parr); PointUpdateUtil.updatePoint(parr);
if (StrUtil.equals(next_point_code, "FJJXSSLW101") || StrUtil.equals(next_point_code, "FJJXSSLW102")) { JSONObject nextpointObj = point_table.query("point_code ='" + next_point_code + "'").uniqueResult(0);
String point_status01 = point_table.query("point_code ='FJJXSSLW101'").uniqueResult(0).getString("point_status"); if (StrUtil.equals(nextpointObj.getString("area_type"), "27")) {
String point_status02 = point_table.query("point_code ='FJJXSSLW102'").uniqueResult(0).getString("point_status"); //找拆垛位置的对应的另外一个点位
if (StrUtil.equals(point_status01, "00") && StrUtil.equals(point_status02, "00")) { String other_point_code = point_table.query("point_code<>'" + next_point_code + "' " +
"and device_id='" + nextpointObj.getString("device_id") + "' and device_point_type='02' ").uniqueResult(0).getString("point_code");
String point_status01 = point_table.query("point_code ='" + next_point_code + "'").uniqueResult(0).getString("point_status");
String point_status02 = point_table.query("point_code ='" + other_point_code + "'").uniqueResult(0).getString("point_status");
//没有执行中的任务
WQLObject task_table = WQLObject.getWQLObject("sch_base_task");
JSONObject task1 = task_table.query("next_point_code ='" + next_point_code + "' and is_delete='0' and task_status<>'07'").uniqueResult(0);
JSONObject task2 = task_table.query("next_point_code ='" + other_point_code + "' and is_delete='0' and task_status<>'07'").uniqueResult(0);
if (StrUtil.equals(point_status01, "00") && StrUtil.equals(point_status02, "00") && ObjectUtil.isEmpty(task1) && ObjectUtil.isEmpty(task2)) {
JSONObject jo = new JSONObject(); JSONObject jo = new JSONObject();
JSONArray arr = new JSONArray(); JSONArray arr = new JSONArray();
jo.put("device_code", "FJJXS1"); jo.put("device_code", "FJJXS1");

View File

@@ -117,10 +117,19 @@ public class SendMaterialTask extends AbstractAcsTask {
pointTab.update(endpointObj); pointTab.update(endpointObj);
JSONObject startPointObj = pointTab.query("point_code='" + jsonTask.getString("start_point_code") + "'").uniqueResult(0); JSONObject startPointObj = pointTab.query("point_code='" + jsonTask.getString("start_point_code") + "'").uniqueResult(0);
startPointObj.put("lock_type", "00"); //假如起点是码垛位置则不需要更新
startPointObj.put("point_status", "00"); if (!(StrUtil.equals(jsonTask.getString("start_point_code"), "FJJXSXLW201") ||
startPointObj.put("vehicle_code", ""); StrUtil.equals(jsonTask.getString("start_point_code"), "FJJXSXLW202") ||
pointTab.update(startPointObj); StrUtil.equals(jsonTask.getString("start_point_code"), "FJJXSXLW301") ||
StrUtil.equals(jsonTask.getString("start_point_code"), "FJJXSXLW302"))
) {
startPointObj.put("lock_type", "00");
startPointObj.put("point_status", "00");
startPointObj.put("vehicle_code", "");
pointTab.update(startPointObj);
}
taskTab.update(jsonTask); taskTab.update(jsonTask);
String area_type = endpointObj.getString("area_type"); String area_type = endpointObj.getString("area_type");
//1压机下料货架调用接口反馈给嘉耐 搬运任务 //1压机下料货架调用接口反馈给嘉耐 搬运任务
@@ -130,14 +139,14 @@ public class SendMaterialTask extends AbstractAcsTask {
jo.put("task_id", task_id); jo.put("task_id", task_id);
jo.put("next_point_code", jsonTask.getString("next_point_code")); jo.put("next_point_code", jsonTask.getString("next_point_code"));
WmsToJnServiceImpl wmsToJnServiceImpl = new WmsToJnServiceImpl(); WmsToJnServiceImpl wmsToJnServiceImpl = new WmsToJnServiceImpl();
if (StrUtil.equals(area_type,AreaEnum.RYHCHJ.getCode())){ if (StrUtil.equals(area_type, AreaEnum.RYHCHJ.getCode())) {
wmsToJnServiceImpl.feedBackCarryRecord(jo); wmsToJnServiceImpl.feedBackCarryRecord(jo);
} }
if (StrUtil.equals(area_type,AreaEnum.CYHCHJ.getCode())){ if (StrUtil.equals(area_type, AreaEnum.CYHCHJ.getCode())) {
wmsToJnServiceImpl.feedBackInWait(jo); wmsToJnServiceImpl.feedBackInWait(jo);
} }
if (StrUtil.equals(area_type,AreaEnum.MTPQ.getCode())){ if (StrUtil.equals(area_type, AreaEnum.MTPQ.getCode())) {
wmsToJnServiceImpl.feedBackInPartStock(jo); wmsToJnServiceImpl.feedBackInPartStock(jo);
} }
} }