13693261870
2025-07-02 6708810c4de34dfb9513061432d656f91d56ee3a
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
package com.ruoyi.buss.service.impl;
 
import java.util.List;
 
import com.ruoyi.buss.domain.DsTaskList2;
import com.ruoyi.buss.domain.dto.TaskQueryParam;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.buss.mapper.DsTaskList2Mapper;
import com.ruoyi.buss.service.IDsTaskList2Service;
import com.ruoyi.common.core.text.Convert;
 
/**
 * 任务列表信息Service业务层处理
 * 
 * @author lx
 * @date 2025-03-14
 */
@Service
public class DsTaskList2ServiceImpl implements IDsTaskList2Service
{
    @Autowired
    private DsTaskList2Mapper dsTaskListMapper;
 
    /**
     * 查询任务列表信息
     * 
     * @param taskId 任务列表信息主键
     * @return 任务列表信息
     */
    @Override
    public List<DsTaskList2> selectDsTaskListByTaskId(Long taskId)
    {
        return dsTaskListMapper.selectDsTaskListByTaskId(taskId);
    }
 
    @Override
    public List<DsTaskList2> selectCurrentDsTaskListV2() {
        return dsTaskListMapper.selectCurrentDsTaskListV2();
    }
 
    @Override
    public List<DsTaskList2> selectCurrentDsTaskList() {
        return dsTaskListMapper.selectCurrentDsTaskList();
    }
 
    @Override
    public List<DsTaskList2> selectCurrentDsTaskListWithShipNo(String[] shipnos) {
        return dsTaskListMapper.selectCurrentDsTaskListWithShipNo(shipnos);
    }
 
    @Override
    public List<DsTaskList2> selectCurrentDsTaskListWithShipNoV2(String[] shipnos) {
        return dsTaskListMapper.selectCurrentDsTaskListWithShipNoV2(shipnos);
    }
 
    @Override
    public List<DsTaskList2> selectDsTaskListByPkids(List<Long> pkids) {
        return dsTaskListMapper.selectDsTaskListByPkids(pkids);
    }
 
    @Override
    public DsTaskList2 selectDsTaskListByPkid(Long pkid) {
        return dsTaskListMapper.selectDsTaskListByPKID(pkid);
    }
 
    @Override
    public List<DsTaskList2> selectDsTaskListByParam(TaskQueryParam param) {
        return dsTaskListMapper.selectDsTaskListByParam(param);
    }
 
    /**
     * 查询任务列表信息列表
     * 
     * @param dsTaskList2 任务列表信息
     * @return 任务列表信息
     */
    @Override
    public List<DsTaskList2> selectDsTaskListList(DsTaskList2 dsTaskList2)
    {
        return dsTaskListMapper.selectDsTaskListList(dsTaskList2);
    }
 
    /**
     * 新增任务列表信息
     * 
     * @param dsTaskList2 任务列表信息
     * @return 结果
     */
    @Override
    public int insertDsTaskList(DsTaskList2 dsTaskList2)
    {
        dsTaskList2.setCreateTime(DateUtils.getNowDate());
        return dsTaskListMapper.insertDsTaskList(dsTaskList2);
    }
 
    /**
     * 修改任务列表信息
     * 
     * @param dsTaskList2 任务列表信息
     * @return 结果
     */
    @Override
    public int updateDsTaskList(DsTaskList2 dsTaskList2)
    {
        dsTaskList2.setUpdateTime(DateUtils.getNowDate());
        return dsTaskListMapper.updateDsTaskList(dsTaskList2);
    }
 
    /**
     * 批量删除任务列表信息
     * 
     * @param taskIds 需要删除的任务列表信息主键
     * @return 结果
     */
    @Override
    public int deleteDsTaskListByTaskIds(String taskIds)
    {
        return dsTaskListMapper.deleteDsTaskListByTaskIds(Convert.toStrArray(taskIds));
    }
 
    /**
     * 删除任务列表信息信息
     * 
     * @param taskId 任务列表信息主键
     * @return 结果
     */
    @Override
    public int deleteDsTaskListByTaskId(Long taskId)
    {
        return dsTaskListMapper.deleteDsTaskListByTaskId(taskId);
    }
 
    /**
     * 根据任务ID和部门ID查询任务列表信息
     * @param taskId
     * @param deptId
     */
    public List<DsTaskList2> getDsTaskListByTaskIdAndDeptId(Long taskId, Long deptId)
    {
        DsTaskList2 dsTaskList2 = new DsTaskList2();
        dsTaskList2.setTaskId(taskId);
        dsTaskList2.setDeptId(deptId);
        return dsTaskListMapper.getDsTaskListByTaskIdAndDeptId(dsTaskList2);
    }
 
    /**
     *
     * @param deptId
     * @param taskId
     * @param berthId
     * @return
     */
    public List<DsTaskList2> getDsTaskListForSupplyPlan(Long deptId, Long taskId, Long berthId){
        return dsTaskListMapper.getDsTaskListForSupplyPlan(deptId, taskId, berthId);
    }
 
    /**
     * 根据任务ID和泊位IDs查询任务列表信息
     *
     * @param taskId
     * @param berthIds
     * @return
     */
    public List<DsTaskList2> selectDsTaskListListByTaskIdAndBerthds(Long taskId, String berthIds){
        return dsTaskListMapper.selectDsTaskListListByTaskIdAndBerthds(taskId, "(" + berthIds + ")");
    }
 
    @Override
    public int batchUpdateDsTaskList(List<DsTaskList2> dsTaskList2List) {
        int rows = 0;
        for (DsTaskList2 dsTaskList2 : dsTaskList2List) {
            dsTaskList2.setUpdateTime(DateUtils.getNowDate());
            rows += dsTaskListMapper.updateDsTaskList(dsTaskList2);
        }
        return rows;
    }
 
}