服务包内容配置:查询服务方式列表及其服务内容列表接口
This commit is contained in:
parent
13f99d6687
commit
92f4b9a611
@ -0,0 +1,26 @@
|
||||
package com.xinelu.common.enums;
|
||||
|
||||
/**
|
||||
* 服务方式内容服务标识
|
||||
*
|
||||
* @author : youxilong
|
||||
* @date : 2024/2/29 20:08
|
||||
*/
|
||||
public enum ServiceWayContentServiceType {
|
||||
|
||||
/**
|
||||
* 服务方式
|
||||
*/
|
||||
SERVICE_WRY,
|
||||
|
||||
/**
|
||||
* 服务内容
|
||||
*/
|
||||
SERVICE_CONTENT,
|
||||
|
||||
/**
|
||||
*服务频次
|
||||
*/
|
||||
SERVICE_FREQUENCY
|
||||
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package com.xinelu.manage.controller.servicewaycontent;
|
||||
|
||||
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.servicewaycontent.ServiceWayContent;
|
||||
import com.xinelu.manage.dto.servicewaycontent.ServiceWayContentDTO;
|
||||
import com.xinelu.manage.service.servicewaycontent.IServiceWayContentService;
|
||||
import com.xinelu.manage.vo.servicewaycontent.ServiceWayContentAndNumVO;
|
||||
import com.xinelu.manage.vo.servicewaycontent.ServiceWayContentVO;
|
||||
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-29
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/manage/servicewaycontent")
|
||||
public class ServiceWayContentController extends BaseController {
|
||||
@Resource
|
||||
private IServiceWayContentService serviceWayContentService;
|
||||
|
||||
/**
|
||||
* 查询服务方式内容列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:servicewaycontent:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ServiceWayContentDTO serviceWayContentDTO) {
|
||||
startPage();
|
||||
List<ServiceWayContentVO> list = serviceWayContentService.selectServiceWayContentList(serviceWayContentDTO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询服务方式和记录数
|
||||
*/
|
||||
@GetMapping("/listNum")
|
||||
public AjaxResult listNum(String serviceWayName) {
|
||||
List<ServiceWayContentAndNumVO> list = serviceWayContentService.selectListNum(serviceWayName);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出服务方式内容列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:servicewaycontent:export')")
|
||||
@Log(title = "服务方式内容", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ServiceWayContentDTO serviceWayContentDTO) {
|
||||
List<ServiceWayContentVO> list = serviceWayContentService.selectServiceWayContentList(serviceWayContentDTO);
|
||||
ExcelUtil<ServiceWayContentVO> util = new ExcelUtil<ServiceWayContentVO>(ServiceWayContentVO.class);
|
||||
util.exportExcel(response, list, "服务方式内容数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取服务方式内容详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:servicewaycontent:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(serviceWayContentService.selectServiceWayContentById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增服务方式内容
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:servicewaycontent:add')")
|
||||
@Log(title = "服务方式内容", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ServiceWayContent serviceWayContent) {
|
||||
return toAjax(serviceWayContentService.insertServiceWayContent(serviceWayContent));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改服务方式内容
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:servicewaycontent:edit')")
|
||||
@Log(title = "服务方式内容", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ServiceWayContent serviceWayContent) {
|
||||
return toAjax(serviceWayContentService.updateServiceWayContent(serviceWayContent));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除服务方式内容
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:servicewaycontent:remove')")
|
||||
@Log(title = "服务方式内容", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(serviceWayContentService.deleteServiceWayContentByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,140 @@
|
||||
package com.xinelu.manage.domain.servicewaycontent;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 服务方式内容对象 service_way_content
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "服务方式内容对象", description = "service_way_content")
|
||||
public class ServiceWayContent extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 服务方式名称
|
||||
*/
|
||||
@ApiModelProperty(value = "服务方式名称")
|
||||
@Excel(name = "服务方式名称")
|
||||
private String serviceWayName;
|
||||
|
||||
/**
|
||||
* 服务方式编码
|
||||
*/
|
||||
@ApiModelProperty(value = "服务方式编码")
|
||||
@Excel(name = "服务方式编码")
|
||||
private String serviceWayCode;
|
||||
|
||||
/**
|
||||
* 服务标识,服务方式:SERVICE_WRY,服务内容:SERVICE_CONTENT,服务频次:SERVICE_FREQUENCY
|
||||
*/
|
||||
@ApiModelProperty(value = "服务标识,服务方式:SERVICE_WRY,服务内容:SERVICE_CONTENT,服务频次:SERVICE_FREQUENCY")
|
||||
@Excel(name = "服务标识,服务方式:SERVICE_WRY,服务内容:SERVICE_CONTENT,服务频次:SERVICE_FREQUENCY")
|
||||
private String serviceType;
|
||||
|
||||
/**
|
||||
* 所属服务方式id
|
||||
*/
|
||||
@ApiModelProperty(value = "所属服务方式id")
|
||||
@Excel(name = "所属服务方式id")
|
||||
private Long serviceWayId;
|
||||
|
||||
/**
|
||||
* 服务内容
|
||||
*/
|
||||
@ApiModelProperty(value = "服务内容")
|
||||
@Excel(name = "服务内容")
|
||||
private String serviceContent;
|
||||
|
||||
/**
|
||||
* 所属服务内容id
|
||||
*/
|
||||
@ApiModelProperty(value = "所属服务内容id")
|
||||
@Excel(name = "所属服务内容id")
|
||||
private Long serviceContentId;
|
||||
|
||||
/**
|
||||
* 服务频次类型,数字:DIGIT,文本:TEXT
|
||||
*/
|
||||
@ApiModelProperty(value = "服务频次类型,数字:DIGIT,文本:TEXT")
|
||||
@Excel(name = "服务频次类型,数字:DIGIT,文本:TEXT")
|
||||
private String serviceFrequencyType;
|
||||
|
||||
/**
|
||||
* 服务频次文本
|
||||
*/
|
||||
@ApiModelProperty(value = "服务频次文本")
|
||||
@Excel(name = "服务频次文本")
|
||||
private String serviceFrequencyText;
|
||||
|
||||
/**
|
||||
* 服务频次数字起始值
|
||||
*/
|
||||
@ApiModelProperty(value = "服务频次数字起始值")
|
||||
@Excel(name = "服务频次数字起始值")
|
||||
private Integer serviceFrequencyStart;
|
||||
|
||||
/**
|
||||
* 服务频次数字结束值
|
||||
*/
|
||||
@ApiModelProperty(value = "服务频次数字结束值")
|
||||
@Excel(name = "服务频次数字结束值")
|
||||
private Integer serviceFrequencyEnd;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@ApiModelProperty(value = "排序")
|
||||
@Excel(name = "排序")
|
||||
private Integer serviceSort;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
@Excel(name = "备注")
|
||||
private String serviceRemark;
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("serviceWayName", getServiceWayName())
|
||||
.append("serviceWayCode", getServiceWayCode())
|
||||
.append("serviceType", getServiceType())
|
||||
.append("serviceWayId", getServiceWayId())
|
||||
.append("serviceContent", getServiceContent())
|
||||
.append("serviceContentId", getServiceContentId())
|
||||
.append("serviceFrequencyType", getServiceFrequencyType())
|
||||
.append("serviceFrequencyText", getServiceFrequencyText())
|
||||
.append("serviceFrequencyStart", getServiceFrequencyStart())
|
||||
.append("serviceFrequencyEnd", getServiceFrequencyEnd())
|
||||
.append("serviceSort", getServiceSort())
|
||||
.append("serviceRemark", getServiceRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package com.xinelu.manage.dto.servicewaycontent;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author : youxilong
|
||||
* @date : 2024/2/29 22:03
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ApiModel(value = "服务方式内容对象DTO")
|
||||
public class ServiceWayContentDTO {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 服务内容名称
|
||||
*/
|
||||
@ApiModelProperty(value = "服务内容名称")
|
||||
private String serviceContent;
|
||||
|
||||
}
|
||||
@ -0,0 +1,79 @@
|
||||
package com.xinelu.manage.mapper.servicewaycontent;
|
||||
|
||||
import com.xinelu.manage.domain.servicewaycontent.ServiceWayContent;
|
||||
import com.xinelu.manage.dto.servicewaycontent.ServiceWayContentDTO;
|
||||
import com.xinelu.manage.vo.servicewaycontent.ServiceWayContentAndNumVO;
|
||||
import com.xinelu.manage.vo.servicewaycontent.ServiceWayContentVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务方式内容Mapper接口
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public interface ServiceWayContentMapper {
|
||||
/**
|
||||
* 查询服务方式内容
|
||||
*
|
||||
* @param id 服务方式内容主键
|
||||
* @return 服务方式内容
|
||||
*/
|
||||
public ServiceWayContent selectServiceWayContentById(Long id);
|
||||
|
||||
/**
|
||||
* 查询服务方式内容列表
|
||||
*
|
||||
* @param serviceWayContent 服务方式内容
|
||||
* @return 服务方式内容集合
|
||||
*/
|
||||
public List<ServiceWayContent> selectServiceWayContentList(ServiceWayContent serviceWayContent);
|
||||
|
||||
/**
|
||||
* 新增服务方式内容
|
||||
*
|
||||
* @param serviceWayContent 服务方式内容
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertServiceWayContent(ServiceWayContent serviceWayContent);
|
||||
|
||||
/**
|
||||
* 修改服务方式内容
|
||||
*
|
||||
* @param serviceWayContent 服务方式内容
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateServiceWayContent(ServiceWayContent serviceWayContent);
|
||||
|
||||
/**
|
||||
* 删除服务方式内容
|
||||
*
|
||||
* @param id 服务方式内容主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteServiceWayContentById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除服务方式内容
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteServiceWayContentByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 查询服务方式名称
|
||||
* @param serviceWayName
|
||||
* @return
|
||||
*/
|
||||
List<ServiceWayContentAndNumVO> selectListNum(@Param("serviceWayName") String serviceWayName);
|
||||
|
||||
/**
|
||||
* 查询服务方式内容列表
|
||||
* @param serviceWayContentDTO
|
||||
* @return
|
||||
*/
|
||||
List<ServiceWayContentVO> selectServiceWayContentListV1(ServiceWayContentDTO serviceWayContentDTO);
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
package com.xinelu.manage.service.servicewaycontent;
|
||||
|
||||
import com.xinelu.manage.domain.servicewaycontent.ServiceWayContent;
|
||||
import com.xinelu.manage.dto.servicewaycontent.ServiceWayContentDTO;
|
||||
import com.xinelu.manage.vo.servicewaycontent.ServiceWayContentAndNumVO;
|
||||
import com.xinelu.manage.vo.servicewaycontent.ServiceWayContentVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务方式内容Service接口
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public interface IServiceWayContentService {
|
||||
/**
|
||||
* 查询服务方式内容
|
||||
*
|
||||
* @param id 服务方式内容主键
|
||||
* @return 服务方式内容
|
||||
*/
|
||||
public ServiceWayContent selectServiceWayContentById(Long id);
|
||||
|
||||
/**
|
||||
* 查询服务方式内容列表
|
||||
*
|
||||
* @param serviceWayContentDTO 服务方式内容
|
||||
* @return 服务方式内容集合
|
||||
*/
|
||||
public List<ServiceWayContentVO> selectServiceWayContentList(ServiceWayContentDTO serviceWayContentDTO);
|
||||
|
||||
/**
|
||||
* 新增服务方式内容
|
||||
*
|
||||
* @param serviceWayContent 服务方式内容
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertServiceWayContent(ServiceWayContent serviceWayContent);
|
||||
|
||||
/**
|
||||
* 修改服务方式内容
|
||||
*
|
||||
* @param serviceWayContent 服务方式内容
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateServiceWayContent(ServiceWayContent serviceWayContent);
|
||||
|
||||
/**
|
||||
* 批量删除服务方式内容
|
||||
*
|
||||
* @param ids 需要删除的服务方式内容主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteServiceWayContentByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除服务方式内容信息
|
||||
*
|
||||
* @param id 服务方式内容主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteServiceWayContentById(Long id);
|
||||
|
||||
/**
|
||||
* 查询服务方式和记录数
|
||||
* @param serviceWayName
|
||||
* @return
|
||||
*/
|
||||
List<ServiceWayContentAndNumVO> selectListNum(String serviceWayName);
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package com.xinelu.manage.service.servicewaycontent.impl;
|
||||
|
||||
import com.xinelu.common.enums.ServiceWayContentServiceType;
|
||||
import com.xinelu.common.utils.DateUtils;
|
||||
import com.xinelu.manage.domain.servicewaycontent.ServiceWayContent;
|
||||
import com.xinelu.manage.dto.servicewaycontent.ServiceWayContentDTO;
|
||||
import com.xinelu.manage.mapper.servicewaycontent.ServiceWayContentMapper;
|
||||
import com.xinelu.manage.service.servicewaycontent.IServiceWayContentService;
|
||||
import com.xinelu.manage.vo.servicewaycontent.ServiceWayContentAndNumVO;
|
||||
import com.xinelu.manage.vo.servicewaycontent.ServiceWayContentVO;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务方式内容Service业务层处理
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
@Service
|
||||
public class ServiceWayContentServiceImpl implements IServiceWayContentService {
|
||||
@Resource
|
||||
private ServiceWayContentMapper serviceWayContentMapper;
|
||||
|
||||
/**
|
||||
* 查询服务方式内容
|
||||
*
|
||||
* @param id 服务方式内容主键
|
||||
* @return 服务方式内容
|
||||
*/
|
||||
@Override
|
||||
public ServiceWayContent selectServiceWayContentById(Long id) {
|
||||
return serviceWayContentMapper.selectServiceWayContentById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询服务方式内容列表
|
||||
* @param serviceWayContentDTO 服务方式内容
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ServiceWayContentVO> selectServiceWayContentList(ServiceWayContentDTO serviceWayContentDTO) {
|
||||
return serviceWayContentMapper.selectServiceWayContentListV1(serviceWayContentDTO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增服务方式内容
|
||||
*
|
||||
* @param serviceWayContent 服务方式内容
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertServiceWayContent(ServiceWayContent serviceWayContent) {
|
||||
serviceWayContent.setCreateTime(DateUtils.getNowDate());
|
||||
return serviceWayContentMapper.insertServiceWayContent(serviceWayContent);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改服务方式内容
|
||||
*
|
||||
* @param serviceWayContent 服务方式内容
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateServiceWayContent(ServiceWayContent serviceWayContent) {
|
||||
serviceWayContent.setUpdateTime(DateUtils.getNowDate());
|
||||
return serviceWayContentMapper.updateServiceWayContent(serviceWayContent);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除服务方式内容
|
||||
*
|
||||
* @param ids 需要删除的服务方式内容主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteServiceWayContentByIds(Long[] ids) {
|
||||
return serviceWayContentMapper.deleteServiceWayContentByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除服务方式内容信息
|
||||
*
|
||||
* @param id 服务方式内容主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteServiceWayContentById(Long id) {
|
||||
return serviceWayContentMapper.deleteServiceWayContentById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询服务方式和记录数
|
||||
*
|
||||
* @param serviceWayName
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ServiceWayContentAndNumVO> selectListNum(String serviceWayName) {
|
||||
return serviceWayContentMapper.selectListNum(serviceWayName);
|
||||
}
|
||||
}
|
||||
@ -40,6 +40,6 @@ public class DepartmentVO extends BaseEntity {
|
||||
/**
|
||||
* 所属科室下属数量:比如科室下所含话术数量
|
||||
*/
|
||||
@ApiModelProperty(value = "科室代码")
|
||||
@ApiModelProperty(value = "所属科室下属数量")
|
||||
private Integer countNum;
|
||||
}
|
||||
|
||||
@ -0,0 +1,35 @@
|
||||
package com.xinelu.manage.vo.servicewaycontent;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author : youxilong
|
||||
* @date : 2024/2/29 20:46
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ApiModel(value = "服务方式内容与数量VO")
|
||||
public class ServiceWayContentAndNumVO {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 服务方式名称
|
||||
*/
|
||||
@ApiModelProperty(value = "服务方式名称")
|
||||
private String serviceWayName;
|
||||
|
||||
/**
|
||||
* 服务方式记录数量
|
||||
*/
|
||||
@ApiModelProperty(value = "服务方式记录数量")
|
||||
private Integer serviceContentNum;
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
package com.xinelu.manage.vo.servicewaycontent;
|
||||
|
||||
import com.xinelu.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author : youxilong
|
||||
* @date : 2024/2/29 22:05
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ApiModel(value = "服务方式内容VO")
|
||||
public class ServiceWayContentVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 服务内容
|
||||
*/
|
||||
@ApiModelProperty(value = "服务内容")
|
||||
@Excel(name = "服务内容")
|
||||
private String serviceContent;
|
||||
|
||||
/**
|
||||
* 服务频次文本
|
||||
*/
|
||||
@ApiModelProperty(value = "服务频次文本")
|
||||
@Excel(name = "服务频次文本")
|
||||
private String serviceFrequencyText;
|
||||
|
||||
/**
|
||||
* 服务频次数字起始值
|
||||
*/
|
||||
@ApiModelProperty(value = "服务频次数字起始值")
|
||||
@Excel(name = "服务频次数字起始值")
|
||||
private Integer serviceFrequencyStart;
|
||||
|
||||
/**
|
||||
* 服务频次数字结束值
|
||||
*/
|
||||
@ApiModelProperty(value = "服务频次数字结束值")
|
||||
@Excel(name = "服务频次数字结束值")
|
||||
private Integer serviceFrequencyEnd;
|
||||
}
|
||||
@ -0,0 +1,286 @@
|
||||
<?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.servicewaycontent.ServiceWayContentMapper">
|
||||
|
||||
<resultMap type="ServiceWayContent" id="ServiceWayContentResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="serviceWayName" column="service_way_name"/>
|
||||
<result property="serviceWayCode" column="service_way_code"/>
|
||||
<result property="serviceType" column="service_type"/>
|
||||
<result property="serviceWayId" column="service_way_id"/>
|
||||
<result property="serviceContent" column="service_content"/>
|
||||
<result property="serviceContentId" column="service_content_id"/>
|
||||
<result property="serviceFrequencyType" column="service_frequency_type"/>
|
||||
<result property="serviceFrequencyText" column="service_frequency_text"/>
|
||||
<result property="serviceFrequencyStart" column="service_frequency_start"/>
|
||||
<result property="serviceFrequencyEnd" column="service_frequency_end"/>
|
||||
<result property="serviceSort" column="service_sort"/>
|
||||
<result property="serviceRemark" column="service_remark"/>
|
||||
<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="selectServiceWayContentVo">
|
||||
select id,
|
||||
service_way_name,
|
||||
service_way_code,
|
||||
service_type,
|
||||
service_way_id,
|
||||
service_content,
|
||||
service_content_id,
|
||||
service_frequency_type,
|
||||
service_frequency_text,
|
||||
service_frequency_start,
|
||||
service_frequency_end,
|
||||
service_sort,
|
||||
service_remark,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time
|
||||
from service_way_content
|
||||
</sql>
|
||||
|
||||
<select id="selectServiceWayContentList" parameterType="ServiceWayContent" resultMap="ServiceWayContentResult">
|
||||
<include refid="selectServiceWayContentVo"/>
|
||||
<where>
|
||||
<if test="serviceWayName != null and serviceWayName != ''">
|
||||
and service_way_name like concat('%',
|
||||
#{serviceWayName},
|
||||
'%'
|
||||
)
|
||||
</if>
|
||||
<if test="serviceWayCode != null and serviceWayCode != ''">
|
||||
and service_way_code =
|
||||
#{serviceWayCode}
|
||||
</if>
|
||||
<if test="serviceType != null and serviceType != ''">
|
||||
and service_type =
|
||||
#{serviceType}
|
||||
</if>
|
||||
<if test="serviceWayId != null ">
|
||||
and service_way_id =
|
||||
#{serviceWayId}
|
||||
</if>
|
||||
<if test="serviceContent != null and serviceContent != ''">
|
||||
and service_content =
|
||||
#{serviceContent}
|
||||
</if>
|
||||
<if test="serviceContentId != null ">
|
||||
and service_content_id =
|
||||
#{serviceContentId}
|
||||
</if>
|
||||
<if test="serviceFrequencyType != null and serviceFrequencyType != ''">
|
||||
and service_frequency_type =
|
||||
#{serviceFrequencyType}
|
||||
</if>
|
||||
<if test="serviceFrequencyText != null and serviceFrequencyText != ''">
|
||||
and service_frequency_text =
|
||||
#{serviceFrequencyText}
|
||||
</if>
|
||||
<if test="serviceFrequencyStart != null ">
|
||||
and service_frequency_start =
|
||||
#{serviceFrequencyStart}
|
||||
</if>
|
||||
<if test="serviceFrequencyEnd != null ">
|
||||
and service_frequency_end =
|
||||
#{serviceFrequencyEnd}
|
||||
</if>
|
||||
<if test="serviceSort != null ">
|
||||
and service_sort =
|
||||
#{serviceSort}
|
||||
</if>
|
||||
<if test="serviceRemark != null and serviceRemark != ''">
|
||||
and service_remark =
|
||||
#{serviceRemark}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectServiceWayContentById" parameterType="Long"
|
||||
resultMap="ServiceWayContentResult">
|
||||
<include refid="selectServiceWayContentVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="selectListNum" resultType="com.xinelu.manage.vo.servicewaycontent.ServiceWayContentAndNumVO">
|
||||
select swc1.id,swc1.service_way_name,count(*) as serviceContentNum from service_way_content swc1 left join
|
||||
service_way_content swc2 on swc1.id = swc2.service_way_id
|
||||
left join service_way_content swc3 on swc2.id =swc3.service_content_id
|
||||
<where>
|
||||
swc1.service_type = 'SERVICE_WRY'
|
||||
and swc2.service_type = 'SERVICE_CONTENT'
|
||||
and swc3.service_type = 'SERVICE_FREQUENCY'
|
||||
<if test="serviceWayName != null and serviceWayName != ''">
|
||||
and swc1.service_way_name like concat('%',
|
||||
#{serviceWayName},
|
||||
'%'
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectServiceWayContentListV1"
|
||||
resultType="com.xinelu.manage.vo.servicewaycontent.ServiceWayContentVO">
|
||||
SELECT swc1.id,swc1.service_content,
|
||||
swc2.service_frequency_text,
|
||||
swc2.service_frequency_start,
|
||||
swc2.service_frequency_end
|
||||
FROM service_way_content swc1
|
||||
LEFT JOIN service_way_content swc2 on swc1.id = swc2.service_content_id
|
||||
<where>
|
||||
swc1.service_way_id = #{id}
|
||||
and swc1.service_type = 'SERVICE_CONTENT'
|
||||
and swc2.service_type = 'SERVICE_FREQUENCY'
|
||||
<if test="serviceContent != null and serviceContent != ''">
|
||||
and swc1.service_content like concat('%',
|
||||
#{serviceContent},
|
||||
'%'
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertServiceWayContent" parameterType="ServiceWayContent" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into service_way_content
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="serviceWayName != null">service_way_name,
|
||||
</if>
|
||||
<if test="serviceWayCode != null">service_way_code,
|
||||
</if>
|
||||
<if test="serviceType != null">service_type,
|
||||
</if>
|
||||
<if test="serviceWayId != null">service_way_id,
|
||||
</if>
|
||||
<if test="serviceContent != null">service_content,
|
||||
</if>
|
||||
<if test="serviceContentId != null">service_content_id,
|
||||
</if>
|
||||
<if test="serviceFrequencyType != null">service_frequency_type,
|
||||
</if>
|
||||
<if test="serviceFrequencyText != null">service_frequency_text,
|
||||
</if>
|
||||
<if test="serviceFrequencyStart != null">service_frequency_start,
|
||||
</if>
|
||||
<if test="serviceFrequencyEnd != null">service_frequency_end,
|
||||
</if>
|
||||
<if test="serviceSort != null">service_sort,
|
||||
</if>
|
||||
<if test="serviceRemark != null">service_remark,
|
||||
</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="serviceWayName != null">#{serviceWayName},
|
||||
</if>
|
||||
<if test="serviceWayCode != null">#{serviceWayCode},
|
||||
</if>
|
||||
<if test="serviceType != null">#{serviceType},
|
||||
</if>
|
||||
<if test="serviceWayId != null">#{serviceWayId},
|
||||
</if>
|
||||
<if test="serviceContent != null">#{serviceContent},
|
||||
</if>
|
||||
<if test="serviceContentId != null">#{serviceContentId},
|
||||
</if>
|
||||
<if test="serviceFrequencyType != null">#{serviceFrequencyType},
|
||||
</if>
|
||||
<if test="serviceFrequencyText != null">#{serviceFrequencyText},
|
||||
</if>
|
||||
<if test="serviceFrequencyStart != null">#{serviceFrequencyStart},
|
||||
</if>
|
||||
<if test="serviceFrequencyEnd != null">#{serviceFrequencyEnd},
|
||||
</if>
|
||||
<if test="serviceSort != null">#{serviceSort},
|
||||
</if>
|
||||
<if test="serviceRemark != null">#{serviceRemark},
|
||||
</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="updateServiceWayContent" parameterType="ServiceWayContent">
|
||||
update service_way_content
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="serviceWayName != null">service_way_name =
|
||||
#{serviceWayName},
|
||||
</if>
|
||||
<if test="serviceWayCode != null">service_way_code =
|
||||
#{serviceWayCode},
|
||||
</if>
|
||||
<if test="serviceType != null">service_type =
|
||||
#{serviceType},
|
||||
</if>
|
||||
<if test="serviceWayId != null">service_way_id =
|
||||
#{serviceWayId},
|
||||
</if>
|
||||
<if test="serviceContent != null">service_content =
|
||||
#{serviceContent},
|
||||
</if>
|
||||
<if test="serviceContentId != null">service_content_id =
|
||||
#{serviceContentId},
|
||||
</if>
|
||||
<if test="serviceFrequencyType != null">service_frequency_type =
|
||||
#{serviceFrequencyType},
|
||||
</if>
|
||||
<if test="serviceFrequencyText != null">service_frequency_text =
|
||||
#{serviceFrequencyText},
|
||||
</if>
|
||||
<if test="serviceFrequencyStart != null">service_frequency_start =
|
||||
#{serviceFrequencyStart},
|
||||
</if>
|
||||
<if test="serviceFrequencyEnd != null">service_frequency_end =
|
||||
#{serviceFrequencyEnd},
|
||||
</if>
|
||||
<if test="serviceSort != null">service_sort =
|
||||
#{serviceSort},
|
||||
</if>
|
||||
<if test="serviceRemark != null">service_remark =
|
||||
#{serviceRemark},
|
||||
</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="deleteServiceWayContentById" parameterType="Long">
|
||||
delete
|
||||
from service_way_content
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteServiceWayContentByIds" parameterType="String">
|
||||
delete from service_way_content where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user