代码修复

This commit is contained in:
2023-01-03 21:05:25 +08:00
parent d0f6239144
commit cd25950727
4 changed files with 29 additions and 14 deletions

View File

@@ -40,7 +40,9 @@ public class CallEmptyServiceImpl implements CallEmptyService {
if (StrUtil.isEmpty(area_code)) { if (StrUtil.isEmpty(area_code)) {
throw new PdaRequestException("区域不能为空!"); 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(); JSONObject returnjo = new JSONObject();
returnjo.put("code", "1"); returnjo.put("code", "1");
returnjo.put("desc", "操作成功!"); returnjo.put("desc", "操作成功!");

View File

@@ -71,7 +71,7 @@ public class CallMaterialServiceImpl implements CallMaterialService {
String device_id = pointObj.getString("device_id"); String device_id = pointObj.getString("device_id");
//2 根据设备去找对应的生产任务 //2 根据设备去找对应的生产任务
JSONObject productTaskObj = WQLObject.getWQLObject("PDM_MG_produceTask") 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); .uniqueResult(0);
if (ObjectUtil.isEmpty(productTaskObj)) { if (ObjectUtil.isEmpty(productTaskObj)) {
throw new BadRequestException("未找到点位为'" + code + "'的生产任务!"); throw new BadRequestException("未找到点位为'" + code + "'的生产任务!");

View File

@@ -53,6 +53,8 @@ public class CheckOutServiceImpl implements CheckOutService {
throw new BadRequestException("点位为'" + point_code + "'已锁定,不能出库"); throw new BadRequestException("点位为'" + point_code + "'已锁定,不能出库");
} }
WQLObject ivtTable = WQLObject.getWQLObject("st_ivt_structivt"); 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); JSONObject ivtObj = ivtTable.query("struct_id = '" + point_id + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(ivtObj)){ if (ObjectUtil.isEmpty(ivtObj)){
throw new BadRequestException("未找到库存信息"); throw new BadRequestException("未找到库存信息");
@@ -93,6 +95,13 @@ public class CheckOutServiceImpl implements CheckOutService {
param.put("workprocedure_id", ivtObj.getString("ivt_workprocedure_id")); param.put("workprocedure_id", ivtObj.getString("ivt_workprocedure_id"));
param.put("struct_id",point_id); param.put("struct_id",point_id);
ivtService.addIvtFlow(param, IvtChangeTypeEnum.SUB_IVT_AND_CAN_USE); 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(); JSONObject returnjo = new JSONObject();
returnjo.put("code", "1"); returnjo.put("code", "1");
returnjo.put("desc", "操作成功!"); returnjo.put("desc", "操作成功!");

View File

@@ -15,6 +15,7 @@
################################################# #################################################
输入.flag TYPEAS s_string 输入.flag TYPEAS s_string
输入.area_type TYPEAS s_string 输入.area_type TYPEAS s_string
输入.param TYPEAS s_string
[临时表] [临时表]
@@ -66,6 +67,9 @@
OPTION 输入.area_type <> "" OPTION 输入.area_type <> ""
point.area_type = 输入.area_type point.area_type = 输入.area_type
ENDOPTION ENDOPTION
OPTION 输入.param <> ""
point.point_name LIKE "%" 输入.param "%"
ENDOPTION
ENDSELECT ENDSELECT
ENDQUERY ENDQUERY
ENDIF ENDIF