20241124更新
							parent
							
								
									dee61ba798
								
							
						
					
					
						commit
						6e7e77c1c2
					
				| @ -0,0 +1,55 @@ | |||||||
|  | { | ||||||
|  |   "properties" : { }, | ||||||
|  |   "id" : "2b4cc8f11db64e45b3c82de9e640dca4", | ||||||
|  |   "script" : null, | ||||||
|  |   "groupId" : "4aa6b5de02c244e2981c22bf5a95394d", | ||||||
|  |   "name" : "产品入库详细列表", | ||||||
|  |   "createTime" : null, | ||||||
|  |   "updateTime" : 1732270231302, | ||||||
|  |   "lock" : null, | ||||||
|  |   "createBy" : null, | ||||||
|  |   "updateBy" : null, | ||||||
|  |   "path" : "/detaillist", | ||||||
|  |   "method" : "POST", | ||||||
|  |   "parameters" : [ ], | ||||||
|  |   "options" : [ ], | ||||||
|  |   "requestBody" : "", | ||||||
|  |   "headers" : [ ], | ||||||
|  |   "paths" : [ ], | ||||||
|  |   "responseBody" : null, | ||||||
|  |   "description" : null, | ||||||
|  |   "requestBodyDefinition" : null, | ||||||
|  |   "responseBodyDefinition" : null | ||||||
|  | } | ||||||
|  | ================================ | ||||||
|  | import '@/common/sql' as sql | ||||||
|  | 
 | ||||||
|  | String warehouseProductMaterial = sql("warehouseProductMaterial") | ||||||
|  | warehouseProductMaterial = warehouseProductMaterial.replace('mwp.packing_quantity,', '').replace('mwp.customer_id,', '') | ||||||
|  | String documentNumber = body.documentNumber; | ||||||
|  | 
 | ||||||
|  | return db.page(""" | ||||||
|  |  select  | ||||||
|  |     mpr.document_number, | ||||||
|  |     date_format(receipt_date, '%Y-%m-%d %H:%i:%S') as receipt_date, | ||||||
|  |     mpr.customer_id, | ||||||
|  |     mci.customer_name, | ||||||
|  |     mpr.workshop, | ||||||
|  |     mpr.frame_number, | ||||||
|  |     mpr.total_weight, | ||||||
|  |     mpr.remarks, | ||||||
|  |     mpr.receipt_quantity, | ||||||
|  |     mpr.packing_quantity, | ||||||
|  |     mpr.actual_weight, | ||||||
|  |     mpr.unstocked_quantity, | ||||||
|  |     mpr.stocked_quantity, | ||||||
|  |     mw.warehouse_name, | ||||||
|  |     ${warehouseProductMaterial} | ||||||
|  |  from mini_product_receipt mpr | ||||||
|  |  left join mini_customer_info mci on mci.customer_code = mpr.customer_id | ||||||
|  |   left join mini_warehouse_product mwp on mwp.sales_order_code = mpr.sales_order_code | ||||||
|  |         and mwp.material_code = mpr.material_code and mwp.order_no = mpr.order_no | ||||||
|  |    left join mini_warehouses mw on mw.warehouse_code = mwp.warehouse | ||||||
|  |      where 1=1 | ||||||
|  | ?{documentNumber!=null && documentNumber!="", and mpr.document_number like concat('%', #{documentNumber} ,'%') } | ||||||
|  | """); | ||||||
| @ -0,0 +1,50 @@ | |||||||
|  | { | ||||||
|  |   "properties" : { }, | ||||||
|  |   "id" : "6d97e8a13d904f858f0c64807351f542", | ||||||
|  |   "script" : null, | ||||||
|  |   "groupId" : "e95307c32dc1437e82df26a97f1f194e", | ||||||
|  |   "name" : "退料详细列表", | ||||||
|  |   "createTime" : null, | ||||||
|  |   "updateTime" : 1732270112987, | ||||||
|  |   "lock" : null, | ||||||
|  |   "createBy" : null, | ||||||
|  |   "updateBy" : null, | ||||||
|  |   "path" : "/detaillist", | ||||||
|  |   "method" : "POST", | ||||||
|  |   "parameters" : [ ], | ||||||
|  |   "options" : [ ], | ||||||
|  |   "requestBody" : "", | ||||||
|  |   "headers" : [ ], | ||||||
|  |   "paths" : [ ], | ||||||
|  |   "responseBody" : null, | ||||||
|  |   "description" : null, | ||||||
|  |   "requestBodyDefinition" : null, | ||||||
|  |   "responseBodyDefinition" : null | ||||||
|  | } | ||||||
|  | ================================ | ||||||
|  | import '@/common/sql' as sql | ||||||
|  | 
 | ||||||
|  | String warehouseMaterial = sql("warehouseMaterial") | ||||||
|  | 
 | ||||||
|  | String documentNumber = body.documentNumber; | ||||||
|  | String warehouse = body.warehouse; | ||||||
|  | 
 | ||||||
