Merge branch 'youxilong_2.26_院后第一增量' of http://192.168.16.64:3000/jihan/PostDischargePatientManage into youxilong_2.26_院后第一增量

This commit is contained in:
youxilong 2024-02-29 08:57:23 +08:00
commit 326db20b10
8 changed files with 98 additions and 69 deletions

View File

@ -2,6 +2,7 @@ package com.xinelu.manage.mapper.department;
import com.xinelu.manage.domain.department.Department; import com.xinelu.manage.domain.department.Department;
import com.xinelu.manage.dto.department.DepartmentDTO; import com.xinelu.manage.dto.department.DepartmentDTO;
import com.xinelu.manage.vo.department.DepartmentListVO;
import com.xinelu.manage.vo.department.DepartmentVO; import com.xinelu.manage.vo.department.DepartmentVO;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -23,6 +24,14 @@ public interface DepartmentMapper {
*/ */
Department selectDepartmentById(Long id); Department selectDepartmentById(Long id);
/**
* 查询科室信息
*
* @param id 科室信息主键
* @return 科室信息
*/
DepartmentListVO selectDepartment(Long id);
/** /**
* 查询科室信息列表 * 查询科室信息列表
* *

View File

@ -61,6 +61,8 @@ public class AgencyServiceImpl implements IAgencyService {
agency.setRegionName(StringUtils.isBlank(nurseStationAndAreaCode.getRegionName()) ? "" : nurseStationAndAreaCode.getRegionName()); agency.setRegionName(StringUtils.isBlank(nurseStationAndAreaCode.getRegionName()) ? "" : nurseStationAndAreaCode.getRegionName());
agency.setStreetCode(StringUtils.isBlank(nurseStationAndAreaCode.getStreetCode()) ? "" : nurseStationAndAreaCode.getStreetCode()); agency.setStreetCode(StringUtils.isBlank(nurseStationAndAreaCode.getStreetCode()) ? "" : nurseStationAndAreaCode.getStreetCode());
agency.setStreetName(StringUtils.isBlank(nurseStationAndAreaCode.getStreetName()) ? "" : nurseStationAndAreaCode.getStreetName()); agency.setStreetName(StringUtils.isBlank(nurseStationAndAreaCode.getStreetName()) ? "" : nurseStationAndAreaCode.getStreetName());
agency.setCommunityCode(StringUtils.isBlank(nurseStationAndAreaCode.getCommunityCode()) ? "" : nurseStationAndAreaCode.getCommunityCode());
agency.setCommunityName(StringUtils.isBlank(nurseStationAndAreaCode.getCommunityName()) ? "" : nurseStationAndAreaCode.getCommunityName());
} }
return agency; return agency;
} }

View File

@ -3,6 +3,7 @@ package com.xinelu.manage.service.department;
import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.manage.domain.department.Department; import com.xinelu.manage.domain.department.Department;
import com.xinelu.manage.dto.department.DepartmentDTO; import com.xinelu.manage.dto.department.DepartmentDTO;
import com.xinelu.manage.vo.department.DepartmentListVO;
import com.xinelu.manage.vo.department.DepartmentVO; import com.xinelu.manage.vo.department.DepartmentVO;
import java.util.List; import java.util.List;
@ -21,7 +22,7 @@ public interface IDepartmentService {
* @param id 科室信息主键 * @param id 科室信息主键
* @return 科室信息 * @return 科室信息
*/ */
Department selectDepartmentById(Long id); DepartmentListVO selectDepartmentById(Long id);
/** /**
* 查询科室信息列表 * 查询科室信息列表

View File

@ -11,6 +11,7 @@ import com.xinelu.manage.domain.department.Department;
import com.xinelu.manage.dto.department.DepartmentDTO; import com.xinelu.manage.dto.department.DepartmentDTO;
import com.xinelu.manage.mapper.department.DepartmentMapper; import com.xinelu.manage.mapper.department.DepartmentMapper;
import com.xinelu.manage.service.department.IDepartmentService; import com.xinelu.manage.service.department.IDepartmentService;
import com.xinelu.manage.vo.department.DepartmentListVO;
import com.xinelu.manage.vo.department.DepartmentVO; import com.xinelu.manage.vo.department.DepartmentVO;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.BooleanUtils;
@ -45,8 +46,8 @@ public class DepartmentServiceImpl implements IDepartmentService {
* @return 科室信息 * @return 科室信息
*/ */
@Override @Override
public Department selectDepartmentById(Long id) { public DepartmentListVO selectDepartmentById(Long id) {
return departmentMapper.selectDepartmentById(id); return departmentMapper.selectDepartment(id);
} }
/** /**
@ -140,7 +141,6 @@ public class DepartmentServiceImpl implements IDepartmentService {
} }
/** /**
*
* 查询科室信息列表及包含短信库数量 * 查询科室信息列表及包含短信库数量
* *
* @param departmentDto * @param departmentDto

View File

@ -59,6 +59,16 @@ public class AgencyVO extends Agency {
*/ */
private String streetCode; private String streetCode;
/**
* 社区名称
*/
private String communityName;
/**
* 社区区域编码
*/
private String communityCode;
/** /**
* 上级机构 * 上级机构
*/ */

View File

@ -0,0 +1,21 @@
package com.xinelu.manage.vo.department;
import com.xinelu.manage.domain.department.Department;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 科室信息对象vo
*
* @author zh
* @date 2024-02-26
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class DepartmentListVO extends Department {
/**
* 上级科室名称
*/
private String parentDepartmentName;
}

View File

@ -7,8 +7,6 @@ import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/** /**
* @author : youxilong * @author : youxilong
@ -44,17 +42,4 @@ public class DepartmentVO extends BaseEntity {
*/ */
@ApiModelProperty(value = "科室代码") @ApiModelProperty(value = "科室代码")
private Integer countNum; private Integer countNum;
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("departmentName", getDepartmentName())
.append("departmentCode", getDepartmentCode())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
} }

