修改
This commit is contained in:
@@ -126,23 +126,18 @@ public class RawFoilServiceImpl implements RawFoilService {
|
||||
|
||||
WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task");
|
||||
|
||||
String end_pint_code = whereJson.getString("point_code");
|
||||
JSONObject raw_jo = whereJson.getJSONObject("raw_jo");
|
||||
|
||||
if (ObjectUtil.isEmpty(end_pint_code)) throw new BadRequestException("终点点位不能为空");
|
||||
String start_pint_code = "";
|
||||
|
||||
// 1.查询此点位是否存在
|
||||
PointDto jsonPoint = pointService.findByCode(end_pint_code);
|
||||
if (ObjectUtil.isEmpty(jsonPoint)) throw new BadRequestException("此点位不存在");
|
||||
// 2.根据就近原则查对应空卷抽
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("flag", "1");
|
||||
map.put("product_area", jsonPoint.getProduct_area());
|
||||
map.put("point_location", jsonPoint.getPoint_location());
|
||||
map.put("product_area", raw_jo.getString("product_area"));
|
||||
map.put("point_location", raw_jo.getString("point_location"));
|
||||
JSONObject jsonIvt = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).process().uniqueResult(0);
|
||||
// 3.如果没找到则继续找下一节点
|
||||
if (ObjectUtil.isEmpty(jsonIvt)) {
|
||||
String point_location = jsonPoint.getPoint_location();
|
||||
String point_location = raw_jo.getString("point_location");
|
||||
if (StrUtil.equals(point_location, "0")) map.put("point_location", "1");
|
||||
if (StrUtil.equals(point_location, "1")) map.put("point_location", "0");
|
||||
JSONObject jsonIvt_tow = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).process().uniqueResult(0);
|
||||
@@ -158,12 +153,12 @@ public class RawFoilServiceImpl implements RawFoilService {
|
||||
String point_code4= "";
|
||||
JSONObject map4 = new JSONObject();
|
||||
map4.put("flag", "2");
|
||||
map4.put("product_area", jsonPoint.getProduct_area());
|
||||
map4.put("point_location", jsonPoint.getPoint_location());
|
||||
map4.put("product_area", raw_jo.getString("product_area"));
|
||||
map4.put("point_location", raw_jo.getString("point_location"));
|
||||
JSONObject jsonIvt4 = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).process().uniqueResult(0);
|
||||
// 3.如果没找到则继续找下一节点
|
||||
if (ObjectUtil.isEmpty(jsonIvt)) {
|
||||
String point_location = jsonPoint.getPoint_location();
|
||||
String point_location = raw_jo.getString("point_location");
|
||||
if (StrUtil.equals(point_location, "0")) {
|
||||
map.put("point_location", "1");
|
||||
}
|
||||
@@ -182,8 +177,8 @@ public class RawFoilServiceImpl implements RawFoilService {
|
||||
// 起点和终点确定 生成任务
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("point_code1", start_pint_code);
|
||||
param.put("point_code2", end_pint_code);
|
||||
param.put("point_code3", end_pint_code);
|
||||
param.put("point_code2", raw_jo.getString("point_code"));
|
||||
param.put("point_code3", raw_jo.getString("point_code"));
|
||||
param.put("point_code4", point_code4);
|
||||
param.put("task_type", "010101");
|
||||
param.put("material_code", whereJson.getString("container_name"));
|
||||
|
||||
@@ -132,16 +132,10 @@
|
||||
IF 输入.flag = "5"
|
||||
QUERY
|
||||
SELECT
|
||||
(
|
||||
CASE
|
||||
der.status
|
||||
WHEN '1' THEN '开始'
|
||||
WHEN '2' THEN '结束'
|
||||
END
|
||||
) AS status_name,
|
||||
( CASE der.STATUS WHEN '1' THEN '开始' WHEN '2' THEN '结束' END ) AS status_name,
|
||||
der.mfg_order_name AS mfg_order_name,
|
||||
der.container_name AS container_name,
|
||||
der.resource_name AS point_code,
|
||||
ivt.point_code,
|
||||
der.product_name AS pcsn,
|
||||
der.theory_height AS theory_height,
|
||||
der.realstart_time AS realstart_time,
|
||||
@@ -149,9 +143,12 @@
|
||||
der.productin_qty AS productin_qty,
|
||||
der.agvno AS agvno,
|
||||
der.product_area AS product_area,
|
||||
der.update_time AS update_time
|
||||
der.update_time AS update_time,
|
||||
ivt.point_location,
|
||||
ivt.product_area
|
||||
FROM
|
||||
PDM_BI_RawFoilWorkOrder der
|
||||
LEFT JOIN st_ivt_sbpointivt ivt ON ivt.ext_code = der.resource_name
|
||||
WHERE
|
||||
der.status = '1'
|
||||
AND der.is_delete = '0'
|
||||
|
||||
Reference in New Issue
Block a user