package com.shlanbao.tzsc.pms.qm.outInspection.service.impl;
|
|
import java.util.List;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
|
import com.shlanbao.tzsc.base.dao.QmOutwardDefectItemDaoI;
|
import com.shlanbao.tzsc.base.mapping.QmOutwardDefectItem;
|
import com.shlanbao.tzsc.base.service.BaseService;
|
import com.shlanbao.tzsc.pms.qm.outInspection.service.OutInspectionServiceI;
|
|
@Service
|
public class OutInspectionServiceImpl extends BaseService implements OutInspectionServiceI {
|
@Autowired
|
private QmOutwardDefectItemDaoI outwardDefectItemDao;
|
@Override
|
public void saveOutInspections(List<QmOutwardDefectItem> outwardDefectItems) {
|
outwardDefectItemDao.batchInsert(outwardDefectItems, QmOutwardDefectItem.class);
|
}
|
@Override
|
public QmOutwardDefectItem findByCode(String code) {
|
List<QmOutwardDefectItem> ls=outwardDefectItemDao.query("from QmOutwardDefectItem o where o.del=0 and o.code=?", code);
|
if(ls!=null && ls.size()>0){
|
return ls.get(0);
|
}
|
return null;
|
}
|
@Override
|
public void saveOrUpdate(QmOutwardDefectItem outwardDefectItems) {
|
outwardDefectItemDao.saveOrUpdate(outwardDefectItems);
|
}
|
}
|