package com.iailab.module.model.mcs.pre.service.impl;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.iailab.module.model.mcs.pre.dao.MmItemOutputDao;
|
import com.iailab.module.model.mcs.pre.dto.MmItemOutputDTO;
|
import com.iailab.module.model.mcs.pre.entity.MmItemOutputEntity;
|
import com.iailab.module.model.mcs.pre.service.MmItemOutputService;
|
import com.iailab.module.model.mdk.vo.MmItemOutputVO;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
import org.springframework.util.CollectionUtils;
|
|
import java.util.List;
|
import java.util.Map;
|
import java.util.UUID;
|
|
/**
|
* @author PanZhibao
|
* @date 2021年04月27日 9:22
|
*/
|
@Service
|
public class MmItemOutputServiceImpl extends ServiceImpl<MmItemOutputDao, MmItemOutputEntity> implements MmItemOutputService {
|
|
@Autowired
|
private MmItemOutputDao mmItemOutputDao;
|
|
@Override
|
public void saveMmItemOutput(List<MmItemOutputEntity> mmItemOutput) {
|
mmItemOutputDao.insert(mmItemOutput);
|
}
|
|
@Override
|
public void update(MmItemOutputEntity mmItemOutput) {
|
mmItemOutputDao.updateById(mmItemOutput);
|
}
|
|
public void deleteBatch(String[] itemIds) {
|
QueryWrapper<MmItemOutputEntity> queryWrapper = new QueryWrapper();
|
queryWrapper.in("itemid", itemIds);
|
mmItemOutputDao.delete(queryWrapper);
|
}
|
|
@Override
|
public List<MmItemOutputEntity> getByItemid(String itemid) {
|
QueryWrapper<MmItemOutputEntity> queryWrapper = new QueryWrapper();
|
queryWrapper.eq("itemid", itemid);
|
queryWrapper.orderByAsc("outputorder");
|
List<MmItemOutputEntity> list = mmItemOutputDao.selectList(queryWrapper);
|
return list;
|
}
|
|
@Override
|
public void deleteByItemId(String itemId) {
|
QueryWrapper<MmItemOutputEntity> queryWrapper = new QueryWrapper();
|
queryWrapper.eq("itemid", itemId);
|
mmItemOutputDao.delete(queryWrapper);
|
}
|
|
@Override
|
public List<MmItemOutputDTO> queryList(Map<String, Object> params) {
|
return mmItemOutputDao.queryList(params);
|
}
|
|
@Override
|
public MmItemOutputVO getOutPutById(String outputid) {
|
List<MmItemOutputVO> list = mmItemOutputDao.getOutPutById(outputid);
|
if (CollectionUtils.isEmpty(list)) {
|
return null;
|
}
|
return list.get(0);
|
}
|
|
@Override
|
public List<MmItemOutputVO> getOutPutByItemId(String itemid) {
|
return mmItemOutputDao.getOutPutByItemId(itemid);
|
}
|
|
@Override
|
public List<MmItemOutputVO> getOutPutByPointId(String pointid) {
|
return mmItemOutputDao.getOutPutByPointId(pointid);
|
}
|
}
|