package market.Lms.FixedAssets.impl;

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

import market.Com.pb.PbMethod;
import market.Lms.FixedAssets.mapper.LmsFixedAssetsCancleInfoMapper;
import market.Lms.FixedAssets.service.LmsFixedAssetsCancleInfoService;
import market.Lms.FixedAssets.vo.LmsFixedAssetsCancleInfo;

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

@RemoteService(path="LmsFixedAssetsCancleInfo")
public class LmsFixedAssetsCancleInfoServiceImpl extends BaseServiceImpl<LmsFixedAssetsCancleInfo,Object> implements LmsFixedAssetsCancleInfoService{

	//新增
	public String doAdd(LmsFixedAssetsCancleInfo cancle){
		String id = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date())+PbMethod.RandomCreate(3);
		cancle.setCancle_no(id);
		this.getMapper(LmsFixedAssetsCancleInfoMapper.class).insert(cancle);
		return id;
	}

	//删除
	public void doDelete(LmsFixedAssetsCancleInfo cancle){
		this.getMapper(LmsFixedAssetsCancleInfoMapper.class).delete(cancle.getCancle_no());
	}

	//修改
	public void doUpdate(LmsFixedAssetsCancleInfo cancle){
		this.getMapper(LmsFixedAssetsCancleInfoMapper.class).update(cancle);
	}

	//查询
	public LmsFixedAssetsCancleInfo doQuery(String cancleNo){
		LmsFixedAssetsCancleInfo cancle = new LmsFixedAssetsCancleInfo();
		cancle = this.getMapper(LmsFixedAssetsCancleInfoMapper.class).findById(cancleNo);
		return cancle;
	}
}
