修改
This commit is contained in:
@@ -87,5 +87,13 @@ public class WmsToAcsController {
|
|||||||
return new ResponseEntity<>(wmsToAcsService.updateTask(arr), HttpStatus.OK);
|
return new ResponseEntity<>(wmsToAcsService.updateTask(arr), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/action")
|
||||||
|
@Log("给ACS下发修改PLC的值")
|
||||||
|
@ApiOperation("给ACS下发修改PLC的值")
|
||||||
|
public ResponseEntity<Object> action(@RequestBody Map whereJson) {
|
||||||
|
JSONArray arr = JSONArray.parseArray(JSON.toJSONString(whereJson.get("data")));
|
||||||
|
return new ResponseEntity<>(wmsToAcsService.updateTask(arr), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,4 +62,11 @@ public interface WmsToAcsService {
|
|||||||
* @return JSONObject
|
* @return JSONObject
|
||||||
*/
|
*/
|
||||||
JSONObject updateTask(JSONArray arr);
|
JSONObject updateTask(JSONArray arr);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新任务状态
|
||||||
|
* @param arr /
|
||||||
|
* @return JSONObject
|
||||||
|
*/
|
||||||
|
JSONObject action(JSONArray arr);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,4 +60,10 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
return AcsUtil.notifyAcs(api, whereJson);
|
return AcsUtil.notifyAcs(api, whereJson);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject action(JSONArray whereJson) {
|
||||||
|
String api = "api/wms/action";
|
||||||
|
return AcsUtil.notifyAcs(api, whereJson);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -497,7 +497,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
|||||||
//查询该母卷号所在位置
|
//查询该母卷号所在位置
|
||||||
JSONObject cool_ivt = WQLObject.getWQLObject("ST_IVT_CoolPointIvt").query("container_name = '" + parent_container_name + "'").uniqueResult(0);
|
JSONObject cool_ivt = WQLObject.getWQLObject("ST_IVT_CoolPointIvt").query("container_name = '" + parent_container_name + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(cool_ivt)) {
|
if (ObjectUtil.isEmpty(cool_ivt)) {
|
||||||
throw new BadRequestException("未查询到该母卷的库存信息,!");
|
throw new BadRequestException("未查询到呼叫母卷的库存信息!");
|
||||||
}
|
}
|
||||||
|
|
||||||
//查询该母卷号对应的生箔信息
|
//查询该母卷号对应的生箔信息
|
||||||
|
|||||||
@@ -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.EmptyTubeService;
|
import org.nl.wms.pda.mps.service.EmptyTubeService;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
@@ -28,7 +29,10 @@ public class CasingController {
|
|||||||
@Log("分切计划初始化查询")
|
@Log("分切计划初始化查询")
|
||||||
@ApiOperation("分切计划初始化查询")
|
@ApiOperation("分切计划初始化查询")
|
||||||
public ResponseEntity<Object> queryMaterialInfo(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> queryMaterialInfo(@RequestBody JSONObject whereJson) {
|
||||||
return new ResponseEntity<>(casingService.queryMaterialInfo(whereJson), HttpStatus.OK);
|
HttpContext ctx = new HttpContext("11");
|
||||||
|
ctx.setPage((String) (whereJson.get("page")));
|
||||||
|
ctx.setRows((String) (whereJson.get("size")));
|
||||||
|
return new ResponseEntity<>(casingService.queryMaterialInfo(whereJson,ctx), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/confirm")
|
@PostMapping("/confirm")
|
||||||
@@ -37,4 +41,11 @@ public class CasingController {
|
|||||||
public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) {
|
||||||
return new ResponseEntity<>(casingService.confirm(whereJson), HttpStatus.OK);
|
return new ResponseEntity<>(casingService.confirm(whereJson), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/queryDeviceByarea")
|
||||||
|
@Log("查询设备")
|
||||||
|
@ApiOperation("查询设备")
|
||||||
|
public ResponseEntity<Object> queryDeviceByarea(@RequestBody JSONObject whereJson) {
|
||||||
|
return new ResponseEntity<>(casingService.queryDeviceByarea(whereJson), HttpStatus.OK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,21 +2,32 @@ package org.nl.wms.pda.mps.service;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import org.nl.modules.wql.core.content.HttpContext;
|
||||||
|
|
||||||
public interface CasingService {
|
public interface CasingService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分切计划初始化查询
|
* 分切计划初始化查询
|
||||||
|
*
|
||||||
* @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
|
||||||
*/
|
*/
|
||||||
JSONObject confirm(JSONObject whereJson);
|
JSONObject confirm(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询设备
|
||||||
|
*
|
||||||
|
* @param whereJson /
|
||||||
|
* @return JSONObject
|
||||||
|
*/
|
||||||
|
JSONObject queryDeviceByarea(JSONObject whereJson);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ 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.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
|
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
||||||
|
import org.nl.wms.ext.acs.service.impl.WmsToAcsServiceImpl;
|
||||||
import org.nl.wms.pda.mps.eum.RegionTypeEnum;
|
import org.nl.wms.pda.mps.eum.RegionTypeEnum;
|
||||||
import org.nl.wms.pda.mps.service.BakingService;
|
import org.nl.wms.pda.mps.service.BakingService;
|
||||||
import org.nl.wms.sch.tasks.CutConveyorTask;
|
import org.nl.wms.sch.tasks.CutConveyorTask;
|
||||||
@@ -154,7 +156,7 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
//只找入箱点位
|
//只找入箱点位
|
||||||
map.put("point_type", "4");
|
map.put("point_type", "4");
|
||||||
|
|
||||||
JSONArray pointArr = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(map).process().getResultJSONArray(0);
|
JSONObject point_code2 = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(map).process().uniqueResult(0);
|
||||||
/*if (ObjectUtil.isEmpty(pointArr)) {
|
/*if (ObjectUtil.isEmpty(pointArr)) {
|
||||||
if (StrUtil.equals(point_location, "0")) map.put("point_location", "1");
|
if (StrUtil.equals(point_location, "0")) map.put("point_location", "1");
|
||||||
if (StrUtil.equals(point_location, "1")) map.put("point_location", "0");
|
if (StrUtil.equals(point_location, "1")) map.put("point_location", "0");
|
||||||
@@ -163,25 +165,6 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
if (ObjectUtil.isEmpty(pointArr)) throw new BadRequestException("没有空暂存位");
|
if (ObjectUtil.isEmpty(pointArr)) throw new BadRequestException("没有空暂存位");
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
// 2.判断暂存位是否有任务:找到无任务的暂存位 、查询烘箱对应的空位
|
|
||||||
String point_code2 = "";
|
|
||||||
for (int i = 0; i < pointArr.size(); i++) {
|
|
||||||
JSONObject jsonPoint = pointArr.getJSONObject(i);
|
|
||||||
String point_code = jsonPoint.getString("point_code");
|
|
||||||
|
|
||||||
JSONObject json_point_code1 = taskTab.query("point_code1 = '" + point_code + "' and task_status != '07' and is_delete = '0'").uniqueResult(0);
|
|
||||||
JSONObject json_point_code2 = taskTab.query("point_code2 = '" + point_code + "' and task_status != '07' and is_delete = '0'").uniqueResult(0);
|
|
||||||
JSONObject json_point_code3 = taskTab.query("point_code3 = '" + point_code + "' and task_status != '07' and is_delete = '0'").uniqueResult(0);
|
|
||||||
JSONObject json_point_code4 = taskTab.query("point_code4 = '" + point_code + "' and task_status != '07' and is_delete = '0'").uniqueResult(0);
|
|
||||||
if (ObjectUtil.isEmpty(json_point_code1) && ObjectUtil.isEmpty(json_point_code2) && ObjectUtil.isEmpty(json_point_code3) && ObjectUtil.isEmpty(json_point_code4)) {
|
|
||||||
point_code2 = point_code;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (ObjectUtil.isEmpty(point_code2)) throw new BadRequestException("没有空暂存位");
|
|
||||||
|
|
||||||
// 查询烘箱对应的空位
|
|
||||||
|
|
||||||
JSONObject jsonMap = new JSONObject();
|
JSONObject jsonMap = new JSONObject();
|
||||||
jsonMap.put("flag", "1");
|
jsonMap.put("flag", "1");
|
||||||
jsonMap.put("product_area", product_area);
|
jsonMap.put("product_area", product_area);
|
||||||
@@ -470,7 +453,16 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public JSONObject release(JSONObject whereJson) {
|
public JSONObject release(JSONObject whereJson) {
|
||||||
return null;
|
JSONArray rows = new JSONArray();
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
jo.put("device_code",whereJson.getString("point_code"));
|
||||||
|
jo.put("code","");
|
||||||
|
jo.put("value","");
|
||||||
|
rows.add(jo);
|
||||||
|
new WmsToAcsServiceImpl().action(rows);
|
||||||
|
JSONObject result = new JSONObject();
|
||||||
|
result.put("message", "操作成功!");
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -494,17 +486,17 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
if (ObjectUtil.isNotEmpty(jsonPoint) && ObjectUtil.isNotEmpty(jsonPoint.getString("material_code"))) {
|
if (ObjectUtil.isNotEmpty(jsonPoint) && ObjectUtil.isNotEmpty(jsonPoint.getString("material_code"))) {
|
||||||
json.put("container_name", jsonPoint.getString("material_code"));
|
json.put("container_name", jsonPoint.getString("material_code"));
|
||||||
} else {
|
} else {
|
||||||
if (ObjectUtil.isEmpty(jsonCool) && ObjectUtil.isEmpty(jsonHot) && ObjectUtil.isEmpty(jsonPoint)){
|
if (ObjectUtil.isEmpty(jsonCool) && ObjectUtil.isEmpty(jsonHot) && ObjectUtil.isEmpty(jsonPoint)) {
|
||||||
throw new BadRequestException("请扫描冷却区、对接位或者烘箱的点位进行操作!");
|
throw new BadRequestException("请扫描冷却区、对接位或者烘箱的点位进行操作!");
|
||||||
}else {
|
} else {
|
||||||
throw new BadRequestException("该点位上不存在母卷!");
|
throw new BadRequestException("该点位上不存在母卷!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
result.put("data",json);
|
result.put("data", json);
|
||||||
result.put("message","操作成功!");
|
result.put("message", "操作成功!");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import org.nl.modules.common.exception.BadRequestException;
|
|||||||
import org.nl.modules.common.utils.SecurityUtils;
|
import org.nl.modules.common.utils.SecurityUtils;
|
||||||
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.BakingService;
|
import org.nl.wms.pda.mps.service.BakingService;
|
||||||
import org.nl.wms.pda.mps.service.CasingService;
|
import org.nl.wms.pda.mps.service.CasingService;
|
||||||
@@ -27,7 +28,7 @@ public class CasingServiceImpl implements CasingService {
|
|||||||
private final LmsToMesService lmsToMesService;
|
private final LmsToMesService lmsToMesService;
|
||||||
|
|
||||||
@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");
|
||||||
@@ -47,10 +48,11 @@ public class CasingServiceImpl implements CasingService {
|
|||||||
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("message","查询成功!");
|
jo.put("size", rows.getString("totalElements"));
|
||||||
|
jo.put("message", "查询成功!");
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,12 +64,12 @@ public class CasingServiceImpl implements CasingService {
|
|||||||
String now = DateUtil.now();
|
String now = DateUtil.now();
|
||||||
|
|
||||||
String qzzno = whereJson.getString("qzzno");
|
String qzzno = whereJson.getString("qzzno");
|
||||||
if (StrUtil.isEmpty(qzzno)){
|
if (StrUtil.isEmpty(qzzno)) {
|
||||||
throw new BadRequestException("气涨轴编码不能为空!");
|
throw new BadRequestException("气涨轴编码不能为空!");
|
||||||
}
|
}
|
||||||
JSONArray rows = whereJson.getJSONArray("cut_rows");
|
JSONArray rows = whereJson.getJSONArray("cut_rows");
|
||||||
|
|
||||||
if (rows.size()>2){
|
if (rows.size() > 2) {
|
||||||
throw new BadRequestException("最多选择两个子卷进行操作!");
|
throw new BadRequestException("最多选择两个子卷进行操作!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,30 +82,30 @@ public class CasingServiceImpl implements CasingService {
|
|||||||
|
|
||||||
//对子卷任务进行校验
|
//对子卷任务进行校验
|
||||||
for (int i = 0; i < rows.size(); i++) {
|
for (int i = 0; i < rows.size(); i++) {
|
||||||
JSONObject row = rows.getJSONObject(i);
|
JSONObject row = rows.getJSONObject(i);
|
||||||
if (StrUtil.isEmpty(split_group)){
|
if (StrUtil.isEmpty(split_group)) {
|
||||||
split_group = row.getString("split_group");
|
split_group = row.getString("split_group");
|
||||||
resource_name = row.getString("resource_name");
|
resource_name = row.getString("resource_name");
|
||||||
order_type = row.getString("order_type");
|
order_type = row.getString("order_type");
|
||||||
if (order_type.equals("1")){
|
if (order_type.equals("1")) {
|
||||||
parent_container_name = row.getString("parent_container_name");
|
parent_container_name = row.getString("parent_container_name");
|
||||||
}else {
|
} else {
|
||||||
restruct_container_name = row.getString("restruct_container_name");
|
restruct_container_name = row.getString("restruct_container_name");
|
||||||
package_box_sn = row.getString("package_box_sn");
|
package_box_sn = row.getString("package_box_sn");
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
if (!split_group.equals(row.getString("split_group"))){
|
if (!split_group.equals(row.getString("split_group"))) {
|
||||||
throw new BadRequestException("两个子卷的分切组必须相同!");
|
throw new BadRequestException("两个子卷的分切组必须相同!");
|
||||||
}
|
}
|
||||||
if (!resource_name.equals(row.getString("resource_name"))){
|
if (!resource_name.equals(row.getString("resource_name"))) {
|
||||||
throw new BadRequestException("两个子卷的机台编号必须相同!");
|
throw new BadRequestException("两个子卷的机台编号必须相同!");
|
||||||
}
|
}
|
||||||
if (order_type.equals("1")){
|
if (order_type.equals("1")) {
|
||||||
if (!parent_container_name.equals(row.getString("parent_container_name"))){
|
if (!parent_container_name.equals(row.getString("parent_container_name"))) {
|
||||||
throw new BadRequestException("两个子卷的母卷号必须相同!");
|
throw new BadRequestException("两个子卷的母卷号必须相同!");
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
if (!restruct_container_name.equals(row.getString("restruct_container_name")) || !package_box_sn.equals(row.getString("package_box_sn"))){
|
if (!restruct_container_name.equals(row.getString("restruct_container_name")) || !package_box_sn.equals(row.getString("package_box_sn"))) {
|
||||||
throw new BadRequestException("两个子卷的改制子卷必须相同!");
|
throw new BadRequestException("两个子卷的改制子卷必须相同!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -115,28 +117,36 @@ public class CasingServiceImpl implements CasingService {
|
|||||||
String workorder_id = row.getString("workorder_id");
|
String workorder_id = row.getString("workorder_id");
|
||||||
//修改分切计划的是否套轴、气涨轴编码
|
//修改分切计划的是否套轴、气涨轴编码
|
||||||
HashMap map = new HashMap();
|
HashMap map = new HashMap();
|
||||||
map.put("is_child_tz_ok","1");
|
map.put("is_child_tz_ok", "1");
|
||||||
map.put("qzzno",qzzno);
|
map.put("qzzno", qzzno);
|
||||||
map.put("update_optid",currentUserId);
|
map.put("update_optid", currentUserId);
|
||||||
map.put("update_optname",nickName);
|
map.put("update_optname", nickName);
|
||||||
map.put("update_time",now);
|
map.put("update_time", now);
|
||||||
WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").update(map,"workorder_id = '"+workorder_id+"'");
|
WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").update(map, "workorder_id = '" + workorder_id + "'");
|
||||||
|
|
||||||
//调用MES接口,通知MES已经套轴完成
|
//调用MES接口,通知MES已经套轴完成
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
jo.put("container_name",row.getString("container_name"));
|
jo.put("container_name", row.getString("container_name"));
|
||||||
//判断该接口是否需要回传
|
//判断该接口是否需要回传
|
||||||
JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'airSwellWithPaperTubeAssComplete'").uniqueResult(0);
|
JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'airSwellWithPaperTubeAssComplete'").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(back_jo) && back_jo.getString("is_back").equals("1")){
|
if (ObjectUtil.isNotEmpty(back_jo) && back_jo.getString("is_back").equals("1")) {
|
||||||
lmsToMesService.airSwellWithPaperTubeAssComplete(jo);
|
lmsToMesService.airSwellWithPaperTubeAssComplete(jo);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
result.put("message","操作成功!");
|
result.put("message", "操作成功!");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject queryDeviceByarea(JSONObject whereJson) {
|
||||||
|
String product_area = whereJson.getString("product_area");
|
||||||
|
JSONArray rows = WQL.getWO("PDA_02").addParam("flag", "12").addParam("product_area", product_area).process().getResultJSONArray(0);
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
jo.put("data", rows);
|
||||||
|
jo.put("message", "操作成功!");
|
||||||
|
return jo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,22 +37,18 @@ public class FeedingServiceImpl implements FeedingService {
|
|||||||
public JSONObject queryMaterialInfo(JSONObject whereJson, HttpContext ctx) {
|
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 source_container_name = whereJson.getString("source_container_name");
|
||||||
String container_name = whereJson.getString("container_name");
|
|
||||||
|
|
||||||
HashMap map = new HashMap();
|
HashMap map = new HashMap();
|
||||||
map.put("flag", "2");
|
map.put("flag", "11");
|
||||||
if (StrUtil.isNotEmpty(product_area)) {
|
if (StrUtil.isNotEmpty(product_area)) {
|
||||||
map.put("product_area", product_area);
|
map.put("product_area", product_area);
|
||||||
}
|
}
|
||||||
if (StrUtil.isNotEmpty(point_code)) {
|
if (StrUtil.isNotEmpty(point_code)) {
|
||||||
map.put("point_code", point_code);
|
map.put("point_code", point_code);
|
||||||
}
|
}
|
||||||
if (StrUtil.isNotEmpty(device_code)) {
|
if (StrUtil.isNotEmpty(source_container_name)) {
|
||||||
map.put("device_code", device_code);
|
map.put("source_container_name", source_container_name);
|
||||||
}
|
|
||||||
if (StrUtil.isNotEmpty(container_name)) {
|
|
||||||
map.put("container_name", container_name);
|
|
||||||
}
|
}
|
||||||
JSONObject rows = WQL.getWO("PDA_02").addParamMap(map).pageQuery(ctx,"container_name");
|
JSONObject rows = WQL.getWO("PDA_02").addParamMap(map).pageQuery(ctx,"container_name");
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
@@ -64,7 +60,8 @@ public class FeedingServiceImpl implements FeedingService {
|
|||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@Override
|
@Override
|
||||||
public JSONObject confirm(JSONObject whereJson) {
|
public JSONObject confirm(JSONObject form) {
|
||||||
|
JSONObject whereJson = form.getJSONObject("cut_rows");
|
||||||
String container_name = whereJson.getString("container_name");
|
String container_name = whereJson.getString("container_name");
|
||||||
if (StrUtil.isEmpty(container_name)) {
|
if (StrUtil.isEmpty(container_name)) {
|
||||||
throw new BadRequestException("子卷号不能为空!");
|
throw new BadRequestException("子卷号不能为空!");
|
||||||
@@ -87,7 +84,7 @@ public class FeedingServiceImpl implements FeedingService {
|
|||||||
//查询该母卷号所在位置
|
//查询该母卷号所在位置
|
||||||
JSONObject cool_ivt = WQLObject.getWQLObject("ST_IVT_CoolPointIvt").query("container_name = '" + parent_container_name + "'").uniqueResult(0);
|
JSONObject cool_ivt = WQLObject.getWQLObject("ST_IVT_CoolPointIvt").query("container_name = '" + parent_container_name + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(cool_ivt)) {
|
if (ObjectUtil.isEmpty(cool_ivt)) {
|
||||||
throw new BadRequestException("未查询到该母卷的库存信息,!");
|
throw new BadRequestException("未查询到呼叫母卷的库存信息!");
|
||||||
}
|
}
|
||||||
|
|
||||||
//查询该母卷号对应的生箔信息
|
//查询该母卷号对应的生箔信息
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ public class RawFoilServiceImpl implements RawFoilService {
|
|||||||
// 计算预计结束时间: 开始时间 + 生产所需时间
|
// 计算预计结束时间: 开始时间 + 生产所需时间
|
||||||
String up_coiler_date = jsonObject.getString("up_coiler_date");
|
String up_coiler_date = jsonObject.getString("up_coiler_date");
|
||||||
Date date = DateUtil.parse(up_coiler_date);
|
Date date = DateUtil.parse(up_coiler_date);
|
||||||
String end_time = DateUtil.offsetMinute(date, need_time).toString();
|
String end_time = DateUtil.offsetSecond(date, need_time).toString();
|
||||||
|
|
||||||
// 当前时间 - 预计结束时间 : 超过为红色、还有半小时为黄色
|
// 当前时间 - 预计结束时间 : 超过为红色、还有半小时为黄色
|
||||||
Date now_time = DateUtil.parse(DateUtil.now());
|
Date now_time = DateUtil.parse(DateUtil.now());
|
||||||
|
|||||||
@@ -137,9 +137,9 @@ public class ShippingServiceImpl implements ShippingService {
|
|||||||
|
|
||||||
JSONObject vehicle_area = WQLObject.getWQLObject("md_pb_vehiclearea").query("product_area = '"+product_area+"' AND point_location = '"+point_location+"' AND vehicle_code = '"+vehicle_code+"'").uniqueResult(0);
|
JSONObject vehicle_area = WQLObject.getWQLObject("md_pb_vehiclearea").query("product_area = '"+product_area+"' AND point_location = '"+point_location+"' AND vehicle_code = '"+vehicle_code+"'").uniqueResult(0);
|
||||||
|
|
||||||
/*if (ObjectUtil.isEmpty(vehicle_area)){
|
if (ObjectUtil.isEmpty(vehicle_area)){
|
||||||
throw new BadRequestException("该气涨轴无法放在该载具上!");
|
throw new BadRequestException("该气涨轴无法放在该载具上!");
|
||||||
}*/
|
}
|
||||||
//查询离该分切计划包含机台最近的一个空点位
|
//查询离该分切计划包含机台最近的一个空点位
|
||||||
JSONObject empty_point = WQL.getWO("PDA_02")
|
JSONObject empty_point = WQL.getWO("PDA_02")
|
||||||
.addParam("sql_str", " ORDER BY abs("+plan_jo.getString("sort_seq")+"-sort_seq),point_code")
|
.addParam("sql_str", " ORDER BY abs("+plan_jo.getString("sort_seq")+"-sort_seq),point_code")
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
输入.sql_str TYPEAS f_string
|
输入.sql_str TYPEAS f_string
|
||||||
输入.device_code TYPEAS s_string
|
输入.device_code TYPEAS s_string
|
||||||
输入.container_name TYPEAS s_string
|
输入.container_name TYPEAS s_string
|
||||||
|
输入.source_container_name TYPEAS s_string
|
||||||
|
|
||||||
|
|
||||||
[临时表]
|
[临时表]
|
||||||
@@ -309,13 +310,15 @@
|
|||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IF 输入.flag = "11"
|
IF 输入.flag = "11"
|
||||||
QUERY
|
PAGEQUERY
|
||||||
SELECT
|
SELECT
|
||||||
plan.*,
|
plan.*,
|
||||||
ivt.point_code,
|
ivt.point_code,
|
||||||
ivt.sort_seq,
|
ivt.sort_seq,
|
||||||
ivt.product_area,
|
ivt.product_area,
|
||||||
ivt.point_location
|
ivt.point_location,
|
||||||
|
(case when plan.order_type = '1' then parent_container_name
|
||||||
|
when plan.order_type = '2' then restruct_container_name end) AS source_container_name
|
||||||
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
|
||||||
@@ -332,16 +335,37 @@
|
|||||||
OPTION 输入.product_area <> ""
|
OPTION 输入.product_area <> ""
|
||||||
ivt.product_area = 输入.product_area
|
ivt.product_area = 输入.product_area
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
OPTION 输入.container_name <> ""
|
OPTION 输入.source_container_name <> ""
|
||||||
plan.container_name = 输入.container_name
|
(plan.parent_container_name = 输入.source_container_name
|
||||||
|
OR
|
||||||
|
plan.restruct_container_name = 输入.source_container_name)
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
OPTION 输入.device_code <> ""
|
OPTION 输入.point_code <> ""
|
||||||
ivt.point_code = 输入.device_code
|
(ivt.full_point_code = 输入.point_code
|
||||||
|
OR
|
||||||
|
ivt.empty_point_code = 输入.point_code)
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDPAGEQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "12"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
ext_code AS text,
|
||||||
|
point_code AS value
|
||||||
|
FROM
|
||||||
|
st_ivt_cutpointivt
|
||||||
|
WHERE
|
||||||
|
1=1
|
||||||
|
OPTION 输入.product_area <> ""
|
||||||
|
product_area = 输入.product_area
|
||||||
|
ENDOPTION
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
输入.flag TYPEAS s_string
|
输入.flag TYPEAS s_string
|
||||||
输入.point_code TYPEAS s_string
|
输入.point_code TYPEAS s_string
|
||||||
输入.container_name TYPEAS s_string
|
输入.container_name TYPEAS s_string
|
||||||
|
输入.task_type TYPEAS s_string
|
||||||
|
|
||||||
|
|
||||||
[临时表]
|
[临时表]
|
||||||
@@ -93,3 +94,18 @@
|
|||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "3"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
*
|
||||||
|
FROM
|
||||||
|
sys_dict_detail
|
||||||
|
WHERE
|
||||||
|
name = 'task_priority'
|
||||||
|
AND
|
||||||
|
label = 输入.task_type
|
||||||
|
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -168,11 +169,17 @@ public class SlittingproductionplanServiceImpl implements Slittingproductionplan
|
|||||||
for (int i = 0; i < data.size(); i++) {
|
for (int i = 0; i < data.size(); i++) {
|
||||||
JSONObject json = data.getJSONObject(i);
|
JSONObject json = data.getJSONObject(i);
|
||||||
JSONObject jsonObject = tab.query("workorder_id = '" + json.getString("workorder_id") + "'").uniqueResult(0);
|
JSONObject jsonObject = tab.query("workorder_id = '" + json.getString("workorder_id") + "'").uniqueResult(0);
|
||||||
jsonObject.put("is_parent_ok","1");
|
HashMap map = new HashMap<>();
|
||||||
jsonObject.put("update_optid",currentUserId);
|
map.put("is_parent_ok","1");
|
||||||
jsonObject.put("update_optname",currentUsername);
|
map.put("update_optid",currentUserId);
|
||||||
jsonObject.put("update_time",DateUtil.now());
|
map.put("update_optname",currentUsername);
|
||||||
tab.update(jsonObject);
|
map.put("update_time",DateUtil.now());
|
||||||
|
if (jsonObject.getString("order_type").equals("1")){
|
||||||
|
tab.update(map,"parent_container_name = '"+json.getString("parent_container_name")+"'");
|
||||||
|
}else {
|
||||||
|
tab.update(map,"restruct_container_name = '"+json.getString("restruct_container_name")+"'");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -208,12 +215,16 @@ public class SlittingproductionplanServiceImpl implements Slittingproductionplan
|
|||||||
for (int i = 0; i < data.size(); i++) {
|
for (int i = 0; i < data.size(); i++) {
|
||||||
JSONObject json = data.getJSONObject(i);
|
JSONObject json = data.getJSONObject(i);
|
||||||
JSONObject jsonObject = tab.query("workorder_id = '" + json.getString("workorder_id") + "'").uniqueResult(0);
|
JSONObject jsonObject = tab.query("workorder_id = '" + json.getString("workorder_id") + "'").uniqueResult(0);
|
||||||
jsonObject.put("is_child_ps_ok","1");
|
if (StrUtil.isEmpty(jsonObject.getString("qzzno"))){
|
||||||
jsonObject.put("status","03");
|
throw new BadRequestException("还未绑定气涨轴!");
|
||||||
jsonObject.put("update_optid",currentUserId);
|
}
|
||||||
jsonObject.put("update_optname",currentUsername);
|
HashMap map = new HashMap();
|
||||||
jsonObject.put("update_time",DateUtil.now());
|
map.put("is_child_ps_ok","1");
|
||||||
tab.update(jsonObject);
|
map.put("status","03");
|
||||||
|
map.put("update_optid",currentUserId);
|
||||||
|
map.put("update_optname",currentUsername);
|
||||||
|
map.put("update_time",DateUtil.now());
|
||||||
|
tab.update(map,"qzzno = '"+jsonObject.getString("qzzno")+"'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.common.utils.SecurityUtils;
|
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.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.nl.wms.sch.AcsTaskDto;
|
import org.nl.wms.sch.AcsTaskDto;
|
||||||
@@ -280,7 +281,13 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
|||||||
json.put("create_id", currentUserId);
|
json.put("create_id", currentUserId);
|
||||||
json.put("create_name", currentUsername);
|
json.put("create_name", currentUsername);
|
||||||
json.put("create_time", DateUtil.now());
|
json.put("create_time", DateUtil.now());
|
||||||
json.put("priority", "1");
|
//根据类型获取对应的任务优先级
|
||||||
|
JSONObject priority_jo = WQL.getWO("PDA_COOLIN").addParam("flag","3").addParam("task_type",json.getString("task_type")).process().uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(priority_jo)){
|
||||||
|
json.put("priority", "1");
|
||||||
|
}else {
|
||||||
|
json.put("priority", priority_jo.getString("value"));
|
||||||
|
}
|
||||||
json.put("acs_task_type", "1");
|
json.put("acs_task_type", "1");
|
||||||
tab.insert(json);
|
tab.insert(json);
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.common.utils.SecurityUtils;
|
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.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.nl.wms.ext.mes.service.LmsToMesService;
|
import org.nl.wms.ext.mes.service.LmsToMesService;
|
||||||
@@ -295,7 +296,13 @@ public class CoolCutTask extends AbstractAcsTask {
|
|||||||
json.put("create_id", currentUserId);
|
json.put("create_id", currentUserId);
|
||||||
json.put("create_name", currentUsername);
|
json.put("create_name", currentUsername);
|
||||||
json.put("create_time", DateUtil.now());
|
json.put("create_time", DateUtil.now());
|
||||||
json.put("priority", "1");
|
//根据类型获取对应的任务优先级
|
||||||
|
JSONObject priority_jo = WQL.getWO("PDA_COOLIN").addParam("flag","3").addParam("task_type",json.getString("task_type")).process().uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(priority_jo)){
|
||||||
|
json.put("priority", "1");
|
||||||
|
}else {
|
||||||
|
json.put("priority", priority_jo.getString("value"));
|
||||||
|
}
|
||||||
if (form.getString("task_type").equals("010301")){
|
if (form.getString("task_type").equals("010301")){
|
||||||
json.put("acs_task_type", "2");
|
json.put("acs_task_type", "2");
|
||||||
}else {
|
}else {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.common.utils.SecurityUtils;
|
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.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.nl.wms.ext.mes.service.LmsToMesService;
|
import org.nl.wms.ext.mes.service.LmsToMesService;
|
||||||
@@ -181,7 +182,13 @@ public class CutConveyorTask extends AbstractAcsTask {
|
|||||||
json.put("create_id", currentUserId);
|
json.put("create_id", currentUserId);
|
||||||
json.put("create_name", currentUsername);
|
json.put("create_name", currentUsername);
|
||||||
json.put("create_time", DateUtil.now());
|
json.put("create_time", DateUtil.now());
|
||||||
json.put("priority", "1");
|
//根据类型获取对应的任务优先级
|
||||||
|
JSONObject priority_jo = WQL.getWO("PDA_COOLIN").addParam("flag","3").addParam("task_type",json.getString("task_type")).process().uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(priority_jo)){
|
||||||
|
json.put("priority", "1");
|
||||||
|
}else {
|
||||||
|
json.put("priority", priority_jo.getString("value"));
|
||||||
|
}
|
||||||
json.put("acs_task_type", "5");
|
json.put("acs_task_type", "5");
|
||||||
tab.insert(json);
|
tab.insert(json);
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import org.checkerframework.checker.units.qual.C;
|
|||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.common.utils.SecurityUtils;
|
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.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.nl.wms.sch.AcsTaskDto;
|
import org.nl.wms.sch.AcsTaskDto;
|
||||||
import org.nl.wms.sch.manage.AbstractAcsTask;
|
import org.nl.wms.sch.manage.AbstractAcsTask;
|
||||||
@@ -244,7 +245,13 @@ public class CutTrussTask extends AbstractAcsTask {
|
|||||||
json.put("create_id", currentUserId);
|
json.put("create_id", currentUserId);
|
||||||
json.put("create_name", currentUsername);
|
json.put("create_name", currentUsername);
|
||||||
json.put("create_time", DateUtil.now());
|
json.put("create_time", DateUtil.now());
|
||||||
json.put("priority", "1");
|
//根据类型获取对应的任务优先级
|
||||||
|
JSONObject priority_jo = WQL.getWO("PDA_COOLIN").addParam("flag","3").addParam("task_type",json.getString("task_type")).process().uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(priority_jo)){
|
||||||
|
json.put("priority", "1");
|
||||||
|
}else {
|
||||||
|
json.put("priority", priority_jo.getString("value"));
|
||||||
|
}
|
||||||
json.put("acs_task_type", "6");
|
json.put("acs_task_type", "6");
|
||||||
tab.insert(json);
|
tab.insert(json);
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import org.nl.modules.common.exception.BadRequestException;
|
|||||||
import org.nl.modules.common.utils.SecurityUtils;
|
import org.nl.modules.common.utils.SecurityUtils;
|
||||||
import org.nl.modules.system.service.impl.ParamServiceImpl;
|
import org.nl.modules.system.service.impl.ParamServiceImpl;
|
||||||
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.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.nl.wms.ext.mes.service.impl.LmsToMesServiceImpl;
|
import org.nl.wms.ext.mes.service.impl.LmsToMesServiceImpl;
|
||||||
@@ -186,7 +187,13 @@ public class InCoolIvtTask extends AbstractAcsTask {
|
|||||||
json.put("create_id", currentUserId);
|
json.put("create_id", currentUserId);
|
||||||
json.put("create_name", currentUsername);
|
json.put("create_name", currentUsername);
|
||||||
json.put("create_time", DateUtil.now());
|
json.put("create_time", DateUtil.now());
|
||||||
json.put("priority","1" );
|
//根据类型获取对应的任务优先级
|
||||||
|
JSONObject priority_jo = WQL.getWO("PDA_COOLIN").addParam("flag","3").addParam("task_type",json.getString("task_type")).process().uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(priority_jo)){
|
||||||
|
json.put("priority", "1");
|
||||||
|
}else {
|
||||||
|
json.put("priority", priority_jo.getString("value"));
|
||||||
|
}
|
||||||
json.put("acs_task_type","4" );
|
json.put("acs_task_type","4" );
|
||||||
tab.insert(json);
|
tab.insert(json);
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import org.nl.modules.common.exception.BadRequestException;
|
|||||||
import org.nl.modules.common.utils.SecurityUtils;
|
import org.nl.modules.common.utils.SecurityUtils;
|
||||||
import org.nl.modules.system.service.impl.ParamServiceImpl;
|
import org.nl.modules.system.service.impl.ParamServiceImpl;
|
||||||
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.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.nl.wms.ext.mes.service.impl.LmsToMesServiceImpl;
|
import org.nl.wms.ext.mes.service.impl.LmsToMesServiceImpl;
|
||||||
@@ -236,7 +237,13 @@ public class InHotTask extends AbstractAcsTask {
|
|||||||
json.put("material_code",form.getString("material_code"));
|
json.put("material_code",form.getString("material_code"));
|
||||||
json.put("create_name", currentUsername);
|
json.put("create_name", currentUsername);
|
||||||
json.put("create_time", DateUtil.now());
|
json.put("create_time", DateUtil.now());
|
||||||
json.put("priority", "1");
|
//根据类型获取对应的任务优先级
|
||||||
|
JSONObject priority_jo = WQL.getWO("PDA_COOLIN").addParam("flag","3").addParam("task_type",json.getString("task_type")).process().uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(priority_jo)){
|
||||||
|
json.put("priority", "1");
|
||||||
|
}else {
|
||||||
|
json.put("priority", priority_jo.getString("value"));
|
||||||
|
}
|
||||||
json.put("acs_task_type", "1");
|
json.put("acs_task_type", "1");
|
||||||
tab.insert(json);
|
tab.insert(json);
|
||||||
task_id = json.getString("task_id");
|
task_id = json.getString("task_id");
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.common.utils.SecurityUtils;
|
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.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.nl.wms.ext.mes.service.impl.LmsToMesServiceImpl;
|
import org.nl.wms.ext.mes.service.impl.LmsToMesServiceImpl;
|
||||||
import org.nl.wms.sch.AcsTaskDto;
|
import org.nl.wms.sch.AcsTaskDto;
|
||||||
@@ -175,7 +176,13 @@ public class OutHotTask extends AbstractAcsTask {
|
|||||||
json.put("create_id", currentUserId);
|
json.put("create_id", currentUserId);
|
||||||
json.put("create_name", currentUsername);
|
json.put("create_name", currentUsername);
|
||||||
json.put("create_time", DateUtil.now());
|
json.put("create_time", DateUtil.now());
|
||||||
json.put("priority", "1");
|
//根据类型获取对应的任务优先级
|
||||||
|
JSONObject priority_jo = WQL.getWO("PDA_COOLIN").addParam("flag","3").addParam("task_type",json.getString("task_type")).process().uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(priority_jo)){
|
||||||
|
json.put("priority", "1");
|
||||||
|
}else {
|
||||||
|
json.put("priority", priority_jo.getString("value"));
|
||||||
|
}
|
||||||
json.put("acs_task_type", "1");
|
json.put("acs_task_type", "1");
|
||||||
tab.insert(json);
|
tab.insert(json);
|
||||||
immediateNotifyAcs(null);
|
immediateNotifyAcs(null);
|
||||||
|
|||||||
@@ -2195,6 +2195,16 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (out_jo.getString("bill_type").equals("1003")){
|
||||||
|
//更新改切子卷为该子卷的分切计划
|
||||||
|
JSONObject source_dtl = WQLObject.getWQLObject("st_ivt_iostorinvdtl").query("iostorinv_id = '"+iostorinv_id+"' AND IFNULL(source_billdtl_id,'') <> ''").uniqueResult(0);
|
||||||
|
|
||||||
|
HashMap<String,String> map = new HashMap<>();
|
||||||
|
map.put("is_parent_ok","1");
|
||||||
|
WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").update(map,"restruct_container_name = '"+source_dtl.getString("pcsn")+"'");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 回传:
|
* 回传:
|
||||||
|
|||||||
Reference in New Issue
Block a user