修改
This commit is contained in:
@@ -37,4 +37,13 @@ public class BakingController {
|
|||||||
public ResponseEntity<Object> inCoolIvt(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> inCoolIvt(@RequestBody JSONObject whereJson) {
|
||||||
return new ResponseEntity<>(bakingService.inCoolIvt(whereJson),HttpStatus.OK);
|
return new ResponseEntity<>(bakingService.inCoolIvt(whereJson),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/release")
|
||||||
|
@Log("解警")
|
||||||
|
@ApiOperation("解警")
|
||||||
|
public ResponseEntity<Object> release(@RequestBody JSONObject whereJson) {
|
||||||
|
return new ResponseEntity<>(bakingService.release(whereJson),HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import io.swagger.annotations.ApiOperation;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.modules.logging.annotation.Log;
|
import org.nl.modules.logging.annotation.Log;
|
||||||
|
import org.nl.modules.wql.core.content.HttpContext;
|
||||||
import org.nl.wms.pda.mps.service.CasingService;
|
import org.nl.wms.pda.mps.service.CasingService;
|
||||||
import org.nl.wms.pda.mps.service.FeedingService;
|
import org.nl.wms.pda.mps.service.FeedingService;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
@@ -28,7 +29,10 @@ public class FeedingController {
|
|||||||
@Log("分切计划初始化查询")
|
@Log("分切计划初始化查询")
|
||||||
@ApiOperation("分切计划初始化查询")
|
@ApiOperation("分切计划初始化查询")
|
||||||
public ResponseEntity<Object> queryMaterialInfo(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> queryMaterialInfo(@RequestBody JSONObject whereJson) {
|
||||||
return new ResponseEntity<>(feedingService.queryMaterialInfo(whereJson), HttpStatus.OK);
|
HttpContext ctx = new HttpContext("11");
|
||||||
|
ctx.setPage((String) (whereJson.get("page")));
|
||||||
|
ctx.setRows((String) (whereJson.get("size")));
|
||||||
|
return new ResponseEntity<>(feedingService.queryMaterialInfo(whereJson, ctx), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/confirm")
|
@PostMapping("/confirm")
|
||||||
|
|||||||
@@ -18,5 +18,7 @@ public interface BakingService {
|
|||||||
*/
|
*/
|
||||||
JSONObject inCoolIvt(JSONObject whereJson);
|
JSONObject inCoolIvt(JSONObject whereJson);
|
||||||
|
|
||||||
|
JSONObject release(JSONObject whereJson);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,21 @@
|
|||||||
package org.nl.wms.pda.mps.service;
|
package org.nl.wms.pda.mps.service;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import org.nl.modules.wql.core.content.HttpContext;
|
||||||
|
|
||||||
public interface FeedingService {
|
public interface FeedingService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分切计划初始化查询
|
* 分切计划初始化查询
|
||||||
|
*
|
||||||
* @param whereJson /
|
* @param whereJson /
|
||||||
* @return JSONObject
|
* @return JSONObject
|
||||||
*/
|
*/
|
||||||
JSONObject queryMaterialInfo(JSONObject whereJson);
|
JSONObject queryMaterialInfo(JSONObject whereJson,HttpContext ctx);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 套轴确认
|
* 套轴确认
|
||||||
|
*
|
||||||
* @param whereJson /
|
* @param whereJson /
|
||||||
* @return JSONObject
|
* @return JSONObject
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -443,28 +443,9 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
return jsonHotMst.getString("iostorinv_id");
|
return jsonHotMst.getString("iostorinv_id");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Override
|
||||||
public void createHotDtl(JSONObject param) {
|
@Transactional(rollbackFor = Exception.class)
|
||||||
/*
|
public JSONObject release(JSONObject whereJson) {
|
||||||
* 创建烘箱区出入明细表
|
return null;
|
||||||
*/
|
|
||||||
WQLObject hotDtlTab = WQLObject.getWQLObject("ST_IVT_HotRegionIODtl"); // 烘箱区出入明细表
|
|
||||||
|
|
||||||
JSONObject jsonHotDtl = new JSONObject();
|
|
||||||
jsonHotDtl.put("iostorinv_id", IdUtil.getSnowflake(1, 1).nextId());
|
|
||||||
jsonHotDtl.put("bill_code", "");
|
|
||||||
jsonHotDtl.put("start_point_code", param.getString("start_point_code"));
|
|
||||||
jsonHotDtl.put("next_point_code", param.getString("next_point_code"));
|
|
||||||
jsonHotDtl.put("temperature", param.getString("temperature"));
|
|
||||||
jsonHotDtl.put("oven_time", param.getString("oven_time"));
|
|
||||||
jsonHotDtl.put("task_type", "1");
|
|
||||||
jsonHotDtl.put("task_id", param.getString("task_id"));
|
|
||||||
jsonHotDtl.put("create_id", 2);
|
|
||||||
jsonHotDtl.put("create_name", "mes用户");
|
|
||||||
jsonHotDtl.put("create_time", DateUtil.now());
|
|
||||||
jsonHotDtl.put("dtl_status", "10");
|
|
||||||
hotDtlTab.insert(jsonHotDtl);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import org.nl.modules.common.utils.SecurityUtils;
|
|||||||
import org.nl.modules.system.util.CodeUtil;
|
import org.nl.modules.system.util.CodeUtil;
|
||||||
import org.nl.modules.wql.WQL;
|
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.modules.wql.core.content.HttpContext;
|
||||||
import org.nl.wms.ext.mes.service.LmsToMesService;
|
import org.nl.wms.ext.mes.service.LmsToMesService;
|
||||||
import org.nl.wms.pda.mps.service.CasingService;
|
import org.nl.wms.pda.mps.service.CasingService;
|
||||||
import org.nl.wms.pda.mps.service.FeedingService;
|
import org.nl.wms.pda.mps.service.FeedingService;
|
||||||
@@ -33,7 +34,7 @@ public class FeedingServiceImpl implements FeedingService {
|
|||||||
private final CheckOutBillService checkOutBillService;
|
private final CheckOutBillService checkOutBillService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject queryMaterialInfo(JSONObject whereJson) {
|
public JSONObject queryMaterialInfo(JSONObject whereJson, HttpContext ctx) {
|
||||||
String product_area = whereJson.getString("product_area");
|
String product_area = whereJson.getString("product_area");
|
||||||
String point_code = whereJson.getString("point_code");
|
String point_code = whereJson.getString("point_code");
|
||||||
String device_code = whereJson.getString("device_code");
|
String device_code = whereJson.getString("device_code");
|
||||||
@@ -53,9 +54,10 @@ public class FeedingServiceImpl implements FeedingService {
|
|||||||
if (StrUtil.isNotEmpty(container_name)) {
|
if (StrUtil.isNotEmpty(container_name)) {
|
||||||
map.put("container_name", container_name);
|
map.put("container_name", container_name);
|
||||||
}
|
}
|
||||||
JSONArray rows = WQL.getWO("PDA_02").addParamMap(map).process().getResultJSONArray(0);
|
JSONObject rows = WQL.getWO("PDA_02").addParamMap(map).pageQuery(ctx,"container_name");
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
jo.put("data", rows);
|
jo.put("data", rows.getJSONArray("content"));
|
||||||
|
jo.put("size", rows.getString("totalElements"));
|
||||||
jo.put("message", "查询成功!");
|
jo.put("message", "查询成功!");
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public class RawFoilServiceImpl implements RawFoilService {
|
|||||||
map.put("product_area", "A1");
|
map.put("product_area", "A1");
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
JSONObject arr = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).pageQuery(ctx,"container_name");
|
JSONObject arr = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).pageQuery(ctx, "container_name");
|
||||||
JSONArray rows = arr.getJSONArray("content");
|
JSONArray rows = arr.getJSONArray("content");
|
||||||
for (int i = 0; i < rows.size(); i++) {
|
for (int i = 0; i < rows.size(); i++) {
|
||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
@@ -82,21 +82,26 @@ public class RawFoilServiceImpl implements RawFoilService {
|
|||||||
Date now_time = DateUtil.parse(DateUtil.now());
|
Date now_time = DateUtil.parse(DateUtil.now());
|
||||||
Date end_time2 = DateUtil.parse(end_time);
|
Date end_time2 = DateUtil.parse(end_time);
|
||||||
|
|
||||||
long betweenDay = DateUtil.between(end_time2, now_time, DateUnit.MINUTE, false);
|
long betweenDay = DateUtil.between(now_time, end_time2, DateUnit.MINUTE, false);
|
||||||
|
|
||||||
if (betweenDay > 0) {
|
if (betweenDay <= 0) {
|
||||||
json.put("color_type", "1");
|
json.put("color_type", "1");
|
||||||
} else if (betweenDay <= 0 && betweenDay >= -30) {
|
} else if (betweenDay > 0 && betweenDay <= 30) {
|
||||||
json.put("color_type", "2");
|
json.put("color_type", "2");
|
||||||
} else {
|
} else {
|
||||||
json.put("color_type", "0");
|
json.put("color_type", "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (betweenDay < 0) {
|
||||||
|
betweenDay = 0;
|
||||||
|
}
|
||||||
json.put("container_name", jsonObject.getString("container_name"));
|
json.put("container_name", jsonObject.getString("container_name"));
|
||||||
json.put("up_coiler_date", jsonObject.getString("up_coiler_date"));
|
json.put("up_coiler_date", jsonObject.getString("up_coiler_date"));
|
||||||
json.put("end_date", end_time);
|
json.put("end_date", end_time);
|
||||||
json.put("point_code", jsonObject.getString("resource_name"));
|
json.put("point_code", jsonObject.getString("ed_point_code"));
|
||||||
|
json.put("resource_name", jsonObject.getString("resource_name"));
|
||||||
json.put("pcsn", jsonObject.getString("product_name"));
|
json.put("pcsn", jsonObject.getString("product_name"));
|
||||||
|
json.put("remaining_time", betweenDay);
|
||||||
json.put("product_name", jsonObject.getString("theory_height"));
|
json.put("product_name", jsonObject.getString("theory_height"));
|
||||||
json.put("mfg_order_name", jsonObject.getString("mfg_order_name"));
|
json.put("mfg_order_name", jsonObject.getString("mfg_order_name"));
|
||||||
|
|
||||||
@@ -104,7 +109,7 @@ public class RawFoilServiceImpl implements RawFoilService {
|
|||||||
}
|
}
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
jo.put("data", resultArr);
|
jo.put("data", resultArr);
|
||||||
jo.put("size",arr.getString("totalElements"));
|
jo.put("size", arr.getString("totalElements"));
|
||||||
jo.put("message", "查询成功!");
|
jo.put("message", "查询成功!");
|
||||||
return jo;
|
return jo;
|
||||||
|
|
||||||
@@ -116,10 +121,10 @@ public class RawFoilServiceImpl implements RawFoilService {
|
|||||||
map.put("flag", "5");
|
map.put("flag", "5");
|
||||||
map.put("point_code", whereJson.getString("point_code"));
|
map.put("point_code", whereJson.getString("point_code"));
|
||||||
map.put("container_name", whereJson.getString("container_name"));
|
map.put("container_name", whereJson.getString("container_name"));
|
||||||
JSONObject resultJSONArray = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).pageQuery(ctx,"container_name");
|
JSONObject resultJSONArray = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).pageQuery(ctx, "container_name");
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
jo.put("data", resultJSONArray.getJSONArray("content"));
|
jo.put("data", resultJSONArray.getJSONArray("content"));
|
||||||
jo.put("size",resultJSONArray.getString("totalElements"));
|
jo.put("size", resultJSONArray.getString("totalElements"));
|
||||||
jo.put("message", "查询成功!");
|
jo.put("message", "查询成功!");
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IF 输入.flag = "2"
|
IF 输入.flag = "2"
|
||||||
QUERY
|
PAGEQUERY
|
||||||
SELECT
|
SELECT
|
||||||
plan.*,
|
plan.*,
|
||||||
ivt.point_code,
|
ivt.point_code,
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
ivt.point_code = 输入.device_code
|
ivt.point_code = 输入.device_code
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDPAGEQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IF 输入.flag = "3"
|
IF 输入.flag = "3"
|
||||||
|
|||||||
@@ -130,15 +130,17 @@
|
|||||||
IF 输入.flag = "4"
|
IF 输入.flag = "4"
|
||||||
PAGEQUERY
|
PAGEQUERY
|
||||||
SELECT
|
SELECT
|
||||||
der.*
|
der.*,
|
||||||
|
sb.point_code AS ed_point_code
|
||||||
FROM
|
FROM
|
||||||
PDM_BI_RawFoilWorkOrder der
|
PDM_BI_RawFoilWorkOrder der
|
||||||
|
LEFT JOIN st_ivt_sbpointivt sb ON sb.ext_code = der.resource_name
|
||||||
WHERE
|
WHERE
|
||||||
der.status = '01'
|
der.status = '01'
|
||||||
AND der.is_delete = '0'
|
AND der.is_delete = '0'
|
||||||
|
|
||||||
OPTION 输入.point_code <> ""
|
OPTION 输入.point_code <> ""
|
||||||
der.resource_name = 输入.point_code
|
sb.point_code = 输入.point_code
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
OPTION 输入.container_name <> ""
|
OPTION 输入.container_name <> ""
|
||||||
@@ -169,7 +171,7 @@
|
|||||||
der.mfg_order_name AS mfg_order_name,
|
der.mfg_order_name AS mfg_order_name,
|
||||||
der.container_name AS container_name,
|
der.container_name AS container_name,
|
||||||
ivt.point_code,
|
ivt.point_code,
|
||||||
der.product_name AS pcsn,
|
der.product_name,
|
||||||
der.theory_height AS theory_height,
|
der.theory_height AS theory_height,
|
||||||
der.realstart_time AS realstart_time,
|
der.realstart_time AS realstart_time,
|
||||||
der.realend_time AS realend_time,
|
der.realend_time AS realend_time,
|
||||||
|
|||||||
@@ -202,7 +202,8 @@ public class BookTwoConfirmTask extends AbstractAcsTask {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void cancel(String task_id) {
|
public void cancel(String task_id) {
|
||||||
|
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
this.updateTaskStatus(taskObj, "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -273,7 +273,8 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void cancel(String task_id) {
|
public void cancel(String task_id) {
|
||||||
|
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
this.updateTaskStatus(taskObj, "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -315,7 +315,8 @@ public class CoolCutTask extends AbstractAcsTask {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void cancel(String task_id) {
|
public void cancel(String task_id) {
|
||||||
|
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
this.updateTaskStatus(taskObj, "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
//判断该点位是否存在未完成的任务
|
//判断该点位是否存在未完成的任务
|
||||||
|
|||||||
@@ -196,7 +196,8 @@ public class CutConveyorTask extends AbstractAcsTask {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void cancel(String task_id) {
|
public void cancel(String task_id) {
|
||||||
|
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
this.updateTaskStatus(taskObj, "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
//判断该点位是否存在未完成的任务
|
//判断该点位是否存在未完成的任务
|
||||||
|
|||||||
@@ -314,7 +314,8 @@ public class CutTrussTask extends AbstractAcsTask {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void cancel(String task_id) {
|
public void cancel(String task_id) {
|
||||||
|
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
this.updateTaskStatus(taskObj, "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -201,7 +201,8 @@ public class InCoolIvtTask extends AbstractAcsTask {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void cancel(String task_id) {
|
public void cancel(String task_id) {
|
||||||
|
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
this.updateTaskStatus(taskObj, "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -288,7 +288,8 @@ public class InHotTask extends AbstractAcsTask {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void cancel(String task_id) {
|
public void cancel(String task_id) {
|
||||||
|
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
this.updateTaskStatus(taskObj, "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -169,7 +169,8 @@ public class InTask extends AbstractAcsTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void cancel(String taskdtl_id) {
|
public void cancel(String task_id) {
|
||||||
|
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
this.updateTaskStatus(taskObj, "0");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,7 +190,8 @@ public class OutHotTask extends AbstractAcsTask {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void cancel(String task_id) {
|
public void cancel(String task_id) {
|
||||||
|
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
this.updateTaskStatus(taskObj, "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,7 +157,8 @@ public class OutTask extends AbstractAcsTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void cancel(String taskdtl_id) {
|
public void cancel(String task_id) {
|
||||||
|
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
this.updateTaskStatus(taskObj, "0");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user