|
@ -4,7 +4,9 @@ package org.nl.acs.task.service.impl; |
|
|
|
|
|
|
|
|
import cn.hutool.core.date.DateUtil; |
|
|
import cn.hutool.core.date.DateUtil; |
|
|
import cn.hutool.core.util.IdUtil; |
|
|
import cn.hutool.core.util.IdUtil; |
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
import cn.hutool.http.HttpResponse; |
|
|
import cn.hutool.http.HttpResponse; |
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import lombok.RequiredArgsConstructor; |
|
@ -75,6 +77,9 @@ public class TaskFeedbackServiceImpl implements TaskFeedbackService { |
|
|
public TaskFeedbackDto findByCode(String code) { |
|
|
public TaskFeedbackDto findByCode(String code) { |
|
|
WQLObject wo = WQLObject.getWQLObject("acs_task_feedback"); |
|
|
WQLObject wo = WQLObject.getWQLObject("acs_task_feedback"); |
|
|
JSONObject json = wo.query("task_code ='" + code + "' and is_finished='0' ").uniqueResult(0); |
|
|
JSONObject json = wo.query("task_code ='" + code + "' and is_finished='0' ").uniqueResult(0); |
|
|
|
|
|
if(ObjectUtil.isEmpty(json)){ |
|
|
|
|
|
return null; |
|
|
|
|
|
} |
|
|
final TaskFeedbackDto obj = json.toJavaObject(TaskFeedbackDto.class); |
|
|
final TaskFeedbackDto obj = json.toJavaObject(TaskFeedbackDto.class); |
|
|
return obj; |
|
|
return obj; |
|
|
} |
|
|
} |
|
@ -166,7 +171,7 @@ public class TaskFeedbackServiceImpl implements TaskFeedbackService { |
|
|
feed_jo.put("task_code", entity.getTask_code()); |
|
|
feed_jo.put("task_code", entity.getTask_code()); |
|
|
feed_jo.put("task_status", entity.getTask_status()); |
|
|
feed_jo.put("task_status", entity.getTask_status()); |
|
|
JSONArray ja = new JSONArray(); |
|
|
JSONArray ja = new JSONArray(); |
|
|
|
|
|
ja.add(feed_jo); |
|
|
HttpResponse body = null; |
|
|
HttpResponse body = null; |
|
|
String error_message = null; |
|
|
String error_message = null; |
|
|
try { |
|
|
try { |
|
@ -176,7 +181,7 @@ public class TaskFeedbackServiceImpl implements TaskFeedbackService { |
|
|
e.printStackTrace(); |
|
|
e.printStackTrace(); |
|
|
} |
|
|
} |
|
|
int status = body.getStatus(); |
|
|
int status = body.getStatus(); |
|
|
JSONObject jo = (JSONObject) JSONObject.toJSON(body.body()); |
|
|
JSONObject jo = (JSONObject) JSON.parse(body.body()); |
|
|
|
|
|
|
|
|
dto.setTask_status(entity.getTask_status()); |
|
|
dto.setTask_status(entity.getTask_status()); |
|
|
if (status == 200) { |
|
|
if (status == 200) { |
|
|