#
vincentlu
2025-04-01 b3555b47e4977e88f5a32e41e103092746357d8f
#
4个文件已修改
59 ■■■■ 已修改文件
version/db/jbly/20250401/dual.sql 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-manager/src/main/java/com/zy/acs/manager/manager/enums/StaStsType.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-manager/src/main/java/com/zy/acs/manager/manager/service/impl/LocServiceImpl.java 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
version/db/jbly/20250401/dual.sql
@@ -1,7 +1,7 @@
INSERT INTO man_sta_sts (id, uuid, name, status, deleted, tenant_id, create_by, create_time, update_by, update_time, memo) VALUES (15, 'IDLE', '空闲', 1, 0, 2, 41, '2023-06-09 02:11:08', 41, '2023-06-09 02:11:38', '');
INSERT INTO man_sta_sts (id, uuid, name, status, deleted, tenant_id, create_by, create_time, update_by, update_time, memo) VALUES (15, 'IDLE', '无货', 1, 0, 2, 41, '2023-06-09 02:11:08', 41, '2023-06-09 02:11:38', '');
INSERT INTO man_sta_sts (id, uuid, name, status, deleted, tenant_id, create_by, create_time, update_by, update_time, memo) VALUES (16, 'STOCK', '有货', 1, 0, 2, 41, '2023-06-09 02:11:20', 41, '2023-06-18 15:20:31', '');
INSERT INTO man_sta_sts (id, uuid, name, status, deleted, tenant_id, create_by, create_time, update_by, update_time, memo) VALUES (17, 'PAKIN', '放货预约', 1, 0, null, 41, '2023-06-18 15:20:58', 41, '2023-06-18 15:20:58', '');
INSERT INTO man_sta_sts (id, uuid, name, status, deleted, tenant_id, create_by, create_time, update_by, update_time, memo) VALUES (18, 'PAKOUT', '取货预约', 1, 0, null, 41, '2023-06-18 15:21:08', 41, '2023-06-18 15:21:08', '');
INSERT INTO man_sta_sts (id, uuid, name, status, deleted, tenant_id, create_by, create_time, update_by, update_time, memo) VALUES (17, 'READY_RELEASE', '放货预约', 1, 0, null, 41, '2023-06-18 15:20:58', 41, '2023-06-18 15:20:58', '');
INSERT INTO man_sta_sts (id, uuid, name, status, deleted, tenant_id, create_by, create_time, update_by, update_time, memo) VALUES (18, 'READY_TAKE', '取货预约', 1, 0, null, 41, '2023-06-18 15:21:08', 41, '2023-06-18 15:21:08', '');
INSERT INTO man_sta_sts (id, uuid, name, status, deleted, tenant_id, create_by, create_time, update_by, update_time, memo) VALUES (19, 'DISABLED', '禁用', 1, 0, null, 41, '2023-06-18 15:21:29', 41, '2023-06-18 15:21:29', '');
INSERT INTO man_sta_sts (id, uuid, name, status, deleted, tenant_id, create_by, create_time, update_by, update_time, memo) VALUES (20, 'OTHER', '其他', 1, 0, null, 41, '2023-06-21 21:17:06', 41, '2023-06-21 21:17:06', '');
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java
@@ -179,7 +179,7 @@
                    if (!destSta.getStaSts().equals(StaStsType.IDLE.val())) {
                        throw new BusinessException("destSta:" + task.getDestSta$() + " is not in IDLE status");
                    }
                    destSta.setStaSts(StaStsType.PAKIN.val());
                    destSta.setStaSts(StaStsType.READY_RELEASE.val());
                    destSta.setUpdateTime(now);
                    if (!staService.updateById(destSta)) {
                        throw new BusinessException("destSta:" + task.getDestSta$() + " failed to update");
@@ -190,7 +190,7 @@
                    if (!oriSta.getStaSts().equals(StaStsType.STOCK.val())) {
                        throw new BusinessException("oriSta:" + task.getOriSta$() + " is not in STOCK status");
                    }
                    oriSta.setStaSts(StaStsType.PAKOUT.val());
                    oriSta.setStaSts(StaStsType.READY_TAKE.val());
                    oriSta.setUpdateTime(now);
                    if (!staService.updateById(oriSta)) {
                        throw new BusinessException("oriSta:" + task.getOriSta$() + " failed to update");
@@ -211,7 +211,7 @@
                    if (!oriSta.getStaSts().equals(StaStsType.STOCK.val())) {
                        throw new BusinessException("oriSta:" + task.getOriSta$() + " is not in STOCK status");
                    }
                    oriSta.setStaSts(StaStsType.PAKOUT.val());
                    oriSta.setStaSts(StaStsType.READY_TAKE.val());
                    oriSta.setUpdateTime(now);
                    if (!staService.updateById(oriSta)) {
                        throw new BusinessException("oriSta:" + task.getOriSta$() + " failed to update");
@@ -221,7 +221,7 @@
                    if (!destSta.getStaSts().equals(StaStsType.IDLE.val())) {
                        throw new BusinessException("destSta:" + task.getDestSta$() + " is not in IDLE status");
                    }
                    destSta.setStaSts(StaStsType.PAKIN.val());
                    destSta.setStaSts(StaStsType.READY_RELEASE.val());
                    destSta.setUpdateTime(now);
                    if (!staService.updateById(destSta)) {
                        throw new BusinessException("destSta:" + task.getDestSta$() + " failed to update");
zy-acs-manager/src/main/java/com/zy/acs/manager/manager/enums/StaStsType.java
@@ -12,8 +12,8 @@
    IDLE,
    STOCK,
    PAKIN,
    PAKOUT,
    READY_RELEASE,
    READY_TAKE,
    DISABLED,
    OTHER,
    ;
zy-acs-manager/src/main/java/com/zy/acs/manager/manager/service/impl/LocServiceImpl.java
@@ -6,11 +6,14 @@
import com.zy.acs.manager.manager.entity.Sta;
import com.zy.acs.manager.manager.entity.Task;
import com.zy.acs.manager.manager.enums.LocStsType;
import com.zy.acs.manager.manager.enums.StaStsType;
import com.zy.acs.manager.manager.enums.TaskStsType;
import com.zy.acs.manager.manager.enums.TaskTypeType;
import com.zy.acs.manager.manager.mapper.LocMapper;
import com.zy.acs.manager.manager.service.LocService;
import com.zy.acs.manager.manager.service.StaService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
@@ -21,6 +24,9 @@
@Slf4j
@Service("locService")
public class LocServiceImpl extends ServiceImpl<LocMapper, Loc> implements LocService {
    @Autowired
    private StaService staService;
    @Override
    public Loc selecatByLocNo(String locNo) {
@@ -80,8 +86,26 @@
                        log.error("Loc [{}] 库位修改状态失败", task.getOriLoc$());
                    }
                }
                destSta = staService.getById(task.getDestSta());
                if (destSta.getStaSts().equals(StaStsType.READY_RELEASE.val())) {
                    destSta.setStaSts(StaStsType.STOCK.val());
                    destSta.setUpdateTime(now);
                    if (!staService.updateById(destSta)) {
                        log.error("Sta [{}] 站点修改状态失败", task.getDestSta$());
                    }
                }
                break;
            case STA_TO_LOC:
                oriSta = staService.getById(task.getOriSta());
                if (oriSta.getStaSts().equals(StaStsType.READY_TAKE.val())) {
                    oriSta.setStaSts(StaStsType.IDLE.val());
                    oriSta.setUpdateTime(now);
                    if (!staService.updateById(oriSta)) {
                        log.error("Sta [{}] 站点修改状态失败", task.getOriSta$());
                    }
                }
                destLoc = this.getById(task.getDestLoc());
                if (destLoc.getLocSts().equals(LocStsType.PAKIN.val())) {
                    destLoc.setLocSts(LocStsType.STOCK.val());
@@ -92,6 +116,23 @@
                }
                break;
            case STA_TO_STA:
                oriSta = staService.getById(task.getOriSta());
                if (oriSta.getStaSts().equals(StaStsType.READY_TAKE.val())) {
                    oriSta.setStaSts(StaStsType.IDLE.val());
                    oriSta.setUpdateTime(now);
                    if (!staService.updateById(oriSta)) {
                        log.error("Sta [{}] 站点修改状态失败", task.getOriSta$());
                    }
                }
                destSta = staService.getById(task.getDestSta());
                if (destSta.getStaSts().equals(StaStsType.READY_RELEASE.val())) {
                    destSta.setStaSts(StaStsType.STOCK.val());
                    destSta.setUpdateTime(now);
                    if (!staService.updateById(destSta)) {
                        log.error("Sta [{}] 站点修改状态失败", task.getDestSta$());
                    }
                }
                break;
            case TO_CHARGE:
            case TO_STANDBY: