This commit is contained in:
psh
2024-03-14 10:48:33 +08:00
parent 1e86d03649
commit 83a4b21183
13 changed files with 195 additions and 16 deletions

View File

@@ -95,4 +95,47 @@ public class QPMES098Request extends Public {
//ITEM2
private List<QPMES098RequestItem2> 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() +
'}';
}
}

View File

@@ -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 + '\'' +
'}';
}
}

View File

@@ -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 + '\'' +
'}';
}
}

View File

@@ -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;
}
}

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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();
}
}

View File

@@ -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<PdmBdWorkorder>()
.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;
}
}

View File

@@ -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;

View File

@@ -49,7 +49,9 @@ public class PdmBdWorkorderServiceImpl extends ServiceImpl<PdmBdWorkorderMapper,
// 点位编码和点位名称为父点位
entity.setWorkorder_id(IdUtil.getSnowflake(1, 1).nextIdStr());
entity.setWorkorder_code(CodeUtil.getNewCode("PDM_SHIFTORDER"));
if(ObjectUtil.isEmpty(entity.getWorkorder_code())) {
entity.setWorkorder_code(CodeUtil.getNewCode("PDM_SHIFTORDER"));
}
entity.setCreate_id(currentUserId);
entity.setCreate_name(nickName);
entity.setCreate_time(now);

View File

@@ -1,5 +1,7 @@
package org.nl.wms.sch.material.service.dao;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
@@ -7,6 +9,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nl.wms.mes.domain.QPMES060Request;
import java.io.Serializable;
import java.math.BigDecimal;
@@ -17,7 +20,7 @@ import java.math.BigDecimal;
public class Material implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "入库单号")
private String simtOrderNo;
private String SimtOrderNo;
@ApiModelProperty(value = "场地")
private String locationCode;
@ApiModelProperty(value = "入库类型")
@@ -27,7 +30,7 @@ public class Material implements Serializable {
@ApiModelProperty(value = "扫描库位")
private String whlCode;
@ApiModelProperty(value = "托盘号")
private String palletSN;
private String PalletSN;
@ApiModelProperty(value = "物料条码号")
private String lotSN;
@ApiModelProperty(value = "物料编码")
@@ -53,4 +56,7 @@ public class Material implements Serializable {
@ApiModelProperty(value = "绑定状态")
private String group_bind_material_status;
public void copyFrom(QPMES060Request source){
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
}
}

View File

@@ -8,7 +8,7 @@ import java.math.BigDecimal;
@Data
public class MaterialDto implements Serializable {
/** 入库单号 */
private String simtOrderNo;
private String SimtOrderNo;
/** 场地 */
private String locationCode;
/** 入库类型 */
@@ -18,7 +18,7 @@ public class MaterialDto implements Serializable {
/** 扫描库位 */
private String whlCode;
/** 托盘号 */
private String palletSN;
private String PalletSN;
/** 物料条码号 */
private String lotSN;
/** 物料编码 */