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 @Override
public Instruction findByCode(String code) { public Instruction findByCode(String code) {
WQLObject wo = WQLObject.getWQLObject("acs_instruction"); 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)) { if (ObjectUtil.isEmpty(json)) {
return null; return null;
} }
@@ -249,7 +249,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
@Override @Override
public Instruction findByTaskcode(String code) { public Instruction findByTaskcode(String code) {
WQLObject wo = WQLObject.getWQLObject("acs_instruction"); 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); final Instruction obj = json.toJavaObject(Instruction.class);
return obj; return obj;
} }
@@ -288,7 +288,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
wherecaluse = " and " + wherecaluse; wherecaluse = " and " + wherecaluse;
} }
WQLObject wo = WQLObject.getWQLObject("acs_instruction"); 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)) { if (ObjectUtil.isNotEmpty(json)) {
return json.toJavaObject(Instruction.class); return json.toJavaObject(Instruction.class);
} }