zhuguifei
2026-03-10 2c1fd10c6fbabb8e9f0e9f07fe66fb36c008e883
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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);
    }
}