package market.Lms.FixedAssets.impl;

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

import market.Com.pb.PbMethod;
import market.Lms.FixedAssets.mapper.LmsFixedAssetsLineInfoMapper;
import market.Lms.FixedAssets.service.LmsFixedAssetsLineInfoService;
import market.Lms.FixedAssets.vo.LmsFixedAssetsLineInfo;

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

@RemoteService(path="LmsFixedAssetsLineInfo")
public class LmsFixedAssetsLineInfoServiceImpl extends BaseServiceImpl<LmsFixedAssetsLineInfo,Object> implements LmsFixedAssetsLineInfoService{

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

	//删除
	public void doDelete(LmsFixedAssetsLineInfo line){
		this.getMapper(LmsFixedAssetsLineInfoMapper.class).delete(line.getLine_no());
	}

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

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