代码修复
This commit is contained in:
@@ -40,7 +40,9 @@ public class CallEmptyServiceImpl implements CallEmptyService {
|
||||
if (StrUtil.isEmpty(area_code)) {
|
||||
throw new PdaRequestException("区域不能为空!");
|
||||
}
|
||||
JSONArray pointArr = WQL.getWO("QPAEMPTY").addParam("flag", "2").addParam("area_type", area_code).process().getResultJSONArray(0);
|
||||
String param1 = "";
|
||||
if (area_code.equals("27")) param1 = "上料";
|
||||
JSONArray pointArr = WQL.getWO("QPAEMPTY").addParam("flag", "2").addParam("area_type", area_code).addParam("param", param1).process().getResultJSONArray(0);
|
||||
JSONObject returnjo = new JSONObject();
|
||||
returnjo.put("code", "1");
|
||||
returnjo.put("desc", "操作成功!");
|
||||
|
||||
@@ -71,7 +71,7 @@ public class CallMaterialServiceImpl implements CallMaterialService {
|
||||
String device_id = pointObj.getString("device_id");
|
||||
//2 根据设备去找对应的生产任务
|
||||
JSONObject productTaskObj = WQLObject.getWQLObject("PDM_MG_produceTask")
|
||||
.query("device_id ='" + device_id + "' and producetask_status in ('03','02','04')", "seq_no")
|
||||
.query("device_id ='" + device_id + "' and producetask_status in ('03','02','04')", "create_time")
|
||||
.uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(productTaskObj)) {
|
||||
throw new BadRequestException("未找到点位为'" + code + "'的生产任务!");
|
||||
|
||||
@@ -53,6 +53,8 @@ public class CheckOutServiceImpl implements CheckOutService {
|
||||
throw new BadRequestException("点位为'" + point_code + "'已锁定,不能出库");
|
||||
}
|
||||
WQLObject ivtTable = WQLObject.getWQLObject("st_ivt_structivt");
|
||||
WQLObject groupTab = WQLObject.getWQLObject("st_buss_vehiclegroup");
|
||||
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point");
|
||||
JSONObject ivtObj = ivtTable.query("struct_id = '" + point_id + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(ivtObj)){
|
||||
throw new BadRequestException("未找到库存信息");
|
||||
@@ -93,6 +95,13 @@ public class CheckOutServiceImpl implements CheckOutService {
|
||||
param.put("workprocedure_id", ivtObj.getString("ivt_workprocedure_id"));
|
||||
param.put("struct_id",point_id);
|
||||
ivtService.addIvtFlow(param, IvtChangeTypeEnum.SUB_IVT_AND_CAN_USE);
|
||||
// 删除阻盘信息
|
||||
groupTab.delete("vehicle_code = '" +ivtObj.getString("vehicle_code")+"'" );
|
||||
// 点位状态更新
|
||||
JSONObject object = pointTab.query("point_code = '" + point_code + "'").uniqueResult(0);
|
||||
object.put("point_status", "00");
|
||||
object.put("vehicle_code", "");
|
||||
pointTab.update(object);
|
||||
JSONObject returnjo = new JSONObject();
|
||||
returnjo.put("code", "1");
|
||||
returnjo.put("desc", "操作成功!");
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#################################################
|
||||
输入.flag TYPEAS s_string
|
||||
输入.area_type TYPEAS s_string
|
||||
输入.param TYPEAS s_string
|
||||
|
||||
|
||||
[临时表]
|
||||
@@ -66,6 +67,9 @@
|
||||
OPTION 输入.area_type <> ""
|
||||
point.area_type = 输入.area_type
|
||||
ENDOPTION
|
||||
OPTION 输入.param <> ""
|
||||
point.point_name LIKE "%" 输入.param "%"
|
||||
ENDOPTION
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
Reference in New Issue
Block a user