This commit is contained in:
2023-03-10 18:05:11 +08:00
parent 4a46029a35
commit f4073b8071

View File

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