云
2026-10-25 d54fbc9d4f8981fa0f7f613b33a28a8cd4f764ea
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
package cn.iocoder.yudao.module.mes.service.cal.plan;
 
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.mes.controller.admin.cal.plan.vo.MesCalPlanImportExcelVO;
import cn.iocoder.yudao.module.mes.controller.admin.cal.plan.vo.MesCalPlanImportRespVO;
import cn.iocoder.yudao.module.mes.controller.admin.cal.plan.vo.MesCalPlanPageReqVO;
import cn.iocoder.yudao.module.mes.controller.admin.cal.plan.vo.MesCalPlanSaveReqVO;
import cn.iocoder.yudao.module.mes.dal.dataobject.cal.plan.MesCalPlanDO;
import jakarta.validation.Valid;
 
import java.util.Collection;
import java.util.List;
import java.util.Map;
 
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap;
 
/**
 * MES 排班计划 Service 接口
 *
 * @author 超级管理员
 */
public interface MesCalPlanService {
 
    /**
     * 创建排班计划
     *
     * @param createReqVO 创建信息
     * @return 编号
     */
    Long createPlan(@Valid MesCalPlanSaveReqVO createReqVO);
 
    /**
     * 更新排班计划
     *
     * @param updateReqVO 更新信息
     */
    void updatePlan(@Valid MesCalPlanSaveReqVO updateReqVO);
 
    /**
     * 确认排班计划
     *
     * @param id 编号
     */
    void confirmPlan(Long id);
 
    /**
     * 删除排班计划
     *
     * @param id 编号
     */
    void deletePlan(Long id);
 
    /**
     * 校验排班计划为草稿状态(确认后不允许编辑)
     *
     * @param planId 计划编号
     * @return 排班计划
     */
    MesCalPlanDO validatePlanPrepare(Long planId);
 
    /**
     * 获得排班计划
     *
     * @param id 编号
     * @return 排班计划
     */
    MesCalPlanDO getPlan(Long id);
 
    /**
     * 获得排班计划列表
     *
     * @param ids 排班计划编号集合
     * @return 排班计划列表
     */
    List<MesCalPlanDO> getPlanList(Collection<Long> ids);
 
    /**
     * 获得排班计划 Map
     *
     * @param ids 排班计划编号集合
     * @return 排班计划 Map,key 为编号
     */
    default Map<Long, MesCalPlanDO> getPlanMap(Collection<Long> ids) {
        return convertMap(getPlanList(ids), MesCalPlanDO::getId);
    }
 
    /**
     * 获得排班计划分页
     *
     * @param pageReqVO 分页查询
     * @return 排班计划分页
     */
    PageResult<MesCalPlanDO> getPlanPage(MesCalPlanPageReqVO pageReqVO);
 
    /**
     * 批量导入排班计划
     *
     * @param importList    导入排班计划列表
     * @param updateSupport 是否支持更新
     * @return 导入结果
     */
    MesCalPlanImportRespVO importPlanList(List<MesCalPlanImportExcelVO> importList,
                                          boolean updateSupport);
 
}