This commit is contained in:
2023-01-30 14:29:28 +08:00
3 changed files with 34 additions and 2 deletions

View File

@@ -199,7 +199,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
boolean auto_div = false;
if (ObjectUtil.isEmpty(vehicle_code)) throw new BadRequestException("ACS申请任务失败载具不能为空");
//通过该木箱码查询对应的分配明细
JSONArray dis_rows = WQLObject.getWQLObject("st_ivt_iostorinvdis").query("work_status = '00' AND box_no = '" + vehicle_code + "' AND IFNULL(task_id,'') = ''").getResultJSONArray(0);
JSONArray dis_rows = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParam("box_no",vehicle_code).addParam("flag","28").process().getResultJSONArray(0);
if (ObjectUtil.isEmpty(dis_rows)) {
throw new BadRequestException("未查询到木箱:" + vehicle_code + "相关入库分配明细记录!");
}

View File

@@ -177,7 +177,7 @@ public class ShippingServiceImpl implements ShippingService {
if (Integer.valueOf(String.valueOf(dtl_type)) % 2 != 0) {
JSONObject right_point = WQLObject.getWQLObject("st_ivt_deliverypointivt").query("point_location = '"+empty_point.getString("point_location")+"' AND product_area = '"+empty_point.getString("product_area")+"' AND sort_seq = '"+empty_point.getString("sort_seq")+"' order by point_code desc").uniqueResult(0);
//判断是否存在任务
JSONObject task_jo = WQLObject.getWQLObject("sch_base_task").query("point_code1 = '"+right_point.getString("point_code")+"' OR point_code2 = '"+right_point.getString("point_code")+"' AND task_status < '07' AND is_delete = '0'").uniqueResult(0);
JSONObject task_jo = WQLObject.getWQLObject("sch_base_task").query("(point_code1 = '"+right_point.getString("point_code")+"' OR point_code2 = '"+right_point.getString("point_code")+"') AND task_status < '07' AND is_delete = '0'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(task_jo)){
throw new BadRequestException(empty_point.getString("point_code")+"所在一截输送线存在未完成的任务,请稍等几分钟后进行下发!");
}
@@ -237,6 +237,19 @@ public class ShippingServiceImpl implements ShippingService {
if (ObjectUtil.isEmpty(point_jo)) {
throw new BadRequestException("对应输送线不存在可用的空位!");
}
//如果为左边点位判断右边是否存在未完成的任务,如果有则提示不能下发
//判断输送出来的任务起点是否靠近分切机,如果靠近分切机且远离分切机的点位上存在载具且不存在任务进行载具横移
char dtl_type = point_jo.getString("point_code").charAt(point_jo.getString("point_code").length() - 1);
if (Integer.valueOf(String.valueOf(dtl_type)) % 2 != 0) {
JSONObject right_point = WQLObject.getWQLObject("st_ivt_deliverypointivt").query("point_location = '"+point_jo.getString("point_location")+"' AND product_area = '"+point_jo.getString("product_area")+"' AND sort_seq = '"+point_jo.getString("sort_seq")+"' order by point_code desc").uniqueResult(0);
//判断是否存在任务
JSONObject task_jo = WQLObject.getWQLObject("sch_base_task").query("(point_code1 = '"+right_point.getString("point_code")+"' OR point_code2 = '"+right_point.getString("point_code")+"') AND task_status < '07' AND is_delete = '0'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(task_jo)){
throw new BadRequestException(point_jo.getString("point_code")+"所在一截输送线存在未完成的任务,请稍等几分钟后进行下发!");
}
}
//下发输送线任务
JSONObject form = new JSONObject();
form.put("point_code1", point_code);

View File

@@ -945,6 +945,25 @@
ENDQUERY
ENDIF
IF 输入.flag = "28"
QUERY
SELECT
*
FROM
st_ivt_iostorinvdis dis
LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dis.iostorinv_id
WHERE
work_status = '00'
AND
box_no = 输入.box_no
AND
IFNULL(task_id,'') = ''
AND
mst.is_delete = '0'
ENDSELECT
ENDQUERY
ENDIF