1
zhang
2 天以前 2a6e27f1c0064690d6fc6ab137d64c02fc0742da
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java
@@ -288,7 +288,7 @@
        try {
            // valid -----------------------------------------------
            Agv agv = agvService.getById(agvId);
            if (!agvService.judgeEnable(agv.getId(), false)) {
            if (!agvService.judgeEnable(agv.getId(), false,  false)) {
                return;
            }
            if (!Cools.isEmpty(taskService.selectInSts(agvId, TaskStsType.ASSIGN, TaskStsType.PROGRESS))) {
@@ -529,13 +529,14 @@
    /**
     * 充电 回待机位任务
     * zc 新增了是否强制,强制说明由用户发起,小车在超过低电量就可以做移动充电去待机位
     */
    @Transactional(propagation = Propagation.REQUIRES_NEW) // although there is a Transactional here that the lock is isolated, but we can't join the caller's Transactional
    public boolean buildMinorTask(Long agvId, TaskTypeType taskType, String destination, Jam jam) {
    public boolean buildMinorTask(Long agvId, TaskTypeType taskType, String destination, Jam jam,boolean force) {
        if (Cools.isEmpty(agvId, taskType)) { return false; }
        try {
            String agvNo = agvService.getAgvNo(agvId);
            if (!agvService.judgeEnable(agvId)) {
            if (!agvService.judgeEnable(agvId,false, force)) {
                return false;
            }
            if (!Cools.isEmpty(taskService.selectInSts(agvId, TaskStsType.ASSIGN, TaskStsType.PROGRESS))) {
@@ -1213,6 +1214,13 @@
            if (Cools.isEmpty(actionList)) {
                return;
            }
            Long agvId = actionList.get(0).getAgvId();
            String agvNo = agvService.getAgvNo(agvId);
            if (!agvService.judgeOnline(agvId)) {
                return;
            }
            long actionIssuedSts = ActionStsType.ISSUED.val();
            for (Action action : actionList) {
                action.setActionSts(actionIssuedSts);
@@ -1239,7 +1247,6 @@
                }
            }
            String agvNo = agvService.getAgvNo(actionList.get(0).getAgvId());
            AgvAction agvAction = new AgvAction(agvNo, actionGroupId);
            for (Action action : actionList) {
                switch (Objects.requireNonNull(ActionTypeType.get(action.getActionTypeEl()))) {