修改
This commit is contained in:
@@ -12,6 +12,7 @@ import org.nl.modules.wql.WQL;
|
|||||||
import org.nl.modules.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.nl.wms.pda.mps.service.OutService;
|
import org.nl.wms.pda.mps.service.OutService;
|
||||||
import org.nl.wms.pda.mps.service.ShippingService;
|
import org.nl.wms.pda.mps.service.ShippingService;
|
||||||
|
import org.nl.wms.sch.tasks.CutTrussTask;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -21,6 +22,7 @@ import java.util.HashMap;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class OutServiceImpl implements OutService {
|
public class OutServiceImpl implements OutService {
|
||||||
|
|
||||||
|
private final CutTrussTask cutTrussTask;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject queryMaterialInfo(JSONObject whereJson) {
|
public JSONObject queryMaterialInfo(JSONObject whereJson) {
|
||||||
@@ -43,6 +45,9 @@ public class OutServiceImpl implements OutService {
|
|||||||
public JSONObject confirm(JSONObject whereJson) {
|
public JSONObject confirm(JSONObject whereJson) {
|
||||||
String point_code = whereJson.getString("point_code");
|
String point_code = whereJson.getString("point_code");
|
||||||
|
|
||||||
|
JSONArray rows = whereJson.getJSONArray("cut_rows");
|
||||||
|
|
||||||
|
String cut_qzzno = rows.getJSONObject(0).getString("qzz_no");
|
||||||
//查询该点位对应的机台编号
|
//查询该点位对应的机台编号
|
||||||
JSONObject cut_ivt = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("up_point_code ='"+point_code+"' OR down_point_code ='"+point_code+"'").uniqueResult(0);
|
JSONObject cut_ivt = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("up_point_code ='"+point_code+"' OR down_point_code ='"+point_code+"'").uniqueResult(0);
|
||||||
|
|
||||||
@@ -73,8 +78,9 @@ public class OutServiceImpl implements OutService {
|
|||||||
jo.put("point_code3",point_code);
|
jo.put("point_code3",point_code);
|
||||||
jo.put("point_code4",delivery_point.getString("point_code"));
|
jo.put("point_code4",delivery_point.getString("point_code"));
|
||||||
jo.put("vehicle_code",delivery_point.getString("qzzno"));
|
jo.put("vehicle_code",delivery_point.getString("qzzno"));
|
||||||
jo.put("vehicle_code2",qzzno);
|
jo.put("vehicle_code2",cut_qzzno);
|
||||||
jo.put("task_type","010403");
|
jo.put("task_type","010403");
|
||||||
|
cutTrussTask.createTask(jo);
|
||||||
|
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
result.put("message","操作成功!");
|
result.put("message","操作成功!");
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ public class ShippingServiceImpl implements ShippingService {
|
|||||||
String qzzno = rows.getJSONObject(0).getString("qzzno");
|
String qzzno = rows.getJSONObject(0).getString("qzzno");
|
||||||
|
|
||||||
HashMap map = new HashMap();
|
HashMap map = new HashMap();
|
||||||
map.put("flag", "3");
|
map.put("flag", "6");
|
||||||
|
|
||||||
if (StrUtil.isNotEmpty(qzzno)) {
|
if (StrUtil.isNotEmpty(qzzno)) {
|
||||||
map.put("qzzno", qzzno);
|
map.put("qzzno", qzzno);
|
||||||
@@ -98,10 +98,18 @@ public class ShippingServiceImpl implements ShippingService {
|
|||||||
JSONObject form = new JSONObject();
|
JSONObject form = new JSONObject();
|
||||||
form.put("point_code1","SS02");
|
form.put("point_code1","SS02");
|
||||||
form.put("point_code2",empty_point.getString("point_code"));
|
form.put("point_code2",empty_point.getString("point_code"));
|
||||||
form.put("task_type","010401");
|
form.put("task_type","010402");
|
||||||
form.put("vehicle_code",qzzno);
|
form.put("vehicle_code",plan_jo.getString("qzzno"));
|
||||||
cutConveyorTask.createTask(form);
|
cutConveyorTask.createTask(form);
|
||||||
|
|
||||||
|
//更新该气涨轴对应的分切计划状态
|
||||||
|
JSONArray plan_rows = WQL.getWO("PDA_02").addParamMap(map).process().getResultJSONArray(0);
|
||||||
|
for (int i = 0; i < plan_rows.size(); i++) {
|
||||||
|
JSONObject row = plan_rows.getJSONObject(i);
|
||||||
|
row.put("status","02");
|
||||||
|
WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").update(row);
|
||||||
|
}
|
||||||
|
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
jo.put("message","操作成功!");
|
jo.put("message","操作成功!");
|
||||||
return jo;
|
return jo;
|
||||||
|
|||||||
@@ -95,7 +95,7 @@
|
|||||||
PDM_BI_SlittingProductionPlan plan
|
PDM_BI_SlittingProductionPlan plan
|
||||||
LEFT JOIN st_ivt_cutpointivt ivt ON ivt.ext_code = plan.resource_name
|
LEFT JOIN st_ivt_cutpointivt ivt ON ivt.ext_code = plan.resource_name
|
||||||
WHERE
|
WHERE
|
||||||
plan.STATUS < 2
|
plan.STATUS < 09
|
||||||
AND
|
AND
|
||||||
is_child_tz_ok = 0
|
is_child_tz_ok = 0
|
||||||
AND
|
AND
|
||||||
@@ -175,7 +175,7 @@
|
|||||||
PDM_BI_SlittingProductionPlan plan
|
PDM_BI_SlittingProductionPlan plan
|
||||||
LEFT JOIN st_ivt_cutpointivt ivt ON ivt.ext_code = plan.resource_name
|
LEFT JOIN st_ivt_cutpointivt ivt ON ivt.ext_code = plan.resource_name
|
||||||
WHERE
|
WHERE
|
||||||
plan.STATUS < 2
|
plan.STATUS = 03
|
||||||
AND
|
AND
|
||||||
is_child_tz_ok = 1
|
is_child_tz_ok = 1
|
||||||
AND
|
AND
|
||||||
@@ -206,12 +206,13 @@
|
|||||||
plan.workorder_id,
|
plan.workorder_id,
|
||||||
ivt.sort_seq,
|
ivt.sort_seq,
|
||||||
ivt.product_area,
|
ivt.product_area,
|
||||||
ivt.point_location
|
ivt.point_location,
|
||||||
|
plan.qzzno
|
||||||
FROM
|
FROM
|
||||||
PDM_BI_SlittingProductionPlan plan
|
PDM_BI_SlittingProductionPlan plan
|
||||||
LEFT JOIN st_ivt_cutpointivt ivt ON ivt.ext_code = plan.resource_name
|
LEFT JOIN st_ivt_cutpointivt ivt ON ivt.ext_code = plan.resource_name
|
||||||
WHERE
|
WHERE
|
||||||
plan.STATUS < 2
|
plan.STATUS = '01'
|
||||||
AND
|
AND
|
||||||
is_child_tz_ok = 1
|
is_child_tz_ok = 1
|
||||||
AND
|
AND
|
||||||
|
|||||||
Binary file not shown.
@@ -105,9 +105,9 @@ public class TaskServiceImpl implements TaskService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TaskDto findByDtlId(String taskdtl_id) {
|
public TaskDto findByDtlId(String task_id) {
|
||||||
WQLObject wo = WQLObject.getWQLObject("sch_base_task");
|
WQLObject wo = WQLObject.getWQLObject("sch_base_task");
|
||||||
JSONObject json = wo.query("task_id = '" + taskdtl_id + "'").uniqueResult(0);
|
JSONObject json = wo.query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
final TaskDto obj = json.toJavaObject(TaskDto.class);
|
final TaskDto obj = json.toJavaObject(TaskDto.class);
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,21 +51,10 @@
|
|||||||
IF 输入.flag = "1"
|
IF 输入.flag = "1"
|
||||||
PAGEQUERY
|
PAGEQUERY
|
||||||
SELECT
|
SELECT
|
||||||
task.*,
|
task.*
|
||||||
p1.point_name AS start_point_name,
|
|
||||||
region1.region_name AS start_area_name,
|
|
||||||
p2.point_name AS next_point_name,
|
|
||||||
region2.region_name AS next_area_name,
|
|
||||||
d3.label AS task_type_name,
|
|
||||||
d4.label AS taskdtl_type_name
|
|
||||||
FROM
|
FROM
|
||||||
sch_base_task task
|
sch_base_task task
|
||||||
LEFT JOIN sch_base_point p1 ON task.start_point_code = p1.point_code
|
|
||||||
LEFT JOIN SCH_BASE_Region region1 ON region1.region_id = p1.region_id
|
|
||||||
LEFT JOIN sch_base_point p2 ON task.next_point_code = p2.point_code
|
|
||||||
LEFT JOIN SCH_BASE_Region region2 ON region2.region_id = p2.region_id
|
|
||||||
LEFT JOIN sys_dict_detail d3 ON d3.`value` = task.task_type AND d3.`name` = 'SCH_TASK_TYPE'
|
|
||||||
LEFT JOIN sys_dict_detail d4 ON d4.`value` = task.taskdtl_type AND d4.`name` = 'SCH_TASK_TYPE_DTL'
|
|
||||||
WHERE
|
WHERE
|
||||||
task.is_delete = '0'
|
task.is_delete = '0'
|
||||||
OPTION 输入.task_type <> ""
|
OPTION 输入.task_type <> ""
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ import org.nl.wms.sch.service.dto.PointDto;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@@ -79,6 +81,12 @@ public class CutConveyorTask extends AbstractAcsTask {
|
|||||||
jsonIvt.put("point_status", "03");
|
jsonIvt.put("point_status", "03");
|
||||||
jsonIvt.put("qzzno", jsonTask.getString("vehicle_code"));
|
jsonIvt.put("qzzno", jsonTask.getString("vehicle_code"));
|
||||||
ivtTab.update(jsonIvt);
|
ivtTab.update(jsonIvt);
|
||||||
|
|
||||||
|
//更新对应气涨轴的分切计划表为配送完成
|
||||||
|
HashMap map = new HashMap();
|
||||||
|
map.put("is_child_ps_ok","1");
|
||||||
|
map.put("status","03");
|
||||||
|
WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").update(map,"qzzno = '"+jsonTask.getString("vehicle_code")+"' AND is_child_tz_ok = '1' AND is_child_ps_ok = '0' AND is_delete ='0' AND status = '02'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,7 +81,8 @@ public class CutTrussTask extends AbstractAcsTask {
|
|||||||
}
|
}
|
||||||
for (int i = 0; i < plan_jo.size(); i++) {
|
for (int i = 0; i < plan_jo.size(); i++) {
|
||||||
JSONObject plan_row = plan_jo.getJSONObject(i);
|
JSONObject plan_row = plan_jo.getJSONObject(i);
|
||||||
plan_row.put("status","2");
|
plan_row.put("status","09");
|
||||||
|
plan_row.put("end_time",DateUtil.now());
|
||||||
WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").update(plan_row);
|
WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").update(plan_row);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user