| | |
| | | package com.iailab.module.model.mcs.pre.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.iailab.framework.common.service.impl.BaseServiceImpl; |
| | | 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.mcs.pre.dto.MmItemOutputDTO; |
| | | import com.iailab.module.model.mdk.vo.MmItemOutputVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | * @author PanZhibao |
| | | * @date 2021年04月27日 9:22 |
| | | */ |
| | | @Service("mmItemOutputService") |
| | | public class MmItemOutputServiceImpl extends BaseServiceImpl<MmItemOutputDao, MmItemOutputEntity> implements MmItemOutputService { |
| | | @Service |
| | | public class MmItemOutputServiceImpl extends ServiceImpl<MmItemOutputDao, MmItemOutputEntity> implements MmItemOutputService { |
| | | |
| | | @Autowired |
| | | private MmItemOutputDao mmItemOutputDao; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void saveMmItemOutput(MmItemOutputEntity mmItemOutput) { |
| | | mmItemOutput.setId(UUID.randomUUID().toString()); |
| | | baseDao.insert(mmItemOutput); |
| | | mmItemOutputDao.insert(mmItemOutput); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void update(MmItemOutputEntity mmItemOutput) { |
| | | this.updateById(mmItemOutput); |
| | | mmItemOutputDao.updateById(mmItemOutput); |
| | | } |
| | | |
| | | public void deleteBatch(String[] itemIds) { |
| | | QueryWrapper<MmItemOutputEntity> queryWrapper = new QueryWrapper<MmItemOutputEntity>(); |
| | | QueryWrapper<MmItemOutputEntity> queryWrapper = new QueryWrapper(); |
| | | queryWrapper.in("itemid", itemIds); |
| | | baseDao.delete(queryWrapper); |
| | | mmItemOutputDao.delete(queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public MmItemOutputEntity getByItemid(String itemid) { |
| | | QueryWrapper<MmItemOutputEntity> queryWrapper = new QueryWrapper<MmItemOutputEntity>(); |
| | | QueryWrapper<MmItemOutputEntity> queryWrapper = new QueryWrapper(); |
| | | queryWrapper.eq("itemid", itemid); |
| | | List<MmItemOutputEntity> list = baseDao.selectList(queryWrapper); |
| | | List<MmItemOutputEntity> list = mmItemOutputDao.selectList(queryWrapper); |
| | | if (CollectionUtils.isEmpty(list)) { |
| | | return new MmItemOutputEntity(); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public List<MmItemOutputDTO> queryList(Map<String, Object> params) { |
| | | return baseDao.queryList(params); |
| | | return mmItemOutputDao.queryList(params); |
| | | } |
| | | |
| | | @Override |
| | | public MmItemOutputVO getOutPutById(String outputid) { |
| | | List<MmItemOutputVO> list = baseDao.getOutPutById(outputid); |
| | | List<MmItemOutputVO> list = mmItemOutputDao.getOutPutById(outputid); |
| | | if (CollectionUtils.isEmpty(list)) { |
| | | return null; |
| | | } |
| | |
| | | |
| | | @Override |
| | | public List<MmItemOutputVO> getOutPutByItemId(String itemid) { |
| | | return baseDao.getOutPutByItemId(itemid); |
| | | return mmItemOutputDao.getOutPutByItemId(itemid); |
| | | } |
| | | |
| | | @Override |
| | | public List<MmItemOutputVO> getOutPutByPointId(String pointid) { |
| | | return baseDao.getOutPutByPointId(pointid); |
| | | return mmItemOutputDao.getOutPutByPointId(pointid); |
| | | } |
| | | } |