修改
This commit is contained in:
@@ -699,6 +699,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public JSONObject shipDeviceUpdate(JSONObject whereJson) {
|
public JSONObject shipDeviceUpdate(JSONObject whereJson) {
|
||||||
log.info("shipDeviceUpdate请求参数:---------------------------------------------" + whereJson.toString());
|
log.info("shipDeviceUpdate请求参数:---------------------------------------------" + whereJson.toString());
|
||||||
String device_code = whereJson.getString("device_code");
|
String device_code = whereJson.getString("device_code");
|
||||||
|
|||||||
@@ -748,7 +748,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
|||||||
if (ObjectUtil.isEmpty(group_jo)) {
|
if (ObjectUtil.isEmpty(group_jo)) {
|
||||||
group_jo = new JSONObject();
|
group_jo = new JSONObject();
|
||||||
}
|
}
|
||||||
JSONArray del_rows = WQLObject.getWQLObject("pdm_bi_slittingproductionplan").query("resource_name = '" + ResourceName + "' AND split_group = '" + group_jo.getString("split_group") + "' AND (parent_container_name = '" + group_jo.getString("source_container_name") + "' OR parent_container_name = '" + group_jo.getString("source_container_name") + "')").getResultJSONArray(0);
|
JSONArray del_rows = WQLObject.getWQLObject("pdm_bi_slittingproductionplan").query("status = '03' AND is_delete = '0' AND resource_name = '" + ResourceName + "' AND split_group = '" + group_jo.getString("split_group") + "' AND (parent_container_name = '" + group_jo.getString("source_container_name") + "' OR parent_container_name = '" + group_jo.getString("source_container_name") + "')").getResultJSONArray(0);
|
||||||
if (up_rows.size() > 0) {
|
if (up_rows.size() > 0) {
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
jo.put("point_code", up_point_code);
|
jo.put("point_code", up_point_code);
|
||||||
@@ -765,14 +765,13 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
|||||||
jo.put("point_code", down_point_code);
|
jo.put("point_code", down_point_code);
|
||||||
jo.put("cut_rows", down_rows);
|
jo.put("cut_rows", down_rows);
|
||||||
if (del_rows.size() > 0) {
|
if (del_rows.size() > 0) {
|
||||||
if (up_rows.size() > 0){
|
if (up_rows.size() > 0) {
|
||||||
if (del_rows.size() == 1){
|
if (del_rows.size() >= 2) {
|
||||||
jo.put("is_last", "0");
|
jo.put("is_last", "0");
|
||||||
}else {
|
} else {
|
||||||
jo.put("is_last", "1");
|
jo.put("is_last", "1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
jo.put("is_last", "0");
|
|
||||||
} else {
|
} else {
|
||||||
jo.put("is_last", "1");
|
jo.put("is_last", "1");
|
||||||
}
|
}
|
||||||
@@ -983,7 +982,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
|||||||
.query("storagevehicle_code = '" + PackageBoxSN + "' and is_delete = '0' and is_used = '1' and lock_type = '1'").uniqueResult(0);
|
.query("storagevehicle_code = '" + PackageBoxSN + "' and is_delete = '0' and is_used = '1' and lock_type = '1'").uniqueResult(0);
|
||||||
|
|
||||||
if (ObjectUtil.isEmpty(jsonBox)) {
|
if (ObjectUtil.isEmpty(jsonBox)) {
|
||||||
throw new BadRequestException("此木箱不在库内:"+PackageBoxSN);
|
throw new BadRequestException("此木箱不在库内:" + PackageBoxSN);
|
||||||
}
|
}
|
||||||
storSet.add(jsonBox.getString("stor_code"));
|
storSet.add(jsonBox.getString("stor_code"));
|
||||||
}
|
}
|
||||||
@@ -1004,7 +1003,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
|||||||
JSONObject jsonBox = WQLObject.getWQLObject("st_ivt_structattr")
|
JSONObject jsonBox = WQLObject.getWQLObject("st_ivt_structattr")
|
||||||
.query("storagevehicle_code = '" + PackageBoxSN + "' and is_delete = '0' and is_used = '1' and lock_type = '1'").uniqueResult(0);
|
.query("storagevehicle_code = '" + PackageBoxSN + "' and is_delete = '0' and is_used = '1' and lock_type = '1'").uniqueResult(0);
|
||||||
|
|
||||||
if (StrUtil.equals(jsonBox.getString("stor_code"),stor_code)) {
|
if (StrUtil.equals(jsonBox.getString("stor_code"), stor_code)) {
|
||||||
rowsDtl.add(row);
|
rowsDtl.add(row);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1187,6 +1186,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
|||||||
plan_jo.put("update_optid", currentUserId);
|
plan_jo.put("update_optid", currentUserId);
|
||||||
plan_jo.put("update_optname", nickName);
|
plan_jo.put("update_optname", nickName);
|
||||||
plan_jo.put("update_time", DateUtil.now());
|
plan_jo.put("update_time", DateUtil.now());
|
||||||
|
WQLObject.getWQLObject("pdm_bi_slittingproductionplan").update(plan_jo);
|
||||||
result.put("RTYPE", "S");
|
result.put("RTYPE", "S");
|
||||||
result.put("RTMSG", "操作成功!");
|
result.put("RTMSG", "操作成功!");
|
||||||
result.put("RTOAL", 1);
|
result.put("RTOAL", 1);
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import org.nl.wms.pda.mps.service.CasingService;
|
|||||||
import org.nl.wms.pda.mps.service.ShippingService;
|
import org.nl.wms.pda.mps.service.ShippingService;
|
||||||
import org.nl.wms.sch.tasks.CutConveyorTask;
|
import org.nl.wms.sch.tasks.CutConveyorTask;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
@@ -48,6 +49,7 @@ public class ShippingServiceImpl implements ShippingService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public JSONObject needVehicle(JSONObject whereJson) {
|
public JSONObject needVehicle(JSONObject whereJson) {
|
||||||
JSONObject cut_jo = whereJson.getJSONObject("cut_jo");
|
JSONObject cut_jo = whereJson.getJSONObject("cut_jo");
|
||||||
//查询离该分切计划包含机台最近的一个空载具
|
//查询离该分切计划包含机台最近的一个空载具
|
||||||
@@ -77,6 +79,7 @@ public class ShippingServiceImpl implements ShippingService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public JSONObject confirm(JSONObject whereJson) {
|
public JSONObject confirm(JSONObject whereJson) {
|
||||||
JSONArray rows = whereJson.getJSONArray("cut_rows");
|
JSONArray rows = whereJson.getJSONArray("cut_rows");
|
||||||
String vehicle_code = whereJson.getString("vehicle_code");
|
String vehicle_code = whereJson.getString("vehicle_code");
|
||||||
@@ -238,6 +241,7 @@ public class ShippingServiceImpl implements ShippingService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public JSONObject returnVehicle(JSONObject whereJson) {
|
public JSONObject returnVehicle(JSONObject whereJson) {
|
||||||
String point_code = whereJson.getString("point_code");
|
String point_code = whereJson.getString("point_code");
|
||||||
String vehicle_code = whereJson.getString("vehicle_code");
|
String vehicle_code = whereJson.getString("vehicle_code");
|
||||||
@@ -300,6 +304,7 @@ public class ShippingServiceImpl implements ShippingService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public JSONObject acrossVehicle(JSONObject whereJson) {
|
public JSONObject acrossVehicle(JSONObject whereJson) {
|
||||||
//载具横移起点
|
//载具横移起点
|
||||||
String point_code = whereJson.getString("point_code");
|
String point_code = whereJson.getString("point_code");
|
||||||
|
|||||||
@@ -274,7 +274,9 @@
|
|||||||
plan.manufacture_date,
|
plan.manufacture_date,
|
||||||
(case when plan.is_child_ps_ok = '1' then '是' else '否' end) AS is_child_ps_ok,
|
(case when plan.is_child_ps_ok = '1' then '是' else '否' end) AS is_child_ps_ok,
|
||||||
del.point_code AS delivery_code,
|
del.point_code AS delivery_code,
|
||||||
del.qzzno
|
del.qzzno,
|
||||||
|
cut.ext_code,
|
||||||
|
plan.resource_name
|
||||||
FROM
|
FROM
|
||||||
st_ivt_deliverypointivt del
|
st_ivt_deliverypointivt del
|
||||||
LEFT JOIN pdm_bi_slittingproductionplan plan ON plan.qzzno = del.qzzno
|
LEFT JOIN pdm_bi_slittingproductionplan plan ON plan.qzzno = del.qzzno
|
||||||
|
|||||||
@@ -142,7 +142,10 @@ public class CutConveyorTask extends AbstractAcsTask {
|
|||||||
.addParam("sort_seq", sort_seq)
|
.addParam("sort_seq", sort_seq)
|
||||||
.addParam("find_type", "1")
|
.addParam("find_type", "1")
|
||||||
.addParam("flag", "17").process().uniqueResult(0);
|
.addParam("flag", "17").process().uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(right_point)) {
|
|
||||||
|
//查询当前点位是否变为有货,有货则不创建
|
||||||
|
JSONObject left_jo = WQLObject.getWQLObject("st_ivt_deliverypointivt").query("point_code = '" + point_code1 + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(right_point) && left_jo.getString("point_status").equals("01")) {
|
||||||
//创建载具横移任务
|
//创建载具横移任务
|
||||||
String translate_code1 = right_point.getString("point_code");
|
String translate_code1 = right_point.getString("point_code");
|
||||||
String translate_code2 = point_code1;
|
String translate_code2 = point_code1;
|
||||||
|
|||||||
@@ -226,14 +226,13 @@ public class CutTrussTask extends AbstractAcsTask {
|
|||||||
|
|
||||||
//更新出站气涨轴的分切计划状态
|
//更新出站气涨轴的分切计划状态
|
||||||
JSONArray plan_jo2 = WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").query("qzzno = '" + jsonTask.getString("vehicle_code") + "' AND is_child_tz_ok = '1' AND is_child_ps_ok = '1' AND is_delete = '0' AND status = '06'").getResultJSONArray(0);
|
JSONArray plan_jo2 = WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").query("qzzno = '" + jsonTask.getString("vehicle_code") + "' AND is_child_tz_ok = '1' AND is_child_ps_ok = '1' AND is_delete = '0' AND status = '06'").getResultJSONArray(0);
|
||||||
if (ObjectUtil.isEmpty(plan_jo2)) {
|
if (ObjectUtil.isNotEmpty(plan_jo2)) {
|
||||||
throw new BadRequestException("未查询到气涨轴:" + jsonTask.getString("vehicle_code") + "对应的分切计划!");
|
for (int i = 0; i < plan_jo2.size(); i++) {
|
||||||
}
|
JSONObject plan_row = plan_jo2.getJSONObject(i);
|
||||||
for (int i = 0; i < plan_jo2.size(); i++) {
|
plan_row.put("status", "09");
|
||||||
JSONObject plan_row = plan_jo2.getJSONObject(i);
|
plan_row.put("end_time", DateUtil.now());
|
||||||
plan_row.put("status", "09");
|
WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").update(plan_row);
|
||||||
plan_row.put("end_time", DateUtil.now());
|
}
|
||||||
WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").update(plan_row);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//生成一个输送线出库任务
|
//生成一个输送线出库任务
|
||||||
@@ -283,7 +282,7 @@ public class CutTrussTask extends AbstractAcsTask {
|
|||||||
.addParam("sort_seq", sort_seq)
|
.addParam("sort_seq", sort_seq)
|
||||||
.addParam("find_type", "3")
|
.addParam("find_type", "3")
|
||||||
.addParam("flag", "17").process().uniqueResult(0);
|
.addParam("flag", "17").process().uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(right_point)){
|
if (ObjectUtil.isNotEmpty(right_point)) {
|
||||||
log.debug("生成一个输送线出库任务");
|
log.debug("生成一个输送线出库任务");
|
||||||
//生成一个输送线出库任务
|
//生成一个输送线出库任务
|
||||||
JSONObject form = new JSONObject();
|
JSONObject form = new JSONObject();
|
||||||
@@ -337,13 +336,13 @@ public class CutTrussTask extends AbstractAcsTask {
|
|||||||
}*/
|
}*/
|
||||||
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", IdUtil.getSnowflake(1,1).nextId());
|
json.put("task_code", IdUtil.getSnowflake(1, 1).nextId());
|
||||||
json.put("task_type", form.getString("task_type"));
|
json.put("task_type", form.getString("task_type"));
|
||||||
json.put("vehicle_code", form.getString("vehicle_code"));
|
json.put("vehicle_code", form.getString("vehicle_code"));
|
||||||
json.put("vehicle_code2", form.getString("vehicle_code2"));
|
json.put("vehicle_code2", form.getString("vehicle_code2"));
|
||||||
if (StrUtil.isEmpty(form.getString("task_status"))){
|
if (StrUtil.isEmpty(form.getString("task_status"))) {
|
||||||
json.put("task_status", TaskStatusEnum.START_AND_POINT.getCode());
|
json.put("task_status", TaskStatusEnum.START_AND_POINT.getCode());
|
||||||
}else {
|
} else {
|
||||||
json.put("task_status", form.getString("task_status"));
|
json.put("task_status", form.getString("task_status"));
|
||||||
}
|
}
|
||||||
json.put("point_code1", form.getString("point_code1"));
|
json.put("point_code1", form.getString("point_code1"));
|
||||||
|
|||||||
Reference in New Issue
Block a user