diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES098Request.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES098Request.java index 7dac609..691be97 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES098Request.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES098Request.java @@ -95,4 +95,47 @@ public class QPMES098Request extends Public { //ITEM2 private List item2; + @Override + public String toString() { + return "QPMES098Request{" + + "AUFNR='" + AUFNR + '\'' + + ", AUART='" + AUART + '\'' + + ", WERKS='" + WERKS + '\'' + + ", PLNBEZ='" + PLNBEZ + '\'' + + ", MAKTX='" + MAKTX + '\'' + + ", GAMNG='" + GAMNG + '\'' + + ", GSTRP='" + GSTRP + '\'' + + ", GLTRP='" + GLTRP + '\'' + + ", ERNAM='" + ERNAM + '\'' + + ", ERDAT='" + ERDAT + '\'' + + ", AENAM='" + AENAM + '\'' + + ", AEDAT='" + AEDAT + '\'' + + ", RSNUM='" + RSNUM + '\'' + + ", ZBBH='" + ZBBH + '\'' + + ", ZWORK='" + ZWORK + '\'' + + ", MATKL='" + MATKL + '\'' + + ", ZKUNNR='" + ZKUNNR + '\'' + + ", ZMESGDLX='" + ZMESGDLX + '\'' + + ", ZMESDJLX='" + ZMESDJLX + '\'' + + ", ZGYID='" + ZGYID + '\'' + + ", ZGZLXH='" + ZGZLXH + '\'' + + ", ZJJ='" + ZJJ + '\'' + + ", ZPH='" + ZPH + '\'' + + ", ZTDGD='" + ZTDGD + '\'' + + ", ZKTZKCR='" + ZKTZKCR + '\'' + + ", ZBZ='" + ZBZ + '\'' + + ", ZGG='" + ZGG + '\'' + + ", ZGYTCL='" + ZGYTCL + '\'' + + ", FXXDM='" + FXXDM + '\'' + + ", ZSTAT='" + ZSTAT + '\'' + + ", UEBTK='" + UEBTK + '\'' + + ", ZRSV01='" + ZRSV01 + '\'' + + ", ZRSV02='" + ZRSV02 + '\'' + + ", ZRSV03='" + ZRSV03 + '\'' + + ", ZRSV04='" + ZRSV04 + '\'' + + ", ZRSV05='" + ZRSV05 + '\'' + + ", item1=" + item1.toString() + + ", item2=" + item2.toString() + + '}'; + } } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES098RequestItem1.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES098RequestItem1.java index bc9828b..db9cf18 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES098RequestItem1.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES098RequestItem1.java @@ -61,4 +61,32 @@ public class QPMES098RequestItem1 { private String ZRSV09; //预留字段10 private String ZRSV10; + + @Override + public String toString() { + return "QPMES098RequestItem1{" + + "VORNR='" + VORNR + '\'' + + ", XLOEK='" + XLOEK + '\'' + + ", LTXA1='" + LTXA1 + '\'' + + ", STEUS='" + STEUS + '\'' + + ", BMSCH='" + BMSCH + '\'' + + ", VGW01='" + VGW01 + '\'' + + ", VGE01='" + VGE01 + '\'' + + ", VGW02='" + VGW02 + '\'' + + ", VGE02='" + VGE02 + '\'' + + ", VGW03='" + VGW03 + '\'' + + ", VGE03='" + VGE03 + '\'' + + ", VGW04='" + VGW04 + '\'' + + ", VGE04='" + VGE04 + '\'' + + ", VGW05='" + VGW05 + '\'' + + ", VGE05='" + VGE05 + '\'' + + ", VGW06='" + VGW06 + '\'' + + ", VGE06='" + VGE06 + '\'' + + ", ZRSV06='" + ZRSV06 + '\'' + + ", ZRSV07='" + ZRSV07 + '\'' + + ", ZRSV08='" + ZRSV08 + '\'' + + ", ZRSV09='" + ZRSV09 + '\'' + + ", ZRSV10='" + ZRSV10 + '\'' + + '}'; + } } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES098RequestItem2.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES098RequestItem2.java index 71f05e1..d4b9743 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES098RequestItem2.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES098RequestItem2.java @@ -47,4 +47,25 @@ public class QPMES098RequestItem2 { private String ZRSV14; //预留字段15 private String ZRSV15; + + @Override + public String toString() { + return "QPMES098RequestItem2{" + + "POSNR='" + POSNR + '\'' + + ", RSPOS='" + RSPOS + '\'' + + ", BWART='" + BWART + '\'' + + ", MATNR='" + MATNR + '\'' + + ", MAKTX='" + MAKTX + '\'' + + ", MTYPE='" + MTYPE + '\'' + + ", MTYTXT='" + MTYTXT + '\'' + + ", BDMNG='" + BDMNG + '\'' + + ", MEINS='" + MEINS + '\'' + + ", BEIKZ='" + BEIKZ + '\'' + + ", ZRSV11='" + ZRSV11 + '\'' + + ", ZRSV12='" + ZRSV12 + '\'' + + ", ZRSV13='" + ZRSV13 + '\'' + + ", ZRSV14='" + ZRSV14 + '\'' + + ", ZRSV15='" + ZRSV15 + '\'' + + '}'; + } } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/webservice/WebServiceConfig.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/webservice/WebServiceConfig.java index 8b73024..5436757 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/webservice/WebServiceConfig.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/webservice/WebServiceConfig.java @@ -5,6 +5,8 @@ import org.apache.cxf.bus.spring.SpringBus; import org.apache.cxf.jaxws.EndpointImpl; import org.apache.cxf.transport.servlet.CXFServlet; import org.nl.wms.mes.webservice.service.QPMES060Service; +import org.nl.wms.mes.webservice.service.QPMES098Service; +import org.nl.wms.mes.webservice.service.QPMES118Service; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.web.servlet.ServletRegistrationBean; import org.springframework.context.annotation.Bean; @@ -18,6 +20,12 @@ public class WebServiceConfig { @Autowired private QPMES060Service qpmes060Service; + @Autowired + private QPMES098Service qpmes098Service; + + @Autowired + private QPMES118Service qpmes118Service; + // @Autowired // private WebServiceAuthInterceptor interceptor; @@ -53,4 +61,26 @@ public class WebServiceConfig { return endpoint; } + /** + * http://localhost:8010/webServices/qpmes098?wsdl + */ + @Bean + public Endpoint messageEndPoint1() { + EndpointImpl endpoint = new EndpointImpl(springBus(), qpmes098Service); + endpoint.publish("/qpmes098"); +// endpoint.getInInterceptors().add(this.interceptor); + return endpoint; + } + + /** + * http://localhost:8010/webServices/qpmes118?wsdl + */ + @Bean + public Endpoint messageEndPoint2() { + EndpointImpl endpoint = new EndpointImpl(springBus(), qpmes118Service); + endpoint.publish("/qpmes118"); +// endpoint.getInInterceptors().add(this.interceptor); + return endpoint; + } + } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/webservice/service/QPMES060Service.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/webservice/service/QPMES060Service.java index 0bdea41..4c4d763 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/webservice/service/QPMES060Service.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/webservice/service/QPMES060Service.java @@ -14,6 +14,6 @@ import java.util.List; ) public interface QPMES060Service { - @WebMethod(operationName = "notice") - public QPMES060Response QPMES060(@WebParam(name = "notice") QPMES060Request notice); + @WebMethod(operationName = "QPMES060") + public QPMES060Response QPMES060(@WebParam(name = "QPMES060") QPMES060Request notice); } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/webservice/service/QPMES098Service.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/webservice/service/QPMES098Service.java index ef8cf72..2d82093 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/webservice/service/QPMES098Service.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/webservice/service/QPMES098Service.java @@ -13,6 +13,6 @@ import javax.jws.WebService; ) public interface QPMES098Service { - @WebMethod(operationName = "notice") - public QPMES098Response QPMES098(@WebParam(name = "notice") QPMES098Request notice); + @WebMethod(operationName = "QPMES098") + public QPMES098Response QPMES098(@WebParam(name = "QPMES098") QPMES098Request notice); } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/webservice/service/impl/QPMES060ServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/webservice/service/impl/QPMES060ServiceImpl.java index 3ae9132..75c4678 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/webservice/service/impl/QPMES060ServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/webservice/service/impl/QPMES060ServiceImpl.java @@ -1,8 +1,14 @@ package org.nl.wms.mes.webservice.service.impl; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.bean.copier.CopyOptions; import org.nl.wms.mes.domain.QPMES060Request; import org.nl.wms.mes.domain.QPMES060Response; import org.nl.wms.mes.webservice.service.QPMES060Service; +import org.nl.wms.sch.material.service.dao.Material; +import org.nl.wms.sch.material.service.dao.mapper.MaterialMapper; +import org.nl.wms.sch.task_manage.enums.GroupBindMaterialStatusEnum; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import javax.jws.WebService; @@ -15,10 +21,17 @@ import javax.jws.WebService; ) public class QPMES060ServiceImpl implements QPMES060Service { + @Autowired + private MaterialMapper materialMapper; + @Override public QPMES060Response QPMES060(QPMES060Request notice){ System.out.println("服务被调用 参数:" + notice.toString()); + Material material=new Material(); + material.copyFrom(notice); + material.setGroup_bind_material_status(GroupBindMaterialStatusEnum.BOUND.getValue()); + materialMapper.insert(material); return new QPMES060Response(); } } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/webservice/service/impl/QPMES098ServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/webservice/service/impl/QPMES098ServiceImpl.java index 77030be..4c85686 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/webservice/service/impl/QPMES098ServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/webservice/service/impl/QPMES098ServiceImpl.java @@ -1,11 +1,18 @@ package org.nl.wms.mes.webservice.service.impl; +import cn.hutool.core.util.ObjectUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import org.nl.wms.mes.domain.QPMES098Request; import org.nl.wms.mes.domain.QPMES098Response; import org.nl.wms.mes.webservice.service.QPMES098Service; +import org.nl.wms.pdm.service.IPdmBdWorkorderService; +import org.nl.wms.pdm.service.dao.PdmBdWorkorder; +import org.nl.wms.sch.task.service.dao.SchBaseTaskconfig; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import javax.jws.WebService; +import java.math.BigDecimal; @Component @WebService( @@ -15,10 +22,37 @@ import javax.jws.WebService; ) public class QPMES098ServiceImpl implements QPMES098Service { + @Autowired + private IPdmBdWorkorderService pdmBdWorkorderService; + @Override public QPMES098Response QPMES098(QPMES098Request notice){ - System.out.println("服务被调用 参数:" + notice.toString()); - return new QPMES098Response(); + QPMES098Response qpmes098Response=new QPMES098Response(); + PdmBdWorkorder entity = new PdmBdWorkorder(); + if("1".equals(notice.getZSTAT())) { + entity.setExt_data(notice.toString()); + entity.setWorkorder_code(notice.getAUFNR()); + entity.setPlan_qty(new BigDecimal((notice.getGAMNG()))); + entity.setMaterial_id(notice.getPLNBEZ()); + entity.setWorkorder_status(notice.getZSTAT()); + entity.setMaterial_code(notice.getPLNBEZ()); + entity.setMaterial_name(notice.getMAKTX()); + //客户名称 + entity.setExt_id(notice.getZKUNNR()); + pdmBdWorkorderService.create(entity); + }else{ + entity=pdmBdWorkorderService.getOne(new LambdaQueryWrapper() + .eq(PdmBdWorkorder::getWorkorder_code, notice.getAUFNR())); + if (ObjectUtil.isEmpty(entity)){ + qpmes098Response.setSTATUS("E"); + qpmes098Response.setMESSAGE("生产订单号不存在,无法关闭或删除"); + qpmes098Response.setFKEY_VALUE01(notice.getAUFNR()); + return qpmes098Response; + } + entity.setWorkorder_status(notice.getZSTAT()); + pdmBdWorkorderService.update(entity); + } + return qpmes098Response; } } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/service/dao/PdmBdWorkorder.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/service/dao/PdmBdWorkorder.java index 3a5c96d..1149a95 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/service/dao/PdmBdWorkorder.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/service/dao/PdmBdWorkorder.java @@ -87,6 +87,9 @@ public class PdmBdWorkorder implements Serializable { @ApiModelProperty(value = "外部标识") private String ext_id; + @ApiModelProperty(value = "额外信息") + private String ext_data; + @ApiModelProperty(value = "是否删除") private Boolean is_delete; diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/service/impl/PdmBdWorkorderServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/service/impl/PdmBdWorkorderServiceImpl.java index 4ad5956..233eb17 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/service/impl/PdmBdWorkorderServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/service/impl/PdmBdWorkorderServiceImpl.java @@ -49,7 +49,9 @@ public class PdmBdWorkorderServiceImpl extends ServiceImpl - @@ -322,9 +321,9 @@ export default { optShow: { add: false, edit: false, - del: true, + del: false, download: false, - reset: true + reset: false }, query: { group_bind_material_status: '2'