This commit is contained in:
2023-03-23 20:45:26 +08:00
parent d627899cce
commit ddee1cbfeb

View File

@@ -285,8 +285,7 @@ IF 输入.flag = "3"
SELECT SELECT
max( ivtflow.material_uuid ) AS material_uuid, max( ivtflow.material_uuid ) AS material_uuid,
max( material.material_code ) AS material_code, max( material.material_code ) AS material_code,
round (sum( ivtflow.change_qty ),0) AS out_quantity, round (sum( ivtflow.change_qty ),0) AS out_quantity
material.material_name
FROM FROM
st_ivt_structIvtFlow ivtflow st_ivt_structIvtFlow ivtflow
left join sch_base_point point on point.point_uuid = ivtflow.struct_uuid left join sch_base_point point on point.point_uuid = ivtflow.struct_uuid
@@ -314,8 +313,7 @@ IF 输入.flag = "8"
SELECT SELECT
max( ivtflow.material_uuid ) AS material_uuid, max( ivtflow.material_uuid ) AS material_uuid,
max( material.material_code ) AS material_code, max( material.material_code ) AS material_code,
round (sum( ivtflow.change_qty ) ,0)AS in_quantity, round (sum( ivtflow.change_qty ) ,0)AS in_quantity
material.material_name
FROM FROM
st_ivt_structIvtFlow ivtflow st_ivt_structIvtFlow ivtflow
left join sch_base_point point on point.point_uuid = ivtflow.struct_uuid left join sch_base_point point on point.point_uuid = ivtflow.struct_uuid
@@ -341,8 +339,7 @@ IF 输入.flag = "8"
QUERY QUERY
SELECT SELECT
sum(1) AS total_quantity, sum(1) AS total_quantity,
concat(mst.formula,'-',mst.pcsn) as material_ivt_info, concat(mst.formula,'-',mst.pcsn) as material_ivt_info
mst.material_name
FROM FROM
st_ivt_structivt ivt st_ivt_structivt ivt
LEFT JOIN sch_base_point point ON point.point_uuid = ivt.struct_uuid LEFT JOIN sch_base_point point ON point.point_uuid = ivt.struct_uuid
@@ -410,8 +407,7 @@ IF 输入.flag = "8"
SELECT SELECT
sum( CASE WHEN TIMESTAMPDIFF( HOUR, ivt.instorage_time, now( ) ) >= ivt.stand_hour THEN 1 ELSE 0 END ) AS sewting_quantity, sum( CASE WHEN TIMESTAMPDIFF( HOUR, ivt.instorage_time, now( ) ) >= ivt.stand_hour THEN 1 ELSE 0 END ) AS sewting_quantity,
sum( CASE WHEN TIMESTAMPDIFF( HOUR, ivt.instorage_time, now( ) ) < ivt.stand_hour THEN 1 ELSE 0 END ) AS finish_quantity, sum( CASE WHEN TIMESTAMPDIFF( HOUR, ivt.instorage_time, now( ) ) < ivt.stand_hour THEN 1 ELSE 0 END ) AS finish_quantity,
concat(mst.formula,'-',mst.pcsn) as material_ivt_info, concat(mst.formula,'-',mst.pcsn) as material_ivt_info
mst.material_name
FROM FROM
st_ivt_structivt ivt st_ivt_structivt ivt
LEFT JOIN sch_base_point point ON point.point_uuid = ivt.struct_uuid LEFT JOIN sch_base_point point ON point.point_uuid = ivt.struct_uuid