diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/controller/MesController.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/controller/MesController.java index 404cfc7..297aadb 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/controller/MesController.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/controller/MesController.java @@ -181,13 +181,15 @@ public class MesController { QPMES155Response qpmes155Response =new QPMES155Response(); QPMES155Request qpmes155Request=notice.toJavaObject(QPMES155Request.class); log.info(qpmes155Request.toString()); - for(QPMES155RequestBody temp:qpmes155Request.getBODY()){ - try{ - Workorder workorder =new Workorder(); - workorder.copyFrom(temp); - workorderService.create(workorder); - }catch (Exception e){ - log.error("工单已存在导致新增失败,{}{}",e,e.getMessage()); + if(ObjectUtil.isNotEmpty(qpmes155Request)) { + for (QPMES155RequestBody temp : qpmes155Request.getBODY()) { + try { + Workorder workorder = new Workorder(); + workorder.copyFrom(temp); + workorderService.create(workorder); + } catch (Exception e) { + log.error("工单已存在导致新增失败,{}{}", e, e.getMessage()); + } } } Head head=new Head(); @@ -195,7 +197,11 @@ public class MesController { head.setINTF_ID("QPMES155"); head.setSRC_MSGID(IdUtil.simpleUUID()); head.setSRC_SYSTEM("AGV"); - qpmes155Response.setHEAD(head); + QPMES155Data qpmes155Data=new QPMES155Data(); + qpmes155Data.setHEAD(head); + qpmes155Response.setData(qpmes155Data); + qpmes155Response.setMsg("数据接收成功"); + qpmes155Response.setCode("0"); log.info("QPMES155服务被调用{}",qpmes155Response.toString()); return qpmes155Response; } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES155Data.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES155Data.java new file mode 100644 index 0000000..c4fafc0 --- /dev/null +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES155Data.java @@ -0,0 +1,17 @@ +package org.nl.wms.mes.domain; + +import com.alibaba.fastjson.annotation.JSONField; +import lombok.Data; +import lombok.ToString; + +import java.util.List; + +@Data +@ToString +public class QPMES155Data { + @JSONField(name = "HEAD") + private Head HEAD; + @JSONField(name = "BODY") + private List BODY; + +} diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES155Response.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES155Response.java index 907a78e..19e050e 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES155Response.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES155Response.java @@ -9,9 +9,10 @@ import java.util.List; @Data @ToString public class QPMES155Response { - @JSONField(name = "HEAD") - private Head HEAD; - @JSONField(name = "BODY") - private List BODY; + private String code; + + private String msg; + + private QPMES155Data data; }