Parcourir la source

药师端增加展示医生会诊单功能

cgp il y a 3 jours
Parent
commit
e18483043f

+ 12 - 0
fs-doctor-app/src/main/java/com/fs/app/controller/FsPrescribeDataScrmController.java

@@ -11,6 +11,7 @@ import com.fs.common.utils.StringUtils;
 import com.fs.common.utils.poi.ExcelUtil;
 import com.fs.his.domain.FsPrescribeDataScrm;
 import com.fs.his.dto.*;
+import com.fs.his.service.IFsPrescibeRecordDataScrmService;
 import com.fs.his.service.IFsPrescribeDataScrmService;
 import com.fs.his.vo.CustomerInfoVO;
 import com.fs.his.vo.DoctorSignVO;
@@ -39,6 +40,9 @@ public class FsPrescribeDataScrmController extends BaseController
     @Autowired
     private IFsPrescribeDataScrmService fsPrescribeScrmService;
 
+    @Autowired
+    private IFsPrescibeRecordDataScrmService recordDataScrmService;
+
     @Autowired
     private IFsCompanyCustomerService fsCompanyCustomerService;
 
@@ -239,6 +243,14 @@ public class FsPrescribeDataScrmController extends BaseController
         }
         return AjaxResult.error("网络错误,提交失败");
     }
+
+    /**
+     * 药师--获取商城处方审核记录数据
+     * */
+    @GetMapping("/getAuditScrmPrescribeRecordList/{prescribeId}")
+    public AjaxResult getAuditRecordList(@PathVariable("prescribeId") Long prescribeId) {
+        return AjaxResult.success(recordDataScrmService.getAuditScrmPrescribeRecordListByPrescribeId(prescribeId));
+    }
     /**
      * 获取当前登录医生id
      * */

+ 8 - 0
fs-service/src/main/java/com/fs/his/mapper/FsPrescibeRecordDataScrmMapper.java

@@ -57,4 +57,12 @@ public interface FsPrescibeRecordDataScrmMapper {
      * @return 结果
      */
     public int deleteFsPrescibeRecordDataScrmByIds(Long[] ids);
+
+    /**
+     * 查询商城处方记录表列表
+     *
+     * @param prescribeId 处方ID
+     * @return 商城处方记录表集合
+     */
+    List<FsPrescibeRecordDataScrm> selectAuditScrmPrescribeRecordListByPrescribeId(Long prescribeId);
 }

+ 5 - 0
fs-service/src/main/java/com/fs/his/service/IFsPrescibeRecordDataScrmService.java

@@ -57,4 +57,9 @@ public interface IFsPrescibeRecordDataScrmService {
      * @return 结果
      */
     public int deleteFsPrescibeRecordDataScrmById(Long id);
+
+    /**
+     * 根据处方id查询处方审核记录
+     * */
+    List<FsPrescibeRecordDataScrm> getAuditScrmPrescribeRecordListByPrescribeId(Long prescribeId);
 }

+ 12 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsPrescibeRecordDataScrmServiceImpl.java

@@ -3,8 +3,11 @@ package com.fs.his.service.impl;
 import com.fs.his.domain.FsPrescibeRecordDataScrm;
 import com.fs.his.mapper.FsPrescibeRecordDataScrmMapper;
 import com.fs.his.service.IFsPrescibeRecordDataScrmService;
+import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+
+import java.util.Collections;
 import java.util.List;
 
 /**
@@ -83,4 +86,13 @@ public class FsPrescibeRecordDataScrmServiceImpl implements IFsPrescibeRecordDat
     public int deleteFsPrescibeRecordDataScrmById(Long id) {
         return fsPrescibeRecordDataScrmMapper.deleteFsPrescibeRecordDataScrmById(id);
     }
+
+    @Override
+    public List<FsPrescibeRecordDataScrm> getAuditScrmPrescribeRecordListByPrescribeId(Long prescribeId) {
+        List<FsPrescibeRecordDataScrm> recordDataScrmList=fsPrescibeRecordDataScrmMapper.selectAuditScrmPrescribeRecordListByPrescribeId(prescribeId);
+        if (CollectionUtils.isEmpty(recordDataScrmList)){
+            return Collections.emptyList();
+        }
+        return recordDataScrmList;
+    }
 }

+ 3 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsPrescribeDataScrmServiceImpl.java

@@ -189,6 +189,9 @@ public class FsPrescribeDataScrmServiceImpl implements IFsPrescribeDataScrmServi
         //生成商城处方单的审核记录
         FsPrescibeRecordDataScrm record = new FsPrescibeRecordDataScrm();
         BeanCopyUtils.copy(prescribeDataScrm, record);
+        Date nowDate = DateUtils.getNowDate();
+        record.setCreateTime(nowDate);
+        record.setUpdateTime(nowDate);
         fsPrescibeRecordDataScrmMapper.insertFsPrescibeRecordDataScrm(record);
         //清除处方图片(这里清除的都是只有医生签名的处方图片)
         clearPrescriptionImage(updateDto.getPrescribeId());

+ 7 - 0
fs-service/src/main/resources/mapper/his/FsPrescibeRecordDataScrmMapper.xml

@@ -66,6 +66,13 @@
         <include refid="selectFsPrescibeRecordDataScrmVo"/>
         where id = #{id}
     </select>
+    <select id="selectAuditScrmPrescribeRecordListByPrescribeId"
+            resultType="com.fs.his.domain.FsPrescibeRecordDataScrm">
+        select fprds.*, fd.doctor_name as doctorName
+        from fs_prescibe_record_data_scrm fprds left join fs_doctor fd
+        on fprds.doctor_id = fd.doctor_id
+        where fprds.prescribe_id = #{prescribeId}
+    </select>
 
     <insert id="insertFsPrescibeRecordDataScrm" parameterType="FsPrescibeRecordDataScrm" useGeneratedKeys="true" keyProperty="id">
         insert into fs_prescibe_record_data_scrm