/***文档注释***********************************************
 * 作者            ：
 * 创建日期     ：2018-07-06
 * 描述            ：材质最终判定结果明细表
 * 注意事项     ：
 * 遗留BUG   ：
 * 修改日期     ：
 * 修改人员     ：
 * 修改内容     ：
***********************************************************/
package market.Qms.qcm.service.impl;
import java.util.ArrayList;
import java.util.List;

import market.Com.vo.CommonPage;
import market.Com.vo.ResultModel;
import market.Qms.qcm.mapper.QcmJudgePhysicalUtmDMapper;
import market.Qms.qcm.service.QcmJudgePhysicalUtmDService;
import market.Qms.qcm.vo.QcmJudgePhysicalUtmD;

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

@RemoteService(path="QcmJudgePhysicalUtmDService")
public class QcmJudgePhysicalUtmDServiceImpl extends BaseServiceImpl<QcmJudgePhysicalUtmD,Object> implements QcmJudgePhysicalUtmDService {
	public ResultModel getInstResult(CommonPage<QcmJudgePhysicalUtmD> sum){
		ResultModel rm=new ResultModel();
		QcmJudgePhysicalUtmD qjpd=sum.getObject();
		String connect="";
		List list=new ArrayList<>();
		try {
			List<QcmJudgePhysicalUtmD> listqjpd = this.getMapper(QcmJudgePhysicalUtmDMapper.class).findWithCondition(null, "DESIGN_KEY='"+qjpd.getDesign_key()+"'"+"and PSC='"+qjpd.getPsc()+"'", null, 0, 0);
		    for (QcmJudgePhysicalUtmD q : listqjpd) {
				connect+=q.getCert_inst_name()+","+q.getJudge_result_desc()+";";
				list.add(q);
			}
		   list.add(connect);
		   rm.setData(list);
		   rm.setState("200");
		} catch (Exception e) {
			// TODO: handle exception
			rm.setState("500");
			rm.setErrorInfo(e.getMessage());
			rm.setMsgInfo("查询认证结果信息失败");
		}
		return rm;
	}
}
