This commit is contained in:
2023-02-14 00:12:31 +08:00
parent 3db46c9d6d
commit 88b4aad2e9
4 changed files with 32 additions and 7 deletions

View File

@@ -167,8 +167,8 @@ public class RawFoilServiceImpl implements RawFoilService {
// 起点和终点确定 生成任务
JSONObject param = new JSONObject();
param.put("point_code1", start_pint_code);
param.put("point_code2", jsonSb.getString("point_code"));
param.put("point_code3", jsonSb.getString("point_code"));
param.put("point_code2", jsonSb.getString("point_code")+"_K");
param.put("point_code3", jsonSb.getString("point_code")+"_M");
param.put("point_code4", point_code4);
param.put("task_type", "010101");
param.put("material_code", jsonRaw.getString("container_name"));
@@ -197,8 +197,8 @@ public class RawFoilServiceImpl implements RawFoilService {
if (!StrUtil.equals(jsonRaw.getString("status"), "02")) throw new BadRequestException("工单状态不为空轴搬出");
//查询该母卷号对应的任务
String container_name = whereJson.getString("container_name");
JSONObject task_jo = WQLObject.getWQLObject("SCH_BASE_Task").query("material_code = '" + container_name + "' and task_status <> '07'").uniqueResult(0);
String container_name = jsonRaw.getString("container_name");
JSONObject task_jo = WQLObject.getWQLObject("SCH_BASE_Task").query("material_code = '" + container_name + "' and task_status <> '07' AND is_delete = '0'").uniqueResult(0);
// 查询生箔点位库存表
JSONObject jsonSb = sbTab.query("ext_code = '" + jsonRaw.getString("resource_name") + "'and is_used = '1'").uniqueResult(0);
@@ -208,7 +208,8 @@ public class RawFoilServiceImpl implements RawFoilService {
JSONArray paramArr = new JSONArray();
JSONObject param = new JSONObject();
param.put("device_code", jsonSb.getString("point_code"));
param.put("option ", "1");
param.put("task_code", task_jo.getString("task_code"));
param.put("option", "1");
paramArr.add(param);
WmsToAcsServiceImpl wmsToAcsService = new WmsToAcsServiceImpl();
@@ -236,6 +237,29 @@ public class RawFoilServiceImpl implements RawFoilService {
JSONObject jsonRaw = rawTab.query("mfg_order_name = '" + raw_jo.getString("mfg_order_name") + "'").uniqueResult(0);
if (!StrUtil.equals(jsonRaw.getString("status"), "03")) throw new BadRequestException("工单不为确认下卷");
//查询该母卷号对应的任务
String container_name = jsonRaw.getString("container_name");
JSONObject task_jo = WQLObject.getWQLObject("SCH_BASE_Task").query("material_code = '" + container_name + "' and task_status <> '07' AND is_delete = '0'").uniqueResult(0);
// 查询生箔点位库存表
JSONObject jsonSb = rawTab.query("ext_code = '" + jsonRaw.getString("resource_name") + "'and is_used = '1'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonSb)) throw new BadRequestException("点位不存在");
//下发ACS执行取满放空的AGV动作
JSONArray paramArr = new JSONArray();
JSONObject param = new JSONObject();
param.put("device_code", jsonSb.getString("point_code"));
param.put("task_code", task_jo.getString("task_code"));
param.put("option", "2");
paramArr.add(param);
WmsToAcsServiceImpl wmsToAcsService = new WmsToAcsServiceImpl();
JSONObject result = wmsToAcsService.updateTask(paramArr);
if (!StrUtil.equals(result.getString("status"), "200")) {
throw new BadRequestException("操作失败:" + result.getString("message "));
}
// 更新工单状态为下卷完成
jsonRaw.put("status", "04");
rawTab.update(jsonRaw);

View File

@@ -81,7 +81,7 @@
OPTION 输入.is_used <> ""
is_used = 输入.is_used
ENDOPTION
OPTION 输入.is_used <> ""
OPTION 输入.point_location <> ""
point_location = 输入.point_location
ENDOPTION
OPTION 输入.begin_time <> ""

View File

@@ -49,7 +49,7 @@ public class CutConveyorTask extends AbstractAcsTask {
.task_type(json.getString("acs_task_type"))
.start_device_code(json.getString("point_code1"))
.next_device_code(json.getString("point_code2"))
.vehicle_code(json.getString("vehicle_code"))
.vehicle_code(json.getString("vehicle_code2"))
.priority(json.getString("priority"))
.remark(json.getString("remark"))
.build();

View File

@@ -168,6 +168,7 @@
</template>
</el-table-column>
<el-table-column prop="temperature" label="温度" />
<el-table-column prop="last_time" label="倒计时" width="120"/>
<el-table-column prop="group_name" label="组别" />
<el-table-column prop="ext_code" label="外部编码" width="130" />
<el-table-column prop="point_location" label="位置">