20241012更新
parent
3e2cfb234a
commit
89f797ee0e
@ -0,0 +1,68 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "72e2009a2fe2476d94270cb8307a4185",
|
||||
"script" : null,
|
||||
"groupId" : "f4b3acf704cf4db29258ba70e24f8fc5",
|
||||
"name" : "详情",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1728728158049,
|
||||
"lock" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/detail",
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
import '@/common/sql' as sql
|
||||
|
||||
String salesOrder = sql("salesOrder")
|
||||
String scheduleNumber = body.scheduleNumber;
|
||||
|
||||
return {
|
||||
orderInfo: db.selectOne("""
|
||||
select
|
||||
schedule_number,
|
||||
date_format(extrusion_date, '%Y-%m-%d') as extrusion_date,
|
||||
extrusion_machine,
|
||||
extrusion_team,
|
||||
remarks
|
||||
from mini_extrusion_schedule
|
||||
where 1=1
|
||||
and schedule_number=#{scheduleNumber}
|
||||
"""),
|
||||
materials: db.select("""
|
||||
select
|
||||
mesd.schedule_number,
|
||||
mesd.production_length,
|
||||
mesd.production_pieces,
|
||||
mesd.sawing_method,
|
||||
date_format(mso.sales_date, '%Y-%m-%d') as sales_date,
|
||||
mci.customer_name,
|
||||
su.user_name as salesperson_name,
|
||||
mso.price,
|
||||
mso.pricing_date,
|
||||
mso.tax_rate,
|
||||
mso.processing_fee,
|
||||
${salesOrder}
|
||||
from
|
||||
mini_extrusion_schedule_detail mesd
|
||||
left join mini_sales_orders mso on mso.document_number = mesd.sales_order_code
|
||||
left join sys_user su on su.user_id = mso.salesperson
|
||||
left join mini_customer_info mci on mci.customer_code = mso.customer_id
|
||||
left join mini_sales_order_materials msm
|
||||
on mesd.sales_order_code = msm.sales_order_code and mesd.material_code = msm.material_code
|
||||
where 1=1 and mesd.schedule_number=#{scheduleNumber}
|
||||
|
||||
"""),
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue