|
@@ -15,8 +15,25 @@ public interface YpZdGroupNameMapper {
|
|
|
* @param groupNo
|
|
|
* @return
|
|
|
*/
|
|
|
- @Select("select group_no,dept_code,py_code,d_code wb_code,group_name,mz_flag,yf_flag from yp_zd_group_name WITH(NOLOCK) where group_no=#{groupNo}")
|
|
|
+ @Select("select * from yp_zd_group_name WITH(NOLOCK) where group_no=#{groupNo}")
|
|
|
YpZdGroupName selectByGroupNo(@Param("groupNo") String groupNo);
|
|
|
+ /**
|
|
|
+ * @description: 查询门诊 西药或中草药房 type =1 为 西药 2 中药
|
|
|
+ * @author: lihong
|
|
|
+ * @date: 2025/6/13 16:42
|
|
|
+ * @param: type
|
|
|
+ * @return: java.util.List<cn.hnthyy.thmz.entity.his.yp.YpZdGroupName>
|
|
|
+ **/
|
|
|
+ @Select(" <script>" +
|
|
|
+ " select * from yp_zd_group_name WITH(NOLOCK) where isnull(del_flag,'0') ='0' and mz_flag = '1'" +
|
|
|
+ " <if test='type == 1'>" +
|
|
|
+ " and xy_flag = '1'"+
|
|
|
+ "</if>"+
|
|
|
+ " <if test='type == 2'>" +
|
|
|
+ " and zcy_flag = '1'"+
|
|
|
+ "</if>"+
|
|
|
+ "</script>")
|
|
|
+ List<YpZdGroupName> selectByXyOrZcy(Integer type);
|
|
|
|
|
|
/**
|
|
|
* 根据科室编码查询药房
|
|
@@ -24,7 +41,7 @@ public interface YpZdGroupNameMapper {
|
|
|
* @param deptCode
|
|
|
* @return
|
|
|
*/
|
|
|
- @Select("select group_no,dept_code,py_code,d_code wb_code,group_name,mz_flag,yf_flag from yp_zd_group_name WITH(NOLOCK) where dept_code=#{deptCode}")
|
|
|
+ @Select("select * from yp_zd_group_name WITH(NOLOCK) where dept_code=#{deptCode}")
|
|
|
YpZdGroupName selectByDeptCode(@Param("deptCode") String deptCode);
|
|
|
|
|
|
/**
|
|
@@ -34,7 +51,7 @@ public interface YpZdGroupNameMapper {
|
|
|
* @return
|
|
|
*/
|
|
|
@Select({"<script>",
|
|
|
- "SELECT top ${pageSize} group_no,dept_code,py_code,d_code wb_code,group_name,mz_flag,yf_flag" +
|
|
|
+ "SELECT top ${pageSize} *" +
|
|
|
" FROM (SELECT ROW_NUMBER() OVER (ORDER BY yp_zd_group_name.group_no desc) " +
|
|
|
"AS RowNumber,* from yp_zd_group_name WITH(NOLOCK) where 1=1 " +
|
|
|
"<when test='ypZdGroupName.groupNo!=null'>" +
|
|
@@ -69,7 +86,7 @@ public interface YpZdGroupNameMapper {
|
|
|
* @return
|
|
|
*/
|
|
|
@Select({"<script>",
|
|
|
- "SELECT group_no,dept_code,py_code,d_code wb_code,group_name,mz_flag,yf_flag " +
|
|
|
+ "SELECT * " +
|
|
|
"from yp_zd_group_name WITH(NOLOCK) where 1=1 " +
|
|
|
"<when test='ypZdGroupName.groupNo!=null'>" +
|
|
|
" and group_no =#{ypZdGroupName.groupNo}" +
|
|
@@ -101,7 +118,7 @@ public interface YpZdGroupNameMapper {
|
|
|
* @return
|
|
|
*/
|
|
|
@Select({"<script>",
|
|
|
- "SELECT group_no,dept_code,py_code,d_code wb_code,group_name,mz_flag,yf_flag" +
|
|
|
+ "SELECT *" +
|
|
|
" FROM yp_zd_group_name WITH(NOLOCK) ",
|
|
|
" order by group_no ASC",
|
|
|
"</script>"})
|
|
@@ -146,9 +163,9 @@ public interface YpZdGroupNameMapper {
|
|
|
* @param ypZdGroupNameVo
|
|
|
* @return
|
|
|
*/
|
|
|
- @Insert("insert into yp_zd_group_name(group_no,dept_code,py_code,d_code,group_name,mz_flag,yf_flag)" +
|
|
|
+ @Insert("insert into yp_zd_group_name(group_no,dept_code,py_code,d_code,group_name,mz_flag,yf_flag,zy_flag,xy_flag,zcy_flag,start_time,end_time,del_flag,office_pos)" +
|
|
|
" values(#{groupNo,jdbcType=VARCHAR},#{deptCode,jdbcType=VARCHAR},#{pyCode,jdbcType=VARCHAR}," +
|
|
|
- "#{wbCode,jdbcType=VARCHAR},#{groupName,jdbcType=VARCHAR},#{mzFlag,jdbcType=CHAR},#{yfFlag,jdbcType=CHAR})")
|
|
|
+ "#{wbCode,jdbcType=VARCHAR},#{groupName,jdbcType=VARCHAR},#{mzFlag,jdbcType=CHAR},#{yfFlag,jdbcType=CHAR},#{zyFlag,jdbcType=VARCHAR},#{xyFlag,jdbcType=VARCHAR},#{zcyFlag,jdbcType=VARCHAR},#{startTime,jdbcType=VARCHAR},#{endTime,jdbcType=VARCHAR},#{delFlag,jdbcType=VARCHAR},#{delFlag,jdbcType=VARCHAR},#{officePos,jdbcType=VARCHAR})")
|
|
|
int insertYpZdGroupName(YpZdGroupNameVo ypZdGroupNameVo);
|
|
|
|
|
|
/**
|
|
@@ -181,6 +198,27 @@ public interface YpZdGroupNameMapper {
|
|
|
"<when test='yfFlag!=null'>",
|
|
|
",yf_flag =#{yfFlag,jdbcType=CHAR}",
|
|
|
"</when>",
|
|
|
+ "<when test='xyFlag!=null'>",
|
|
|
+ ",xy_flag =#{xyFlag,jdbcType=VARCHAR}",
|
|
|
+ "</when>",
|
|
|
+ "<when test='zyFlag!=null'>",
|
|
|
+ ",zy_flag =#{zyFlag,jdbcType=VARCHAR}",
|
|
|
+ "</when>",
|
|
|
+ "<when test='zcyFlag!=null'>",
|
|
|
+ ",zcy_flag =#{zcyFlag,jdbcType=VARCHAR}",
|
|
|
+ "</when>",
|
|
|
+ "<when test='startTime!=null'>",
|
|
|
+ ",start_time =#{startTime,jdbcType=VARCHAR}",
|
|
|
+ "</when>",
|
|
|
+ "<when test='endTime!=null'>",
|
|
|
+ ",end_time =#{endTime,jdbcType=VARCHAR}",
|
|
|
+ "</when>",
|
|
|
+ "<when test='delFlag!=null'>",
|
|
|
+ ",del_flag =#{delFlag,jdbcType=VARCHAR}",
|
|
|
+ "</when>",
|
|
|
+ "<when test='officePos!=null'>",
|
|
|
+ ",office_pos =#{officePos,jdbcType=VARCHAR}",
|
|
|
+ "</when>",
|
|
|
"</trim>"
|
|
|
, "</script>"})
|
|
|
int updateYpZdGroupName(YpZdGroupNameVo ypZdGroupNameVo);
|