科室信息表
This commit is contained in:
parent
32501a5ad2
commit
8ff37f7d4f
@ -0,0 +1,91 @@
|
||||
package com.xinelu.manage.controller.department;
|
||||
|
||||
import com.xinelu.common.annotation.Log;
|
||||
import com.xinelu.common.core.controller.BaseController;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.core.page.TableDataInfo;
|
||||
import com.xinelu.common.enums.BusinessType;
|
||||
import com.xinelu.common.utils.poi.ExcelUtil;
|
||||
import com.xinelu.manage.domain.department.Department;
|
||||
import com.xinelu.manage.service.department.IDepartmentService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 科室信息Controller
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2024-02-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/department")
|
||||
public class DepartmentController extends BaseController {
|
||||
@Resource
|
||||
private IDepartmentService departmentService;
|
||||
|
||||
/**
|
||||
* 查询科室信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:department:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Department department) {
|
||||
startPage();
|
||||
List<Department> list = departmentService.selectDepartmentList(department);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出科室信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:department:export')")
|
||||
@Log(title = "科室信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, Department department) {
|
||||
List<Department> list = departmentService.selectDepartmentList(department);
|
||||
ExcelUtil<Department> util = new ExcelUtil<Department>(Department.class);
|
||||
util.exportExcel(response, list, "科室信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取科室信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:department:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(departmentService.selectDepartmentById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增科室信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:department:add')")
|
||||
@Log(title = "科室信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody Department department) {
|
||||
return toAjax(departmentService.insertDepartment(department));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改科室信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:department:edit')")
|
||||
@Log(title = "科室信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody Department department) {
|
||||
return toAjax(departmentService.updateDepartment(department));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除科室信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:department:remove')")
|
||||
@Log(title = "科室信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(departmentService.deleteDepartmentByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,210 @@
|
||||
package com.xinelu.manage.domain.department;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xinelu.common.annotation.Excel;
|
||||
import com.xinelu.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 科室信息对象 department
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2024-02-26
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "科室信息对象", description = "department")
|
||||
public class Department extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 上级科室id
|
||||
*/
|
||||
@ApiModelProperty(value = "上级科室id")
|
||||
@Excel(name = "上级科室id")
|
||||
private Long parentDepartmentId;
|
||||
|
||||
/**
|
||||
* 所属机构id
|
||||
*/
|
||||
@ApiModelProperty(value = "所属机构id")
|
||||
@Excel(name = "所属机构id")
|
||||
private Long agencyId;
|
||||
|
||||
/**
|
||||
* 所属机构名称
|
||||
*/
|
||||
@ApiModelProperty(value = "所属机构名称")
|
||||
@Excel(name = "所属机构名称")
|
||||
private String agencyName;
|
||||
|
||||
/**
|
||||
* 科室名称
|
||||
*/
|
||||
@ApiModelProperty(value = "科室名称")
|
||||
@Excel(name = "科室名称")
|
||||
private String departmentName;
|
||||
|
||||
/**
|
||||
* 科室代码
|
||||
*/
|
||||
@ApiModelProperty(value = "科室代码")
|
||||
@Excel(name = "科室代码")
|
||||
private String departmentCode;
|
||||
|
||||
/**
|
||||
* 科室类型
|
||||
*/
|
||||
@ApiModelProperty(value = "科室类型")
|
||||
@Excel(name = "科室类型")
|
||||
private String departmentType;
|
||||
|
||||
/**
|
||||
* 科室简称
|
||||
*/
|
||||
@ApiModelProperty(value = "科室简称")
|
||||
@Excel(name = "科室简称")
|
||||
private String departmentAbbreviation;
|
||||
|
||||
/**
|
||||
* 科室负责人id
|
||||
*/
|
||||
@ApiModelProperty(value = "科室负责人id")
|
||||
@Excel(name = "科室负责人id")
|
||||
private Long departmentPersonId;
|
||||
|
||||
/**
|
||||
* 科室负责人姓名
|
||||
*/
|
||||
@ApiModelProperty(value = "科室负责人姓名")
|
||||
@Excel(name = "科室负责人姓名")
|
||||
private String departmentPersonName;
|
||||
|
||||
/**
|
||||
* 节点类型,科室:DEPARTMENT,病区:WARD,
|
||||
*/
|
||||
@ApiModelProperty(value = "节点类型,科室:DEPARTMENT,病区:WARD,")
|
||||
@Excel(name = "节点类型,科室:DEPARTMENT,病区:WARD,")
|
||||
private String nodeType;
|
||||
|
||||
/**
|
||||
* 提供服务类别,门诊:OUTPATIENT_SERVICE,急诊:EMERGENCY_TREATMENT,住院:BE_HOSPITALIZED,病区:WARD,医技:MEDICAL_TECHNOLOGY,
|
||||
* 药剂:DRUG,财务:FINANCE,行政:ADMINISTRATION,药房:PHARMACY,药库:DRUG_STORAGE,公卫:PUBLIC_HEALTH
|
||||
*/
|
||||
@ApiModelProperty(value = "提供服务类别,门诊:OUTPATIENT_SERVICE,急诊:EMERGENCY_TREATMENT,住院:BE_HOSPITALIZED,病区:WARD,医技:MEDICAL_TECHNOLOGY,药剂:DRUG,财务:FINANCE,行政:ADMINISTRATION,药房:PHARMACY,药库:DRUG_STORAGE,公卫:PUBLIC_HEALTH")
|
||||
@Excel(name = "提供服务类别,门诊:OUTPATIENT_SERVICE,急诊:EMERGENCY_TREATMENT,住院:BE_HOSPITALIZED,病区:WARD,医技:MEDICAL_TECHNOLOGY, 药剂:DRUG,财务:FINANCE,行政:ADMINISTRATION,药房:PHARMACY,药库:DRUG_STORAGE,公卫:PUBLIC_HEALTH")
|
||||
private String provideServiceCategory;
|
||||
|
||||
/**
|
||||
* 细分类别id
|
||||
*/
|
||||
@ApiModelProperty(value = "细分类别id")
|
||||
@Excel(name = "细分类别id")
|
||||
private Long subdivisionCategoryId;
|
||||
|
||||
/**
|
||||
* 细分类别名称
|
||||
*/
|
||||
@ApiModelProperty(value = "细分类别名称")
|
||||
@Excel(name = "细分类别名称")
|
||||
private String subdivisionCategoryName;
|
||||
|
||||
/**
|
||||
* 标准科室对照id
|
||||
*/
|
||||
@ApiModelProperty(value = "标准科室对照id")
|
||||
@Excel(name = "标准科室对照id")
|
||||
private Long normDepartmentCompareId;
|
||||
|
||||
/**
|
||||
* 标准科室对照名称
|
||||
*/
|
||||
@ApiModelProperty(value = "标准科室对照名称")
|
||||
@Excel(name = "标准科室对照名称")
|
||||
private String normDepartmentCompareName;
|
||||
|
||||
/**
|
||||
* 编制床位数
|
||||
*/
|
||||
@ApiModelProperty(value = "编制床位数")
|
||||
@Excel(name = "编制床位数")
|
||||
private Integer prepareBedsCount;
|
||||
|
||||
/**
|
||||
* 科室电话
|
||||
*/
|
||||
@ApiModelProperty(value = "科室电话")
|
||||
@Excel(name = "科室电话")
|
||||
private String departmentPhone;
|
||||
|
||||
/**
|
||||
* 科室邮箱
|
||||
*/
|
||||
@ApiModelProperty(value = "科室邮箱")
|
||||
@Excel(name = "科室邮箱")
|
||||
private String departmentMail;
|
||||
|
||||
/**
|
||||
* 成立日期
|
||||
*/
|
||||
@ApiModelProperty(value = "成立日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "成立日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date establishDate;
|
||||
|
||||
/**
|
||||
* 撤销日期
|
||||
*/
|
||||
@ApiModelProperty(value = "撤销日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "撤销日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date revokeDate;
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("parentDepartmentId", getParentDepartmentId())
|
||||
.append("agencyId", getAgencyId())
|
||||
.append("agencyName", getAgencyName())
|
||||
.append("departmentName", getDepartmentName())
|
||||
.append("departmentCode", getDepartmentCode())
|
||||
.append("departmentType", getDepartmentType())
|
||||
.append("departmentAbbreviation", getDepartmentAbbreviation())
|
||||
.append("departmentPersonId", getDepartmentPersonId())
|
||||
.append("departmentPersonName", getDepartmentPersonName())
|
||||
.append("nodeType", getNodeType())
|
||||
.append("provideServiceCategory", getProvideServiceCategory())
|
||||
.append("subdivisionCategoryId", getSubdivisionCategoryId())
|
||||
.append("subdivisionCategoryName", getSubdivisionCategoryName())
|
||||
.append("normDepartmentCompareId", getNormDepartmentCompareId())
|
||||
.append("normDepartmentCompareName", getNormDepartmentCompareName())
|
||||
.append("prepareBedsCount", getPrepareBedsCount())
|
||||
.append("departmentPhone", getDepartmentPhone())
|
||||
.append("departmentMail", getDepartmentMail())
|
||||
.append("establishDate", getEstablishDate())
|
||||
.append("revokeDate", getRevokeDate())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.xinelu.manage.mapper.department;
|
||||
|
||||
import com.xinelu.manage.domain.department.Department;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 科室信息Mapper接口
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2024-02-26
|
||||
*/
|
||||
public interface DepartmentMapper {
|
||||
/**
|
||||
* 查询科室信息
|
||||
*
|
||||
* @param id 科室信息主键
|
||||
* @return 科室信息
|
||||
*/
|
||||
Department selectDepartmentById(Long id);
|
||||
|
||||
/**
|
||||
* 查询科室信息列表
|
||||
*
|
||||
* @param department 科室信息
|
||||
* @return 科室信息集合
|
||||
*/
|
||||
List<Department> selectDepartmentList(Department department);
|
||||
|
||||
/**
|
||||
* 新增科室信息
|
||||
*
|
||||
* @param department 科室信息
|
||||
* @return 结果
|
||||
*/
|
||||
int insertDepartment(Department department);
|
||||
|
||||
/**
|
||||
* 修改科室信息
|
||||
*
|
||||
* @param department 科室信息
|
||||
* @return 结果
|
||||
*/
|
||||
int updateDepartment(Department department);
|
||||
|
||||
/**
|
||||
* 删除科室信息
|
||||
*
|
||||
* @param id 科室信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteDepartmentById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除科室信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteDepartmentByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.xinelu.manage.service.department;
|
||||
|
||||
import com.xinelu.manage.domain.department.Department;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 科室信息Service接口
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2024-02-26
|
||||
*/
|
||||
public interface IDepartmentService {
|
||||
/**
|
||||
* 查询科室信息
|
||||
*
|
||||
* @param id 科室信息主键
|
||||
* @return 科室信息
|
||||
*/
|
||||
Department selectDepartmentById(Long id);
|
||||
|
||||
/**
|
||||
* 查询科室信息列表
|
||||
*
|
||||
* @param department 科室信息
|
||||
* @return 科室信息集合
|
||||
*/
|
||||
List<Department> selectDepartmentList(Department department);
|
||||
|
||||
/**
|
||||
* 新增科室信息
|
||||
*
|
||||
* @param department 科室信息
|
||||
* @return 结果
|
||||
*/
|
||||
int insertDepartment(Department department);
|
||||
|
||||
/**
|
||||
* 修改科室信息
|
||||
*
|
||||
* @param department 科室信息
|
||||
* @return 结果
|
||||
*/
|
||||
int updateDepartment(Department department);
|
||||
|
||||
/**
|
||||
* 批量删除科室信息
|
||||
*
|
||||
* @param ids 需要删除的科室信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteDepartmentByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除科室信息信息
|
||||
*
|
||||
* @param id 科室信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteDepartmentById(Long id);
|
||||
}
|
||||
@ -0,0 +1,91 @@
|
||||
package com.xinelu.manage.service.department.impl;
|
||||
|
||||
import com.xinelu.common.utils.DateUtils;
|
||||
import com.xinelu.manage.domain.department.Department;
|
||||
import com.xinelu.manage.mapper.department.DepartmentMapper;
|
||||
import com.xinelu.manage.service.department.IDepartmentService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 科室信息Service业务层处理
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2024-02-26
|
||||
*/
|
||||
@Service
|
||||
public class DepartmentServiceImpl implements IDepartmentService {
|
||||
@Resource
|
||||
private DepartmentMapper departmentMapper;
|
||||
|
||||
/**
|
||||
* 查询科室信息
|
||||
*
|
||||
* @param id 科室信息主键
|
||||
* @return 科室信息
|
||||
*/
|
||||
@Override
|
||||
public Department selectDepartmentById(Long id) {
|
||||
return departmentMapper.selectDepartmentById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询科室信息列表
|
||||
*
|
||||
* @param department 科室信息
|
||||
* @return 科室信息
|
||||
*/
|
||||
@Override
|
||||
public List<Department> selectDepartmentList(Department department) {
|
||||
return departmentMapper.selectDepartmentList(department);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增科室信息
|
||||
*
|
||||
* @param department 科室信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDepartment(Department department) {
|
||||
department.setCreateTime(DateUtils.getNowDate());
|
||||
return departmentMapper.insertDepartment(department);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改科室信息
|
||||
*
|
||||
* @param department 科室信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDepartment(Department department) {
|
||||
department.setUpdateTime(DateUtils.getNowDate());
|
||||
return departmentMapper.updateDepartment(department);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除科室信息
|
||||
*
|
||||
* @param ids 需要删除的科室信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDepartmentByIds(Long[] ids) {
|
||||
return departmentMapper.deleteDepartmentByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除科室信息信息
|
||||
*
|
||||
* @param id 科室信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDepartmentById(Long id) {
|
||||
return departmentMapper.deleteDepartmentById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,332 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xinelu.manage.mapper.department.DepartmentMapper">
|
||||
|
||||
<resultMap type="Department" id="DepartmentResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="parentDepartmentId" column="parent_department_id"/>
|
||||
<result property="agencyId" column="agency_id"/>
|
||||
<result property="agencyName" column="agency_name"/>
|
||||
<result property="departmentName" column="department_name"/>
|
||||
<result property="departmentCode" column="department_code"/>
|
||||
<result property="departmentType" column="department_type"/>
|
||||
<result property="departmentAbbreviation" column="department_abbreviation"/>
|
||||
<result property="departmentPersonId" column="department_person_id"/>
|
||||
<result property="departmentPersonName" column="department_person_name"/>
|
||||
<result property="nodeType" column="node_type"/>
|
||||
<result property="provideServiceCategory" column="provide_service_category"/>
|
||||
<result property="subdivisionCategoryId" column="subdivision_category_id"/>
|
||||
<result property="subdivisionCategoryName" column="subdivision_category_name"/>
|
||||
<result property="normDepartmentCompareId" column="norm_department_compare_id"/>
|
||||
<result property="normDepartmentCompareName" column="norm_department_compare_name"/>
|
||||
<result property="prepareBedsCount" column="prepare_beds_count"/>
|
||||
<result property="departmentPhone" column="department_phone"/>
|
||||
<result property="departmentMail" column="department_mail"/>
|
||||
<result property="establishDate" column="establish_date"/>
|
||||
<result property="revokeDate" column="revoke_date"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDepartmentVo">
|
||||
select id,
|
||||
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
|
||||
from department
|
||||
</sql>
|
||||
|
||||
<select id="selectDepartmentList" parameterType="Department" resultMap="DepartmentResult">
|
||||
<include refid="selectDepartmentVo"/>
|
||||
<where>
|
||||
<if test="parentDepartmentId != null ">
|
||||
and parent_department_id = #{parentDepartmentId}
|
||||
</if>
|
||||
<if test="agencyId != null ">
|
||||
and agency_id = #{agencyId}
|
||||
</if>
|
||||
<if test="agencyName != null and agencyName != ''">
|
||||
and agency_name like concat('%', #{agencyName}, '%')
|
||||
</if>
|
||||
<if test="departmentName != null and departmentName != ''">
|
||||
and department_name like concat('%', #{departmentName}, '%')
|
||||
</if>
|
||||
<if test="departmentCode != null and departmentCode != ''">
|
||||
and department_code = #{departmentCode}
|
||||
</if>
|
||||
<if test="departmentType != null and departmentType != ''">
|
||||
and department_type = #{departmentType}
|
||||
</if>
|
||||
<if test="departmentAbbreviation != null and departmentAbbreviation != ''">
|
||||
and department_abbreviation = #{departmentAbbreviation}
|
||||
</if>
|
||||
<if test="departmentPersonId != null ">
|
||||
and department_person_id = #{departmentPersonId}
|
||||
</if>
|
||||
<if test="departmentPersonName != null and departmentPersonName != ''">
|
||||
and department_person_name like concat('%', #{departmentPersonName}, '%')
|
||||
</if>
|
||||
<if test="nodeType != null and nodeType != ''">
|
||||
and node_type = #{nodeType}
|
||||
</if>
|
||||
<if test="provideServiceCategory != null and provideServiceCategory != ''">
|
||||
and provide_service_category = #{provideServiceCategory}
|
||||
</if>
|
||||
<if test="subdivisionCategoryId != null ">
|
||||
and subdivision_category_id = #{subdivisionCategoryId}
|
||||
</if>
|
||||
<if test="subdivisionCategoryName != null and subdivisionCategoryName != ''">
|
||||
and subdivision_category_name like concat('%', #{subdivisionCategoryName}, '%')
|
||||
</if>
|
||||
<if test="normDepartmentCompareId != null ">
|
||||
and norm_department_compare_id = #{normDepartmentCompareId}
|
||||
</if>
|
||||
<if test="normDepartmentCompareName != null and normDepartmentCompareName != ''">
|
||||
and norm_department_compare_name like concat('%', #{normDepartmentCompareName}, '%')
|
||||
</if>
|
||||
<if test="prepareBedsCount != null ">
|
||||
and prepare_beds_count = #{prepareBedsCount}
|
||||
</if>
|
||||
<if test="departmentPhone != null and departmentPhone != ''">
|
||||
and department_phone = #{departmentPhone}
|
||||
</if>
|
||||
<if test="departmentMail != null and departmentMail != ''">
|
||||
and department_mail = #{departmentMail}
|
||||
</if>
|
||||
<if test="establishDate != null ">
|
||||
and establish_date = #{establishDate}
|
||||
</if>
|
||||
<if test="revokeDate != null ">
|
||||
and revoke_date = #{revokeDate}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDepartmentById" parameterType="Long"
|
||||
resultMap="DepartmentResult">
|
||||
<include refid="selectDepartmentVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDepartment" parameterType="Department" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into department
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="parentDepartmentId != null">parent_department_id,
|
||||
</if>
|
||||
<if test="agencyId != null">agency_id,
|
||||
</if>
|
||||
<if test="agencyName != null">agency_name,
|
||||
</if>
|
||||
<if test="departmentName != null">department_name,
|
||||
</if>
|
||||
<if test="departmentCode != null">department_code,
|
||||
</if>
|
||||
<if test="departmentType != null">department_type,
|
||||
</if>
|
||||
<if test="departmentAbbreviation != null">department_abbreviation,
|
||||
</if>
|
||||
<if test="departmentPersonId != null">department_person_id,
|
||||
</if>
|
||||
<if test="departmentPersonName != null">department_person_name,
|
||||
</if>
|
||||
<if test="nodeType != null">node_type,
|
||||
</if>
|
||||
<if test="provideServiceCategory != null">provide_service_category,
|
||||
</if>
|
||||
<if test="subdivisionCategoryId != null">subdivision_category_id,
|
||||
</if>
|
||||
<if test="subdivisionCategoryName != null">subdivision_category_name,
|
||||
</if>
|
||||
<if test="normDepartmentCompareId != null">norm_department_compare_id,
|
||||
</if>
|
||||
<if test="normDepartmentCompareName != null">norm_department_compare_name,
|
||||
</if>
|
||||
<if test="prepareBedsCount != null">prepare_beds_count,
|
||||
</if>
|
||||
<if test="departmentPhone != null">department_phone,
|
||||
</if>
|
||||
<if test="departmentMail != null">department_mail,
|
||||
</if>
|
||||
<if test="establishDate != null">establish_date,
|
||||
</if>
|
||||
<if test="revokeDate != null">revoke_date,
|
||||
</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
<if test="updateBy != null">update_by,
|
||||
</if>
|
||||
<if test="updateTime != null">update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="parentDepartmentId != null">#{parentDepartmentId},
|
||||
</if>
|
||||
<if test="agencyId != null">#{agencyId},
|
||||
</if>
|
||||
<if test="agencyName != null">#{agencyName},
|
||||
</if>
|
||||
<if test="departmentName != null">#{departmentName},
|
||||
</if>
|
||||
<if test="departmentCode != null">#{departmentCode},
|
||||
</if>
|
||||
<if test="departmentType != null">#{departmentType},
|
||||
</if>
|
||||
<if test="departmentAbbreviation != null">#{departmentAbbreviation},
|
||||
</if>
|
||||
<if test="departmentPersonId != null">#{departmentPersonId},
|
||||
</if>
|
||||
<if test="departmentPersonName != null">#{departmentPersonName},
|
||||
</if>
|
||||
<if test="nodeType != null">#{nodeType},
|
||||
</if>
|
||||
<if test="provideServiceCategory != null">#{provideServiceCategory},
|
||||
</if>
|
||||
<if test="subdivisionCategoryId != null">#{subdivisionCategoryId},
|
||||
</if>
|
||||
<if test="subdivisionCategoryName != null">#{subdivisionCategoryName},
|
||||
</if>
|
||||
<if test="normDepartmentCompareId != null">#{normDepartmentCompareId},
|
||||
</if>
|
||||
<if test="normDepartmentCompareName != null">#{normDepartmentCompareName},
|
||||
</if>
|
||||
<if test="prepareBedsCount != null">#{prepareBedsCount},
|
||||
</if>
|
||||
<if test="departmentPhone != null">#{departmentPhone},
|
||||
</if>
|
||||
<if test="departmentMail != null">#{departmentMail},
|
||||
</if>
|
||||
<if test="establishDate != null">#{establishDate},
|
||||
</if>
|
||||
<if test="revokeDate != null">#{revokeDate},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="updateBy != null">#{updateBy},
|
||||
</if>
|
||||
<if test="updateTime != null">#{updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDepartment" parameterType="Department">
|
||||
update department
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="parentDepartmentId != null">parent_department_id =
|
||||
#{parentDepartmentId},
|
||||
</if>
|
||||
<if test="agencyId != null">agency_id =
|
||||
#{agencyId},
|
||||
</if>
|
||||
<if test="agencyName != null">agency_name =
|
||||
#{agencyName},
|
||||
</if>
|
||||
<if test="departmentName != null">department_name =
|
||||
#{departmentName},
|
||||
</if>
|
||||
<if test="departmentCode != null">department_code =
|
||||
#{departmentCode},
|
||||
</if>
|
||||
<if test="departmentType != null">department_type =
|
||||
#{departmentType},
|
||||
</if>
|
||||
<if test="departmentAbbreviation != null">department_abbreviation =
|
||||
#{departmentAbbreviation},
|
||||
</if>
|
||||
<if test="departmentPersonId != null">department_person_id =
|
||||
#{departmentPersonId},
|
||||
</if>
|
||||
<if test="departmentPersonName != null">department_person_name =
|
||||
#{departmentPersonName},
|
||||
</if>
|
||||
<if test="nodeType != null">node_type =
|
||||
#{nodeType},
|
||||
</if>
|
||||
<if test="provideServiceCategory != null">provide_service_category =
|
||||
#{provideServiceCategory},
|
||||
</if>
|
||||
<if test="subdivisionCategoryId != null">subdivision_category_id =
|
||||
#{subdivisionCategoryId},
|
||||
</if>
|
||||
<if test="subdivisionCategoryName != null">subdivision_category_name =
|
||||
#{subdivisionCategoryName},
|
||||
</if>
|
||||
<if test="normDepartmentCompareId != null">norm_department_compare_id =
|
||||
#{normDepartmentCompareId},
|
||||
</if>
|
||||
<if test="normDepartmentCompareName != null">norm_department_compare_name =
|
||||
#{normDepartmentCompareName},
|
||||
</if>
|
||||
<if test="prepareBedsCount != null">prepare_beds_count =
|
||||
#{prepareBedsCount},
|
||||
</if>
|
||||
<if test="departmentPhone != null">department_phone =
|
||||
#{departmentPhone},
|
||||
</if>
|
||||
<if test="departmentMail != null">department_mail =
|
||||
#{departmentMail},
|
||||
</if>
|
||||
<if test="establishDate != null">establish_date =
|
||||
#{establishDate},
|
||||
</if>
|
||||
<if test="revokeDate != null">revoke_date =
|
||||
#{revokeDate},
|
||||
</if>
|
||||
<if test="createBy != null">create_by =
|
||||
#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="updateBy != null">update_by =
|
||||
#{updateBy},
|
||||
</if>
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDepartmentById" parameterType="Long">
|
||||
delete
|
||||
from department
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDepartmentByIds" parameterType="String">
|
||||
delete from department where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user