package market.Lms.FixedAssets.impl;

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

import market.Com.pb.PbMethod;
import market.Lms.FixedAssets.mapper.LmsFixedAssetsReceiveInfoMapper;
import market.Lms.FixedAssets.service.LmsFixedAssetsReceiveInfoService;
import market.Lms.FixedAssets.vo.LmsFixedAssetsReceiveInfo;

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

@RemoteService(path="LmsFixedAssetsReceiveInfo")
public class LmsFixedAssetsReceiveInfoServiceImpl extends BaseServiceImpl<LmsFixedAssetsReceiveInfo,Object> implements LmsFixedAssetsReceiveInfoService{

	//新增
	public String doAdd(LmsFixedAssetsReceiveInfo receive){
		String id = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date())+PbMethod.RandomCreate(3);
		receive.setReceive_no(id);
		this.getMapper(LmsFixedAssetsReceiveInfoMapper.class).insert(receive);
		return id;
	}

	//删除
	public void doDelete(LmsFixedAssetsReceiveInfo receive){
		this.getMapper(LmsFixedAssetsReceiveInfoMapper.class).delete(receive.getReceive_no());
	}

	//修改
	public void doUpdate(LmsFixedAssetsReceiveInfo receive){
		this.getMapper(LmsFixedAssetsReceiveInfoMapper.class).update(receive);
	}

	//查询
	public LmsFixedAssetsReceiveInfo doQuery(String receiveNo){
		LmsFixedAssetsReceiveInfo receive = new LmsFixedAssetsReceiveInfo();
		receive = this.getMapper(LmsFixedAssetsReceiveInfoMapper.class).findById(receiveNo);
		return receive;
	}
}
