#
luxiaotao1123
2024-10-07 7548470ab9785f11369e0b7b435bf909f1414635
#
4个文件已修改
56 ■■■■■ 已修改文件
zy-acs-flow/src/i18n/en.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/i18n/zh.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/page/mission/MissionResend.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-manager/src/main/java/com/zy/acs/manager/manager/service/impl/MissionServiceImpl.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/i18n/en.js
@@ -66,6 +66,7 @@
            complete: 'Complete',
            deprecate: 'Deprecate',
            resend: 'RESEND',
            selected: 'selected',
        },
        msg: {
            confirm: {
zy-acs-flow/src/i18n/zh.js
@@ -66,6 +66,7 @@
            complete: '完成',
            deprecate: '废弃',
            resend: '重发',
            selected: '项选中',
        },
        msg: {
            confirm: {
zy-acs-flow/src/page/mission/MissionResend.jsx
@@ -273,7 +273,7 @@
                                variant="subtitle1"
                                component="div"
                            >
                                {selected.length} selected
                                {selected.length} {translate('common.action.selected')}
                            </Typography>
                        ) : (
                            <Typography
@@ -282,7 +282,7 @@
                                id="tableTitle"
                                component="div"
                            >
                                Actions
                                {translate('table.field.mission.actions')}
                            </Typography>
                        )}
                        {selected.length > 0 && (
zy-acs-manager/src/main/java/com/zy/acs/manager/manager/service/impl/MissionServiceImpl.java
@@ -2,15 +2,18 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.zy.acs.framework.common.Cools;
import com.zy.acs.manager.common.exception.BusinessException;
import com.zy.acs.manager.manager.controller.result.MissionVo;
import com.zy.acs.manager.manager.entity.*;
import com.zy.acs.manager.manager.enums.ActionStsType;
import com.zy.acs.manager.manager.enums.BusStsType;
import com.zy.acs.manager.manager.enums.SegmentStateType;
import com.zy.acs.manager.manager.enums.TaskStsType;
import com.zy.acs.manager.manager.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.*;
import java.util.stream.Collectors;
/**
@@ -117,7 +120,50 @@
        if (Cools.isEmpty(actionList)) {
            return Boolean.FALSE;
        }
        String actionGroupId = actionService.getById(actionList.get(0).getId()).getGroupId();
        actionService.updateStsByGroupId(actionGroupId, ActionStsType.EXPIRED.val());
        List<Action> newActionList = new ArrayList<>();
        Date now = new Date();
        for (Action item : actionList) {
            Action action = actionService.getById(item.getId());
            action.setActionSts(ActionStsType.PREPARE.val());
            action.setIoTime(now);
            action.setUpdateTime(now);
            newActionList.add(action);
        }
        int i = newActionList.size();
        for (Action action : newActionList) {
            action.setPriority(i);
            if (!actionService.save(action)) {
                throw new BusinessException(action.getName() + "动作更新失败");
            }
            i -= 1;
        }
        Set<Long> busIds = new HashSet<>();
        List<Long> taskIds = actionService.selectTaskIdsByGroupId(actionGroupId);
        for (Long taskId : taskIds) {
            Task task = taskService.getById(taskId);
            if (null != task) {
                task.setTaskSts(TaskStsType.ASSIGN.val());
                task.setUpdateTime(now);
                task.setIoTime(now);
                if (!taskService.updateById(task)) {
                    throw new BusinessException(task.getUuid() + "任务更新失败");
                }
                busIds.add(task.getBusId());
            }
        }
        for (Long busId : busIds) {
            Bus bus = busService.getById(busId);
            if (null != bus) {
                bus.setBusSts(BusStsType.PROGRESS.val());
                bus.setUpdateTime(now);
                if (!busService.updateById(bus)) {
                    throw new BusinessException(bus.getUuid() + "总线更新失败");
                }
            }
        }
        return Boolean.TRUE;
    }