#
vincentlu
8 天以前 321f8aeadd15c492c1e07876c95391c787eb27a0
#
3个文件已修改
54 ■■■■■ 已修改文件
zy-acs-flow/src/i18n/en.js 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/page/sta/StaList.jsx 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-manager/src/main/java/com/zy/acs/manager/manager/controller/StaController.java 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/i18n/en.js
@@ -276,7 +276,7 @@
            sta: {
                uuid: "uuid",
                zoneId: "zone",
                staNo: "staNo",
                staNo: "sta No.",
                name: "name",
                staType: "station type",
                code: "code",
@@ -327,7 +327,7 @@
            loc: {
                uuid: "uuid",
                zoneId: "zone",
                locNo: "loc no",
                locNo: "loc No.",
                name: "name",
                code: "code",
                compDirect: "code direct",
@@ -364,7 +364,7 @@
                mqttTopic: "mqtt topic",
            },
            agv: {
                uuid: "agv no",
                uuid: "agv No.",
                name: "name",
                ip: "ip",
                secret: "secret",
@@ -442,7 +442,7 @@
            },
            bus: {
                uuid: "uuid",
                busNo: "bus no",
                busNo: "bus No.",
                startTime: "start time",
                endTime: "end time",
                busSts: "bus status",
@@ -479,7 +479,7 @@
            },
            travel: {
                uuid: "uuid",
                travelId: "travel no",
                travelId: "travel No.",
                agvId: "agv",
                currSeg: "curr seg",
                taskContent: "tasks",
@@ -488,18 +488,18 @@
            },
            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",
zy-acs-flow/src/page/sta/StaList.jsx
@@ -114,7 +114,7 @@
                title={"menu.sta"}
                empty={<EmptyData onClick={() => { setCreateDialog(true) }} />}
                filters={filters}
                sort={{ field: "create_time", order: "desc" }}
                sort={{ field: "id", order: "asc" }}
                actions={(
                    <TopToolbar>
                        <FilterButton />
@@ -135,9 +135,12 @@
                    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}>
@@ -148,7 +151,7 @@
                    </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" />
@@ -161,9 +164,6 @@
                        <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">
zy-acs-manager/src/main/java/com/zy/acs/manager/manager/controller/StaController.java
@@ -4,11 +4,12 @@
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;
@@ -56,10 +57,16 @@
    @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");
        }
@@ -70,6 +77,15 @@
    @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)) {