This commit is contained in:
loujf
2022-08-23 13:05:11 +08:00
parent 2bffb17dae
commit 84ec044f3d
4 changed files with 30 additions and 0 deletions

View File

@@ -629,6 +629,7 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
String action = "";
String io_action = "";
String move = "";
String status = "";
if (this.getMode() == 0) {
mode = "未联机";
} else if (this.getMode() == 1) {
@@ -668,6 +669,14 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
io_action = "允许进出";
}
if (this.getStatus() == 1) {
status = "待机";
} else if (this.getStatus() == 2) {
status = "生产中";
} else if (this.getStatus() == 3) {
status = "故障";
}
if (this.getMove() == 0) {
move = "无货";
} else if (this.getMove() == 1) {
@@ -679,6 +688,7 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
jo.put("mode", mode);
jo.put("move", move);
jo.put("action", action);
jo.put("status", status);
jo.put("io_action", io_action);
jo.put("hasGoods", this.getHasGoods());
jo.put("isOnline", this.getIsonline());
@@ -695,6 +705,8 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
jo.put("Htrapezoidal", this.getHtrapezoidal());
jo.put("Wthickness", this.getWthickness());
jo.put("batch", this.getBatch());
jo.put("order_No", this.getOrder_No());
jo.put("order_qty", this.getOrder_qty());
return jo;
}

View File

@@ -86,6 +86,14 @@ public interface InstructionService {
*/
Instruction findByTaskcode(String code);
/**
* 根据任务code查询
*
* @param code code
* @return Instruction
*/
Instruction findByTaskcodeToWms(String code);
/**
* 根据任务id查询
*

View File

@@ -215,6 +215,14 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
return obj;
}
@Override
public Instruction findByTaskcodeToWms(String code) {
WQLObject wo = WQLObject.getWQLObject("acs_instruction");
JSONObject json = wo.query("task_code ='" + code + "'","create_time desc").uniqueResult(0);
final Instruction obj = json.toJavaObject(Instruction.class);
return obj;
}
@Override
public Instruction findByTaskid(String id, String wherecaluse) {
if (!StrUtil.isEmpty(wherecaluse)) {

View File

@@ -720,9 +720,11 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
if (!StrUtil.startWith(entity.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) {
TaskFeedbackDto feefbackdto = taskFeedbackService.findByCode(entity.getTask_code());
JSONObject feed_jo = new JSONObject();
Instruction inst = instructionservice.findByTaskcodeToWms(entity.getTask_code());
feed_jo.put("ext_task_uuid", entity.getExt_task_uuid());
feed_jo.put("task_code", entity.getTask_code());
feed_jo.put("task_status", entity.getTask_status());
feed_jo.put("car_no", inst.getCarno());
JSONArray ja = new JSONArray();
ja.add(feed_jo);
String message = null;