package market.Lms.FixedAssets.impl;

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

import market.Com.pb.PbMethod;
import market.Lms.FixedAssets.mapper.LmsFixedAssetsReceiveLineMapper;
import market.Lms.FixedAssets.service.LmsFixedAssetsReceiveLineService;
import market.Lms.FixedAssets.vo.LmsFixedAssetsReceiveLine;

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

@RemoteService(path="LmsFixedAssetsReceiveLine")
public class LmsFixedAssetsReceiveLineServiceImpl extends BaseServiceImpl<LmsFixedAssetsReceiveLine,Object> implements LmsFixedAssetsReceiveLineService{

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

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

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

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