20241028更新

main
lcode 2 weeks ago
parent abfbf54d8a
commit 9281770503

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

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

Loading…
Cancel
Save