任务修改
This commit is contained in:
@@ -191,14 +191,6 @@ public class RawFoilServiceImpl implements RawFoilService {
|
||||
jsonRaw.put("status", "02");
|
||||
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();
|
||||
jo.put("message", "操作成功!");
|
||||
return jo;
|
||||
|
||||
Binary file not shown.
@@ -4,8 +4,8 @@ package org.nl.wms.sch.manage;
|
||||
* 完成方式:00自动,01:手动
|
||||
*/
|
||||
public enum FinishTypeEnum {
|
||||
AUTO("00", "自动"),
|
||||
WCS_DELETE("01", "手动");
|
||||
AUTO("1", "自动"),
|
||||
WCS_DELETE("2", "手动");
|
||||
private String name;
|
||||
private String code;
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package org.nl.wms.sch.manage;
|
||||
|
||||
public enum TaskStatusEnum {
|
||||
CREATED("1", "生成"),
|
||||
SURE_START("2", "确定起点"),
|
||||
SURE_END("3", "确定终点"),
|
||||
START_AND_POINT("4", "起点终点确认"),
|
||||
ISSUE("5", "下发"),
|
||||
EXECUTING("6", "执行中"),
|
||||
FINISHED("7", "完成");
|
||||
CREATED("01", "生成"),
|
||||
SURE_START("02", "确定起点"),
|
||||
SURE_END("03", "确定终点"),
|
||||
START_AND_POINT("04", "起点终点确认"),
|
||||
ISSUE("05", "下发"),
|
||||
EXECUTING("06", "执行中"),
|
||||
FINISHED("07", "完成");
|
||||
|
||||
private String name;
|
||||
private String code;
|
||||
|
||||
Binary file not shown.
@@ -92,22 +92,6 @@ public class TaskServiceImpl implements TaskService {
|
||||
WQLObject pointTab = WQLObject.getWQLObject("SCH_BASE_Point");
|
||||
for (int i = 0; i < content.size(); 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);
|
||||
}
|
||||
json.put("content", res);
|
||||
|
||||
@@ -69,9 +69,9 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
||||
String task_id = taskObj.getString("task_id");
|
||||
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)) {
|
||||
@@ -86,9 +86,9 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
||||
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_optname", SecurityUtils.getCurrentUsername());
|
||||
jsonTask.put("update_time", DateUtil.now());
|
||||
@@ -104,7 +104,8 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
||||
if (ObjectUtil.isEmpty(jsonIvt)) throw new BadRequestException("未找到可用点位:" + point_code1);
|
||||
// 校验终点是否存在
|
||||
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");
|
||||
@@ -127,7 +128,7 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
||||
|
||||
// 更新冷却区出入表
|
||||
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_optname", SecurityUtils.getCurrentUsername());
|
||||
jsonCool.put("confirm_time", DateUtil.now());
|
||||
@@ -158,21 +159,21 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
||||
String point_code2 = form.getString("point_code2");
|
||||
String point_code3 = form.getString("point_code3");
|
||||
String point_code4 = form.getString("point_code4");
|
||||
if (cutConveyorTask.isSingleTask(point_code1)){
|
||||
throw new BadRequestException("点位:"+point_code1+"存在未完成的任务!");
|
||||
if (cutConveyorTask.isSingleTask(point_code1)) {
|
||||
throw new BadRequestException("点位:" + point_code1 + "存在未完成的任务!");
|
||||
}
|
||||
if (cutConveyorTask.isSingleTask(point_code2)){
|
||||
throw new BadRequestException("点位:"+point_code2+"存在未完成的任务!");
|
||||
if (cutConveyorTask.isSingleTask(point_code2)) {
|
||||
throw new BadRequestException("点位:" + point_code2 + "存在未完成的任务!");
|
||||
}
|
||||
if (cutConveyorTask.isSingleTask(point_code3)){
|
||||
throw new BadRequestException("点位:"+point_code3+"存在未完成的任务!");
|
||||
if (cutConveyorTask.isSingleTask(point_code3)) {
|
||||
throw new BadRequestException("点位:" + point_code3 + "存在未完成的任务!");
|
||||
}
|
||||
if (cutConveyorTask.isSingleTask(point_code4)){
|
||||
throw new BadRequestException("点位:"+point_code4+"存在未完成的任务!");
|
||||
if (cutConveyorTask.isSingleTask(point_code4)) {
|
||||
throw new BadRequestException("点位:" + point_code4 + "存在未完成的任务!");
|
||||
}
|
||||
|
||||
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_status", "01");
|
||||
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_name", currentUsername);
|
||||
json.put("create_time", DateUtil.now());
|
||||
json.put("priority","1" );
|
||||
json.put("acs_task_type","1" );
|
||||
json.put("priority", "1");
|
||||
json.put("acs_task_type", "1");
|
||||
tab.insert(json);
|
||||
|
||||
this.immediateNotifyAcs();
|
||||
return json.getString("task_id");
|
||||
}
|
||||
|
||||
@@ -201,7 +203,6 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
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 {
|
||||
}
|
||||
Reference in New Issue
Block a user