输送线规则修改提交

This commit is contained in:
18188916393
2022-09-12 15:40:37 +08:00
parent efa22b41dd
commit f091d8316b
2 changed files with 10 additions and 8 deletions

View File

@@ -122,12 +122,17 @@ public class StructFindUtil {
.addParam("material_id", material_id).process().getResultJSONArray(0);
for (int i = 0; i < deviceArr.size(); i++) {
JSONObject deviceObj = deviceArr.getJSONObject(i);
int count = deviceObj.getIntValue("count");
/*int count = deviceObj.getIntValue("count");
//假如到该输送线上料位置的任务>= 空闲的位置个数,则需要选择下一个输送线
int task_num = WQL.getWO("QSTRUCT_RULE").addParam("flag", "7").process().uniqueResult(0).getIntValue("count");
if (count > task_num) {
result = pointTable.query("device_id = '" + deviceObj.getString("device_id") + "' and device_point_type='01'").uniqueResult(0);
break;
}*/
//判断输送线上料位置有无空位置
result = pointTable.query("device_id = '" + deviceObj.getString("device_id") + "' and device_point_type='01'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(result)){
break;
}
}
return result;

View File

@@ -200,27 +200,24 @@ ENDIF
IF 输入.flag = "6"
QUERY
SELECT
point.*,
device.device_id,
device.device_code,
device.device_name,
rule.in_seq_no,
count( * ) AS count
rule.in_seq_no
FROM
sch_base_point point
LEFT JOIN st_rule_cacheline rule ON point.device_id = rule.cacheline_id
LEFT JOIN pdm_base_device device ON device.device_id = rule.cacheline_id
WHERE
point.area_type = '07'
AND device_point_type='01'
AND point.mode<>'0'
AND ( point.vehicle_code = '' OR point.vehicle_code IS NULL )
OPTION 输入.material_id <> ""
rule.material_id = 输入.material_id
ENDOPTION
GROUP BY
device.device_id,
device.device_code,
device.device_name,
rule.in_seq_no
ORDER BY
rule.in_seq_no
ENDSELECT