现场初始调试完成,
入库(有货/空容器) 出库,库存出库 AGV任务对接
This commit is contained in:
1 parent
b4632cfc33
commit
70e6866e20
9 files changed
+243
-100
No files matched your search
@@ -68,8 +68,8 @@ public class ShipOutController : BaseController
|
||||
FromLocation = task.FromLocation,
|
||||
ToLocation = task.ToLocation
|
||||
};
|
||||
var res1 = Wtm.CallAPI<ApiJsonResult<dynamic>>("WCS", "TaskAssign", HttpMethodEnum.POST, postData);
|
||||
var res = res1.Result.Data;
|
||||
var res = Wtm.CallAPI<ApiJsonResult<dynamic>>("WCS", "TaskAssign", HttpMethodEnum.POST, postData)
|
||||
.Result.Data;
|
||||
if (res.Success)
|
||||
{
|
||||
task.Status = TaskStatusEnum.已下发;
|
||||
@@ -92,30 +92,38 @@ public class ShipOutController : BaseController
|
||||
|
||||
public IActionResult AgvTask(string type)
|
||||
{
|
||||
var task_id = "123";
|
||||
switch (type)
|
||||
try
|
||||
{
|
||||
case "In":
|
||||
task_id = "1";
|
||||
break;
|
||||
case "Out":
|
||||
task_id = "2";
|
||||
break;
|
||||
case "Charge":
|
||||
task_id = "3";
|
||||
break;
|
||||
default:
|
||||
return JsonMore(null,500,"参数错误!");
|
||||
var task_id = type switch
|
||||
{
|
||||
"In" => "ee66a5dc570cecd0",
|
||||
"Out" => "6970907a6b82e7fb",
|
||||
"Charge" => "a7a93155ff7f23a7",
|
||||
_ => throw new Exception("参数错误!")
|
||||
};
|
||||
|
||||
var res = Wtm.CallAPI<agvResult>("ACS", "task_mould_do", HttpMethodEnum.POST, new
|
||||
{
|
||||
task_id = task_id
|
||||
});
|
||||
if (res.Result.Data.ack != 0)
|
||||
{
|
||||
return JsonMore(null, 500, res.Result.Data.msg);
|
||||
}
|
||||
|
||||
return JsonMore(null);
|
||||
}
|
||||
var res = Wtm.CallAPI<dynamic>("ACS", "task_mould_do", HttpMethodEnum.POST, new
|
||||
catch (Exception ex)
|
||||
{
|
||||
task_id = task_id
|
||||
});
|
||||
if (res.Result.Data.ack != 0)
|
||||
{
|
||||
return JsonMore(null,500,res.Result.Data.msg);
|
||||
return JsonMore(null, 500, ex.Message);
|
||||
}
|
||||
return JsonMore(null);
|
||||
}
|
||||
|
||||
public class agvResult
|
||||
{
|
||||
public int ack { get; set; }
|
||||
public string msg { get; set; }
|
||||
public dynamic data { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,31 +1,41 @@
|
||||
<div id="shipout">
|
||||
<a-space direction="vertical" fill>
|
||||
<a-space direction="vertical" fill :size="large">
|
||||
@* <a-input :style="{width:'320px'}" placeholder="扫描箱号" v-model="ContainerCode" allow-clear/> *@
|
||||
<a-button @@click="handleClick"
|
||||
:loading="loading1"
|
||||
type="primary">
|
||||
type="primary"
|
||||
size="large">
|
||||
呼叫出库
|
||||
</a-button>
|
||||
|
||||
<a-button @@click='handleAGVTask("In")'
|
||||
:loading="loading2"
|
||||
type="primary"
|
||||
status="warning">
|
||||
到入库点
|
||||
</a-button>
|
||||
<a-divider />
|
||||
<a-space>
|
||||
<template #split>
|
||||
<a-divider direction="vertical" />
|
||||
</template>
|
||||
<a-button @@click='handleAGVTask("In")'
|
||||
:loading="loading2"
|
||||
type="primary"
|
||||
status="warning"
|
||||
size="large">
|
||||
到入库点
|
||||
</a-button>
|
||||
|
||||
<a-button @@click='handleAGVTask("Charge")'
|
||||
:loading="loading2"
|
||||
type="primary"
|
||||
status="success">
|
||||
充电任务
|
||||
</a-button>
|
||||
<a-button @@click='handleAGVTask("Charge")'
|
||||
:loading="loading2"
|
||||
type="primary"
|
||||
status="success"
|
||||
size="large">
|
||||
充电任务
|
||||
</a-button>
|
||||
|
||||
<a-button @@click='handleAGVTask("Out")'
|
||||
:loading="loading2"
|
||||
type="outline">
|
||||
到出库点
|
||||
</a-button>
|
||||
<a-button @@click='handleAGVTask("Out")'
|
||||
:loading="loading2"
|
||||
type="outline"
|
||||
size="large">
|
||||
到出库点
|
||||
</a-button>
|
||||
</a-space>
|
||||
</a-space>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
Reference in new issue
Block a user