package pda; import java.util.HashMap; import javax.jws.WebService; import org.apache.commons.lang.StringUtils; import org.apache.ibatis.annotations.Param; import CoreFS.SA06.CoreReturnObject; import QCM.JHY01.JHY0101.AddAutoSample; import QCM.JHY01.JHY0101.AutoSample; import QCM.JHY01.JHY0101.DuplicateSample2; import QCM.QCM03.QCM0301.QcmJhyElementsServiceImpl; import QCM.QCM03.QCM0302.QcmJhyPhyresultServiceImpl; import QCM.QCM03.QCM0302.QcmJudgePhysicalServiceImpl; import QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl; import QCM.QCM03.QCM0307.QcmRejudgeApplyServiceImpl; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; @WebService(endpointInterface="pda.WebService1",serviceName = "WebService1") public class WebService1Impl implements WebService1{ @Override public String getName(String userId) { return "liyd-" + userId; } //优特钢委托接口 @SuppressWarnings("unused") @Override public String autoGenerationSampleInfoYT(String materialInfo) { if (materialInfo==null || "".equals(materialInfo)) { return "请传入参数!"; } JSONArray jsonArray = JSON.parseArray(materialInfo); if (jsonArray==null || jsonArray.size()<1) { return "请传入参数!"; } String msg = ""; try { for (int i = 0; i < jsonArray.size(); i++) { JSONObject json2= jsonArray.getJSONObject(i); JSONArray jarr= new JSONArray(); jarr.add(json2); AddAutoSample sample=new AddAutoSample(); msg = sample.AutoGenerationSampleInfo(jarr); } } catch (Exception e) { e.printStackTrace(); } return msg; } //中厚板委托接口 @SuppressWarnings("unused") @Override public String autoGenerationSampleInfoZHB(String materialInfo) { if (materialInfo==null || "".equals(materialInfo)) { return "请传入参数!"; } JSONObject json = JSON.parseObject(materialInfo); if (json.get("KEY")==null) { return "KEY不能为空,请传入参数!"; } JSONArray material= json.getJSONArray("KEY"); AutoSample sample=new AutoSample(); String msg = ""; try { for (int i = 0; i < material.size(); i++) { JSONObject json2= material.getJSONObject(i); JSONArray jarr= new JSONArray(); jarr.add(json2); msg = sample.autoGenerationSampleInfo(jarr); } } catch (Exception e) { e.printStackTrace(); } return msg; } //委托接口 @SuppressWarnings("unused") @Override public String autoGenerationSampleInfo(String materialInfo) { if (materialInfo==null || "".equals(materialInfo)) { return "请传入参数!"; } JSONObject json = JSON.parseObject(materialInfo); if (json.get("KEY")==null) { return "KEY不能为空,请传入参数!"; } JSONArray material= json.getJSONArray("KEY"); AutoSample sample=new AutoSample(); String msg = ""; try { msg = sample.autoGenerationSampleInfo(material); } catch (Exception e) { e.printStackTrace(); } return msg; } @Override public String ChemJudge(String smp_no,String username) throws Exception { QcmJhyElementsServiceImpl qjes = new QcmJhyElementsServiceImpl(); CoreReturnObject cro = qjes.JudgeByHuman(smp_no, username); return cro.getV_errMsg(); } @Override public String PhyJudge(String smp_no,String username) throws Exception { QcmJhyPhyresultServiceImpl qjes = new QcmJhyPhyresultServiceImpl(); CoreReturnObject cro = qjes.AutoJudge(smp_no, username); return cro.getV_errMsg(); } @Override public String JudgeCheckC(String material_no,String orderno)throws Exception{ QcmRejudgeApplyServiceImpl qras = new QcmRejudgeApplyServiceImpl(); String msg = qras.JudgeCheckC(orderno, material_no); return msg; } @Override public String JudgeCheck(String material_no,String orderno,String cert_inst_name)throws Exception{ QcmRejudgeApplyServiceImpl qras = new QcmRejudgeApplyServiceImpl(); String msg = qras.JudgeCheck(orderno, material_no,cert_inst_name); return msg; } /*@Override public String LGRlChemJudgeBySystem(@Param("heat_no") String heat_no,@Param("material_no") String material_no,@Param("design_key") String design_key,@Param("username") String username,@Param("grade_name") String grade_name,@Param("prod_name") String prod_name,@Param("prodline") String prodline)throws Exception{ QcmJhyElementsServiceImpl qjes = new QcmJhyElementsServiceImpl(); String msg = qjes.LGRlChemJudgeBySystem(heat_no, material_no, design_key, username, grade_name, prod_name, prodline); return msg; }*/ /*@Override public String AutoJudge(@Param("material_no") String materail_no,@Param("username") String username)throws Exception{ QcmJudgePhysicalServiceImpl qjes = new QcmJudgePhysicalServiceImpl(); String msg = qjes.ultimateJudgeAutoS(materail_no, username); return msg; }*/ @Override public String JudgeCheckP(String material_no,String orderno,String prodline,String heat_no,String steel_name)throws Exception{ QcmRejudgeApplyServiceImpl qras = new QcmRejudgeApplyServiceImpl(); String msg = qras.JudgeCheckP(heat_no,orderno, material_no,prodline,steel_name); return msg; } @Override public String JudgeCheckP01(String param)throws Exception{ QcmRejudgeApplyServiceImpl qras = new QcmRejudgeApplyServiceImpl(); String msg = qras.JudgeCheckP01(param); return msg; } @Override public String JudgeCheckC01(String param)throws Exception{ QcmRejudgeApplyServiceImpl qras = new QcmRejudgeApplyServiceImpl(); String msg = qras.JudgeCheckC01(param); return msg; } @Override public String JudgeCheck01(String param)throws Exception{ QcmRejudgeApplyServiceImpl qras = new QcmRejudgeApplyServiceImpl(); String msg = qras.JudgeCheck01(param); return msg; } @Override public String JudgeCheckLT(String param)throws Exception{ QcmRejudgeApplyServiceImpl qras = new QcmRejudgeApplyServiceImpl(); String msg = qras.JudgeCheckLT(param); return msg; } @Override public String judgeHB1QMS(String boardNo,String designKey)throws Exception{ QcmJudgeMeasureServiceImpl qmsi = new QcmJudgeMeasureServiceImpl(); String msg = qmsi.judgeHB1QMS(boardNo, designKey); return msg; } @Override public String JudgeResult(String param)throws Exception{ QcmRejudgeApplyServiceImpl qras = new QcmRejudgeApplyServiceImpl(); String msg = qras.JudgeResult(param); return msg; } @Override public void JBCD(@Param("arg0") String arg0,@Param("arg1") String arg1,@Param("arg2") String arg2,@Param("arg3") String arg3,@Param("arg4") String arg4,@Param("arg5") String arg5,@Param("arg6") String arg6,@Param("arg7") String arg7,@Param("arg8") String arg8)throws Exception{ QcmRejudgeApplyServiceImpl qras = new QcmRejudgeApplyServiceImpl(); } //复样接口 @SuppressWarnings("unused") @Override public String sendDuplicateSample(String materialInfo) { if (materialInfo==null || "".equals(materialInfo)) { return "请传入参数!"; } JSONObject json = JSON.parseObject(materialInfo); if (json.get("KEY")==null) { return "KEY不能为空,请传入参数!"; } JSONArray material= json.getJSONArray("KEY"); DuplicateSample2 sample=new DuplicateSample2(); String msg = ""; try { msg = sample.doDuplicateSample(material); } catch (Exception e) { e.printStackTrace(); } return msg; } @Override public String CancelUltimate(String username,String material_no,String utm_id){ QcmJudgePhysicalServiceImpl qjes = new QcmJudgePhysicalServiceImpl(); String msg = ""; try { msg = qjes.cancelUltimateJudgeByMes(username, material_no, utm_id); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } return msg; } //重判 @SuppressWarnings("unused") @Override public String sentenceDuplicateSample(HashMap parmas) { /* parmas.put("PLINE_CODE", "GX2"); parmas.put("MATERIAL_NO", "E2304808.10"); parmas.put("DESIGN_KEY", "LS181029002122"); parmas.put("SMP_TYPE_CODE", "1"); parmas.put("BATCH_NO", "E2304808"); parmas.put("SMP_NO", "GX22308070039"); parmas.put("CREATE_NAME", "调试人员");*/ if (parmas==null || "".equals(parmas)) { return "请传入参数!"; } if (StringUtils.isBlank(parmas.get("MATERIAL_NO").toString())) { return "请传入参数"; } DuplicateSample2 sample=new DuplicateSample2(); String msg = ""; try { msg = sample.doSentenceDuplicateSample(parmas); } catch (Exception e) { e.printStackTrace(); } return msg; } @SuppressWarnings("unused") @Override public String sendZHBCY(String smpNo) { if (smpNo==null || "".equals(smpNo)) { return "请传入参数!"; } DuplicateSample2 sample=new DuplicateSample2(); String msg = ""; try { msg = sample.ZHBCY(smpNo); } catch (Exception e) { e.printStackTrace(); } return msg; } @SuppressWarnings("unused") @Override public String sendZHBCYK(String smpNo) { if (smpNo==null || "".equals(smpNo)) { return "请传入参数!"; } DuplicateSample2 sample=new DuplicateSample2(); String msg = ""; try { msg = sample.ZHBCYK(smpNo); } catch (Exception e) { e.printStackTrace(); } return msg; } }