20241028更新

main
lcode 2 weeks ago
parent abfbf54d8a
commit 9281770503

@ -5,7 +5,7 @@
"groupId" : "06bb1cef20924ed8887b1c3ae8a91d3a",
"name" : "列表",
"createTime" : null,
"updateTime" : 1729824397433,
"updateTime" : 1730109402968,
"lock" : null,
"createBy" : null,
"updateBy" : null,
@ -59,34 +59,41 @@ String scheduleNumber = body.scheduleNumber;
String reportNumber = body.reportNumber;
String currentProcess = body.currentProcess;
String reportDate = body.reportDate;
String profileModel = body.profileModel;
var sql = """
select
id,
report_number,
machine,
operator,
workshop,
date_format(report_date, '%Y-%m-%d') as report_date,
current_process,
next_process,
production_number,
production_weight,
scrap_number,
scrap_reason,
frame_number,
is_completed,
sales_order_code,
schedule_number
from mini_process_report
mpr.id,
mpr.report_number,
mpr.machine,
mpr.operator,
mpr.workshop,
date_format(mpr.report_date, '%Y-%m-%d') as report_date,
mpr.current_process,
mpr.next_process,
mpr.production_number,
mpr.production_weight,
mpr.scrap_number,
mpr.scrap_reason,
mpr.frame_number,
mpr.is_completed,
mpr.sales_order_code,
mpr.schedule_number,
msm.profile_model
from mini_process_report mpr
left join mini_sales_order_materials msm
on mpr.sales_order_code = msm.sales_order_code and mpr.material_code = msm.material_code
where 1 = 1
-- and next_process is null
?{salesOrderCode != null and salesOrderCode != '', and sales_order_code like concat('%', #{salesOrderCode}, '%')}
?{scheduleNumber != null and scheduleNumber != '', and schedule_number like concat('%', #{scheduleNumber}, '%')}
?{reportNumber != null and reportNumber != '', and report_number like concat('%', #{reportNumber}, '%')}
?{currentProcess != null and currentProcess != '', and current_process = #{currentProcess}}
?{reportDate != null and reportDate != '', and date_format(report_date, '%Y-%m-%d') = #{reportDate}}
?{salesOrderCode != null and salesOrderCode != '', and mpr.sales_order_code like concat('%', #{salesOrderCode}, '%')}
?{scheduleNumber != null and scheduleNumber != '', and mpr.schedule_number like concat('%', #{scheduleNumber}, '%')}
?{reportNumber != null and reportNumber != '', and mpr.report_number like concat('%', #{reportNumber}, '%')}
?{currentProcess != null and currentProcess != '', and mpr.current_process = #{currentProcess}}
?{reportDate != null and reportDate != '', and date_format(mpr.report_date, '%Y-%m-%d') = #{reportDate}}
?{profileModel != null and profileModel != '', and msm.profile_model like concat('%', #{profileModel}, '%')}
-- group by report_number
"""
return db.page(sql);
// profileModel

@ -5,7 +5,7 @@
"groupId" : "06d35cc5db5f4e6681262a1648c871c3",
"name" : "列表",
"createTime" : null,
"updateTime" : 1728726289833,
"updateTime" : 1730109068864,
"lock" : null,
"createBy" : null,
"updateBy" : null,
@ -160,6 +160,8 @@ import '@/common/sql' as sql
String documentNumber = body["documentNumber"];
String salesOrderCode = body["salesOrderCode"];
String materialName = body["materialName"];
String materialCode = body["materialCode"];
String deliveryDate = body["deliveryDate"];
String salesOrdeSelect = sql("salesOrder")
String sql = """
@ -187,6 +189,8 @@ String sql = """
?{salesOrderCode != null and salesOrderCode != "", and mps.sales_order_code = #{salesOrderCode}}
?{documentNumber != null and documentNumber != "", and mps.document_number = #{documentNumber}}
?{materialName != null and materialName != "", and msm.material_name like concat('%', #{materialName}, '%')}
?{materialCode != null and materialCode != "", and mps.material_code like concat('%', #{materialCode}, '%')}
?{deliveryDate != null and deliveryDate != '', and mso.delivery_date = #{deliveryDate}}
""";
return db.page(sql);

Loading…
Cancel
Save