package market.Lms.FixedAssets.impl;

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

import market.Com.pb.PbMethod;
import market.Lms.FixedAssets.mapper.LmsFixedAssetsBorrowLineMapper;
import market.Lms.FixedAssets.service.LmsFixedAssetsBorrowLineService;
import market.Lms.FixedAssets.vo.LmsFixedAssetsBorrowLine;

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

@RemoteService(path="LmsFixedAssetsBorrowLine")
public class LmsFixedAssetsBorrowLineServiceImpl extends BaseServiceImpl<LmsFixedAssetsBorrowLine,Object> implements LmsFixedAssetsBorrowLineService{

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

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

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

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