This commit is contained in:
2023-08-25 13:33:31 +08:00
parent 261b698148
commit e21744a41c
25 changed files with 4826 additions and 3716 deletions

View File

@@ -24,52 +24,116 @@ export const errCensus = (id) => post('api/deviceScreen/errCensus', {})
/** 仓储监控 */
export const storageMonitor = (id) => post('api/dashboard/warehouseMonitor', {})
/** 生产统计 */
export const productionStatistics = (id) => post('api/dashboard/productionStatistics', {})
// export const productionStatistics = () => {
// let res = {
// 'total': {
// 'pressWeight': 0,
// 'dryWeight': 0,
// 'sortWeight': 0
// },
// 'mixProduction': [
// {
// 'value': 0,
// 'name': 'string'
// }
// ],
// 'pressProduction': {
// 'dailyProductionQty': 0,
// 'dailyProductionWeight': 0,
// 'equipmentProduction': [
// {
// 'name': 'string',
// 'qty': 0,
// 'weight': 0
// }
// ]
// },
// 'finishedProductCompletionRate': [
// {
// 'name': 'string',
// 'completed': 0,
// 'uncompleted': 0
// }
// ],
// 'workOrder': [
// {
// 'workOrderCode': 'string',
// 'equipment': 'string',
// 'materialCode': 'string',
// 'customer': 'string',
// 'planned': 0,
// 'completed': 0,
// 'status': 'string',
// 'planStartTime': 'string',
// 'startTime': 'string',
// 'endTime': 'string'
// }
// ]
// }
// return res
// }
// export const productionStatistics = (id) => post('api/dashboard/productionStatistics', {})
export const productionStatistics = () => {
let res = {
'pressProduction': {
'dailyProductionQty': 32.25,
'equipmentProduction': [
{
'qty': 11000,
'name': '压机1',
'weight': 13000
},
{
'qty': 4000,
'name': '压机2',
'weight': 19000
},
{
'qty': 5000,
'name': '压机3',
'weight': 3000
}
],
'dailyProductionWeight': 64.25
},
'workOrder': [
{
'planStartTime': '2023-08-18 14:02:48',
'workOrderCode': 'DD001',
'equipment': '压机1',
'materialCode': 'WL01',
'startTime': '2023-08-18 14:02:48',
'planned': '1000kg',
'completed': '827kg',
'endTime': '2023-08-18 14:02:48',
'customer': '厂家1',
'status': '完成'
},
{
'planStartTime': '2023-08-18 14:02:48',
'workOrderCode': 'DD002',
'equipment': '混料机2',
'materialCode': 'WL02',
'startTime': '2023-08-18 14:02:48',
'planned': '1000kg',
'completed': '894kg',
'customer': '厂家2',
'status': '已下发'
},
{
'planStartTime': '2023-08-18 14:02:48',
'workOrderCode': 'DD003',
'equipment': '压机3',
'materialCode': 'WL03',
'planned': '3000kg',
'completed': '627kg',
'customer': '厂家3',
'status': '未生产'
},
{
'planStartTime': '2023-08-18 14:02:48',
'workOrderCode': 'DD004',
'equipment': '混料机4',
'materialCode': 'WL04',
'startTime': '2023-08-18 14:02:48',
'planned': '8000kg',
'completed': '6137kg',
'customer': '厂家4',
'status': '暂停'
}
],
'total': {
'pressWeight': 30.25,
'dryWeight': 20.25,
'sortWeight': 16.25
},
'finishedProductCompletionRate': [
{
'uncompleted': 5000,
'name': '物料1',
'completed': 4000
},
{
'uncompleted': 3000,
'name': '物料2',
'completed': 4000
},
{
'uncompleted': 4000,
'name': '物料3',
'completed': 3000
}
],
'mixProduction': [
{
'name': '物料1',
'value': 800.25
},
{
'name': '物料2',
'value': 800.25
},
{
'name': '物料3',
'value': 900.25
},
{
'name': '物料4',
'value': 600.25
}
]
}
return res
}