|
@@ -0,0 +1,55 @@
|
|
|
+package com.diagbot.web;
|
|
|
+
|
|
|
+import com.diagbot.annotation.SysLogger;
|
|
|
+import com.diagbot.facade.InquiryMsgFacade;
|
|
|
+import com.diagbot.yujian.entity.wrapper.InquiryMsgWrapper;
|
|
|
+import com.diagbot.yujian.response.LsData;
|
|
|
+import com.diagbot.yujian.util.Response;
|
|
|
+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;
|
|
|
+
|
|
|
+
|
|
|
+@RestController
|
|
|
+@RequestMapping("/inquiryMsg")
|
|
|
+public class InquiryMsgController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private InquiryMsgFacade inquiryMsgFacade;
|
|
|
+
|
|
|
+ @PostMapping(value = "/saveinquirymsg_yujian")
|
|
|
+ @SysLogger("saveInquiryMsg")
|
|
|
+ public LsData saveInquiryMsg(@RequestBody String patdescribe) throws Exception {
|
|
|
+ Response<Object> response = new Response<Object>();
|
|
|
+ response.start();
|
|
|
+ LsData lsData=new LsData();
|
|
|
+ try {
|
|
|
+ if(patdescribe!=null){
|
|
|
+ InquiryMsgWrapper infomsg=new InquiryMsgWrapper();
|
|
|
+ infomsg.setPatDescribe(patdescribe);
|
|
|
+ boolean a = inquiryMsgFacade.insertInquiryMsg(infomsg);
|
|
|
+ if (a == false){
|
|
|
+ lsData.setRet(1);
|
|
|
+ lsData.setMsg("失败");
|
|
|
+ }else{
|
|
|
+ lsData.setRet(0);
|
|
|
+ lsData.setMsg("成功");
|
|
|
+ }
|
|
|
+ return lsData;
|
|
|
+ }else{
|
|
|
+ lsData.setRet(1);
|
|
|
+ lsData.setMsg("发送数据为空");
|
|
|
+ return lsData;
|
|
|
+ }
|
|
|
+ } catch (Exception loadException) {
|
|
|
+ loadException.printStackTrace();
|
|
|
+ lsData.setRet(1);
|
|
|
+ lsData.setMsg("数据写入出错:"+loadException.getMessage());
|
|
|
+ return lsData;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|