package com.whyc.service;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.whyc.mapper.DefectiveProductsHistoryMapper;
|
import com.whyc.pojo.DefectiveProducts;
|
import com.whyc.pojo.DefectiveProductsHistory;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
|
import java.util.Date;
|
|
@Service
|
public class DefectiveProductsHistoryService {
|
|
@Autowired(required = false)
|
private DefectiveProductsHistoryMapper mapper;
|
|
//记录处理过程
|
public void addHis(DefectiveProducts defective) {
|
DefectiveProductsHistory his=new DefectiveProductsHistory();
|
his.setDeftId(defective.getId());
|
his.setRecordTime(defective.getStartTime());
|
his.setBadProduct(defective.getBadProduct());
|
his.setConfirmStatus(defective.getConfirmStatus());
|
his.setNote(defective.getNote());
|
his.setReceiverIds(defective.getReceiverIds());
|
his.setReceiverNames(defective.getReceiverNames());
|
mapper.insert(his);
|
}
|
//记录处理记录
|
public void updateDefective(DefectiveProductsHistory defectiveHis) {
|
defectiveHis.setRecordTime(new Date());
|
mapper.insert(defectiveHis);
|
}
|
}
|