You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.5 KiB
56 lines
1.5 KiB
package com.eco.plugin.xxxx.oats.handler; |
|
|
|
import com.eco.plugin.xxxx.oats.config.PluginSimpleConfig; |
|
import com.eco.plugin.xxxx.oats.utils.DateUtilSelf; |
|
import com.eco.plugin.xxxx.oats.utils.HttpUtils; |
|
import com.eco.plugin.xxxx.oats.utils.ResponseUtils; |
|
import com.eco.plugin.xxxx.oats.utils.Utils; |
|
import com.fr.decision.fun.impl.BaseHttpHandler; |
|
import com.fr.json.JSONObject; |
|
import com.fr.plugin.transform.FunctionRecorder; |
|
import com.fr.third.springframework.web.bind.annotation.RequestMethod; |
|
import javax.servlet.http.HttpServletRequest; |
|
import javax.servlet.http.HttpServletResponse; |
|
import java.util.Date; |
|
|
|
@FunctionRecorder |
|
public class ReceiveTodoRequestByJson extends BaseHttpHandler { |
|
|
|
|
|
public ReceiveTodoRequestByJson() { |
|
} |
|
|
|
@Override |
|
public RequestMethod getMethod() { |
|
return RequestMethod.POST; |
|
} |
|
|
|
@Override |
|
public String getPath() { |
|
return "/ofs/receiveTodoRequestByJson"; |
|
} |
|
|
|
@Override |
|
public boolean isPublic() { |
|
return true; |
|
} |
|
|
|
@Override |
|
public void handle(HttpServletRequest req, HttpServletResponse res) throws Exception { |
|
JSONObject param = Utils.getRequestBody(req); |
|
String time = DateUtilSelf.DateToString(new Date(),"yyyy-MM-dd HH:mm:ss"); |
|
param.put("createdatetime",time); |
|
param.put("receivedatetime",time); |
|
|
|
String url = PluginSimpleConfig.getInstance().getReceiveTodoRequestByJson(); |
|
|
|
String result = HttpUtils.HttpPostJson(url,param.toString(),null); |
|
|
|
ResponseUtils.response(res,new JSONObject(result)); |
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|