whycxzp
2025-04-01 55ac1354c8030edda8586ad758f23cfe6a1909db
src/main/java/com/whyc/service/WmsService.java
@@ -4,6 +4,7 @@
import com.github.pagehelper.PageInfo;
import com.google.gson.reflect.TypeToken;
import com.whyc.dto.*;
import com.whyc.pojo.db_param.PageParam;
import com.whyc.pojo.db_wms.Task;
import com.whyc.util.HttpUtil;
import com.whyc.util.JsonUtil;
@@ -19,6 +20,9 @@
    @Autowired
    private TaskService taskService;
    @Autowired
    private PageParamService paramService;
    public Response getMaterialList() {
        String httpUrl = "http://192.168.10.133:8051"+"/api/Wms_material/get_all";
@@ -72,7 +76,6 @@
            taskService.add(task);
        }
        return response;
    }
@@ -113,6 +116,7 @@
        Task task = new Task();
        task.setTaskNo(taskDto.getTask_no());
        task.setTaskType(taskDto.getTask_type());
        //TODO 这个地方起始点的定义,运行过程中需要关注,以及编码对应的具体位置,需要他们提供
        task.setStartLocationCode(taskDto.getStart_location_code());
        task.setEndLocationCode(taskDto.getEnd_location_code());
@@ -133,7 +137,19 @@
        switch (status){
            case 1:
            case 11:
            case 21: task.setPickUpStartTime(statusTime);break;
            case 21: {
                String pallet = task.getPallets();
                if(pallet == null){
                    pallet = taskService.getByTaskNo(taskNo).getPallets();
                }
                //更新电池编号
                PageParam pageParam = new PageParam();
                pageParam.setId(3);
                pageParam.setValue(Integer.valueOf(pallet));
                paramService.updateById(pageParam);
                //更新任务时间
                task.setPickUpStartTime(statusTime);
            }break;
            case 2:
            case 12:
            case 22: task.setPickUpTime(statusTime);break;