This commit is contained in:
2023-01-10 18:51:07 +08:00
parent 1aefdbcc6b
commit 1a764216fc
6 changed files with 26 additions and 7 deletions

View File

@@ -124,7 +124,17 @@ public class PointStatusServiceImpl implements PointStatusService {
if (ObjectUtil.isEmpty(cut_point)) {
cut_point = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("empty_point_code = '" + point_code + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(cut_point)) {
throw new BadRequestException("未查询到对应的分切机点位!");
//查询烘箱对接位的点位状态
JSONObject point_jo = WQLObject.getWQLObject("sch_base_point").query("point_code = '"+point_code+"'").uniqueResult(0);
if (ObjectUtil.isEmpty(point_jo)){
throw new BadRequestException("未查询到对应的分切机点位或烘箱对接位!!");
}
vehicle_code = point_jo.getString("material_code");
if (StrUtil.isNotEmpty(vehicle_code)){
have_goods = "02";
}else {
have_goods = "01";
}
} else {
vehicle_code = cut_point.getString("empty_vehicle_code");
have_goods = cut_point.getString("empty_point_status");

View File

@@ -467,6 +467,8 @@
point_code AS device_code
FROM
st_ivt_hotpointivt
WHERE
is_used = '1'
ENDSELECT
ENDQUERY
ENDIF

View File

@@ -93,6 +93,11 @@ public class EmptyVehicleTask extends AbstractAcsTask {
JSONObject task_jo = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '"+taskObj.getString("task_id")+"'").uniqueResult(0);
HashMap map = new HashMap();
//1:执行中,2:完成 ,3:acs取消
if (status.equals("0")){
// 更新删除字段
map.put("is_delete","1");
map.put("update_time", DateUtil.now());
}
if (status.equals(TaskStatusEnum.EXECUTING.getCode())) {
map.put("task_status", TaskStatusEnum.EXECUTING.getCode());
}

View File

@@ -472,6 +472,7 @@ public class StorPublicServiceImpl implements StorPublicService {
map.put("inv_code", "");
map.put("point_status", "1");
map.put("storagevehicle_code", "");
map.put("vehicle_code", "");
if (from.containsKey("is_free") && !from.getString("is_free").equals("1") && StrUtil.isNotEmpty(storagevehicle_code)) {
map.put("storagevehicle_code", storagevehicle_code);
map.put("storagevehicle_qty", "1");

View File

@@ -102,7 +102,9 @@ public class HandMoveStorServiceImpl implements HandMoveStorService {
//解锁起点点位、仓位
JSONObject from_start = new JSONObject();
from_start.put("lock_type", "1");
from_start.put("is_free", "0");
from_start.put("struct_id", jo.getString("turnout_struct_id"));
from_start.put("storagevehicle_code", jo.getString("storagevehicle_code"));
storPublicService.updateStructAndPoint(from_start);
//解锁终点点位、仓位
from_start.put("struct_id", jo.getString("turnin_struct_id"));
@@ -723,7 +725,7 @@ public class HandMoveStorServiceImpl implements HandMoveStorService {
JSONObject from_end = new JSONObject();
from_end.put("lock_type", "1");
from_end.put("struct_id", jo.getString("turnin_struct_id"));
from_start.put("is_free", "1");
from_end.put("is_free", "0");
from_end.put("storagevehicle_code", jo.getString("storagevehicle_code"));
storPublicService.updateStructAndPoint(from_end);

View File

@@ -78,15 +78,14 @@ public class HandMoveStorAcsTask extends AbstractAcsTask {
String currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
String taskdtl_id = taskObj.getString("taskdtl_id");
if (StrUtil.isEmpty(taskdtl_id)) {
String task_id = taskObj.getString("task_id");
if (StrUtil.isEmpty(task_id)) {
throw new BadRequestException("任务id不能为空");
}
JSONObject task = wo_Task.query("taskdtl_id='"+taskdtl_id+"'").uniqueResult(0);
JSONObject task = wo_Task.query("task_id='"+task_id+"'").uniqueResult(0);
if(task==null){
throw new BadRequestException("查询不到操作的任务记录!");
}
String task_id = task.getString("task_id");
if("1".equals(status)){
map.put("work_status","02");
wo_dtl.update(map,"task_id='"+task_id+"'");
@@ -94,7 +93,7 @@ public class HandMoveStorAcsTask extends AbstractAcsTask {
map.put("update_optid",currentUserId+"");
map.put("update_optname",nickName);
map.put("update_time",now);
wo_Task.update(map,"taskdtl_id='"+taskdtl_id+"'");
wo_Task.update(map,"task_id='"+task_id+"'");
}else if("2".equals(status)){
HandMoveStorServiceImpl handMoveStorServiceImpl = SpringContextHolder.getBean(HandMoveStorServiceImpl.class);
handMoveStorServiceImpl.finishTask(task);