diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java index f0a3e14c9..91e40d7d3 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java @@ -238,7 +238,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu @Override public Instruction findByCode(String code) { WQLObject wo = WQLObject.getWQLObject("acs_instruction"); - JSONObject json = wo.query("instruction_code ='" + code + "'").uniqueResult(0); + JSONObject json = wo.query("instruction_code ='" + code + "'","create_time desc").uniqueResult(0); if (ObjectUtil.isEmpty(json)) { return null; } @@ -249,7 +249,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu @Override public Instruction findByTaskcode(String code) { WQLObject wo = WQLObject.getWQLObject("acs_instruction"); - JSONObject json = wo.query("task_code ='" + code + "'").uniqueResult(0); + JSONObject json = wo.query("task_code ='" + code + "'","create_time desc").uniqueResult(0); final Instruction obj = json.toJavaObject(Instruction.class); return obj; } @@ -288,7 +288,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu wherecaluse = " and " + wherecaluse; } WQLObject wo = WQLObject.getWQLObject("acs_instruction"); - JSONObject json = wo.query("task_id ='" + id + "'" + wherecaluse).uniqueResult(0); + JSONObject json = wo.query("task_id ='" + id + "'" + wherecaluse,"create_time desc").uniqueResult(0); if (ObjectUtil.isNotEmpty(json)) { return json.toJavaObject(Instruction.class); }