|
@@ -10,6 +10,7 @@ import org.apache.ibatis.annotations.*;
|
|
|
import thyyxxk.webserver.entity.datamodify.FeiYongLeiXin;
|
|
|
import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
|
|
|
import thyyxxk.webserver.entity.datamodify.ZyDetailCharge;
|
|
|
+import thyyxxk.webserver.entity.inpatient.FeeSelect;
|
|
|
import thyyxxk.webserver.entity.inpatient.WeiGuiFeiYongFenXi;
|
|
|
import thyyxxk.webserver.entity.projectEntry.DrugReturnForm;
|
|
|
|
|
@@ -271,10 +272,16 @@ public interface XiangMuLuRuDao extends BaseMapper<ZyDetailCharge> {
|
|
|
* @param pyCode 拼音编码
|
|
|
* @return 获取项目的名称和code
|
|
|
*/
|
|
|
- @Select("select distinct code,name from zd_charge_item where (py_code like #{pyCode} or code like #{pyCode} or name like #{pyCode})" +
|
|
|
+ @Select("select distinct code, " +
|
|
|
+ " name, " +
|
|
|
+ " specification=N'诊疗项目', " +
|
|
|
+ " manufactor = (select name from yp_zd_manufactory where manu_code = yp_zd_manufactory.code) from zd_charge_item where (py_code like #{pyCode} or code like #{pyCode} or name like #{pyCode})" +
|
|
|
"union all " +
|
|
|
- "select distinct code,name from yp_zd_dict where (py_code like #{pyCode} or code like #{pyCode} or name like #{pyCode})")
|
|
|
- List<GetDropdownBox> getChargeCode(String pyCode);
|
|
|
+ "select distinct code, " +
|
|
|
+ " name, " +
|
|
|
+ " specification, " +
|
|
|
+ " manufactor = (select name from yp_zd_manufactory where manu_code = yp_zd_manufactory.code) from yp_zd_dict where (py_code like #{pyCode} or code like #{pyCode} or name like #{pyCode})")
|
|
|
+ List<FeeSelect> getChargeCode(String pyCode);
|
|
|
|
|
|
/**
|
|
|
* @param inpatientNo 住院次数
|
|
@@ -440,8 +447,8 @@ public interface XiangMuLuRuDao extends BaseMapper<ZyDetailCharge> {
|
|
|
/**
|
|
|
* 退药汇总单
|
|
|
*/
|
|
|
- @Insert("insert into yz_yp_page_no (page_no, dept_code, ward_code, submit_time, submit_name,\n" +
|
|
|
- " submit_flag, page_class, page_name, group_no)\n" +
|
|
|
+ @Insert("insert into yz_yp_page_no (page_no, dept_code, ward_code, submit_time, submit_name, " +
|
|
|
+ " submit_flag, page_class, page_name, group_no) " +
|
|
|
"values (#{pageNo}, #{wardCode}, #{wardCode}, getdate(), #{userCode}, 1, 'HT', '护士退药单', #{groupNo})")
|
|
|
void drugReturnForm(@Param("pageNo") Integer pageNo,
|
|
|
@Param("wardCode") String wardCode,
|
|
@@ -449,14 +456,14 @@ public interface XiangMuLuRuDao extends BaseMapper<ZyDetailCharge> {
|
|
|
@Param("groupNo") String groupNo);
|
|
|
|
|
|
@Insert("<script>" +
|
|
|
- "insert into yz_yp_zy_order (inpatient_no, admiss_times, name, bed_no, dept_code, ward_code, charge_code, amount,\n" +
|
|
|
- " retprice, charge_date, infant_flag, drawer, always_flag, status_flag, drug_class, \n" +
|
|
|
- " occ_time, act_order_no, serial, group_no, doctor_name, page_no_ty,ledger_sn,detail_sn,serail,page_class)\n" +
|
|
|
+ "insert into yz_yp_zy_order (inpatient_no, admiss_times, name, bed_no, dept_code, ward_code, charge_code, amount, " +
|
|
|
+ " retprice, charge_date, infant_flag, drawer, always_flag, status_flag, drug_class, " +
|
|
|
+ " occ_time, act_order_no, serial, group_no, doctor_name, page_no_ty,ledger_sn,detail_sn,serail,page_class) " +
|
|
|
"values " +
|
|
|
"<foreach collection='list' item='item' index='index' separator=','>" +
|
|
|
- "(#{patNo}, #{times}, #{name}, #{bedNo}, #{wardCode}, #{wardCode}, #{item.chargeCodeMx}, #{item.chargeAmount,jdbcType=REAL},\n" +
|
|
|
- " #{item.chargeFee,jdbcType=REAL}, getdate(), #{infantFlag}, #{userCode}, 'a', '1',\n" +
|
|
|
- " #{item.drugClass}, getdate(), ${index}, #{item.serial}, #{groupNo},\n" +
|
|
|
+ "(#{patNo}, #{times}, #{name}, #{bedNo}, #{wardCode}, #{wardCode}, #{item.chargeCodeMx}, #{item.chargeAmount,jdbcType=REAL}, " +
|
|
|
+ " #{item.chargeFee,jdbcType=REAL}, getdate(), #{infantFlag}, #{userCode}, 'a', '1', " +
|
|
|
+ " #{item.drugClass}, getdate(), ${index}, #{item.serial}, #{groupNo}, " +
|
|
|
" #{item.doctorCode}, #{pageNo},#{ledgerSn},#{item.detailSn},0,'HT')" +
|
|
|
"</foreach>" +
|
|
|
"</script>")
|
|
@@ -654,11 +661,11 @@ public interface XiangMuLuRuDao extends BaseMapper<ZyDetailCharge> {
|
|
|
|
|
|
|
|
|
@Select("<script>" +
|
|
|
- "select code as charge_code_mx,\n" +
|
|
|
- " CASE infusion_flag\n" +
|
|
|
- " when '1' then 'i'\n" +
|
|
|
- " else (case when code >= '30000' and code < '50000' then 'd' else 'j' end) end as drug_class\n" +
|
|
|
- "from yp_zd_dict\n" +
|
|
|
+ "select code as charge_code_mx, " +
|
|
|
+ " CASE infusion_flag " +
|
|
|
+ " when '1' then 'i' " +
|
|
|
+ " else (case when code >= '30000' and code < '50000' then 'd' else 'j' end) end as drug_class " +
|
|
|
+ "from yp_zd_dict " +
|
|
|
"where rtrim(code) + rtrim(serial) in " +
|
|
|
"<foreach collection='list' item='item' index='index' open='(' close=')' separator=','>" +
|
|
|
" '${item.chargeCodeMx}${item.serial}' " +
|
|
@@ -1134,19 +1141,19 @@ public interface XiangMuLuRuDao extends BaseMapper<ZyDetailCharge> {
|
|
|
|
|
|
|
|
|
@Select("<script>" +
|
|
|
- "select a.charge_code,\n" +
|
|
|
- " b.name as drug_name,\n" +
|
|
|
- " b.specification,\n" +
|
|
|
- " a.amount,\n" +
|
|
|
- " a.retprice,\n" +
|
|
|
- " b.pack_retprice,\n" +
|
|
|
- " a.inpatient_no as pat_no,\n" +
|
|
|
- " a.name,\n" +
|
|
|
- " page_class,\n" +
|
|
|
- " page_no_ty\n" +
|
|
|
- "from yz_yp_zy_order a,\n" +
|
|
|
- " yp_zd_dict b\n" +
|
|
|
- "where a.inpatient_no = #{patNo}\n" +
|
|
|
+ "select a.charge_code, " +
|
|
|
+ " b.name as drug_name, " +
|
|
|
+ " b.specification, " +
|
|
|
+ " a.amount, " +
|
|
|
+ " a.retprice, " +
|
|
|
+ " b.pack_retprice, " +
|
|
|
+ " a.inpatient_no as pat_no, " +
|
|
|
+ " a.name, " +
|
|
|
+ " page_class, " +
|
|
|
+ " page_no_ty " +
|
|
|
+ "from yz_yp_zy_order a, " +
|
|
|
+ " yp_zd_dict b " +
|
|
|
+ "where a.inpatient_no = #{patNo} " +
|
|
|
" and a.admiss_times = #{times}" +
|
|
|
" and group_no = #{groupNo} " +
|
|
|
" and a.status_flag = 1 " +
|
|
@@ -1154,7 +1161,7 @@ public interface XiangMuLuRuDao extends BaseMapper<ZyDetailCharge> {
|
|
|
"<if test=\"refundTime != null and refundTime != '' \">" +
|
|
|
" and CONVERT(varchar(100), occ_time, 23) = #{refundTime} " +
|
|
|
"</if>" +
|
|
|
- " and a.charge_code = b.code\n" +
|
|
|
+ " and a.charge_code = b.code " +
|
|
|
" and a.serial = b.serial " +
|
|
|
"</script>")
|
|
|
List<DrugReturnForm> queryTheDrugReturnForm(@Param("groupNo") String groupNo,
|