缓存线pad接口更新
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
package org.nl.wms.pda.rest;
|
package org.nl.wms.pda.rest;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaIgnore;
|
import cn.dev33.satoken.annotation.SaIgnore;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
@@ -20,7 +19,6 @@ import org.springframework.web.bind.annotation.PostMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -119,11 +117,9 @@ public class CacheLineHandController{
|
|||||||
@ApiOperation("缓存线料箱条码查询料箱信息")
|
@ApiOperation("缓存线料箱条码查询料箱信息")
|
||||||
public CommonResult<JSONArray> cacheLineMaterInfoQuery(@RequestBody JSONObject param) {
|
public CommonResult<JSONArray> cacheLineMaterInfoQuery(@RequestBody JSONObject param) {
|
||||||
log.info("海亮缓存线手持服务 [缓存线料箱条码查询料箱信息] 接口被请求, 请求参数-{}", param);
|
log.info("海亮缓存线手持服务 [缓存线料箱条码查询料箱信息] 接口被请求, 请求参数-{}", param);
|
||||||
return RestBusinessTemplate.execute(()-> cacheLineHandService.cacheLineMaterInfoQuery(param));
|
return RestBusinessTemplate.execute(() -> cacheLineHandService.cacheLineMaterInfoQuery(param));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/inOutEmptyBox")
|
@PostMapping("/inOutEmptyBox")
|
||||||
@Log("空箱初始化--出入空箱")
|
@Log("空箱初始化--出入空箱")
|
||||||
@ApiOperation("空箱初始化--出入空箱")
|
@ApiOperation("空箱初始化--出入空箱")
|
||||||
@@ -134,19 +130,14 @@ public class CacheLineHandController{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/inOutExceptionInstQuery")
|
@PostMapping("/inOutExceptionInstQuery")
|
||||||
@Log("缓存线出入箱异常指令查询")
|
@Log("缓存线出入箱异常指令查询")
|
||||||
@ApiOperation("缓存线出入箱异常指令查询")
|
@ApiOperation("缓存线出入箱异常指令查询")
|
||||||
public CommonResult<JSONArray> inOutExceptionInstQuery(@RequestBody JSONObject param) {
|
public CommonResult<JSONArray> inOutExceptionInstQuery(@RequestBody JSONObject param) {
|
||||||
log.info("海亮缓存线手持服务 [缓存线出入箱异常指令查询] 接口被请求, 请求参数-{}", param);
|
log.info("海亮缓存线手持服务 [缓存线出入箱异常指令查询] 接口被请求, 请求参数-{}", param);
|
||||||
return RestBusinessTemplate.execute(()-> cacheLineHandService.inOutExceptionInstQuery(param));
|
return RestBusinessTemplate.execute(() -> cacheLineHandService.inOutExceptionInstQuery(param));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/inOutExceptionInstConfirm")
|
@PostMapping("/inOutExceptionInstConfirm")
|
||||||
@Log("缓存线出入箱异常指令确认")
|
@Log("缓存线出入箱异常指令确认")
|
||||||
@ApiOperation("缓存线出入箱异常指令确认")
|
@ApiOperation("缓存线出入箱异常指令确认")
|
||||||
@@ -167,8 +158,6 @@ public class CacheLineHandController{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/setEmptyBox")
|
@PostMapping("/setEmptyBox")
|
||||||
@Log("设置空框")
|
@Log("设置空框")
|
||||||
@ApiOperation("设置空框")
|
@ApiOperation("设置空框")
|
||||||
@@ -179,19 +168,14 @@ public class CacheLineHandController{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/agvInBoxExceptionQuery")
|
@PostMapping("/agvInBoxExceptionQuery")
|
||||||
@Log("AGV入箱异常-查询")
|
@Log("AGV入箱异常-查询")
|
||||||
@ApiOperation("AGV入箱异常-查询")
|
@ApiOperation("AGV入箱异常-查询")
|
||||||
public CommonResult<JSONArray> agvInBoxExceptionQuery(@RequestBody JSONObject param) {
|
public CommonResult<JSONArray> agvInBoxExceptionQuery(@RequestBody JSONObject param) {
|
||||||
log.info("海亮缓存线手持服务 [AGV入箱异常-查询] 接口被请求, 请求参数-{}", param);
|
log.info("海亮缓存线手持服务 [AGV入箱异常-查询] 接口被请求, 请求参数-{}", param);
|
||||||
return RestBusinessTemplate.execute(()-> cacheLineHandService.agvInBoxExceptionQuery(param));
|
return RestBusinessTemplate.execute(() -> cacheLineHandService.agvInBoxExceptionQuery(param));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/agvInBoxExceptionConfirm")
|
@PostMapping("/agvInBoxExceptionConfirm")
|
||||||
@Log("AGV入箱异常-确认")
|
@Log("AGV入箱异常-确认")
|
||||||
@ApiOperation("AGV入箱异常-确认")
|
@ApiOperation("AGV入箱异常-确认")
|
||||||
@@ -202,21 +186,14 @@ public class CacheLineHandController{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/agvOutBoxExceptionQuery")
|
@PostMapping("/agvOutBoxExceptionQuery")
|
||||||
@Log("AGV出箱异常-查询")
|
@Log("AGV出箱异常-查询")
|
||||||
@ApiOperation("AGV出箱异常-查询")
|
@ApiOperation("AGV出箱异常-查询")
|
||||||
public CommonResult<JSONArray> agvOutBoxExceptionQuery(@RequestBody JSONObject param) {
|
public CommonResult<JSONArray> agvOutBoxExceptionQuery(@RequestBody JSONObject param) {
|
||||||
log.info("海亮缓存线手持服务 [AGV出箱异常-查询] 接口被请求, 请求参数-{}", param);
|
log.info("海亮缓存线手持服务 [AGV出箱异常-查询] 接口被请求, 请求参数-{}", param);
|
||||||
return RestBusinessTemplate.execute(()-> cacheLineHandService.agvOutBoxExceptionQuery(param));
|
return RestBusinessTemplate.execute(() -> cacheLineHandService.agvOutBoxExceptionQuery(param));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/agvOutBoxExceptionConfirm")
|
@PostMapping("/agvOutBoxExceptionConfirm")
|
||||||
@Log("AGV出箱异常-确认")
|
@Log("AGV出箱异常-确认")
|
||||||
@ApiOperation("AGV出箱异常-确认")
|
@ApiOperation("AGV出箱异常-确认")
|
||||||
@@ -237,7 +214,6 @@ public class CacheLineHandController{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/setBlankPos")
|
@PostMapping("/setBlankPos")
|
||||||
@Log("设置缓存线货位为空位置")
|
@Log("设置缓存线货位为空位置")
|
||||||
@ApiOperation("设置缓存线货位为空位置")
|
@ApiOperation("设置缓存线货位为空位置")
|
||||||
@@ -248,16 +224,14 @@ public class CacheLineHandController{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/cacheLineOutBoxExceptionQuery")
|
@PostMapping("/cacheLineOutBoxExceptionQuery")
|
||||||
@Log("缓存线出箱异常-查询")
|
@Log("缓存线出箱异常-查询")
|
||||||
@ApiOperation("缓存线出箱异常-查询")
|
@ApiOperation("缓存线出箱异常-查询")
|
||||||
public CommonResult<JSONArray> cacheLineOutBoxExceptionQuery(@RequestBody JSONObject param) {
|
public CommonResult<JSONArray> cacheLineOutBoxExceptionQuery(@RequestBody JSONObject param) {
|
||||||
log.info("海亮缓存线手持服务 [缓存线出箱异常-查询] 接口被请求, 请求参数-{}", param);
|
log.info("海亮缓存线手持服务 [缓存线出箱异常-查询] 接口被请求, 请求参数-{}", param);
|
||||||
return RestBusinessTemplate.execute(()-> cacheLineHandService.cacheLineOutBoxExceptionQuery(param));
|
return RestBusinessTemplate.execute(() -> cacheLineHandService.cacheLineOutBoxExceptionQuery(param));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/cacheLineExcepOpt")
|
@PostMapping("/cacheLineExcepOpt")
|
||||||
@Log("缓存线异常处理")
|
@Log("缓存线异常处理")
|
||||||
@ApiOperation("缓存线异常处理")
|
@ApiOperation("缓存线异常处理")
|
||||||
@@ -268,8 +242,6 @@ public class CacheLineHandController{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/pourMaterial")
|
@PostMapping("/pourMaterial")
|
||||||
@Log("倒料操作")
|
@Log("倒料操作")
|
||||||
@ApiOperation("倒料操作")
|
@ApiOperation("倒料操作")
|
||||||
@@ -279,6 +251,4 @@ public class CacheLineHandController{
|
|||||||
cacheLineHandService.pourMaterial(param);
|
cacheLineHandService.pourMaterial(param);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
package org.nl.wms.pda.service;
|
package org.nl.wms.pda.service;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import org.nl.wms.pda.dto.MaterialDto;
|
import org.nl.wms.pda.dto.MaterialDto;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import cn.hutool.core.util.IdUtil;
|
|||||||
import cn.hutool.core.util.NumberUtil;
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import lombok.Data;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@@ -15,7 +14,6 @@ import org.nl.common.utils.LocalCache;
|
|||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.config.thread.ThreadPoolExecutorUtil;
|
import org.nl.config.thread.ThreadPoolExecutorUtil;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.common.exception.BizCoreException;
|
|
||||||
import org.nl.modules.common.utils.RedisUtils;
|
import org.nl.modules.common.utils.RedisUtils;
|
||||||
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;
|
||||||
@@ -194,70 +192,43 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public JSONArray cacheLineMaterInfoQuery(JSONObject param) {
|
public JSONArray cacheLineMaterInfoQuery(JSONObject param) {
|
||||||
|
|
||||||
WQLObject positionTab = WQLObject.getWQLObject("sch_cacheline_position");
|
WQLObject positionTab = WQLObject.getWQLObject("sch_cacheline_position");
|
||||||
|
|
||||||
|
|
||||||
//获取缓存线位置信息
|
//获取缓存线位置信息
|
||||||
JSONArray arr = positionTab
|
JSONArray arr = positionTab.query("cacheLine_code like '%" + param.getString("cacheLine_code") + "%'", "layer_num desc,order_no").getResultJSONArray(0);
|
||||||
.query("cacheLine_code like '%" + param.getString("cacheLine_code") + "%'", "layer_num desc,order_no")
|
|
||||||
.getResultJSONArray(0);
|
|
||||||
|
|
||||||
|
|
||||||
// 获取缓存线物料库存信息
|
// 获取缓存线物料库存信息
|
||||||
WQLObject ivtTab = WQLObject.getWQLObject("sch_cacheline_vehilematerial");
|
WQLObject ivtTab = WQLObject.getWQLObject("sch_cacheline_vehilematerial");
|
||||||
|
for(int i = 0; i < arr.size(); i++) {
|
||||||
|
|
||||||
|
|
||||||
for (int i = 0; i < arr.size(); i++)
|
|
||||||
{
|
|
||||||
|
|
||||||
// 0 空位 status = 1: 绿色空箱 || status = 2:黄色满箱 || status = 3:红色异常 || status = 4 :不展示
|
// 0 空位 status = 1: 绿色空箱 || status = 2:黄色满箱 || status = 3:红色异常 || status = 4 :不展示
|
||||||
JSONObject json = arr.getJSONObject(i);
|
JSONObject json = arr.getJSONObject(i);
|
||||||
|
|
||||||
//料箱展示顺序号
|
//料箱展示顺序号
|
||||||
json.put("seat_order_num", json.getString("order_no"));
|
json.put("seat_order_num", json.getString("order_no"));
|
||||||
|
|
||||||
|
|
||||||
//初始化料箱重量和数量
|
//初始化料箱重量和数量
|
||||||
json.put("weight", "0");
|
json.put("weight", "0");
|
||||||
json.put("quantity", "0");
|
json.put("quantity", "0");
|
||||||
|
|
||||||
//不展示
|
//不展示
|
||||||
if ("0".equals(json.getString("is_show")))
|
if("0".equals(json.getString("is_show"))) {
|
||||||
{
|
|
||||||
json.put("vehicle_status", "04");
|
json.put("vehicle_status", "04");
|
||||||
}
|
}
|
||||||
//展示
|
//展示
|
||||||
else
|
else{
|
||||||
{
|
|
||||||
//是否空位
|
//是否空位
|
||||||
if ("1".equals(json.getString("is_empty")))
|
if("1".equals(json.getString("is_empty"))) {
|
||||||
{
|
|
||||||
json.put("vehicle_status", "00");
|
json.put("vehicle_status", "00");
|
||||||
}
|
}
|
||||||
else
|
else{
|
||||||
{
|
|
||||||
// 载具不是空位
|
// 载具不是空位
|
||||||
String vehicle_code = json.getString("vehicle_code");
|
String vehicle_code = json.getString("vehicle_code");
|
||||||
//从缓存线物料库存中 根据缓存线编码和载具编码获取绑定信息
|
//从缓存线物料库存中 根据缓存线编码和载具编码获取绑定信息
|
||||||
JSONObject ivtObj =
|
JSONObject ivtObj = ivtTab.query("vehicle_code = '" + vehicle_code + "' and cacheLine_code like '%" + param.getString("wcsdevice_code") + "%'").uniqueResult(0);
|
||||||
ivtTab.query("vehicle_code = '" + vehicle_code + "' and cacheLine_code like '%"
|
if(ivtObj == null) {
|
||||||
+ param.getString("wcsdevice_code") + "%'").uniqueResult(0);
|
|
||||||
|
|
||||||
|
|
||||||
if (ivtObj == null)
|
|
||||||
{
|
|
||||||
//标记为红色异常
|
//标记为红色异常
|
||||||
json.put("vehicle_status", "03");
|
json.put("vehicle_status", "03");
|
||||||
}
|
}
|
||||||
else
|
else{
|
||||||
{
|
|
||||||
json.put("vehicle_status", ivtObj.getString("vehicle_status"));
|
json.put("vehicle_status", ivtObj.getString("vehicle_status"));
|
||||||
json.put("weight", ivtObj.getString("weight"));
|
json.put("weight", ivtObj.getString("weight"));
|
||||||
json.put("quantity", ivtObj.getString("quantity"));
|
json.put("quantity", ivtObj.getString("quantity"));
|
||||||
json.putAll(ivtObj);
|
json.putAll(ivtObj);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -266,22 +237,12 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
json.put("cacheLine_code", json.getString("cacheLine_code"));
|
json.put("cacheLine_code", json.getString("cacheLine_code"));
|
||||||
json.put("weight", NumberUtil.mul(json.getString("weight"), "1"));
|
json.put("weight", NumberUtil.mul(json.getString("weight"), "1"));
|
||||||
json.put("status", json.getString("vehicle_status").substring(1, 2));
|
json.put("status", json.getString("vehicle_status").substring(1, 2));
|
||||||
|
|
||||||
//异常类型
|
//异常类型
|
||||||
if (!"00".equals(json.getString("err_type"))) {
|
if(!"00".equals(json.getString("err_type"))) {
|
||||||
json.put("is_err", "1");
|
json.put("is_err", "1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return arr;
|
return arr;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -290,7 +251,6 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setfullBox(JSONObject param) {
|
public void setfullBox(JSONObject param) {
|
||||||
|
|
||||||
String semimanufactures_uuid = param.getString("material_uuid");
|
String semimanufactures_uuid = param.getString("material_uuid");
|
||||||
// 料箱码
|
// 料箱码
|
||||||
String vehicle_code = param.getString("vehicle_code");
|
String vehicle_code = param.getString("vehicle_code");
|
||||||
@@ -303,11 +263,8 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
String weight = param.getString("weight");
|
String weight = param.getString("weight");
|
||||||
String quantity = param.getString("quantity");
|
String quantity = param.getString("quantity");
|
||||||
if(StringUtils.isEmpty(quantity) || param.getInteger("quantity") <= 0) {
|
if(StringUtils.isEmpty(quantity) || param.getInteger("quantity") <= 0) {
|
||||||
|
|
||||||
|
|
||||||
throw new RuntimeException("数量必须大于0!");
|
throw new RuntimeException("数量必须大于0!");
|
||||||
}
|
}
|
||||||
|
|
||||||
String workprocedure_code = param.getString("workprocedure_uuid");
|
String workprocedure_code = param.getString("workprocedure_uuid");
|
||||||
// 判断载具编码是否存在
|
// 判断载具编码是否存在
|
||||||
// 缓存线载具条码表【IF_CacheLine_Vehicle】
|
// 缓存线载具条码表【IF_CacheLine_Vehicle】
|
||||||
@@ -321,9 +278,7 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
WQLObject positionTab = WQLObject.getWQLObject("IF_CacheLine_Position");
|
WQLObject positionTab = WQLObject.getWQLObject("IF_CacheLine_Position");
|
||||||
JSONObject vehiobj = positionTab.query("order_no = " + seat_order_num + " and layer_num = " + layer_num + " and cacheLine_code like '%" + wcsdevice_code + "%'").uniqueResult(0);
|
JSONObject vehiobj = positionTab.query("order_no = " + seat_order_num + " and layer_num = " + layer_num + " and cacheLine_code like '%" + wcsdevice_code + "%'").uniqueResult(0);
|
||||||
if(vehiobj == null) {
|
if(vehiobj == null) {
|
||||||
|
|
||||||
throw new RuntimeException("位置不存在,设置有误!");
|
throw new RuntimeException("位置不存在,设置有误!");
|
||||||
|
|
||||||
}
|
}
|
||||||
// 判断物料去的缓存线是否正确
|
// 判断物料去的缓存线是否正确
|
||||||
// PDM_BI_WorkshopMaterialCorr
|
// PDM_BI_WorkshopMaterialCorr
|
||||||
@@ -333,17 +288,13 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
JSONObject wpObj = wpTab.query("workprocedure_code = '" + workprocedure_code + "'").uniqueResult(0);
|
JSONObject wpObj = wpTab.query("workprocedure_code = '" + workprocedure_code + "'").uniqueResult(0);
|
||||||
// 物料系列
|
// 物料系列
|
||||||
String materialprocess_series = corrTab.query("semimanufactures_uuid = '" + semimanufactures_uuid + "'").uniqueResult(0).getString("materialprocess_series");
|
String materialprocess_series = corrTab.query("semimanufactures_uuid = '" + semimanufactures_uuid + "'").uniqueResult(0).getString("materialprocess_series");
|
||||||
|
|
||||||
//TOASK 这个是调用什么?
|
//TOASK 这个是调用什么?
|
||||||
// AgvTwoInst inst = new AgvTwoInst();
|
// AgvTwoInst inst = new AgvTwoInst();
|
||||||
// String cachelineCode2 = inst.getCachelineCode(materialprocess_series, wpObj.getString("workprocedure_code"));
|
// String cachelineCode2 = inst.getCachelineCode(materialprocess_series, wpObj.getString("workprocedure_code"));
|
||||||
|
|
||||||
String cachelineCode2 = "";
|
String cachelineCode2 = "";
|
||||||
if(!wcsdevice_code.equals(cachelineCode2)) {
|
if(!wcsdevice_code.equals(cachelineCode2)) {
|
||||||
String materialprocess_seriesname = WQLObject.getWQLObject("PF_PB_SysDicInfo").query("sysdic_type = 'IF_WCS_DEVICESERIES' and sysdic_code = '" + materialprocess_series + "'").uniqueResult(0).getString("sysdic_name");
|
String materialprocess_seriesname = WQLObject.getWQLObject("PF_PB_SysDicInfo").query("sysdic_type = 'IF_WCS_DEVICESERIES' and sysdic_code = '" + materialprocess_series + "'").uniqueResult(0).getString("sysdic_name");
|
||||||
|
|
||||||
throw new RuntimeException("该缓存线【" + wcsdevice_code + "】不能存放【" + materialprocess_seriesname + "】物料,操作失败!");
|
throw new RuntimeException("该缓存线【" + wcsdevice_code + "】不能存放【" + materialprocess_seriesname + "】物料,操作失败!");
|
||||||
|
|
||||||
}
|
}
|
||||||
vehiobj.put("vehicle_code", vehicle_code);
|
vehiobj.put("vehicle_code", vehicle_code);
|
||||||
vehiobj.put("vehicle_uuid", vehicle_code);
|
vehiobj.put("vehicle_uuid", vehicle_code);
|
||||||
@@ -374,12 +325,10 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
json.put("vehicle_status", "02");
|
json.put("vehicle_status", "02");
|
||||||
json.put("create_time", DateUtil.now());
|
json.put("create_time", DateUtil.now());
|
||||||
ivtTab.insert(json);
|
ivtTab.insert(json);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setEmptyBox(JSONObject param) {
|
public void setEmptyBox(JSONObject param) {
|
||||||
|
|
||||||
// 层数
|
// 层数
|
||||||
String layer_num = param.getString("layer_num");
|
String layer_num = param.getString("layer_num");
|
||||||
// 顺序号
|
// 顺序号
|
||||||
@@ -401,9 +350,7 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
WQLObject positionTab = WQLObject.getWQLObject("IF_CacheLine_Position");
|
WQLObject positionTab = WQLObject.getWQLObject("IF_CacheLine_Position");
|
||||||
JSONObject vehiobj = positionTab.query("order_no = " + seat_order_num + " and layer_num = " + layer_num + " and cacheLine_code like '%" + wcsdevice_code + "%'").uniqueResult(0);
|
JSONObject vehiobj = positionTab.query("order_no = " + seat_order_num + " and layer_num = " + layer_num + " and cacheLine_code like '%" + wcsdevice_code + "%'").uniqueResult(0);
|
||||||
if(vehiobj == null) {
|
if(vehiobj == null) {
|
||||||
|
|
||||||
throw new RuntimeException("位置不存在,设置有误!");
|
throw new RuntimeException("位置不存在,设置有误!");
|
||||||
|
|
||||||
}
|
}
|
||||||
vehiobj.put("vehicle_code", vehicle_code);
|
vehiobj.put("vehicle_code", vehicle_code);
|
||||||
vehiobj.put("vehicle_uuid", vehicle_code);
|
vehiobj.put("vehicle_uuid", vehicle_code);
|
||||||
@@ -434,14 +381,10 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
json.put("workprocedure_name", "");
|
json.put("workprocedure_name", "");
|
||||||
json.put("create_time", DateUtil.now());
|
json.put("create_time", DateUtil.now());
|
||||||
ivtTab.insert(json);
|
ivtTab.insert(json);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setBlankPos(JSONObject param) {
|
public void setBlankPos(JSONObject param) {
|
||||||
|
|
||||||
// 层数
|
// 层数
|
||||||
String layer_num = param.getString("layer_num");
|
String layer_num = param.getString("layer_num");
|
||||||
// 顺序号
|
// 顺序号
|
||||||
@@ -456,20 +399,13 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
json.put("vehicle_uuid", "");
|
json.put("vehicle_uuid", "");
|
||||||
json.put("vehicle_code", "");
|
json.put("vehicle_code", "");
|
||||||
ivtTab.update(json);
|
ivtTab.update(json);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 出入空箱,出入类型 inOut_type 1 入空箱 2 出空箱 缓存线编码 wcsdevice_code 料箱码 vehicle_code
|
* 出入空箱,出入类型 inOut_type 1 入空箱 2 出空箱 缓存线编码 wcsdevice_code 料箱码 vehicle_code
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void inOutEmptyBox(JSONObject param) {
|
public void inOutEmptyBox(JSONObject param) {
|
||||||
|
|
||||||
String inOut_type = param.getString("inOut_type");
|
String inOut_type = param.getString("inOut_type");
|
||||||
String cacheLine_code = param.getString("wcsdevice_code");
|
String cacheLine_code = param.getString("wcsdevice_code");
|
||||||
String vehicle_code = param.getString("vehicle_code");
|
String vehicle_code = param.getString("vehicle_code");
|
||||||
@@ -510,12 +446,10 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
// 删除掉出库的箱子
|
// 删除掉出库的箱子
|
||||||
vehMaterTab.delete("cacheLine_code = '" + cacheLine_code + "' and vehicle_code = '" + vehicle_code + "'");
|
vehMaterTab.delete("cacheLine_code = '" + cacheLine_code + "' and vehicle_code = '" + vehicle_code + "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONArray inOutExceptionInstQuery(JSONObject param) {
|
public JSONArray inOutExceptionInstQuery(JSONObject param) {
|
||||||
|
|
||||||
// 1 扫码异常-入箱扫码 2 扫码异常-出箱扫码
|
// 1 扫码异常-入箱扫码 2 扫码异常-出箱扫码
|
||||||
// 出入类型 inOut_type
|
// 出入类型 inOut_type
|
||||||
// 缓存线编码 wcsdevice_code
|
// 缓存线编码 wcsdevice_code
|
||||||
@@ -566,10 +500,7 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
result.add(json);
|
result.add(json);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -578,7 +509,6 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void inOutExceptionInstConfirm(JSONObject param) {
|
public void inOutExceptionInstConfirm(JSONObject param) {
|
||||||
|
|
||||||
WQLObject instructTab = WQLObject.getWQLObject("IF_WCS_InstructPoint");
|
WQLObject instructTab = WQLObject.getWQLObject("IF_WCS_InstructPoint");
|
||||||
// 1 扫码异常-入箱扫码 2 扫码异常-出箱扫码
|
// 1 扫码异常-入箱扫码 2 扫码异常-出箱扫码
|
||||||
String inOut_type = param.getString("inOut_type");
|
String inOut_type = param.getString("inOut_type");
|
||||||
@@ -595,18 +525,10 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
data[0] = inOut_type;
|
data[0] = inOut_type;
|
||||||
data[1] = wcsdevice_code;
|
data[1] = wcsdevice_code;
|
||||||
data[2] = vehicle_code;
|
data[2] = vehicle_code;
|
||||||
|
|
||||||
//TOFIX 补充入箱扫码,出箱扫码异常处理接口
|
//TOFIX 补充入箱扫码,出箱扫码异常处理接口
|
||||||
|
|
||||||
//uWcsSchedule.notifyWcs(99, 3001, data);
|
//uWcsSchedule.notifyWcs(99, 3001, data);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AGV入箱子异常,(怎么判断入箱子异常) 缓存线编码 wcsdevice_code 满箱码 vehicle_code
|
* AGV入箱子异常,(怎么判断入箱子异常) 缓存线编码 wcsdevice_code 满箱码 vehicle_code
|
||||||
*/
|
*/
|
||||||
@@ -632,7 +554,6 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
json.put("nextpoint_code2", row.getString("nextpoint_code2"));
|
json.put("nextpoint_code2", row.getString("nextpoint_code2"));
|
||||||
result.add(json);
|
result.add(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -644,7 +565,6 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void agvInBoxExceptionConfirm(JSONObject param) {
|
public void agvInBoxExceptionConfirm(JSONObject param) {
|
||||||
|
|
||||||
WQLObject instructTab = WQLObject.getWQLObject("IF_WCS_InstructPoint");
|
WQLObject instructTab = WQLObject.getWQLObject("IF_WCS_InstructPoint");
|
||||||
String instruct_uuid = param.getString("instruct_uuid");
|
String instruct_uuid = param.getString("instruct_uuid");
|
||||||
String cacheLine_code = param.getString("wcsdevice_code");
|
String cacheLine_code = param.getString("wcsdevice_code");
|
||||||
@@ -711,12 +631,11 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
* ivtTab.insert(afterIvt);
|
* ivtTab.insert(afterIvt);
|
||||||
*/
|
*/
|
||||||
//TOASK 此逻辑疑问
|
//TOASK 此逻辑疑问
|
||||||
// AgvTwoInst inst = new AgvTwoInst();
|
// AgvTwoInst inst = new AgvTwoInst();
|
||||||
instObj.put("inboxtxm", full_vehicle_code);
|
instObj.put("inboxtxm", full_vehicle_code);
|
||||||
instObj.put("outboxtxm", empty_vehicle_code);
|
instObj.put("outboxtxm", empty_vehicle_code);
|
||||||
// inst.updateInstStatus(instObj, "1");
|
// inst.updateInstStatus(instObj, "1");
|
||||||
// inst.updateInstStatus(instObj, "2");
|
// inst.updateInstStatus(instObj, "2");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -747,7 +666,6 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
json.put("nextpoint_code2", row.getString("nextpoint_code2"));
|
json.put("nextpoint_code2", row.getString("nextpoint_code2"));
|
||||||
result.add(json);
|
result.add(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -757,7 +675,6 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void agvOutBoxExceptionConfirm(JSONObject param) {
|
public void agvOutBoxExceptionConfirm(JSONObject param) {
|
||||||
|
|
||||||
WQLObject instructTab = WQLObject.getWQLObject("IF_WCS_InstructPoint");
|
WQLObject instructTab = WQLObject.getWQLObject("IF_WCS_InstructPoint");
|
||||||
String instruct_uuid = param.getString("instruct_uuid");
|
String instruct_uuid = param.getString("instruct_uuid");
|
||||||
String vehicle_code = param.getString("vehicle_code");
|
String vehicle_code = param.getString("vehicle_code");
|
||||||
@@ -792,13 +709,12 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
* afterIvt.put("update_time", DateUtil.now()); ivtTab.insert(afterIvt);
|
* afterIvt.put("update_time", DateUtil.now()); ivtTab.insert(afterIvt);
|
||||||
*/
|
*/
|
||||||
//TOASK 此逻辑疑问
|
//TOASK 此逻辑疑问
|
||||||
// AgvTwoInst inst = new AgvTwoInst();
|
// AgvTwoInst inst = new AgvTwoInst();
|
||||||
// 出箱的时候入箱码和出箱码相同
|
// 出箱的时候入箱码和出箱码相同
|
||||||
instObj.put("inboxtxm", vehicle_code);
|
instObj.put("inboxtxm", vehicle_code);
|
||||||
instObj.put("outboxtxm", vehicle_code);
|
instObj.put("outboxtxm", vehicle_code);
|
||||||
// inst.updateInstStatus(instObj, "1");
|
// inst.updateInstStatus(instObj, "1");
|
||||||
// inst.updateInstStatus(instObj, "2");
|
// inst.updateInstStatus(instObj, "2");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -822,7 +738,6 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
@Override
|
@Override
|
||||||
public JSONArray cacheLineOutBoxExceptionQuery(
|
public JSONArray cacheLineOutBoxExceptionQuery(
|
||||||
JSONObject param) {
|
JSONObject param) {
|
||||||
|
|
||||||
String agv_no = param.getString("agv_no");
|
String agv_no = param.getString("agv_no");
|
||||||
String wcsdevice_code = param.getString("wcsdevice_code");
|
String wcsdevice_code = param.getString("wcsdevice_code");
|
||||||
WQLObject instructTab = WQLObject.getWQLObject("IF_WCS_InstructPoint");
|
WQLObject instructTab = WQLObject.getWQLObject("IF_WCS_InstructPoint");
|
||||||
@@ -841,7 +756,6 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
result.add(json);
|
result.add(json);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -850,7 +764,6 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
@Override
|
@Override
|
||||||
public void cacheLineOutBoxExceptionConfirm(
|
public void cacheLineOutBoxExceptionConfirm(
|
||||||
JSONObject param) {
|
JSONObject param) {
|
||||||
|
|
||||||
WQLObject instructTab = WQLObject.getWQLObject("IF_WCS_InstructPoint");
|
WQLObject instructTab = WQLObject.getWQLObject("IF_WCS_InstructPoint");
|
||||||
String instruct_uuid = param.getString("instruct_uuid");
|
String instruct_uuid = param.getString("instruct_uuid");
|
||||||
JSONObject instObj = instructTab.query("instruct_uuid = '" + instruct_uuid + "'").uniqueResult(0);
|
JSONObject instObj = instructTab.query("instruct_uuid = '" + instruct_uuid + "'").uniqueResult(0);
|
||||||
@@ -890,7 +803,6 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
ivtTab.update(map, "vehicle_code = '" + vehicle_code + "'");
|
ivtTab.update(map, "vehicle_code = '" + vehicle_code + "'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -911,7 +823,6 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
//TOFIX 补充逻辑
|
//TOFIX 补充逻辑
|
||||||
// 下发给wcs
|
// 下发给wcs
|
||||||
// uWcsSchedule.notifyWcs(99, 1000, objs);
|
// uWcsSchedule.notifyWcs(99, 1000, objs);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -930,13 +841,8 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
Object[] objs = new Object[2];
|
Object[] objs = new Object[2];
|
||||||
objs[0] = producer;
|
objs[0] = producer;
|
||||||
objs[1] = putquantity;
|
objs[1] = putquantity;
|
||||||
|
|
||||||
|
|
||||||
//TOFIX 补充逻辑
|
//TOFIX 补充逻辑
|
||||||
// 下发给wcs
|
// 下发给wcs
|
||||||
//uWcsSchedule.notifyWcs(99, 3002, objs);
|
//uWcsSchedule.notifyWcs(99, 3002, objs);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user