|
@@ -15,7 +15,10 @@ import java.util.Map;
|
|
|
* 门诊挂号记录
|
|
|
*/
|
|
|
public interface MzyReqrecMapper {
|
|
|
- @Insert("if not exists (select patient_id from mzy_reqrec where patient_id=#{patientId,jdbcType=CHAR} and ampm = #{ampm,jdbcType=CHAR} and unit_code=#{unitCode,jdbcType=CHAR} and charge_type=#{chargeType,jdbcType=CHAR} and doctor_code=#{doctorCode,jdbcType=CHAR} and CONVERT(varchar(100), request_day, 23)=#{requestDayStr} and cancel_mark=0) " +
|
|
|
+ @Insert({"<script>",
|
|
|
+ "<when test='cancelMark eq 0'>",
|
|
|
+ "if not exists (select patient_id from mzy_reqrec where patient_id=#{patientId,jdbcType=CHAR} and ampm = #{ampm,jdbcType=CHAR} and unit_code=#{unitCode,jdbcType=CHAR} and charge_type=#{chargeType,jdbcType=CHAR} and doctor_code=#{doctorCode,jdbcType=CHAR} and CONVERT(varchar(100), request_day, 23)=#{requestDayStr} and cancel_mark=0) " +
|
|
|
+ "</when>",
|
|
|
"INSERT INTO mzy_reqrec(patient_id,times,name,req_type,request_day,ampm,unit_code,group_code,doctor_code,charge_type,req_order,req_fee,oth_fee,cancel_mark,admiss_time,op_id," +
|
|
|
"op_day,clinic_fee,visited_mark,plus_mark,closing_date,printer_id,print_flag,windows_no,serial_no,receipt_bill,dcount_no,brochure_fee,dept_no,visit_dept,visit_doctor,visit_date,paymode,psordnum,agtordnum,bl_fee,ck_fee,print_closing_date,print_dcount_no)" +
|
|
|
" VALUES (#{patientId,jdbcType=CHAR},#{times,jdbcType=INTEGER},#{name,jdbcType=CHAR},#{reqType,jdbcType=CHAR},#{requestDay,jdbcType=TIMESTAMP},#{ampm,jdbcType=CHAR}," +
|
|
@@ -23,7 +26,8 @@ public interface MzyReqrecMapper {
|
|
|
"#{othFee,jdbcType=DOUBLE},#{cancelMark,jdbcType=CHAR},#{admissTime,jdbcType=CHAR},#{opId,jdbcType=CHAR},#{opDay,jdbcType=TIMESTAMP},#{clinicFee,jdbcType=DOUBLE},#{visitedMark,jdbcType=CHAR},#{plusMark,jdbcType=CHAR}," +
|
|
|
"#{closingDate,jdbcType=TIMESTAMP},#{printerId,jdbcType=CHAR},#{printFlag,jdbcType=CHAR},#{windowsNo,jdbcType=CHAR},#{serialNo,jdbcType=INTEGER},#{receiptBill,jdbcType=CHAR},#{dcountNo,jdbcType=INTEGER}," +
|
|
|
"#{brochureFee,jdbcType=DOUBLE},#{deptNo,jdbcType=VARCHAR},#{visitDept,jdbcType=VARCHAR},#{visitDoctor,jdbcType=VARCHAR},#{visitDate,jdbcType=TIMESTAMP},#{paymode,jdbcType=VARCHAR}," +
|
|
|
- "#{psordnum,jdbcType=VARCHAR},#{agtordnum,jdbcType=VARCHAR},0.00,0.00,#{printClosingDate,jdbcType=TIMESTAMP},#{printDcountNo,jdbcType=INTEGER})")
|
|
|
+ "#{psordnum,jdbcType=VARCHAR},#{agtordnum,jdbcType=VARCHAR},0.00,0.00,#{printClosingDate,jdbcType=TIMESTAMP},#{printDcountNo,jdbcType=INTEGER})"
|
|
|
+ ,"</script>"})
|
|
|
int insertMzyReqrec(MzyReqrec mzyReqrec);
|
|
|
|
|
|
/**
|