Jelajahi Sumber

1.处方审核记录审核通过去除拒方原因 2.修改医生消息排序业务 3.修改查询处方业务

wjj 2 minggu lalu
induk
melakukan
96e6065675

+ 2 - 2
fs-service/src/main/java/com/fs/his/mapper/FsPrescribeMapper.java

@@ -96,7 +96,7 @@ public interface FsPrescribeMapper
     @Select({"<script> " +
             "select p.*,d.doctor_name  from fs_prescribe p    " +
             " left join fs_doctor d on d.doctor_id = p.doctor_id " +
-            " where p.prescribe_img_url is not null " +
+            "where 1=1  " +
             "<if test = ' maps.patientName!=null and maps.patientName != \"\"  '> " +
             "and p.patient_name like concat('%', #{maps.patientName}, '%') " +
             "</if>" +
@@ -127,7 +127,7 @@ public interface FsPrescribeMapper
             "<if test='maps.endTime != null and maps.endTime != \"\" '>" +
             "AND date_format(p.create_time,'%y%m%d') &lt;= date_format(#{maps.endTime},'%y%m%d')  " +
             "</if>" +
-            " order by p.create_time desc "+
+            " order by p.status asc, p.create_time desc "+
             "</script>"})
     List<FsPrescribeListDVO> selectFsPrescribeListDVO(@Param("maps") FsPrescribeListDParam param);
     @Select({"<script> " +

+ 3 - 1
fs-service/src/main/java/com/fs/his/service/impl/FsPrescribeServiceImpl.java

@@ -1032,7 +1032,9 @@ public class FsPrescribeServiceImpl implements IFsPrescribeService
         prescribeRecord.setDrugDoctorId(prescribe.getDrugDoctorId());
         prescribeRecord.setPrescribeImgUrl(prescribe.getPrescribeImgUrl());
         prescribeRecord.setStatus(param.getStatus());
-        prescribeRecord.setAuditReason(param.getAuditReason());
+        if (prescribe.getStatus() == 2) {
+            prescribeRecord.setAuditReason(param.getAuditReason());
+        }
         prescribeRecord.setCreateTime(DateUtils.getNowDate());
         prescribeRecord.setDoctorName(vo.getDoctorName());
         prescribeRecord.setDrugDoctorName(vo.getDoctorDrugName());

+ 1 - 1
fs-service/src/main/resources/mapper/doctor/DoctorMsgMapper.xml

@@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isRead != null "> and is_read = #{isRead}</if>
             <if test="doctorId != null "> and doctor_id = #{doctorId}</if>
         </where>
-        order by id desc
+        order by is_read asc, id desc
     </select>
     
     <select id="selectDoctorMsgById" parameterType="Long" resultMap="DoctorMsgResult">