package market.Lms.FixedAssets.impl;

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

import market.Com.pb.PbMethod;
import market.Lms.FixedAssets.mapper.LmsFixedAssetsHeatInfoMapper;
import market.Lms.FixedAssets.service.LmsFixedAssetsHeatInfoService;
import market.Lms.FixedAssets.vo.LmsFixedAssetsHeatInfo;

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

@RemoteService(path="LmsFixedAssetsHeatInfo")
public class LmsFixedAssetsHeatInfoServiceImpl extends BaseServiceImpl<LmsFixedAssetsHeatInfo,Object> implements LmsFixedAssetsHeatInfoService{

	//新增
	public String doAdd(LmsFixedAssetsHeatInfo heat){
		String id = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date())+PbMethod.RandomCreate(3);
		heat.setValid_flag("1");
		heat.setHeat_no(id);
		heat.setCreate_time(new Date());
		this.getMapper(LmsFixedAssetsHeatInfoMapper.class).insert(heat);
		return id;
	}

	//删除
	public void doDelete(LmsFixedAssetsHeatInfo heat){
		this.getMapper(LmsFixedAssetsHeatInfoMapper.class).delete(heat.getHeat_no());
	}

	//修改
	public void doUpdate(LmsFixedAssetsHeatInfo heat){
		this.getMapper(LmsFixedAssetsHeatInfoMapper.class).update(heat);
	}

	//查询
	public LmsFixedAssetsHeatInfo doQuery(String heatNo){
		LmsFixedAssetsHeatInfo heat = new LmsFixedAssetsHeatInfo();
		heat = this.getMapper(LmsFixedAssetsHeatInfoMapper.class).findById(heatNo);
		return heat;
	}

}
