修改查询科室及其下属数量
This commit is contained in:
parent
59c15fc438
commit
8f31ab72b8
@ -3,11 +3,11 @@ 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.domain.R;
|
||||
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.dto.DepartmentDto;
|
||||
import com.xinelu.manage.service.department.IDepartmentService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -99,8 +99,8 @@ public class DepartmentController extends BaseController {
|
||||
* 查询科室信息列表及包含话术数量
|
||||
*/
|
||||
@GetMapping("/listScriptNum")
|
||||
public AjaxResult listScriptNum(Department department) {
|
||||
List<Department> list = departmentService.selectDepartmentListScriptNum(department);
|
||||
public AjaxResult listScriptNum(DepartmentDto departmentDto) {
|
||||
List<DepartmentDto> list = departmentService.selectDepartmentListScriptNum(departmentDto);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@ -108,8 +108,8 @@ public class DepartmentController extends BaseController {
|
||||
* 查询科室信息列表及包含手术数量
|
||||
*/
|
||||
@GetMapping("/listOperationNum")
|
||||
public AjaxResult listOperationNum(Department department) {
|
||||
List<Department> list = departmentService.selectDepartmentListOperationNum(department);
|
||||
public AjaxResult listOperationNum(DepartmentDto departmentDto) {
|
||||
List<DepartmentDto> list = departmentService.selectDepartmentListOperationNum(departmentDto);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@ -117,8 +117,8 @@ public class DepartmentController extends BaseController {
|
||||
* 查询科室信息列表及包含微信库数量
|
||||
*/
|
||||
@GetMapping("/listWechatTemplateNum")
|
||||
public AjaxResult listWechatTemplateNum(Department department) {
|
||||
List<Department> list = departmentService.selectDepartmentListWechatTemplateNum(department);
|
||||
public AjaxResult listWechatTemplateNum(DepartmentDto departmentDto) {
|
||||
List<DepartmentDto> list = departmentService.selectDepartmentListWechatTemplateNum(departmentDto);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
}
|
||||
|
||||
@ -176,13 +176,6 @@ public class Department extends BaseEntity {
|
||||
@Excel(name = "撤销日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date revokeDate;
|
||||
|
||||
/**
|
||||
* 包含附属数量:比如科室下所含话术数量
|
||||
*/
|
||||
@ApiModelProperty(value = "包含附属数量")
|
||||
private Integer countNum;
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
@ -207,7 +200,6 @@ public class Department extends BaseEntity {
|
||||
.append("departmentMail", getDepartmentMail())
|
||||
.append("establishDate", getEstablishDate())
|
||||
.append("revokeDate", getRevokeDate())
|
||||
.append("countNum", getCountNum())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
|
||||
@ -0,0 +1,66 @@
|
||||
package com.xinelu.manage.dto;
|
||||
|
||||
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 io.swagger.models.auth.In;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author : youxilong
|
||||
* @date : 2024/2/28 14:44
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "科室信息Dto对象")
|
||||
public class DepartmentDto extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ApiModelProperty(value = "科室id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 科室名称
|
||||
*/
|
||||
@ApiModelProperty(value = "科室名称")
|
||||
private String departmentName;
|
||||
|
||||
/**
|
||||
* 科室代码
|
||||
*/
|
||||
@ApiModelProperty(value = "科室代码")
|
||||
private String departmentCode;
|
||||
|
||||
/**
|
||||
*所属科室下属数量:比如科室下所含话术数量
|
||||
*/
|
||||
@ApiModelProperty(value = "科室代码")
|
||||
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();
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,7 @@
|
||||
package com.xinelu.manage.mapper.department;
|
||||
|
||||
import com.xinelu.manage.domain.department.Department;
|
||||
import com.xinelu.manage.dto.DepartmentDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -62,23 +63,26 @@ public interface DepartmentMapper {
|
||||
|
||||
/**
|
||||
* 查询科室信息列表及包含话术数量
|
||||
* @param department
|
||||
*
|
||||
* @param departmentDto
|
||||
* @return
|
||||
*/
|
||||
List<Department> selectDepartmentListScriptNum(Department department);
|
||||
List<DepartmentDto> selectDepartmentListScriptNum(DepartmentDto departmentDto);
|
||||
|
||||
/**
|
||||
* 查询科室信息列表及包含手术数量
|
||||
* @param department
|
||||
*
|
||||
* @param departmentDto
|
||||
* @return
|
||||
*/
|
||||
List<Department> selectDepartmentListOperationNum(Department department);
|
||||
List<DepartmentDto> selectDepartmentListOperationNum(DepartmentDto departmentDto);
|
||||
|
||||
/**
|
||||
* 查询科室信息列表及包含微信库数量
|
||||
* @param department
|
||||
*
|
||||
* @param departmentDto
|
||||
* @return
|
||||
*/
|
||||
List<Department> selectDepartmentListWechatTemplateNum(Department department);
|
||||
List<DepartmentDto> selectDepartmentListWechatTemplateNum(DepartmentDto departmentDto);
|
||||
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.xinelu.manage.service.department;
|
||||
|
||||
import com.xinelu.manage.domain.department.Department;
|
||||
import com.xinelu.manage.dto.DepartmentDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -62,22 +63,25 @@ public interface IDepartmentService {
|
||||
|
||||
/**
|
||||
* 查询科室信息列表及包含话术数量
|
||||
* @param department
|
||||
*
|
||||
* @param departmentDto
|
||||
* @return
|
||||
*/
|
||||
List<Department> selectDepartmentListScriptNum(Department department);
|
||||
List<DepartmentDto> selectDepartmentListScriptNum(DepartmentDto departmentDto);
|
||||
|
||||
/**
|
||||
* 查询科室信息列表及包含手术数量
|
||||
* @param department
|
||||
*
|
||||
* @param departmentDto
|
||||
* @return
|
||||
*/
|
||||
List<Department> selectDepartmentListOperationNum(Department department);
|
||||
List<DepartmentDto> selectDepartmentListOperationNum(DepartmentDto departmentDto);
|
||||
|
||||
/**
|
||||
* 查询科室信息列表及包含微信库数量
|
||||
* @param department
|
||||
*
|
||||
* @param departmentDto
|
||||
* @return
|
||||
*/
|
||||
List<Department> selectDepartmentListWechatTemplateNum(Department department);
|
||||
List<DepartmentDto> selectDepartmentListWechatTemplateNum(DepartmentDto departmentDto);
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.xinelu.manage.service.department.impl;
|
||||
|
||||
import com.xinelu.common.utils.DateUtils;
|
||||
import com.xinelu.manage.domain.department.Department;
|
||||
import com.xinelu.manage.dto.DepartmentDto;
|
||||
import com.xinelu.manage.mapper.department.DepartmentMapper;
|
||||
import com.xinelu.manage.service.department.IDepartmentService;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -96,29 +97,29 @@ public class DepartmentServiceImpl implements IDepartmentService {
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Department> selectDepartmentListScriptNum(Department department) {
|
||||
return departmentMapper.selectDepartmentListScriptNum(department);
|
||||
public List<DepartmentDto> selectDepartmentListScriptNum(DepartmentDto departmentDto) {
|
||||
return departmentMapper.selectDepartmentListScriptNum(departmentDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询科室信息列表及包含手术数量
|
||||
*
|
||||
* @param department
|
||||
* @param departmentDto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Department> selectDepartmentListOperationNum(Department department) {
|
||||
return departmentMapper.selectDepartmentListOperationNum(department);
|
||||
public List<DepartmentDto> selectDepartmentListOperationNum(DepartmentDto departmentDto) {
|
||||
return departmentMapper.selectDepartmentListOperationNum(departmentDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询科室信息列表及包含微信库数量
|
||||
*
|
||||
* @param department
|
||||
* @param departmentDto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Department> selectDepartmentListWechatTemplateNum(Department department) {
|
||||
return departmentMapper.selectDepartmentListWechatTemplateNum(department);
|
||||
public List<DepartmentDto> selectDepartmentListWechatTemplateNum(DepartmentDto departmentDto) {
|
||||
return departmentMapper.selectDepartmentListWechatTemplateNum(departmentDto);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,61 @@
|
||||
package com.xinelu.manage.service.textmessage;
|
||||
|
||||
import com.xinelu.manage.domain.textmessage.TextMessage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 短信模板信息Service接口
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2024-02-28
|
||||
*/
|
||||
public interface ITextMessageService {
|
||||
/**
|
||||
* 查询短信模板信息
|
||||
*
|
||||
* @param id 短信模板信息主键
|
||||
* @return 短信模板信息
|
||||
*/
|
||||
public TextMessage selectTextMessageById(Long id);
|
||||
|
||||
/**
|
||||
* 查询短信模板信息列表
|
||||
*
|
||||
* @param textMessage 短信模板信息
|
||||
* @return 短信模板信息集合
|
||||
*/
|
||||
public List<TextMessage> selectTextMessageList(TextMessage textMessage);
|
||||
|
||||
/**
|
||||
* 新增短信模板信息
|
||||
*
|
||||
* @param textMessage 短信模板信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTextMessage(TextMessage textMessage);
|
||||
|
||||
/**
|
||||
* 修改短信模板信息
|
||||
*
|
||||
* @param textMessage 短信模板信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTextMessage(TextMessage textMessage);
|
||||
|
||||
/**
|
||||
* 批量删除短信模板信息
|
||||
*
|
||||
* @param ids 需要删除的短信模板信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTextMessageByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除短信模板信息信息
|
||||
*
|
||||
* @param id 短信模板信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTextMessageById(Long id);
|
||||
}
|
||||
@ -163,7 +163,7 @@
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectDepartmentListScriptNum" resultType="com.xinelu.manage.domain.department.Department">
|
||||
<select id="selectDepartmentListScriptNum" resultType="com.xinelu.manage.dto.DepartmentDto">
|
||||
select d.id,
|
||||
d.department_name,
|
||||
d.department_code,
|
||||
@ -182,7 +182,7 @@
|
||||
d.department_code
|
||||
</select>
|
||||
|
||||
<select id="selectDepartmentListOperationNum" resultType="com.xinelu.manage.domain.department.Department">
|
||||
<select id="selectDepartmentListOperationNum" resultType="com.xinelu.manage.dto.DepartmentDto">
|
||||
select d.id,
|
||||
d.department_name,
|
||||
d.department_code,
|
||||
@ -201,7 +201,7 @@
|
||||
d.department_code
|
||||
</select>
|
||||
<select id="selectDepartmentListWechatTemplateNum"
|
||||
resultType="com.xinelu.manage.domain.department.Department">
|
||||
resultType="com.xinelu.manage.dto.DepartmentDto">
|
||||
select d.id,
|
||||
d.department_name,
|
||||
d.department_code,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user