修改
This commit is contained in:
@@ -699,6 +699,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public JSONObject shipDeviceUpdate(JSONObject whereJson) {
|
||||
log.info("shipDeviceUpdate请求参数:---------------------------------------------" + whereJson.toString());
|
||||
String device_code = whereJson.getString("device_code");
|
||||
|
||||
@@ -748,7 +748,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
if (ObjectUtil.isEmpty(group_jo)) {
|
||||
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) {
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("point_code", up_point_code);
|
||||
@@ -766,13 +766,12 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
jo.put("cut_rows", down_rows);
|
||||
if (del_rows.size() > 0) {
|
||||
if (up_rows.size() > 0) {
|
||||
if (del_rows.size() == 1){
|
||||
if (del_rows.size() >= 2) {
|
||||
jo.put("is_last", "0");
|
||||
} else {
|
||||
jo.put("is_last", "1");
|
||||
}
|
||||
}
|
||||
jo.put("is_last", "0");
|
||||
} else {
|
||||
jo.put("is_last", "1");
|
||||
}
|
||||
@@ -1187,6 +1186,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
plan_jo.put("update_optid", currentUserId);
|
||||
plan_jo.put("update_optname", nickName);
|
||||
plan_jo.put("update_time", DateUtil.now());
|
||||
WQLObject.getWQLObject("pdm_bi_slittingproductionplan").update(plan_jo);
|
||||
result.put("RTYPE", "S");
|
||||
result.put("RTMSG", "操作成功!");
|
||||
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.sch.tasks.CutConveyorTask;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
@@ -48,6 +49,7 @@ public class ShippingServiceImpl implements ShippingService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public JSONObject needVehicle(JSONObject whereJson) {
|
||||
JSONObject cut_jo = whereJson.getJSONObject("cut_jo");
|
||||
//查询离该分切计划包含机台最近的一个空载具
|
||||
@@ -77,6 +79,7 @@ public class ShippingServiceImpl implements ShippingService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public JSONObject confirm(JSONObject whereJson) {
|
||||
JSONArray rows = whereJson.getJSONArray("cut_rows");
|
||||
String vehicle_code = whereJson.getString("vehicle_code");
|
||||
@@ -238,6 +241,7 @@ public class ShippingServiceImpl implements ShippingService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public JSONObject returnVehicle(JSONObject whereJson) {
|
||||
String point_code = whereJson.getString("point_code");
|
||||
String vehicle_code = whereJson.getString("vehicle_code");
|
||||
@@ -300,6 +304,7 @@ public class ShippingServiceImpl implements ShippingService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public JSONObject acrossVehicle(JSONObject whereJson) {
|
||||
//载具横移起点
|
||||
String point_code = whereJson.getString("point_code");
|
||||
|
||||
@@ -274,7 +274,9 @@
|
||||
plan.manufacture_date,
|
||||
(case when plan.is_child_ps_ok = '1' then '是' else '否' end) AS is_child_ps_ok,
|
||||
del.point_code AS delivery_code,
|
||||
del.qzzno
|
||||
del.qzzno,
|
||||
cut.ext_code,
|
||||
plan.resource_name
|
||||
FROM
|
||||
st_ivt_deliverypointivt del
|
||||
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("find_type", "1")
|
||||
.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_code2 = point_code1;
|
||||
|
||||
@@ -226,15 +226,14 @@ 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);
|
||||
if (ObjectUtil.isEmpty(plan_jo2)) {
|
||||
throw new BadRequestException("未查询到气涨轴:" + jsonTask.getString("vehicle_code") + "对应的分切计划!");
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(plan_jo2)) {
|
||||
for (int i = 0; i < plan_jo2.size(); i++) {
|
||||
JSONObject plan_row = plan_jo2.getJSONObject(i);
|
||||
plan_row.put("status", "09");
|
||||
plan_row.put("end_time", DateUtil.now());
|
||||
WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").update(plan_row);
|
||||
}
|
||||
}
|
||||
|
||||
//生成一个输送线出库任务
|
||||
JSONObject form = new JSONObject();
|
||||
|
||||
Reference in New Issue
Block a user