/***文档注释***********************************************
 * 作者               :                   赵淋支
 * 创建日期      :                   2020.12.17
 * 描述               :        			分条子卷线上称重实绩
 * 注意事项      :                  无
 * 遗留BUG :                   	无
 * 修改日期      :                   
 * 修改人员      :                   
 * 修改内容      :                   
***********************************************************/

package market.Mes.Lengthwise.Performance.impl;

import java.util.List;

import market.Com.vo.CommonPage;
import market.Com.vo.ResultModel;
import market.Mes.Lengthwise.Performance.mapper.MesCrSlittingWgtMapper;
import market.Mes.Lengthwise.Performance.service.MesCrSlittingWgtService;
import market.Mes.Lengthwise.Performance.vo.MesCrSlittingWgt;

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

@RemoteService(path="MesCrSlittingWgtService")
public class MesCrSlittingWgtServiceImpl extends BaseServiceImpl<MesCrSlittingWgt,Object> implements MesCrSlittingWgtService {
	
	public ResultModel doQueryMesCrSlittingWgt(CommonPage<MesCrSlittingWgt> cp){
		ResultModel rm=new ResultModel();
		MesCrSlittingWgt mcw = cp.getObject();
		try{
			String condition = "coil_no = '"+mcw.getCoil_no()+"'";
			List<MesCrSlittingWgt> list = this.getMapper(MesCrSlittingWgtMapper.class).findWithCondition(null, condition, "wgt_time", 0, 0);
			rm.setState("200");
			rm.setMsgInfo("查询成功");
			rm.setData(list);
		}catch(Exception ex){
			ex.printStackTrace();
			rm.setState("500");
			rm.setMsgInfo("查询失败!"+ex.getMessage());
		}
		return rm;
	}
}
