package market.Lms.FixedAssets.impl;

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

import market.Com.pb.PbMethod;
import market.Lms.FixedAssets.mapper.LmsFixedAssetsMaintainLineMapper;
import market.Lms.FixedAssets.service.LmsFixedAssetsMaintainLineService;
import market.Lms.FixedAssets.vo.LmsFixedAssetsMaintainLine;

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

@RemoteService(path="LmsFixedAssetsMaintainLine")
public class LmsFixedAssetsMaintainLineServiceImpl extends BaseServiceImpl<LmsFixedAssetsMaintainLine,Object> implements LmsFixedAssetsMaintainLineService{

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

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

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

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

}
