|
|
@@ -495,14 +495,29 @@ public interface YiZhuLuRuDao {
|
|
|
@Param("userCode") String userCode);
|
|
|
|
|
|
@Update("update yz_act_order " +
|
|
|
- "set modifier = #{userCode}, " +
|
|
|
- " end_time = #{date}," +
|
|
|
+ "set modifier = #{userCode}, " +
|
|
|
+ " end_time = #{date}, " +
|
|
|
+ " exclu_act_order_no = #{orderNo}, " +
|
|
|
+ " status_flag = '5' " +
|
|
|
+ "where inpatient_no = #{patNo} " +
|
|
|
+ " and admiss_times = #{times} " +
|
|
|
+ " and status_flag in ('1', '2') " +
|
|
|
+ " and act_order_no <> #{orderNo} " +
|
|
|
+ " and act_order_no < #{orderNo}" +
|
|
|
+ " AND (end_time IS NULL ) ")
|
|
|
+ void stopNotConfirmedOrder(String patNo, Integer times, Date date, String userCode, BigDecimal orderNo);
|
|
|
+
|
|
|
+ @Update("update yz_act_order " +
|
|
|
+ "set modifier = #{userCode}, " +
|
|
|
+ " end_time = #{date}, " +
|
|
|
" exclu_act_order_no = #{orderNo} " +
|
|
|
"where inpatient_no = #{patNo} " +
|
|
|
- " and admiss_times = #{times}" +
|
|
|
+ " and admiss_times = #{times} " +
|
|
|
+ " and status_flag in ('3', '4') " +
|
|
|
" and frequ_code != 'ONCE' " +
|
|
|
- " AND status_flag IN (3, 4, 5) " +
|
|
|
- " and isnull(end_time, dateadd(day, 1, #{date})) >= #{date} ")
|
|
|
+ " and act_order_no <> #{orderNo} " +
|
|
|
+ " and act_order_no < #{orderNo} " +
|
|
|
+ " AND (end_time IS NULL or end_time < #{date}) ")
|
|
|
void stopOrder(String patNo, Integer times, Date date, String userCode, BigDecimal orderNo);
|
|
|
|
|
|
@Update("update yz_act_order " +
|
|
|
@@ -1380,26 +1395,26 @@ public interface YiZhuLuRuDao {
|
|
|
void associateOrders(BigDecimal children, XinZhenYzActOrder order);
|
|
|
|
|
|
|
|
|
- @Select("SELECT a.gen_time,\n" +
|
|
|
- " inpatient_no,\n" +
|
|
|
- " admiss_times,\n" +
|
|
|
- " ledger_sn,\n" +
|
|
|
- " a.detail_sn,\n" +
|
|
|
- " a.charge_date,\n" +
|
|
|
- " a.charge_code_mx,\n" +
|
|
|
- " charge_code_name = (case\n" +
|
|
|
- " when serial = '99' or serial = '01'\n" +
|
|
|
- " then (select top 1 rtrim(name)\n" +
|
|
|
- " from yp_zd_dict\n" +
|
|
|
- " where code = charge_code_mx\n" +
|
|
|
- " and yp_zd_dict.serial = a.serial)\n" +
|
|
|
- " else (select rtrim(name) from zd_charge_item where code = charge_code_mx) end),\n" +
|
|
|
- " a.charge_fee,\n" +
|
|
|
- " a.charge_status,\n" +
|
|
|
- " a.serial,\n" +
|
|
|
- " charge_amount=a.charge_amount,\n" +
|
|
|
- " exec_dept=(select name from zd_unit_code where code = a.exec_unit),\n" +
|
|
|
- " dept_code = (select name from zd_unit_code where code = a.ward_code),\n" +
|
|
|
+ @Select("SELECT a.gen_time, " +
|
|
|
+ " inpatient_no, " +
|
|
|
+ " admiss_times, " +
|
|
|
+ " ledger_sn, " +
|
|
|
+ " a.detail_sn, " +
|
|
|
+ " a.charge_date, " +
|
|
|
+ " a.charge_code_mx, " +
|
|
|
+ " charge_code_name = (case " +
|
|
|
+ " when serial = '99' or serial = '01' " +
|
|
|
+ " then (select top 1 rtrim(name) " +
|
|
|
+ " from yp_zd_dict " +
|
|
|
+ " where code = charge_code_mx " +
|
|
|
+ " and yp_zd_dict.serial = a.serial) " +
|
|
|
+ " else (select rtrim(name) from zd_charge_item where code = charge_code_mx) end), " +
|
|
|
+ " a.charge_fee, " +
|
|
|
+ " a.charge_status, " +
|
|
|
+ " a.serial, " +
|
|
|
+ " charge_amount=a.charge_amount, " +
|
|
|
+ " exec_dept=(select name from zd_unit_code where code = a.exec_unit), " +
|
|
|
+ " dept_code = (select name from zd_unit_code where code = a.ward_code), " +
|
|
|
" isnull(a.ori_detail_sn, 0) as ori_detail_sn " +
|
|
|
"FROM zy_detail_charge a " +
|
|
|
"where order_no = #{yz.actOrderNo} " +
|