| | |
| | | sta: { |
| | | uuid: "uuid", |
| | | zoneId: "zone", |
| | | staNo: "staNo", |
| | | staNo: "sta No.", |
| | | name: "name", |
| | | staType: "station type", |
| | | code: "code", |
| | |
| | | loc: { |
| | | uuid: "uuid", |
| | | zoneId: "zone", |
| | | locNo: "loc no", |
| | | locNo: "loc No.", |
| | | name: "name", |
| | | code: "code", |
| | | compDirect: "code direct", |
| | |
| | | mqttTopic: "mqtt topic", |
| | | }, |
| | | agv: { |
| | | uuid: "agv no", |
| | | uuid: "agv No.", |
| | | name: "name", |
| | | ip: "ip", |
| | | secret: "secret", |
| | |
| | | }, |
| | | bus: { |
| | | uuid: "uuid", |
| | | busNo: "bus no", |
| | | busNo: "bus No.", |
| | | startTime: "start time", |
| | | endTime: "end time", |
| | | busSts: "bus status", |
| | |
| | | }, |
| | | travel: { |
| | | uuid: "uuid", |
| | | travelId: "travel no", |
| | | travelId: "travel No.", |
| | | agvId: "agv", |
| | | currSeg: "curr seg", |
| | | taskContent: "tasks", |
| | |
| | | }, |
| | | segment: { |
| | | uuid: "uuid", |
| | | groupId: "group no", |
| | | groupId: "group No.", |
| | | travelId: "travel", |
| | | taskId: "task", |
| | | agvId: "agv", |
| | | serial: "serial no", |
| | | serial: "serial No.", |
| | | startNode: "start node", |
| | | endNode: "end node", |
| | | posType: "type", |
| | | backpack: "backpack", |
| | | algoTime: "algo time", |
| | | state: "state", |
| | | segDesc: "seg no", |
| | | segDesc: "seg No.", |
| | | }, |
| | | jam: { |
| | | uuid: "uuid", |
| | |
| | | title={"menu.sta"} |
| | | empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} |
| | | filters={filters} |
| | | sort={{ field: "create_time", order: "desc" }} |
| | | sort={{ field: "id", order: "asc" }} |
| | | actions={( |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | |
| | | omit={['id', 'uuid', 'name', 'zpallet', 'updateBy', 'createTime', 'createBy', 'statusBool', 'memo']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <ReferenceField source="zoneId" label="table.field.sta.zoneId" reference="zone" link={false} sortable={false}> |
| | | <TextField source="name" /> |
| | | </ReferenceField> |
| | | <TextField source="uuid" label="table.field.sta.uuid" /> |
| | | <TextField source="staNo" label="table.field.sta.staNo" /> |
| | | <ReferenceField source="zoneId" label="table.field.sta.zoneId" reference="zone" link={false} sortable={false}> |
| | | <ReferenceField source="staType" label="table.field.sta.staType" reference="staType" link={false} sortable={false}> |
| | | <TextField source="name" /> |
| | | </ReferenceField> |
| | | <ReferenceField source="code" label="table.field.sta.code" reference="code" link={false} sortable={false}> |
| | |
| | | </ReferenceField> |
| | | <TextField source="name" label="table.field.sta.name" /> |
| | | <NumberField source="capacity" label="table.field.sta.capacity" /> |
| | | <NumberField source="occCnt" label="table.field.sta.occCnt" /> |
| | | {/* <NumberField source="occCnt" label="table.field.sta.occCnt" /> */} |
| | | <NumberField source="rsvInCnt" label="table.field.sta.rsvInCnt" /> |
| | | <NumberField source="rsvOutCnt" label="table.field.sta.rsvOutCnt" /> |
| | | <NumberField source="offset" label="table.field.sta.offset" /> |
| | |
| | | <TextField source="nickname" /> |
| | | </ReferenceField> |
| | | <DateField source="updateTime" label="common.field.updateTime" showTime /> |
| | | <ReferenceField source="staType" label="table.field.sta.staType" reference="staType" link={false} sortable={false}> |
| | | <TextField source="name" /> |
| | | </ReferenceField> |
| | | <BooleanField source="statusBool" label="common.field.status" sortable={false} /> |
| | | <TextField source="memo" label="common.field.memo" sortable={false} /> |
| | | <WrapperField cellClassName="opt" label="common.field.opt"> |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.zy.acs.framework.common.Cools; |
| | | import com.zy.acs.framework.common.R; |
| | | import com.zy.acs.manager.common.utils.ExcelUtil; |
| | | import com.zy.acs.framework.exception.CoolException; |
| | | import com.zy.acs.manager.common.annotation.OperationLog; |
| | | import com.zy.acs.manager.common.domain.BaseParam; |
| | | import com.zy.acs.manager.common.domain.KeyValVo; |
| | | import com.zy.acs.manager.common.domain.PageParam; |
| | | import com.zy.acs.manager.common.utils.ExcelUtil; |
| | | import com.zy.acs.manager.manager.entity.Sta; |
| | | import com.zy.acs.manager.manager.service.StaService; |
| | | import com.zy.acs.manager.system.controller.BaseController; |
| | |
| | | @OperationLog("Create Sta") |
| | | @PostMapping("/sta/save") |
| | | public R save(@RequestBody Sta sta) { |
| | | sta.setCreateBy(getLoginUserId()); |
| | | sta.setCreateTime(new Date()); |
| | | sta.setUpdateBy(getLoginUserId()); |
| | | sta.setUpdateTime(new Date()); |
| | | if (staService.count(new LambdaQueryWrapper<Sta>() |
| | | .eq(Sta::getStaNo, sta.getStaNo())) > 0) { |
| | | return R.error("sta No. has already exist !"); |
| | | } |
| | | Long loginUserId = getLoginUserId(); |
| | | Date now = new Date(); |
| | | sta.setCreateBy(loginUserId); |
| | | sta.setCreateTime(now); |
| | | sta.setUpdateBy(loginUserId); |
| | | sta.setUpdateTime(now); |
| | | if (!staService.save(sta)) { |
| | | return R.error("Save Fail"); |
| | | } |
| | |
| | | @OperationLog("Update Sta") |
| | | @PostMapping("/sta/update") |
| | | public R update(@RequestBody Sta sta) { |
| | | // 唯一性校验:只有当 sta No. 非空时才校验(避免空值误判) |
| | | if (!Cools.isEmpty(sta.getStaNo())) { |
| | | boolean exists = staService.count(new LambdaQueryWrapper<Sta>() |
| | | .eq(Sta::getStaNo, sta.getStaNo()) |
| | | .ne(Sta::getId, sta.getId())) > 0; |
| | | if (exists) { |
| | | throw new CoolException("failed to update, because sta No. has already exist !"); |
| | | } |
| | | } |
| | | sta.setUpdateBy(getLoginUserId()); |
| | | sta.setUpdateTime(new Date()); |
| | | if (!staService.updateById(sta)) { |