|
@@ -0,0 +1,94 @@
|
|
|
+package cn.hnthyy.thmz.mapper.his.zy;
|
|
|
+
|
|
|
+import cn.hnthyy.thmz.entity.his.zy.ZyDrugTracCodgTy;
|
|
|
+import org.apache.ibatis.annotations.Delete;
|
|
|
+import org.apache.ibatis.annotations.Insert;
|
|
|
+import org.apache.ibatis.annotations.Mapper;
|
|
|
+import org.apache.ibatis.annotations.Param;
|
|
|
+import org.apache.ibatis.annotations.Select;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 住院退药追溯码Mapper接口
|
|
|
+ */
|
|
|
+@Mapper
|
|
|
+public interface ZyDrugTracCodgTyMapper {
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 保存住院退药追溯码数据
|
|
|
+ * @param list 追溯码列表
|
|
|
+ * @return 影响行数
|
|
|
+ */
|
|
|
+ @Insert({
|
|
|
+ "<script>",
|
|
|
+ "insert into zy_drug_trac_codg_ty(drug_trac_codg,patient_id,times,receipt_no,order_no,item_no,charge_item_code,serial,flag,group_no,",
|
|
|
+ "refund_time,refund_id,refund_name,real_no,drug_name,specification,abbr_name,unit_price,manu_no,manu_date,expy_end,match_flag,match_message,",
|
|
|
+ "inpatient_no,admiss_times,zy_serial_no,page_no,dept_code,ward_code,charge_code,detail_sn,ledger_sn,create_time,update_time) values ",
|
|
|
+ "<foreach collection='list' item='item' index='index' separator=','>",
|
|
|
+ " (#{item.drugTracCodg,jdbcType=VARCHAR},#{item.patientId,jdbcType=VARCHAR},#{item.times,jdbcType=INTEGER},#{item.receiptNo,jdbcType=SMALLINT},",
|
|
|
+ "#{item.orderNo,jdbcType=TINYINT},#{item.itemNo,jdbcType=TINYINT},#{item.chargeItemCode,jdbcType=VARCHAR},#{item.serial,jdbcType=VARCHAR},",
|
|
|
+ "#{item.flag,jdbcType=VARCHAR},#{item.groupNo,jdbcType=VARCHAR},#{item.refundTime,jdbcType=TIMESTAMP},#{item.refundId,jdbcType=VARCHAR},",
|
|
|
+ "#{item.refundName,jdbcType=VARCHAR},#{item.realNo,jdbcType=INTEGER},#{item.drugName,jdbcType=VARCHAR},#{item.specification,jdbcType=VARCHAR},",
|
|
|
+ "#{item.abbrName,jdbcType=VARCHAR},#{item.unitPrice,jdbcType=FLOAT},#{item.manuNo,jdbcType=VARCHAR},#{item.manuDate,jdbcType=VARCHAR},",
|
|
|
+ "#{item.expyEnd,jdbcType=VARCHAR},#{item.matchFlag,jdbcType=VARCHAR},#{item.matchMessage,jdbcType=VARCHAR},#{item.inpatientNo,jdbcType=VARCHAR},",
|
|
|
+ "#{item.admissTimes,jdbcType=INTEGER},#{item.zySerialNo,jdbcType=VARCHAR},#{item.pageNo,jdbcType=INTEGER},#{item.deptCode,jdbcType=VARCHAR},",
|
|
|
+ "#{item.wardCode,jdbcType=VARCHAR},#{item.chargeCode,jdbcType=VARCHAR},#{item.detailSn,jdbcType=INTEGER},#{item.ledgerSn,jdbcType=INTEGER},",
|
|
|
+ "#{item.createTime,jdbcType=TIMESTAMP},#{item.updateTime,jdbcType=TIMESTAMP}) ",
|
|
|
+ "</foreach>",
|
|
|
+ "</script>"
|
|
|
+ })
|
|
|
+ int insertZyDrugTracCodgTyData(@Param("list") List<ZyDrugTracCodgTy> list);
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询住院退药追溯码数据
|
|
|
+ * @param zyDrugTracCodgTy 查询条件
|
|
|
+ * @return 追溯码列表
|
|
|
+ */
|
|
|
+ @Select("<script>" +
|
|
|
+ " select * from zy_drug_trac_codg_ty " +
|
|
|
+ "where inpatient_no = #{inpatientNo,jdbcType=VARCHAR} " +
|
|
|
+ "and admiss_times = #{admissTimes,jdbcType=INTEGER} " +
|
|
|
+ "and receipt_no = #{receiptNo,jdbcType=SMALLINT} " +
|
|
|
+ "and order_no = #{orderNo,jdbcType=TINYINT} " +
|
|
|
+ "and group_no = #{groupNo,jdbcType=VARCHAR} " +
|
|
|
+ "<when test='chargeItemCode != null'>" +
|
|
|
+ " and charge_item_code =#{chargeItemCode,jdbcType=VARCHAR}" +
|
|
|
+ "</when>" +
|
|
|
+ "<when test='serial != null'>" +
|
|
|
+ " and serial = #{serial,jdbcType=VARCHAR} " +
|
|
|
+ "</when>" +
|
|
|
+ "<when test='realNo != null'>" +
|
|
|
+ " and real_no =#{realNo,jdbcType=INTEGER}" +
|
|
|
+ "</when>" +
|
|
|
+ "<when test='pageNo != null'>" +
|
|
|
+ " and page_no =#{pageNo,jdbcType=INTEGER}" +
|
|
|
+ "</when>" +
|
|
|
+ "<when test='zySerialNo != null'>" +
|
|
|
+ " and zy_serial_no =#{zySerialNo,jdbcType=VARCHAR}" +
|
|
|
+ "</when>" +
|
|
|
+ "</script>")
|
|
|
+ List<ZyDrugTracCodgTy> selectZyDrugTracCodgTyData(ZyDrugTracCodgTy zyDrugTracCodgTy);
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除住院退药追溯码数据
|
|
|
+ * @param zyDrugTracCodgTy 删除条件
|
|
|
+ * @return 影响行数
|
|
|
+ */
|
|
|
+ @Delete("delete from zy_drug_trac_codg_ty " +
|
|
|
+ " where inpatient_no=#{inpatientNo,jdbcType=VARCHAR} " +
|
|
|
+ " and admiss_times = #{admissTimes,jdbcType=INTEGER} " +
|
|
|
+ " and receipt_no = #{receiptNo,jdbcType=SMALLINT} " +
|
|
|
+ " and item_no = #{itemNo,jdbcType=TINYINT} " +
|
|
|
+ " and charge_item_code = #{chargeItemCode,jdbcType=VARCHAR} " +
|
|
|
+ " and drug_trac_codg = #{drugTracCodg,jdbcType=VARCHAR}")
|
|
|
+ int deleteZyDrugTracCodgTyData(ZyDrugTracCodgTy zyDrugTracCodgTy);
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据追溯码查询退药药品信息
|
|
|
+ * @param drugTracCodg 追溯码
|
|
|
+ * @return 药品信息
|
|
|
+ */
|
|
|
+ @Select("select * from zy_drug_trac_codg_ty where drug_trac_codg = #{drugTracCodg,jdbcType=VARCHAR}")
|
|
|
+ ZyDrugTracCodgTy selectByDrugTracCodgTy(@Param("drugTracCodg") String drugTracCodg);
|
|
|
+}
|