zjj
4 天以前 83e3d34abd06c0256f61382c4c9cf89c4be109d8
#问题修复
13个文件已修改
121 ■■■■■ 已修改文件
rsf-admin/src/page/basicInfo/basStation/CrossZoneAreaField.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/api/controller/WcsController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/api/controller/params/TaskInParam.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/api/service/WcsService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/AgvServiceImpl.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/MobileServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/WcsServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/BasStationController.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/TaskController.java 53 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/manager/enums/StaUseStatusType.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/manager/enums/TaskType.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/manager/schedules/TaskSchedules.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/basicInfo/basStation/CrossZoneAreaField.jsx
@@ -36,10 +36,10 @@
    };
    React.useEffect(() => {
        if (record?.areaIds && record.areaIds.length > 0) {
        if (record?.areaIds && record.areaIds.length !== 0  && record.areaIds.length > 0) {
            fetchAreaNames();
        }
    }, [record]);
    }, [record]);
    if (loading) {
        return <CircularProgress size={20} />;
rsf-server/src/main/java/com/vincent/rsf/server/api/controller/WcsController.java
@@ -38,7 +38,7 @@
        if (Cools.isEmpty(param.getLocType1())){
            return R.error("高低检测信号不能为空");
        }
        InTaskMsgDto msgDto = wcsService.createInTask(param,getLoginUserId());
        InTaskMsgDto msgDto = wcsService.createInTask(param);
        return R.ok(msgDto);
@@ -56,7 +56,7 @@
        if (Cools.isEmpty(param.getBarcode())) {
            return R.error("条码不能为空");
        }
        if (param.getIoType().equals(TaskType.TASK_TYPE_AGV_IN.type)) {
        if (!param.getIoType().equals(TaskType.TASK_TYPE_IN.type)) {
            return R.error("入库类型有误");
        }
        wcsService.agvTaskPickUpComplete(param);
rsf-server/src/main/java/com/vincent/rsf/server/api/controller/params/TaskInParam.java
@@ -9,6 +9,7 @@
    private Integer sourceStaNo; //作业站点 or 来源站点
    private String barcode; //容器条码
    private Integer locType1; //库位类型
    private Long user;
//    private Integer locType2; //库位类型
//    private Integer locType3; //库位类型
}
rsf-server/src/main/java/com/vincent/rsf/server/api/service/WcsService.java
@@ -4,7 +4,7 @@
import com.vincent.rsf.server.api.controller.params.TaskInParam;
public interface WcsService {
    InTaskMsgDto createInTask(TaskInParam param, Long loginUserId);
    InTaskMsgDto createInTask(TaskInParam param);
    void agvTaskPickUpComplete(TaskInParam param);
}
rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/AgvServiceImpl.java
@@ -82,6 +82,7 @@
    @Override
    @Transactional(rollbackFor = Exception.class)
    public R AGVInTaskStart(Map<String, Object> params,Long loginUserId ) {
        String sta = params.get("sta").toString();
        String area = params.get("area").toString();
@@ -112,6 +113,13 @@
        taskService.generateAGVTasks(waitPakin,targetLoc,sta,loginUserId);
        basStation.setUseStatus(StaUseStatusType.TYPE_R.type);
        if (!basStationService.updateById(basStation)){
            throw new CoolException("更新站点状态失败");
        }
        return R.ok();
    }
rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/MobileServiceImpl.java
@@ -940,8 +940,8 @@
//        List<Short> asList = Arrays.asList(Short.valueOf(PakinIOStatus.PAKIN_IO_STATUS_DONE.val), Short.valueOf(PakinIOStatus.PAKIN_IO_STATUS_DONE.val));
        WaitPakin waitPakin = waitPakinService.getOne(new LambdaQueryWrapper<WaitPakin>()
                .eq(!Cools.isEmpty(params.get("barcode")),WaitPakin::getBarcode, params.get("barcode").toString())
                .eq(!Cools.isEmpty(params.get("code")),WaitPakin::getCode, params.get("code").toString())
                .eq(!Cools.isEmpty(params.get("barcode")),WaitPakin::getBarcode, params.get("barcode"))
                .eq(!Cools.isEmpty(params.get("code")),WaitPakin::getCode, params.get("code"))
                .eq(WaitPakin::getIoStatus, PakinIOStatus.PAKIN_IO_STATUS_DONE.val));
        if (Objects.isNull(waitPakin)) {
            return R.error("未找到该容器码的组托明细,请检查组托状态");
rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/WcsServiceImpl.java
@@ -83,7 +83,7 @@
    @Override
    @Transactional(rollbackFor = Exception.class)
    public InTaskMsgDto createInTask(TaskInParam param, Long loginUserId) {
    public InTaskMsgDto createInTask(TaskInParam param) {
        // 获取库位号
        InTaskMsgDto locNo = getLocNo(param);
@@ -98,7 +98,7 @@
        // 创建并保存任务
        Task task = createTask(ruleCode, locNo.getLocNo(), waitPakin.getBarcode(),
                deviceSite.getDeviceSite(), param.getSourceStaNo().toString(), loginUserId);
                deviceSite.getDeviceSite(), param.getSourceStaNo().toString(), param.getUser());
        // 更新库位状态
        updateLocStatus(task.getTargLoc(), waitPakin.getBarcode());
@@ -107,10 +107,10 @@
        List<WaitPakinItem> waitPakinItems = getWaitPakinItems(waitPakin.getId());
        // 创建并保存任务明细
        saveTaskItems(task.getId(), waitPakinItems, loginUserId);
        saveTaskItems(task.getId(), waitPakinItems, param.getUser());
        // 更新组托状态
        updateWaitPakinStatus(param.getBarcode(), loginUserId);
        updateWaitPakinStatus(param.getBarcode(), param.getUser());
        // 设置工作单号并返回
        locNo.setWorkNo(ruleCode);
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/BasStationController.java
@@ -33,13 +33,16 @@
        PageParam<BasStation, BaseParam> pageParam = new PageParam<>(baseParam, BasStation.class);
        PageParam<BasStation, BaseParam> page = basStationService.page(pageParam, pageParam.buildWrapper(true));
        for (BasStation station : page.getRecords()) {
            String content = station.getCrossZoneArea().substring(1, station.getCrossZoneArea().length() - 1);
            String[] parts = content.split(",");
            Long[] longArray = new Long[parts.length];
            for (int i = 0; i < parts.length; i++) {
                longArray[i] = Long.parseLong(parts[i].trim());
            if (!Cools.isEmpty(station.getCrossZoneArea())) {
                String content = station.getCrossZoneArea().substring(1, station.getCrossZoneArea().length() - 1);
                String[] parts = content.split(",");
                Long[] longArray = new Long[parts.length];
                for (int i = 0; i < parts.length; i++) {
                    longArray[i] = Long.parseLong(parts[i].trim());
                }
                station.setAreaIds(longArray);
            }
            station.setAreaIds(longArray);
        }
        return R.ok().add(page);
    }
@@ -85,6 +88,9 @@
        if (!Cools.isEmpty(serviceOne)) {
            return R.error(basStation.getStationName()+"站已被初始化");
        }
        if (null !=basStation.getAreaIds()){
            basStation.setCrossZoneArea(Arrays.toString(basStation.getAreaIds()));
        }
        if (!basStationService.save(basStation)) {
            return R.error("保存失败");
        }
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/TaskController.java
@@ -6,21 +6,15 @@
import com.vincent.rsf.framework.common.Cools;
import com.vincent.rsf.framework.common.R;
import com.vincent.rsf.framework.exception.CoolException;
import com.vincent.rsf.server.manager.enums.TaskStsType;
import com.vincent.rsf.server.manager.entity.*;
import com.vincent.rsf.server.manager.enums.*;
import com.vincent.rsf.server.common.utils.ExcelUtil;
import com.vincent.rsf.server.common.annotation.OperationLog;
import com.vincent.rsf.server.common.domain.BaseParam;
import com.vincent.rsf.server.common.domain.KeyValVo;
import com.vincent.rsf.server.common.domain.PageParam;
import com.vincent.rsf.server.manager.entity.Loc;
import com.vincent.rsf.server.manager.entity.Task;
import com.vincent.rsf.server.manager.entity.TaskItem;
import com.vincent.rsf.server.manager.entity.WaitPakin;
import com.vincent.rsf.server.manager.enums.PakinIOStatus;
import com.vincent.rsf.server.manager.service.LocService;
import com.vincent.rsf.server.manager.service.TaskItemService;
import com.vincent.rsf.server.manager.service.TaskService;
import com.vincent.rsf.server.manager.service.WaitPakinService;
import com.vincent.rsf.server.manager.service.*;
import com.vincent.rsf.server.manager.service.impl.BasStationServiceImpl;
import com.vincent.rsf.server.system.controller.BaseController;
import com.vincent.rsf.server.system.enums.LocStsType;
import io.swagger.annotations.ApiOperation;
@@ -46,6 +40,8 @@
    @Autowired
    private LocService locService;
    @Autowired
    private BasStationService basStationService;
    @PreAuthorize("hasAuthority('manager:task:list')")
    @PostMapping("/task/page")
@@ -120,7 +116,8 @@
            if (null != waitPakin) {
                waitPakin.setIoStatus(Short.valueOf(PakinIOStatus.PAKIN_IO_STATUS_DONE.val));
                if (!waitPakinService.updateById(waitPakin)) {
                    return R.error("更新组托状态失败");
                    throw new CoolException("更新组托状态失败!!");
                }
            }
            Loc loc = locService.getOne(new LambdaQueryWrapper<Loc>()
@@ -132,9 +129,41 @@
                loc.setUseStatus(LocStsType.LOC_STS_TYPE_O.type);
                if (!locService.updateById(loc)) {
                    return R.error("更新库位状态失败");
                    throw new CoolException("更新库位状态失败!!");
                }
            }
            if (task.getWarehType().equals(WarehType.WAREHOUSE_TYPE_AGV.id)){
                BasStation basStation = null;
                if (task.getTaskType().equals(TaskType.TASK_TYPE_IN.type)
                        || task.getTaskType().equals(TaskType.TASK_TYPE_EMPITY_IN.type)
                ){
                    basStation = basStationService.getOne(new LambdaQueryWrapper<BasStation>()
                            .eq(BasStation::getStationName, task.getOrgSite())
                            .eq(BasStation::getUseStatus, StaUseStatusType.TYPE_R.type)
                    );
                } else if (task.getTaskType().equals(TaskType.TASK_TYPE_OUT.type)
                        || task.getTaskType().equals(TaskType.TASK_TYPE_PICK_AGAIN_IN.type)
                        || task.getTaskType().equals(TaskType.TASK_TYPE_MERGE_OUT.type)
                        || task.getTaskType().equals(TaskType.TASK_TYPE_CHECK_OUT.type)
                        || task.getTaskType().equals(TaskType.TASK_TYPE_EMPITY_OUT.type)
                ) {
                    basStation = basStationService.getOne(new LambdaQueryWrapper<BasStation>()
                            .eq(BasStation::getStationName, task.getTargLoc())
                            .eq(BasStation::getUseStatus, StaUseStatusType.TYPE_R.type)
                    );
                }
                if (null == basStation) {
                    throw new CoolException("站点状态错误!!");
                }
                basStation.setUseStatus(StaUseStatusType.TYPE_F.type);
                if (!basStationService.updateById(basStation)){
                    throw new CoolException("更新站点状态失败!!");
                }
            }
        }
        if (!taskService.removeByIds(Arrays.asList(ids))) {
            return R.error("Delete Fail");
rsf-server/src/main/java/com/vincent/rsf/server/manager/enums/StaUseStatusType.java
@@ -4,6 +4,8 @@
    //订单类型
    TYPE_O("O", "空闲"),
    TYPE_F("F", "占用"),
    TYPE_S("S", "预约入站"),
    TYPE_R("R", "预约出站"),
    TYPE_X("X", "禁用"),
    ;
rsf-server/src/main/java/com/vincent/rsf/server/manager/enums/TaskType.java
@@ -10,15 +10,13 @@
public enum TaskType {
    TASK_TYPE_IN("1", "入库"),
    TASK_TYPE_FLAT_WAREHOUSE_IN("2", "平库上架"),
    TASK_TYPE_AGV_IN("3", "AGV入库"),
    TASK_TYPE_EMPITY_IN("10", "空板入库"),
    TASK_TYPE_LOC_MOVE("11", "库格移载"),
    TASK_TYPE_PICK_IN("53", "拣料再入库"),
    TASK_TYPE_MERGE_IN("54", "并板再入库"),
    TASK_TYPE_CHECK_IN("57", "盘点再入库"),
    TASK_TYPE_OUT("101", "出库"),
    TASK_TYPE_PICK_AGAIN_IN("103", "拣料入库"),
    TASK_TYPE_PICK_AGAIN_IN("103", "拣料出库"),
    TASK_TYPE_MERGE_OUT("104", "并板出库"),
    TASK_TYPE_CHECK_OUT("107", "盘点出库"),
    TASK_TYPE_EMPITY_OUT("110", "空板出库"),
rsf-server/src/main/java/com/vincent/rsf/server/manager/schedules/TaskSchedules.java
@@ -56,7 +56,7 @@
    * @time 2025/4/2 12:37
    */
//    @Scheduled(cron = "0 0/05 * * * ?  ")
    @Scheduled(cron = "0/15 * * * * ?")
    @Scheduled(cron = "0/3 * * * * ?")
    @Transactional(rollbackFor = Exception.class)
    public void completeInStock() throws Exception {
        List<Task> tasks = taskService.list(new LambdaQueryWrapper<Task>().eq(Task::getTaskStatus, TaskStsType.COMPLETE_IN.id));
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java
@@ -3,15 +3,12 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.vincent.rsf.framework.common.Cools;
import com.vincent.rsf.server.manager.enums.OrderType;
import com.vincent.rsf.server.manager.enums.TaskStsType;
import com.vincent.rsf.server.manager.enums.*;
import com.vincent.rsf.framework.common.R;
import com.vincent.rsf.framework.exception.CoolException;
import com.vincent.rsf.server.manager.enums.TaskType;
import com.vincent.rsf.server.api.utils.LocUtils;
import com.vincent.rsf.server.manager.controller.params.GenerateTaskParams;
import com.vincent.rsf.server.manager.entity.*;
import com.vincent.rsf.server.manager.enums.PakinIOStatus;
import com.vincent.rsf.server.manager.mapper.TaskMapper;
import com.vincent.rsf.server.manager.service.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -93,7 +90,8 @@
            Task task = new Task();
            task.setTaskCode(ruleCode)
                    .setTaskStatus(TaskStsType.GENERATE_IN.id.shortValue())
                    .setTaskType(TaskType.TASK_TYPE_AGV_IN.type.shortValue())
                    .setTaskType(TaskType.TASK_TYPE_IN.type.shortValue())
                    .setWarehType(WarehType.WAREHOUSE_TYPE_AGV.id)
                    .setTargLoc(targetLoc)
                    .setOrgSite(orgSta)
                    .setBarcode(pakin.getBarcode())
@@ -178,7 +176,8 @@
            Task task = new Task();
            task.setTaskCode(ruleCode)
                    .setTaskStatus(TaskStsType.COMPLETE_IN.id.shortValue())
                    .setTaskType(TaskType.TASK_TYPE_FLAT_WAREHOUSE_IN.type.shortValue())
                    .setTaskType(TaskType.TASK_TYPE_IN.type.shortValue())
                    .setWarehType(WarehType.WAREHOUSE_TYPE_PLAT.id)
                    .setTargLoc(targetLoc)
                    .setBarcode(pakin.getBarcode())
                    .setCreateBy(loginUserId)