forked from I3-YF/i3plus-mes-pcn-yfai
电测试开发
parent
a536b82cfd
commit
ad2a7f8722
@ -0,0 +1,20 @@
|
|||||||
|
package cn.estsh.i3plus.ext.mes.pcn.api.busi;
|
||||||
|
|
||||||
|
public interface IDcsForEquipmentService {
|
||||||
|
|
||||||
|
String doGetConsoleItemCode(String organizeCode,String barcode,String custCode,String custPlantCode,String workCenterCode, String workCellCode);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param organizeCode
|
||||||
|
* @param barcode
|
||||||
|
* @param partNo 客户零件号
|
||||||
|
* @param result
|
||||||
|
* @param workCenterCode
|
||||||
|
* @param workCellCode
|
||||||
|
* @param custCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String doFillConsoleResultExt(String organizeCode,String barcode,String partNo,String result,String workCenterCode, String workCellCode,String custCode);
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
/**
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache ImppLicense, Version 2.0 (the
|
||||||
|
* "ImppLicense"); you may not use this file except in compliance
|
||||||
|
* with the ImppLicense. You may obtain a copy of the ImppLicense at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the ImppLicense is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the ImppLicense for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the ImppLicense.
|
||||||
|
*/
|
||||||
|
package cn.estsh.i3plus.ext.mes.pcn.apiservice.config;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.webservice.DcsForEquipmentServer;
|
||||||
|
import org.apache.cxf.Bus;
|
||||||
|
import org.apache.cxf.jaxws.EndpointImpl;
|
||||||
|
import org.apache.cxf.transport.servlet.CXFServlet;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.boot.web.servlet.ServletRegistrationBean;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
import javax.xml.ws.Endpoint;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description : WebService Server 服务配置
|
||||||
|
* WSDL URL: /block/softswitch/server/web-service?wsdl
|
||||||
|
* @Reference :
|
||||||
|
* @Author : wei.peng
|
||||||
|
* @CreateDate : 2019/9/10 下午3:13
|
||||||
|
* @Modify:
|
||||||
|
**/
|
||||||
|
@Configuration
|
||||||
|
public class WebServiceConfig {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private Bus bus;
|
||||||
|
|
||||||
|
@Bean("cxfServletRegistration")
|
||||||
|
public ServletRegistrationBean dispatcherServlet() {
|
||||||
|
return new ServletRegistrationBean(new CXFServlet(), "/*");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public Endpoint endpoint() {
|
||||||
|
EndpointImpl endpoint = new EndpointImpl(bus, new DcsForEquipmentServer());
|
||||||
|
endpoint.publish("/DCSForEquipmentService");
|
||||||
|
return endpoint;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
package cn.estsh.i3plus.ext.mes.pcn.apiservice.model;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点测试 GetConsoleItemCodeExt
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MesConsoleItemCodeExt {
|
||||||
|
|
||||||
|
//条码
|
||||||
|
private String barcode;
|
||||||
|
//客户编码
|
||||||
|
private String custCode;
|
||||||
|
//客户工厂
|
||||||
|
private String custPlantCode;
|
||||||
|
//装配线
|
||||||
|
private String assemblyLine;
|
||||||
|
//工位
|
||||||
|
private String location;
|
||||||
|
//工厂代码
|
||||||
|
private String organizeCode;
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package cn.estsh.i3plus.ext.mes.pcn.apiservice.model;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class MesConsoleResultExt {
|
||||||
|
private String barcode;
|
||||||
|
private String partNO;
|
||||||
|
private String result;
|
||||||
|
private String assemblyLine;
|
||||||
|
private String location;
|
||||||
|
private String custCode;
|
||||||
|
private String organizeCode;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.webservice;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.ext.mes.pcn.apiservice.model.MesConsoleItemCodeExt;
|
||||||
|
import cn.estsh.i3plus.ext.mes.pcn.apiservice.model.MesConsoleResultExt;
|
||||||
|
import cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.busi.DcsForEquipmentServiceImpl;
|
||||||
|
import cn.estsh.impp.framework.boot.util.SpringContextsUtil;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.jws.WebMethod;
|
||||||
|
import javax.jws.WebParam;
|
||||||
|
import javax.jws.WebService;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
@WebService(targetNamespace = "http://tempuri.org/")
|
||||||
|
public class DcsForEquipmentServer {
|
||||||
|
public static final Logger LOGGER = LoggerFactory.getLogger(DcsForEquipmentServer.class);
|
||||||
|
// @WebMethod(action = "GetConsoleItemCodeExt", operationName = "GetConsoleItemCodeExt")
|
||||||
|
// public String getConsoleItemCodeExt(@WebParam(name = "GetConsoleItemCodeExt") MesConsoleItemCodeExt mesConsoleItemCodeExt) {
|
||||||
|
// DcsForEquipmentServiceImpl bean = (DcsForEquipmentServiceImpl) SpringContextsUtil.getBean("DcsForEquipmentServiceImpl");
|
||||||
|
// String organizeCode = mesConsoleItemCodeExt.getOrganizeCode();
|
||||||
|
// String custCode = mesConsoleItemCodeExt.getCustCode();
|
||||||
|
// String assemblyLine = mesConsoleItemCodeExt.getAssemblyLine();
|
||||||
|
// String location = mesConsoleItemCodeExt.getLocation();
|
||||||
|
// String barcode = mesConsoleItemCodeExt.getBarcode();
|
||||||
|
// String custPlantCode = mesConsoleItemCodeExt.getCustPlantCode();
|
||||||
|
// return bean.doGetConsoleItemCode(organizeCode,barcode,custCode,custPlantCode,assemblyLine,location);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@WebMethod(action = "GetConsoleItemCodeExt", operationName = "GetConsoleItemCodeExt")
|
||||||
|
public String getConsoleItemCodeExt(@WebParam(name = "organizeCode") String organizeCode, @WebParam(name = "custCode") String custCode,@WebParam(name = "assemblyLine")String assemblyLine,@WebParam(name = "location")String location,@WebParam(name = "barcode")String barcode,@WebParam(name = "custPlantCode")String custPlantCode) {
|
||||||
|
DcsForEquipmentServiceImpl bean = (DcsForEquipmentServiceImpl) SpringContextsUtil.getBean("DcsForEquipmentServiceImpl");
|
||||||
|
return bean.doGetConsoleItemCode(organizeCode,barcode,custCode,custPlantCode,assemblyLine,location);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@WebMethod(action = "FillConsoleResultExt", operationName = "FillConsoleResultExt")
|
||||||
|
public String getConsoleItemCodeExt(@WebParam(name = "FillConsoleResultExt") MesConsoleResultExt mesConsoleResultExt) {
|
||||||
|
DcsForEquipmentServiceImpl bean = (DcsForEquipmentServiceImpl) SpringContextsUtil.getBean("DcsForEquipmentServiceImpl");
|
||||||
|
String organizeCode = mesConsoleResultExt.getOrganizeCode();
|
||||||
|
String custCode = mesConsoleResultExt.getCustCode();
|
||||||
|
String assemblyLine = mesConsoleResultExt.getAssemblyLine();
|
||||||
|
String location = mesConsoleResultExt.getLocation();
|
||||||
|
String barcode = mesConsoleResultExt.getBarcode();
|
||||||
|
String result = mesConsoleResultExt.getResult();
|
||||||
|
String partNo = mesConsoleResultExt.getPartNO();
|
||||||
|
return bean.doFillConsoleResultExt(organizeCode,barcode,partNo,result,assemblyLine,location,custCode);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue