|
|
@@ -25,6 +25,7 @@ public interface MzyReqrecMapper {
|
|
|
|
|
|
/**
|
|
|
* 根据病人编号查询最后一次挂号信息
|
|
|
+ *
|
|
|
* @param patientId
|
|
|
* @return
|
|
|
*/
|
|
|
@@ -34,47 +35,49 @@ public interface MzyReqrecMapper {
|
|
|
|
|
|
/**
|
|
|
* 查询符合条件的挂号数据总数
|
|
|
+ *
|
|
|
* @param mzyReqrecPageDto
|
|
|
* @return
|
|
|
*/
|
|
|
@Select({"<script>",
|
|
|
"select count(*) from mzy_reqrec where times >0 ",
|
|
|
- "<when test='mzyReqrec.unitCode!=null'>",
|
|
|
- " and unit_code =#{mzyReqrec.unitCode,jdbcType=CHAR}",
|
|
|
- "</when>",
|
|
|
- "<when test='mzyReqrec.doctorCode!=null'>",
|
|
|
- " and doctor_code =#{mzyReqrec.doctorCode,jdbcType=CHAR}",
|
|
|
- "</when>",
|
|
|
- "<when test='mzyReqrec.name!=null'>",
|
|
|
- " and name like #{mzyReqrec.name,jdbcType=CHAR}",
|
|
|
- "</when>",
|
|
|
- "<when test='mzyReqrec.visitedMark!=null'>",
|
|
|
- " and visited_mark =#{mzyReqrec.visitedMark,jdbcType=CHAR}",
|
|
|
- "</when>",
|
|
|
- "<when test='mzyReqrec.cancelMark!=null'>",
|
|
|
- " and cancel_mark =#{mzyReqrec.cancelMark,jdbcType=CHAR}",
|
|
|
- "</when>",
|
|
|
- "<when test='beginTime!=null'>",
|
|
|
- " and request_day >=#{beginTime,jdbcType=TIMESTAMP}",
|
|
|
- "</when>",
|
|
|
- "<when test='endTime!=null'>",
|
|
|
- " and request_day <=#{endTime,jdbcType=TIMESTAMP}",
|
|
|
- "</when>",
|
|
|
+ "<when test='mzyReqrec.unitCode!=null'>",
|
|
|
+ " and unit_code =#{mzyReqrec.unitCode,jdbcType=CHAR}",
|
|
|
+ "</when>",
|
|
|
+ "<when test='mzyReqrec.doctorCode!=null'>",
|
|
|
+ " and doctor_code =#{mzyReqrec.doctorCode,jdbcType=CHAR}",
|
|
|
+ "</when>",
|
|
|
+ "<when test='mzyReqrec.name!=null'>",
|
|
|
+ " and name like #{mzyReqrec.name,jdbcType=CHAR}",
|
|
|
+ "</when>",
|
|
|
+ "<when test='mzyReqrec.visitedMark!=null'>",
|
|
|
+ " and visited_mark =#{mzyReqrec.visitedMark,jdbcType=CHAR}",
|
|
|
+ "</when>",
|
|
|
+ "<when test='mzyReqrec.cancelMark!=null'>",
|
|
|
+ " and cancel_mark =#{mzyReqrec.cancelMark,jdbcType=CHAR}",
|
|
|
+ "</when>",
|
|
|
+ "<when test='beginTime!=null'>",
|
|
|
+ " and request_day >=#{beginTime,jdbcType=TIMESTAMP}",
|
|
|
+ "</when>",
|
|
|
+ "<when test='endTime!=null'>",
|
|
|
+ " and request_day <=#{endTime,jdbcType=TIMESTAMP}",
|
|
|
+ "</when>",
|
|
|
"</script>"})
|
|
|
int countMzyReqrec(MzyReqrecPageDto mzyReqrecPageDto);
|
|
|
|
|
|
/**
|
|
|
* 分页查询挂号信息
|
|
|
+ *
|
|
|
* @param mzyReqrecPageDto
|
|
|
* @return
|
|
|
*/
|
|
|
@Select({"<script>",
|
|
|
- "select top ${pageSize} rtrim(patient_id) patient_id,times,rtrim(name) name,rtrim(req_type) req_type,request_day,rtrim(ampm) ampm,rtrim(unit_code) unit_code," ,
|
|
|
- "rtrim(group_code) group_code,rtrim(doctor_code) doctor_code,rtrim(charge_type) charge_type,req_order,req_fee,oth_fee,rtrim(cancel_mark) cancel_mark," ,
|
|
|
- "rtrim(admiss_time) admiss_time,rtrim(op_id) op_id,op_day,clinic_fee,rtrim(visited_mark) visited_mark,rtrim(plus_mark) plus_mark,closing_date," ,
|
|
|
- "rtrim(print_flag) print_flag,rtrim(windows_no) windows_no,serial_no,rtrim(receipt_bill) receipt_bill,dcount_no,brochure_fee,dept_no,visit_dept," ,
|
|
|
- "visit_doctor,visit_date,paymode,psordnum,agtordnum FROM (SELECT ROW_NUMBER() OVER (ORDER BY mzy_reqrec_page.request_day desc) AS RowNumber," ,
|
|
|
- "* from dbo.mzy_reqrec mzy_reqrec_page where times >0 ",
|
|
|
+ "select top ${pageSize} rtrim(patient_id) patient_id,times,rtrim(name) name,rtrim(req_type) req_type,request_day,rtrim(ampm) ampm,rtrim(unit_code) unit_code,",
|
|
|
+ "rtrim(group_code) group_code,rtrim(doctor_code) doctor_code,rtrim(charge_type) charge_type,req_order,req_fee,oth_fee,rtrim(cancel_mark) cancel_mark,",
|
|
|
+ "rtrim(admiss_time) admiss_time,rtrim(op_id) op_id,op_day,clinic_fee,rtrim(visited_mark) visited_mark,rtrim(plus_mark) plus_mark,closing_date,",
|
|
|
+ "rtrim(print_flag) print_flag,rtrim(windows_no) windows_no,serial_no,rtrim(receipt_bill) receipt_bill,dcount_no,brochure_fee,dept_no,visit_dept,",
|
|
|
+ "visit_doctor,visit_date,paymode,psordnum,agtordnum FROM (SELECT ROW_NUMBER() OVER (ORDER BY mzy_reqrec_page.request_day desc) AS RowNumber,",
|
|
|
+ "* from dbo.mzy_reqrec mzy_reqrec_page where times >0 ",
|
|
|
"<when test='mzyReqrec.unitCode!=null'>",
|
|
|
" and unit_code =#{mzyReqrec.unitCode,jdbcType=CHAR}",
|
|
|
"</when>",
|
|
|
@@ -102,29 +105,47 @@ public interface MzyReqrecMapper {
|
|
|
|
|
|
/**
|
|
|
* 查询所有退号信息
|
|
|
+ *
|
|
|
* @return
|
|
|
*/
|
|
|
@Select({"<script>",
|
|
|
- "select rtrim(patient_id) patient_id,times,rtrim(name) name,rtrim(req_type) req_type,request_day,rtrim(ampm) ampm,rtrim(unit_code) unit_code," ,
|
|
|
- "rtrim(group_code) group_code,rtrim(doctor_code) doctor_code,rtrim(charge_type) charge_type,req_order,req_fee,oth_fee,rtrim(cancel_mark) cancel_mark," ,
|
|
|
- "rtrim(admiss_time) admiss_time,rtrim(op_id) op_id,op_day,clinic_fee,rtrim(visited_mark) visited_mark,rtrim(plus_mark) plus_mark,closing_date," ,
|
|
|
- "rtrim(print_flag) print_flag,rtrim(windows_no) windows_no,serial_no,rtrim(receipt_bill) receipt_bill,dcount_no,brochure_fee,dept_no,visit_dept," ,
|
|
|
- "visit_doctor,visit_date,paymode,psordnum,agtordnum from dbo.mzy_reqrec where cancel_mark=1" ,
|
|
|
+ "select rtrim(patient_id) patient_id,times,rtrim(name) name,rtrim(req_type) req_type,request_day,rtrim(ampm) ampm,rtrim(unit_code) unit_code,",
|
|
|
+ "rtrim(group_code) group_code,rtrim(doctor_code) doctor_code,rtrim(charge_type) charge_type,req_order,req_fee,oth_fee,rtrim(cancel_mark) cancel_mark,",
|
|
|
+ "rtrim(admiss_time) admiss_time,rtrim(op_id) op_id,op_day,clinic_fee,rtrim(visited_mark) visited_mark,rtrim(plus_mark) plus_mark,closing_date,",
|
|
|
+ "rtrim(print_flag) print_flag,rtrim(windows_no) windows_no,serial_no,rtrim(receipt_bill) receipt_bill,dcount_no,brochure_fee,dept_no,visit_dept,",
|
|
|
+ "visit_doctor,visit_date,paymode,psordnum,agtordnum from dbo.mzy_reqrec where cancel_mark=1",
|
|
|
"</script>"})
|
|
|
List<MzyReqrec> selectAllCancel();
|
|
|
|
|
|
/**
|
|
|
* 修改挂号信息
|
|
|
+ *
|
|
|
* @param mzyReqrec
|
|
|
* @return
|
|
|
*/
|
|
|
@Update({"<script>",
|
|
|
"update mzy_reqrec ",
|
|
|
"<trim prefix='set' prefixOverrides=',' suffix=' where patient_id = #{patientId} and times=#{times}' >",
|
|
|
- "<when test='cancelMark!=null'>",
|
|
|
- "cancel_mark =#{cancelMark,jdbcType=CHAR}",
|
|
|
- "</when>",
|
|
|
+ "<when test='cancelMark!=null'>",
|
|
|
+ "cancel_mark =#{cancelMark,jdbcType=CHAR}",
|
|
|
+ "</when>",
|
|
|
"</trim>"
|
|
|
- ,"</script>"})
|
|
|
+ , "</script>"})
|
|
|
int updateMzyReqrec(MzyReqrec mzyReqrec);
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 按照病人id 和次数查询病人挂号信息
|
|
|
+ *
|
|
|
+ * @param patientId
|
|
|
+ * @param times
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Select({"<script>",
|
|
|
+ "select rtrim(patient_id) patient_id,times,rtrim(name) name,rtrim(req_type) req_type,request_day,rtrim(ampm) ampm,rtrim(unit_code) unit_code,",
|
|
|
+ "rtrim(group_code) group_code,rtrim(doctor_code) doctor_code,rtrim(charge_type) charge_type,req_order,req_fee,oth_fee,rtrim(cancel_mark) cancel_mark,",
|
|
|
+ "rtrim(admiss_time) admiss_time,rtrim(op_id) op_id,op_day,clinic_fee,rtrim(visited_mark) visited_mark,rtrim(plus_mark) plus_mark,closing_date,",
|
|
|
+ "rtrim(print_flag) print_flag,rtrim(windows_no) windows_no,serial_no,rtrim(receipt_bill) receipt_bill,dcount_no,brochure_fee,dept_no,visit_dept,",
|
|
|
+ "visit_doctor,visit_date,paymode,psordnum,agtordnum from dbo.mzy_reqrec where patient_id=#{patientId,jdbcType=CHAR} and times = #{times,jdbcType=INTEGER}",
|
|
|
+ "</script>"})
|
|
|
+ MzyReqrec selectMzyReqrecByPatientIdAndTimes(@Param("patientId") String patientId, @Param("times") Integer times);
|
|
|
}
|