| | |
| | | } |
| | | }) |
| | | |
| | | |
| | | |
| | | const ShuttleView = (props) => { |
| | | const intl = useIntl(); |
| | | const { styles } = useStyles(); |
| | | |
| | | const { data } = props; |
| | | const [loading, setLoading] = React.useState(false); |
| | | const [info, setInfo] = React.useState(null); |
| | | |
| | | useEffect(() => { |
| | | setLoading(true); |
| | | |
| | | setTimeout(() => { |
| | | |
| | | const fetchShuttleInfo = async (shuttleNo) => { |
| | | const res = await Http.doGet('/api/map/shuttle/info', { shuttleNo: shuttleNo }); |
| | | if (res?.data) { |
| | | setInfo(res.data); |
| | | } |
| | | setLoading(false); |
| | | }, 300) |
| | | } |
| | | fetchShuttleInfo(data.no); |
| | | }, [data]); |
| | | |
| | | return ( |
| | |
| | | [ |
| | | { |
| | | key: '1', |
| | | label: intl.formatMessage({ id: 'map.conveyor.no', defaultMessage: '穿梭车编号' }), |
| | | children: info?.shuttleNo, |
| | | }, |
| | | { |
| | | key: '1', |
| | | label: intl.formatMessage({ id: 'map.loc.no', defaultMessage: '库位号' }), |
| | | children: <Badge status="processing" text="Running" />, |
| | | }, |
| | |
| | | return R.ok().add(mapService.getShelfLocNoList(locNo)); |
| | | } |
| | | |
| | | // 穿梭车 -------------------------------------------------------- |
| | | @GetMapping("/shuttle/info") |
| | | public R shuttleInfo(@RequestParam String shuttleNo) { |
| | | return R.ok().add(mapService.getShuttleInfo(shuttleNo)); |
| | | } |
| | | |
| | | |
| | | // 输送线 - 库位 -------------------------------------------------------- |
| | | // @GetMapping("/conveyor/plc/list") |
New file |
| | |
| | | package com.zy.asrs.wcs.core.map.controller.result; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Created by vincent on 3/29/2024 |
| | | */ |
| | | @Data |
| | | public class ShuttleVo { |
| | | |
| | | private String shuttleNo; |
| | | |
| | | } |
| | |
| | | import com.zy.asrs.wcs.core.map.controller.param.MapDataParam; |
| | | import com.zy.asrs.wcs.core.map.controller.param.MapQueryParam; |
| | | import com.zy.asrs.wcs.core.map.controller.result.LocVo; |
| | | import com.zy.asrs.wcs.core.map.controller.result.ShuttleVo; |
| | | import com.zy.asrs.wcs.core.utils.Utils; |
| | | import com.zy.asrs.wcs.system.entity.Dict; |
| | | import com.zy.asrs.wcs.system.service.DictService; |
| | |
| | | return locVos; |
| | | } |
| | | |
| | | public ShuttleVo getShuttleInfo(String shuttleNo) { |
| | | ShuttleVo vo = new ShuttleVo(); |
| | | vo.setShuttleNo(shuttleNo); |
| | | |
| | | return vo; |
| | | } |
| | | |
| | | private String getMapKey(Integer floor) { |
| | | if (null != floor) { |
| | | return "map-" + floor; |