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 implements MmItemOutputService { @Autowired private MmItemOutputDao mmItemOutputDao; @Override public void saveMmItemOutput(List mmItemOutput) { mmItemOutputDao.insert(mmItemOutput); } @Override public void update(MmItemOutputEntity mmItemOutput) { mmItemOutputDao.updateById(mmItemOutput); } public void deleteBatch(String[] itemIds) { QueryWrapper queryWrapper = new QueryWrapper(); queryWrapper.in("itemid", itemIds); mmItemOutputDao.delete(queryWrapper); } @Override public List getByItemid(String itemid) { QueryWrapper queryWrapper = new QueryWrapper(); queryWrapper.eq("itemid", itemid); queryWrapper.orderByAsc("outputorder"); List list = mmItemOutputDao.selectList(queryWrapper); return list; } @Override public void deleteByItemId(String itemId) { QueryWrapper queryWrapper = new QueryWrapper(); queryWrapper.eq("itemid", itemId); mmItemOutputDao.delete(queryWrapper); } @Override public List queryList(Map params) { return mmItemOutputDao.queryList(params); } @Override public MmItemOutputVO getOutPutById(String outputid) { List list = mmItemOutputDao.getOutPutById(outputid); if (CollectionUtils.isEmpty(list)) { return null; } return list.get(0); } @Override public List getOutPutByItemId(String itemid) { return mmItemOutputDao.getOutPutByItemId(itemid); } @Override public List getOutPutByPointId(String pointid) { return mmItemOutputDao.getOutPutByPointId(pointid); } }