Ver Fonte

fix:w完善

Ciallo há 8 meses atrás
pai
commit
5c7a24d013

+ 10 - 3
ruoyi-admin/src/main/java/com/ruoyi/web/work/api/Api_ObrController.java

@@ -1,6 +1,9 @@
 package com.ruoyi.web.work.api;
 
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.web.work.api.config.BaseController;
+import com.ruoyi.web.work.domain.Obr;
 import com.ruoyi.web.work.mapper.ObrMapper;
 import com.ruoyi.web.work.service.IObrService;
 import io.swagger.annotations.Api;
@@ -8,18 +11,22 @@ import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.List;
+
 @Api(tags = "小程序科室申请管理")
 @RestController
 @RequestMapping("/app/obr")
-public class Api_ObrController {
+public class Api_ObrController extends BaseController {
 
     @Autowired
     private IObrService obrService;
 
     @ApiOperation(value = "根据就诊卡号获取科室申请")
     @GetMapping("/department/{card}")
-    public AjaxResult getObrByCard(@PathVariable("card") String card) {
-        return obrService.getObrByCard(card);
+    public TableDataInfo getObrByCard(@PathVariable("card") String card) {
+        startPage();
+        List<Obr> obrList = obrService.getObrByCard(card);
+        return getDataTable(obrList);
     }
 
 }

+ 3 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/work/api/Api_Pv1Controller.java

@@ -27,9 +27,10 @@ public class Api_Pv1Controller extends BaseController {
     @GetMapping("/record")
     public TableDataInfo getMedicalRecord(@RequestParam("beginTime") String beginTime,
                                           @RequestParam("endTime") String endTime,
-                                          @RequestParam("patientId") Long patientId){
+                                          @RequestParam("patientId") String patientId){
         startPage();
-        List<Pv1MedicalRecord> pv1List=ipv1Service.getMedicalRecord(beginTime,endTime,patientId);
+        List<Pv1MedicalRecord> pv1List=ipv1Service.getMedicalRecord(beginTime,endTime,Long.parseLong(patientId));
+        System.out.println("patientId:"+Long.parseLong(patientId));
         return getDataTable(pv1List);
     }
 

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/work/service/IObrService.java

@@ -15,5 +15,5 @@ public interface IObrService extends IService<Obr>{
 
     List<Obr> selectList(Obr obr);
 
-    AjaxResult getObrByCard(String card);
+    List<Obr> getObrByCard(String card);
 }

+ 2 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/work/service/impl/ObrServiceImpl.java

@@ -32,7 +32,7 @@ public class ObrServiceImpl extends ServiceImpl<ObrMapper, Obr> implements IObrS
     }
 
     @Override
-    public AjaxResult getObrByCard(String card) {
-        return AjaxResult.success(obrMapper.getObrByCard(card));
+    public List<Obr> getObrByCard(String card) {
+        return obrMapper.getObrByCard(card);
     }
 }

+ 1 - 1
ruoyi-admin/src/main/resources/mapper/work/Pv1Mapper.xml

@@ -68,7 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         FROM tb_pv1
         where tb_pv1.patient_id=#{patientId}
         <if test="beginTime !=null and beginTime!='' and endTime!=null and endTime!=''">
-                and  tb_pv1.admission_time BETWEEN #{beginTime} and #{endTime};
+                and  tb_pv1.admission_time BETWEEN #{beginTime} and #{endTime}
         </if>
     </select>