View File

@ -65,94 +65,64 @@
<include refid="selectDepartmentVo"/> <include refid="selectDepartmentVo"/>
<where> <where>
<if test="parentDepartmentId != null "> <if test="parentDepartmentId != null ">
and parent_department_id = and parent_department_id =#{parentDepartmentId}
#{parentDepartmentId}
</if> </if>
<if test="agencyId != null "> <if test="agencyId != null ">
and agency_id = and agency_id =#{agencyId}
#{agencyId}
</if> </if>
<if test="agencyName != null and agencyName != ''"> <if test="agencyName != null and agencyName != ''">
and agency_name like concat('%', and agency_name like concat('%',#{agencyName},'%')
#{agencyName},
'%'
)
</if> </if>
<if test="departmentName != null and departmentName != ''"> <if test="departmentName != null and departmentName != ''">
and department_name like concat('%', and department_name like concat('%',#{departmentName},'%')
#{departmentName},
'%'
)
</if> </if>
<if test="departmentCode != null and departmentCode != ''"> <if test="departmentCode != null and departmentCode != ''">
and department_code = and department_code =#{departmentCode}
#{departmentCode}
</if> </if>
<if test="departmentType != null and departmentType != ''"> <if test="departmentType != null and departmentType != ''">
and department_type = and department_type =#{departmentType}
#{departmentType}
</if> </if>
<if test="departmentAbbreviation != null and departmentAbbreviation != ''"> <if test="departmentAbbreviation != null and departmentAbbreviation != ''">
and department_abbreviation = and department_abbreviation =#{departmentAbbreviation}
#{departmentAbbreviation}
</if> </if>
<if test="departmentPersonId != null "> <if test="departmentPersonId != null ">
and department_person_id = and department_person_id =#{departmentPersonId}
#{departmentPersonId}
</if> </if>
<if test="departmentPersonName != null and departmentPersonName != ''"> <if test="departmentPersonName != null and departmentPersonName != ''">
and department_person_name like concat('%', and department_person_name like concat ('%',#{departmentPersonName},'%')
#{departmentPersonName},
'%'
)
</if> </if>
<if test="nodeType != null and nodeType != ''"> <if test="nodeType != null and nodeType != ''">
and node_type = and node_type =#{nodeType}
#{nodeType}
</if> </if>
<if test="provideServiceCategory != null and provideServiceCategory != ''"> <if test="provideServiceCategory != null and provideServiceCategory != ''">
and provide_service_category = and provide_service_category =#{provideServiceCategory}
#{provideServiceCategory}
</if> </if>
<if test="subdivisionCategoryId != null "> <if test="subdivisionCategoryId != null ">
and subdivision_category_id = and subdivision_category_id =#{subdivisionCategoryId}
#{subdivisionCategoryId}
</if> </if>
<if test="subdivisionCategoryName != null and subdivisionCategoryName != ''"> <if test="subdivisionCategoryName != null and subdivisionCategoryName != ''">
and subdivision_category_name like concat('%', and subdivision_category_name like concat('%',#{subdivisionCategoryName},'%')
#{subdivisionCategoryName},
'%'
)
</if> </if>
<if test="normDepartmentCompareId != null "> <if test="normDepartmentCompareId != null ">
and norm_department_compare_id = and norm_department_compare_id =#{normDepartmentCompareId}
#{normDepartmentCompareId}
</if> </if>
<if test="normDepartmentCompareName != null and normDepartmentCompareName != ''"> <if test="normDepartmentCompareName != null and normDepartmentCompareName != ''">
and norm_department_compare_name like concat('%', and norm_department_compare_name like concat('%',#{normDepartmentCompareName},'%')
#{normDepartmentCompareName},
'%'
)
</if> </if>
<if test="prepareBedsCount != null "> <if test="prepareBedsCount != null ">
and prepare_beds_count = and prepare_beds_count =#{prepareBedsCount}
#{prepareBedsCount}
</if> </if>
<if test="departmentPhone != null and departmentPhone != ''"> <if test="departmentPhone != null and departmentPhone != ''">
and department_phone = and department_phone =#{departmentPhone}
#{departmentPhone}
</if> </if>
<if test="departmentMail != null and departmentMail != ''"> <if test="departmentMail != null and departmentMail != ''">
and department_mail = and department_mail =#{departmentMail}
#{departmentMail}
</if> </if>
<if test="establishDate != null "> <if test="establishDate != null ">
and establish_date = and establish_date =#{establishDate}
#{establishDate}
</if> </if>
<if test="revokeDate != null "> <if test="revokeDate != null ">
and revoke_date = and revoke_date =#{revokeDate}
#{revokeDate}
</if> </if>
</where> </where>
</select> </select>
@ -163,6 +133,37 @@
where id = #{id} where id = #{id}
</select> </select>
<select id="selectDepartment" resultType="com.xinelu.manage.vo.department.DepartmentListVO">
select id,
dt.parent_department_id,
agency_id,
agency_name,
department_name,
department_code,
department_type,
department_abbreviation,
department_person_id,
department_person_name,
node_type,
provide_service_category,
subdivision_category_id,
subdivision_category_name,
norm_department_compare_id,
norm_department_compare_name,
prepare_beds_count,
department_phone,
department_mail,
establish_date,
revoke_date,
create_by,
create_time,
update_by,
update_time,
(select department_name from department where id = dt.parent_department_id) parentDepartmentName
from department dt
where id = #{id}
</select>
<select id="selectDepartmentListScriptNum" resultType="com.xinelu.manage.vo.department.DepartmentVO"> <select id="selectDepartmentListScriptNum" resultType="com.xinelu.manage.vo.department.DepartmentVO">
select d.id, select d.id,
d.department_name, d.department_name,