Browse Source

155外面多加一层

master
psh 4 months ago
parent
commit
17c8fc81b7
  1. 22
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/controller/MesController.java
  2. 17
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES155Data.java
  3. 9
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES155Response.java

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

17
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<QPMES155ResponseBody> BODY;
}

9
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<QPMES155ResponseBody> BODY;
private String code;
private String msg;
private QPMES155Data data;
}

Loading…
Cancel
Save