|
|
@@ -0,0 +1,82 @@
|
|
|
+package thyyxxk.webserver.dao_his.managedoctorinfo;
|
|
|
+
|
|
|
+import org.apache.ibatis.annotations.Mapper;
|
|
|
+import org.apache.ibatis.annotations.Param;
|
|
|
+import org.apache.ibatis.annotations.Select;
|
|
|
+import org.apache.ibatis.annotations.Update;
|
|
|
+import thyyxxk.webserver.pojo.dictionary.CodeNamePojo;
|
|
|
+import thyyxxk.webserver.pojo.dictionary.PureCodeName;
|
|
|
+import thyyxxk.webserver.pojo.mangedoctorinfo.DoctorPojo;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+@Mapper
|
|
|
+public interface ManageDoctorInfoDao {
|
|
|
+ @Select("select rtrim(code) code, rtrim(name) name, rtrim(py_code) pyCode from zd_unit_code where mz_flag=1")
|
|
|
+ List<CodeNamePojo> getAllMzDept();
|
|
|
+
|
|
|
+ @Select("select rtrim(b.name) titleName, " +
|
|
|
+ "rtrim(b.code) titleCode, " +
|
|
|
+ "rtrim(a.name) name, " +
|
|
|
+ "isnull(a.sex_code, 9) sex, " +
|
|
|
+ "rtrim(a.code) code, " +
|
|
|
+ "isnull(a.wx_homepage_flag, 0) wxHomepageFlag, " +
|
|
|
+ "rtrim(a.dept_code) deptCode, " +
|
|
|
+ "deptName=(select rtrim(name) from zd_unit_code where code=a.dept_code) " +
|
|
|
+ "from a_employee_mi a,zd_emp_title b " +
|
|
|
+ "where a.emp_tit_code=b.code " +
|
|
|
+ "and b.tit_grade =1 and a.code not in ('00000', '00026') " +
|
|
|
+ "and isnull(a.del_flag,0)<>1 order by a.code")
|
|
|
+ List<DoctorPojo> getAllDoctors();
|
|
|
+
|
|
|
+ @Select("select rtrim(code) code, rtrim(name) name " +
|
|
|
+ "from zd_emp_title where tit_grade=1 order by code")
|
|
|
+ List<PureCodeName> getAllTitles();
|
|
|
+
|
|
|
+ @Select("select name=rtrim(a.name), " +
|
|
|
+ "sex=isnull(a.sex_code, 9)," +
|
|
|
+ "rtrim(a.emp_tit_code) titleCode," +
|
|
|
+ "titleName=(select rtrim(name) from zd_emp_title where code=a.emp_tit_code), " +
|
|
|
+ "code=rtrim(a.code), " +
|
|
|
+ "rtrim(a.dept_code) deptCode," +
|
|
|
+ "deptName=(select rtrim(name) from zd_unit_code where code=a.dept_code), " +
|
|
|
+ "a.portrait, " +
|
|
|
+ "a.specialty, " +
|
|
|
+ "a.introduction " +
|
|
|
+ "from a_employee_mi a where a.code=#{code}")
|
|
|
+ DoctorPojo getDoctorInfo(@Param("code") String code);
|
|
|
+
|
|
|
+ @Update("update a_employee_mi set " +
|
|
|
+ "name=#{name}, " +
|
|
|
+ "sex_code=#{sex}, " +
|
|
|
+ "dept_code=#{deptCode}, " +
|
|
|
+ "emp_tit_code=#{titleCode}, " +
|
|
|
+ "introduction=#{introduction}, " +
|
|
|
+ "specialty=#{specialty} " +
|
|
|
+ "where code=#{code}")
|
|
|
+ void saveDoctorInfo(DoctorPojo param);
|
|
|
+
|
|
|
+ @Update("update a_employee_mi set portrait=#{imgBase64} where code=#{code}")
|
|
|
+ void updatePortraitUrl(@Param("imgBase64") String imgBase64, @Param("code") String code);
|
|
|
+
|
|
|
+ @Update("update a_employee_mi set wx_homepage_flag=#{flag} where code=#{code}")
|
|
|
+ void updateDoctorWxHomepageFlag(@Param("code") String code, @Param("flag") Integer flag);
|
|
|
+
|
|
|
+ @Select("select " +
|
|
|
+ "rtrim(b.name) titleName, " +
|
|
|
+ "rtrim(a.name) name, " +
|
|
|
+ "isnull(a.sex_code, 9) sex, " +
|
|
|
+ "rtrim(a.code) code, " +
|
|
|
+ "a.wx_homepage_flag," +
|
|
|
+ "a.wx_homepage_order, " +
|
|
|
+ "deptName=(select rtrim(name) from zd_unit_code where code=a.dept_code) " +
|
|
|
+ "from a_employee_mi a,zd_emp_title b " +
|
|
|
+ "where a.emp_tit_code=b.code " +
|
|
|
+ "and a.wx_homepage_flag=1 " +
|
|
|
+ "and b.tit_grade=1 " +
|
|
|
+ "and isnull(a.del_flag,0)<>1 order by a.wx_homepage_order")
|
|
|
+ List<DoctorPojo> getAllRecommendDoctors();
|
|
|
+
|
|
|
+ @Update("update a_employee_mi set wx_homepage_order=#{order} where code=#{code}")
|
|
|
+ void updateWxHomepageOrder(@Param("code") String code, @Param("order") Integer order);
|
|
|
+}
|