20241017更新
parent
8c5bf9b7fc
commit
7542075a54
@ -0,0 +1,60 @@
|
|||||||
|
{
|
||||||
|
"properties" : { },
|
||||||
|
"id" : "2e42d1d8f15d4f318a69886c79055c24",
|
||||||
|
"script" : null,
|
||||||
|
"groupId" : "06bb1cef20924ed8887b1c3ae8a91d3a",
|
||||||
|
"name" : "查询完成的列表",
|
||||||
|
"createTime" : null,
|
||||||
|
"updateTime" : 1729148530659,
|
||||||
|
"lock" : null,
|
||||||
|
"createBy" : null,
|
||||||
|
"updateBy" : null,
|
||||||
|
"path" : "/completed/list",
|
||||||
|
"method" : "POST",
|
||||||
|
"parameters" : [ ],
|
||||||
|
"options" : [ ],
|
||||||
|
"requestBody" : "",
|
||||||
|
"headers" : [ ],
|
||||||
|
"paths" : [ ],
|
||||||
|
"responseBody" : null,
|
||||||
|
"description" : null,
|
||||||
|
"requestBodyDefinition" : null,
|
||||||
|
"responseBodyDefinition" : null
|
||||||
|
}
|
||||||
|
================================
|
||||||
|
import '@/common/sql' as sql
|
||||||
|
|
||||||
|
String salesOrdeSelect = sql("salesOrder")
|
||||||
|
String salesOrderCode = body.salesOrderCode;
|
||||||
|
String materialCode = body.materialCode;
|
||||||
|
|
||||||
|
return db.page("""
|
||||||
|
select
|
||||||
|
mpr.schedule_number,
|
||||||
|
mpr.report_number,
|
||||||
|
mpr.machine,
|
||||||
|
mpr.operator,
|
||||||
|
mpr.workshop,
|
||||||
|
mpr.report_date,
|
||||||
|
mpr.current_process,
|
||||||
|
mpr.create_by,
|
||||||
|
mpr.create_time,
|
||||||
|
mpr.is_completed,
|
||||||
|
mpr.source_number,
|
||||||
|
mpr.net_receipts,
|
||||||
|
mpr.production_number,
|
||||||
|
mpr.production_weight,
|
||||||
|
mpr.scrap_number,
|
||||||
|
mpr.scrap_weight,
|
||||||
|
mpr.next_process,
|
||||||
|
mpr.frame_number,
|
||||||
|
mpr.scrap_reason,
|
||||||
|
mpr.remarks ,
|
||||||
|
${salesOrdeSelect}
|
||||||
|
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 mpr.is_completed = 1
|
||||||
|
?{salesOrderCode != null and salesOrderCode != '', and mpr.sales_order_code like concat('%', #{salesOrderCode}, '%')}
|
||||||
|
?{materialCode != null and materialCode != '', and mpr.material_code like concat('%', #{materialCode}, '%')}
|
||||||
|
""")
|
@ -0,0 +1,51 @@
|
|||||||
|
{
|
||||||
|
"properties" : { },
|
||||||
|
"id" : "11e7ff78870642c089d681befeda91db",
|
||||||
|
"script" : null,
|
||||||
|
"groupId" : "d4e06c480fb04ecaaaee36cd3ad92aea",
|
||||||
|
"name" : "领料物料列表",
|
||||||
|
"createTime" : null,
|
||||||
|
"updateTime" : 1729136886715,
|
||||||
|
"lock" : null,
|
||||||
|
"createBy" : null,
|
||||||
|
"updateBy" : null,
|
||||||
|
"path" : "/material/list",
|
||||||
|
"method" : "POST",
|
||||||
|
"parameters" : [ ],
|
||||||
|
"options" : [ ],
|
||||||
|
"requestBody" : "",
|
||||||
|
"headers" : [ ],
|
||||||
|
"paths" : [ ],
|
||||||
|
"responseBody" : null,
|
||||||
|
"description" : null,
|
||||||
|
"requestBodyDefinition" : null,
|
||||||
|
"responseBodyDefinition" : null
|
||||||
|
}
|
||||||
|
================================
|
||||||
|
import '@/common/sql' as sql
|
||||||
|
|
||||||
|
String documentNumber = body.documentNumber;
|
||||||
|
String warehouse = body.warehouse;
|
||||||
|
|
||||||
|
String warehouseMaterial = sql("warehouseMaterial")
|
||||||
|
|
||||||
|
return db.page("""
|
||||||
|
select
|
||||||
|
mmr.id,
|
||||||
|
mmr.document_number,
|
||||||
|
date_format(mmr.requisition_date,'%Y-%m-%d %H:%i:%S') as requisition_date,
|
||||||
|
mmr.department,
|
||||||
|
mmr.recipient,
|
||||||
|
sum(mmr.requisition_number) as requisition_number,
|
||||||
|
sum(mmr.requisition_weight) as requisition_weight,
|
||||||
|
mw.warehouse_name,
|
||||||
|
${warehouseMaterial}
|
||||||
|
from mini_production_material_requisition mmr
|
||||||
|
inner join mini_warehouse_material mwm on mwm.warehouse = mmr.warehouse and mwm.supplier = mmr.supplier
|
||||||
|
inner join mini_warehouses mw on mw.warehouse_code = mmr.warehouse
|
||||||
|
and mwm.material_code = mmr.material_code
|
||||||
|
where 1=1
|
||||||
|
?{documentNumber!=null && documentNumber!="", and mmr.document_number like concat('%', #{documentNumber} ,'%') }
|
||||||
|
?{warehouse!=null && warehouse!="", and mmr.warehouse like concat('%', #{warehouse} ,'%') }
|
||||||
|
group by mmr.warehouse, mmr.material_code, mmr.supplier
|
||||||
|
""");
|
Loading…
Reference in New Issue