|
@@ -19,7 +19,7 @@ public interface ZdUnitCodeMapper {
|
|
|
*/
|
|
|
@Select({"<script>",
|
|
|
"SELECT top ${pageSize} code,name,class_code,py_code,d_code wbCode,mz_flag,del_flag,n_code ynCode,yj_flag,mzrc_flag,parent_code,gh_charge_flag,office_pos,",
|
|
|
- "supply_flag,xnh_dept_code,xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date FROM (SELECT ROW_NUMBER() OVER (ORDER BY zd_unit_code_page.${orderByCase} asc) ",
|
|
|
+ "supply_flag,xnh_dept_code,xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date,inpatient_flag FROM (SELECT ROW_NUMBER() OVER (ORDER BY zd_unit_code_page.${orderByCase} asc) ",
|
|
|
"AS RowNumber,* from dbo.zd_unit_code zd_unit_code_page WITH(NOLOCK) where 1=1 ",
|
|
|
"<when test='zdUnitCode.delFlag!=null'>",
|
|
|
" and del_flag =#{zdUnitCode.delFlag,jdbcType=VARCHAR}",
|
|
@@ -150,10 +150,10 @@ public interface ZdUnitCodeMapper {
|
|
|
* @return
|
|
|
*/
|
|
|
@Insert("INSERT INTO dbo.zd_unit_code(code,name,class_code,py_code,d_code,mz_flag,del_flag,n_code,yj_flag,mzrc_flag,parent_code," +
|
|
|
- "gh_charge_flag,office_pos,supply_flag,xnh_dept_code,xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date )VALUES(#{code,jdbcType=VARCHAR},#{name,jdbcType=VARCHAR}" +
|
|
|
+ "gh_charge_flag,office_pos,supply_flag,xnh_dept_code,xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date,inpatient_flag )VALUES(#{code,jdbcType=VARCHAR},#{name,jdbcType=VARCHAR}" +
|
|
|
",#{classCode,jdbcType=VARCHAR},#{pyCode,jdbcType=VARCHAR},#{wbCode,jdbcType=VARCHAR},#{mzFlag,jdbcType=CHAR},#{delFlag,jdbcType=CHAR},#{ynCode,jdbcType=VARCHAR},#{yjFlag,jdbcType=CHAR}" +
|
|
|
",#{mzrcFlag,jdbcType=CHAR},#{parentCode,jdbcType=CHAR},#{ghChargeFlag,jdbcType=CHAR},#{officePos,jdbcType=VARCHAR},#{supplyFlag,jdbcType=CHAR},#{xnhDeptCode,jdbcType=VARCHAR}" +
|
|
|
- ",#{xnhDeptName,jdbcType=VARCHAR},#{ghjzFlag,jdbcType=CHAR},#{mzClass,jdbcType=VARCHAR},#{sortCode,jdbcType=VARCHAR},#{opId,jdbcType=VARCHAR},#{opDate,jdbcType=TIMESTAMP}) ")
|
|
|
+ ",#{xnhDeptName,jdbcType=VARCHAR},#{ghjzFlag,jdbcType=CHAR},#{mzClass,jdbcType=VARCHAR},#{sortCode,jdbcType=VARCHAR},#{opId,jdbcType=VARCHAR},#{opDate,jdbcType=TIMESTAMP},#{inpatientFlag}) ")
|
|
|
int insertZdUnitCode(ZdUnitCode zdUnitCode);
|
|
|
|
|
|
/**
|
|
@@ -228,6 +228,9 @@ public interface ZdUnitCodeMapper {
|
|
|
"<when test='opDate!=null'>",
|
|
|
",op_date =#{opDate,jdbcType=TIMESTAMP}",
|
|
|
"</when>",
|
|
|
+ "<when test='inpatientFlag!=null'>",
|
|
|
+ " ,inpatient_flag =#{inpatientFlag}",
|
|
|
+ "</when>",
|
|
|
"</trim>",
|
|
|
"</script>"})
|
|
|
int updateZdUnitCode(ZdUnitCode zdUnitCode);
|
|
@@ -239,7 +242,7 @@ public interface ZdUnitCodeMapper {
|
|
|
* @return
|
|
|
*/
|
|
|
@Select("select code,name,class_code,py_code,d_code wbCode,mz_flag,del_flag,n_code ynCode,yj_flag,mzrc_flag,parent_code,gh_charge_flag,office_pos,supply_flag,xnh_dept_code," +
|
|
|
- "xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date from dbo.zd_unit_code WITH(NOLOCK) where code=#{code,jdbcType=VARCHAR}")
|
|
|
+ "xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date,inpatient_flag from dbo.zd_unit_code WITH(NOLOCK) where code=#{code,jdbcType=VARCHAR}")
|
|
|
ZdUnitCode selectByCode(@Param("code") String code);
|
|
|
|
|
|
/**
|
|
@@ -247,7 +250,7 @@ public interface ZdUnitCodeMapper {
|
|
|
* @return
|
|
|
*/
|
|
|
@Select("select code,name,class_code,py_code,d_code wbCode,mz_flag,del_flag,n_code ynCode,yj_flag,mzrc_flag,parent_code,gh_charge_flag,office_pos,supply_flag,xnh_dept_code," +
|
|
|
- "xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date from dbo.zd_unit_code WITH(NOLOCK) ")
|
|
|
+ "xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date,inpatient_flag from dbo.zd_unit_code WITH(NOLOCK) ")
|
|
|
List<ZdUnitCode> selectAll();
|
|
|
|
|
|
|
|
@@ -261,7 +264,7 @@ public interface ZdUnitCodeMapper {
|
|
|
*/
|
|
|
@Select({"<script>",
|
|
|
"SELECT code,name,class_code,py_code,d_code wbCode,mz_flag,del_flag,n_code ynCode,yj_flag,mzrc_flag,parent_code,gh_charge_flag,office_pos,",
|
|
|
- "supply_flag,xnh_dept_code,xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date FROM dbo.zd_unit_code WITH(NOLOCK) where 1=1 ",
|
|
|
+ "supply_flag,xnh_dept_code,xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date,inpatient_flag FROM dbo.zd_unit_code WITH(NOLOCK) where 1=1 ",
|
|
|
"<when test='zdUnitCode.delFlag!=null'>",
|
|
|
" and del_flag =#{zdUnitCode.delFlag,jdbcType=VARCHAR}",
|
|
|
"</when>",
|
|
@@ -298,6 +301,9 @@ public interface ZdUnitCodeMapper {
|
|
|
"<when test='zdUnitCode.mzClass!=null'>",
|
|
|
" and mz_class =#{zdUnitCode.mzClass,jdbcType=CHAR}",
|
|
|
"</when>",
|
|
|
+ "<when test='zdUnitCode.inpatientFlag!=null'>",
|
|
|
+ " and inpatient_flag =#{zdUnitCode.inpatientFlag}",
|
|
|
+ "</when>",
|
|
|
" order by ${orderByCase} asc",
|
|
|
"</script>"})
|
|
|
List<ZdUnitCode> selectZdUnitCode(ZdUnitCodePageDto zdUnitCodePageDto);
|
|
@@ -308,7 +314,7 @@ public interface ZdUnitCodeMapper {
|
|
|
* @return
|
|
|
*/
|
|
|
@Select("select code,name,class_code,py_code,d_code wbCode,mz_flag,del_flag,n_code ynCode,yj_flag,mzrc_flag,parent_code,gh_charge_flag,office_pos,supply_flag,xnh_dept_code," +
|
|
|
- "xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date from dbo.zd_unit_code WITH(NOLOCK) where del_flag=0 and mz_flag =1 and parent_code=#{parentCode}")
|
|
|
+ "xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date,inpatient_flag from dbo.zd_unit_code WITH(NOLOCK) where del_flag=0 and mz_flag =1 and parent_code=#{parentCode}")
|
|
|
List<ZdUnitCode> selectChildren(@Param("parentCode") String parentCode);
|
|
|
|
|
|
|
|
@@ -317,7 +323,7 @@ public interface ZdUnitCodeMapper {
|
|
|
* @return
|
|
|
*/
|
|
|
@Select("select code,name,class_code,py_code,d_code wbCode,mz_flag,del_flag,n_code ynCode,yj_flag,mzrc_flag,parent_code,gh_charge_flag,office_pos,supply_flag,xnh_dept_code," +
|
|
|
- "xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date from dbo.zd_unit_code WITH(NOLOCK) where del_flag=0 and mz_flag =1")
|
|
|
+ "xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date,inpatient_flag from dbo.zd_unit_code WITH(NOLOCK) where del_flag=0 and mz_flag =1")
|
|
|
List<ZdUnitCode> selectAllMzZdUnitCode();
|
|
|
|
|
|
/**
|
|
@@ -334,7 +340,7 @@ public interface ZdUnitCodeMapper {
|
|
|
* @return
|
|
|
*/
|
|
|
@Select({"<script>",
|
|
|
- "select code,name,class_code,py_code,d_code wbCode,mz_flag,del_flag,n_code ynCode,yj_flag,mzrc_flag,parent_code,gh_charge_flag,office_pos,supply_flag,xnh_dept_code,xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date from dbo.zd_unit_code WITH(NOLOCK) ",
|
|
|
+ "select code,name,class_code,py_code,d_code wbCode,mz_flag,del_flag,n_code ynCode,yj_flag,mzrc_flag,parent_code,gh_charge_flag,office_pos,supply_flag,xnh_dept_code,xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date,inpatient_flag from dbo.zd_unit_code WITH(NOLOCK) ",
|
|
|
"<when test='codes!=null'>" +
|
|
|
" where code in" +
|
|
|
"<foreach item='item' index='index' collection='codes' open='(' separator=',' close=')'>" +
|
|
@@ -350,7 +356,7 @@ public interface ZdUnitCodeMapper {
|
|
|
* 查询所有的病区
|
|
|
* @return
|
|
|
*/
|
|
|
- @Select("select code,name,class_code,py_code,d_code wbCode,mz_flag,del_flag,n_code ynCode,yj_flag,mzrc_flag,parent_code,gh_charge_flag,office_pos,supply_flag,xnh_dept_code,xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date from zd_unit_code WITH(NOLOCK) where code like '8%'")
|
|
|
+ @Select("select code,name,class_code,py_code,d_code wbCode,mz_flag,del_flag,n_code ynCode,yj_flag,mzrc_flag,parent_code,gh_charge_flag,office_pos,supply_flag,xnh_dept_code,xnh_dept_name,ghjz_flag,mz_class,sort_code,op_id,op_date,inpatient_flag from zd_unit_code WITH(NOLOCK) where code like '8%'")
|
|
|
List<ZdUnitCode> selectAllInpatientWard();
|
|
|
|
|
|
/**
|