任务修改
This commit is contained in:
@@ -191,14 +191,6 @@ public class RawFoilServiceImpl implements RawFoilService {
|
|||||||
jsonRaw.put("status", "02");
|
jsonRaw.put("status", "02");
|
||||||
rawTab.update(jsonRaw);
|
rawTab.update(jsonRaw);
|
||||||
|
|
||||||
// 下发任务
|
|
||||||
/* JSONObject jsonObject = callEmpReelTask.renotifyAcs(task_id);
|
|
||||||
if (StrUtil.equals(jsonObject.getString("status"), "200")) {
|
|
||||||
// 成功返回 更新任务状态
|
|
||||||
JSONObject jsonTask = taskTab.query("task_id ='" + task_id + "'").uniqueResult(0);
|
|
||||||
jsonTask.put("task_status", "05");
|
|
||||||
taskTab.update(jsonTask);
|
|
||||||
}*/
|
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
jo.put("message", "操作成功!");
|
jo.put("message", "操作成功!");
|
||||||
return jo;
|
return jo;
|
||||||
|
|||||||
Binary file not shown.
@@ -4,8 +4,8 @@ package org.nl.wms.sch.manage;
|
|||||||
* 完成方式:00自动,01:手动
|
* 完成方式:00自动,01:手动
|
||||||
*/
|
*/
|
||||||
public enum FinishTypeEnum {
|
public enum FinishTypeEnum {
|
||||||
AUTO("00", "自动"),
|
AUTO("1", "自动"),
|
||||||
WCS_DELETE("01", "手动");
|
WCS_DELETE("2", "手动");
|
||||||
private String name;
|
private String name;
|
||||||
private String code;
|
private String code;
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
package org.nl.wms.sch.manage;
|
package org.nl.wms.sch.manage;
|
||||||
|
|
||||||
public enum TaskStatusEnum {
|
public enum TaskStatusEnum {
|
||||||
CREATED("1", "生成"),
|
CREATED("01", "生成"),
|
||||||
SURE_START("2", "确定起点"),
|
SURE_START("02", "确定起点"),
|
||||||
SURE_END("3", "确定终点"),
|
SURE_END("03", "确定终点"),
|
||||||
START_AND_POINT("4", "起点终点确认"),
|
START_AND_POINT("04", "起点终点确认"),
|
||||||
ISSUE("5", "下发"),
|
ISSUE("05", "下发"),
|
||||||
EXECUTING("6", "执行中"),
|
EXECUTING("06", "执行中"),
|
||||||
FINISHED("7", "完成");
|
FINISHED("07", "完成");
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
private String code;
|
private String code;
|
||||||
|
|||||||
Binary file not shown.
@@ -92,22 +92,6 @@ public class TaskServiceImpl implements TaskService {
|
|||||||
WQLObject pointTab = WQLObject.getWQLObject("SCH_BASE_Point");
|
WQLObject pointTab = WQLObject.getWQLObject("SCH_BASE_Point");
|
||||||
for (int i = 0; i < content.size(); i++) {
|
for (int i = 0; i < content.size(); i++) {
|
||||||
JSONObject taskObj = content.getJSONObject(i);
|
JSONObject taskObj = content.getJSONObject(i);
|
||||||
String point_code1 = taskObj.getString("point_code1");
|
|
||||||
if (ObjectUtil.isNotEmpty(point_code1)) {
|
|
||||||
JSONObject point1 = pointTab.query("point_code = '" + point_code1 + "'").uniqueResult(0);
|
|
||||||
taskObj.put("point1_region_name", point1.getString("region_name"));
|
|
||||||
}
|
|
||||||
|
|
||||||
String point_code2 = taskObj.getString("point_code2");
|
|
||||||
if (ObjectUtil.isNotEmpty(point_code2)) {
|
|
||||||
JSONObject point2 = pointTab.query("point_code = '" + point_code2 + "'").uniqueResult(0);
|
|
||||||
taskObj.put("point2_region_name", point2.getString("region_name"));
|
|
||||||
}
|
|
||||||
String point_code3 = taskObj.getString("point_code3");
|
|
||||||
if (ObjectUtil.isNotEmpty(point_code3)) {
|
|
||||||
JSONObject point3 = pointTab.query("point_code = '" + point_code3 + "'").uniqueResult(0);
|
|
||||||
taskObj.put("point3_region_name", point3.getString("region_name"));
|
|
||||||
}
|
|
||||||
res.add(taskObj);
|
res.add(taskObj);
|
||||||
}
|
}
|
||||||
json.put("content", res);
|
json.put("content", res);
|
||||||
|
|||||||
@@ -69,9 +69,9 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
|||||||
String task_id = taskObj.getString("task_id");
|
String task_id = taskObj.getString("task_id");
|
||||||
JSONObject jsonTask = taskTab.query("task_id = '" + task_id + "'").uniqueResult(0);
|
JSONObject jsonTask = taskTab.query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
|
||||||
if (StrUtil.equals(status,"0")) {
|
if (StrUtil.equals(status, "0")) {
|
||||||
// 取消删除任务
|
// 取消删除任务
|
||||||
taskTab.delete("task_id = '"+task_id+"'");
|
taskTab.delete("task_id = '" + task_id + "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TaskStatusEnum.EXECUTING.getCode().equals(status)) {
|
if (TaskStatusEnum.EXECUTING.getCode().equals(status)) {
|
||||||
@@ -86,9 +86,9 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
|||||||
taskTab.update(jsonTask);
|
taskTab.update(jsonTask);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(StrUtil.equals(status, TaskStatusEnum.FINISHED.getCode())) {
|
if (StrUtil.equals(status, TaskStatusEnum.FINISHED.getCode())) {
|
||||||
// 更改任务状态为完成
|
// 更改任务状态为完成
|
||||||
jsonTask.put("task_status",TaskStatusEnum.FINISHED.getCode());
|
jsonTask.put("task_status", TaskStatusEnum.FINISHED.getCode());
|
||||||
jsonTask.put("update_optid", SecurityUtils.getCurrentUserId());
|
jsonTask.put("update_optid", SecurityUtils.getCurrentUserId());
|
||||||
jsonTask.put("update_optname", SecurityUtils.getCurrentUsername());
|
jsonTask.put("update_optname", SecurityUtils.getCurrentUsername());
|
||||||
jsonTask.put("update_time", DateUtil.now());
|
jsonTask.put("update_time", DateUtil.now());
|
||||||
@@ -104,7 +104,8 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
|||||||
if (ObjectUtil.isEmpty(jsonIvt)) throw new BadRequestException("未找到可用点位:" + point_code1);
|
if (ObjectUtil.isEmpty(jsonIvt)) throw new BadRequestException("未找到可用点位:" + point_code1);
|
||||||
// 校验终点是否存在
|
// 校验终点是否存在
|
||||||
JSONObject nextDto = sbTab.query("point_code ='" + point_code2 + "'").uniqueResult(0);
|
JSONObject nextDto = sbTab.query("point_code ='" + point_code2 + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(nextDto)) throw new BadRequestException("未找到可用点位:" + jsonTask.getString("point_code2"));
|
if (ObjectUtil.isEmpty(nextDto))
|
||||||
|
throw new BadRequestException("未找到可用点位:" + jsonTask.getString("point_code2"));
|
||||||
|
|
||||||
// 更新冷却库存状态
|
// 更新冷却库存状态
|
||||||
jsonIvt.put("empty_point_status", "01");
|
jsonIvt.put("empty_point_status", "01");
|
||||||
@@ -127,7 +128,7 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
|||||||
|
|
||||||
// 更新冷却区出入表
|
// 更新冷却区出入表
|
||||||
JSONObject jsonCool = coolTab.query("task_id = '" + task_id + "'").uniqueResult(0);
|
JSONObject jsonCool = coolTab.query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
jsonCool.put("bill_status","50");
|
jsonCool.put("bill_status", "50");
|
||||||
jsonCool.put("confirm_optid", SecurityUtils.getCurrentUserId());
|
jsonCool.put("confirm_optid", SecurityUtils.getCurrentUserId());
|
||||||
jsonCool.put("confirm_optname", SecurityUtils.getCurrentUsername());
|
jsonCool.put("confirm_optname", SecurityUtils.getCurrentUsername());
|
||||||
jsonCool.put("confirm_time", DateUtil.now());
|
jsonCool.put("confirm_time", DateUtil.now());
|
||||||
@@ -158,21 +159,21 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
|||||||
String point_code2 = form.getString("point_code2");
|
String point_code2 = form.getString("point_code2");
|
||||||
String point_code3 = form.getString("point_code3");
|
String point_code3 = form.getString("point_code3");
|
||||||
String point_code4 = form.getString("point_code4");
|
String point_code4 = form.getString("point_code4");
|
||||||
if (cutConveyorTask.isSingleTask(point_code1)){
|
if (cutConveyorTask.isSingleTask(point_code1)) {
|
||||||
throw new BadRequestException("点位:"+point_code1+"存在未完成的任务!");
|
throw new BadRequestException("点位:" + point_code1 + "存在未完成的任务!");
|
||||||
}
|
}
|
||||||
if (cutConveyorTask.isSingleTask(point_code2)){
|
if (cutConveyorTask.isSingleTask(point_code2)) {
|
||||||
throw new BadRequestException("点位:"+point_code2+"存在未完成的任务!");
|
throw new BadRequestException("点位:" + point_code2 + "存在未完成的任务!");
|
||||||
}
|
}
|
||||||
if (cutConveyorTask.isSingleTask(point_code3)){
|
if (cutConveyorTask.isSingleTask(point_code3)) {
|
||||||
throw new BadRequestException("点位:"+point_code3+"存在未完成的任务!");
|
throw new BadRequestException("点位:" + point_code3 + "存在未完成的任务!");
|
||||||
}
|
}
|
||||||
if (cutConveyorTask.isSingleTask(point_code4)){
|
if (cutConveyorTask.isSingleTask(point_code4)) {
|
||||||
throw new BadRequestException("点位:"+point_code4+"存在未完成的任务!");
|
throw new BadRequestException("点位:" + point_code4 + "存在未完成的任务!");
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
json.put("task_id",IdUtil.getSnowflake(1,1).nextId());
|
json.put("task_id", IdUtil.getSnowflake(1, 1).nextId());
|
||||||
json.put("task_code", CodeUtil.getNewCode("TASK_CODE"));
|
json.put("task_code", CodeUtil.getNewCode("TASK_CODE"));
|
||||||
json.put("task_status", "01");
|
json.put("task_status", "01");
|
||||||
json.put("material_code", form.getString("material_code"));
|
json.put("material_code", form.getString("material_code"));
|
||||||
@@ -186,10 +187,11 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
|||||||
json.put("create_id", currentUserId);
|
json.put("create_id", currentUserId);
|
||||||
json.put("create_name", currentUsername);
|
json.put("create_name", currentUsername);
|
||||||
json.put("create_time", DateUtil.now());
|
json.put("create_time", DateUtil.now());
|
||||||
json.put("priority","1" );
|
json.put("priority", "1");
|
||||||
json.put("acs_task_type","1" );
|
json.put("acs_task_type", "1");
|
||||||
tab.insert(json);
|
tab.insert(json);
|
||||||
|
|
||||||
|
this.immediateNotifyAcs();
|
||||||
return json.getString("task_id");
|
return json.getString("task_id");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -201,7 +203,6 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void cancel(String task_id) {
|
public void cancel(String task_id) {
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package org.nl.wms.sch.tasks.fq;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分切呼叫物料并送空轴到冷却暂存区
|
||||||
|
*/
|
||||||
|
public class FqCallMaterialSendEmptyTask {
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package org.nl.wms.sch.tasks.fq;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分切机从冷却暂存区呼叫物料
|
||||||
|
*/
|
||||||
|
public class FqFromLqCallMaterialTask {
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package org.nl.wms.sch.tasks.fq;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分切机送空轴到冷却暂存区
|
||||||
|
*/
|
||||||
|
public class FqToLqSendEmptyTask {
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package org.nl.wms.sch.tasks.fq;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 烘箱到冷却区送物料
|
||||||
|
*/
|
||||||
|
public class HxToLqSendMaterialTask {
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package org.nl.wms.sch.tasks.fq;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冷却到烘箱送物料
|
||||||
|
*/
|
||||||
|
public class LqToHxSendMaterialTask {
|
||||||
|
}
|
||||||
@@ -113,25 +113,25 @@
|
|||||||
@selection-change="crud.selectionChangeHandler"
|
@selection-change="crud.selectionChangeHandler"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="50" />
|
<el-table-column type="selection" width="50" />
|
||||||
<el-table-column v-if="true" prop="task_id" label="任务标识" min-width="150" show-overflow-tooltip />
|
<!-- <el-table-column v-if="true" prop="task_id" label="任务标识" min-width="150" show-overflow-tooltip />
|
||||||
<el-table-column v-if="true" prop="material_id" label="物料标识" min-width="150" show-overflow-tooltip />
|
<el-table-column v-if="true" prop="material_id" label="物料标识" min-width="150" show-overflow-tooltip />-->
|
||||||
<el-table-column prop="task_code" label="任务编码" min-width="100" show-overflow-tooltip />
|
<el-table-column prop="task_code" label="任务编码" min-width="100" show-overflow-tooltip />
|
||||||
<el-table-column v-if="false" prop="task_type" label="任务类型" />
|
<el-table-column v-if="false" prop="task_type" label="任务类型" />
|
||||||
<el-table-column prop="acs_task_type" label="acs任务类型" min-width="120" show-overflow-tooltip>
|
<!--<el-table-column prop="acs_task_type" label="acs任务类型" min-width="120" show-overflow-tooltip>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ dict.label.acs_task_type[scope.row.acs_task_type] }}
|
{{ dict.label.acs_task_type[scope.row.acs_task_type] }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>-->
|
||||||
<el-table-column prop="task_name" label="任务描述" min-width="120" show-overflow-tooltip />
|
<el-table-column prop="task_name" label="任务描述" min-width="120" show-overflow-tooltip />
|
||||||
<el-table-column v-if="false" prop="task_type_name" label="任务类型" min-width="120" show-overflow-tooltip />
|
<el-table-column v-if="false" prop="task_type_name" label="任务类型" min-width="120" show-overflow-tooltip />
|
||||||
<el-table-column v-if="false" prop="task_status" label="任务状态" />
|
<el-table-column v-if="false" prop="task_status" label="任务状态" />
|
||||||
<el-table-column prop="task_status_name" label="任务状态" width="95px" :formatter="formatTaskStatusName" />
|
<el-table-column prop="task_status_name" label="任务状态" width="95px" :formatter="formatTaskStatusName" />
|
||||||
<el-table-column prop="vehicle_type" label="载具类型" min-width="100" show-overflow-tooltip>
|
<!--<el-table-column prop="vehicle_type" label="载具类型" min-width="100" show-overflow-tooltip>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ dict.label.vehicle_type[scope.row.vehicle_type] }}
|
{{ dict.label.vehicle_type[scope.row.vehicle_type] }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="vehicle_code" label="载具编码" min-width="100" show-overflow-tooltip />
|
<el-table-column prop="vehicle_code" label="载具编码" min-width="100" show-overflow-tooltip />-->
|
||||||
<el-table-column prop="point_code1" label="点位1" width="100" />
|
<el-table-column prop="point_code1" label="点位1" width="100" />
|
||||||
<el-table-column prop="point1_region_name" label="区域1" width="100" />
|
<el-table-column prop="point1_region_name" label="区域1" width="100" />
|
||||||
<el-table-column prop="point_code2" label="点位2" min-width="100" show-overflow-tooltip />
|
<el-table-column prop="point_code2" label="点位2" min-width="100" show-overflow-tooltip />
|
||||||
|
|||||||
Reference in New Issue
Block a user