|
@@ -1,5 +1,7 @@
|
|
|
package thyyxxk.webserver.dao.his.zhuyuanyisheng;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.Constants;
|
|
|
import org.apache.ibatis.annotations.*;
|
|
|
import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
|
|
|
import thyyxxk.webserver.entity.datamodify.YzActOrder;
|
|
@@ -174,78 +176,22 @@ public interface YiZhuLuRuDao {
|
|
|
" select top ${pageSize} * " +
|
|
|
" from (select row_number() over (order by act_order_no) rowIndex, * " +
|
|
|
" from yz_act_order a with (NOLOCK) " +
|
|
|
- " where inpatient_no = #{patNo} " +
|
|
|
- " and admiss_times = #{times} " +
|
|
|
- "<if test=\"orderName != null and orderName != '' \">" +
|
|
|
- " and order_name = #{orderName}" +
|
|
|
- "</if>" +
|
|
|
- "<if test=\"startTime != null and startTime != '' \"> " +
|
|
|
- " and order_time >= #{startTime} and order_time <= #{endTime}" +
|
|
|
- "</if>" +
|
|
|
- "<if test=\"frequCode != null and frequCode != '' \">" +
|
|
|
- " and frequ_code = #{frequCode}" +
|
|
|
- "</if>" +
|
|
|
- "<if test=\"zhuangTai != 0 and zhuangTai != 3 and zhuangTai != 6 and zhuangTai != 7 \">" +
|
|
|
- " and status_flag = #{zhuangTai} /*触发*/" +
|
|
|
- "</if>" +
|
|
|
- "<if test=\"zhuangTai == 3 \">" +
|
|
|
- " and status_flag in (3,4) " +
|
|
|
- "</if>" +
|
|
|
- "<if test=\"zhuangTai == 6 \">" +
|
|
|
- " and frequ_code <> 'ONCE' and end_time is null and doctor_flag = '1' and status_flag <> '5' " +
|
|
|
- "</if>" +
|
|
|
- "<if test=\"zhuangTai == 7 \">" +
|
|
|
- " and doctor_flag = '1' and status_flag >= '2' and start_time >= dateadd(hour , -24, getdate()) " +
|
|
|
- "</if>" +
|
|
|
+ " ${ew.customSqlSegment} " +
|
|
|
" ) page " +
|
|
|
" where rowIndex > (${currentPage} - 1) * ${pageSize} " +
|
|
|
" ) temp" +
|
|
|
"</script>")
|
|
|
List<YzActOrder> huoQuYiZhuShuJu(@Param("currentPage") long currentPage,
|
|
|
@Param("pageSize") long pageSize,
|
|
|
- @Param("patNo") String patNo,
|
|
|
- @Param("times") Integer times,
|
|
|
- @Param("startTime") String startTime,
|
|
|
- @Param("endTime") String endTime,
|
|
|
- @Param("frequCode") String frequCode,
|
|
|
- @Param("orderName") String orderName,
|
|
|
- @Param("zhuangTai") Integer zhuangTai);
|
|
|
+ @Param(Constants.WRAPPER) Wrapper<?> wq);
|
|
|
|
|
|
|
|
|
@Select("<script>" +
|
|
|
"select count(1) " +
|
|
|
"from yz_act_order a with (NOLOCK) " +
|
|
|
- "where inpatient_no = #{patNo} " +
|
|
|
- " and admiss_times = #{times} " +
|
|
|
- "<if test=\"orderName != null and orderName != '' \">" +
|
|
|
- " and order_name = #{orderName}" +
|
|
|
- "</if>" +
|
|
|
- "<if test=\"startTime != null and startTime != '' \"> " +
|
|
|
- " and order_time >= #{startTime} and order_time <= #{endTime}" +
|
|
|
- "</if>" +
|
|
|
- "<if test=\"frequCode != null and frequCode != '' \">" +
|
|
|
- " and frequ_code = #{frequCode}" +
|
|
|
- "</if>" +
|
|
|
- "<if test=\"zhuangTai != 0 and zhuangTai != 3 and zhuangTai != 6 and zhuangTai != 7 \">" +
|
|
|
- " and status_flag = #{zhuangTai} /*触发*/" +
|
|
|
- "</if>" +
|
|
|
- "<if test=\"zhuangTai == 3 \">" +
|
|
|
- " and status_flag in (3,4) " +
|
|
|
- "</if>" +
|
|
|
- "<if test=\"zhuangTai == 6 \">" +
|
|
|
- " and frequ_code <> 'ONCE' and end_time is null and doctor_flag = '1' and status_flag <> '5' " +
|
|
|
- "</if>" +
|
|
|
- "<if test=\"zhuangTai == 7 \">" +
|
|
|
- " and doctor_flag = '1' and status_flag >= '2' and start_time >= dateadd(hour , -24, getdate()) " +
|
|
|
- "</if>" +
|
|
|
+ " ${ew.customSqlSegment} " +
|
|
|
"</script>")
|
|
|
- long huoQuYiZhuShuJuTotal(@Param("patNo") String patNo,
|
|
|
- @Param("times") Integer times,
|
|
|
- @Param("startTime") String startTime,
|
|
|
- @Param("endTime") String endTime,
|
|
|
- @Param("frequCode") String frequCode,
|
|
|
- @Param("orderName") String orderName,
|
|
|
- @Param("zhuangTai") Integer zhuangTai);
|
|
|
+ long huoQuYiZhuShuJuTotal(@Param(Constants.WRAPPER) Wrapper<?> wq);
|
|
|
|
|
|
|
|
|
@Select("SELECT distinct py_code=a.py_code, " +
|
|
@@ -513,55 +459,20 @@ public interface YiZhuLuRuDao {
|
|
|
"<foreach collection='list' item='item' separator=','>" +
|
|
|
"(#{item.orderCode}, #{item.orderName}, #{item.frequCode}, #{item.instruction}, #{item.discription}, #{infantFlag}, #{item.orderTime}, " +
|
|
|
" #{inputCode}, #{item.startTime}, #{item.drugSpecification}, " +
|
|
|
- "<if test=\"item.drugQuan != null \">" +
|
|
|
"#{item.drugQuan}," +
|
|
|
- "</if>" +
|
|
|
- "<if test=\"item.drugQuan == null \">" +
|
|
|
- "null," +
|
|
|
- "</if>" +
|
|
|
" #{item.supplyCode}," +
|
|
|
" #{item.actOrderNo}, #{patNo}, #{times}, " +
|
|
|
- "<if test=\"item.drugFlag !=null and item.drugFlag != '' \">" +
|
|
|
"#{item.drugFlag}," +
|
|
|
- "</if>" +
|
|
|
- "<if test=\"item.drugFlag == null or item.drugFlag == '' \">" +
|
|
|
- "'o'," +
|
|
|
- "</if>" +
|
|
|
" #{inputCode}, " +
|
|
|
" getdate(), #{item.miniUnit}, " +
|
|
|
- "<if test=\"item.drugWeight != null\">" +
|
|
|
"#{item.drugWeight}, " +
|
|
|
- "</if>" +
|
|
|
- "<if test=\"item.drugWeight == null\">" +
|
|
|
- "null, " +
|
|
|
- "</if>" +
|
|
|
"#{item.drugWeightUnit}, '2', #{item.selfBuy}, " +
|
|
|
- "<if test=\"item.dose != null\">" +
|
|
|
"cast(#{item.dose,jdbcType=DECIMAL} as decimal(10,2))," +
|
|
|
- "</if>" +
|
|
|
- "<if test=\"item.dose == null\">" +
|
|
|
- "null," +
|
|
|
- "</if>" +
|
|
|
" #{item.doseUnit}, " +
|
|
|
- "<if test=\"item.drugOcc != null \">" +
|
|
|
"cast(#{item.drugOcc,jdbcType=DECIMAL} as decimal(10,2))," +
|
|
|
- "</if>" +
|
|
|
- "<if test=\"item.drugOcc == null \">" +
|
|
|
- "null," +
|
|
|
- "</if>" +
|
|
|
- "<if test=\"item.drugVolume != null\">" +
|
|
|
"cast(#{item.drugVolume,jdbcType=DECIMAL} as decimal(10,2))," +
|
|
|
- "</if>" +
|
|
|
- "<if test=\"item.drugVolume == null\">" +
|
|
|
- "null," +
|
|
|
- "</if>" +
|
|
|
" #{item.drugVolUnit}, 0, #{item.serial}, " +
|
|
|
- "<if test=\"item.serial == '00' \">" +
|
|
|
- "'00'," +
|
|
|
- "</if>" +
|
|
|
- "<if test=\"item.serial == '01' or item.serial == '09' \">" +
|
|
|
- "#{groupNo}," +
|
|
|
- "</if>" +
|
|
|
+ "#{item.groupNo}," +
|
|
|
"'1', #{item.execUnit}, " +
|
|
|
" #{deptCode}, #{wardCode}, '0', #{item.ybSelfFlag},#{item.emergencyFlag}, #{item.kfFlag}," +
|
|
|
"<if test=\"item.parentNo != null \">" +
|
|
@@ -570,21 +481,13 @@ public interface YiZhuLuRuDao {
|
|
|
"<if test=\"item.parentNo == null \">" +
|
|
|
"null," +
|
|
|
"</if>" +
|
|
|
- " #{referPhysician}, getdate(), #{inputCode}," +
|
|
|
- "<if test=\"item.endTime != null \">" +
|
|
|
- "#{item.endTime},#{inputCode} " +
|
|
|
- "</if>" +
|
|
|
- "<if test=\"item.endTime == null\">" +
|
|
|
- "null,null " +
|
|
|
- "</if>" +
|
|
|
- ")" +
|
|
|
+ " #{referPhysician}, getdate(), #{inputCode},#{item.endTime},#{item.modifier})" +
|
|
|
"</foreach>" +
|
|
|
"</script>")
|
|
|
void chaRuYiZhu(@Param("patNo") String patNo,
|
|
|
@Param("times") Integer times,
|
|
|
@Param("inputCode") String inputCode,
|
|
|
@Param("infantFlag") Integer infantFlag,
|
|
|
- @Param("groupNo") String groupNo,
|
|
|
@Param("deptCode") String deptCode,
|
|
|
@Param("wardCode") String wardCode,
|
|
|
@Param("referPhysician") String referPhysician,
|