PublicDao.java 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  1. package thyyxxk.webserver.dao.his;
  2. import com.baomidou.mybatisplus.core.conditions.Wrapper;
  3. import com.baomidou.mybatisplus.core.toolkit.Constants;
  4. import org.apache.ibatis.annotations.*;
  5. import thyyxxk.webserver.entity.casefrontsheet.YshHzRecord;
  6. import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
  7. import thyyxxk.webserver.entity.datamodify.ZyDetailCharge;
  8. import thyyxxk.webserver.entity.dictionary.CodeName;
  9. import thyyxxk.webserver.entity.login.UserInfo;
  10. import thyyxxk.webserver.entity.publicapi.ZkList;
  11. import thyyxxk.webserver.entity.socketmessage.SocketMessage;
  12. import thyyxxk.webserver.entity.inpatient.ZyActpatient;
  13. import thyyxxk.webserver.entity.zhuyuanyisheng.PatientAllergenInfo;
  14. import thyyxxk.webserver.entity.zhuyuanyisheng.caoyaoyizhu.YzActOrderCy;
  15. import thyyxxk.webserver.entity.zhuyuanyisheng.jianyanjiancha.YshYjReq;
  16. import thyyxxk.webserver.entity.zhuyuanyisheng.shoushu.OpRecord;
  17. import thyyxxk.webserver.entity.zhuyuanyisheng.yizhuluru.YaoPinXiangMu;
  18. import java.math.BigDecimal;
  19. import java.util.List;
  20. import java.util.Map;
  21. import java.util.Set;
  22. /**
  23. * <p>
  24. * 描述: 公共接口
  25. * </p>
  26. *
  27. * @author xc
  28. * @date 2021-09-17 10:54
  29. */
  30. @Mapper
  31. public interface PublicDao {
  32. /**
  33. * 查询医嘱
  34. *
  35. * @return 返回医嘱号
  36. */
  37. @Select("select cast(act_order_no as decimal(14)) as act_order_no from yz_sequence WITH (TABLOCKX)")
  38. BigDecimal getActOrderNo();
  39. /**
  40. * @return 获取模板的自增id
  41. */
  42. @Select("select pattern_code from yz_sequence WITH (TABLOCKX) ")
  43. Integer getPatternCode();
  44. @Update("update yz_sequence set pattern_code = #{newId} where pattern_code = #{oldId} ")
  45. int updatePatternCode(Integer newId, Integer oldId);
  46. @Select("select cast(p_act_order_no as decimal(9)) from yz_sequence WITH (TABLOCKX)")
  47. BigDecimal getPatternOrderCode();
  48. @Update("update yz_sequence set p_act_order_no = #{newId} where p_act_order_no = #{oldId} ")
  49. int updatePatternOrderCode(BigDecimal newId, BigDecimal oldId);
  50. @Update("update yz_sequence set act_order_no = #{newOrderNo} where act_order_no = #{oldOrderNo} ")
  51. int updateActOrderNo(BigDecimal newOrderNo, BigDecimal oldOrderNo);
  52. @Select("select req_no from ysh_config WITH (TABLOCKX) ")
  53. Integer getReqNo();
  54. @Update("update ysh_config set req_no =#{newId} where req_no = #{oldId} ")
  55. int updateReqNo(Integer newId, Integer oldId);
  56. @Select("select yj_template_no from ysh_config WITH (TABLOCKX) ")
  57. Integer tempNo();
  58. @Update("update ysh_config set yj_template_no = #{newId} where yj_template_no = #{oldId} ")
  59. int updateTempNo(Integer newId, Integer oldId);
  60. /**
  61. * 获取 这个科室 的子科室
  62. *
  63. * @param deptCode 科室编码
  64. * @return 返回自生和子科室
  65. */
  66. @Select("select code,case when parent_code = code then null else parent_code end as parent_code from zd_unit_code where (parent_code = #{deptCode} or code = #{deptCode}) and isnull(del_flag,0) = 0")
  67. List<GetDropdownBox> getKeShiLieBiao(String deptCode);
  68. @Select("<script>" +
  69. "select code from zd_unit_code where (parent_code in " +
  70. "<foreach collection='deptCodeList' item='item' index='index' open='(' close=')' separator=','>" +
  71. " #{item,jdbcType = CHAR}" +
  72. "</foreach> " +
  73. "or code in " +
  74. "<foreach collection='deptCodeList' item='item' index='index' open='(' close=')' separator=','>" +
  75. "#{item,jdbcType = CHAR}" +
  76. "</foreach>" +
  77. ") and isnull(del_flag,0) = 0" +
  78. "</script>")
  79. List<String> getKeShiLieBiaoList(@Param("deptCodeList") List<String> deptCodeList);
  80. /**
  81. * 获取人员信息
  82. *
  83. * @param code 人员代码
  84. * @return 返回人员
  85. */
  86. @Select("<script>" + "select distinct rtrim(code) code,rtrim(name) name," + " dept_name = (select rtrim(name) from zd_unit_code where zd_unit_code.code = dept_code)," + " emp_tit_name = (select rtrim(name) from zd_emp_title where zd_emp_title.code = emp_tit_code)," + " rtrim(yb_code) as yb_code " + "from a_employee_mi where " + "(code like #{code} or name like #{code} or code_rs like #{code} or py_code like #{code}) " + "and isnull(del_flag,0) = 0 " + "<if test=\"deptCode != null and deptCode != '' \">" + "and dept_code = #{deptCode} " + "</if>" + "</script>")
  87. List<GetDropdownBox> getRenYuan(String code, String deptCode);
  88. /**
  89. * @param pyCode 拼音编码
  90. * @return 获取项目的名称和code
  91. */
  92. @Select("select distinct code,name 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})")
  93. List<GetDropdownBox> getChargeCode(String pyCode);
  94. @Select("select distinct rtrim(code) + '_' + rtrim(serial) as code, name " + "from yp_zd_dict " + "where (code like #{name} or name like #{name} or py_code like #{name} or d_code like #{name})")
  95. List<GetDropdownBox> getDrugInfo(String name);
  96. @Select("select rtrim(code) code,rtrim(name) name from zd_unit_code where isnull(del_flag,0) = 0")
  97. List<GetDropdownBox> getDept();
  98. @Select("select rtrim(code) code,rtrim(name) name from zd_unit_code with(nolock)" +
  99. "where isnull(del_flag,0) = 0 and code not like '8%' and " +
  100. "(py_code like #{pyCode} or name like #{pyCode} or code like #{pyCode})")
  101. List<GetDropdownBox> queryDept(String pyCode);
  102. @Select("select isnull(max(ledger_sn),1) from zy_ledger_file where inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes}")
  103. Integer getLedgerSn(@Param("inpatientNo") String inpatient, @Param("admissTimes") Integer admissTimes);
  104. @Select("select rtrim(inpatient_no) inpatient_no,admiss_times,admiss_date,dis_date,name, " + "responce_name = (select rtrim(name) name from zy_zd_responce_type where code = responce_type)," + "responce_type, " + "ward,ward_name = (select rtrim(name) name from zd_unit_code where code = ward), " + "ledger_sn = (select max(ledger_sn) from zy_ledger_file where a.inpatient_no = zy_ledger_file.inpatient_no and a.admiss_times = zy_ledger_file.admiss_times), " + "chu_yuan_yi_zhu = (case when (select count(1) from yz_act_order where inpatient_no= a.inpatient_no and admiss_times= a.admiss_times " + "and status_flag > '2' and isnull(group_no,'00' )='00' and order_code in ('06026','06053','05973')) > 0 " + "then 1 " + "when (select count(1) from yz_inact_order where inpatient_no= a.inpatient_no and admiss_times= a.admiss_times " + "and status_flag > '2' and isnull(group_no,'00' )='00' and order_code in ('06026','06053','05973')) > 0 " + "then 1 else 0 end ), " + "bed_no,total_charge,balance from zy_actpatient a where inpatient_no = #{inpatientNo} ")
  105. ZyActpatient getHuanZheJiBenXinXi(@Param("inpatientNo") String inpatientNo);
  106. @Update("update zy_detail_charge set ori_detail_sn = null where inpatient_no = #{inpatientNo} " + "and admiss_times = #{admissTimes} and ledger_sn = #{ledgerSn} and ori_detail_sn = -1 and charge_amount > 0")
  107. void chongZhiZhenLiuShui(@Param("inpatientNo") String inpatientNo, @Param("admissTimes") Integer admissTimes, @Param("ledgerSn") Integer ledgerSn);
  108. @Select("select ori_detail_sn from zy_detail_charge where inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes} and ledger_sn = #{ledgerSn} " + "and ori_detail_sn is not null " + "and charge_amount < 0")
  109. List<Integer> huoQuTuiFeiYuanLiuShui(@Param("inpatientNo") String inpatientNo, @Param("admissTimes") Integer admissTimes, @Param("ledgerSn") Integer ledgerSn);
  110. @Update("<script>" + "update zy_detail_charge set ori_detail_sn = -1 where inpatient_no = '${inpatientNo}' and admiss_times = ${admissTimes} and ledger_sn = ${ledgerSn} " + "and charge_amount &gt; 0 and detail_sn in " + "<foreach collection='list' item='item' index='index' open='(' close=')' separator=','>" + "${item}" + "</foreach>" + "</script>")
  111. void genXingFuShuDuiYingZhenLiuShui(@Param("inpatientNo") String inpatientNo, @Param("admissTimes") Integer admissTimes, @Param("ledgerSn") Integer ledgerSn, @Param("list") List<Integer> detailSnList);
  112. @Select("select ori_detail_sn,sum(charge_fee) charge_fee,sum(charge_amount) charge_amount " + "from zy_detail_charge a " + "where inpatient_no=#{inpatientNo} and admiss_times = #{admissTimes} and ledger_sn = #{ledgerSn} and order_no <> 6 and trans_flag_yb <> 2 " + " and ori_detail_sn is not null and charge_amount<0 " + "group by ori_detail_sn having count(1) > 1")
  113. List<ZyDetailCharge> chongFuTuiFeiLiuShui(@Param("inpatientNo") String inpatientNo, @Param("admissTimes") Integer admissTimes, @Param("ledgerSn") Integer ledgerSn);
  114. @Select("<script>" + "select detail_sn,charge_fee,charge_amount from zy_detail_charge where inpatient_no=#{inpatientNo} and admiss_times = #{admissTimes} and ledger_sn = #{ledgerSn} " + "and detail_sn in " + "<foreach collection='oriSn' item='sn' open='(' close=')' separator=','>" + "#{sn}" + "</foreach>" + "</script>")
  115. List<ZyDetailCharge> getZhenShuLiuShui(@Param("inpatientNo") String inpatientNo, @Param("admissTimes") Integer admissTimes, @Param("ledgerSn") Integer ledgerSn, @Param("oriSn") Set<Integer> oriSn);
  116. @Update("<script>" + "<foreach collection='list' item='item' separator=';'>" + "update zy_detail_charge set ori_detail_sn = null where inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes} and ledger_sn = #{ledgerSn} " + "and (detail_sn = #{item} or ori_detail_sn = #{item}) " + "</foreach>" + "</script>")
  117. void chongFuTuiFeiChongZhi(@Param("inpatientNo") String inpatientNo, @Param("admissTimes") Integer admissTimes, @Param("ledgerSn") Integer ledgerSn, @Param("list") List<Integer> oriDetailSn);
  118. @Select("select isnull(sum(charge_fee),0) from zy_detail_charge " + "where inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes} and ledger_sn = #{ledgerSn} and trans_flag_yb=2")
  119. BigDecimal zhenFuXingDiFeiYong(@Param("inpatientNo") String inpatientNo, @Param("admissTimes") Integer admissTimes, @Param("ledgerSn") Integer ledgerSn);
  120. @Update("update zy_detail_charge set trans_flag_yb = 0 where inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes} and ledger_sn = #{ledgerSn} and " + "trans_flag_yb = 2")
  121. void chongXingZhengFuXiangDi(@Param("inpatientNo") String inpatientNo, @Param("admissTimes") Integer admissTimes, @Param("ledgerSn") Integer ledgerSn);
  122. @Select("select detail_sn from zy_detail_charge where inpatient_no= #{inpatientNo} and admiss_times = #{admissTimes} and ledger_sn = #{ledgerSn} " + "and trans_flag_yb <> 2 and charge_amount > 0 and ori_detail_sn is not null")
  123. List<Integer> zhenShuLiuShui(@Param("inpatientNo") String inpatientNo, @Param("admissTimes") Integer admissTimes, @Param("ledgerSn") Integer ledgerSn);
  124. @Select("select ori_detail_sn from zy_detail_charge where inpatient_no= #{inpatientNo} and admiss_times = #{admissTimes} and ledger_sn = #{ledgerSn} " + "and trans_flag_yb <> 2 and charge_amount < 0 and ori_detail_sn is not null")
  125. List<Integer> fuShuLiuShui(@Param("inpatientNo") String inpatientNo, @Param("admissTimes") Integer admissTimes, @Param("ledgerSn") Integer ledgerSn);
  126. @Update("<script>" + "<foreach collection='list' item='item' separator=';'>" + "update zy_detail_charge set ori_detail_sn = null where inpatient_no= #{inpatientNo} and admiss_times = #{admissTimes} and ledger_sn = #{ledgerSn} " + "and charge_fee &lt; 0 and ori_detail_sn = #{item}" + "</foreach>" + "</script> ")
  127. void chongZhiFuShuYuanLiuShui(@Param("inpatientNo") String inpatientNo, @Param("admissTimes") Integer admissTimes, @Param("ledgerSn") Integer ledgerSn, @Param("list") List<Integer> oriDetailSn);
  128. @Select("select top(1) code,dept_code,name,code_rs,rtrim(yb_code) yb_code" + " from a_employee_mi where (code = #{code} or code_rs = #{code}) and isnull(del_flag,0) = 0 ")
  129. UserInfo huoQuYuanGongBianMa(String code);
  130. @Select("SELECT small_dept FROM zd_dept_all where dept = #{deptCode}")
  131. List<String> bingFangSuoSuKeShi(String deptCode);
  132. // 重置 流水号
  133. @Select("select row_number() over (order by charge_date ) row_index, " + " ledger_sn, " + " detail_sn " + "from zy_detail_charge " + "where inpatient_no = '${patNo}' " + " and admiss_times = ${times} ")
  134. List<ZyDetailCharge> huoQuZhongYeFeiYong(@Param("patNo") String patNo, @Param("times") Integer times);
  135. @Select("select count(1) " + "from zy_detail_charge " + "where inpatient_no = '${patNo}' " + " and admiss_times = ${times}")
  136. int maxDetailSn(@Param("patNo") String patNo, @Param("times") Integer times);
  137. @Update("<script>" + "<foreach collection='list' item='item' separator=';' index='index' >" + "update zy_detail_charge set detail_sn = ${item.rowIndex} + ${maxDetailSn} " + "where inpatient_no= '${patNo}' and admiss_times = ${times} and ledger_sn = ${item.ledgerSn} and detail_sn = ${item.detailSn}" + "</foreach>" + "</script>")
  138. void chongZhiLiuShui(@Param("patNo") String patNo, @Param("times") Integer times, @Param("list") List<ZyDetailCharge> list, @Param("maxDetailSn") int maxDetailSn);
  139. @Select("select rtrim(code) code,rtrim(name) name from zd_anaesthesia")
  140. List<GetDropdownBox> maZuiFangShi();
  141. @Update("update ysh_config set tc_no =tc_no")
  142. void jianYanJianChaSuo();
  143. @Select("select tc_no from ysh_config ")
  144. Integer jianYanJianChaXuHao();
  145. @Update("update ysh_config set tc_no = #{tcNo}")
  146. void genXingJianYanJianChaXuHao(Integer tcNo);
  147. @Update("update op_config set op_record_id =op_record_id ")
  148. void suoZhuShouShu();
  149. @Select("select op_record_id from op_config")
  150. Integer shouShuXuHao();
  151. @Update("update op_config set op_record_id =#{code} ")
  152. void genXingShouShuXuHao(Integer code);
  153. @Select("select page_no from yz_sequence WITH (TABLOCKX) ")
  154. Integer caoYaoDanHao();
  155. @Select("EXEC get_the_drug_list_no")
  156. Integer caoYaoDanHaot();
  157. @Update("update yz_sequence set page_no = #{newId} where page_no = #{oldId} ")
  158. int genXingCaoYaoDanHao(Integer newId, Integer oldId);
  159. @Select("select top (1) cast(settle_type as int) as settle_type " + "from zy_ledger_file " + "where inpatient_no = #{patNo} " + " and admiss_times = #{times} " + "order by ledger_sn desc")
  160. Integer jieSuanXinXi(@Param("patNo") String patNo, @Param("times") Integer times);
  161. @Select("select * " + "from ysh_hz_record " + "where act_order_no = #{actOrder}")
  162. YshHzRecord huiZhen(BigDecimal actOrder);
  163. @Select("select * " + "from ysh_yj_req " + "where act_order_no = #{actOrder}")
  164. YshYjReq yiJi(BigDecimal actOrder);
  165. @Select("select * " + "from op_record " + "where act_order_no = #{actOrder}")
  166. OpRecord shouShu(BigDecimal actOrder);
  167. @Select("select * " + "from yz_act_order_cy " + "where order_no = #{actOrder}")
  168. YzActOrderCy caoYao(BigDecimal actOrder);
  169. @Select("select cast(rtrim(isnull(nullif(del_flag, ''), 0)) as int) del_flag," + "national_code,rtrim(code) + '-' + rtrim(serial) code,rtrim(name) name, rtrim(name) as zd_name,rtrim(code) zd_code,rtrim(serial) serial " + "from yp_zd_dict " + "${ew.customSqlSegment}")
  170. List<YaoPinXiangMu> huoQuYaoPinPiPeiXinXi(@Param(Constants.WRAPPER) Wrapper<?> wp);
  171. @Select("<script>" + "select rtrim(a.order_code) code, " + " rtrim(a.order_name) name, " + " national_code, " + " rtrim(c.code) as zd_code," + " rtrim(c.name) as zd_name," + " cast(rtrim(isnull(nullif(c.del_flag, ''), 0)) as int) del_flag," + " serial = '00' " + "from yz_order_item a with (NOLOCK) , " + " yz_order_occurence b with (NOLOCK) , " + " zd_charge_item c with (NOLOCK)" + "where a.order_code in " + "<foreach collection='code' item='item' index='index' open='(' close=')' separator=','>" + "#{item}" + "</foreach>" + " and a.order_code = b.order_code " + " and b.occ_code = c.code" + "</script>")
  172. List<YaoPinXiangMu> huoQuXiangMuXinXi(List<String> code);
  173. /**
  174. * 获取患者的科室发送信息
  175. *
  176. * @param wardCode 科室编码
  177. * @return 数据
  178. */
  179. @Select("select code " +
  180. "from a_employee_mi " +
  181. "where dept_code = #{wardCode} " +
  182. " and isnull(del_flag, 0) <> 1 " +
  183. " and emp_tit_code = '010' ")
  184. List<String> huoQuHuanZheBingFangDeHuShi(String wardCode);
  185. @Insert({"<script>" +
  186. "insert t_socket_message (id,sender, title, content, pat_id) values " +
  187. "<foreach collection='list' item='item' separator=','>" +
  188. "(#{item.id},#{item.sender},#{item.title},#{item.content},#{item.patId})" +
  189. "</foreach>" +
  190. "</script>"})
  191. void chaRuTongZhiXinXi(@Param("list") List<SocketMessage> list);
  192. @Insert({"<script>" + "insert into t_socket_message_consumer (msg_id, sender, receiver) values " + "<foreach collection='list' item='item' separator=','>" + " (#{item.msgId}, #{item.sender}, #{item.receiver})" + "</foreach>" + "</script>"})
  193. void chaRuJieShouShuJu(@Param("list") List<SocketMessage> list);
  194. @Select("select rtrim(${id}) as code, rtrim(${name}) as name from ${table} where isnull(${pyColumn}, '')='' ")
  195. List<CodeName> originalList(@Param("table") String table, @Param("id") String id, @Param("name") String name, @Param("pyColumn") String pyColumn);
  196. @Update("update ${table} set ${pyColumn}='${pyCode}' where ${idColumn}='${id}' ")
  197. void updatePycode(@Param("table") String table, @Param("idColumn") String idColumn, @Param("id") String id, @Param("pyColumn") String pyColumn, @Param("pyCode") String pyCode);
  198. @Select("select code, name " + "from zd_allergen " + "where (wb_code like #{name} or py_code like #{name} or name like #{name})")
  199. List<GetDropdownBox> getAllergens(@Param("name") String name);
  200. @Select("select allergen_code, (select name from zd_allergen where zd_allergen.code = allergen_code) as allergenName, id,type " + "from patient_allergen_info " + "where pat_no = #{patNo} " + " and type = 0 " + "union all " + "select allergen_code, (select name from yp_zd_dict b where rtrim(b.code) + '_' + rtrim(b.serial) = allergen_code) as allergenName, id,type " + "from patient_allergen_info " + "where pat_no = #{patNo} " + " and type = 1")
  201. List<PatientAllergenInfo> getPatientAllergens(@Param("patNo") String patNo);
  202. @Select("select count(1) from patient_allergen_info where pat_no = #{patNo}")
  203. int whetherThePatientHasAllergens(String patNo);
  204. @Insert("insert into patient_allergen_info (pat_no, allergen_code,type) values (#{patNo},#{allergenCode},#{type})")
  205. @Options(useGeneratedKeys = true, keyColumn = "id", keyProperty = "id")
  206. void newPatientAllergens(PatientAllergenInfo param);
  207. @Delete("delete from patient_allergen_info where id = #{id}")
  208. void removePatientAllergens(Integer id);
  209. @Select("select * from bld_cat_code where (code = #{name} or name like #{name})")
  210. List<GetDropdownBox> getBldCat(String name);
  211. @Select("SELECT distinct rtrim(a.dept_code) as dept_code, " + " rtrim(a.dept_name) as dept_name, " + " rtrim(a.ward_code) as ward_code, " + " rtrim(a.ward_name) as ward_name, " + " rtrim(b.small_dept) as small_code, " + " small_name = (select rtrim(name) name from zd_unit_code where code = small_dept) " + "FROM zy_adtward a, " + " zd_dept_all b " + "where a.ward_code = b.dept")
  212. List<ZkList> getTheTransferList();
  213. @Select("select RTRIM(code) AS code,RTRIM(name) AS name from zd_emp_position where isnull(del_flag,0) = 0")
  214. List<GetDropdownBox> getEmpPosition();
  215. @Select("select RTRIM(code) AS code,RTRIM(name) AS name " + "from zd_emp_inmark")
  216. List<GetDropdownBox> getEmpInmark();
  217. @Select("select RTRIM(code) AS code,RTRIM(name) AS name " + "from zd_ifcadre")
  218. List<GetDropdownBox> getZdIfcadre();
  219. @Select("select RTRIM(code) AS code,RTRIM(name) AS name " + "from zd_emp_title " + "where isnull(del_flag, 0) = 0")
  220. List<GetDropdownBox> getZdEmpTitle();
  221. @Select("select RTRIM(code) AS code,RTRIM(name) AS name " + "from mzy_zd_charge_type " + "where isnull(del_flag, 0) = 0")
  222. List<GetDropdownBox> getMzyZdChargeType();
  223. @Update("update rs_config " + "set rs_code =rs_code")
  224. void lockThePersonnelCodeTable();
  225. @Select("select rs_code + 1 " + "from rs_config")
  226. Integer getPersonnelCode();
  227. @Update("update rs_config " + "set rs_code = #{code}")
  228. void updateStaffCodeTable(Integer code);
  229. @Select("SELECT rtrim(code_rs) as uid,\n" + " rtrim(name) as displayName,\n" + " manager = '', /*1 就是有审核权限*/\n" + " oldUid = '',\n" + " userPassword = '123456',\n" + " ou= '001',\n" + " _id = 'Emr.model.EmrUsers-' + cast(row_number() over (order by code ) + 2 as varchar),\n" + " phone_no as mobile\n" + "from a_employee_mi\n" + "where isnull(del_flag, 0) = 0\n" + " and (select role_id from dj_user_role where dj_user_role.user_code = a_employee_mi.code and role_id = 11) = 11")
  230. List<Map<String, String>> emrAdd();
  231. @Select("SELECT rtrim(dept_code) code ,rtrim(dept_name) name FROM zy_adtward WHERE PATINDEX('8%',ward_code)=0 ")
  232. List<GetDropdownBox> getZhuYuanDept();
  233. @Select("select group_name from yp_zd_group_name where group_no = #{groupNo} ")
  234. String getGroupName(String groupNo);
  235. @Select("select count(1) from new_act_order_recording where act_order_no = #{orderNo} ")
  236. int selectRecordByOrderNo(BigDecimal orderNo);
  237. @Insert("insert into new_act_order_recording (act_order_no, creation_id) values (#{orderNo},#{userCode})")
  238. void insertOrderNoRecord(BigDecimal orderNo,
  239. String userCode);
  240. }