rev:内包间优化
This commit is contained in:
@@ -88,7 +88,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
RLock lock = redissonClient.getLock(task_id);
|
||||
boolean tryLock = lock.tryLock(0, TimeUnit.SECONDS);
|
||||
try {
|
||||
if (tryLock){
|
||||
if (tryLock) {
|
||||
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||
// 任务处理类
|
||||
String processing_class = taskObj.getString("handle_class");
|
||||
@@ -122,8 +122,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
message = e.getMessage();
|
||||
throw new BadRequestException(message);
|
||||
}
|
||||
}else {
|
||||
throw new BadRequestException("任务标识为:"+task_id+"的任务正在操作中!");
|
||||
} else {
|
||||
throw new BadRequestException("任务标识为:" + task_id + "的任务正在操作中!");
|
||||
}
|
||||
} finally {
|
||||
if (tryLock) {
|
||||
@@ -1078,6 +1078,13 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
JSONObject container_jo2 = WQLObject.getWQLObject("pdm_bi_slittingproductionplan").query("container_name = '" + container_name2 + "'").uniqueResult(0);
|
||||
rows.add(container_jo2);
|
||||
}
|
||||
//将穿拔轴位的库存清空
|
||||
JSONObject cbj_jo = WQLObject.getWQLObject("st_ivt_shaftivt").query("product_area = '" + product_area + "' AND point_type = '0'").uniqueResult(0);
|
||||
cbj_jo.put("qzz_size", "");
|
||||
cbj_jo.put("qzz_generation", "");
|
||||
cbj_jo.put("have_qzz", "0");
|
||||
WQLObject.getWQLObject("st_ivt_shaftivt").update(cbj_jo);
|
||||
|
||||
JSONObject conrimd_jo = new JSONObject();
|
||||
conrimd_jo.put("qzzno", qzzno);
|
||||
conrimd_jo.put("cut_rows", rows);
|
||||
@@ -1234,6 +1241,14 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
JSONObject point1_jo = ivt_shaftivt.query("point_code = '" + task_jo.getString("point_code1") + "'").uniqueResult(0);
|
||||
point1_jo.put("have_qzz", "0");
|
||||
ivt_shaftivt.update(point1_jo);
|
||||
} else if ("010607".equals(point_type)) {
|
||||
JSONObject point1_jo = ivt_shaftivt.query("point_code = '" + task_jo.getString("point_code1") + "'").uniqueResult(0);
|
||||
point1_jo.put("qzz_size", "");
|
||||
point1_jo.put("qzz_generation", "");
|
||||
point1_jo.put("have_qzz", "0");
|
||||
point1_jo.put("container_name1", "");
|
||||
point1_jo.put("container_name2", "");
|
||||
ivt_shaftivt.update(point1_jo);
|
||||
} else {
|
||||
JSONObject point3_jo = ivt_shaftivt.query("point_code = '" + task_jo.getString("point_code3") + "'").uniqueResult(0);
|
||||
point3_jo.put("have_qzz", "0");
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.nl.wms.sch.tasks;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
@@ -170,29 +171,23 @@ public class PaperTrussTask extends AbstractAcsTask {
|
||||
}
|
||||
//套轴气胀轴取货任务
|
||||
if ("010607".equals(task_type)) {
|
||||
String point_code = task_jo.getString("point_code1");
|
||||
JSONObject goal_point = ivt_shaftivt.query("point_code = '" + point_code + "'").uniqueResult(0);
|
||||
goal_point.put("qzz_size", "");
|
||||
goal_point.put("qzz_generation", "");
|
||||
goal_point.put("have_qzz", "0");
|
||||
goal_point.put("container_name1", "");
|
||||
goal_point.put("container_name2", "");
|
||||
ivt_shaftivt.update(goal_point);
|
||||
String point_code2 = task_jo.getString("point_code2");
|
||||
JSONObject goal_point2 = ivt_shaftivt.query("point_code = '" + point_code2 + "'").uniqueResult(0);
|
||||
JSONObject request_param = task_jo.getJSONObject("request_param");
|
||||
String qzz_size = request_param.getString("need_size");
|
||||
String qzz_generation = request_param.getString("need_generation");
|
||||
String point_location = request_param.getString("need_location");
|
||||
String container_name1 = request_param.getString("container_name1");
|
||||
String container_name2 = request_param.getString("container_name2");
|
||||
goal_point2.put("have_qzz", "1");
|
||||
goal_point2.put("qzz_size", qzz_size);
|
||||
goal_point2.put("qzz_generation", qzz_generation);
|
||||
goal_point2.put("point_location", point_location);
|
||||
goal_point2.put("container_name1", container_name1);
|
||||
goal_point2.put("container_name2", container_name2);
|
||||
ivt_shaftivt.update(goal_point2);
|
||||
if (ObjectUtil.isNotEmpty(goal_point2)) {
|
||||
JSONObject request_param = task_jo.getJSONObject("request_param");
|
||||
String qzz_size = request_param.getString("need_size");
|
||||
String qzz_generation = request_param.getString("need_generation");
|
||||
String point_location = request_param.getString("need_location");
|
||||
String container_name1 = request_param.getString("container_name1");
|
||||
String container_name2 = request_param.getString("container_name2");
|
||||
goal_point2.put("have_qzz", "1");
|
||||
goal_point2.put("qzz_size", qzz_size);
|
||||
goal_point2.put("qzz_generation", qzz_generation);
|
||||
goal_point2.put("point_location", point_location);
|
||||
goal_point2.put("container_name1", container_name1);
|
||||
goal_point2.put("container_name2", container_name2);
|
||||
ivt_shaftivt.update(goal_point2);
|
||||
}
|
||||
}
|
||||
}
|
||||
map.put("update_optid", currentUserId);
|
||||
@@ -247,9 +242,9 @@ public class PaperTrussTask extends AbstractAcsTask {
|
||||
json.put("material_code", form.getString("material_code"));
|
||||
json.put("product_area", form.getString("product_area"));
|
||||
String task_status = form.getString("task_status");
|
||||
if (StrUtil.isEmpty(task_status)){
|
||||
if (StrUtil.isEmpty(task_status)) {
|
||||
json.put("task_status", TaskStatusEnum.START_AND_POINT.getCode());
|
||||
}else {
|
||||
} else {
|
||||
json.put("task_status", task_status);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user