|  | return db.page(""" | ||||||
|  |  select  | ||||||
|  |     mmr.id, | ||||||
|  |     mmr.document_number, | ||||||
|  |     date_format(mmr.return_date,'%Y-%m-%d') as return_date, | ||||||
|  |     mmr.department, | ||||||
|  |     mmr.recipient, | ||||||
|  |     mmr.return_number, | ||||||
|  |     mmr.return_weight, | ||||||
|  |     mw.warehouse_name, | ||||||
|  |     ${warehouseMaterial} | ||||||
|  |  from mini_production_material_return mmr | ||||||
|  |     inner join mini_warehouse_material mwm on mwm.warehouse = mmr.warehouse and mwm.supplier = mmr.supplier and  mwm.material_code = mmr.material_code  | ||||||
|  |     inner join mini_warehouses mw on mw.warehouse_code = mmr.warehouse | ||||||
|  |          | ||||||
|  | where 1=1 | ||||||
|  | ?{documentNumber!=null && documentNumber!="", and mmr.document_number like concat('%', #{documentNumber} ,'%') }   | ||||||
|  | ?{warehouse!=null && warehouse!="", and mmr.warehouse like concat('%', #{warehouse} ,'%') }   | ||||||
|  | """); | ||||||
| @ -0,0 +1,51 @@ | |||||||
|  | { | ||||||
|  |   "properties" : { }, | ||||||
|  |   "id" : "021da64fc53d4836bee36e2e8f2934fd", | ||||||
|  |   "script" : null, | ||||||
|  |   "groupId" : "d4e06c480fb04ecaaaee36cd3ad92aea", | ||||||
|  |   "name" : "生产领料详细列表", | ||||||
|  |   "createTime" : null, | ||||||
|  |   "updateTime" : 1732268769536, | ||||||
|  |   "lock" : null, | ||||||
|  |   "createBy" : null, | ||||||
|  |   "updateBy" : null, | ||||||
|  |   "path" : "/detaillist", | ||||||
|  |   "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') as requisition_date, | ||||||
|  |     mmr.department, | ||||||
|  |     mmr.recipient, | ||||||
|  |     mmr.requisition_number, | ||||||
|  |     mmr.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.document_number, mmr.warehouse, mmr.material_code, mmr.supplier | ||||||
| @ -0,0 +1,33 @@ | |||||||
|  | { | ||||||
|  |   "properties" : { }, | ||||||
|  |   "id" : "da0d50b5a2f34008a86055901f12d637", | ||||||
|  |   "script" : null, | ||||||
|  |   "groupId" : "a2b7765d540449b7bf93e070c1911ce9", | ||||||
|  |   "name" : "更新采购订单状态", | ||||||
|  |   "createTime" : null, | ||||||
|  |   "updateTime" : 1732242575346, | ||||||
|  |   "lock" : null, | ||||||
|  |   "createBy" : null, | ||||||
|  |   "updateBy" : null, | ||||||
|  |   "path" : "/up/status", | ||||||
|  |   "method" : "POST", | ||||||
|  |   "parameters" : [ ], | ||||||
|  |   "options" : [ ], | ||||||
|  |   "requestBody" : "", | ||||||
|  |   "headers" : [ ], | ||||||
|  |   "paths" : [ ], | ||||||
|  |   "responseBody" : null, | ||||||
|  |   "description" : null, | ||||||
|  |   "requestBodyDefinition" : null, | ||||||
|  |   "responseBodyDefinition" : null | ||||||
|  | } | ||||||
|  | ================================ | ||||||
|  | String status = body['status']; | ||||||
|  | String documentNumber = body['documentNumber']; | ||||||
|  | int res = db.table("mini_purchase_orders").where().eq('document_number', documentNumber) | ||||||
|  |     .update({ | ||||||
|  |         document_number: documentNumber, | ||||||
|  |         status: status | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  | return res; | ||||||
											
												
													File diff suppressed because one or more lines are too long
												
											
										
									
								| @ -0,0 +1,33 @@ | |||||||
|  | { | ||||||
|  |   "properties" : { }, | ||||||
|  |   "id" : "dc813a08ffb84a09bc312d387b7a0910", | ||||||
|  |   "script" : null, | ||||||
|  |   "groupId" : "e631b317606f4246ac82585a7c1f1c5b", | ||||||
|  |   "name" : "更新销售状态", | ||||||
|  |   "createTime" : null, | ||||||
|  |   "updateTime" : 1732242587148, | ||||||
|  |   "lock" : null, | ||||||
|  |   "createBy" : null, | ||||||
|  |   "updateBy" : null, | ||||||
|  |   "path" : "/up/status", | ||||||
|  |   "method" : "POST", | ||||||
|  |   "parameters" : [ ], | ||||||
|  |   "options" : [ ], | ||||||
|  |   "requestBody" : "", | ||||||
|  |   "headers" : [ ], | ||||||
|  |   "paths" : [ ], | ||||||
|  |   "responseBody" : null, | ||||||
|  |   "description" : null, | ||||||
|  |   "requestBodyDefinition" : null, | ||||||
|  |   "responseBodyDefinition" : null | ||||||
|  | } | ||||||
|  | ================================ | ||||||
|  | String status = body['status']; | ||||||
|  | String documentNumber = body['documentNumber']; | ||||||
|  | int res = db.table("mini_sales_orders").where().eq('document_number', documentNumber) | ||||||
|  |     .update({ | ||||||
|  |         document_number: documentNumber, | ||||||
|  |         status: status | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  | return res; | ||||||
											
												
													File diff suppressed because one or more lines are too long
												
											
										
									
								
					Loading…
					
					
				
		Reference in New Issue