package market.Lms.FixedAssets.impl;

import java.text.SimpleDateFormat;
import java.util.Date;

import market.Com.pb.PbMethod;
import market.Lms.FixedAssets.mapper.LmsFixedAssetsScrapLineMapper;
import market.Lms.FixedAssets.service.LmsFixedAssetsScrapLineService;
import market.Lms.FixedAssets.vo.LmsFixedAssetsScrapLine;

import com.hnshituo.basic.service.impl.BaseServiceImpl;
import com.hnshituo.basic.spring.remoting.annotation.RemoteService;

@RemoteService(path="LmsFixedAssetsScrapLine")
public class LmsFixedAssetsScrapLineServiceImpl extends BaseServiceImpl<LmsFixedAssetsScrapLine,Object> implements LmsFixedAssetsScrapLineService{

	//新增
	public String doAdd(LmsFixedAssetsScrapLine line){
		String id = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date())+PbMethod.RandomCreate(3);
		line.setId(id);
		this.getMapper(LmsFixedAssetsScrapLineMapper.class).insert(line);
		return id;
	}

	//删除
	public void doDelete(LmsFixedAssetsScrapLine line){
		this.getMapper(LmsFixedAssetsScrapLineMapper.class).delete(line.getId());
	}

	//修改
	public void doUpdate(LmsFixedAssetsScrapLine line){
		this.getMapper(LmsFixedAssetsScrapLineMapper.class).update(line);
	}

	//查询
	public LmsFixedAssetsScrapLine doQuery(String lineNo){
		LmsFixedAssetsScrapLine line = new LmsFixedAssetsScrapLine();
		line = this.getMapper(LmsFixedAssetsScrapLineMapper.class).findById(lineNo);
		return line;
	}
}
