|
|
|
@ -53,18 +53,18 @@ public class IdcController {
|
|
|
|
|
@RequestParam("content") String content,
|
|
|
|
|
@RequestParam(value = "files", required = false) MultipartFile[] files) {
|
|
|
|
|
//
|
|
|
|
|
return idcService.receive( request, content, files);
|
|
|
|
|
return idcService.receive(request, content, files);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/spssync/common/once")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public BaseResponse once(HttpServletRequest request,@RequestBody Map<String, Object> params) {
|
|
|
|
|
public BaseResponse once(HttpServletRequest request, @RequestBody Map<String, Object> params) {
|
|
|
|
|
//
|
|
|
|
|
boolean isUpload = params.get("isUpload")!=null && params.get("isUpload").equals("1") ? true : false ;
|
|
|
|
|
return idcService.onceSync( params.get("tableName").toString(), isUpload);
|
|
|
|
|
boolean isUpload = params.get("isUpload") != null && params.get("isUpload").equals("1") ? true : false;
|
|
|
|
|
return idcService.onceSync(params.get("tableName").toString(), isUpload);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//@Log("数据同步测试")
|
|
|
|
|
@RequestMapping(value = "/spssync/common/test")
|
|
|
|
|
public BaseResponse test(HttpServletRequest request, @RequestBody Map<String, Object> params) {
|
|
|
|
@ -85,17 +85,19 @@ public class IdcController {
|
|
|
|
|
public BaseResponse download(HttpServletRequest request, @RequestBody Map<String, Object> params) {
|
|
|
|
|
return idcService.download(request, params);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/spssync/common/uploadStatus")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public BaseResponse uploadStatus(HttpServletRequest request, @RequestBody Map<String, Object> params) {
|
|
|
|
|
return idcService.uploadStatus(request, params);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/spssync/common/downloadStatus")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public BaseResponse downloadStatus(HttpServletRequest request, @RequestBody Map<String, Object> params) {
|
|
|
|
|
return idcService.downloadStatus(request, params);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//@Log("数据同步任务根据任务ID,返回下载成功标记")
|
|
|
|
|
@RequestMapping(value = "/spssync/common/success")
|
|
|
|
|
@ResponseBody
|
|
|
|
@ -104,15 +106,15 @@ public class IdcController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/spssync/common/downloadFile")
|
|
|
|
|
public void downloadFile(HttpServletResponse response,@RequestParam String fileName) throws UnsupportedEncodingException {
|
|
|
|
|
if (fileName != null) {
|
|
|
|
|
response.setHeader("Content-disposition", "attachment; filename=" + URLEncoder.encode(fileName, "UTF-8"));
|
|
|
|
|
response.setContentType("application/force-download");
|
|
|
|
|
idcService.downloadFile(fileName, response);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void downloadFile(HttpServletResponse response, @RequestParam String fileName) throws UnsupportedEncodingException {
|
|
|
|
|
if (fileName != null) {
|
|
|
|
|
response.setHeader("Content-disposition", "attachment; filename=" + URLEncoder.encode(fileName, "UTF-8"));
|
|
|
|
|
response.setContentType("application/force-download");
|
|
|
|
|
idcService.downloadFile(fileName, response);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping("/mapi/**")
|
|
|
|
|
public Object mapi(HttpServletRequest request, HttpServletResponse httpServletResponse) {
|
|
|
|
|
String uri = parseUri(request.getRequestURL().toString());
|
|
|
|
|