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;
|
}
|
|
}
|