New file |
| | |
| | | { |
| | | "name": "rcs-flow", |
| | | "lockfileVersion": 3, |
| | | "requires": true, |
| | | "packages": {} |
| | | } |
| | |
| | | jam: 'Jam', |
| | | action: 'Action', |
| | | mission: 'Mission', |
| | | statistics: 'Statistics', |
| | | chargeCount: 'ChargeCount', |
| | | faultCount: 'FaultCount', |
| | | regionCount: 'RegionCount', |
| | | }, |
| | | table: { |
| | | field: { |
| | |
| | | runPath: 'Run Path', |
| | | actions: 'Actions', |
| | | }, |
| | | taskCount: { |
| | | type: 'type', |
| | | createTime: 'date', |
| | | region: 'region', |
| | | count: 'count', |
| | | agvNo: 'agvNo', |
| | | }, |
| | | faultCount: { |
| | | type: 'type', |
| | | createTime: 'date', |
| | | region: 'region', |
| | | errorTime: 'errorTime', |
| | | agvNo: 'agvNo', |
| | | }, |
| | | regionCount: { |
| | | type: 'type', |
| | | createTime: 'date', |
| | | agvNo: 'agvNo', |
| | | region: 'region', |
| | | errorTime: 'errorTime', |
| | | chargeTime: 'chargeTime', |
| | | waitTime: 'waitTime', |
| | | exeTime: 'exeTime', |
| | | taskNum: 'taskNum', |
| | | }, |
| | | } |
| | | }, |
| | | page: { |
| | |
| | | jam: '避让', |
| | | action: '动作', |
| | | mission: '执行', |
| | | statistics: '统计中心', |
| | | taskCount: '任务统计', |
| | | faultCount: '告警统计', |
| | | regionCount: '区域效率统计', |
| | | }, |
| | | table: { |
| | | field: { |
| | |
| | | runPath: '走行路径', |
| | | actions: '动作列表', |
| | | }, |
| | | taskCount: { |
| | | type: '类型', |
| | | createTime: '日期', |
| | | count: '次数', |
| | | region: '区域', |
| | | agvNo: '小车编号', |
| | | }, |
| | | faultCount: { |
| | | type: '类型', |
| | | createTime: '日期', |
| | | region: '区域', |
| | | errorTime: '故障时长,单位秒', |
| | | agvNo: '小车编号', |
| | | }, |
| | | regionCount: { |
| | | type: '类型', |
| | | createTime: '日期', |
| | | agvNo: '小车编号', |
| | | region: '区域', |
| | | errorTime: '故障时长,单位秒', |
| | | chargeTime: '充电时长,单位秒', |
| | | waitTime: '故障时长,单位秒', |
| | | exeTime: '执行时长,单位秒', |
| | | taskNum: '任务数量', |
| | | }, |
| | | } |
| | | }, |
| | | page: { |
| | |
| | | import jam from './jam'; |
| | | import action from './action'; |
| | | import mission from "./mission"; |
| | | import taskCount from "./taskCount"; |
| | | import faultCount from "./faultCount"; |
| | | import regionCount from "./regionCount"; |
| | | |
| | | const ResourceContent = (node) => { |
| | | switch (node.component) { |
| | |
| | | return action; |
| | | case 'mission': |
| | | return mission; |
| | | case 'faultCount': |
| | | return faultCount; |
| | | case 'taskCount': |
| | | return taskCount; |
| | | case 'regionCount': |
| | | return regionCount; |
| | | default: |
| | | return { |
| | | list: ListGuesser, |
| | |
| | | rowClick={(id, resource, record) => false} |
| | | expand={() => <AgvDetailPanel />} |
| | | expandSingle={true} |
| | | omit={['id', 'uuid', 'updateBy', 'createTime', 'createBy', 'memo']} |
| | | o mit={['id', 'uuid', 'updateBy', 'createTime', 'createBy', 'memo']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <TextField source="uuid" label="table.field.agvDetail.uuid" /> |
New file |
| | |
| | | import React, { useState, useRef, useEffect, useMemo, useCallback } from "react"; |
| | | import { useNavigate } from 'react-router-dom'; |
| | | import { |
| | | List, |
| | | DatagridConfigurable, |
| | | SearchInput, |
| | | TopToolbar, |
| | | SelectColumnsButton, |
| | | EditButton, |
| | | FilterButton, |
| | | CreateButton, |
| | | ExportButton, |
| | | BulkDeleteButton, |
| | | WrapperField, |
| | | useRecordContext, |
| | | useTranslate, |
| | | useNotify, |
| | | useListContext, |
| | | FunctionField, |
| | | TextField, |
| | | NumberField, |
| | | DateField, |
| | | BooleanField, |
| | | ReferenceField, |
| | | TextInput, |
| | | DateTimeInput, |
| | | DateInput, |
| | | SelectInput, |
| | | NumberInput, |
| | | ReferenceInput, |
| | | ReferenceArrayInput, |
| | | AutocompleteInput, |
| | | DeleteButton, |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | | import EmptyData from "../components/EmptyData"; |
| | | import MyCreateButton from "../components/MyCreateButton"; |
| | | import MyExportButton from '../components/MyExportButton'; |
| | | import PageDrawer from "../components/PageDrawer"; |
| | | import MyField from "../components/MyField"; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import * as Common from '@/utils/common'; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | | height: '.9em' |
| | | }, |
| | | '& .RaDatagrid-row': { |
| | | cursor: 'auto' |
| | | }, |
| | | '& .column-name': { |
| | | }, |
| | | '& .opt': { |
| | | width: 200 |
| | | }, |
| | | })); |
| | | |
| | | const filters = [ |
| | | <DateInput label='common.time.after' source="timeStart" alwaysOn />, |
| | | <DateInput label='common.time.before' source="timeEnd" alwaysOn />, |
| | | |
| | | |
| | | ] |
| | | |
| | | const FaultCountList = () => { |
| | | const translate = useTranslate(); |
| | | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | |
| | | return ( |
| | | <Box display="flex"> |
| | | <List |
| | | sx={{ |
| | | flexGrow: 1, |
| | | transition: (theme) => |
| | | theme.transitions.create(['all'], { |
| | | duration: theme.transitions.duration.enteringScreen, |
| | | }), |
| | | marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.faultCount"} |
| | | filters={filters} |
| | | sort={{ field: "", order: "" }} |
| | | actions={( |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | | <MyExportButton /> |
| | | </TopToolbar> |
| | | )} |
| | | perPage={DEFAULT_PAGE_SIZE} |
| | | > |
| | | <StyledDatagrid |
| | | preferenceKey='faultCount' |
| | | bulkActionButtons={false} |
| | | rowClick={false} |
| | | expand={false} |
| | | expandSingle={true} |
| | | omit={['id']} |
| | | > |
| | | <TextField source="id" sortable={false}/> |
| | | <TextField source="agvNo" label="table.field.faultCount.agvNo" sortable={false}/> |
| | | <TextField source="createTime" label="table.field.faultCount.createTime" sortable={false}/> |
| | | <TextField source="region" label="table.field.faultCount.region" sortable={false}/> |
| | | <NumberField source="errorTime" label="table.field.faultCount.errorTime" sortable={false}/> |
| | | |
| | | </StyledDatagrid> |
| | | </List> |
| | | |
| | | </Box> |
| | | ) |
| | | } |
| | | |
| | | export default FaultCountList; |
New file |
| | |
| | | import React, { useState, useRef, useEffect, useMemo } from "react"; |
| | | import { |
| | | ListGuesser, |
| | | EditGuesser, |
| | | ShowGuesser, |
| | | } from "react-admin"; |
| | | |
| | | import FaultCountList from "./FaultCountList"; |
| | | |
| | | export default { |
| | | list: FaultCountList, |
| | | show: ShowGuesser, |
| | | recordRepresentation: (record) => { |
| | | return `${record.agvNo}` |
| | | } |
| | | }; |
New file |
| | |
| | | import React, { useState, useRef, useEffect, useMemo, useCallback } from "react"; |
| | | import { useNavigate } from 'react-router-dom'; |
| | | import { |
| | | List, |
| | | DatagridConfigurable, |
| | | SearchInput, |
| | | TopToolbar, |
| | | SelectColumnsButton, |
| | | EditButton, |
| | | FilterButton, |
| | | CreateButton, |
| | | ExportButton, |
| | | BulkDeleteButton, |
| | | WrapperField, |
| | | useRecordContext, |
| | | useTranslate, |
| | | useNotify, |
| | | useListContext, |
| | | FunctionField, |
| | | TextField, |
| | | NumberField, |
| | | DateField, |
| | | BooleanField, |
| | | ReferenceField, |
| | | TextInput, |
| | | DateTimeInput, |
| | | DateInput, |
| | | SelectInput, |
| | | NumberInput, |
| | | ReferenceInput, |
| | | ReferenceArrayInput, |
| | | AutocompleteInput, |
| | | DeleteButton, |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | | import EmptyData from "../components/EmptyData"; |
| | | import MyCreateButton from "../components/MyCreateButton"; |
| | | import MyExportButton from '../components/MyExportButton'; |
| | | import PageDrawer from "../components/PageDrawer"; |
| | | import MyField from "../components/MyField"; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import * as Common from '@/utils/common'; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | | height: '.9em' |
| | | }, |
| | | '& .RaDatagrid-row': { |
| | | cursor: 'auto' |
| | | }, |
| | | '& .column-name': { |
| | | }, |
| | | '& .opt': { |
| | | width: 200 |
| | | }, |
| | | })); |
| | | |
| | | const filters = [ |
| | | <DateInput label='common.time.after' source="timeStart" alwaysOn />, |
| | | <DateInput label='common.time.before' source="timeEnd" alwaysOn />, |
| | | |
| | | |
| | | ] |
| | | |
| | | const RegionCountList = () => { |
| | | const translate = useTranslate(); |
| | | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | |
| | | return ( |
| | | <Box display="flex"> |
| | | <List |
| | | sx={{ |
| | | flexGrow: 1, |
| | | transition: (theme) => |
| | | theme.transitions.create(['all'], { |
| | | duration: theme.transitions.duration.enteringScreen, |
| | | }), |
| | | marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.regionCount"} |
| | | filters={filters} |
| | | sort={{ field: "", order: "" }} |
| | | actions={( |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | | <MyExportButton /> |
| | | </TopToolbar> |
| | | )} |
| | | perPage={DEFAULT_PAGE_SIZE} |
| | | > |
| | | <StyledDatagrid |
| | | preferenceKey='regionCount' |
| | | bulkActionButtons={false} |
| | | rowClick={false} |
| | | expand={false} |
| | | expandSingle={true} |
| | | omit={['id']} |
| | | > |
| | | <TextField source="id" sortable={false}/> |
| | | <TextField source="region" label="table.field.regionCount.region" sortable={false}/> |
| | | <TextField source="createTime" label="table.field.regionCount.createTime" sortable={false}/> |
| | | <NumberField source="waitTime" label="table.field.regionCount.waitTime" sortable={false}/> |
| | | <NumberField source="exeTime" label="table.field.regionCount.exeTime" sortable={false}/> |
| | | <NumberField source="taskNum" label="table.field.regionCount.taskNum" sortable={false}/> |
| | | <NumberField source="errorTime" label="table.field.regionCount.errorTime" sortable={false}/> |
| | | <NumberField source="chargeTime" label="table.field.regionCount.chargeTime" sortable={false}/> |
| | | |
| | | </StyledDatagrid> |
| | | </List> |
| | | |
| | | </Box> |
| | | ) |
| | | } |
| | | |
| | | export default RegionCountList; |
New file |
| | |
| | | import React, { useState, useRef, useEffect, useMemo } from "react"; |
| | | import { |
| | | ListGuesser, |
| | | EditGuesser, |
| | | ShowGuesser, |
| | | } from "react-admin"; |
| | | |
| | | import RegionCountList from "./RegionCountList"; |
| | | |
| | | export default { |
| | | list: RegionCountList, |
| | | show: ShowGuesser, |
| | | recordRepresentation: (record) => { |
| | | return `${record.id}` |
| | | } |
| | | }; |
New file |
| | |
| | | import React, { useState, useRef, useEffect, useMemo, useCallback } from "react"; |
| | | import { useNavigate } from 'react-router-dom'; |
| | | import { |
| | | List, |
| | | DatagridConfigurable, |
| | | SearchInput, |
| | | TopToolbar, |
| | | SelectColumnsButton, |
| | | EditButton, |
| | | FilterButton, |
| | | CreateButton, |
| | | ExportButton, |
| | | BulkDeleteButton, |
| | | WrapperField, |
| | | useRecordContext, |
| | | useTranslate, |
| | | useNotify, |
| | | useListContext, |
| | | FunctionField, |
| | | TextField, |
| | | NumberField, |
| | | DateField, |
| | | BooleanField, |
| | | ReferenceField, |
| | | TextInput, |
| | | DateTimeInput, |
| | | DateInput, |
| | | SelectInput, |
| | | NumberInput, |
| | | ReferenceInput, |
| | | ReferenceArrayInput, |
| | | AutocompleteInput, |
| | | DeleteButton, |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | | import EmptyData from "../components/EmptyData"; |
| | | import MyCreateButton from "../components/MyCreateButton"; |
| | | import MyExportButton from '../components/MyExportButton'; |
| | | import PageDrawer from "../components/PageDrawer"; |
| | | import MyField from "../components/MyField"; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import * as Common from '@/utils/common'; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | | height: '.9em' |
| | | }, |
| | | '& .RaDatagrid-row': { |
| | | cursor: 'auto' |
| | | }, |
| | | '& .column-name': { |
| | | }, |
| | | '& .opt': { |
| | | width: 200 |
| | | }, |
| | | })); |
| | | |
| | | const filters = [ |
| | | <DateInput label='common.time.after' source="timeStart" alwaysOn />, |
| | | <DateInput label='common.time.before' source="timeEnd" alwaysOn />, |
| | | |
| | | ] |
| | | |
| | | const TaskCountList = () => { |
| | | const translate = useTranslate(); |
| | | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | |
| | | return ( |
| | | <Box display="flex"> |
| | | <List |
| | | sx={{ |
| | | flexGrow: 1, |
| | | transition: (theme) => |
| | | theme.transitions.create(['all'], { |
| | | duration: theme.transitions.duration.enteringScreen, |
| | | }), |
| | | marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.taskCount"} |
| | | filters={filters} |
| | | sort={{ field: "", order: "" }} |
| | | actions={( |
| | | <TopToolbar> |
| | | <MyExportButton /> |
| | | </TopToolbar> |
| | | )} |
| | | perPage={DEFAULT_PAGE_SIZE} |
| | | > |
| | | <StyledDatagrid |
| | | preferenceKey='taskCount' |
| | | bulkActionButtons={false} |
| | | rowClick={false} |
| | | expand={false} |
| | | expandSingle={true} |
| | | omit={['id']} |
| | | > |
| | | <TextField source="id" sortable={false} /> |
| | | <TextField source="agvNo" label="table.field.taskCount.agvNo" sortable={false}/> |
| | | <TextField source="createTime" label="table.field.taskCount.createTime" sortable={false}/> |
| | | <TextField source="type" label="table.field.taskCount.type" sortable={false}/> |
| | | <NumberField source="count" label="table.field.taskCount.count" sortable={false}/> |
| | | |
| | | </StyledDatagrid> |
| | | </List> |
| | | |
| | | </Box> |
| | | ) |
| | | } |
| | | |
| | | export default TaskCountList; |
New file |
| | |
| | | import React, { useState, useRef, useEffect, useMemo } from "react"; |
| | | import { |
| | | ListGuesser, |
| | | EditGuesser, |
| | | ShowGuesser, |
| | | } from "react-admin"; |
| | | |
| | | import TaskCountList from "./TaskCountList"; |
| | | |
| | | export default { |
| | | list: TaskCountList, |
| | | show: ShowGuesser, |
| | | recordRepresentation: (record) => { |
| | | return `${record.agvNo}` |
| | | } |
| | | }; |
| | |
| | | generator.frontendPrefixPath = "zy-acs-flow/"; |
| | | |
| | | generator.sqlOsType = SqlOsType.MYSQL; |
| | | generator.url="localhost:3306/react_admin_dev"; |
| | | generator.url="localhost:3306/jbly"; |
| | | generator.username="root"; |
| | | generator.password="xltys1995"; |
| | | // generator.url="47.97.1.152:51433;databasename=jkasrs"; |
| | | // generator.username="sa"; |
| | | // generator.password="Zoneyung@zy56$"; |
| | | |
| | | generator.table="man_map"; |
| | | generator.table="view_region_count"; |
| | | generator.tableDesc="Map"; |
| | | generator.packagePath="com.zy.acs.manager.manager"; |
| | | |
| | |
| | | import org.apache.poi.ss.usermodel.Row; |
| | | import org.apache.poi.ss.usermodel.Sheet; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | |
| | | |
| | | |
| | | |
| | | public static <T> Workbook createXlsx(List<T> list, Class<T> clz) { |
| | | //HSSFWorkbook workbook = new HSSFWorkbook(); |
| | | XSSFWorkbook workbook =new XSSFWorkbook(); |
| | | Sheet sheet = workbook.createSheet(clz.getSimpleName()); |
| | | |
| | | Row header = sheet.createRow(0); |
| | | Field[] fields = Cools.getAllFields(clz); |
| | | int headerIdx = 0; |
| | | for (Field field : fields) { |
| | | if (Modifier.isFinal(field.getModifiers()) |
| | | || Modifier.isStatic(field.getModifiers()) |
| | | || Modifier.isTransient(field.getModifiers())) { |
| | | continue; |
| | | } |
| | | String memo = "Undefined"; |
| | | if (field.isAnnotationPresent(ApiModelProperty.class)) { |
| | | memo = field.getAnnotation(ApiModelProperty.class).value(); |
| | | } |
| | | header.createCell(headerIdx).setCellValue(memo); |
| | | headerIdx++; |
| | | } |
| | | |
| | | int rowIndex = 1; |
| | | for (T t : list) { |
| | | Row row = sheet.createRow(rowIndex++); |
| | | |
| | | int cellIndex = 0; |
| | | for (Field field : fields) { |
| | | if (Modifier.isFinal(field.getModifiers()) |
| | | || Modifier.isStatic(field.getModifiers()) |
| | | || Modifier.isTransient(field.getModifiers())) { |
| | | continue; |
| | | } |
| | | |
| | | field.setAccessible(true); // 此行很重要,特别是字段为private时 |
| | | Object value = null; |
| | | try { |
| | | value = field.get(t); |
| | | } catch (IllegalAccessException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | if (value != null) { |
| | | if (value instanceof Date) { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | row.createCell(cellIndex).setCellValue(sdf.format((Date) value)); |
| | | } else { |
| | | row.createCell(cellIndex).setCellValue(value.toString()); |
| | | } |
| | | } |
| | | cellIndex++; |
| | | } |
| | | } |
| | | |
| | | for (int i = 0; i <= fields.length; i++) { |
| | | sheet.autoSizeColumn(i); |
| | | } |
| | | |
| | | return workbook; |
| | | } |
| | | |
| | | } |
| | |
| | | List<AgvDuration> agvDurations = agvDurationService.listUnFinish(); |
| | | for (AgvDuration agvDuration : agvDurations) { |
| | | Task task = taskService.getById(agvDuration.getTaskNo()); |
| | | if (task == null) { |
| | | continue; |
| | | } |
| | | if (task.getTaskSts() == TaskStsType.COMPLETE.val()) { |
| | | AgvDetail agvDetail = agvDetailService.selectByAgvId(agvDuration.getAgvId()); |
| | | if (agvDetail.getAgvStatus() != AgvStatusType.CHARGE) { |
New file |
| | |
| | | package com.zy.acs.manager.manager.controller; |
| | | |
| | | import com.zy.acs.framework.common.R; |
| | | import com.zy.acs.manager.common.domain.BaseParam; |
| | | import com.zy.acs.manager.common.domain.PageParam; |
| | | import com.zy.acs.manager.common.utils.ExcelUtil; |
| | | import com.zy.acs.manager.manager.entity.FaultCount; |
| | | import com.zy.acs.manager.manager.service.FaultCountService; |
| | | import com.zy.acs.manager.system.controller.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/api") |
| | | public class FaultCountController extends BaseController { |
| | | |
| | | @Autowired |
| | | private FaultCountService faultCountService; |
| | | |
| | | @PreAuthorize("hasAuthority('manager:faultCount:list')") |
| | | @PostMapping("/faultCount/page") |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<FaultCount, BaseParam> pageParam = new PageParam<>(baseParam, FaultCount.class); |
| | | return R.ok().add(faultCountService.page(pageParam, pageParam.buildWrapper(true))); |
| | | } |
| | | |
| | | |
| | | @PreAuthorize("hasAuthority('manager:faultCount:list')") |
| | | @PostMapping("/faultCount/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<FaultCount, BaseParam> pageParam = new PageParam<>(baseParam, FaultCount.class); |
| | | ExcelUtil.build(ExcelUtil.createXlsx(faultCountService.page(pageParam, pageParam.buildWrapper(true)).getRecords(), FaultCount.class), response); |
| | | |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.acs.manager.manager.controller; |
| | | |
| | | import com.zy.acs.framework.common.R; |
| | | import com.zy.acs.manager.common.domain.BaseParam; |
| | | import com.zy.acs.manager.common.domain.PageParam; |
| | | import com.zy.acs.manager.common.utils.ExcelUtil; |
| | | import com.zy.acs.manager.manager.entity.RegionCount; |
| | | import com.zy.acs.manager.manager.entity.TaskCount; |
| | | import com.zy.acs.manager.manager.service.RegionCountService; |
| | | import com.zy.acs.manager.system.controller.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Arrays; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/api") |
| | | public class RegionCountController extends BaseController { |
| | | |
| | | @Autowired |
| | | private RegionCountService regionCountService; |
| | | |
| | | @PreAuthorize("hasAuthority('manager:regionCount:list')") |
| | | @PostMapping("/regionCount/page") |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<RegionCount, BaseParam> pageParam = new PageParam<>(baseParam, RegionCount.class); |
| | | return R.ok().add(regionCountService.page(pageParam, pageParam.buildWrapper(true))); |
| | | } |
| | | |
| | | |
| | | @PreAuthorize("hasAuthority('manager:regionCount:list')") |
| | | @PostMapping("/regionCount/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<RegionCount, BaseParam> pageParam = new PageParam<>(baseParam, RegionCount.class); |
| | | ExcelUtil.build(ExcelUtil.createXlsx(regionCountService.page(pageParam, pageParam.buildWrapper(true)).getRecords(), RegionCount.class), response); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.acs.manager.manager.controller; |
| | | |
| | | import com.zy.acs.framework.common.R; |
| | | import com.zy.acs.manager.common.domain.BaseParam; |
| | | import com.zy.acs.manager.common.domain.PageParam; |
| | | import com.zy.acs.manager.common.utils.ExcelUtil; |
| | | import com.zy.acs.manager.manager.entity.TaskCount; |
| | | import com.zy.acs.manager.manager.service.TaskCountService; |
| | | import com.zy.acs.manager.system.controller.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/api") |
| | | public class TaskCountController extends BaseController { |
| | | |
| | | @Autowired |
| | | private TaskCountService taskCountService; |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskCount:list')") |
| | | @PostMapping("/taskCount/page") |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<TaskCount, BaseParam> pageParam = new PageParam<>(baseParam, TaskCount.class); |
| | | return R.ok().add(taskCountService.page(pageParam, pageParam.buildWrapper(true))); |
| | | } |
| | | |
| | | |
| | | @PreAuthorize("hasAuthority('manager:taskCount:list')") |
| | | @PostMapping("/taskCount/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<TaskCount, BaseParam> pageParam = new PageParam<>(baseParam, TaskCount.class); |
| | | ExcelUtil.build(ExcelUtil.createXlsx(taskCountService.page(pageParam, pageParam.buildWrapper(true)).getRecords(), TaskCount.class), response); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.acs.manager.manager.entity; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("view_fault_count") |
| | | public class FaultCount implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value= "编号") |
| | | private String id; |
| | | |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @ApiModelProperty(value= "编号") |
| | | private String agvNo; |
| | | |
| | | @ApiModelProperty(value= "日期") |
| | | private String createTime; |
| | | |
| | | @ApiModelProperty(value= "区域") |
| | | private String region; |
| | | |
| | | @ApiModelProperty(value= "故障时长") |
| | | private Double errorTime; |
| | | |
| | | public FaultCount() {} |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.acs.manager.manager.entity; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @TableName("view_region_count") |
| | | public class RegionCount implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "区域") |
| | | private String region; |
| | | |
| | | @ApiModelProperty(value = "日期") |
| | | private String createTime; |
| | | |
| | | @ApiModelProperty(value = "等待时长") |
| | | private Double waitTime; |
| | | |
| | | @ApiModelProperty(value = "执行时长") |
| | | private Double exeTime; |
| | | |
| | | @ApiModelProperty(value = "任务数量") |
| | | private Long taskNum; |
| | | |
| | | @ApiModelProperty(value = "故障时长") |
| | | private Double errorTime; |
| | | |
| | | @ApiModelProperty(value = "充电时长") |
| | | private Long chargeTime; |
| | | |
| | | public RegionCount() { |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.acs.manager.manager.entity; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("view_task_count") |
| | | public class TaskCount implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value= "编号") |
| | | private String id; |
| | | |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @ApiModelProperty(value= "编号") |
| | | private String agvNo; |
| | | |
| | | @ApiModelProperty(value= "日期") |
| | | private String createTime; |
| | | |
| | | @ApiModelProperty(value= "类型") |
| | | private String type; |
| | | |
| | | @ApiModelProperty(value= "数量") |
| | | private Long count; |
| | | |
| | | public TaskCount() {} |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.acs.manager.manager.entity.view; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @TableName("view_fault_count") |
| | | public class ViewFaultCount implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @ApiModelProperty(value = "编号") |
| | | private String id; |
| | | /** |
| | | * 小车编号 |
| | | */ |
| | | @ApiModelProperty(value = "小车编号") |
| | | private String agvNo; |
| | | |
| | | /** |
| | | * 日期 |
| | | */ |
| | | @ApiModelProperty(value = "日期") |
| | | private String date; |
| | | |
| | | |
| | | /** |
| | | * 等待时长 |
| | | */ |
| | | @ApiModelProperty(value = "等待时长") |
| | | private Integer waitTime; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.acs.manager.manager.entity.view; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @TableName("view_task_wait_time") |
| | | public class ViewRegion implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @ApiModelProperty(value = "编号") |
| | | private String id; |
| | | |
| | | /** |
| | | * 任务id |
| | | */ |
| | | @ApiModelProperty(value = "任务id") |
| | | private String region; |
| | | |
| | | /** |
| | | * 日期 |
| | | */ |
| | | @ApiModelProperty(value = "日期") |
| | | private String date; |
| | | /** |
| | | * 任务数 |
| | | */ |
| | | @ApiModelProperty(value = "任务数量") |
| | | private Integer taskNum; |
| | | /** |
| | | * 等待任务时间 |
| | | */ |
| | | @ApiModelProperty(value = "等待任务时间,单位秒") |
| | | private Integer waitTime; |
| | | /** |
| | | * 执行任务时间 |
| | | */ |
| | | @ApiModelProperty(value = "执行任务时间,单位秒") |
| | | private Integer exeTime; |
| | | |
| | | /** |
| | | * 执行时间 |
| | | */ |
| | | @ApiModelProperty(value = "执行时间,单位秒") |
| | | private Integer duration; |
| | | /** |
| | | * 异常时间 |
| | | */ |
| | | @ApiModelProperty(value = "异常时间,单位秒") |
| | | private Integer errorTime; |
| | | /** |
| | | * 充电时间 |
| | | */ |
| | | @ApiModelProperty(value = "充电时间,单位秒") |
| | | private Integer chargeTime; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.acs.manager.manager.entity.view; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @TableName("view_task_count") |
| | | public class ViewTaskCount implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @ApiModelProperty(value = "编号") |
| | | private String id; |
| | | /** |
| | | * 小车编号 |
| | | */ |
| | | @ApiModelProperty(value = "小车编号") |
| | | private String agvNo; |
| | | |
| | | /** |
| | | * 日期 |
| | | */ |
| | | @ApiModelProperty(value = "日期") |
| | | private String date; |
| | | |
| | | /** |
| | | * 类型 |
| | | */ |
| | | @ApiModelProperty(value = "类型") |
| | | private String type; |
| | | |
| | | /** |
| | | * 次数 |
| | | */ |
| | | @ApiModelProperty(value = "数量") |
| | | private Integer count; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.acs.manager.manager.mapper; |
| | | |
| | | import com.zy.acs.manager.manager.entity.FaultCount; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface FaultCountMapper extends BaseMapper<FaultCount> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.acs.manager.manager.mapper; |
| | | |
| | | import com.zy.acs.manager.manager.entity.RegionCount; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface RegionCountMapper extends BaseMapper<RegionCount> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.acs.manager.manager.mapper; |
| | | |
| | | import com.zy.acs.manager.manager.entity.TaskCount; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface TaskCountMapper extends BaseMapper<TaskCount> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.acs.manager.manager.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.acs.manager.manager.entity.FaultCount; |
| | | |
| | | public interface FaultCountService extends IService<FaultCount> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.acs.manager.manager.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.acs.manager.manager.entity.RegionCount; |
| | | |
| | | public interface RegionCountService extends IService<RegionCount> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.acs.manager.manager.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.acs.manager.manager.entity.TaskCount; |
| | | |
| | | public interface TaskCountService extends IService<TaskCount> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.acs.manager.manager.service.impl; |
| | | |
| | | import com.zy.acs.manager.manager.mapper.FaultCountMapper; |
| | | import com.zy.acs.manager.manager.entity.FaultCount; |
| | | import com.zy.acs.manager.manager.service.FaultCountService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("faultCountService") |
| | | public class FaultCountServiceImpl extends ServiceImpl<FaultCountMapper, FaultCount> implements FaultCountService { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.acs.manager.manager.service.impl; |
| | | |
| | | import com.zy.acs.manager.manager.mapper.RegionCountMapper; |
| | | import com.zy.acs.manager.manager.entity.RegionCount; |
| | | import com.zy.acs.manager.manager.service.RegionCountService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("regionCountService") |
| | | public class RegionCountServiceImpl extends ServiceImpl<RegionCountMapper, RegionCount> implements RegionCountService { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.acs.manager.manager.service.impl; |
| | | |
| | | import com.zy.acs.manager.manager.mapper.TaskCountMapper; |
| | | import com.zy.acs.manager.manager.entity.TaskCount; |
| | | import com.zy.acs.manager.manager.service.TaskCountService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("taskCountService") |
| | | public class TaskCountServiceImpl extends ServiceImpl<TaskCountMapper, TaskCount> implements TaskCountService { |
| | | |
| | | } |
| | |
| | | static-path-pattern: /** |
| | | datasource: |
| | | driver-class-name: com.mysql.jdbc.Driver |
| | | url: jdbc:mysql://10.10.10.200:3306/jbly?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai |
| | | url: jdbc:mysql://127.0.0.1:3306/jbly?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai |
| | | username: root |
| | | password: xltys1995 |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | |
| | | enabled: false |
| | | |
| | | redis: |
| | | host: 10.10.10.200 |
| | | host: 127.0.0.1 |
| | | password: xltys1995 |
| | | port: 6379 |
| | | max: 30 |
| | |
| | | |
| | | mybatis-plus: |
| | | mapper-locations: classpath:mapper/*/*.xml |
| | | # global-config: |
| | | # field-strategy: 0 |
| | | # global-config: |
| | | # field-strategy: 0 |
| | | configuration: |
| | | # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | map-underscore-to-camel-case: true |
| | | cache-enabled: true |
| | | global-config: |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.acs.manager.manager.mapper.FaultCountMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.acs.manager.manager.mapper.RegionCountMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.acs.manager.manager.mapper.TaskCountMapper"> |
| | | |
| | | </mapper> |