自动化立体仓库 - WMS系统
#
whycq
2024-09-14 07df5b869de0db9b8471df48405683cb28214785
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.zy.asrs.task.handler;
 
import com.zy.asrs.entity.AgvWrkMast;
import com.zy.asrs.entity.WrkMastExecute;
import com.zy.asrs.service.AgvWrkMastService;
import com.zy.asrs.service.impl.WrkMastExecuteServiceImpl;
import com.zy.asrs.task.AbstractHandler;
import com.zy.asrs.task.core.ReturnT;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
 
import java.util.Date;
 
 
@Slf4j
@Service
@Transactional
public class AutoMoveCreateExecuteHandler extends AbstractHandler<String> {
 
    @Autowired
    private AgvWrkMastService agvWrkMastService;
    @Autowired
    private WrkMastExecuteServiceImpl wrkMastExecuteService;
 
    public ReturnT<String> start(AgvWrkMast agvWrkMast,WrkMastExecute wrkMastExecute) {//1-4
        try{
            if (wrkMastExecuteService.insert(wrkMastExecute)){
                agvWrkMast.setWrkSts(agvWrkMast.getWrkSts()+1);
                agvWrkMast.setModiTime(new Date());
                agvWrkMastService.updateById(agvWrkMast);
            }
        }catch (Exception e){
            log.error("搬运任务下发===》异常:"+e.getMessage());
        }
        return SUCCESS;
    }
 
}