ソースを参照

用户信息采集

15376779826 1 週間 前
コミット
4caf73350e

+ 17 - 4
fs-doctor-app/src/main/java/com/fs/app/controller/FsUserInformationCollectionController.java

@@ -26,6 +26,7 @@ public class FsUserInformationCollectionController extends  AppBaseController {
 
         return R.ok().put("data", fsUserInformationCollection);
     }
+    //医生确认
     @PostMapping("/doctorConfirm")
     public R doctorConfirm(@RequestBody FsUserInformationCollection collection){
         return fsUserInformationCollectionService.doctorConfirm(collection);
@@ -33,13 +34,25 @@ public class FsUserInformationCollectionController extends  AppBaseController {
 
     @GetMapping("/getCollectionList")
     private R getCollectionList(UserInformationDoctorType2Param userInformationDoctorType2Param) {
+
         PageHelper.startPage(userInformationDoctorType2Param.getPageNum(), userInformationDoctorType2Param.getPageSize());
-        userInformationDoctorType2Param.setDoctorType2Id(Long.parseLong(getDoctorId()));
-        List<FsUserInformationCollection> fsUserInformationCollections = fsUserInformationCollectionService.selectFsUserInformationCollectionByDoctorType2(userInformationDoctorType2Param);
-        PageInfo<FsUserInformationCollection> listPageInfo=new PageInfo<>(fsUserInformationCollections);
-        return R.ok().put("data",listPageInfo);
+        if (userInformationDoctorType2Param.getDoctorType()==2){
+            userInformationDoctorType2Param.setDoctorType2Id(Long.parseLong(getDoctorId()));
+            List<FsUserInformationCollection> fsUserInformationCollections = fsUserInformationCollectionService.selectFsUserInformationCollectionByDoctorType2(userInformationDoctorType2Param);
+            PageInfo<FsUserInformationCollection> listPageInfo=new PageInfo<>(fsUserInformationCollections);
+            return R.ok().put("data",listPageInfo);
+        }else if (userInformationDoctorType2Param.getDoctorType()==1){
+            userInformationDoctorType2Param.setDoctorId(Long.parseLong(getDoctorId()));
+            List<FsUserInformationCollection> fsUserInformationCollections = fsUserInformationCollectionService.selectFsUserInformationCollectionByDoctorType1(userInformationDoctorType2Param);
+            PageInfo<FsUserInformationCollection> listPageInfo=new PageInfo<>(fsUserInformationCollections);
+            return R.ok().put("data",listPageInfo);
+        }
+        return R.ok().put("data",null);
+
     }
 
+
+    //药师确认
     @PostMapping("/doctorType2Confirm")
     public R doctorType2Confirm(@RequestBody FsUserInformationCollection collection){
         return fsUserInformationCollectionService.doctorType2Confirm(collection);

+ 1 - 0
fs-service/src/main/java/com/fs/his/mapper/FsUserInformationCollectionMapper.java

@@ -98,4 +98,5 @@ public interface FsUserInformationCollectionMapper extends BaseMapper<FsUserInfo
     FsUserInformationCollectionDTO selectFsUserInformationCollectionDTOById(Long id);
 
     List<FsUserInformationCollection>selectFsUserInformationCollectionByDoctorType2(@Param("maps") UserInformationDoctorType2Param userInformationDoctorType2Param);
+    List<FsUserInformationCollection>selectFsUserInformationCollectionByDoctorType1(@Param("maps") UserInformationDoctorType2Param userInformationDoctorType2Param);
 }

+ 3 - 0
fs-service/src/main/java/com/fs/his/param/UserInformationDoctorType2Param.java

@@ -10,4 +10,7 @@ public class UserInformationDoctorType2Param extends BaseParam implements Serial
     private String patientName;
     private String packageOrderCode;
     private Long doctorType2Id;
+    private Long doctorType;
+    private Long doctorId;
+    private Integer doctorConfirm;
 }

+ 1 - 0
fs-service/src/main/java/com/fs/his/service/IFsUserInformationCollectionService.java

@@ -41,6 +41,7 @@ public interface IFsUserInformationCollectionService extends IService<FsUserInfo
     List<FsUserInformationCollection> selectFsUserInformationCollectionList(FsUserInformationCollection fsUserInformationCollection);
 
     List<FsUserInformationCollection> selectFsUserInformationCollectionByDoctorType2(UserInformationDoctorType2Param userInformationDoctorType2Param);
+    List<FsUserInformationCollection> selectFsUserInformationCollectionByDoctorType1(UserInformationDoctorType2Param userInformationDoctorType2Param);
 
     /**
      * 新增用户信息采集

+ 8 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsUserInformationCollectionServiceImpl.java

@@ -177,6 +177,11 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
     public List<FsUserInformationCollection> selectFsUserInformationCollectionByDoctorType2(UserInformationDoctorType2Param userInformationDoctorType2Param) {
         return fsUserInformationCollectionMapper.selectFsUserInformationCollectionByDoctorType2(userInformationDoctorType2Param);
 
+    }
+    @Override
+    public List<FsUserInformationCollection> selectFsUserInformationCollectionByDoctorType1(UserInformationDoctorType2Param userInformationDoctorType2Param) {
+        return fsUserInformationCollectionMapper.selectFsUserInformationCollectionByDoctorType1(userInformationDoctorType2Param);
+
     }
 
     /**
@@ -560,6 +565,9 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
         map.setDoctorConfirmTime(DateUtils.getNowDate());
         //写入药师签名
         FsDoctor fsDoctor = doctorMapper.selectFsDoctorByDoctorId(fsUserInformationCollection.getDoctorType2Id());
+        if(fsDoctor.getDoctorType()!=2){
+            return R.error("不是药师身份,无法确认");
+        }
         map.setDoctorType2Sign(fsDoctor.getSignUrl());
         map.setDoctorAdvice(collection.getDoctorAdvice());
         if (answerVOS != null && !answerVOS.isEmpty()) {

+ 10 - 1
fs-service/src/main/resources/mapper/his/FsUserInformationCollectionMapper.xml

@@ -92,11 +92,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         select fui.*,fp.patient_name as patientName from fs_user_information_collection fui left join fs_patient fp on fui.patient_id = fp.patient_id
             <where>
                 <if test="maps.doctorType2Id != null and maps.doctorType2Id != ''"> and fui.doctor_type2_id = #{maps.doctorType2Id}</if>
-                <if test="maps.doctorType2Confirm != null and maps.doctorType2Confirm != ''"> and fui.doctor_type2_confirm = #{maps.doctorType2Confirm}</if>
+                <if test="maps.doctorType2Confirm != null"> and fui.doctor_type2_confirm = #{maps.doctorType2Confirm}</if>
                 <if test="maps.packageOrderCode != null  and maps.packageOrderCode != ''"> and fui.package_order_code = #{maps.packageOrderCode}</if>
             </where>
 
     </select>
+    <select id="selectFsUserInformationCollectionByDoctorType1"
+            resultType="com.fs.his.domain.FsUserInformationCollection">
+        select fui.*,fp.patient_name as patientName from fs_user_information_collection fui left join fs_patient fp on fui.patient_id = fp.patient_id
+        <where>
+            <if test="maps.doctorId != null and maps.doctorId != ''"> and fui.doctor_id = #{maps.doctorId}</if>
+            <if test="maps.doctorConfirm != null"> and fui.doctor_confirm = #{maps.doctorConfirm}</if>
+            <if test="maps.packageOrderCode != null  and maps.packageOrderCode != ''"> and fui.package_order_code = #{maps.packageOrderCode}</if>
+        </where>
+    </select>
 
     <insert id="insertFsUserInformationCollection" parameterType="FsUserInformationCollection" useGeneratedKeys="true" keyProperty="id">
         insert into fs_user_information_collection