|
@@ -9,11 +9,17 @@ package cn.com.qmth.examcloud.core.print.api.provider;
|
|
|
|
|
|
import cn.com.qmth.examcloud.commons.web.support.ControllerSupport;
|
|
|
import cn.com.qmth.examcloud.core.print.api.PrintingProjectCloudService;
|
|
|
-import cn.com.qmth.examcloud.core.print.api.request.PrintingProjectListReq;
|
|
|
-import cn.com.qmth.examcloud.core.print.api.response.PrintingProjectListResp;
|
|
|
+import cn.com.qmth.examcloud.core.print.api.bean.SyncPrintingProjectBean;
|
|
|
+import cn.com.qmth.examcloud.core.print.api.request.SyncPrintingProjectReq;
|
|
|
+import cn.com.qmth.examcloud.core.print.api.response.SyncPrintingProjectResp;
|
|
|
+import cn.com.qmth.examcloud.core.print.common.utils.Check;
|
|
|
import cn.com.qmth.examcloud.core.print.service.PrintingProjectService;
|
|
|
+import cn.com.qmth.examcloud.core.print.service.bean.PrintingProjectInfo;
|
|
|
import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
@@ -30,10 +36,20 @@ public class PrintingProjectCloudServiceProvider extends ControllerSupport imple
|
|
|
@Autowired
|
|
|
private PrintingProjectService printingProjectService;
|
|
|
|
|
|
- @Override
|
|
|
- public PrintingProjectListResp printingProjectList(PrintingProjectListReq request) {
|
|
|
- //to do
|
|
|
- return new PrintingProjectListResp();
|
|
|
+ @PostMapping("/sync")
|
|
|
+ @ApiOperation(value = "同步更新印刷项目信息")
|
|
|
+ public SyncPrintingProjectResp syncPrintingProject(@RequestBody SyncPrintingProjectReq request) {
|
|
|
+ Check.isNull(request, "请求参数不能为空!");
|
|
|
+
|
|
|
+ PrintingProjectInfo info = new PrintingProjectInfo();
|
|
|
+ SyncPrintingProjectBean bean = request.getBean();
|
|
|
+ info.setOrgId(bean.getOrgId());
|
|
|
+ info.setOrgName(bean.getOrgName());
|
|
|
+ info.setExamId(bean.getExamId());
|
|
|
+ info.setExamName(bean.getExamName());
|
|
|
+ printingProjectService.syncPrintingProject(info);
|
|
|
+
|
|
|
+ return new SyncPrintingProjectResp();
|
|
|
}
|
|
|
|
|
|
}
|