Merge branch '0418_小程序开发' of http://182.92.166.109:3000/zhuangyuanke/PostDischargePatientManage into 0418_小程序开发
This commit is contained in:
commit
fe4a868548
@ -244,6 +244,11 @@ public class Constants {
|
|||||||
*/
|
*/
|
||||||
public static final String ROUTE_CODE = "RC";
|
public static final String ROUTE_CODE = "RC";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 常用术语编码
|
||||||
|
*/
|
||||||
|
public static final String TERM_CODE = "TC";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 院后微信小程序accessToken的redis的键前缀
|
* 院后微信小程序accessToken的redis的键前缀
|
||||||
*/
|
*/
|
||||||
@ -353,4 +358,14 @@ public class Constants {
|
|||||||
* 泉医微信小程序ACCESS_TOKEN前缀(测试使用)
|
* 泉医微信小程序ACCESS_TOKEN前缀(测试使用)
|
||||||
*/
|
*/
|
||||||
public static final String NURSE_STATION_APPLET_ACCESS_TOKEN = "NURSE_STATION_APPLET_ACCESS_TOKEN";
|
public static final String NURSE_STATION_APPLET_ACCESS_TOKEN = "NURSE_STATION_APPLET_ACCESS_TOKEN";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 常用术语最大层数
|
||||||
|
*/
|
||||||
|
public static final Long TERM_MAX_LEVEL = 3L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 常用术语最大层数
|
||||||
|
*/
|
||||||
|
public static final Long TERM_MIN_LEVEL = 1L;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import com.xinelu.common.core.page.TableDataInfo;
|
|||||||
import com.xinelu.common.enums.BusinessType;
|
import com.xinelu.common.enums.BusinessType;
|
||||||
import com.xinelu.common.utils.poi.ExcelUtil;
|
import com.xinelu.common.utils.poi.ExcelUtil;
|
||||||
import com.xinelu.manage.domain.questioninfo.QuestionInfo;
|
import com.xinelu.manage.domain.questioninfo.QuestionInfo;
|
||||||
|
import com.xinelu.manage.dto.department.DepartmentCount;
|
||||||
import com.xinelu.manage.service.questioninfo.IQuestionInfoService;
|
import com.xinelu.manage.service.questioninfo.IQuestionInfoService;
|
||||||
import com.xinelu.manage.vo.questionInfo.QuestionVO;
|
import com.xinelu.manage.vo.questionInfo.QuestionVO;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@ -113,7 +114,7 @@ public class QuestionInfoController extends BaseController {
|
|||||||
* 科室问卷数量
|
* 科室问卷数量
|
||||||
*/
|
*/
|
||||||
@GetMapping("/departmentQuestionCount")
|
@GetMapping("/departmentQuestionCount")
|
||||||
public AjaxResult departmentQuestionCount(String departmentName, String questionnaireStatus, String questionType) {
|
public AjaxResult departmentQuestionCount(DepartmentCount departmentCount) {
|
||||||
return questionInfoService.departmentQuestionCount(departmentName, questionnaireStatus, questionType);
|
return AjaxResult.success(questionInfoService.departmentQuestionCount(departmentCount));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,109 @@
|
|||||||
|
package com.xinelu.manage.controller.termbank;
|
||||||
|
|
||||||
|
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.termbank.TermBank;
|
||||||
|
import com.xinelu.manage.service.termbank.ITermBankService;
|
||||||
|
import com.xinelu.manage.vo.termbank.TermBankVO;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
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-06-07
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/system/bank")
|
||||||
|
public class TermBankController extends BaseController {
|
||||||
|
@Resource
|
||||||
|
private ITermBankService termBankService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询常用术语(知识库)列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:bank:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(TermBank termBank) {
|
||||||
|
startPage();
|
||||||
|
List<TermBank> list = termBankService.list(termBank);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/selectTermBankList")
|
||||||
|
public AjaxResult selectTermBankList(TermBank termBank) {
|
||||||
|
return AjaxResult.success(termBankService.selectTermBankList(termBank));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出常用术语(知识库)列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:bank:export')")
|
||||||
|
@Log(title = "常用术语(知识库)", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, TermBank termBank) {
|
||||||
|
List<TermBank> list = termBankService.selectTermBankList(termBank);
|
||||||
|
ExcelUtil<TermBank> util = new ExcelUtil<>(TermBank.class);
|
||||||
|
util.exportExcel(response, list, "常用术语(知识库)数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取常用术语(知识库)详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:bank:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||||
|
return AjaxResult.success(termBankService.selectTermBankById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增常用术语(知识库)
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:bank:add')")
|
||||||
|
@Log(title = "常用术语(知识库)", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
public AjaxResult add(@RequestBody TermBank termBank) {
|
||||||
|
if (StringUtils.isBlank(termBank.getTermContent())) {
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
return termBankService.insertTermBank(termBank);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改常用术语(知识库)
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:bank:edit')")
|
||||||
|
@Log(title = "常用术语(知识库)", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping("/edit")
|
||||||
|
public AjaxResult edit(@RequestBody TermBank termBank) {
|
||||||
|
return termBankService.updateTermBank(termBank);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除常用术语(知识库)
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:bank:remove')")
|
||||||
|
@Log(title = "常用术语(知识库)", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||||
|
return toAjax(termBankService.deleteTermBankByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 常用术语层级树图
|
||||||
|
*/
|
||||||
|
@GetMapping("/bankLevel")
|
||||||
|
public List<TermBankVO> bankLevel(Long level) {
|
||||||
|
return termBankService.bankLevel(level);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,100 @@
|
|||||||
|
package com.xinelu.manage.domain.termbank;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 常用术语(知识库)对象 term_bank
|
||||||
|
*
|
||||||
|
* @author xinelu
|
||||||
|
* @date 2024-06-07
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ApiModel(value = "常用术语(知识库)对象", description = "term_bank")
|
||||||
|
public class TermBank extends BaseEntity {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 画像标签和知识库字段表id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "画像标签和知识库字段表id")
|
||||||
|
@Excel(name = "画像标签和知识库字段表id")
|
||||||
|
private String termCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内容名称(不用)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "内容名称(不用)")
|
||||||
|
@Excel(name = "内容名称(不用)")
|
||||||
|
private String termName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字段名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "字段名称")
|
||||||
|
@Excel(name = "字段名称")
|
||||||
|
private String termContent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父编码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "父编码")
|
||||||
|
@Excel(name = "父编码")
|
||||||
|
private String parentTermCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 层级,从1开始,1,2,3……
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "层级,从1开始,1,2,3……")
|
||||||
|
@Excel(name = "层级,从1开始,1,2,3……")
|
||||||
|
private Long termLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内容排序
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "内容排序")
|
||||||
|
@Excel(name = "内容排序")
|
||||||
|
private Long termSort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内容备注信息
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "内容备注信息")
|
||||||
|
@Excel(name = "内容备注信息")
|
||||||
|
private String termRemark;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("termCode", getTermCode())
|
||||||
|
.append("termName", getTermName())
|
||||||
|
.append("termContent", getTermContent())
|
||||||
|
.append("parentTermCode", getParentTermCode())
|
||||||
|
.append("termLevel", getTermLevel())
|
||||||
|
.append("termSort", getTermSort())
|
||||||
|
.append("termRemark", getTermRemark())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,37 @@
|
|||||||
|
package com.xinelu.manage.dto.department;
|
||||||
|
|
||||||
|
import com.xinelu.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 科室数量DTO
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
public class DepartmentCount extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 科室名称
|
||||||
|
*/
|
||||||
|
private String departmentName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问卷发布状态
|
||||||
|
*/
|
||||||
|
private String questionnaireStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问卷类型
|
||||||
|
*/
|
||||||
|
private String questionType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机构信息
|
||||||
|
*/
|
||||||
|
private Long agencyId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 科室信息
|
||||||
|
*/
|
||||||
|
private Long departmentId;
|
||||||
|
}
|
||||||
@ -1,6 +1,7 @@
|
|||||||
package com.xinelu.manage.dto.textmessage;
|
package com.xinelu.manage.dto.textmessage;
|
||||||
|
|
||||||
import com.xinelu.common.annotation.Excel;
|
import com.xinelu.common.annotation.Excel;
|
||||||
|
import com.xinelu.common.core.domain.BaseEntity;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
@ -15,7 +16,7 @@ import lombok.NoArgsConstructor;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@ApiModel(value = "短信模板信息对象DTO")
|
@ApiModel(value = "短信模板信息对象DTO")
|
||||||
public class TextMessageDTO {
|
public class TextMessageDTO extends BaseEntity {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 所属科室id
|
* 所属科室id
|
||||||
|
|||||||
@ -26,7 +26,9 @@ public interface OperationInfoMapper {
|
|||||||
* @param operationInfo 手术信息
|
* @param operationInfo 手术信息
|
||||||
* @return 手术信息集合
|
* @return 手术信息集合
|
||||||
*/
|
*/
|
||||||
public List<OperationInfo> selectOperationInfoList(OperationInfo operationInfo);
|
List<OperationInfo> selectOperationInfoList(OperationInfo operationInfo);
|
||||||
|
|
||||||
|
List<OperationInfo> selectOperationList(OperationInfo operationInfo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增手术信息
|
* 新增手术信息
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
package com.xinelu.manage.mapper.questioninfo;
|
package com.xinelu.manage.mapper.questioninfo;
|
||||||
|
|
||||||
import com.xinelu.manage.domain.questioninfo.QuestionInfo;
|
import com.xinelu.manage.domain.questioninfo.QuestionInfo;
|
||||||
|
import com.xinelu.manage.dto.department.DepartmentCount;
|
||||||
import com.xinelu.manage.vo.department.DepartmentVO;
|
import com.xinelu.manage.vo.department.DepartmentVO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -29,6 +29,7 @@ public interface QuestionInfoMapper {
|
|||||||
*/
|
*/
|
||||||
List<QuestionInfo> selectQuestionInfoList(QuestionInfo questionInfo);
|
List<QuestionInfo> selectQuestionInfoList(QuestionInfo questionInfo);
|
||||||
|
|
||||||
|
List<QuestionInfo> selectQuestionList(QuestionInfo questionInfo);
|
||||||
/**
|
/**
|
||||||
* 新增问卷基本信息
|
* 新增问卷基本信息
|
||||||
*
|
*
|
||||||
@ -65,9 +66,8 @@ public interface QuestionInfoMapper {
|
|||||||
/**
|
/**
|
||||||
* 科室路径数量
|
* 科室路径数量
|
||||||
*
|
*
|
||||||
* @param departmentName 科室名称
|
* @param departmentCount 科室信息
|
||||||
* @param questionnaireStatus 问卷状态
|
|
||||||
* @return DepartmentVO
|
* @return DepartmentVO
|
||||||
*/
|
*/
|
||||||
List<DepartmentVO> departmentQuestionByDepartmentName(@Param("departmentName") String departmentName, @Param("questionnaireStatus") String questionnaireStatus, @Param("questionType") String questionType);
|
List<DepartmentVO> departmentQuestionByDepartmentName(DepartmentCount departmentCount);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,7 +26,7 @@ public interface ScriptInfoMapper {
|
|||||||
* @param scriptInfo 话术信息
|
* @param scriptInfo 话术信息
|
||||||
* @return 话术信息集合
|
* @return 话术信息集合
|
||||||
*/
|
*/
|
||||||
public List<ScriptInfo> selectScriptInfoList(ScriptInfo scriptInfo);
|
List<ScriptInfo> selectScriptInfoList(ScriptInfo scriptInfo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增话术信息
|
* 新增话术信息
|
||||||
|
|||||||
@ -0,0 +1,67 @@
|
|||||||
|
package com.xinelu.manage.mapper.termbank;
|
||||||
|
|
||||||
|
import com.xinelu.manage.domain.termbank.TermBank;
|
||||||
|
import com.xinelu.manage.vo.termbank.TermBankVO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 常用术语(知识库)Mapper接口
|
||||||
|
*
|
||||||
|
* @author xinelu
|
||||||
|
* @date 2024-06-07
|
||||||
|
*/
|
||||||
|
public interface TermBankMapper {
|
||||||
|
/**
|
||||||
|
* 查询常用术语(知识库)
|
||||||
|
*
|
||||||
|
* @param id 常用术语(知识库)主键
|
||||||
|
* @return 常用术语(知识库)
|
||||||
|
*/
|
||||||
|
TermBank selectTermBankById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询常用术语(知识库)列表
|
||||||
|
*
|
||||||
|
* @param termBank 常用术语(知识库)
|
||||||
|
* @return 常用术语(知识库)集合
|
||||||
|
*/
|
||||||
|
List<TermBank> selectTermBankList(TermBank termBank);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 常用术语层级树图
|
||||||
|
*/
|
||||||
|
List<TermBankVO> selectTermBankTree(Long level);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增常用术语(知识库)
|
||||||
|
*
|
||||||
|
* @param termBank 常用术语(知识库)
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertTermBank(TermBank termBank);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改常用术语(知识库)
|
||||||
|
*
|
||||||
|
* @param termBank 常用术语(知识库)
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateTermBank(TermBank termBank);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除常用术语(知识库)
|
||||||
|
*
|
||||||
|
* @param id 常用术语(知识库)主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteTermBankById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除常用术语(知识库)
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteTermBankByIds(Long[] ids);
|
||||||
|
}
|
||||||
@ -1,5 +1,6 @@
|
|||||||
package com.xinelu.manage.service.department.impl;
|
package com.xinelu.manage.service.department.impl;
|
||||||
|
|
||||||
|
import com.xinelu.common.annotation.DataScope;
|
||||||
import com.xinelu.common.core.domain.AjaxResult;
|
import com.xinelu.common.core.domain.AjaxResult;
|
||||||
import com.xinelu.common.core.domain.entity.SysUser;
|
import com.xinelu.common.core.domain.entity.SysUser;
|
||||||
import com.xinelu.common.exception.ServiceException;
|
import com.xinelu.common.exception.ServiceException;
|
||||||
@ -15,16 +16,17 @@ import com.xinelu.manage.service.department.IDepartmentService;
|
|||||||
import com.xinelu.manage.vo.department.DepartmentListVO;
|
import com.xinelu.manage.vo.department.DepartmentListVO;
|
||||||
import com.xinelu.manage.vo.department.DepartmentVO;
|
import com.xinelu.manage.vo.department.DepartmentVO;
|
||||||
import com.xinelu.system.mapper.SysUserMapper;
|
import com.xinelu.system.mapper.SysUserMapper;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.commons.lang3.BooleanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import javax.annotation.Resource;
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
|
||||||
import org.apache.commons.lang3.BooleanUtils;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -162,6 +164,7 @@ public class DepartmentServiceImpl implements IDepartmentService {
|
|||||||
* @param departmentDto 科室信息
|
* @param departmentDto 科室信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@DataScope(agencyAlias = "d", deptAlias = "si")
|
||||||
@Override
|
@Override
|
||||||
public List<DepartmentVO> selectDepartmentListScriptNum(DepartmentDTO departmentDto) {
|
public List<DepartmentVO> selectDepartmentListScriptNum(DepartmentDTO departmentDto) {
|
||||||
return departmentMapper.selectDepartmentListScriptNum(departmentDto);
|
return departmentMapper.selectDepartmentListScriptNum(departmentDto);
|
||||||
@ -173,6 +176,7 @@ public class DepartmentServiceImpl implements IDepartmentService {
|
|||||||
* @param departmentDto 科室信息
|
* @param departmentDto 科室信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@DataScope(agencyAlias = "d", deptAlias = "oi")
|
||||||
@Override
|
@Override
|
||||||
public List<DepartmentVO> selectDepartmentListOperationNum(DepartmentDTO departmentDto) {
|
public List<DepartmentVO> selectDepartmentListOperationNum(DepartmentDTO departmentDto) {
|
||||||
return departmentMapper.selectDepartmentListOperationNum(departmentDto);
|
return departmentMapper.selectDepartmentListOperationNum(departmentDto);
|
||||||
@ -184,6 +188,7 @@ public class DepartmentServiceImpl implements IDepartmentService {
|
|||||||
* @param departmentDto 科室信息
|
* @param departmentDto 科室信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@DataScope(agencyAlias = "d", deptAlias = "wt")
|
||||||
@Override
|
@Override
|
||||||
public List<DepartmentVO> selectDepartmentListWechatTemplateNum(DepartmentDTO departmentDto) {
|
public List<DepartmentVO> selectDepartmentListWechatTemplateNum(DepartmentDTO departmentDto) {
|
||||||
return departmentMapper.selectDepartmentListWechatTemplateNum(departmentDto);
|
return departmentMapper.selectDepartmentListWechatTemplateNum(departmentDto);
|
||||||
@ -195,6 +200,7 @@ public class DepartmentServiceImpl implements IDepartmentService {
|
|||||||
* @param departmentDto 科室信息
|
* @param departmentDto 科室信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@DataScope(agencyAlias = "d", deptAlias = "tm")
|
||||||
@Override
|
@Override
|
||||||
public List<DepartmentVO> selectDepartmentListMessageNum(DepartmentDTO departmentDto) {
|
public List<DepartmentVO> selectDepartmentListMessageNum(DepartmentDTO departmentDto) {
|
||||||
return departmentMapper.selectDepartmentListMessageNum(departmentDto);
|
return departmentMapper.selectDepartmentListMessageNum(departmentDto);
|
||||||
@ -253,6 +259,7 @@ public class DepartmentServiceImpl implements IDepartmentService {
|
|||||||
* @param departmentDto 科室
|
* @param departmentDto 科室
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@DataScope(agencyAlias = "d", deptAlias = "sp")
|
||||||
@Override
|
@Override
|
||||||
public List<DepartmentVO> selectListServicePackageNum(DepartmentDTO departmentDto) {
|
public List<DepartmentVO> selectListServicePackageNum(DepartmentDTO departmentDto) {
|
||||||
return departmentMapper.selectListServicePackageNum(departmentDto);
|
return departmentMapper.selectListServicePackageNum(departmentDto);
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.xinelu.manage.service.operationInfo.impl;
|
package com.xinelu.manage.service.operationInfo.impl;
|
||||||
|
|
||||||
|
import com.xinelu.common.annotation.DataScope;
|
||||||
import com.xinelu.common.constant.Constants;
|
import com.xinelu.common.constant.Constants;
|
||||||
import com.xinelu.common.exception.ServiceException;
|
import com.xinelu.common.exception.ServiceException;
|
||||||
import com.xinelu.common.utils.SecurityUtils;
|
import com.xinelu.common.utils.SecurityUtils;
|
||||||
@ -45,9 +46,10 @@ public class OperationInfoServiceImpl implements IOperationInfoService {
|
|||||||
* @param operationInfo 手术信息
|
* @param operationInfo 手术信息
|
||||||
* @return 手术信息
|
* @return 手术信息
|
||||||
*/
|
*/
|
||||||
|
@DataScope(agencyAlias = "d", deptAlias = "oi")
|
||||||
@Override
|
@Override
|
||||||
public List<OperationInfo> selectOperationInfoList(OperationInfo operationInfo) {
|
public List<OperationInfo> selectOperationInfoList(OperationInfo operationInfo) {
|
||||||
return operationInfoMapper.selectOperationInfoList(operationInfo);
|
return operationInfoMapper.selectOperationList(operationInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -2,6 +2,8 @@ package com.xinelu.manage.service.questioninfo;
|
|||||||
|
|
||||||
import com.xinelu.common.core.domain.AjaxResult;
|
import com.xinelu.common.core.domain.AjaxResult;
|
||||||
import com.xinelu.manage.domain.questioninfo.QuestionInfo;
|
import com.xinelu.manage.domain.questioninfo.QuestionInfo;
|
||||||
|
import com.xinelu.manage.dto.department.DepartmentCount;
|
||||||
|
import com.xinelu.manage.vo.department.DepartmentVO;
|
||||||
import com.xinelu.manage.vo.questionInfo.QuestionVO;
|
import com.xinelu.manage.vo.questionInfo.QuestionVO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -72,8 +74,8 @@ public interface IQuestionInfoService {
|
|||||||
/**
|
/**
|
||||||
* 科室问卷数量
|
* 科室问卷数量
|
||||||
*
|
*
|
||||||
* @param departmentName 科室名称
|
* @param departmentCount 科室信息
|
||||||
* @return AjaxResult
|
* @return AjaxResult
|
||||||
*/
|
*/
|
||||||
AjaxResult departmentQuestionCount(String departmentName, String questionnaireStatus,String questionType);
|
List<DepartmentVO> departmentQuestionCount(DepartmentCount departmentCount);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.xinelu.manage.service.questioninfo.impl;
|
package com.xinelu.manage.service.questioninfo.impl;
|
||||||
|
|
||||||
|
import com.xinelu.common.annotation.DataScope;
|
||||||
import com.xinelu.common.core.domain.AjaxResult;
|
import com.xinelu.common.core.domain.AjaxResult;
|
||||||
import com.xinelu.common.utils.SecurityUtils;
|
import com.xinelu.common.utils.SecurityUtils;
|
||||||
import com.xinelu.common.utils.bean.BeanUtils;
|
import com.xinelu.common.utils.bean.BeanUtils;
|
||||||
@ -7,6 +8,7 @@ import com.xinelu.common.utils.uuid.IdUtils;
|
|||||||
import com.xinelu.manage.domain.questioninfo.QuestionInfo;
|
import com.xinelu.manage.domain.questioninfo.QuestionInfo;
|
||||||
import com.xinelu.manage.domain.questionsubject.QuestionSubject;
|
import com.xinelu.manage.domain.questionsubject.QuestionSubject;
|
||||||
import com.xinelu.manage.domain.questionsubjectoption.QuestionSubjectOption;
|
import com.xinelu.manage.domain.questionsubjectoption.QuestionSubjectOption;
|
||||||
|
import com.xinelu.manage.dto.department.DepartmentCount;
|
||||||
import com.xinelu.manage.mapper.questioninfo.QuestionInfoMapper;
|
import com.xinelu.manage.mapper.questioninfo.QuestionInfoMapper;
|
||||||
import com.xinelu.manage.mapper.questionsubject.QuestionSubjectMapper;
|
import com.xinelu.manage.mapper.questionsubject.QuestionSubjectMapper;
|
||||||
import com.xinelu.manage.mapper.questionsubjectoption.QuestionSubjectOptionMapper;
|
import com.xinelu.manage.mapper.questionsubjectoption.QuestionSubjectOptionMapper;
|
||||||
@ -80,9 +82,10 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService {
|
|||||||
* @param questionInfo 问卷基本信息
|
* @param questionInfo 问卷基本信息
|
||||||
* @return 问卷基本信息
|
* @return 问卷基本信息
|
||||||
*/
|
*/
|
||||||
|
@DataScope(agencyAlias = "dt", deptAlias = "qi")
|
||||||
@Override
|
@Override
|
||||||
public List<QuestionInfo> selectQuestionInfoList(QuestionInfo questionInfo) {
|
public List<QuestionInfo> selectQuestionInfoList(QuestionInfo questionInfo) {
|
||||||
return questionInfoMapper.selectQuestionInfoList(questionInfo);
|
return questionInfoMapper.selectQuestionList(questionInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -310,19 +313,20 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService {
|
|||||||
/**
|
/**
|
||||||
* 科室问卷数量
|
* 科室问卷数量
|
||||||
*
|
*
|
||||||
* @param departmentName 科室名称
|
* @param departmentCount 科室名称
|
||||||
* @return AjaxResult
|
* @return AjaxResult
|
||||||
*/
|
*/
|
||||||
|
@DataScope(agencyAlias = "dt", deptAlias = "qi")
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult departmentQuestionCount(String departmentName, String questionnaireStatus, String questionType) {
|
public List<DepartmentVO> departmentQuestionCount(DepartmentCount departmentCount) {
|
||||||
DepartmentVO departmentVO = new DepartmentVO();
|
DepartmentVO departmentVO = new DepartmentVO();
|
||||||
List<DepartmentVO> department = new ArrayList<>();
|
List<DepartmentVO> department = new ArrayList<>();
|
||||||
departmentVO.setDepartmentName("全部");
|
departmentVO.setDepartmentName("全部");
|
||||||
departmentVO.setCountNum(0);
|
departmentVO.setCountNum(0);
|
||||||
List<DepartmentVO> departmentVOS = questionInfoMapper.departmentQuestionByDepartmentName(departmentName, questionnaireStatus, questionType);
|
List<DepartmentVO> departmentVOS = questionInfoMapper.departmentQuestionByDepartmentName(departmentCount);
|
||||||
if (CollectionUtils.isNotEmpty(departmentVOS)) {
|
if (CollectionUtils.isNotEmpty(departmentVOS)) {
|
||||||
Integer result = departmentVOS.stream().mapToInt(DepartmentVO::getCountNum).sum();
|
Integer result = departmentVOS.stream().mapToInt(DepartmentVO::getCountNum).sum();
|
||||||
if (StringUtils.isBlank(questionnaireStatus)) {
|
if (StringUtils.isBlank(departmentCount.getQuestionnaireStatus())) {
|
||||||
result = departmentVOS.get(0).getTotalNumber();
|
result = departmentVOS.get(0).getTotalNumber();
|
||||||
}
|
}
|
||||||
departmentVO.setCountNum(result);
|
departmentVO.setCountNum(result);
|
||||||
@ -331,6 +335,6 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService {
|
|||||||
} else {
|
} else {
|
||||||
department.add(departmentVO);
|
department.add(departmentVO);
|
||||||
}
|
}
|
||||||
return AjaxResult.success(department);
|
return department;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.xinelu.manage.service.scriptInfo.impl;
|
package com.xinelu.manage.service.scriptInfo.impl;
|
||||||
|
|
||||||
|
import com.xinelu.common.annotation.DataScope;
|
||||||
import com.xinelu.common.config.SystemBusinessConfig;
|
import com.xinelu.common.config.SystemBusinessConfig;
|
||||||
import com.xinelu.common.core.domain.AjaxResult;
|
import com.xinelu.common.core.domain.AjaxResult;
|
||||||
import com.xinelu.common.exception.ServiceException;
|
import com.xinelu.common.exception.ServiceException;
|
||||||
@ -51,6 +52,7 @@ public class ScriptInfoServiceImpl implements IScriptInfoService {
|
|||||||
* @param scriptInfo 话术信息
|
* @param scriptInfo 话术信息
|
||||||
* @return 话术信息
|
* @return 话术信息
|
||||||
*/
|
*/
|
||||||
|
@DataScope(agencyAlias = "d", deptAlias = "si")
|
||||||
@Override
|
@Override
|
||||||
public List<ScriptInfo> selectScriptInfoList(ScriptInfo scriptInfo) {
|
public List<ScriptInfo> selectScriptInfoList(ScriptInfo scriptInfo) {
|
||||||
return scriptInfoMapper.selectScriptInfoList(scriptInfo);
|
return scriptInfoMapper.selectScriptInfoList(scriptInfo);
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.xinelu.manage.service.servicepackage.impl;
|
package com.xinelu.manage.service.servicepackage.impl;
|
||||||
|
|
||||||
|
import com.xinelu.common.annotation.DataScope;
|
||||||
import com.xinelu.common.constant.Constants;
|
import com.xinelu.common.constant.Constants;
|
||||||
import com.xinelu.common.core.page.TableDataInfo;
|
import com.xinelu.common.core.page.TableDataInfo;
|
||||||
import com.xinelu.common.exception.ServiceException;
|
import com.xinelu.common.exception.ServiceException;
|
||||||
@ -61,28 +62,30 @@ public class ServicePackageServiceImpl implements IServicePackageService {
|
|||||||
return servicePackageDetailVO;
|
return servicePackageDetailVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询服务包基础信息
|
* 查询服务包基础信息
|
||||||
*
|
*
|
||||||
* @param id 服务包基础信息主键
|
* @param id 服务包基础信息主键
|
||||||
* @return 服务包基础信息
|
* @return 服务包基础信息
|
||||||
*/
|
*/
|
||||||
@Override public ServicePackageVO getById(Long id) {
|
@Override
|
||||||
ServicePackageDetailVO servicePackageDetailVo = servicePackageMapper.selectServicePackagesById(id);
|
public ServicePackageVO getById(Long id) {
|
||||||
if (ObjectUtils.isEmpty(servicePackageDetailVo)) {
|
ServicePackageDetailVO servicePackageDetailVo = servicePackageMapper.selectServicePackagesById(id);
|
||||||
throw new ServiceException("数据传输错误");
|
if (ObjectUtils.isEmpty(servicePackageDetailVo)) {
|
||||||
}
|
throw new ServiceException("数据传输错误");
|
||||||
ServicePackageVO servicePackageVO = new ServicePackageVO();
|
}
|
||||||
BeanUtils.copyBeanProp(servicePackageVO, servicePackageDetailVo);
|
ServicePackageVO servicePackageVO = new ServicePackageVO();
|
||||||
return servicePackageVO;
|
BeanUtils.copyBeanProp(servicePackageVO, servicePackageDetailVo);
|
||||||
}
|
return servicePackageVO;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询服务包基础信息列表
|
* 查询服务包基础信息列表
|
||||||
*
|
*
|
||||||
* @param servicePackage 服务包基础信息
|
* @param servicePackage 服务包基础信息
|
||||||
* @return 服务包基础信息
|
* @return 服务包基础信息
|
||||||
*/
|
*/
|
||||||
|
@DataScope(agencyAlias = "d", deptAlias = "sp")
|
||||||
@Override
|
@Override
|
||||||
public TableDataInfo selectServicePackageList(ServicePackage servicePackage) {
|
public TableDataInfo selectServicePackageList(ServicePackage servicePackage) {
|
||||||
pageServiceUtil.startPage();
|
pageServiceUtil.startPage();
|
||||||
@ -95,11 +98,12 @@ public class ServicePackageServiceImpl implements IServicePackageService {
|
|||||||
return pageServiceUtil.getDataTable(voList);
|
return pageServiceUtil.getDataTable(voList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public List<ServicePackageVO> selectList(ServicePackage servicePackage) {
|
@Override
|
||||||
return servicePackageMapper.selectServicePackageLists(servicePackage);
|
public List<ServicePackageVO> selectList(ServicePackage servicePackage) {
|
||||||
}
|
return servicePackageMapper.selectServicePackageLists(servicePackage);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增服务包基础信息
|
* 新增服务包基础信息
|
||||||
*
|
*
|
||||||
* @param servicePackageAddDTO 服务包基础信息
|
* @param servicePackageAddDTO 服务包基础信息
|
||||||
|
|||||||
@ -0,0 +1,70 @@
|
|||||||
|
package com.xinelu.manage.service.termbank;
|
||||||
|
|
||||||
|
import com.xinelu.common.core.domain.AjaxResult;
|
||||||
|
import com.xinelu.manage.domain.termbank.TermBank;
|
||||||
|
import com.xinelu.manage.vo.termbank.TermBankVO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 常用术语(知识库)Service接口
|
||||||
|
*
|
||||||
|
* @author xinelu
|
||||||
|
* @date 2024-06-07
|
||||||
|
*/
|
||||||
|
public interface ITermBankService {
|
||||||
|
/**
|
||||||
|
* 查询常用术语(知识库)
|
||||||
|
*
|
||||||
|
* @param id 常用术语(知识库)主键
|
||||||
|
* @return 常用术语(知识库)
|
||||||
|
*/
|
||||||
|
TermBank selectTermBankById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询常用术语(知识库)列表
|
||||||
|
*
|
||||||
|
* @param termBank 常用术语(知识库)
|
||||||
|
* @return 常用术语(知识库)集合
|
||||||
|
*/
|
||||||
|
List<TermBank> list(TermBank termBank);
|
||||||
|
|
||||||
|
List<TermBank> selectTermBankList(TermBank termBank);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增常用术语(知识库)
|
||||||
|
*
|
||||||
|
* @param termBank 常用术语(知识库)
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
AjaxResult insertTermBank(TermBank termBank);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改常用术语(知识库)
|
||||||
|
*
|
||||||
|
* @param termBank 常用术语(知识库)
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
AjaxResult updateTermBank(TermBank termBank);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除常用术语(知识库)
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的常用术语(知识库)主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteTermBankByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除常用术语(知识库)信息
|
||||||
|
*
|
||||||
|
* @param id 常用术语(知识库)主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteTermBankById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 常用术语层级树图
|
||||||
|
*/
|
||||||
|
List<TermBankVO> bankLevel(Long level);
|
||||||
|
}
|
||||||
@ -0,0 +1,186 @@
|
|||||||
|
package com.xinelu.manage.service.termbank.impl;
|
||||||
|
|
||||||
|
import com.xinelu.common.constant.Constants;
|
||||||
|
import com.xinelu.common.core.domain.AjaxResult;
|
||||||
|
import com.xinelu.common.utils.SecurityUtils;
|
||||||
|
import com.xinelu.common.utils.codes.GenerateSystemCodeUtil;
|
||||||
|
import com.xinelu.manage.domain.termbank.TermBank;
|
||||||
|
import com.xinelu.manage.mapper.termbank.TermBankMapper;
|
||||||
|
import com.xinelu.manage.service.termbank.ITermBankService;
|
||||||
|
import com.xinelu.manage.vo.termbank.TermBankVO;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 常用术语(知识库)Service业务层处理
|
||||||
|
*
|
||||||
|
* @author xinelu
|
||||||
|
* @date 2024-06-07
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class TermBankServiceImpl implements ITermBankService {
|
||||||
|
@Resource
|
||||||
|
private TermBankMapper termBankMapper;
|
||||||
|
@Resource
|
||||||
|
private GenerateSystemCodeUtil generateSystemCodeUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询常用术语(知识库)
|
||||||
|
*
|
||||||
|
* @param id 常用术语(知识库)主键
|
||||||
|
* @return 常用术语(知识库)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TermBank selectTermBankById(Long id) {
|
||||||
|
return termBankMapper.selectTermBankById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询常用术语(知识库)列表
|
||||||
|
*
|
||||||
|
* @param termBank 常用术语(知识库)
|
||||||
|
* @return 常用术语(知识库)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<TermBank> list(TermBank termBank) {
|
||||||
|
return termBankMapper.selectTermBankList(termBank);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<TermBank> selectTermBankList(TermBank termBank) {
|
||||||
|
termBank.setTermLevel(1L);
|
||||||
|
return termBankMapper.selectTermBankList(termBank);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增常用术语(知识库)
|
||||||
|
*
|
||||||
|
* @param termBank 常用术语(知识库)
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AjaxResult insertTermBank(TermBank termBank) {
|
||||||
|
if (Objects.nonNull(termBank) && Objects.nonNull(termBank.getTermLevel()) && termBank.getTermLevel() < Constants.TERM_MAX_LEVEL) {
|
||||||
|
termBank.setTermLevel(termBank.getTermLevel() + 1);
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(termBank) && Objects.nonNull(termBank.getTermLevel()) && termBank.getTermLevel() > (Constants.TERM_MAX_LEVEL)) {
|
||||||
|
return AjaxResult.error("常用话术层数最大值为" + Constants.TERM_MAX_LEVEL + "层");
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(termBank) && StringUtils.isBlank(termBank.getParentTermCode())) {
|
||||||
|
termBank.setTermLevel(Constants.TERM_MIN_LEVEL);
|
||||||
|
}
|
||||||
|
termBank.setCreateTime(LocalDateTime.now());
|
||||||
|
termBank.setCreateBy(SecurityUtils.getUsername());
|
||||||
|
termBank.setTermCode(Constants.TERM_CODE + generateSystemCodeUtil.generateSystemCode(Constants.TERM_CODE));
|
||||||
|
return AjaxResult.success(termBankMapper.insertTermBank(termBank));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改常用术语(知识库)
|
||||||
|
*
|
||||||
|
* @param termBank 常用术语(知识库)
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AjaxResult updateTermBank(TermBank termBank) {
|
||||||
|
if (Objects.nonNull(termBank) && Objects.nonNull(termBank.getTermLevel()) && termBank.getTermLevel() < Constants.TERM_MAX_LEVEL) {
|
||||||
|
termBank.setTermLevel(termBank.getTermLevel() + 1);
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(termBank) && Objects.nonNull(termBank.getTermLevel()) && termBank.getTermLevel() > (Constants.TERM_MAX_LEVEL)) {
|
||||||
|
return AjaxResult.error("常用话术层数最大值为" + Constants.TERM_MAX_LEVEL + "层");
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(termBank) && StringUtils.isBlank(termBank.getParentTermCode())) {
|
||||||
|
termBank.setTermLevel(Constants.TERM_MIN_LEVEL);
|
||||||
|
}
|
||||||
|
termBank.setUpdateTime(LocalDateTime.now());
|
||||||
|
return AjaxResult.success(termBankMapper.updateTermBank(termBank));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除常用术语(知识库)
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的常用术语(知识库)主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteTermBankByIds(Long[] ids) {
|
||||||
|
return termBankMapper.deleteTermBankByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除常用术语(知识库)信息
|
||||||
|
*
|
||||||
|
* @param id 常用术语(知识库)主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteTermBankById(Long id) {
|
||||||
|
return termBankMapper.deleteTermBankById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 常用术语层级树图
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<TermBankVO> bankLevel(Long level) {
|
||||||
|
List<TermBankVO> termBanks = termBankMapper.selectTermBankTree(level);
|
||||||
|
if (CollectionUtils.isEmpty(termBanks)) {
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
return buildDeptTree(termBanks);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<TermBankVO> buildDeptTree(List<TermBankVO> termBanks) {
|
||||||
|
List<TermBankVO> returnList = new ArrayList<>();
|
||||||
|
List<String> tempList = termBanks.stream().filter(Objects::nonNull).map(TermBank::getTermCode).filter(Objects::nonNull).collect(Collectors.toList());
|
||||||
|
for (TermBankVO termBank : termBanks) {
|
||||||
|
// 如果是顶级节点, 遍历该父节点的所有子节点
|
||||||
|
if (!tempList.contains(termBank.getParentTermCode())) {
|
||||||
|
recursionFn(termBanks, termBank);
|
||||||
|
returnList.add(termBank);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (returnList.isEmpty()) {
|
||||||
|
returnList = termBanks;
|
||||||
|
}
|
||||||
|
return returnList;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void recursionFn(List<TermBankVO> list, TermBankVO t) {
|
||||||
|
// 得到子节点列表
|
||||||
|
List<TermBankVO> childList = getChildList(list, t);
|
||||||
|
t.setChildren(childList);
|
||||||
|
for (TermBankVO tChild : childList) {
|
||||||
|
if (hasChild(list, tChild)) {
|
||||||
|
recursionFn(list, tChild);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<TermBankVO> getChildList(List<TermBankVO> list, TermBankVO t) {
|
||||||
|
List<TermBankVO> tlist = new ArrayList<TermBankVO>();
|
||||||
|
Iterator<TermBankVO> it = list.iterator();
|
||||||
|
while (it.hasNext()) {
|
||||||
|
TermBankVO n = (TermBankVO) it.next();
|
||||||
|
if (Objects.nonNull(n.getParentTermCode()) && n.getParentTermCode().equals(t.getTermCode())) {
|
||||||
|
tlist.add(n);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return tlist;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断是否有子节点
|
||||||
|
*/
|
||||||
|
private boolean hasChild(List<TermBankVO> list, TermBankVO t) {
|
||||||
|
return getChildList(list, t).size() > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,5 +1,6 @@
|
|||||||
package com.xinelu.manage.service.textmessage.impl;
|
package com.xinelu.manage.service.textmessage.impl;
|
||||||
|
|
||||||
|
import com.xinelu.common.annotation.DataScope;
|
||||||
import com.xinelu.common.core.domain.entity.SysDictData;
|
import com.xinelu.common.core.domain.entity.SysDictData;
|
||||||
import com.xinelu.common.exception.ServiceException;
|
import com.xinelu.common.exception.ServiceException;
|
||||||
import com.xinelu.common.utils.SecurityUtils;
|
import com.xinelu.common.utils.SecurityUtils;
|
||||||
@ -66,6 +67,7 @@ public class TextMessageServiceImpl implements ITextMessageService {
|
|||||||
* @param textMessageDTO 短信模板信息
|
* @param textMessageDTO 短信模板信息
|
||||||
* @return 短信模板信息
|
* @return 短信模板信息
|
||||||
*/
|
*/
|
||||||
|
@DataScope(agencyAlias = "d", deptAlias = "tm")
|
||||||
@Override
|
@Override
|
||||||
public List<TextMessageTaskVO> selectTextMessageList(TextMessageDTO textMessageDTO) {
|
public List<TextMessageTaskVO> selectTextMessageList(TextMessageDTO textMessageDTO) {
|
||||||
List<TextMessageVO> voList = textMessageMapper.selectTextMessageList(textMessageDTO);
|
List<TextMessageVO> voList = textMessageMapper.selectTextMessageList(textMessageDTO);
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.xinelu.manage.service.wechattemplate.impl;
|
package com.xinelu.manage.service.wechattemplate.impl;
|
||||||
|
|
||||||
|
import com.xinelu.common.annotation.DataScope;
|
||||||
import com.xinelu.common.core.domain.entity.SysDictData;
|
import com.xinelu.common.core.domain.entity.SysDictData;
|
||||||
import com.xinelu.common.exception.ServiceException;
|
import com.xinelu.common.exception.ServiceException;
|
||||||
import com.xinelu.common.utils.SecurityUtils;
|
import com.xinelu.common.utils.SecurityUtils;
|
||||||
@ -54,6 +55,7 @@ public class WechatTemplateServiceImpl implements IWechatTemplateService {
|
|||||||
* @param wechatTemplateDto 微信模板信息
|
* @param wechatTemplateDto 微信模板信息
|
||||||
* @return 微信模板信息
|
* @return 微信模板信息
|
||||||
*/
|
*/
|
||||||
|
@DataScope(agencyAlias = "d", deptAlias = "wt")
|
||||||
@Override
|
@Override
|
||||||
public List<WechatTemplateTaskVO> selectWechatTemplateList(WechatTemplateDTO wechatTemplateDto) {
|
public List<WechatTemplateTaskVO> selectWechatTemplateList(WechatTemplateDTO wechatTemplateDto) {
|
||||||
// 查询微信模板信息列表
|
// 查询微信模板信息列表
|
||||||
|
|||||||
@ -26,7 +26,7 @@ public class AgencyTreeVO implements Serializable {
|
|||||||
private String label;
|
private String label;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 节点名称
|
* 节点层级
|
||||||
*/
|
*/
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,31 @@
|
|||||||
|
package com.xinelu.manage.vo.termbank;
|
||||||
|
|
||||||
|
import com.xinelu.manage.domain.termbank.TermBank;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 常用术语(知识库)对象 term_bank
|
||||||
|
*
|
||||||
|
* @author xinelu
|
||||||
|
* @date 2024-06-07
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
public class TermBankVO extends TermBank {
|
||||||
|
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
private List<TermBankVO> children = new ArrayList<TermBankVO>();
|
||||||
|
|
||||||
|
public List<TermBankVO> getChildren() {
|
||||||
|
return children;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChildren(List<TermBankVO> children) {
|
||||||
|
this.children = children;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -180,6 +180,8 @@
|
|||||||
<if test="scriptStatus != null and scriptStatus != ''">
|
<if test="scriptStatus != null and scriptStatus != ''">
|
||||||
and si.script_status = #{scriptStatus}
|
and si.script_status = #{scriptStatus}
|
||||||
</if>
|
</if>
|
||||||
|
<!-- 数据范围过滤 -->
|
||||||
|
${params.dataScope}
|
||||||
</where>
|
</where>
|
||||||
GROUP BY d.id,
|
GROUP BY d.id,
|
||||||
d.department_name,
|
d.department_name,
|
||||||
@ -203,6 +205,8 @@
|
|||||||
'%'
|
'%'
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
<!-- 数据范围过滤 -->
|
||||||
|
${params.dataScope}
|
||||||
</where>
|
</where>
|
||||||
GROUP BY d.id,
|
GROUP BY d.id,
|
||||||
d.department_name,
|
d.department_name,
|
||||||
@ -225,6 +229,8 @@
|
|||||||
<if test="templateSource != null and templateSource != ''">
|
<if test="templateSource != null and templateSource != ''">
|
||||||
and wt.template_source =#{templateSource}
|
and wt.template_source =#{templateSource}
|
||||||
</if>
|
</if>
|
||||||
|
<!-- 数据范围过滤 -->
|
||||||
|
${params.dataScope}
|
||||||
</where>
|
</where>
|
||||||
GROUP BY d.id,
|
GROUP BY d.id,
|
||||||
d.department_name,
|
d.department_name,
|
||||||
@ -246,6 +252,8 @@
|
|||||||
<if test="textMessageStatus != null and textMessageStatus != ''">
|
<if test="textMessageStatus != null and textMessageStatus != ''">
|
||||||
and tm.text_message_status = #{textMessageStatus}
|
and tm.text_message_status = #{textMessageStatus}
|
||||||
</if>
|
</if>
|
||||||
|
<!-- 数据范围过滤 -->
|
||||||
|
${params.dataScope}
|
||||||
</where>
|
</where>
|
||||||
GROUP BY d.id,
|
GROUP BY d.id,
|
||||||
d.department_name,
|
d.department_name,
|
||||||
@ -299,6 +307,8 @@
|
|||||||
<if test="departmentName != null and departmentName != ''">
|
<if test="departmentName != null and departmentName != ''">
|
||||||
and d.department_name like concat('%',#{departmentName},'%')
|
and d.department_name like concat('%',#{departmentName},'%')
|
||||||
</if>
|
</if>
|
||||||
|
<!-- 数据范围过滤 -->
|
||||||
|
${params.dataScope}
|
||||||
</where>
|
</where>
|
||||||
GROUP BY d.id,
|
GROUP BY d.id,
|
||||||
d.department_name,
|
d.department_name,
|
||||||
|
|||||||
@ -55,25 +55,65 @@
|
|||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="operationCode != null and operationCode != ''">
|
<if test="operationCode != null and operationCode != ''">
|
||||||
and operation_code =
|
and operation_code = #{operationCode}
|
||||||
#{operationCode}
|
|
||||||
</if>
|
</if>
|
||||||
<if test="operationInfo != null and operationInfo != ''">
|
<if test="operationInfo != null and operationInfo != ''">
|
||||||
and operation_info =
|
and operation_info = #{operationInfo}
|
||||||
#{operationInfo}
|
|
||||||
</if>
|
</if>
|
||||||
<if test="operationRemark != null and operationRemark != ''">
|
<if test="operationRemark != null and operationRemark != ''">
|
||||||
and operation_remark =
|
and operation_remark = #{operationRemark}
|
||||||
#{operationRemark}
|
|
||||||
</if>
|
</if>
|
||||||
<if test="sort != null ">
|
<if test="sort != null ">
|
||||||
and sort =
|
and sort = #{sort}
|
||||||
#{sort}
|
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by create_time DESC
|
order by create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectOperationList" parameterType="OperationInfo" resultMap="OperationInfoResult">
|
||||||
|
select oi.id,
|
||||||
|
oi.department_id,
|
||||||
|
oi.department_name,
|
||||||
|
oi.operation_name,
|
||||||
|
oi.operation_code,
|
||||||
|
oi.operation_info,
|
||||||
|
oi.operation_remark,
|
||||||
|
oi.sort,
|
||||||
|
oi.create_by,
|
||||||
|
oi.create_time,
|
||||||
|
oi.update_by,
|
||||||
|
oi.update_time
|
||||||
|
from operation_info oi
|
||||||
|
left join department d on d.id = oi.department_id
|
||||||
|
<where>
|
||||||
|
<if test="departmentId != null ">
|
||||||
|
and oi.department_id = #{departmentId}
|
||||||
|
</if>
|
||||||
|
<if test="departmentName != null and departmentName != ''">
|
||||||
|
and oi.department_name like concat('%',#{departmentName},'%')
|
||||||
|
</if>
|
||||||
|
<if test="operationName != null and operationName != ''">
|
||||||
|
and oi.operation_name like concat('%',#{operationName},'%')
|
||||||
|
</if>
|
||||||
|
<if test="operationCode != null and operationCode != ''">
|
||||||
|
and oi.operation_code = #{operationCode}
|
||||||
|
</if>
|
||||||
|
<if test="operationInfo != null and operationInfo != ''">
|
||||||
|
and oi.operation_info = #{operationInfo}
|
||||||
|
</if>
|
||||||
|
<if test="operationRemark != null and operationRemark != ''">
|
||||||
|
and oi.operation_remark = #{operationRemark}
|
||||||
|
</if>
|
||||||
|
<if test="sort != null ">
|
||||||
|
and oi.sort = #{sort}
|
||||||
|
</if>
|
||||||
|
<!-- 数据范围过滤 -->
|
||||||
|
${params.dataScope}
|
||||||
|
</where>
|
||||||
|
order by create_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="selectOperationInfoById" parameterType="Long"
|
<select id="selectOperationInfoById" parameterType="Long"
|
||||||
resultMap="OperationInfoResult">
|
resultMap="OperationInfoResult">
|
||||||
<include refid="selectOperationInfoVo"/>
|
<include refid="selectOperationInfoVo"/>
|
||||||
|
|||||||
@ -97,6 +97,70 @@
|
|||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectQuestionList" parameterType="QuestionInfo" resultMap="QuestionInfoResult">
|
||||||
|
select qi.id,
|
||||||
|
qi.department_id,
|
||||||
|
qi.department_name,
|
||||||
|
qi.disease_type_id,
|
||||||
|
qi.disease_type_name,
|
||||||
|
qi.questionnaire_name,
|
||||||
|
qi.questionnaire_description,
|
||||||
|
qi.answering_method,
|
||||||
|
qi.questionnaire_id,
|
||||||
|
qi.question_count,
|
||||||
|
qi.questionnaire_total_score,
|
||||||
|
qi.questionnaire_status,
|
||||||
|
qi.questionnaire_sort,
|
||||||
|
qi.questionnaire_remark,
|
||||||
|
qi.question_type,
|
||||||
|
qi.create_by,
|
||||||
|
qi.create_time,
|
||||||
|
qi.update_by,
|
||||||
|
qi.update_time
|
||||||
|
from question_info qi
|
||||||
|
left join department dt ON qi.department_id = dt.id
|
||||||
|
<where>
|
||||||
|
<if test="departmentId != null ">
|
||||||
|
and qi.department_id = #{departmentId}
|
||||||
|
</if>
|
||||||
|
<if test="departmentName != null and departmentName != ''">
|
||||||
|
and qi.department_name like concat('%', #{departmentName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="diseaseTypeId != null ">
|
||||||
|
and qi.disease_type_id = #{diseaseTypeId}
|
||||||
|
</if>
|
||||||
|
<if test="diseaseTypeName != null and diseaseTypeName != ''">
|
||||||
|
and qi.disease_type_name like concat('%', #{diseaseTypeName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="questionnaireName != null and questionnaireName != ''">
|
||||||
|
and qi.questionnaire_name like concat('%', #{questionnaireName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="questionnaireDescription != null and questionnaireDescription != ''">
|
||||||
|
and qi.questionnaire_description = #{questionnaireDescription}
|
||||||
|
</if>
|
||||||
|
<if test="answeringMethod != null and answeringMethod != ''">
|
||||||
|
and qi.answering_method = #{answeringMethod}
|
||||||
|
</if>
|
||||||
|
<if test="questionnaireId != null and questionnaireId != ''">
|
||||||
|
and qi.questionnaire_id = #{questionnaireId}
|
||||||
|
</if>
|
||||||
|
<if test="questionCount != null ">
|
||||||
|
and qi.question_count = #{questionCount}
|
||||||
|
</if>
|
||||||
|
<if test="questionnaireTotalScore != null ">
|
||||||
|
and qi.questionnaire_total_score = #{questionnaireTotalScore}
|
||||||
|
</if>
|
||||||
|
<if test="questionnaireStatus != null and questionnaireStatus != ''">
|
||||||
|
and qi.questionnaire_status = #{questionnaireStatus}
|
||||||
|
</if>
|
||||||
|
<if test="questionType != null and questionType != ''">
|
||||||
|
and qi.question_type = #{questionType}
|
||||||
|
</if>
|
||||||
|
<!-- 数据范围过滤 -->
|
||||||
|
${params.dataScope}
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectQuestionInfoById" parameterType="Long"
|
<select id="selectQuestionInfoById" parameterType="Long"
|
||||||
resultMap="QuestionInfoResult">
|
resultMap="QuestionInfoResult">
|
||||||
<include refid="selectQuestionInfoVo"/>
|
<include refid="selectQuestionInfoVo"/>
|
||||||
@ -263,7 +327,8 @@
|
|||||||
dt.department_name,
|
dt.department_name,
|
||||||
dt.department_code,
|
dt.department_code,
|
||||||
count(qi.id) AS countNum,
|
count(qi.id) AS countNum,
|
||||||
(select count(1) from question_info) totalNumber
|
(select count(1) from question_info qi left join department dt on dt.id = qi.department_id <where>
|
||||||
|
${params.dataScope}</where>) totalNumber
|
||||||
from department dt left join question_info qi on dt.id = qi.department_id
|
from department dt left join question_info qi on dt.id = qi.department_id
|
||||||
<where>
|
<where>
|
||||||
<if test="departmentName != null and departmentName != ''">
|
<if test="departmentName != null and departmentName != ''">
|
||||||
@ -275,6 +340,8 @@
|
|||||||
<if test="questionType != null and questionType != ''">
|
<if test="questionType != null and questionType != ''">
|
||||||
and qi.question_type = #{questionType}
|
and qi.question_type = #{questionType}
|
||||||
</if>
|
</if>
|
||||||
|
<!-- 数据范围过滤 -->
|
||||||
|
${params.dataScope}
|
||||||
</where>
|
</where>
|
||||||
GROUP BY dt.id
|
GROUP BY dt.id
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@ -48,70 +48,70 @@
|
|||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectScriptInfoList" parameterType="ScriptInfo" resultMap="ScriptInfoResult">
|
<select id="selectScriptInfoList" parameterType="ScriptInfo" resultMap="ScriptInfoResult">
|
||||||
<include refid="selectScriptInfoVo"/>
|
select si.id,
|
||||||
|
si.department_id,
|
||||||
|
si.department_name,
|
||||||
|
si.disease_type_id,
|
||||||
|
si.disease_type_name,
|
||||||
|
si.common_script_name,
|
||||||
|
si.script_name,
|
||||||
|
si.script_id,
|
||||||
|
si.platform_id,
|
||||||
|
si.script_status,
|
||||||
|
si.script_introduction,
|
||||||
|
si.script_sort,
|
||||||
|
si.script_remark,
|
||||||
|
si.script_file_path,
|
||||||
|
si.create_by,
|
||||||
|
si.create_time,
|
||||||
|
si.update_by,
|
||||||
|
si.update_time
|
||||||
|
from script_info si
|
||||||
|
left join department d on d.id = si.department_id
|
||||||
<where>
|
<where>
|
||||||
<if test="departmentId != null ">
|
<if test="departmentId != null ">
|
||||||
and department_id =
|
and si.department_id =#{departmentId}
|
||||||
#{departmentId}
|
|
||||||
</if>
|
</if>
|
||||||
<if test="departmentName != null and departmentName != ''">
|
<if test="departmentName != null and departmentName != ''">
|
||||||
and department_name like concat('%',
|
and si.department_name like concat('%',#{departmentName}, '%' )
|
||||||
#{departmentName},
|
|
||||||
'%'
|
|
||||||
)
|
|
||||||
</if>
|
</if>
|
||||||
<if test="diseaseTypeId != null ">
|
<if test="diseaseTypeId != null ">
|
||||||
and disease_type_id =
|
and si.disease_type_id =#{diseaseTypeId}
|
||||||
#{diseaseTypeId}
|
|
||||||
</if>
|
</if>
|
||||||
<if test="diseaseTypeName != null and diseaseTypeName != ''">
|
<if test="diseaseTypeName != null and diseaseTypeName != ''">
|
||||||
and disease_type_name like concat('%',
|
and si.disease_type_name like concat('%', #{diseaseTypeName},'%')
|
||||||
#{diseaseTypeName},
|
|
||||||
'%'
|
|
||||||
)
|
|
||||||
</if>
|
</if>
|
||||||
<if test="commonScriptName != null and commonScriptName != ''">
|
<if test="commonScriptName != null and commonScriptName != ''">
|
||||||
and common_script_name like concat('%',
|
and si.common_script_name like concat('%',#{commonScriptName},'%' )
|
||||||
#{commonScriptName},
|
|
||||||
'%'
|
|
||||||
)
|
|
||||||
</if>
|
</if>
|
||||||
<if test="scriptName != null and scriptName != ''">
|
<if test="scriptName != null and scriptName != ''">
|
||||||
and script_name like concat('%',
|
and si.script_name like concat('%', #{scriptName},'%' )
|
||||||
#{scriptName},
|
|
||||||
'%'
|
|
||||||
)
|
|
||||||
</if>
|
</if>
|
||||||
<if test="scriptId != null and scriptId != ''">
|
<if test="scriptId != null and scriptId != ''">
|
||||||
and script_id =
|
and si.script_id =#{scriptId}
|
||||||
#{scriptId}
|
|
||||||
</if>
|
</if>
|
||||||
<if test="platformId != null and platformId != ''">
|
<if test="platformId != null and platformId != ''">
|
||||||
and platform_id =
|
and si.platform_id =#{platformId}
|
||||||
#{platformId}
|
|
||||||
</if>
|
</if>
|
||||||
<if test="scriptStatus != null and scriptStatus != ''">
|
<if test="scriptStatus != null and scriptStatus != ''">
|
||||||
and script_status =
|
and si.script_status =#{scriptStatus}
|
||||||
#{scriptStatus}
|
|
||||||
</if>
|
</if>
|
||||||
<if test="scriptIntroduction != null and scriptIntroduction != ''">
|
<if test="scriptIntroduction != null and scriptIntroduction != ''">
|
||||||
and script_introduction =
|
and si.script_introduction =#{scriptIntroduction}
|
||||||
#{scriptIntroduction}
|
|
||||||
</if>
|
</if>
|
||||||
<if test="scriptSort != null ">
|
<if test="scriptSort != null ">
|
||||||
and script_sort =
|
and si.script_sort =#{scriptSort}
|
||||||
#{scriptSort}
|
|
||||||
</if>
|
</if>
|
||||||
<if test="scriptRemark != null and scriptRemark != ''">
|
<if test="scriptRemark != null and scriptRemark != ''">
|
||||||
and script_remark =
|
and si.script_remark =#{scriptRemark}
|
||||||
#{scriptRemark}
|
|
||||||
</if>
|
</if>
|
||||||
<if test="scriptFilePath != null and scriptFilePath != ''">
|
<if test="scriptFilePath != null and scriptFilePath != ''">
|
||||||
and script_file_path =
|
and si.script_file_path =#{scriptFilePath}
|
||||||
#{scriptFilePath}
|
|
||||||
</if>
|
</if>
|
||||||
|
<!-- 数据范围过滤 -->
|
||||||
|
${params.dataScope}
|
||||||
</where>
|
</where>
|
||||||
order by create_time DESC
|
order by si.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectScriptInfoById" parameterType="Long"
|
<select id="selectScriptInfoById" parameterType="Long"
|
||||||
@ -219,51 +219,51 @@
|
|||||||
update script_info
|
update script_info
|
||||||
<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>
|
||||||
disease_type_id = #{diseaseTypeId},
|
disease_type_id = #{diseaseTypeId},
|
||||||
disease_type_name = #{diseaseTypeName},
|
disease_type_name = #{diseaseTypeName},
|
||||||
<if test="commonScriptName != null">common_script_name =
|
<if test="commonScriptName != null">common_script_name =
|
||||||
#{commonScriptName},
|
#{commonScriptName},
|
||||||
</if>
|
</if>
|
||||||
<if test="scriptName != null">script_name =
|
<if test="scriptName != null">script_name =
|
||||||
#{scriptName},
|
#{scriptName},
|
||||||
</if>
|
</if>
|
||||||
<if test="scriptId != null">script_id =
|
<if test="scriptId != null">script_id =
|
||||||
#{scriptId},
|
#{scriptId},
|
||||||
</if>
|
</if>
|
||||||
<if test="platformId != null">platform_id =
|
<if test="platformId != null">platform_id =
|
||||||
#{platformId},
|
#{platformId},
|
||||||
</if>
|
</if>
|
||||||
<if test="scriptStatus != null">script_status =
|
<if test="scriptStatus != null">script_status =
|
||||||
#{scriptStatus},
|
#{scriptStatus},
|
||||||
</if>
|
</if>
|
||||||
<if test="scriptIntroduction != null">script_introduction =
|
<if test="scriptIntroduction != null">script_introduction =
|
||||||
#{scriptIntroduction},
|
#{scriptIntroduction},
|
||||||
</if>
|
</if>
|
||||||
<if test="scriptSort != null">script_sort =
|
<if test="scriptSort != null">script_sort =
|
||||||
#{scriptSort},
|
#{scriptSort},
|
||||||
</if>
|
</if>
|
||||||
<if test="scriptRemark != null">script_remark =
|
<if test="scriptRemark != null">script_remark =
|
||||||
#{scriptRemark},
|
#{scriptRemark},
|
||||||
</if>
|
</if>
|
||||||
<if test="scriptFilePath != null"> script_file_path=
|
<if test="scriptFilePath != null">script_file_path=
|
||||||
#{scriptFilePath},
|
#{scriptFilePath},
|
||||||
</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}
|
||||||
|
|||||||
@ -161,55 +161,46 @@
|
|||||||
|
|
||||||
<select id="selectServicePackageLists" resultType="com.xinelu.manage.vo.servicepackage.ServicePackageVO"
|
<select id="selectServicePackageLists" resultType="com.xinelu.manage.vo.servicepackage.ServicePackageVO"
|
||||||
parameterType="com.xinelu.manage.domain.servicepackage.ServicePackage">
|
parameterType="com.xinelu.manage.domain.servicepackage.ServicePackage">
|
||||||
select id,
|
select
|
||||||
disease_type_id,
|
sp.id,
|
||||||
disease_type_name,
|
sp.disease_type_id,
|
||||||
package_name,
|
sp.disease_type_name,
|
||||||
package_introduction,
|
sp.package_name,
|
||||||
package_version,
|
sp.package_introduction,
|
||||||
package_term,
|
sp.package_version,
|
||||||
package_term_unit,
|
sp.package_term,
|
||||||
package_price,
|
sp.package_term_unit,
|
||||||
package_remark,
|
sp.package_price,
|
||||||
whether_release
|
sp.package_remark,
|
||||||
from service_package
|
sp.whether_release
|
||||||
|
from service_package sp
|
||||||
|
left join department d on d.id = sp.department_id
|
||||||
<where>
|
<where>
|
||||||
<if test="departmentId != null ">
|
<if test="departmentId != null ">
|
||||||
and department_id =
|
and sp.department_id = #{departmentId}
|
||||||
#{departmentId}
|
|
||||||
</if>
|
</if>
|
||||||
<if test="diseaseTypeId != null ">
|
<if test="diseaseTypeId != null ">
|
||||||
and disease_type_id =
|
and sp.disease_type_id = #{diseaseTypeId}
|
||||||
#{diseaseTypeId}
|
|
||||||
</if>
|
</if>
|
||||||
<if test="diseaseTypeName != null and diseaseTypeName != ''">
|
<if test="diseaseTypeName != null and diseaseTypeName != ''">
|
||||||
and disease_type_name like concat('%',
|
and sp.disease_type_name like concat('%',#{diseaseTypeName},'%')
|
||||||
#{diseaseTypeName},
|
|
||||||
'%'
|
|
||||||
)
|
|
||||||
</if>
|
</if>
|
||||||
<if test="packageName != null and packageName != ''">
|
<if test="packageName != null and packageName != ''">
|
||||||
and package_name like concat('%',
|
and sp.package_name like concat('%',#{packageName},'%')
|
||||||
#{packageName},
|
|
||||||
'%'
|
|
||||||
)
|
|
||||||
</if>
|
</if>
|
||||||
<if test="packageVersion != null and packageVersion != ''">
|
<if test="packageVersion != null and packageVersion != ''">
|
||||||
and package_version like concat('%',
|
and sp.package_version like concat('%',#{packageVersion},'%')
|
||||||
#{packageVersion},
|
|
||||||
'%'
|
|
||||||
)
|
|
||||||
</if>
|
</if>
|
||||||
<if test="packagePrice != null ">
|
<if test="packagePrice != null ">
|
||||||
and package_price =
|
and sp.package_price = #{packagePrice}
|
||||||
#{packagePrice}
|
|
||||||
</if>
|
</if>
|
||||||
<if test="whetherRelease != null ">
|
<if test="whetherRelease != null ">
|
||||||
and whether_release =
|
and sp.whether_release = #{whetherRelease}
|
||||||
#{whetherRelease}
|
|
||||||
</if>
|
</if>
|
||||||
|
<!-- 数据范围过滤 -->
|
||||||
|
${params.dataScope}
|
||||||
</where>
|
</where>
|
||||||
order by create_time DESC
|
order by sp.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
<select id="selectServicePackageVoListById"
|
<select id="selectServicePackageVoListById"
|
||||||
resultType="com.xinelu.manage.vo.servicepackagecontent.ServicePackageContentVO">
|
resultType="com.xinelu.manage.vo.servicepackagecontent.ServicePackageContentVO">
|
||||||
|
|||||||
@ -0,0 +1,188 @@
|
|||||||
|
<?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.termbank.TermBankMapper">
|
||||||
|
|
||||||
|
<resultMap type="TermBank" id="TermBankResult">
|
||||||
|
<result property="id" column="id"/>
|
||||||
|
<result property="termCode" column="term_code"/>
|
||||||
|
<result property="termName" column="term_name"/>
|
||||||
|
<result property="termContent" column="term_content"/>
|
||||||
|
<result property="parentTermCode" column="parent_term_code"/>
|
||||||
|
<result property="termLevel" column="term_level"/>
|
||||||
|
<result property="termSort" column="term_sort"/>
|
||||||
|
<result property="termRemark" column="term_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="selectTermBankVo">
|
||||||
|
select id,
|
||||||
|
term_code,
|
||||||
|
term_name,
|
||||||
|
term_content,
|
||||||
|
parent_term_code,
|
||||||
|
term_level,
|
||||||
|
term_sort,
|
||||||
|
term_remark,
|
||||||
|
create_by,
|
||||||
|
create_time,
|
||||||
|
update_by,
|
||||||
|
update_time
|
||||||
|
from term_bank
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectTermBankList" parameterType="TermBank" resultMap="TermBankResult">
|
||||||
|
<include refid="selectTermBankVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="termCode != null and termCode != ''">
|
||||||
|
and term_code = #{termCode}
|
||||||
|
</if>
|
||||||
|
<if test="termName != null and termName != ''">
|
||||||
|
and term_name like concat('%', #{termName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="termContent != null and termContent != ''">
|
||||||
|
and term_content like concat('%', #{termContent}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="parentTermCode != null and parentTermCode != ''">
|
||||||
|
and parent_term_code = #{parentTermCode}
|
||||||
|
</if>
|
||||||
|
<if test="termLevel != null ">
|
||||||
|
and term_level = #{termLevel}
|
||||||
|
</if>
|
||||||
|
<if test="termSort != null ">
|
||||||
|
and term_sort = #{termSort}
|
||||||
|
</if>
|
||||||
|
<if test="termRemark != null and termRemark != ''">
|
||||||
|
and term_remark = #{termRemark}
|
||||||
|
</if>
|
||||||
|
order by term_sort
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectTermBankTree" resultType="com.xinelu.manage.vo.termbank.TermBankVO">
|
||||||
|
select id, term_code, term_content, parent_term_code, term_level, term_sort
|
||||||
|
from term_bank
|
||||||
|
<where>
|
||||||
|
<if test="level != null ">
|
||||||
|
term_level <= #{level}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by term_level,term_sort
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectTermBankById" parameterType="Long"
|
||||||
|
resultMap="TermBankResult">
|
||||||
|
<include refid="selectTermBankVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertTermBank" parameterType="TermBank" useGeneratedKeys="true"
|
||||||
|
keyProperty="id">
|
||||||
|
insert into term_bank
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="termCode != null and termCode != ''">term_code,
|
||||||
|
</if>
|
||||||
|
<if test="termName != null">term_name,
|
||||||
|
</if>
|
||||||
|
<if test="termContent != null">term_content,
|
||||||
|
</if>
|
||||||
|
<if test="parentTermCode != null">parent_term_code,
|
||||||
|
</if>
|
||||||
|
<if test="termLevel != null">term_level,
|
||||||
|
</if>
|
||||||
|
<if test="termSort != null">term_sort,
|
||||||
|
</if>
|
||||||
|
<if test="termRemark != null">term_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="termCode != null and termCode != ''">#{termCode},
|
||||||
|
</if>
|
||||||
|
<if test="termName != null">#{termName},
|
||||||
|
</if>
|
||||||
|
<if test="termContent != null">#{termContent},
|
||||||
|
</if>
|
||||||
|
<if test="parentTermCode != null">#{parentTermCode},
|
||||||
|
</if>
|
||||||
|
<if test="termLevel != null">#{termLevel},
|
||||||
|
</if>
|
||||||
|
<if test="termSort != null">#{termSort},
|
||||||
|
</if>
|
||||||
|
<if test="termRemark != null">#{termRemark},
|
||||||
|
</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="updateTermBank" parameterType="TermBank">
|
||||||
|
update term_bank
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="termCode != null and termCode != ''">term_code =
|
||||||
|
#{termCode},
|
||||||
|
</if>
|
||||||
|
<if test="termName != null">term_name =
|
||||||
|
#{termName},
|
||||||
|
</if>
|
||||||
|
<if test="termContent != null">term_content =
|
||||||
|
#{termContent},
|
||||||
|
</if>
|
||||||
|
<if test="parentTermCode != null">parent_term_code =
|
||||||
|
#{parentTermCode},
|
||||||
|
</if>
|
||||||
|
<if test="termLevel != null">term_level =
|
||||||
|
#{termLevel},
|
||||||
|
</if>
|
||||||
|
<if test="termSort != null">term_sort =
|
||||||
|
#{termSort},
|
||||||
|
</if>
|
||||||
|
<if test="termRemark != null">term_remark =
|
||||||
|
#{termRemark},
|
||||||
|
</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="deleteTermBankById" parameterType="Long">
|
||||||
|
delete
|
||||||
|
from term_bank
|
||||||
|
where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteTermBankByIds" parameterType="String">
|
||||||
|
delete from term_bank where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
@ -113,8 +113,8 @@
|
|||||||
tmst.suit_task_type_id,
|
tmst.suit_task_type_id,
|
||||||
tmst.suit_task_type_name
|
tmst.suit_task_type_name
|
||||||
from text_message tm
|
from text_message tm
|
||||||
left join text_message_suit_task tmst on
|
left join text_message_suit_task tmst on tm.id = tmst.message_id
|
||||||
tm.id = tmst.message_id
|
left join department d on d.id = tm.department_id
|
||||||
<where>
|
<where>
|
||||||
<if test="departmentId != null">
|
<if test="departmentId != null">
|
||||||
AND tm.department_id =
|
AND tm.department_id =
|
||||||
@ -136,6 +136,8 @@
|
|||||||
AND tm.text_message_status =
|
AND tm.text_message_status =
|
||||||
#{textMessageStatus}
|
#{textMessageStatus}
|
||||||
</if>
|
</if>
|
||||||
|
<!-- 数据范围过滤 -->
|
||||||
|
${params.dataScope}
|
||||||
</where>
|
</where>
|
||||||
order by tm.create_time DESC ,tmst.create_time DESC
|
order by tm.create_time DESC ,tmst.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@ -130,6 +130,7 @@
|
|||||||
wtst.suit_task_type_name
|
wtst.suit_task_type_name
|
||||||
from wechat_template wt
|
from wechat_template wt
|
||||||
left join wechat_template_suit_task wtst on wt.id = wtst.wechat_template_id
|
left join wechat_template_suit_task wtst on wt.id = wtst.wechat_template_id
|
||||||
|
left join department d on d.id = wt.department_id
|
||||||
<where>
|
<where>
|
||||||
<if test="departmentId != null ">
|
<if test="departmentId != null ">
|
||||||
and wt.department_id =
|
and wt.department_id =
|
||||||
@ -151,6 +152,8 @@
|
|||||||
and wt.template_source =
|
and wt.template_source =
|
||||||
#{templateSource}
|
#{templateSource}
|
||||||
</if>
|
</if>
|
||||||
|
<!-- 数据范围过滤 -->
|
||||||
|
${params.dataScope}
|
||||||
</where>
|
</where>
|
||||||
order by wt.create_time DESC,wtst.create_time DESC
|
order by wt.create_time DESC,wtst.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user