|
@@ -18,7 +18,7 @@ public interface MzReceiptSerialMapper {
|
|
|
@Select(" select rtrim(patient_id) patient_id,times,receipt_no,serial_no,rtrim(operator_id) operator_id,charge1,charge2,charge3,charge4,charge5,charge6,charge7,charge8,charge9," +
|
|
|
"charge10,charge11,charge12,charge13,charge14,charge15,charge16,charge17,charge18,charge19,charge20,rtrim(pay_mark) pay_mark,total_charge,charge_date,rtrim(receipt_bill) receipt_bill," +
|
|
|
"receipt_sn,dcount_date,rtrim(windows_no) windows_no,dcount_no,serial_yb,rtrim(fp_flag) fp_flag,rtrim(responce_type) responce_type,rtrim(cheque_type) cheque_type," +
|
|
|
- "cheque_no,rtrim(tf_flag) tf_flag,dept_no,rtrim(pay_id) pay_id,charge_dcount_date,charge_dcount_no from mz_receipt_serial where patient_id =#{patientId,jdbcType=CHAR} and cheque_type ='Y' and operator_id <> '99999' " +
|
|
|
+ "cheque_no,rtrim(tf_flag) tf_flag,dept_no,rtrim(pay_id) pay_id,charge_dcount_date,charge_dcount_no,obsolete_id,obsolete_date,obsolete_dcount_date,obsolete_dcount_no from mz_receipt_serial where patient_id =#{patientId,jdbcType=CHAR} and cheque_type ='Y' and operator_id <> '99999' " +
|
|
|
"and receipt_sn not in ( select 0 - receipt_sn from mz_receipt_serial where cheque_type ='Y' and patient_id =#{patientId,jdbcType=CHAR} and tf_flag =1 and operator_id <> '99999' ) " +
|
|
|
"and receipt_sn not in ( select receipt_sn from mz_receipt_serial where cheque_type ='Y' and patient_id =#{patientId,jdbcType=CHAR} and tf_flag =1 and operator_id <> '99999' ) ")
|
|
|
List<MzReceiptSerial> selectTallyReceiptSerial(@Param("patientId") String patientId);
|
|
@@ -33,7 +33,7 @@ public interface MzReceiptSerialMapper {
|
|
|
@Select(" select rtrim(patient_id) patient_id,times,receipt_no,serial_no,rtrim(operator_id) operator_id,charge1,charge2,charge3,charge4,charge5,charge6,charge7,charge8,charge9," +
|
|
|
"charge10,charge11,charge12,charge13,charge14,charge15,charge16,charge17,charge18,charge19,charge20,rtrim(pay_mark) pay_mark,total_charge,charge_date,rtrim(receipt_bill) receipt_bill," +
|
|
|
"receipt_sn,dcount_date,rtrim(windows_no) windows_no,dcount_no,serial_yb,rtrim(fp_flag) fp_flag,rtrim(responce_type) responce_type,rtrim(cheque_type) cheque_type," +
|
|
|
- "cheque_no,rtrim(tf_flag) tf_flag,dept_no,rtrim(pay_id) pay_id,charge_dcount_date,charge_dcount_no from mz_receipt_serial where patient_id =#{patientId,jdbcType=CHAR} and times = #{times} and receipt_no = #{receiptNo} and cheque_type ='Y' and operator_id <> '99999' " +
|
|
|
+ "cheque_no,rtrim(tf_flag) tf_flag,dept_no,rtrim(pay_id) pay_id,charge_dcount_date,charge_dcount_no,obsolete_id,obsolete_date,obsolete_dcount_date,obsolete_dcount_no from mz_receipt_serial where patient_id =#{patientId,jdbcType=CHAR} and times = #{times} and receipt_no = #{receiptNo} and cheque_type ='Y' and operator_id <> '99999' " +
|
|
|
"and receipt_sn not in ( select 0 - receipt_sn from mz_receipt_serial where cheque_type ='Y' and patient_id =#{patientId,jdbcType=CHAR} and times = #{times} and receipt_no = #{receiptNo} and tf_flag =1 and operator_id <> '99999' ) " +
|
|
|
"and receipt_sn not in ( select receipt_sn from mz_receipt_serial where cheque_type ='Y' and patient_id =#{patientId,jdbcType=CHAR} and times = #{times} and receipt_no = #{receiptNo} and tf_flag =1 and operator_id <> '99999' ) ")
|
|
|
List<MzReceiptSerial> selectTallyReceiptSerialByIdAndTimes(@Param("patientId") String patientId, @Param("times") Integer times,@Param("receiptNo") Integer receiptNo);
|
|
@@ -108,7 +108,7 @@ public interface MzReceiptSerialMapper {
|
|
|
"select rtrim(patient_id) patient_id,times,receipt_no,serial_no,rtrim(operator_id) operator_id,charge1,charge2,charge3,charge4,charge5,charge6,charge7,charge8,charge9,",
|
|
|
"charge10,charge11,charge12,charge13,charge14,charge15,charge16,charge17,charge18,charge19,charge20,rtrim(pay_mark) pay_mark,total_charge,charge_date,rtrim(receipt_bill) receipt_bill,",
|
|
|
"receipt_sn,dcount_date,rtrim(windows_no) windows_no,dcount_no,serial_yb,rtrim(fp_flag) fp_flag,rtrim(responce_type) responce_type,rtrim(cheque_type) cheque_type,cheque_no," +
|
|
|
- "rtrim(tf_flag) tf_flag,dept_no,rtrim(pay_id) pay_id,charge_dcount_date,charge_dcount_no",
|
|
|
+ "rtrim(tf_flag) tf_flag,dept_no,rtrim(pay_id) pay_id,charge_dcount_date,charge_dcount_no,obsolete_id,obsolete_date,obsolete_dcount_date,obsolete_dcount_no",
|
|
|
"from ${tableName} where patient_id =#{patientId,jdbcType=CHAR} and pay_mark=0 and times =#{times} ",
|
|
|
"<when test='receiptNo!=null'>",
|
|
|
" and receipt_no=#{receiptNo}",
|
|
@@ -128,7 +128,7 @@ public interface MzReceiptSerialMapper {
|
|
|
"select top 1 rtrim(patient_id) patient_id,times,receipt_no,serial_no,rtrim(operator_id) operator_id,charge1,charge2,charge3,charge4,charge5,charge6,charge7,charge8,charge9,",
|
|
|
"charge10,charge11,charge12,charge13,charge14,charge15,charge16,charge17,charge18,charge19,charge20,rtrim(pay_mark) pay_mark,total_charge,charge_date,rtrim(receipt_bill) receipt_bill,",
|
|
|
"receipt_sn,dcount_date,rtrim(windows_no) windows_no,dcount_no,serial_yb,rtrim(fp_flag) fp_flag,rtrim(responce_type) responce_type,rtrim(cheque_type) cheque_type,cheque_no," +
|
|
|
- "rtrim(tf_flag) tf_flag,dept_no,rtrim(pay_id) pay_id,charge_dcount_date,charge_dcount_no",
|
|
|
+ "rtrim(tf_flag) tf_flag,dept_no,rtrim(pay_id) pay_id,charge_dcount_date,charge_dcount_no,obsolete_id,obsolete_date,obsolete_dcount_date,obsolete_dcount_no",
|
|
|
"from mz_receipt_serial where patient_id=#{patientId,jdbcType=CHAR} and times = #{times,jdbcType=INTEGER} and receipt_no = #{receiptNo,jdbcType=INTEGER} and ((cheque_type <![CDATA[<>]]> 'Y' and cheque_type <![CDATA[<>]]> '2' ) or cheque_type is null or operator_id =99999) order by receipt_no desc",
|
|
|
"</script>"})
|
|
|
MzReceiptSerial selectAllSerialForThisTime(@Param(value = "patientId") String patientId, @Param("times") Integer times,@Param("receiptNo") Integer receiptNo);
|
|
@@ -145,7 +145,7 @@ public interface MzReceiptSerialMapper {
|
|
|
"select rtrim(patient_id) patient_id,times,receipt_no,serial_no,rtrim(operator_id) operator_id,charge1,charge2,charge3,charge4,charge5,charge6,charge7,charge8,charge9,",
|
|
|
"charge10,charge11,charge12,charge13,charge14,charge15,charge16,charge17,charge18,charge19,charge20,rtrim(pay_mark) pay_mark,total_charge,charge_date,rtrim(receipt_bill) receipt_bill,",
|
|
|
"receipt_sn,dcount_date,rtrim(windows_no) windows_no,dcount_no,serial_yb,rtrim(fp_flag) fp_flag,rtrim(responce_type) responce_type,rtrim(cheque_type) cheque_type,cheque_no,rtrim(tf_flag) tf_flag," +
|
|
|
- "dept_no,rtrim(pay_id) pay_id,charge_dcount_date,charge_dcount_no",
|
|
|
+ "dept_no,rtrim(pay_id) pay_id,charge_dcount_date,charge_dcount_no,obsolete_id,obsolete_date,obsolete_dcount_date,obsolete_dcount_no",
|
|
|
"from ${tableName} where patient_id=#{patientId,jdbcType=CHAR} and times = #{times,jdbcType=INTEGER} and (cheque_type <![CDATA[<>]]> 'Y' or cheque_type is null or operator_id ='99999' ) ",
|
|
|
"<when test='receiptBill!=null'>",
|
|
|
" and receipt_bill =#{receiptBill}",
|
|
@@ -167,7 +167,7 @@ public interface MzReceiptSerialMapper {
|
|
|
"select rtrim(patient_id) patient_id,times,receipt_no,serial_no,rtrim(operator_id) operator_id,charge1,charge2,charge3,charge4,charge5,charge6,charge7,charge8,charge9,",
|
|
|
"charge10,charge11,charge12,charge13,charge14,charge15,charge16,charge17,charge18,charge19,charge20,rtrim(pay_mark) pay_mark,total_charge,charge_date,rtrim(receipt_bill) receipt_bill,",
|
|
|
"receipt_sn,dcount_date,rtrim(windows_no) windows_no,dcount_no,serial_yb,rtrim(fp_flag) fp_flag,rtrim(responce_type) responce_type,rtrim(cheque_type) cheque_type,cheque_no," +
|
|
|
- "rtrim(tf_flag) tf_flag,dept_no,rtrim(pay_id) pay_id,charge_dcount_date,charge_dcount_no",
|
|
|
+ "rtrim(tf_flag) tf_flag,dept_no,rtrim(pay_id) pay_id,charge_dcount_date,charge_dcount_no,obsolete_id,obsolete_date,obsolete_dcount_date,obsolete_dcount_no",
|
|
|
"from mz_receipt_serial where patient_id=#{patientId,jdbcType=CHAR} and times = #{times,jdbcType=INTEGER} and receipt_no = #{receiptNo,jdbcType=INTEGER}",
|
|
|
"</script>"})
|
|
|
List<MzReceiptSerial> selectSerialForThisTime(@Param(value = "patientId") String patientId, @Param("times") Integer times, @Param("receiptNo") Integer receiptNo);
|
|
@@ -186,7 +186,7 @@ public interface MzReceiptSerialMapper {
|
|
|
"select rtrim(patient_id) patient_id,times,receipt_no,serial_no,rtrim(operator_id) operator_id,charge1,charge2,charge3,charge4,charge5,charge6,charge7,charge8,charge9,",
|
|
|
"charge10,charge11,charge12,charge13,charge14,charge15,charge16,charge17,charge18,charge19,charge20,rtrim(pay_mark) pay_mark,total_charge,charge_date,rtrim(receipt_bill) receipt_bill,",
|
|
|
"receipt_sn,dcount_date,rtrim(windows_no) windows_no,dcount_no,serial_yb,rtrim(fp_flag) fp_flag,rtrim(responce_type) responce_type,rtrim(cheque_type) cheque_type,cheque_no," +
|
|
|
- "rtrim(tf_flag) tf_flag,dept_no,rtrim(pay_id) pay_id,charge_dcount_date,charge_dcount_no",
|
|
|
+ "rtrim(tf_flag) tf_flag,dept_no,rtrim(pay_id) pay_id,charge_dcount_date,charge_dcount_no,obsolete_id,obsolete_date,obsolete_dcount_date,obsolete_dcount_no",
|
|
|
"from ${tableName} where patient_id=#{patientId,jdbcType=CHAR} and times = #{times,jdbcType=INTEGER} and receipt_no = #{receiptNo,jdbcType=INTEGER} and receipt_bill is not null",
|
|
|
"</script>"})
|
|
|
MzReceiptSerial selectReceiptBillForThisTime(@Param(value = "patientId") String patientId, @Param("times") Integer times, @Param("receiptNo") Short receiptNo,@Param(value = "tableName") String tableName);
|
|
@@ -202,7 +202,7 @@ public interface MzReceiptSerialMapper {
|
|
|
"select rtrim(patient_id) patient_id,times,receipt_no,serial_no,rtrim(operator_id) operator_id,charge1,charge2,charge3,charge4,charge5,charge6,charge7,charge8,charge9,",
|
|
|
"charge10,charge11,charge12,charge13,charge14,charge15,charge16,charge17,charge18,charge19,charge20,rtrim(pay_mark) pay_mark,total_charge,charge_date,rtrim(receipt_bill) receipt_bill,",
|
|
|
"receipt_sn,dcount_date,rtrim(windows_no) windows_no,dcount_no,serial_yb,rtrim(fp_flag) fp_flag,rtrim(responce_type) responce_type,rtrim(cheque_type) cheque_type,cheque_no," +
|
|
|
- "rtrim(tf_flag) tf_flag,dept_no,rtrim(pay_id) pay_id,charge_dcount_date,charge_dcount_no",
|
|
|
+ "rtrim(tf_flag) tf_flag,dept_no,rtrim(pay_id) pay_id,charge_dcount_date,charge_dcount_no,obsolete_id,obsolete_date,obsolete_dcount_date,obsolete_dcount_no",
|
|
|
"from mz_receipt_serial where serial_no =#{serialNo} ",
|
|
|
"</script>"})
|
|
|
MzReceiptSerial selectReceiptDetailsBySerialNo(@Param(value = "serialNo") Integer serialNo);
|
|
@@ -272,6 +272,18 @@ public interface MzReceiptSerialMapper {
|
|
|
"<when test='chargeDcountNo!=null'>",
|
|
|
",charge_dcount_no =#{chargeDcountNo}",
|
|
|
"</when>",
|
|
|
+ "<when test='obsoleteId!=null'>",
|
|
|
+ ",obsolete_id =#{obsoleteId}",
|
|
|
+ "</when>",
|
|
|
+ "<when test='obsoleteDate!=null'>",
|
|
|
+ ",obsolete_date =#{obsoleteDate}",
|
|
|
+ "</when>",
|
|
|
+ "<when test='obsoleteDcountDate!=null'>",
|
|
|
+ ",obsolete_dcount_date =#{obsoleteDcountDate,jdbcType=TIMESTAMP}",
|
|
|
+ "</when>",
|
|
|
+ "<when test='obsoleteDcountNo!=null'>",
|
|
|
+ ",obsolete_dcount_no =#{obsoleteDcountNo}",
|
|
|
+ "</when>",
|
|
|
"</trim>",
|
|
|
"</script>"})
|
|
|
int updateMzReceiptSerialByReceiptNo(MzReceiptSerial mzReceiptSerial);
|
|
@@ -287,7 +299,7 @@ public interface MzReceiptSerialMapper {
|
|
|
"select top 1 rtrim(patient_id) patient_id,times,receipt_no,serial_no,rtrim(operator_id) operator_id,charge1,charge2,charge3,charge4,charge5,charge6,charge7,charge8,charge9,",
|
|
|
"charge10,charge11,charge12,charge13,charge14,charge15,charge16,charge17,charge18,charge19,charge20,rtrim(pay_mark) pay_mark,total_charge,charge_date,rtrim(receipt_bill) receipt_bill,",
|
|
|
"receipt_sn,dcount_date,rtrim(windows_no) windows_no,dcount_no,serial_yb,rtrim(fp_flag) fp_flag,rtrim(responce_type) responce_type,rtrim(cheque_type) cheque_type,cheque_no," +
|
|
|
- "rtrim(tf_flag) tf_flag,dept_no,rtrim(pay_id) pay_id,charge_dcount_date,charge_dcount_no",
|
|
|
+ "rtrim(tf_flag) tf_flag,dept_no,rtrim(pay_id) pay_id,charge_dcount_date,charge_dcount_no,obsolete_id,obsolete_date,obsolete_dcount_date,obsolete_dcount_no",
|
|
|
"from ${tableName} where receipt_sn =#{receiptSn} and receipt_bill is not null and receipt_bill <![CDATA[<>]]> '' ",
|
|
|
"</script>"})
|
|
|
MzReceiptSerial selectReceiptDetailsByReceiptSn(@Param(value = "receiptSn") Integer receiptSn,@Param("tableName") String tableName);
|
|
@@ -324,7 +336,7 @@ public interface MzReceiptSerialMapper {
|
|
|
"select rtrim(patient_id) patient_id,times,receipt_no,serial_no,rtrim(operator_id) operator_id,charge1,charge2,charge3,charge4,charge5,charge6,charge7,charge8,charge9,",
|
|
|
"charge10,charge11,charge12,charge13,charge14,charge15,charge16,charge17,charge18,charge19,charge20,rtrim(pay_mark) pay_mark,total_charge,charge_date,rtrim(receipt_bill) receipt_bill,",
|
|
|
"receipt_sn,dcount_date,rtrim(windows_no) windows_no,dcount_no,serial_yb,rtrim(fp_flag) fp_flag,rtrim(responce_type) responce_type,rtrim(cheque_type) cheque_type,cheque_no," +
|
|
|
- "rtrim(tf_flag) tf_flag,dept_no,rtrim(pay_id) pay_id,charge_dcount_date,charge_dcount_no",
|
|
|
+ "rtrim(tf_flag) tf_flag,dept_no,rtrim(pay_id) pay_id,charge_dcount_date,charge_dcount_no,obsolete_id,obsolete_date,obsolete_dcount_date,obsolete_dcount_no",
|
|
|
"from mz_receipt_serial where patient_id=#{patientId,jdbcType=CHAR} and times = #{times,jdbcType=INTEGER} and cheque_type ='Y' and tf_flag = 1 ",
|
|
|
"</script>"})
|
|
|
List<MzReceiptSerial> selectSerialForJzTfThisTime(@Param(value = "patientId") String patientId, @Param("times") Integer times);
|