代码校验
This commit is contained in:
parent
91fda18892
commit
73e53d1df7
@ -89,7 +89,7 @@ public class AgencyController extends BaseController {
|
|||||||
@Log(title = "机构信息", businessType = BusinessType.INSERT)
|
@Log(title = "机构信息", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody Agency agency) {
|
public AjaxResult add(@RequestBody Agency agency) {
|
||||||
return toAjax(agencyService.insertAgency(agency));
|
return agencyService.insertAgency(agency);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -108,7 +108,7 @@ public class DepartmentController extends BaseController {
|
|||||||
@Log(title = "科室信息", businessType = BusinessType.DELETE)
|
@Log(title = "科室信息", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||||
return toAjax(departmentService.deleteDepartmentByIds(ids));
|
return departmentService.deleteDepartmentByIds(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -88,4 +88,12 @@ public class DepartmentDiseaseTypeController extends BaseController {
|
|||||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||||
return toAjax(departmentDiseaseTypeService.deleteDepartmentDiseaseTypeByIds(ids));
|
return toAjax(departmentDiseaseTypeService.deleteDepartmentDiseaseTypeByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 科室病种数量
|
||||||
|
*/
|
||||||
|
@GetMapping("/selectDiseaseCount")
|
||||||
|
public AjaxResult selectDiseaseTypeCount(String departmentName) {
|
||||||
|
return departmentDiseaseTypeService.selectDiseaseTypeCount(departmentName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -70,6 +70,14 @@ public interface AgencyMapper {
|
|||||||
*/
|
*/
|
||||||
int updateAgency(Agency agency);
|
int updateAgency(Agency agency);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改机构信息
|
||||||
|
*
|
||||||
|
* @param agency 机构信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateAgencyById(Agency agency);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除机构信息
|
* 删除机构信息
|
||||||
*
|
*
|
||||||
@ -101,4 +109,7 @@ public interface AgencyMapper {
|
|||||||
* @return int
|
* @return int
|
||||||
**/
|
**/
|
||||||
int insertAgencyImportList(List<Agency> agencyList);
|
int insertAgencyImportList(List<Agency> agencyList);
|
||||||
|
|
||||||
|
|
||||||
|
int selectAgencyNameByAgencyNameInt(String agencyName);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -56,6 +56,15 @@ public interface DepartmentMapper {
|
|||||||
*/
|
*/
|
||||||
int updateDepartment(Department department);
|
int updateDepartment(Department department);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改科室信息
|
||||||
|
*
|
||||||
|
* @param department 科室信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateDepartmentById(Department department);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除科室信息
|
* 删除科室信息
|
||||||
*
|
*
|
||||||
@ -123,8 +132,17 @@ public interface DepartmentMapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询科室信息列表及包含服务包数量
|
* 查询科室信息列表及包含服务包数量
|
||||||
|
*
|
||||||
* @param departmentDto
|
* @param departmentDto
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<DepartmentVO> selectListServicePackageNum(DepartmentDTO departmentDto);
|
List<DepartmentVO> selectListServicePackageNum(DepartmentDTO departmentDto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询下级机构信息
|
||||||
|
*
|
||||||
|
* @param id 机构信息主键
|
||||||
|
* @return 机构信息
|
||||||
|
*/
|
||||||
|
List<Department> selectDepartmentByParentId(Long[] id);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package com.xinelu.manage.mapper.departmentdiseasetype;
|
package com.xinelu.manage.mapper.departmentdiseasetype;
|
||||||
|
|
||||||
import com.xinelu.manage.domain.departmentdiseasetype.DepartmentDiseaseType;
|
import com.xinelu.manage.domain.departmentdiseasetype.DepartmentDiseaseType;
|
||||||
|
import com.xinelu.manage.vo.department.DepartmentVO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -59,4 +60,12 @@ public interface DepartmentDiseaseTypeMapper {
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
int deleteDepartmentDiseaseTypeByIds(Long[] ids);
|
int deleteDepartmentDiseaseTypeByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 科室病种数量
|
||||||
|
*
|
||||||
|
* @param departmentName 科室名称
|
||||||
|
* @return DepartmentVO
|
||||||
|
*/
|
||||||
|
List<DepartmentVO> selectDiseaseTypeCount(String departmentName);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,7 +53,7 @@ public interface IAgencyService {
|
|||||||
* @param agency 机构信息
|
* @param agency 机构信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
int insertAgency(Agency agency);
|
AjaxResult insertAgency(Agency agency);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改机构信息
|
* 修改机构信息
|
||||||
|
|||||||
@ -109,10 +109,14 @@ public class AgencyServiceImpl implements IAgencyService {
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int insertAgency(Agency agency) {
|
public AjaxResult insertAgency(Agency agency) {
|
||||||
|
int i = agencyMapper.selectAgencyNameByAgencyNameInt(agency.getAgencyName());
|
||||||
|
if (i > 0) {
|
||||||
|
return AjaxResult.error("该名称" + agency.getAgencyName() + "以重复!");
|
||||||
|
}
|
||||||
agency.setCreateTime(DateUtils.getNowDate());
|
agency.setCreateTime(DateUtils.getNowDate());
|
||||||
agency.setCreateBy(SecurityUtils.getUsername());
|
agency.setCreateBy(SecurityUtils.getUsername());
|
||||||
return agencyMapper.insertAgency(agency);
|
return AjaxResult.success(agencyMapper.insertAgency(agency));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -125,7 +129,7 @@ public class AgencyServiceImpl implements IAgencyService {
|
|||||||
public int updateAgency(Agency agency) {
|
public int updateAgency(Agency agency) {
|
||||||
agency.setUpdateTime(DateUtils.getNowDate());
|
agency.setUpdateTime(DateUtils.getNowDate());
|
||||||
agency.setUpdateBy(SecurityUtils.getUsername());
|
agency.setUpdateBy(SecurityUtils.getUsername());
|
||||||
return agencyMapper.updateAgency(agency);
|
return agencyMapper.updateAgencyById(agency);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -62,7 +62,7 @@ public interface IDepartmentService {
|
|||||||
* @param ids 需要删除的科室信息主键集合
|
* @param ids 需要删除的科室信息主键集合
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
int deleteDepartmentByIds(Long[] ids);
|
AjaxResult deleteDepartmentByIds(Long[] ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除科室信息信息
|
* 删除科室信息信息
|
||||||
|
|||||||
@ -99,8 +99,9 @@ public class DepartmentServiceImpl implements IDepartmentService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int updateDepartment(Department department) {
|
public int updateDepartment(Department department) {
|
||||||
|
department.setUpdateBy(SecurityUtils.getUsername());
|
||||||
department.setUpdateTime(DateUtils.getNowDate());
|
department.setUpdateTime(DateUtils.getNowDate());
|
||||||
return departmentMapper.updateDepartment(department);
|
return departmentMapper.updateDepartmentById(department);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -110,8 +111,12 @@ public class DepartmentServiceImpl implements IDepartmentService {
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int deleteDepartmentByIds(Long[] ids) {
|
public AjaxResult deleteDepartmentByIds(Long[] ids) {
|
||||||
return departmentMapper.deleteDepartmentByIds(ids);
|
int size = departmentMapper.selectDepartmentByParentId(ids).size();
|
||||||
|
if (size > 0) {
|
||||||
|
return AjaxResult.error("该科室存在下级科室,请先删除其下级科室!");
|
||||||
|
}
|
||||||
|
return AjaxResult.success(departmentMapper.deleteDepartmentByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.xinelu.manage.service.departmentdiseasetype;
|
package com.xinelu.manage.service.departmentdiseasetype;
|
||||||
|
|
||||||
|
import com.xinelu.common.core.domain.AjaxResult;
|
||||||
import com.xinelu.manage.domain.departmentdiseasetype.DepartmentDiseaseType;
|
import com.xinelu.manage.domain.departmentdiseasetype.DepartmentDiseaseType;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -59,4 +60,12 @@ public interface IDepartmentDiseaseTypeService {
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
int deleteDepartmentDiseaseTypeById(Long id);
|
int deleteDepartmentDiseaseTypeById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 科室病种信息信息
|
||||||
|
*
|
||||||
|
* @param departmentName 科室信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
AjaxResult selectDiseaseTypeCount(String departmentName);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,12 +1,16 @@
|
|||||||
package com.xinelu.manage.service.departmentdiseasetype.impl;
|
package com.xinelu.manage.service.departmentdiseasetype.impl;
|
||||||
|
|
||||||
|
import com.xinelu.common.core.domain.AjaxResult;
|
||||||
import com.xinelu.common.utils.DateUtils;
|
import com.xinelu.common.utils.DateUtils;
|
||||||
import com.xinelu.manage.domain.departmentdiseasetype.DepartmentDiseaseType;
|
import com.xinelu.manage.domain.departmentdiseasetype.DepartmentDiseaseType;
|
||||||
import com.xinelu.manage.mapper.departmentdiseasetype.DepartmentDiseaseTypeMapper;
|
import com.xinelu.manage.mapper.departmentdiseasetype.DepartmentDiseaseTypeMapper;
|
||||||
import com.xinelu.manage.service.departmentdiseasetype.IDepartmentDiseaseTypeService;
|
import com.xinelu.manage.service.departmentdiseasetype.IDepartmentDiseaseTypeService;
|
||||||
|
import com.xinelu.manage.vo.department.DepartmentVO;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
@ -88,4 +92,26 @@ public class DepartmentDiseaseTypeServiceImpl implements IDepartmentDiseaseTypeS
|
|||||||
public int deleteDepartmentDiseaseTypeById(Long id) {
|
public int deleteDepartmentDiseaseTypeById(Long id) {
|
||||||
return departmentDiseaseTypeMapper.deleteDepartmentDiseaseTypeById(id);
|
return departmentDiseaseTypeMapper.deleteDepartmentDiseaseTypeById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 科室病种数量
|
||||||
|
*
|
||||||
|
* @param departmentName 科室名称
|
||||||
|
* @return DepartmentVO
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AjaxResult selectDiseaseTypeCount(String departmentName) {
|
||||||
|
DepartmentVO departmentVO = new DepartmentVO();
|
||||||
|
List<DepartmentVO> department = new ArrayList<>();
|
||||||
|
departmentVO.setDepartmentName("全部");
|
||||||
|
departmentVO.setCountNum(0);
|
||||||
|
List<DepartmentVO> departmentVOS = departmentDiseaseTypeMapper.selectDiseaseTypeCount(departmentName);
|
||||||
|
if (CollectionUtils.isNotEmpty(departmentVOS)) {
|
||||||
|
Integer result = departmentVOS.stream().mapToInt(DepartmentVO::getCountNum).sum();
|
||||||
|
departmentVO.setCountNum(result);
|
||||||
|
department.add(departmentVO);
|
||||||
|
department.addAll(departmentVOS);
|
||||||
|
}
|
||||||
|
return AjaxResult.success(department);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -317,6 +317,36 @@
|
|||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<update id="updateAgencyById" parameterType="Agency">
|
||||||
|
update agency
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
parent_id = #{parentId},
|
||||||
|
agency_category_id = #{agencyCategoryId},
|
||||||
|
agency_category_name = #{agencyCategoryName},
|
||||||
|
area_code = #{areaCode},
|
||||||
|
area_name = #{areaName},
|
||||||
|
<if test="agencyName != null">agency_name = #{agencyName},</if>
|
||||||
|
agency_code = #{agencyCode},
|
||||||
|
agency_abbreviation = #{agencyAbbreviation},
|
||||||
|
agency_status = #{agencyStatus},
|
||||||
|
node_type = #{nodeType},
|
||||||
|
org_agency_code = #{orgAgencyCode},
|
||||||
|
agency_category_manage_level = #{agencyCategoryManageLevel},
|
||||||
|
agency_contacts = #{agencyContacts},
|
||||||
|
agency_phone = #{agencyPhone},
|
||||||
|
agency_address = #{agencyAddress},
|
||||||
|
agency_remark = #{agencyRemark},
|
||||||
|
agency_sort = #{agencySort},
|
||||||
|
<if test="updateBy != null">update_by =
|
||||||
|
#{updateBy},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">update_time =
|
||||||
|
#{updateTime},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
<delete id="deleteAgencyById" parameterType="Long">
|
<delete id="deleteAgencyById" parameterType="Long">
|
||||||
delete
|
delete
|
||||||
from agency
|
from agency
|
||||||
@ -410,4 +440,10 @@
|
|||||||
)
|
)
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<select id="selectAgencyNameByAgencyNameInt" resultType="java.lang.Integer">
|
||||||
|
select count(1)
|
||||||
|
from agency
|
||||||
|
where agency_name = #{agencyName}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -541,6 +541,43 @@
|
|||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<update id="updateDepartmentById" parameterType="Department">
|
||||||
|
update department
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
parent_department_id = #{parentDepartmentId},
|
||||||
|
agency_id = #{agencyId},
|
||||||
|
agency_name = #{agencyName},
|
||||||
|
<if test="departmentName != null">department_name = #{departmentName},</if>
|
||||||
|
department_code =#{departmentCode},
|
||||||
|
department_type =#{departmentType},
|
||||||
|
department_abbreviation =#{departmentAbbreviation},
|
||||||
|
department_person_id =#{departmentPersonId},
|
||||||
|
department_person_name =#{departmentPersonName},
|
||||||
|
node_type =#{nodeType},
|
||||||
|
provide_service_category =#{provideServiceCategory},
|
||||||
|
subdivision_category_id =#{subdivisionCategoryId},
|
||||||
|
subdivision_category_name =#{subdivisionCategoryName},
|
||||||
|
norm_department_compare_id =#{normDepartmentCompareId},
|
||||||
|
norm_department_compare_name =#{normDepartmentCompareName},
|
||||||
|
prepare_beds_count =#{prepareBedsCount},
|
||||||
|
department_phone = #{departmentPhone},
|
||||||
|
department_mail = #{departmentMail},
|
||||||
|
<if test="establishDate != null">establish_date =
|
||||||
|
#{establishDate},
|
||||||
|
</if>
|
||||||
|
<if test="revokeDate != null">revoke_date =
|
||||||
|
#{revokeDate},
|
||||||
|
</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 id="deleteDepartmentById" parameterType="Long">
|
||||||
delete
|
delete
|
||||||
from department
|
from department
|
||||||
@ -553,4 +590,12 @@
|
|||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<select id="selectDepartmentByParentId" resultType="com.xinelu.manage.domain.department.Department">
|
||||||
|
<include refid="selectDepartmentVo"/>
|
||||||
|
where parent_department_id =
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -5,141 +5,155 @@
|
|||||||
<mapper namespace="com.xinelu.manage.mapper.departmentdiseasetype.DepartmentDiseaseTypeMapper">
|
<mapper namespace="com.xinelu.manage.mapper.departmentdiseasetype.DepartmentDiseaseTypeMapper">
|
||||||
|
|
||||||
<resultMap type="DepartmentDiseaseType" id="DepartmentDiseaseTypeResult">
|
<resultMap type="DepartmentDiseaseType" id="DepartmentDiseaseTypeResult">
|
||||||
<result property="id" column="id"/>
|
<result property="id" column="id"/>
|
||||||
<result property="departmentId" column="department_id"/>
|
<result property="departmentId" column="department_id"/>
|
||||||
<result property="departmentName" column="department_name"/>
|
<result property="departmentName" column="department_name"/>
|
||||||
<result property="diseaseTypeName" column="disease_type_name"/>
|
<result property="diseaseTypeName" column="disease_type_name"/>
|
||||||
<result property="diseaseTypeCode" column="disease_type_code"/>
|
<result property="diseaseTypeCode" column="disease_type_code"/>
|
||||||
<result property="diagnosisInfo" column="diagnosis_info"/>
|
<result property="diagnosisInfo" column="diagnosis_info"/>
|
||||||
<result property="diseaseTypeRemark" column="disease_type_remark"/>
|
<result property="diseaseTypeRemark" column="disease_type_remark"/>
|
||||||
<result property="createBy" column="create_by"/>
|
<result property="createBy" column="create_by"/>
|
||||||
<result property="createTime" column="create_time"/>
|
<result property="createTime" column="create_time"/>
|
||||||
<result property="updateBy" column="update_by"/>
|
<result property="updateBy" column="update_by"/>
|
||||||
<result property="updateTime" column="update_time"/>
|
<result property="updateTime" column="update_time"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectDepartmentDiseaseTypeVo">
|
<sql id="selectDepartmentDiseaseTypeVo">
|
||||||
select id, department_id, department_name, disease_type_name, disease_type_code, diagnosis_info, disease_type_remark, create_by, create_time, update_by, update_time from department_disease_type
|
select id,
|
||||||
|
department_id,
|
||||||
|
department_name,
|
||||||
|
disease_type_name,
|
||||||
|
disease_type_code,
|
||||||
|
diagnosis_info,
|
||||||
|
disease_type_remark,
|
||||||
|
create_by,
|
||||||
|
create_time,
|
||||||
|
update_by,
|
||||||
|
update_time
|
||||||
|
from department_disease_type
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectDepartmentDiseaseTypeList" parameterType="DepartmentDiseaseType" resultMap="DepartmentDiseaseTypeResult">
|
<select id="selectDepartmentDiseaseTypeList" parameterType="DepartmentDiseaseType"
|
||||||
|
resultMap="DepartmentDiseaseTypeResult">
|
||||||
<include refid="selectDepartmentDiseaseTypeVo"/>
|
<include refid="selectDepartmentDiseaseTypeVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="departmentId != null ">
|
<if test="departmentId != null ">
|
||||||
and department_id = #{departmentId}
|
and department_id = #{departmentId}
|
||||||
</if>
|
</if>
|
||||||
<if test="departmentName != null and departmentName != ''">
|
<if test="departmentName != null and departmentName != ''">
|
||||||
and department_name like concat('%', #{departmentName}, '%')
|
and department_name like concat('%', #{departmentName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="diseaseTypeName != null and diseaseTypeName != ''">
|
<if test="diseaseTypeName != null and diseaseTypeName != ''">
|
||||||
and disease_type_name like concat('%', #{diseaseTypeName}, '%')
|
and disease_type_name like concat('%', #{diseaseTypeName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="diseaseTypeCode != null and diseaseTypeCode != ''">
|
<if test="diseaseTypeCode != null and diseaseTypeCode != ''">
|
||||||
and disease_type_code = #{diseaseTypeCode}
|
and disease_type_code = #{diseaseTypeCode}
|
||||||
</if>
|
</if>
|
||||||
<if test="diagnosisInfo != null and diagnosisInfo != ''">
|
<if test="diagnosisInfo != null and diagnosisInfo != ''">
|
||||||
and diagnosis_info = #{diagnosisInfo}
|
and diagnosis_info = #{diagnosisInfo}
|
||||||
</if>
|
</if>
|
||||||
<if test="diseaseTypeRemark != null and diseaseTypeRemark != ''">
|
<if test="diseaseTypeRemark != null and diseaseTypeRemark != ''">
|
||||||
and disease_type_remark = #{diseaseTypeRemark}
|
and disease_type_remark = #{diseaseTypeRemark}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectDepartmentDiseaseTypeById" parameterType="Long"
|
<select id="selectDepartmentDiseaseTypeById" parameterType="Long"
|
||||||
resultMap="DepartmentDiseaseTypeResult">
|
resultMap="DepartmentDiseaseTypeResult">
|
||||||
<include refid="selectDepartmentDiseaseTypeVo"/>
|
<include refid="selectDepartmentDiseaseTypeVo"/>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertDepartmentDiseaseType" parameterType="DepartmentDiseaseType" useGeneratedKeys="true"
|
<insert id="insertDepartmentDiseaseType" parameterType="DepartmentDiseaseType" useGeneratedKeys="true"
|
||||||
keyProperty="id">
|
keyProperty="id">
|
||||||
insert into department_disease_type
|
insert into department_disease_type
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="departmentId != null">department_id,
|
<if test="departmentId != null">department_id,
|
||||||
</if>
|
</if>
|
||||||
<if test="departmentName != null">department_name,
|
<if test="departmentName != null">department_name,
|
||||||
</if>
|
</if>
|
||||||
<if test="diseaseTypeName != null">disease_type_name,
|
<if test="diseaseTypeName != null">disease_type_name,
|
||||||
</if>
|
</if>
|
||||||
<if test="diseaseTypeCode != null">disease_type_code,
|
<if test="diseaseTypeCode != null">disease_type_code,
|
||||||
</if>
|
</if>
|
||||||
<if test="diagnosisInfo != null">diagnosis_info,
|
<if test="diagnosisInfo != null">diagnosis_info,
|
||||||
</if>
|
</if>
|
||||||
<if test="diseaseTypeRemark != null">disease_type_remark,
|
<if test="diseaseTypeRemark != null">disease_type_remark,
|
||||||
</if>
|
</if>
|
||||||
<if test="createBy != null">create_by,
|
<if test="createBy != null">create_by,
|
||||||
</if>
|
</if>
|
||||||
<if test="createTime != null">create_time,
|
<if test="createTime != null">create_time,
|
||||||
</if>
|
</if>
|
||||||
<if test="updateBy != null">update_by,
|
<if test="updateBy != null">update_by,
|
||||||
</if>
|
</if>
|
||||||
<if test="updateTime != null">update_time,
|
<if test="updateTime != null">update_time,
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="departmentId != null">#{departmentId},
|
<if test="departmentId != null">#{departmentId},
|
||||||
</if>
|
</if>
|
||||||
<if test="departmentName != null">#{departmentName},
|
<if test="departmentName != null">#{departmentName},
|
||||||
</if>
|
</if>
|
||||||
<if test="diseaseTypeName != null">#{diseaseTypeName},
|
<if test="diseaseTypeName != null">#{diseaseTypeName},
|
||||||
</if>
|
</if>
|
||||||
<if test="diseaseTypeCode != null">#{diseaseTypeCode},
|
<if test="diseaseTypeCode != null">#{diseaseTypeCode},
|
||||||
</if>
|
</if>
|
||||||
<if test="diagnosisInfo != null">#{diagnosisInfo},
|
<if test="diagnosisInfo != null">#{diagnosisInfo},
|
||||||
</if>
|
</if>
|
||||||
<if test="diseaseTypeRemark != null">#{diseaseTypeRemark},
|
<if test="diseaseTypeRemark != null">#{diseaseTypeRemark},
|
||||||
</if>
|
</if>
|
||||||
<if test="createBy != null">#{createBy},
|
<if test="createBy != null">#{createBy},
|
||||||
</if>
|
</if>
|
||||||
<if test="createTime != null">#{createTime},
|
<if test="createTime != null">#{createTime},
|
||||||
</if>
|
</if>
|
||||||
<if test="updateBy != null">#{updateBy},
|
<if test="updateBy != null">#{updateBy},
|
||||||
</if>
|
</if>
|
||||||
<if test="updateTime != null">#{updateTime},
|
<if test="updateTime != null">#{updateTime},
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateDepartmentDiseaseType" parameterType="DepartmentDiseaseType">
|
<update id="updateDepartmentDiseaseType" parameterType="DepartmentDiseaseType">
|
||||||
update department_disease_type
|
update department_disease_type
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="departmentId != null">department_id =
|
<if test="departmentId != null">department_id =
|
||||||
#{departmentId},
|
#{departmentId},
|
||||||
</if>
|
</if>
|
||||||
<if test="departmentName != null">department_name =
|
<if test="departmentName != null">department_name =
|
||||||
#{departmentName},
|
#{departmentName},
|
||||||
</if>
|
</if>
|
||||||
<if test="diseaseTypeName != null">disease_type_name =
|
<if test="diseaseTypeName != null">disease_type_name =
|
||||||
#{diseaseTypeName},
|
#{diseaseTypeName},
|
||||||
</if>
|
</if>
|
||||||
<if test="diseaseTypeCode != null">disease_type_code =
|
<if test="diseaseTypeCode != null">disease_type_code =
|
||||||
#{diseaseTypeCode},
|
#{diseaseTypeCode},
|
||||||
</if>
|
</if>
|
||||||
<if test="diagnosisInfo != null">diagnosis_info =
|
<if test="diagnosisInfo != null">diagnosis_info =
|
||||||
#{diagnosisInfo},
|
#{diagnosisInfo},
|
||||||
</if>
|
</if>
|
||||||
<if test="diseaseTypeRemark != null">disease_type_remark =
|
<if test="diseaseTypeRemark != null">disease_type_remark =
|
||||||
#{diseaseTypeRemark},
|
#{diseaseTypeRemark},
|
||||||
</if>
|
</if>
|
||||||
<if test="createBy != null">create_by =
|
<if test="createBy != null">create_by =
|
||||||
#{createBy},
|
#{createBy},
|
||||||
</if>
|
</if>
|
||||||
<if test="createTime != null">create_time =
|
<if test="createTime != null">create_time =
|
||||||
#{createTime},
|
#{createTime},
|
||||||
</if>
|
</if>
|
||||||
<if test="updateBy != null">update_by =
|
<if test="updateBy != null">update_by =
|
||||||
#{updateBy},
|
#{updateBy},
|
||||||
</if>
|
</if>
|
||||||
<if test="updateTime != null">update_time =
|
<if test="updateTime != null">update_time =
|
||||||
#{updateTime},
|
#{updateTime},
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<delete id="deleteDepartmentDiseaseTypeById" parameterType="Long">
|
<delete id="deleteDepartmentDiseaseTypeById" parameterType="Long">
|
||||||
delete from department_disease_type where id = #{id}
|
delete
|
||||||
|
from department_disease_type
|
||||||
|
where id = #{id}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteDepartmentDiseaseTypeByIds" parameterType="String">
|
<delete id="deleteDepartmentDiseaseTypeByIds" parameterType="String">
|
||||||
@ -148,4 +162,18 @@
|
|||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<select id="selectDiseaseTypeCount" resultType="com.xinelu.manage.vo.department.DepartmentVO">
|
||||||
|
select dt.id,
|
||||||
|
dt.department_name,
|
||||||
|
dt.department_code,
|
||||||
|
count(ddt.id) AS countNum
|
||||||
|
from department dt left join department_disease_type ddt on dt.id = ddt.department_id
|
||||||
|
<where>
|
||||||
|
<if test="departmentName != null and departmentName != ''">
|
||||||
|
dt.department_name like concat('%',#{departmentName},'%')
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
GROUP BY dt.id
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue
Block a user