|
@@ -75,7 +75,7 @@ public interface MenZhengXiangMuDao {
|
|
|
@Param("endTime") String endTime,
|
|
|
@Param("dept") String dept);
|
|
|
|
|
|
- @Select("SELECT patient_id=a.patient_id, " +
|
|
|
+ @Select("SELECT patient_id=rtrim(a.patient_id), " +
|
|
|
" times=a.times, " +
|
|
|
" receipt_no=a.receipt_no, " +
|
|
|
" order_no=a.order_no, " +
|
|
@@ -99,7 +99,7 @@ public interface MenZhengXiangMuDao {
|
|
|
" " +
|
|
|
"union " +
|
|
|
" " +
|
|
|
- "SELECT patient_id=a.patient_id, " +
|
|
|
+ "SELECT patient_id=rtrim(a.patient_id), " +
|
|
|
" times =a.times, " +
|
|
|
" receipt_no=a.receipt_no, " +
|
|
|
" order_no=a.order_no, " +
|
|
@@ -123,7 +123,7 @@ public interface MenZhengXiangMuDao {
|
|
|
" isnull(a.req_no,0) > 0 " +
|
|
|
"union " +
|
|
|
" " +
|
|
|
- "SELECT patient_id=a.patient_id, " +
|
|
|
+ "SELECT patient_id=rtrim(a.patient_id), " +
|
|
|
" times =a.times, " +
|
|
|
" receipt_no=a.receipt_no, " +
|
|
|
" order_no=a.order_no, " +
|
|
@@ -152,7 +152,7 @@ public interface MenZhengXiangMuDao {
|
|
|
|
|
|
@Select("SELECT req_no =a.req_no, " +
|
|
|
" je =sum(round(quantity * unit_price,2)), " +
|
|
|
- " charge_date=max(a.charge_date) " +
|
|
|
+ " charge_date=max(a.charge_date) " +
|
|
|
"FROM mz_charge_detail a ,zd_charge_item b " +
|
|
|
"where a.serial_no =#{serialNo} and " +
|
|
|
" a.pay_mark='0' and " +
|
|
@@ -192,7 +192,8 @@ public interface MenZhengXiangMuDao {
|
|
|
@Param("reqNo") Integer reqNo);
|
|
|
|
|
|
@Select("<script>" +
|
|
|
- "select req_no,confirm_flag,charge_item_code,bill_item_code,patient_id,times,charge_date from mz_charge_detail where req_no in" +
|
|
|
+ "select req_no,confirm_flag,charge_item_code,bill_item_code,rtrim(patient_id) patient_id,times,charge_date,item_no,receipt_no,order_no from mz_charge_detail " +
|
|
|
+ "where req_no in" +
|
|
|
"<foreach collection='list' item='item' index='index' open='(' close=')' separator=','>" +
|
|
|
"#{item}" +
|
|
|
"</foreach>" +
|
|
@@ -210,7 +211,7 @@ public interface MenZhengXiangMuDao {
|
|
|
|
|
|
@Update("<script>" +
|
|
|
"<foreach collection='list' item='item' separator=';'> " +
|
|
|
- "update ${tableName} " +
|
|
|
+ "update mz_charge_detail " +
|
|
|
"<set>" +
|
|
|
" confirm_flag = #{item.confirmFlag} , receive_flag = #{item.confirmFlag} " +
|
|
|
"<choose>" +
|
|
@@ -218,18 +219,45 @@ public interface MenZhengXiangMuDao {
|
|
|
",confirm_time =getdate() , exec_dept =#{execDept},confirm_id =#{confirmId}" +
|
|
|
"</when>" +
|
|
|
"<otherwise>" +
|
|
|
- ",confirm_time = null , exec_dept = null,confirm_id = null" +
|
|
|
+ ",confirm_time = null,confirm_id = null" + // , exec_dept = null
|
|
|
"</otherwise>" +
|
|
|
"</choose>" +
|
|
|
"</set>" +
|
|
|
"where " +
|
|
|
- "patient_id = #{item.patientId} and times =#{item.times} and req_no =#{item.reqNo}" +
|
|
|
+ "patient_id = #{item.patientId} and times =#{item.times} " +
|
|
|
+ "and item_no = #{item.itemNo} and charge_item_code = #{item.chargeItemCode} " +
|
|
|
+ "and receipt_no = #{item.receiptNo} and order_no = #{item.orderNo} " +
|
|
|
+ "and req_no =#{item.reqNo} " +
|
|
|
"</foreach>" +
|
|
|
"</script>")
|
|
|
void xiangMuQueRenHuoQuXiao(@Param("list") List<MzChargeDetail> list,
|
|
|
@Param("confirmId") String confirmId,
|
|
|
- @Param("execDept") String execDept,
|
|
|
- @Param("tableName") String tableName);
|
|
|
+ @Param("execDept") String execDept);
|
|
|
+
|
|
|
|
|
|
+ @Update("<script>" +
|
|
|
+ "<foreach collection='list' item='item' separator=';'> " +
|
|
|
+ "update mz_yj_req " +
|
|
|
+ "<set>" +
|
|
|
+ " confirm_flag = #{item.confirmFlag} , receive_flag = #{item.confirmFlag} " +
|
|
|
+ "<choose>" +
|
|
|
+ "<when test=\"item.confirmFlag == 1\">" +
|
|
|
+ ",confirm_time =getdate() , exec_dept =#{execDept},confirm_id =#{confirmId}" +
|
|
|
+ "</when>" +
|
|
|
+ "<otherwise>" +
|
|
|
+ ",confirm_time = null ,confirm_id = null" + // , exec_dept = null
|
|
|
+ "</otherwise>" +
|
|
|
+ "</choose>" +
|
|
|
+ "</set>" +
|
|
|
+ "where " +
|
|
|
+ "patient_id = #{item.patientId} and times =#{item.times} " +
|
|
|
+ "and item_no = #{item.itemNo} " +
|
|
|
+ "and receipt_no = #{item.receiptNo} and order_no = #{item.orderNo} " +
|
|
|
+ "and req_no =#{item.reqNo} " +
|
|
|
+ "</foreach>" +
|
|
|
+ "</script>")
|
|
|
+ void xiangMuQueRenYjReq(@Param("list") List<MzChargeDetail> list,
|
|
|
+ @Param("confirmId") String confirmId,
|
|
|
+ @Param("execDept") String execDept);
|
|
|
|
|
|
}
|