增加DepartmentVo,修改查询科室及其下属手术、话术、微信库数量
This commit is contained in:
parent
8f31ab72b8
commit
087d9516bf
@ -7,8 +7,9 @@ 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.dto.department.DepartmentDTO;
|
||||
import com.xinelu.manage.service.department.IDepartmentService;
|
||||
import com.xinelu.manage.vo.department.DepartmentVO;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -99,8 +100,8 @@ public class DepartmentController extends BaseController {
|
||||
* 查询科室信息列表及包含话术数量
|
||||
*/
|
||||
@GetMapping("/listScriptNum")
|
||||
public AjaxResult listScriptNum(DepartmentDto departmentDto) {
|
||||
List<DepartmentDto> list = departmentService.selectDepartmentListScriptNum(departmentDto);
|
||||
public AjaxResult listScriptNum(DepartmentDTO departmentDto) {
|
||||
List<DepartmentVO> list = departmentService.selectDepartmentListScriptNum(departmentDto);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@ -108,8 +109,8 @@ public class DepartmentController extends BaseController {
|
||||
* 查询科室信息列表及包含手术数量
|
||||
*/
|
||||
@GetMapping("/listOperationNum")
|
||||
public AjaxResult listOperationNum(DepartmentDto departmentDto) {
|
||||
List<DepartmentDto> list = departmentService.selectDepartmentListOperationNum(departmentDto);
|
||||
public AjaxResult listOperationNum(DepartmentDTO departmentDto) {
|
||||
List<DepartmentVO> list = departmentService.selectDepartmentListOperationNum(departmentDto);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@ -117,8 +118,17 @@ public class DepartmentController extends BaseController {
|
||||
* 查询科室信息列表及包含微信库数量
|
||||
*/
|
||||
@GetMapping("/listWechatTemplateNum")
|
||||
public AjaxResult listWechatTemplateNum(DepartmentDto departmentDto) {
|
||||
List<DepartmentDto> list = departmentService.selectDepartmentListWechatTemplateNum(departmentDto);
|
||||
public AjaxResult listWechatTemplateNum(DepartmentDTO departmentDto) {
|
||||
List<DepartmentVO> list = departmentService.selectDepartmentListWechatTemplateNum(departmentDto);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询科室信息列表及包含短信库数量
|
||||
*/
|
||||
@GetMapping("/listMessageNum")
|
||||
public AjaxResult listMessageNum(DepartmentDTO departmentDto) {
|
||||
List<DepartmentVO> list = departmentService.selectDepartmentListMessageNum(departmentDto);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@ 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.dto.WechatTemplateDto;
|
||||
import com.xinelu.manage.dto.wechattemplate.WechatTemplateDTO;
|
||||
import com.xinelu.manage.service.wechattemplate.IWechatTemplateService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@ -36,9 +36,9 @@ public class WechatTemplateController extends BaseController {
|
||||
@ApiOperation("查询微信模板信息列表")
|
||||
@PreAuthorize("@ss.hasPermi('manage:template:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WechatTemplateDto wechatTemplateDto) {
|
||||
public TableDataInfo list(WechatTemplateDTO wechatTemplateDto) {
|
||||
startPage();
|
||||
List<WechatTemplateDto> list = wechatTemplateService.selectWechatTemplateList(wechatTemplateDto);
|
||||
List<WechatTemplateDTO> list = wechatTemplateService.selectWechatTemplateList(wechatTemplateDto);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ -49,9 +49,9 @@ public class WechatTemplateController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('manage:template:export')")
|
||||
@Log(title = "微信模板信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WechatTemplateDto wechatTemplateDto) {
|
||||
List<WechatTemplateDto> list = wechatTemplateService.selectWechatTemplateList(wechatTemplateDto);
|
||||
ExcelUtil<WechatTemplateDto> util = new ExcelUtil<WechatTemplateDto>(WechatTemplateDto.class);
|
||||
public void export(HttpServletResponse response, WechatTemplateDTO wechatTemplateDto) {
|
||||
List<WechatTemplateDTO> list = wechatTemplateService.selectWechatTemplateList(wechatTemplateDto);
|
||||
ExcelUtil<WechatTemplateDTO> util = new ExcelUtil<WechatTemplateDTO>(WechatTemplateDTO.class);
|
||||
util.exportExcel(response, list, "微信模板信息数据");
|
||||
}
|
||||
|
||||
@ -72,7 +72,7 @@ public class WechatTemplateController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('manage:template:add')")
|
||||
@Log(title = "微信模板信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@RequestBody WechatTemplateDto wechatTemplateDto) {
|
||||
public AjaxResult add(@RequestBody WechatTemplateDTO wechatTemplateDto) {
|
||||
return toAjax(wechatTemplateService.insertWechatTemplate(wechatTemplateDto));
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@ public class WechatTemplateController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('manage:template:edit')")
|
||||
@Log(title = "微信模板信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping(value = "/edit")
|
||||
public AjaxResult edit(@RequestBody WechatTemplateDto wechatTemplateDto) {
|
||||
public AjaxResult edit(@RequestBody WechatTemplateDTO wechatTemplateDto) {
|
||||
return toAjax(wechatTemplateService.updateWechatTemplate(wechatTemplateDto));
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,55 @@
|
||||
package com.xinelu.manage.dto.department;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* @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;
|
||||
|
||||
@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,4 +1,4 @@
|
||||
package com.xinelu.manage.dto;
|
||||
package com.xinelu.manage.dto.wechattemplate;
|
||||
|
||||
import com.xinelu.common.annotation.Excel;
|
||||
import com.xinelu.common.core.domain.BaseEntity;
|
||||
@ -25,7 +25,7 @@ import javax.validation.constraints.NotBlank;
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "微信模板信息对象Dto")
|
||||
public class WechatTemplateDto extends BaseEntity {
|
||||
public class WechatTemplateDTO extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
@ -1,7 +1,8 @@
|
||||
package com.xinelu.manage.mapper.department;
|
||||
|
||||
import com.xinelu.manage.domain.department.Department;
|
||||
import com.xinelu.manage.dto.DepartmentDto;
|
||||
import com.xinelu.manage.dto.department.DepartmentDTO;
|
||||
import com.xinelu.manage.vo.department.DepartmentVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -67,7 +68,7 @@ public interface DepartmentMapper {
|
||||
* @param departmentDto
|
||||
* @return
|
||||
*/
|
||||
List<DepartmentDto> selectDepartmentListScriptNum(DepartmentDto departmentDto);
|
||||
List<DepartmentVO> selectDepartmentListScriptNum(DepartmentDTO departmentDto);
|
||||
|
||||
/**
|
||||
* 查询科室信息列表及包含手术数量
|
||||
@ -75,7 +76,7 @@ public interface DepartmentMapper {
|
||||
* @param departmentDto
|
||||
* @return
|
||||
*/
|
||||
List<DepartmentDto> selectDepartmentListOperationNum(DepartmentDto departmentDto);
|
||||
List<DepartmentVO> selectDepartmentListOperationNum(DepartmentDTO departmentDto);
|
||||
|
||||
/**
|
||||
* 查询科室信息列表及包含微信库数量
|
||||
@ -83,6 +84,13 @@ public interface DepartmentMapper {
|
||||
* @param departmentDto
|
||||
* @return
|
||||
*/
|
||||
List<DepartmentDto> selectDepartmentListWechatTemplateNum(DepartmentDto departmentDto);
|
||||
List<DepartmentVO> selectDepartmentListWechatTemplateNum(DepartmentDTO departmentDto);
|
||||
|
||||
/**
|
||||
* 查询科室信息列表及包含短信库数量
|
||||
*
|
||||
* @param departmentDto
|
||||
* @return
|
||||
*/
|
||||
List<DepartmentVO> selectDepartmentListMessageNum(DepartmentDTO departmentDto);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@ package com.xinelu.manage.mapper.wechattemplate;
|
||||
|
||||
import com.xinelu.manage.domain.wechattemplate.WechatTemplate;
|
||||
import com.xinelu.manage.domain.wechattemplatesuittask.WechatTemplateSuitTask;
|
||||
import com.xinelu.manage.dto.WechatTemplateDto;
|
||||
import com.xinelu.manage.dto.wechattemplate.WechatTemplateDTO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
@ -68,7 +68,7 @@ public interface WechatTemplateMapper {
|
||||
* @param wechatTemplateDto
|
||||
* @return
|
||||
*/
|
||||
List<WechatTemplateDto> selectWechatTemplateDtoList(WechatTemplateDto wechatTemplateDto);
|
||||
List<WechatTemplateDTO> selectWechatTemplateDtoList(WechatTemplateDTO wechatTemplateDto);
|
||||
|
||||
/**
|
||||
* 根据id查询微信模板Dto
|
||||
@ -76,7 +76,7 @@ public interface WechatTemplateMapper {
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
WechatTemplateDto selectWechatTemplateDtoById(@Param("id") Long id);
|
||||
WechatTemplateDTO selectWechatTemplateDtoById(@Param("id") Long id);
|
||||
|
||||
/**
|
||||
* 判断是否存在微信模板信息
|
||||
@ -84,7 +84,7 @@ public interface WechatTemplateMapper {
|
||||
* @param wechatTemplateDto
|
||||
* @return
|
||||
*/
|
||||
int countByWechatTemplateDto(WechatTemplateDto wechatTemplateDto);
|
||||
int countByWechatTemplateDto(WechatTemplateDTO wechatTemplateDto);
|
||||
|
||||
/**
|
||||
* 新增微信模板适用任务类型
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
package com.xinelu.manage.service.department;
|
||||
|
||||
import com.xinelu.manage.domain.department.Department;
|
||||
import com.xinelu.manage.dto.DepartmentDto;
|
||||
import com.xinelu.manage.dto.department.DepartmentDTO;
|
||||
import com.xinelu.manage.vo.department.DepartmentVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -67,7 +68,7 @@ public interface IDepartmentService {
|
||||
* @param departmentDto
|
||||
* @return
|
||||
*/
|
||||
List<DepartmentDto> selectDepartmentListScriptNum(DepartmentDto departmentDto);
|
||||
List<DepartmentVO> selectDepartmentListScriptNum(DepartmentDTO departmentDto);
|
||||
|
||||
/**
|
||||
* 查询科室信息列表及包含手术数量
|
||||
@ -75,7 +76,7 @@ public interface IDepartmentService {
|
||||
* @param departmentDto
|
||||
* @return
|
||||
*/
|
||||
List<DepartmentDto> selectDepartmentListOperationNum(DepartmentDto departmentDto);
|
||||
List<DepartmentVO> selectDepartmentListOperationNum(DepartmentDTO departmentDto);
|
||||
|
||||
/**
|
||||
* 查询科室信息列表及包含微信库数量
|
||||
@ -83,5 +84,13 @@ public interface IDepartmentService {
|
||||
* @param departmentDto
|
||||
* @return
|
||||
*/
|
||||
List<DepartmentDto> selectDepartmentListWechatTemplateNum(DepartmentDto departmentDto);
|
||||
List<DepartmentVO> selectDepartmentListWechatTemplateNum(DepartmentDTO departmentDto);
|
||||
|
||||
/**
|
||||
* 查询科室信息列表及包含短信库数量
|
||||
*
|
||||
* @param departmentDto
|
||||
* @return
|
||||
*/
|
||||
List<DepartmentVO> selectDepartmentListMessageNum(DepartmentDTO departmentDto);
|
||||
}
|
||||
|
||||
@ -2,9 +2,10 @@ 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.dto.department.DepartmentDTO;
|
||||
import com.xinelu.manage.mapper.department.DepartmentMapper;
|
||||
import com.xinelu.manage.service.department.IDepartmentService;
|
||||
import com.xinelu.manage.vo.department.DepartmentVO;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -97,7 +98,7 @@ public class DepartmentServiceImpl implements IDepartmentService {
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<DepartmentDto> selectDepartmentListScriptNum(DepartmentDto departmentDto) {
|
||||
public List<DepartmentVO> selectDepartmentListScriptNum(DepartmentDTO departmentDto) {
|
||||
return departmentMapper.selectDepartmentListScriptNum(departmentDto);
|
||||
}
|
||||
|
||||
@ -108,7 +109,7 @@ public class DepartmentServiceImpl implements IDepartmentService {
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<DepartmentDto> selectDepartmentListOperationNum(DepartmentDto departmentDto) {
|
||||
public List<DepartmentVO> selectDepartmentListOperationNum(DepartmentDTO departmentDto) {
|
||||
return departmentMapper.selectDepartmentListOperationNum(departmentDto);
|
||||
}
|
||||
|
||||
@ -119,7 +120,19 @@ public class DepartmentServiceImpl implements IDepartmentService {
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<DepartmentDto> selectDepartmentListWechatTemplateNum(DepartmentDto departmentDto) {
|
||||
public List<DepartmentVO> selectDepartmentListWechatTemplateNum(DepartmentDTO departmentDto) {
|
||||
return departmentMapper.selectDepartmentListWechatTemplateNum(departmentDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询科室信息列表及包含短信库数量
|
||||
*
|
||||
* @param departmentDto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<DepartmentVO> selectDepartmentListMessageNum(DepartmentDTO departmentDto) {
|
||||
return departmentMapper.selectDepartmentListMessageNum(departmentDto);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package com.xinelu.manage.service.wechattemplate;
|
||||
|
||||
import com.xinelu.manage.domain.wechattemplate.WechatTemplate;
|
||||
import com.xinelu.manage.dto.WechatTemplateDto;
|
||||
import com.xinelu.manage.dto.wechattemplate.WechatTemplateDTO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -26,7 +26,7 @@ public interface IWechatTemplateService {
|
||||
* @param wechatTemplateDto 微信模板信息
|
||||
* @return 微信模板信息集合
|
||||
*/
|
||||
public List<WechatTemplateDto> selectWechatTemplateList(WechatTemplateDto wechatTemplateDto);
|
||||
public List<WechatTemplateDTO> selectWechatTemplateList(WechatTemplateDTO wechatTemplateDto);
|
||||
|
||||
/**
|
||||
* 新增微信模板信息
|
||||
@ -34,7 +34,7 @@ public interface IWechatTemplateService {
|
||||
* @param wechatTemplateDto 微信模板信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWechatTemplate(WechatTemplateDto wechatTemplateDto);
|
||||
public int insertWechatTemplate(WechatTemplateDTO wechatTemplateDto);
|
||||
|
||||
/**
|
||||
* 修改微信模板信息
|
||||
@ -42,7 +42,7 @@ public interface IWechatTemplateService {
|
||||
* @param wechatTemplateDto 微信模板信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWechatTemplate(WechatTemplateDto wechatTemplateDto);
|
||||
public int updateWechatTemplate(WechatTemplateDTO wechatTemplateDto);
|
||||
|
||||
/**
|
||||
* 批量删除微信模板信息
|
||||
@ -66,5 +66,5 @@ public interface IWechatTemplateService {
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
WechatTemplateDto selectWechatTemplateDtoById(Long id);
|
||||
WechatTemplateDTO selectWechatTemplateDtoById(Long id);
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@ import com.xinelu.common.utils.SecurityUtils;
|
||||
import com.xinelu.common.utils.bean.BeanUtils;
|
||||
import com.xinelu.manage.domain.wechattemplate.WechatTemplate;
|
||||
import com.xinelu.manage.domain.wechattemplatesuittask.WechatTemplateSuitTask;
|
||||
import com.xinelu.manage.dto.WechatTemplateDto;
|
||||
import com.xinelu.manage.dto.wechattemplate.WechatTemplateDTO;
|
||||
import com.xinelu.manage.mapper.wechattemplate.WechatTemplateMapper;
|
||||
import com.xinelu.manage.service.wechattemplate.IWechatTemplateService;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -44,7 +44,7 @@ public class WechatTemplateServiceImpl implements IWechatTemplateService {
|
||||
* @return 微信模板信息
|
||||
*/
|
||||
@Override
|
||||
public List<WechatTemplateDto> selectWechatTemplateList(WechatTemplateDto wechatTemplateDto) {
|
||||
public List<WechatTemplateDTO> selectWechatTemplateList(WechatTemplateDTO wechatTemplateDto) {
|
||||
return wechatTemplateMapper.selectWechatTemplateDtoList(wechatTemplateDto);
|
||||
|
||||
}
|
||||
@ -56,7 +56,7 @@ public class WechatTemplateServiceImpl implements IWechatTemplateService {
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWechatTemplate(WechatTemplateDto wechatTemplateDto) {
|
||||
public int insertWechatTemplate(WechatTemplateDTO wechatTemplateDto) {
|
||||
// 检查微信模板名称是否已存在
|
||||
if (wechatTemplateMapper.countByWechatTemplateDto(wechatTemplateDto) > 0) {
|
||||
throw new ServiceException("微信模板名称已存在");
|
||||
@ -100,7 +100,7 @@ public class WechatTemplateServiceImpl implements IWechatTemplateService {
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWechatTemplate(WechatTemplateDto wechatTemplateDto) {
|
||||
public int updateWechatTemplate(WechatTemplateDTO wechatTemplateDto) {
|
||||
// 检查微信模板名称是否已存在
|
||||
if (wechatTemplateMapper.countByWechatTemplateDto(wechatTemplateDto) > 0) {
|
||||
throw new ServiceException("微信模板名称已存在");
|
||||
@ -175,7 +175,7 @@ public class WechatTemplateServiceImpl implements IWechatTemplateService {
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public WechatTemplateDto selectWechatTemplateDtoById(Long id) {
|
||||
public WechatTemplateDTO selectWechatTemplateDtoById(Long id) {
|
||||
return wechatTemplateMapper.selectWechatTemplateDtoById(id);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,11 +1,8 @@
|
||||
package com.xinelu.manage.dto;
|
||||
package com.xinelu.manage.vo.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 io.swagger.models.auth.In;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@ -13,19 +10,16 @@ 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
|
||||
* @date : 2024/2/28 15:07
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "科室信息Dto对象")
|
||||
public class DepartmentDto extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ApiModel(value = "科室信息VO对象")
|
||||
public class DepartmentVO extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
@ -46,7 +40,7 @@ public class DepartmentDto extends BaseEntity {
|
||||
private String departmentCode;
|
||||
|
||||
/**
|
||||
*所属科室下属数量:比如科室下所含话术数量
|
||||
* 所属科室下属数量:比如科室下所含话术数量
|
||||
*/
|
||||
@ApiModelProperty(value = "科室代码")
|
||||
private Integer countNum;
|
||||
@ -163,7 +163,7 @@
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectDepartmentListScriptNum" resultType="com.xinelu.manage.dto.DepartmentDto">
|
||||
<select id="selectDepartmentListScriptNum" resultType="com.xinelu.manage.vo.department.DepartmentVO">
|
||||
select d.id,
|
||||
d.department_name,
|
||||
d.department_code,
|
||||
@ -171,10 +171,14 @@
|
||||
from department d left join script_info si on d.id = si.department_id
|
||||
<where>
|
||||
<if test="departmentCode != null and departmentCode != ''">
|
||||
and d.department_code = #{departmentCode}
|
||||
and d.department_code =
|
||||
#{departmentCode}
|
||||
</if>
|
||||
<if test="departmentName != null and departmentName != ''">
|
||||
and d.department_name like concat('%',#{departmentName},'%')
|
||||
and d.department_name like concat('%',
|
||||
#{departmentName},
|
||||
'%'
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY d.id,
|
||||
@ -182,7 +186,7 @@
|
||||
d.department_code
|
||||
</select>
|
||||
|
||||
<select id="selectDepartmentListOperationNum" resultType="com.xinelu.manage.dto.DepartmentDto">
|
||||
<select id="selectDepartmentListOperationNum" resultType="com.xinelu.manage.vo.department.DepartmentVO">
|
||||
select d.id,
|
||||
d.department_name,
|
||||
d.department_code,
|
||||
@ -190,10 +194,14 @@
|
||||
from department d left join operation_info oi on d.id = oi.department_id
|
||||
<where>
|
||||
<if test="departmentCode != null and departmentCode != ''">
|
||||
and d.department_code = #{departmentCode}
|
||||
and d.department_code =
|
||||
#{departmentCode}
|
||||
</if>
|
||||
<if test="departmentName != null and departmentName != ''">
|
||||
and d.department_name like concat('%',#{departmentName},'%')
|
||||
and d.department_name like concat('%',
|
||||
#{departmentName},
|
||||
'%'
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY d.id,
|
||||
@ -201,12 +209,34 @@
|
||||
d.department_code
|
||||
</select>
|
||||
<select id="selectDepartmentListWechatTemplateNum"
|
||||
resultType="com.xinelu.manage.dto.DepartmentDto">
|
||||
resultType="com.xinelu.manage.vo.department.DepartmentVO">
|
||||
select d.id,
|
||||
d.department_name,
|
||||
d.department_code,
|
||||
count(wt.id) AS countNum
|
||||
from department d left join wechat_template wt on d.id = wt.department_id
|
||||
<where>
|
||||
<if test="departmentCode != null and departmentCode != ''">
|
||||
and d.department_code =
|
||||
#{departmentCode}
|
||||
</if>
|
||||
<if test="departmentName != null and departmentName != ''">
|
||||
and d.department_name like concat('%',
|
||||
#{departmentName},
|
||||
'%'
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY d.id,
|
||||
d.department_name,
|
||||
d.department_code
|
||||
</select>
|
||||
<select id="selectDepartmentListMessageNum" resultType="com.xinelu.manage.vo.department.DepartmentVO">
|
||||
select d.id,
|
||||
d.department_name,
|
||||
d.department_code,
|
||||
count(tm.id) AS countNum
|
||||
from department d left join text_message tm on d.id = tm.department_id
|
||||
<where>
|
||||
<if test="departmentCode != null and departmentCode != ''">
|
||||
and d.department_code = #{departmentCode}
|
||||
|
||||
@ -91,7 +91,7 @@
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectWechatTemplateDtoList" resultType="com.xinelu.manage.dto.WechatTemplateDto">
|
||||
<select id="selectWechatTemplateDtoList" resultType="com.xinelu.manage.dto.wechattemplate.WechatTemplateDTO">
|
||||
select wt.id ,
|
||||
wt.department_id,
|
||||
wt.department_name ,
|
||||
@ -164,7 +164,7 @@
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectWechatTemplateDtoById" resultType="com.xinelu.manage.dto.WechatTemplateDto">
|
||||
<select id="selectWechatTemplateDtoById" resultType="com.xinelu.manage.dto.wechattemplate.WechatTemplateDTO">
|
||||
select wt.id,
|
||||
wt.department_id,
|
||||
wt.department_name,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user