| | |
| | | > |
| | | <Box display="flex" flexDirection="row" alignItems="center" justifyContent='space-between'> |
| | | <PulseSignal |
| | | flag={true} |
| | | flag={record.online} |
| | | /> |
| | | <Typography variant="caption" > |
| | | vol: |
| | |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE } from '@/config/setting'; |
| | | import * as Common from '@/utils/common'; |
| | | import { ImageList } from "./GridList"; |
| | | |
| | | import { AgvListFilter } from "./AgvListFilter"; |
| | | |
| | | export const AgvGrid = () => { |
| | | const { identity } = useGetIdentity(); |
| | |
| | | |
| | | return ( |
| | | <Stack direction="row" component="div"> |
| | | <AgvListFilter /> |
| | | <Stack sx={{ width: '100%' }}> |
| | | <Title title={"menu.agv"} /> |
| | | <ListToolbar actions={( |
New file |
| | |
| | | import * as React from 'react'; |
| | | import { |
| | | FilterList, |
| | | FilterLiveSearch, |
| | | FilterListItem, |
| | | useTranslate, |
| | | } from 'react-admin'; |
| | | import { Box } from '@mui/material'; |
| | | import BusinessIcon from '@mui/icons-material/Business'; |
| | | import LocalShippingIcon from '@mui/icons-material/LocalShipping'; |
| | | import SupervisorAccountIcon from '@mui/icons-material/SupervisorAccount'; |
| | | |
| | | export const AgvListFilter = () => { |
| | | const translate = useTranslate(); |
| | | |
| | | return ( |
| | | <Box width="13em" minWidth="13em" order={-1} mr={2} mt={5}> |
| | | <FilterLiveSearch hiddenLabel source='uuid' label={translate('table.field.agv.uuid')} /> |
| | | |
| | | <FilterList label="Size" icon={<BusinessIcon />}> |
| | | </FilterList> |
| | | |
| | | <FilterList label="Sector" icon={<LocalShippingIcon />}> |
| | | </FilterList> |
| | | |
| | | </Box> |
| | | ); |
| | | }; |
| | |
| | | PageParam<Agv, BaseParam> pageParam = new PageParam<>(baseParam, Agv.class); |
| | | PageResult<AgvResult> page = agvService.pageRel(pageParam); |
| | | for (AgvResult result : page.getRecords()) { |
| | | result.sync(agvDetailService.selectByAgvId(result.getId()), codeService, taskService); |
| | | result.sync(agvDetailService.selectByAgvId(result.getId()), codeService, taskService, agvService); |
| | | } |
| | | return R.ok().add(page); |
| | | } |
| | |
| | | import com.zy.acs.manager.manager.entity.AgvDetail; |
| | | import com.zy.acs.manager.manager.entity.Task; |
| | | import com.zy.acs.manager.manager.enums.TaskStsType; |
| | | import com.zy.acs.manager.manager.service.AgvService; |
| | | import com.zy.acs.manager.manager.service.CodeService; |
| | | import com.zy.acs.manager.manager.service.TaskService; |
| | | import lombok.Data; |
| | |
| | | |
| | | private String code = "-"; |
| | | |
| | | private Boolean online = Boolean.FALSE; |
| | | |
| | | private List<Long> taskIds = new ArrayList<>(); |
| | | |
| | | public void sync(Object obj, CodeService codeService, TaskService taskService) { |
| | | public void sync(Object obj, CodeService codeService, TaskService taskService, AgvService agvService) { |
| | | if (null == obj) return; |
| | | if (obj instanceof AgvDetail) { |
| | | AgvDetail agvDetail = (AgvDetail) obj; |
| | | this.setOnline(agvService.judgeOnline(agvDetail.getAgvId())); |
| | | this.setAgvStatus(agvDetail.getStatusDesc()); |
| | | if (null != agvDetail.getPos()) { |
| | | this.setPos(String.valueOf(agvDetail.getPos())); |
| | |
| | | <!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.AgvMapper"> |
| | | |
| | | <!-- 关联查询sql --> |
| | | <sql id="selectSql"> |
| | | SELECT a.* |
| | | FROM man_agv a |
| | | <where> |
| | | AND a.deleted = 0 |
| | | <if test="param.id != null"> |
| | | AND a.id = #{param.id} |
| | | </if> |
| | | <if test="param.uuid != null"> |
| | | AND a.uuid = #{param.uuid} |
| | | </if> |
| | | <if test="param.name != null"> |
| | | AND a.name = #{param.name} |
| | | </if> |
| | | <if test="param.status != null"> |
| | | AND a.status = #{param.status} |
| | | </if> |
| | | <if test="param.createTimeStart != null"> |
| | | AND a.create_time >= #{param.createTimeStart} |
| | | </if> |
| | | <if test="param.createTimeEnd != null"> |
| | | AND a.create_time <= #{param.createTimeEnd} |
| | | </if> |
| | | <if test="param.keywords != null"> |
| | | AND ( |
| | | a.ip LIKE CONCAT('%', #{param.keywords}, '%') |
| | | OR a.memo LIKE CONCAT('%', #{param.keywords}, '%') |
| | | ) |
| | | </if> |
| | | </where> |
| | | </sql> |
| | | |
| | | <select id="selectPageRel" resultType="com.zy.acs.manager.manager.controller.result.AgvResult"> |
| | | select |
| | | ma.*, |
| | |
| | | from man_agv ma |
| | | left join man_agv_detail mad on ma.id = mad.agv_id |
| | | where 1=1 |
| | | and ma.deleted = 0 |
| | | <if test="param.uuid != null"> |
| | | AND ma.uuid = #{param.uuid} |
| | | </if> |
| | | order by ma.uuid asc |
| | | </select> |
| | | |