fix: B2烘烤校验点位状态

This commit is contained in:
2025-01-16 10:24:56 +08:00
parent 85937ab49f
commit 465ed137e3
2 changed files with 100 additions and 1 deletions

View File

@@ -256,7 +256,7 @@ public class BakingServiceImpl implements BakingService {
JSONObject map = new JSONObject();
map.put("flag", "1");
if (product_area.equals("B2")) {
map.put("flag", "3");
map.put("flag", "302");
}
map.put("reging_id", reging_id);
map.put("point_location", point_location);

View File

@@ -294,6 +294,105 @@
ENDQUERY
ENDIF
IF 输入.flag = "302"
QUERY
SELECT
a.*,
b.num
FROM
sch_base_point a
INNER JOIN (
SELECT
COUNT( c.task_id ) AS num,
c.point_code
FROM
(
SELECT
task.task_id,
point_code
FROM
SCH_BASE_Point po
LEFT JOIN sch_base_task task ON task.point_code1 = po.point_code
AND task.task_status < '07'
AND task.is_delete = '0'
WHERE
po.is_delete = '0'
AND po.is_used = '1'
OPTION 输入.reging_id <> ""
po.region_id = 输入.reging_id
ENDOPTION
OPTION 输入.cant_location <> ""
po.point_location not in 输入.cant_location
ENDOPTION
OPTION 输入.point_type <> ""
po.point_type = 输入.point_type
ENDOPTION
OPTION 输入.point_type = "5"
IFNULL(po.material_code,'') = ''
ENDOPTION
UNION
SELECT
task.task_id,
point_code
FROM
SCH_BASE_Point po
LEFT JOIN sch_base_task task ON task.point_code2 = po.point_code
AND task.task_status < '07'
AND task.is_delete = '0'
WHERE
po.is_delete = '0'
AND po.is_used = '1'
OPTION 输入.reging_id <> ""
po.region_id = 输入.reging_id
ENDOPTION
OPTION 输入.cant_location <> ""
po.point_location not in 输入.cant_location
ENDOPTION
OPTION 输入.point_type <> ""
po.point_type = 输入.point_type
ENDOPTION
OPTION 输入.point_type = "5"
IFNULL(po.material_code,'') = ''
ENDOPTION
UNION
SELECT
task.task_id,
point_code
FROM
SCH_BASE_Point po
LEFT JOIN sch_base_task task ON task.point_code3 = po.point_code
AND task.task_status < '07'
AND task.is_delete = '0'
WHERE
po.is_delete = '0'
AND po.is_used = '1'
OPTION 输入.reging_id <> ""
po.region_id = 输入.reging_id
ENDOPTION
OPTION 输入.cant_location <> ""
po.point_location not in 输入.cant_location
ENDOPTION
OPTION 输入.point_type <> ""
po.point_type = 输入.point_type
ENDOPTION
OPTION 输入.point_type = "5"
IFNULL(po.material_code,'') = ''
ENDOPTION
) c
GROUP BY
c.point_code
) b ON b.point_code = a.point_code AND a.point_status = '1'
ORDER BY num,a.point_code
ENDSELECT
ENDQUERY
ENDIF
IF 输入.flag = "4"
QUERY
SELECT