liusheng
2024-01-15 a0bcee3aa22b79f592c44cdb3dcdbd681490f265
代码提交
已添加23个文件
已修改73个文件
3534 ■■■■■ 文件已修改
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/HeLibraryController.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/HeTaskController.java 113 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrLibaTargetController.java 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrLibaTemplateController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrLibaTemplateTargetController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatHetaskRelevanceController.java 98 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTitleCategoryController.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTitleController.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTopicCategoryController.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTopicController.java 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/TempDetpRelevanceController.java 98 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/tools/DingTalkController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/pom.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/enums/SendTypeEnum.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/common/SendService.java 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/HeCategoryVO.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/HeLibrary.java 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/HeLibraryTag.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/HeLibraryVO.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/HeTask.java 208 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/HeTaskVO.java 217 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaExtemplate.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaScript.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaScriptAssort.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaScriptAssortVO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaScriptVO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTarget.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTargetAssort.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTargetAssortVO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTargetTagVO.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTargetVO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTemplate.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateAssort.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateAssortVO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateScriptVO.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateTarget.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateVO.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/PatArchive.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/PatArchiveReq.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/PatArchiveVO.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/PatHetaskRelevance.java 105 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/PatHetaskRelevanceVO.java 109 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/SendMagParam.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/SvyCategoryVO.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/SvyLibTitle.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/SvyLibTitleCategoryVO.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/SvyLibTitleReq.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/SvyLibTopic.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/SvyLibTopicCategoryVO.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/TempDetpRelevance.java 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/mapper/HeTaskMapper.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/mapper/IvrLibaTargetMapper.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/mapper/IvrLibaTemplateTargetMapper.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/mapper/PatHetaskRelevanceMapper.java 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/mapper/TempDetpRelevanceMapper.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/IHeLibraryService.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/IHeTaskService.java 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/IIvrLibaTargetService.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/IPatHetaskRelevanceService.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/ITempDetpRelevanceService.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/HeLibraryAssortServiceImpl.java 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/HeLibraryServiceImpl.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/HeTaskServiceImpl.java 271 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/IvrLibaExtemplateCategoryServiceImpl.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/IvrLibaScriptAssortServiceImpl.java 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/IvrLibaTargetAssortServiceImpl.java 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/IvrLibaTargetServiceImpl.java 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/IvrLibaTemplateAssortServiceImpl.java 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/IvrLibaTemplateServiceImpl.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/IvrLibaTemplateTargetServiceImpl.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/PatHetaskRelevanceServiceImpl.java 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/PersonVoiceServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/SvyLibTitleCategoryServiceImpl.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/SvyLibTitleServiceImpl.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/SvyLibTopicCategoryServiceImpl.java 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/SvyLibTopicServiceImpl.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/TempDetpRelevanceServiceImpl.java 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/HeLibraryMapper.xml 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/HeLibraryTagMapper.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/HeTaskMapper.xml 230 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrLibaScriptMapper.xml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrLibaTargetMapper.xml 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateAssortMapper.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateMapper.xml 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateScriptMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateTargetMapper.xml 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/PatHetaskRelevanceMapper.xml 139 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/SvyLibTitleMapper.xml 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/SvyLibTopicCategoryMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/SvyLibTopicMapper.xml 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/SvyLibTopicoptionMapper.xml 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/TempDetpRelevanceMapper.xml 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/HeLibraryController.java
@@ -97,9 +97,10 @@
    /**
     * åˆ é™¤å®£æ•™èµ„料库
     */
    @ApiOperation("删除宣教资料库")
    @PreAuthorize("@ss.hasPermi('system:library:remove')")
    @Log(title = "宣教资料库", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    @GetMapping("/remove/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids) {
        return toAjax(heLibraryService.deleteHeLibraryByIds(ids));
    }
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/HeTaskController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,113 @@
package com.ruoyi.web.controller.smartor;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.smartor.domain.HeTask;
import com.smartor.domain.HeTaskVO;
import com.smartor.domain.PatArchiveReq;
import com.smartor.domain.PatHetaskRelevanceVO;
import com.smartor.service.IHeTaskService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
 * å®£æ•™ä»»åŠ¡Controller
 *
 * @author ruoyi
 * @date 2024-01-07
 */
@Api(description = "宣教任务")
@RestController
@RequestMapping("/smartor/hetask")
public class HeTaskController extends BaseController {
    @Autowired
    private IHeTaskService heTaskService;
    /**
     * æŸ¥è¯¢å®£æ•™ä»»åŠ¡åˆ—è¡¨
     */
    @ApiOperation("查询患者宣教任务列表")
    @PreAuthorize("@ss.hasPermi('system:task:list')")
    @PostMapping("/getPatHeTaskList")
    public TableDataInfo getPatHeTaskList(@RequestBody PatHetaskRelevanceVO patHetaskRelevanceVO) {
        startPage();
        List<PatHetaskRelevanceVO> list = heTaskService.selectHeTaskList(patHetaskRelevanceVO);
        return getDataTable(list);
    }
//    /**
//     * å¯¼å‡ºå®£æ•™ä»»åŠ¡åˆ—è¡¨
//     */
//    @PreAuthorize("@ss.hasPermi('system:task:export')")
//    @Log(title = "宣教任务", businessType = BusinessType.EXPORT)
//    @PostMapping("/export")
//    public void export(HttpServletResponse response, HeTask heTask) {
//        List<HeTask> list = heTaskService.selectHeTaskList(heTask);
//        ExcelUtil<HeTask> util = new ExcelUtil<HeTask>(HeTask.class);
//        util.exportExcel(response, list, "宣教任务数据");
//    }
    /**
     * èŽ·å–å®£æ•™ä»»åŠ¡è¯¦ç»†ä¿¡æ¯
     */
    @ApiOperation("获取宣教任务详细信息")
    @PreAuthorize("@ss.hasPermi('system:task:query')")
    @GetMapping(value = "/getInfo/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        return success(heTaskService.selectHeTaskById(id));
    }
    /**
     * æ–°å¢žå®£æ•™ä»»åŠ¡
     */
    @ApiOperation("新增宣教任务(发送任务)")
    @PreAuthorize("@ss.hasPermi('system:task:add')")
    @Log(title = "宣教任务", businessType = BusinessType.INSERT)
    @PostMapping("/add")
    public AjaxResult add(@RequestBody HeTaskVO heTaskVO) {
        return toAjax(heTaskService.insertHeTask(heTaskVO));
    }
    /**
     * ä¿®æ”¹å®£æ•™ä»»åŠ¡
     */
    @PreAuthorize("@ss.hasPermi('system:task:edit')")
    @Log(title = "宣教任务", businessType = BusinessType.UPDATE)
    @PostMapping("/edit")
    public AjaxResult edit(@RequestBody HeTask heTask) {
        return toAjax(heTaskService.updateHeTask(heTask));
    }
    /**
     * åˆ é™¤å®£æ•™ä»»åŠ¡
     */
    @ApiOperation("删除宣教任务")
    @PreAuthorize("@ss.hasPermi('system:task:remove')")
    @Log(title = "宣教任务", businessType = BusinessType.DELETE)
    @GetMapping("/remove/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids) {
        return toAjax(heTaskService.deleteHeTaskByIds(ids));
    }
    /**
     * èŽ·å–æ‚£è€…ä¿¡æ¯
     */
    @ApiOperation("获取患者信息")
    @PostMapping("/getPatientInfo")
    public TableDataInfo getPatientInfo(@RequestBody PatArchiveReq patArchiveReq) {
        return getDataTable(heTaskService.getPatientInfo(patArchiveReq));
    }
}
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrLibaTargetController.java
@@ -10,7 +10,6 @@
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.smartor.domain.IvrLibaTarget;
import com.smartor.domain.IvrLibaTargetAssort;
import com.smartor.domain.IvrLibaTargetVO;
import com.smartor.service.IIvrLibaTargetService;
import io.swagger.annotations.Api;
@@ -61,13 +60,13 @@
    }
    /**
     * èŽ·å–æŒ‡æ ‡ä¿¡æ¯é€šè¿‡targetID
     * èŽ·å–æŒ‡æ ‡ä¿¡æ¯é€šè¿‡id
     */
    @ApiOperation("获取指标信息通过targetID")
    @ApiOperation("获取指标信息通过id")
    @PreAuthorize("@ss.hasPermi('system:target:query')")
    @GetMapping(value = "/getInfo/{targetID}")
    public AjaxResult getInfo(@PathVariable("targetID") Long targetID) {
        return success(ivrLibaTargetService.selectIvrLibaTargetByTargetID(targetID));
    @GetMapping(value = "/getInfo/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        return success(ivrLibaTargetService.selectIvrLibaTargetByTargetID(id));
    }
    /**
@@ -98,9 +97,9 @@
    @ApiOperation("删除指标")
    @PreAuthorize("@ss.hasPermi('system:target:remove')")
    @Log(title = "指标选项库", businessType = BusinessType.DELETE)
    @GetMapping("/remove/{targetIDs}")
    public AjaxResult remove(@PathVariable Long[] targetIDs) {
        return toAjax(ivrLibaTargetService.deleteIvrLibaTargetByTargetIDs(targetIDs));
    @GetMapping("/remove/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids) {
        return toAjax(ivrLibaTargetService.deleteIvrLibaTargetByTargetIDs(ids));
    }
    /**
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrLibaTemplateController.java
@@ -119,7 +119,7 @@
     */
    @ApiOperation("查询模板详情根据条件")
    @PostMapping("/selectInfoByCondition")
    public AjaxResult selectInfoByCondition(IvrLibaTemplateVO ivrLibaTemplateVO) {
    public AjaxResult selectInfoByCondition(@RequestBody IvrLibaTemplateVO ivrLibaTemplateVO) {
        if (ObjectUtils.isEmpty(ivrLibaTemplateVO)) {
            throw new BaseException("查询模板详情入参为空,请检查入参");
        }
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrLibaTemplateTargetController.java
@@ -60,9 +60,9 @@
     */
    @ApiOperation("获取模版问题指标库详细信息")
    @PreAuthorize("@ss.hasPermi('system:target:query')")
    @GetMapping(value = "/getInfo/{ID}")
    public AjaxResult getInfo(@PathVariable("ID") Long ID) {
        return success(ivrLibaTemplateTargetService.selectIvrLibaTemplateTargetByID(ID));
    @GetMapping(value = "/getInfo/{id}")
    public AjaxResult getInfo(@PathVariable("ID") Long id) {
        return success(ivrLibaTemplateTargetService.selectIvrLibaTemplateTargetByID(id));
    }
    /**
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatHetaskRelevanceController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,98 @@
package com.ruoyi.web.controller.smartor;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.smartor.domain.PatHetaskRelevance;
import com.smartor.service.IPatHetaskRelevanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
 * æ‚£è€…与宣教任务关联Controller
 *
 * @author ruoyi
 * @date 2024-01-07
 */
@RestController
@RequestMapping("/smartor/pathetaskrelevance")
public class PatHetaskRelevanceController extends BaseController
{
    @Autowired
    private IPatHetaskRelevanceService patHetaskRelevanceService;
    /**
     * æŸ¥è¯¢æ‚£è€…与宣教任务关联列表
     */
    @PreAuthorize("@ss.hasPermi('system:relevance:list')")
    @GetMapping("/list")
    public TableDataInfo list(PatHetaskRelevance patHetaskRelevance)
    {
        startPage();
        List<PatHetaskRelevance> list = patHetaskRelevanceService.selectPatHetaskRelevanceList(patHetaskRelevance);
        return getDataTable(list);
    }
    /**
     * å¯¼å‡ºæ‚£è€…与宣教任务关联列表
     */
    @PreAuthorize("@ss.hasPermi('system:relevance:export')")
    @Log(title = "患者与宣教任务关联", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, PatHetaskRelevance patHetaskRelevance)
    {
        List<PatHetaskRelevance> list = patHetaskRelevanceService.selectPatHetaskRelevanceList(patHetaskRelevance);
        ExcelUtil<PatHetaskRelevance> util = new ExcelUtil<PatHetaskRelevance>(PatHetaskRelevance.class);
        util.exportExcel(response, list, "患者与宣教任务关联数据");
    }
    /**
     * èŽ·å–æ‚£è€…ä¸Žå®£æ•™ä»»åŠ¡å…³è”è¯¦ç»†ä¿¡æ¯
     */
    @PreAuthorize("@ss.hasPermi('system:relevance:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(patHetaskRelevanceService.selectPatHetaskRelevanceById(id));
    }
    /**
     * æ–°å¢žæ‚£è€…与宣教任务关联
     */
    @PreAuthorize("@ss.hasPermi('system:relevance:add')")
    @Log(title = "患者与宣教任务关联", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody PatHetaskRelevance patHetaskRelevance)
    {
        return toAjax(patHetaskRelevanceService.insertPatHetaskRelevance(patHetaskRelevance));
    }
    /**
     * ä¿®æ”¹æ‚£è€…与宣教任务关联
     */
    @PreAuthorize("@ss.hasPermi('system:relevance:edit')")
    @Log(title = "患者与宣教任务关联", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody PatHetaskRelevance patHetaskRelevance)
    {
        return toAjax(patHetaskRelevanceService.updatePatHetaskRelevance(patHetaskRelevance));
    }
    /**
     * åˆ é™¤æ‚£è€…与宣教任务关联
     */
    @PreAuthorize("@ss.hasPermi('system:relevance:remove')")
    @Log(title = "患者与宣教任务关联", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(patHetaskRelevanceService.deletePatHetaskRelevanceByIds(ids));
    }
}
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTitleCategoryController.java
@@ -34,6 +34,7 @@
    /**
     * æŸ¥è¯¢é—®å·æ¨¡æ¿åˆ†ç±»åˆ—表
     */
    @ApiOperation("查询问卷模板分类列表")
    @PreAuthorize("@ss.hasPermi('smartor:category:list')")
    @PostMapping("/list")
    public TableDataInfo list(@RequestBody SvyLibTitleCategory svyLibTitleCategory) {
@@ -57,25 +58,28 @@
    /**
     * èŽ·å–é—®å·æ¨¡æ¿åˆ†ç±»è¯¦ç»†ä¿¡æ¯
     */
    @ApiOperation("获取问卷模板分类详细信息")
    @PreAuthorize("@ss.hasPermi('smartor:category:query')")
    @GetMapping(value = "/getInfo/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        return success(svyLibTitleCategoryService.selectSvyLibTitleCategoryById(id));
    }
    /**
     * æ–°å¢žé—®å·æ¨¡æ¿åˆ†ç±»
     */
    @PreAuthorize("@ss.hasPermi('smartor:category:add')")
    @Log(title = "问卷模板分类", businessType = BusinessType.INSERT)
    @PostMapping("/add")
    public AjaxResult add(@RequestBody SvyLibTitleCategory svyLibTitleCategory) {
        return toAjax(svyLibTitleCategoryService.insertSvyLibTitleCategory(svyLibTitleCategory));
    }
//    /**
//     * æ–°å¢žé—®å·æ¨¡æ¿åˆ†ç±»
//     */
//    @ApiOperation("新增问卷模板分类")
//    @PreAuthorize("@ss.hasPermi('smartor:category:add')")
//    @Log(title = "问卷模板分类", businessType = BusinessType.INSERT)
//    @PostMapping("/add")
//    public AjaxResult add(@RequestBody SvyLibTitleCategory svyLibTitleCategory) {
//        return toAjax(svyLibTitleCategoryService.insertSvyLibTitleCategory(svyLibTitleCategory));
//    }
    /**
     * ä¿®æ”¹é—®å·æ¨¡æ¿åˆ†ç±»
     */
    @ApiOperation("修改问卷模板分类")
    @PreAuthorize("@ss.hasPermi('smartor:category:edit')")
    @Log(title = "问卷模板分类", businessType = BusinessType.UPDATE)
    @PostMapping("/edit")
@@ -86,6 +90,7 @@
    /**
     * åˆ é™¤é—®å·æ¨¡æ¿åˆ†ç±»
     */
    @ApiOperation("删除问卷模板分类")
    @PreAuthorize("@ss.hasPermi('smartor:category:remove')")
    @Log(title = "问卷模板分类", businessType = BusinessType.DELETE)
    @GetMapping("/remove/{ids}")
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTitleController.java
@@ -36,7 +36,7 @@
    /**
     * æŸ¥è¯¢é—®å·åˆ—表
     */
    @ApiOperation("查询问卷列表")
    @ApiOperation("查询问卷列表详情")
    @PostMapping("/selectSvyLibTitlelist")
    public TableDataInfo selectSvyLibTitlelist(@RequestBody SvyLibTitleReq svyLibTitleReq) {
        startPage();
@@ -44,16 +44,16 @@
        return getDataTable(list);
    }
    /**
     * èŽ·å–é—®å·è¯¦ç»†ä¿¡æ¯
     */
    @ApiOperation("获取问卷详细信息")
    @PreAuthorize("@ss.hasPermi('smartor:svytitle:query')")
    @GetMapping(value = "/{svyid}")
    public AjaxResult getInfo(@PathVariable("svyid") Long svyid) {
        return success(svyLibTitleService.selectSvyLibTitleBySvyid(svyid));
    }
//
//    /**
//     * èŽ·å–é—®å·è¯¦ç»†ä¿¡æ¯(单表)
//     */
//    @ApiOperation("获取问卷详细信息")
//    @PreAuthorize("@ss.hasPermi('smartor:svytitle:query')")
//    @GetMapping(value = "/{svyid}")
//    public AjaxResult getInfo(@PathVariable("svyid") Long svyid) {
//        return success(svyLibTitleService.selectSvyLibTitleBySvyid(svyid));
//    }
    /**
     * æ–°å¢žé—®å·
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTopicCategoryController.java
@@ -34,6 +34,7 @@
    /**
     * æŸ¥è¯¢é—®å·é¢˜ç›®åˆ†ç±»åˆ—表
     */
    @ApiOperation("查询问卷题目分类列表")
    @PreAuthorize("@ss.hasPermi('smartor:category:list')")
    @PostMapping("/list")
    public TableDataInfo list(@RequestBody SvyLibTopicCategory svyLibTopicCategory) {
@@ -57,21 +58,22 @@
    /**
     * èŽ·å–é—®å·é¢˜ç›®åˆ†ç±»è¯¦ç»†ä¿¡æ¯
     */
    @ApiOperation("获取问卷题目分类详细信息")
    @PreAuthorize("@ss.hasPermi('smartor:category:query')")
    @GetMapping(value = "/getInfo/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        return success(svyLibTopicCategoryService.selectSvyLibTopicCategoryById(id));
    }
    /**
     * æ–°å¢žé—®å·é¢˜ç›®åˆ†ç±»
     */
    @PreAuthorize("@ss.hasPermi('smartor:category:add')")
    @Log(title = "问卷题目分类", businessType = BusinessType.INSERT)
    @PostMapping("/add")
    public AjaxResult add(@RequestBody SvyLibTopicCategory svyLibTopicCategory) {
        return toAjax(svyLibTopicCategoryService.insertSvyLibTopicCategory(svyLibTopicCategory));
    }
//    /**
//     * æ–°å¢žé—®å·é¢˜ç›®åˆ†ç±»
//     */
//    @PreAuthorize("@ss.hasPermi('smartor:category:add')")
//    @Log(title = "问卷题目分类", businessType = BusinessType.INSERT)
//    @PostMapping("/add")
//    public AjaxResult add(@RequestBody SvyLibTopicCategory svyLibTopicCategory) {
//        return toAjax(svyLibTopicCategoryService.insertSvyLibTopicCategory(svyLibTopicCategory));
//    }
    /**
     * ä¿®æ”¹é—®å·é¢˜ç›®åˆ†ç±»
@@ -86,6 +88,7 @@
    /**
     * åˆ é™¤é—®å·é¢˜ç›®åˆ†ç±»
     */
    @ApiOperation("删除问卷题目分类")
    @PreAuthorize("@ss.hasPermi('smartor:category:remove')")
    @Log(title = "问卷题目分类", businessType = BusinessType.DELETE)
    @GetMapping("/remove/{ids}")
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTopicController.java
@@ -6,6 +6,7 @@
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.exception.base.BaseException;
import com.ruoyi.common.utils.PageUtils;
import com.smartor.domain.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -49,7 +50,7 @@
    @PreAuthorize("@ss.hasPermi('smartor:svytopic:list')")
    @PostMapping("/list")
    public TableDataInfo list(@RequestBody SvyLibTopic svyLibTopic) {
        startPage();
        PageUtils.startPageByPost(svyLibTopic.getPageNum(), svyLibTopic.getPageSize());
        List<SvyLibTopic> list = svyLibTopicService.selectSvyLibTopicList(svyLibTopic);
        return getDataTable(list);
    }
@@ -67,15 +68,15 @@
        util.exportExcel(response, list, "问卷题目数据");
    }
    /**
     * èŽ·å–é—®å·é¢˜ç›®è¯¦ç»†ä¿¡æ¯
     */
    @ApiOperation("获取问卷题目详细信息")
    @PreAuthorize("@ss.hasPermi('smartor:svytopic:query')")
    @GetMapping(value = "/getInfo/{topicid}")
    public AjaxResult getInfo(@PathVariable("topicid") Long topicid) {
        return success(svyLibTopicService.selectSvyLibTopicByTopicid(topicid));
    }
//    /**
//     * èŽ·å–é—®å·é¢˜ç›®è¯¦ç»†ä¿¡æ¯
//     */
//    @ApiOperation("获取问卷题目详细信息")
//    @PreAuthorize("@ss.hasPermi('smartor:svytopic:query')")
//    @GetMapping(value = "/getInfo/{topicid}")
//    public AjaxResult getInfo(@PathVariable("topicid") Long topicid) {
//        return success(svyLibTopicService.selectSvyLibTopicByTopicid(topicid));
//    }
    /**
     * æ–°å¢žé—®å·é¢˜ç›®
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/TempDetpRelevanceController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,98 @@
package com.ruoyi.web.controller.smartor;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.smartor.domain.TempDetpRelevance;
import com.smartor.service.ITempDetpRelevanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
 * æ¨¡æ¿ç§‘室关联Controller
 *
 * @author ruoyi
 * @date 2024-01-04
 */
@RestController
@RequestMapping("/system/relevance")
public class TempDetpRelevanceController extends BaseController
{
    @Autowired
    private ITempDetpRelevanceService tempDetpRelevanceService;
    /**
     * æŸ¥è¯¢æ¨¡æ¿ç§‘室关联列表
     */
    @PreAuthorize("@ss.hasPermi('system:relevance:list')")
    @GetMapping("/list")
    public TableDataInfo list(TempDetpRelevance tempDetpRelevance)
    {
        startPage();
        List<TempDetpRelevance> list = tempDetpRelevanceService.selectTempDetpRelevanceList(tempDetpRelevance);
        return getDataTable(list);
    }
    /**
     * å¯¼å‡ºæ¨¡æ¿ç§‘室关联列表
     */
    @PreAuthorize("@ss.hasPermi('system:relevance:export')")
    @Log(title = "模板科室关联", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, TempDetpRelevance tempDetpRelevance)
    {
        List<TempDetpRelevance> list = tempDetpRelevanceService.selectTempDetpRelevanceList(tempDetpRelevance);
        ExcelUtil<TempDetpRelevance> util = new ExcelUtil<TempDetpRelevance>(TempDetpRelevance.class);
        util.exportExcel(response, list, "模板科室关联数据");
    }
    /**
     * èŽ·å–æ¨¡æ¿ç§‘å®¤å…³è”è¯¦ç»†ä¿¡æ¯
     */
    @PreAuthorize("@ss.hasPermi('system:relevance:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(tempDetpRelevanceService.selectTempDetpRelevanceById(id));
    }
    /**
     * æ–°å¢žæ¨¡æ¿ç§‘室关联
     */
    @PreAuthorize("@ss.hasPermi('system:relevance:add')")
    @Log(title = "模板科室关联", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody TempDetpRelevance tempDetpRelevance)
    {
        return toAjax(tempDetpRelevanceService.insertTempDetpRelevance(tempDetpRelevance));
    }
    /**
     * ä¿®æ”¹æ¨¡æ¿ç§‘室关联
     */
    @PreAuthorize("@ss.hasPermi('system:relevance:edit')")
    @Log(title = "模板科室关联", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody TempDetpRelevance tempDetpRelevance)
    {
        return toAjax(tempDetpRelevanceService.updateTempDetpRelevance(tempDetpRelevance));
    }
    /**
     * åˆ é™¤æ¨¡æ¿ç§‘室关联
     */
    @PreAuthorize("@ss.hasPermi('system:relevance:remove')")
    @Log(title = "模板科室关联", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(tempDetpRelevanceService.deleteTempDetpRelevanceByIds(ids));
    }
}
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/tools/DingTalkController.java
@@ -43,8 +43,9 @@
     */
    @ApiOperation("发送钉钉消息")
    @PostMapping("/sendNotification")
    public void sendNotification(@RequestBody DingTalkReqVo dingTalkReqVo) throws ApiException {
        dingTalkService.sendNotification(dingTalkReqVo);
    public Boolean sendNotification(@RequestBody DingTalkReqVo dingTalkReqVo) throws ApiException {
        Boolean aBoolean = dingTalkService.sendNotification(dingTalkReqVo);
        return aBoolean;
    }
}
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java
@@ -1,6 +1,9 @@
package com.ruoyi.web.controller.system;
import java.util.List;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -27,6 +30,7 @@
 * 
 * @author ruoyi
 */
@Api(description = "部门信息")
@RestController
@RequestMapping("/system/dept")
public class SysDeptController extends BaseController
@@ -37,6 +41,7 @@
    /**
     * èŽ·å–éƒ¨é—¨åˆ—è¡¨
     */
    @ApiOperation("获取部门列表")
    @PreAuthorize("@ss.hasPermi('system:dept:list')")
    @GetMapping("/list")
    public AjaxResult list(SysDept dept)
@@ -48,6 +53,7 @@
    /**
     * æŸ¥è¯¢éƒ¨é—¨åˆ—表(排除节点)
     */
    @ApiOperation("查询部门列表(排除节点)")
    @PreAuthorize("@ss.hasPermi('system:dept:list')")
    @GetMapping("/list/exclude/{deptId}")
    public AjaxResult excludeChild(@PathVariable(value = "deptId", required = false) Long deptId)
@@ -60,8 +66,9 @@
    /**
     * æ ¹æ®éƒ¨é—¨ç¼–号获取详细信息
     */
    @ApiOperation("根据部门编号获取详细信息")
    @PreAuthorize("@ss.hasPermi('system:dept:query')")
    @GetMapping(value = "/{deptId}")
    @GetMapping(value = "/getInfo/{deptId}")
    public AjaxResult getInfo(@PathVariable Long deptId)
    {
        deptService.checkDeptDataScope(deptId);
@@ -71,9 +78,10 @@
    /**
     * æ–°å¢žéƒ¨é—¨
     */
    @ApiOperation("新增部门")
    @PreAuthorize("@ss.hasPermi('system:dept:add')")
    @Log(title = "部门管理", businessType = BusinessType.INSERT)
    @PostMapping
    @PostMapping("/add")
    public AjaxResult add(@Validated @RequestBody SysDept dept)
    {
        if (UserConstants.NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept)))
@@ -87,9 +95,10 @@
    /**
     * ä¿®æ”¹éƒ¨é—¨
     */
    @ApiOperation("修改部门")
    @PreAuthorize("@ss.hasPermi('system:dept:edit')")
    @Log(title = "部门管理", businessType = BusinessType.UPDATE)
    @PutMapping
    @PostMapping("/edit")
    public AjaxResult edit(@Validated @RequestBody SysDept dept)
    {
        Long deptId = dept.getDeptId();
@@ -113,9 +122,10 @@
    /**
     * åˆ é™¤éƒ¨é—¨
     */
    @ApiOperation("删除部门")
    @PreAuthorize("@ss.hasPermi('system:dept:remove')")
    @Log(title = "部门管理", businessType = BusinessType.DELETE)
    @DeleteMapping("/{deptId}")
    @GetMapping("/remove/{deptId}")
    public AjaxResult remove(@PathVariable Long deptId)
    {
        if (deptService.hasChildByDeptId(deptId))
ruoyi-common/pom.xml
@@ -156,6 +156,12 @@
            <artifactId>UserAgentUtils</artifactId>
        </dependency>
        <dependency>
            <groupId>io.swagger</groupId>
            <artifactId>swagger-annotations</artifactId>
            <version>1.6.2</version>
        </dependency>
        <!-- servlet包 -->
        <dependency>
            <groupId>javax.servlet</groupId>
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java
@@ -6,6 +6,10 @@
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.domain.BaseEntity;
@@ -15,44 +19,58 @@
 * 
 * @author ruoyi
 */
@Data
@ApiModel(value = "SysDept", description = "部门表")
public class SysDept extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    /** éƒ¨é—¨ID */
    @ApiModelProperty("部门ID")
    private Long deptId;
    /** çˆ¶éƒ¨é—¨ID */
    @ApiModelProperty("父部门ID")
    private Long parentId;
    /** ç¥–级列表 */
    @ApiModelProperty("祖级列表")
    private String ancestors;
    /** éƒ¨é—¨åç§° */
    @ApiModelProperty("部门名称")
    private String deptName;
    /** æ˜¾ç¤ºé¡ºåº */
    @ApiModelProperty("显示顺序")
    private Integer orderNum;
    /** è´Ÿè´£äºº */
    @ApiModelProperty("负责人")
    private String leader;
    /** è”系电话 */
    @ApiModelProperty("联系电话")
    private String phone;
    /** é‚®ç®± */
    @ApiModelProperty("邮箱")
    private String email;
    /** éƒ¨é—¨çŠ¶æ€:0正常,1停用 */
    @ApiModelProperty("部门状态:0正常,1停用")
    private String status;
    /** åˆ é™¤æ ‡å¿—(0代表存在 2代表删除) */
    @ApiModelProperty("删除标志(0代表存在 2代表删除)")
    private String delFlag;
    /** çˆ¶éƒ¨é—¨åç§° */
    @ApiModelProperty("父部门名称")
    private String parentName;
    
    /** å­éƒ¨é—¨ */
    @ApiModelProperty("子部门")
    private List<SysDept> children = new ArrayList<SysDept>();
    public Long getDeptId()
ruoyi-common/src/main/java/com/ruoyi/common/enums/SendTypeEnum.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,53 @@
package com.ruoyi.common.enums;
/**
 * å‘送类型枚举
 */
public enum SendTypeEnum {
    DMT(1, "多媒体"),
    ZZ(2, "纸质"),
    DH(3, "电话"),
    DX(4, "短信"),
    GZH(5, "微信公众号"),
    WXXCH(6, "微信小程序"),
    ZFB(7, "支付宝"),
    ZNXCH(8, "智能小程序"),
    DD(9, "钉钉");
    private Integer code;
    private String desc;
    SendTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }
    public static String getDescByCode(Integer code) {
        SendTypeEnum[] organEnums = values();
        for (int i = 0; i < organEnums.length; i++) {
            SendTypeEnum organEnum = organEnums[i];
            if (organEnum.getCode() == code) {
                return organEnum.getDesc();
            }
        }
        return null;
    }
    public Integer getCode() {
        return code;
    }
    public void setCode(Integer code) {
        this.code = code;
    }
    public String getDesc() {
        return desc;
    }
    public void setDesc(String desc) {
        this.desc = desc;
    }
}
ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysDeptMapper">
    <resultMap type="SysDept" id="SysDeptResult">
    <resultMap type="com.ruoyi.common.core.domain.entity.SysDept" id="SysDeptResult">
        <id     property="deptId"     column="dept_id"     />
        <result property="parentId"   column="parent_id"   />
        <result property="ancestors"  column="ancestors"   />
@@ -27,7 +27,7 @@
        from sys_dept d
    </sql>
    
    <select id="selectDeptList" parameterType="SysDept" resultMap="SysDeptResult">
    <select id="selectDeptList" parameterType="com.ruoyi.common.core.domain.entity.SysDept" resultMap="SysDeptResult">
        <include refid="selectDeptVo"/>
        where d.del_flag = '0'
        <if test="deptId != null and deptId != 0">
@@ -87,7 +87,7 @@
        where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
    </select>
    
    <insert id="insertDept" parameterType="SysDept">
    <insert id="insertDept" parameterType="com.ruoyi.common.core.domain.entity.SysDept">
         insert into sys_dept(
             <if test="deptId != null and deptId != 0">dept_id,</if>
             <if test="parentId != null and parentId != 0">parent_id,</if>
@@ -115,7 +115,7 @@
         )
    </insert>
    
    <update id="updateDept" parameterType="SysDept">
    <update id="updateDept" parameterType="com.ruoyi.common.core.domain.entity.SysDept">
         update sys_dept
         <set>
             <if test="parentId != null and parentId != 0">parent_id = #{parentId},</if>
smartor/src/main/java/com/smartor/common/SendService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,60 @@
package com.smartor.common;
import com.aliyun.dysmsapi20170525.models.SendSmsResponseBody;
import com.smartor.domain.BaseSmsRequest;
import com.smartor.domain.DingTalkReqVo;
import com.smartor.domain.SendMagParam;
import com.smartor.service.DingTalkService;
import com.smartor.service.impl.BaseSmsaccountServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
 * å‘送服务工具类
 */
@Component
public class SendService {
    @Autowired
    private BaseSmsaccountServiceImpl baseSmsaccountService;
    @Autowired
    private DingTalkService dingTalkService;
    public Boolean sendMsg(SendMagParam sendMagParam) {
        switch (sendMagParam.getType()) {
            case ("多媒体"):
            case ("纸质"):
            case ("电话"):
            case ("短信"):
                BaseSmsRequest baseSmsRequest = new BaseSmsRequest();
                baseSmsRequest.setPhoneNumber(sendMagParam.getPhone());
                baseSmsRequest.setTemplateCode("SMS_461860582");
                SendSmsResponseBody sendSmsResponseBody = baseSmsaccountService.sendMsg(baseSmsRequest);
                if (sendSmsResponseBody.getCode().equals("OK")) {
                    return true;
                }
                return false;
            case ("微信公众号"):
            case ("微信小程序"):
            case ("支付宝"):
            case ("智能小程序"):
            case ("钉钉"):
                DingTalkReqVo dingTalkReqVo = new DingTalkReqVo();
                Boolean aBoolean = dingTalkService.sendNotification(dingTalkReqVo);
                if (aBoolean) {
                    return true;
                }
            default:
                return false;
        }
    }
}
smartor/src/main/java/com/smartor/domain/HeCategoryVO.java
@@ -7,6 +7,7 @@
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -73,7 +74,7 @@
     * å­æ•°æ®
     */
    @ApiModelProperty(value = "子数据")
    private List<HeCategory> heCategoryList;
    private List<HeCategory> heCategoryList = new ArrayList<>();
    @Override
    public String toString() {
smartor/src/main/java/com/smartor/domain/HeLibrary.java
@@ -1,16 +1,14 @@
package com.smartor.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.math.BigDecimal;
import java.util.Date;
/**
 * å®£æ•™èµ„料库对象 he_library
@@ -174,7 +172,7 @@
     */
    @Excel(name = "是否可用 0可用  1不可用")
    @ApiModelProperty("是否可用 0可用  1不可用")
    private String isavailable;
    private String isavailable = "0";
    /**
     * é€‚用疾病
@@ -190,5 +188,32 @@
    @ApiModelProperty("适用方式:调查表1,智能语音2、人工3")
    private String suitway;
    /**
     * ç§‘室名称
     */
    @Excel(name = "科室名称")
    @ApiModelProperty("科室名称")
    private String deptNames = "";
    /**
     * æ ‡ç­¾ä¿¡æ¯
     */
    @Excel(name = "标签信息")
    @ApiModelProperty("标签信息")
    private String labelInfo = "";
    /**
     * é™¢åŒº
     */
    @Excel(name = "院区")
    @ApiModelProperty("院区")
    private String campus = "";
    /**
     * å…¶å®ƒæ•°æ®ï¼ˆå­˜å‚¨å˜é‡ï¼‰
     */
    @Excel(name = "其它数据(存储变量)")
    @ApiModelProperty("其它数据(存储变量)")
    private String otherdata = "";
}
smartor/src/main/java/com/smartor/domain/HeLibraryTag.java
@@ -92,6 +92,13 @@
    private String guid;
    /**
     * æ ‡ç­¾åç§°
     */
    @Excel(name = " æ ‡ç­¾åç§° ")
    @ApiModelProperty(" æ ‡ç­¾åç§° ")
    private String tagname;
    /**
     * æ˜¯å¦å­˜åœ¨æ“ä½œï¼š1 æ–°å¢ž 2修改 3删除
     */
    @ApiModelProperty(value = "是否存在操作:1 æ–°å¢ž 2修改 3删除")
smartor/src/main/java/com/smartor/domain/HeLibraryVO.java
@@ -8,17 +8,18 @@
import lombok.Data;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
 * å®£æ•™èµ„料库对象 he_library
 * å®£æ•™èµ„料库视图对象 he_library
 *
 * @author ruoyi
 * @date 2023-12-24
 */
@Data
@ApiModel(value = "HeLibrary", description = "宣教资料库对象")
@ApiModel(value = "HeLibraryVO", description = "宣教资料库视图对象")
public class HeLibraryVO extends BaseEntity {
    private static final long serialVersionUID = 1L;
@@ -183,6 +184,27 @@
    private String suitdisease;
    /**
     * ç§‘室名称
     */
    @Excel(name = "科室名称")
    @ApiModelProperty("科室名称")
    private String deptNames = "";
    /**
     * æ ‡ç­¾ä¿¡æ¯
     */
    @Excel(name = "标签信息")
    @ApiModelProperty("标签信息")
    private String labelInfo = "";
    /**
     * é™¢åŒº
     */
    @Excel(name = "院区")
    @ApiModelProperty("院区")
    private String campus = "";
    /**
     * é€‚用方式:调查表1,智能语音2、人工3
     */
    @Excel(name = "适用方式:调查表1,智能语音2、人工3")
@@ -190,7 +212,10 @@
    private String suitway;
    @ApiModelProperty("指标标签对象集合")
    private List<HeLibraryTag> heLibraryTagList;
    private List<HeLibraryTag> heLibraryTagList = new ArrayList<>();
    @ApiModelProperty("模板科室关联表")
    private List<TempDetpRelevance> tempDetpRelevances = new ArrayList<>();
    /**
     * æ˜¯å¦å­˜åœ¨æ“ä½œï¼š1 æ–°å¢ž 2修改 3删除
@@ -198,4 +223,11 @@
    @ApiModelProperty(value = "是否存在操作:1 æ–°å¢ž 2修改 3删除")
    private Integer isoperation;
    /**
     * å…¶å®ƒæ•°æ®ï¼ˆå­˜å‚¨å˜é‡ï¼‰
     */
    @Excel(name = "其它数据(存储变量)")
    @ApiModelProperty("其它数据(存储变量)")
    private String otherdata = "";
}
smartor/src/main/java/com/smartor/domain/HeTask.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,208 @@
package com.smartor.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
 * å®£æ•™ä»»åŠ¡å¯¹è±¡ he_task
 *
 * @author ruoyi
 * @date 2024-01-07
 */
@Data
@ApiModel(value = "HeTask", description = "宣教任务对象")
public class HeTask extends BaseEntity {
    private static final long serialVersionUID = 1L;
    /**
     * è‡ªå¢žID
     */
    @ApiModelProperty(value = "自增ID")
    private Long id;
    /**
     * æ‚£è€…服务任务id
     */
    @Excel(name = "患者服务任务id")
    @ApiModelProperty(value = "患者服务任务id")
    private Long svrtaskid;
    /**
     * ç—…人id集合
     */
    @Excel(name = " ç—…人id集合")
    @ApiModelProperty(value = "病人id集合(字符串以逗号形式分隔)")
    private String patientid;
    /**
     * å®£æ•™åˆ†ç±»
     */
    @Excel(name = " å®£æ•™åˆ†ç±» ")
    @ApiModelProperty(value = "宣教分类")
    private String classification;
    /**
     * å®£æ•™id
     */
    @Excel(name = " å®£æ•™id ")
    @ApiModelProperty(value = "宣教id")
    private Long preachcategoryid;
    /**
     * å®£æ•™åç§°
     */
    @Excel(name = " å®£æ•™åç§° ")
    @ApiModelProperty(value = "宣教名称")
    private String preachname;
    /**
     * ç‰ˆæœ¬
     */
    @Excel(name = " ç‰ˆæœ¬ ")
    @ApiModelProperty(value = "版本")
    private BigDecimal version;
    /**
     * å®£æ•™å½¢å¼ 1,多媒体   2,纸质  3,电话  4,短信  5.微信公众号 6.微信小程序  7.支付宝  8.智能小程序  9.钉钉
     */
    @Excel(name = " å®£æ•™å½¢å¼ 1,多媒体   2,纸质  3,电话  4,短信  5.微信公众号 6.微信小程序  7.支付宝  8.智能小程序  9.钉钉")
    @ApiModelProperty(value = " å®£æ•™å½¢å¼ 1,多媒体   2,纸质  3,电话  4,短信  5.微信公众号 6.微信小程序  7.支付宝  8.智能小程序  9.钉钉")
    private Long preachform;
    /**
     * ç»„织形式:1.单人宣教   2.多人宣教
     */
    @Excel(name = "组织形式:1.单人宣教   2.多人宣教")
    @ApiModelProperty(value = " ç»„织形式:1.单人宣教   2.多人宣教")
    private Long orgform;
    /**
     * å®£æ•™æè¿°
     */
    @Excel(name = " å®£æ•™æè¿° ")
    @ApiModelProperty(value = "宣教描述")
    private String preachdescription;
    /**
     * å®£æ•™å†…容
     */
    @Excel(name = " å®£æ•™å†…容 ")
    @ApiModelProperty(value = "宣教内容")
    private String preachcontent;
    /**
     * æ¨¡æ¿ID
     */
    @Excel(name = " æ¨¡æ¿ID ")
    @ApiModelProperty(value = "模板ID")
    private Long templateid;
    /**
     * å®£æ•™ä»£ç 
     */
    @Excel(name = " å®£æ•™ä»£ç  ")
    @ApiModelProperty(value = "宣教代码")
    private String preachcode;
    /**
     * ä¸­å¿ƒåº“ID
     */
    @Excel(name = " ä¸­å¿ƒåº“ID ")
    @ApiModelProperty(value = "中心库ID")
    private Long centerlibraryid;
    /**
     * æ˜¯å¦å¯ç”¨
     */
    @Excel(name = " æ˜¯å¦å¯ç”¨ ")
    @ApiModelProperty(value = "是否启用")
    private Long isenable;
    /**
     * æœºæž„ID
     */
    @Excel(name = " æœºæž„ID ")
    @ApiModelProperty(value = "机构ID")
    private String orgid;
    /**
     * åˆ é™¤æ ‡è®°
     */
    @ApiModelProperty(value = "删除标记")
    private String delFlag;
    /**
     * ä¸Šä¼ æ ‡è®°
     */
    @Excel(name = " ä¸Šä¼ æ ‡è®° ")
    @ApiModelProperty(value = "上传标记")
    private Long isupload;
    /**
     * ä¸Šä¼ æ—¶é—´
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = " ä¸Šä¼ æ—¶é—´ ", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "上传时间")
    private Date uploadTime;
    /**
     * æ˜¯å¦æœ¬åœ°
     */
    @Excel(name = " æ˜¯å¦æœ¬åœ° ")
    @ApiModelProperty(value = "是否本地")
    private Long islocal;
    /**
     * ä¸­å¿ƒåº“代码
     */
    @Excel(name = " ä¸­å¿ƒåº“代码 ")
    @ApiModelProperty(value = "中心库代码")
    private String centerlibrarycode;
    /**
     * çˆ¶ID
     */
    @Excel(name = "父ID")
    @ApiModelProperty(value = "父ID")
    private Long pid;
    /**
     * GUID
     */
    @Excel(name = "GUID")
    @ApiModelProperty(value = "GUID")
    private String guid;
    /**
     * ä»»åŠ¡å‘é€æ—¶é—´
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "任务发送时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "任务发送时间")
    private Date sendTime;
    /**
     * å‘送状态 ï¼š 0 æš‚停发送  1 å®šæ—¶å‘送  2 ç«‹å³å‘送
     */
    @Excel(name = "发送状态 ï¼š 0 æš‚停发送  1 å®šæ—¶å‘送  2 ç«‹å³å‘送  ")
    @ApiModelProperty(value = "发送状态 ï¼š 0 æš‚停发送  1 å®šæ—¶å‘送  2 ç«‹å³å‘送")
    private Long isSend;
    /**
     * å‘送状态:  0  å¤±è´¥   1成功
     */
    @Excel(name = "发送状态:  0  å¤±è´¥   1成功")
    @ApiModelProperty(value = "发送状态:  0  å¤±è´¥   1成功")
    private Long sendState;
}
smartor/src/main/java/com/smartor/domain/HeTaskVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,217 @@
package com.smartor.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
 * å®£æ•™ä»»åŠ¡å¯¹è±¡ he_task
 *
 * @author ruoyi
 * @date 2024-01-07
 */
@Data
@ApiModel(value = "HeTaskVO", description = "宣教任务详情返参对象")
public class HeTaskVO extends BaseEntity {
    private static final long serialVersionUID = 1L;
    /**
     * è‡ªå¢žID
     */
    @ApiModelProperty(value = "自增ID")
    private Long id;
    /**
     * æ‚£è€…服务任务id
     */
    @Excel(name = "患者服务任务id")
    @ApiModelProperty(value = "患者服务任务id")
    private Long svrtaskid;
//    /**
//     * ç—…人id集合
//     */
//    @Excel(name = " ç—…人id集合")
//    @ApiModelProperty(value = "病人id集合")
//    private String patientids;
    /**
     * å®£æ•™åˆ†ç±»
     */
    @Excel(name = " å®£æ•™åˆ†ç±» ")
    @ApiModelProperty(value = "宣教分类")
    private String classification;
    /**
     * å®£æ•™åˆ†ç±»
     */
    @Excel(name = " å®£æ•™åˆ†ç±» ")
    @ApiModelProperty(value = "宣教分类id")
    private Long preachcategoryid;
    /**
     * å®£æ•™åç§°
     */
    @Excel(name = " å®£æ•™åç§° ")
    @ApiModelProperty(value = "宣教名称")
    private String preachname;
    /**
     * ç‰ˆæœ¬
     */
    @Excel(name = " ç‰ˆæœ¬ ")
    @ApiModelProperty(value = "版本")
    private BigDecimal version;
    /**
     * å®£æ•™å½¢å¼ 1,多媒体   2,纸质  3,电话  4,短信  5.微信公众号 6.微信小程序  7.支付宝  8.智能小程序  9.钉钉
     */
    @Excel(name = " å®£æ•™å½¢å¼ 1,多媒体   2,纸质  3,电话  4,短信  5.微信公众号 6.微信小程序  7.支付宝  8.智能小程序  9.钉钉")
    @ApiModelProperty(value = " å®£æ•™å½¢å¼ 1,多媒体   2,纸质  3,电话  4,短信  5.微信公众号 6.微信小程序  7.支付宝  8.智能小程序  9.钉钉")
    private Long preachform;
    /**
     * ç»„织形式:1.单人宣教   2.多人宣教
     */
    @Excel(name = "组织形式:1.单人宣教   2.多人宣教")
    @ApiModelProperty(value = " ç»„织形式:1.单人宣教   2.多人宣教")
    private Long orgform;
    /**
     * å®£æ•™æè¿°
     */
    @Excel(name = " å®£æ•™æè¿° ")
    @ApiModelProperty(value = "宣教描述")
    private String preachdescription;
    /**
     * å®£æ•™å†…容
     */
    @Excel(name = " å®£æ•™å†…容 ")
    @ApiModelProperty(value = "宣教内容")
    private String preachcontent;
    /**
     * æ¨¡æ¿ID
     */
    @Excel(name = " æ¨¡æ¿ID ")
    @ApiModelProperty(value = "模板ID")
    private Long templateid;
    /**
     * å®£æ•™ä»£ç 
     */
    @Excel(name = " å®£æ•™ä»£ç  ")
    @ApiModelProperty(value = "宣教代码")
    private String preachcode;
    /**
     * ä¸­å¿ƒåº“ID
     */
    @Excel(name = " ä¸­å¿ƒåº“ID ")
    @ApiModelProperty(value = "中心库ID")
    private Long centerlibraryid;
    /**
     * æ˜¯å¦å¯ç”¨
     */
    @Excel(name = " æ˜¯å¦å¯ç”¨ ")
    @ApiModelProperty(value = "是否启用")
    private Long isenable;
    /**
     * æœºæž„ID
     */
    @Excel(name = " æœºæž„ID ")
    @ApiModelProperty(value = "机构ID")
    private String orgid;
    /**
     * åˆ é™¤æ ‡è®°
     */
    @ApiModelProperty(value = "删除标记")
    private String delFlag;
    /**
     * ä¸Šä¼ æ ‡è®°
     */
    @Excel(name = " ä¸Šä¼ æ ‡è®° ")
    @ApiModelProperty(value = "上传标记")
    private Long isupload;
    /**
     * ä¸Šä¼ æ—¶é—´
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = " ä¸Šä¼ æ—¶é—´ ", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "上传时间")
    private Date uploadTime;
    /**
     * æ˜¯å¦æœ¬åœ°
     */
    @Excel(name = " æ˜¯å¦æœ¬åœ° ")
    @ApiModelProperty(value = "是否本地")
    private Long islocal;
    /**
     * ä¸­å¿ƒåº“代码
     */
    @Excel(name = " ä¸­å¿ƒåº“代码 ")
    @ApiModelProperty(value = "中心库代码")
    private String centerlibrarycode;
    /**
     * çˆ¶ID
     */
    @Excel(name = "父ID")
    @ApiModelProperty(value = "父ID")
    private Long pid;
    /**
     * GUID
     */
    @Excel(name = "GUID")
    @ApiModelProperty(value = "GUID")
    private String guid;
    /**
     * ä»»åŠ¡å‘é€æ—¶é—´
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "任务发送时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "任务发送时间")
    private Date sendTime;
    /**
     * æ˜¯å¦å‘送 ï¼š 0 æš‚停发送  1 å®šæ—¶å‘送  2 ç«‹å³å‘送
     */
    @Excel(name = "是否发送 ï¼š 0 æš‚停发送  1 å®šæ—¶å‘送  2 ç«‹å³å‘送  ")
    @ApiModelProperty(value = "是否发送 ï¼š 0 æš‚停发送  1 å®šæ—¶å‘送  2 ç«‹å³å‘送")
    private Long isSend;
    /**
     * å‘送状态:  0  å¤±è´¥   1成功
     */
    @Excel(name = "发送状态:  0  å¤±è´¥   1成功")
    @ApiModelProperty(value = "发送状态:  0  å¤±è´¥   1成功")
    private Long sendState = 0L;
    /**
     * æ‚£è€…关联信息
     */
    private List<PatHetaskRelevance> patHetaskRelevances;
    /**
     * å®£æ•™èµ„料库信息
     */
    private HeLibraryVO heLibraryVOs;
}
smartor/src/main/java/com/smartor/domain/IvrLibaExtemplate.java
@@ -18,7 +18,7 @@
 * @date 2023-12-27
 */
@Data
@ApiModel(value = "HeLibrary", description = "通过模板对象")
@ApiModel(value = "IvrLibaExtemplate", description = "通过模板对象")
public class IvrLibaExtemplate extends BaseEntity {
    private static final long serialVersionUID = 1L;
smartor/src/main/java/com/smartor/domain/IvrLibaScript.java
@@ -238,7 +238,7 @@
     */
    @ApiModelProperty("参数变量")
    @Excel(name = " å‚数变量 ")
    private String parameter;
    private String otherdata;
    /**
     * çˆ¶ID
smartor/src/main/java/com/smartor/domain/IvrLibaScriptAssort.java
@@ -37,7 +37,7 @@
     * åˆ é™¤
     */
    @ApiModelProperty("删除")
    private String delFlag;
    private Long delFlag;
    /**
     * çˆ¶id
smartor/src/main/java/com/smartor/domain/IvrLibaScriptAssortVO.java
@@ -38,7 +38,7 @@
     * åˆ é™¤
     */
    @ApiModelProperty("删除")
    private String delFlag;
    private Long delFlag;
    /**
     * çˆ¶id
smartor/src/main/java/com/smartor/domain/IvrLibaScriptVO.java
@@ -238,7 +238,7 @@
     */
    @ApiModelProperty("参数变量")
    @Excel(name = " å‚数变量 ")
    private String parameter;
    private String otherdata;
//    /**
//     * æŒ‡æ ‡é›†åˆ
//     */
smartor/src/main/java/com/smartor/domain/IvrLibaTarget.java
@@ -26,7 +26,7 @@
     * $column.columnComment
     */
    @ApiModelProperty(value = "主键")
    private Long targetID;
    private Long id;
    /**
     * åˆ†ç»„ID
@@ -192,8 +192,5 @@
    private Integer pageSize;
    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("targetID", getTargetID()).append("groupid", getGroupid()).append("targettype", getTargettype()).append("targetname", getTargetname()).append("targetdesc", getTargetdesc()).append("language", getLanguage()).append("version", getVersion()).append("isenable", getIsenable()).append("isabnormal", getIsabnormal()).append("warnup", getWarnup()).append("warndown", getWarndown()).append("delFlag", getDelFlag()).append("updateBy", getUpdateBy()).append("updateTime", getUpdateTime()).append("createBy", getCreateBy()).append("createTime", getCreateTime()).append("isupload", getIsupload()).append("uploadTime", getUploadTime()).append("orgid", getOrgid()).append("pid", getPid()).append("guid", getGuid()).append("assortid", getAssortid()).toString();
    }
}
smartor/src/main/java/com/smartor/domain/IvrLibaTargetAssort.java
@@ -36,7 +36,7 @@
     * åˆ é™¤
     */
    @ApiModelProperty(value = "删除")
    private String delFlag;
    private Long delFlag;
    /**
     * çˆ¶id
smartor/src/main/java/com/smartor/domain/IvrLibaTargetAssortVO.java
@@ -39,7 +39,7 @@
     * åˆ é™¤
     */
    @ApiModelProperty(value = "删除")
    private String delFlag;
    private Long delFlag;
    /**
     * çˆ¶id
smartor/src/main/java/com/smartor/domain/IvrLibaTargetTagVO.java
@@ -7,6 +7,7 @@
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -95,6 +96,6 @@
     */
    @ApiModelProperty(value = "标签名称")
    @Excel(name = "标签名称")
    private List<BaseTag> tagList;
    private List<BaseTag> tagList = new ArrayList<>();
}
smartor/src/main/java/com/smartor/domain/IvrLibaTargetVO.java
@@ -28,7 +28,7 @@
     * $column.columnComment
     */
    @ApiModelProperty(value = "主键")
    private Long targetID;
    private Long id;
    /**
     * åˆ†ç»„ID
smartor/src/main/java/com/smartor/domain/IvrLibaTemplate.java
@@ -147,7 +147,7 @@
     */
    @Excel(name = "标签信息")
    @ApiModelProperty(value = "标签信息")
    private String labelInfo;
    private String labelInfo = "";
    /**
     * é€šç”¨åŒ¹é…è¯æœ¯id
@@ -196,7 +196,7 @@
     */
    @Excel(name = "部门名称")
    @ApiModelProperty(value = "部门名称")
    private String deptNames;
    private String deptNames = "";
    /**
     * F_KSDM
@@ -282,7 +282,7 @@
     */
    @Excel(name = "医院院区")
    @ApiModelProperty(value = "医院院区")
    private String campus;
    private String campus = "";
    /**
     * æ ‡ç­¾
@@ -291,4 +291,18 @@
    @ApiModelProperty(value = "标签")
    private String tag;
    /**
     * æ ‡ç­¾
     */
    @Excel(name = "适用方式:调查表1,智能语音2、人工3")
    @ApiModelProperty(value = "适用方式:调查表1,智能语音2、人工3")
    private String suitway;
    /**
     * æ ‡ç­¾
     */
    @Excel(name = "其它数据(存储变量)")
    @ApiModelProperty(value = "其它数据(存储变量)")
    private String otherdata;
}
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateAssort.java
@@ -36,7 +36,7 @@
     * åˆ é™¤
     */
    @ApiModelProperty(value = "删除")
    private String delFlag;
    private Long delFlag;
    /**
     * çˆ¶id
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateAssortVO.java
@@ -37,7 +37,7 @@
     * åˆ é™¤
     */
    @ApiModelProperty(value = "删除")
    private String delFlag;
    private Long delFlag;
    /**
     * çˆ¶id
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateScriptVO.java
@@ -7,6 +7,7 @@
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -230,5 +231,5 @@
     * è¯æœ¯é€‰é¡¹
     */
    @ApiModelProperty(value = "话术选项")
    private List<IvrLibaTemplateTargetoption> ivrLibaTemplateTargetoptionList;
    private List<IvrLibaTemplateTargetoption> ivrLibaTemplateTargetoptionList = new ArrayList<>();
}
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateTarget.java
@@ -26,7 +26,7 @@
     * æ¨¡æ¿æŒ‡æ ‡ID
     */
    @ApiModelProperty(value = "模板指标ID")
    private Long ID;
    private Long id;
    /**
     * æ¨¡æ¿è¯æœ¯ID
@@ -117,14 +117,14 @@
     */
    @Excel(name = "指标ID")
    @ApiModelProperty(value = "指标ID")
    private String targetID;
    private String targetid;
    /**
     * è¯æœ¯æŒ‡æ ‡ID
     */
    @Excel(name = "话术指标ID")
    @ApiModelProperty(value = "话术指标ID")
    private String questionTargetID;
    private String questionTargetid;
    /**
     * åŸºç¡€æ­£åˆ™
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateVO.java
@@ -7,6 +7,7 @@
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -146,7 +147,7 @@
     */
    @Excel(name = "标签信息")
    @ApiModelProperty(value = "标签信息")
    private String labelInfo;
    private String labelInfo = "";
    /**
     * é€šç”¨åŒ¹é…è¯æœ¯id
@@ -195,7 +196,7 @@
     */
    @Excel(name = "部门名称")
    @ApiModelProperty(value = "部门名称")
    private String deptNames;
    private String deptNames = "";
    /**
     * F_KSDM
@@ -279,7 +280,7 @@
     */
    @Excel(name = "医院院区")
    @ApiModelProperty(value = "医院院区")
    private String campus;
    private String campus = "";
    /**
     * æ ‡ç­¾
@@ -287,6 +288,13 @@
    @Excel(name = "标签")
    @ApiModelProperty(value = "标签")
    private String tag;
    /**
     * é€‚用方式:调查表1,智能语音2、人工3
     */
    @Excel(name = "适用方式:调查表1,智能语音2、人工3")
    @ApiModelProperty(value = "适用方式:调查表1,智能语音2、人工3")
    private String suitway;
    /**
     * æ˜¯å¦å­˜åœ¨æ“ä½œï¼š1 æ–°å¢ž 2修改 3删除
@@ -298,12 +306,12 @@
//    private List<IvrLibaTemplateTarget> ivrLibaTemplateTargetList;
    @ApiModelProperty(value = "模板问题集合")
    private List<IvrLibaTemplateScriptVO> ivrLibaTemplateScriptVOList;
    private List<IvrLibaTemplateScriptVO> ivrLibaTemplateScriptVOList = new ArrayList<>();
    @ApiModelProperty(value = "模板指标集合")
    private List<IvrLibaTemplateTag> ivrLibaTemplateTagList;
//
//    @ApiModelProperty(value = "模板选项集合")
//    private List<IvrLibaTemplateTargetoption> ivrLibaTemplateTargetoptionList;
    private List<IvrLibaTemplateTag> ivrLibaTemplateTagList = new ArrayList<>();
    @ApiModelProperty(value = "模板科室关联表集合")
    private List<TempDetpRelevance> tempDetpRelevances = new ArrayList<>();
}
smartor/src/main/java/com/smartor/domain/PatArchive.java
@@ -204,6 +204,13 @@
    @Excel(name = " é’‰é’‰å· ")
    private String dduserid;
    /**
     * é’‰é’‰å·
     */
    @ApiModelProperty("科室")
    @Excel(name = " ç§‘室 ")
    private String dept;
    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("patid", getPatid()).append("name", getName()).append("sex", getSex()).append("idcardno", getIdcardno()).append("birthdate", getBirthdate()).append("age", getAge()).append("source", getSource()).append("archivetime", getArchivetime()).append("archiveby", getArchiveby()).append("telcode", getTelcode()).append("relativetelcode", getRelativetelcode()).append("idcardtype", getIdcardtype()).append("orgid", getOrgid()).append("openid", getOpenid()).append("delFlag", getDelFlag()).append("updateBy", getUpdateBy()).append("updateTime", getUpdateTime()).append("createBy", getCreateBy()).append("createTime", getCreateTime()).append("isupload", getIsupload()).append("uploadTime", getUploadTime()).toString();
smartor/src/main/java/com/smartor/domain/PatArchiveReq.java
@@ -60,7 +60,7 @@
    /**
     * æŸ¥çœ‹å…¨éƒ¨  0   æŸ¥çœ‹ä½é™¢  1  æŸ¥çœ‹é—¨è¯Š  2   æŸ¥çœ‹ä½“检  3
     */
    @ApiModelProperty(value = "查看全部  0   æŸ¥çœ‹ä½é™¢  1  æŸ¥çœ‹é—¨è¯Š  2   æŸ¥çœ‹ä½“检  3")
    @ApiModelProperty(value = " æŸ¥çœ‹ä½é™¢  1  æŸ¥çœ‹é—¨è¯Š  2   æŸ¥çœ‹ä½“检  3")
    private Long allhosp;
@@ -108,7 +108,6 @@
    @ApiModelProperty(value = "pageSize")
    @Excel(name = "pageSize")
    private Integer pageSize;
}
smartor/src/main/java/com/smartor/domain/PatArchiveVO.java
@@ -9,6 +9,7 @@
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -141,7 +142,7 @@
    private String tag;
    @ApiModelProperty("标签集合")
    List<PatArchivetag> tagList;
    List<PatArchivetag> tagList = new ArrayList<>();
    @ApiModelProperty(value = "是否存在操作:1 æ–°å¢ž 2修改 3删除")
    private Integer isoperation;
smartor/src/main/java/com/smartor/domain/PatHetaskRelevance.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,105 @@
package com.smartor.domain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
 * æ‚£è€…与宣教任务关联对象 pat_hetask_relevance
 *
 * @author ruoyi
 * @date 2024-01-07
 */
@Data
@ApiModel(value = "PatHetaskRelevance", description = "患者与宣教任务关联对象")
public class PatHetaskRelevance extends BaseEntity {
    private static final long serialVersionUID = 1L;
    /**
     * ä¸»é”®
     */
    @ApiModelProperty("主键")
    private Long id;
    /**
     * æ‚£è€…ID
     */
    @Excel(name = "患者ID")
    @ApiModelProperty("患者ID")
    private Long patId;
    /**
     * å®£æ•™ä»»åŠ¡ID
     */
    @Excel(name = "宣教任务ID")
    @ApiModelProperty("宣教任务ID")
    private Long heTaskId;
    /**
     * åˆ é™¤ï¼š0不删除  1删除
     */
    @ApiModelProperty("删除:0不删除  1删除")
    private Long delFlag;
    /**
     * å§“名
     */
    @Excel(name = "姓名")
    @ApiModelProperty("姓名")
    private String name;
    /**
     * å¹´é¾„
     */
    @Excel(name = "年龄")
    @ApiModelProperty("年龄")
    private Long age;
    /**
     * æ€§åˆ«
     */
    @Excel(name = "性别")
    @ApiModelProperty("性别")
    private Long sex;
    /**
     * åºŠå·
     */
    @Excel(name = "床号")
    @ApiModelProperty("床号")
    private Long badNo;
    /**
     * ç§‘室
     */
    @Excel(name = "科室")
    @ApiModelProperty("科室")
    private String dept;
    /**
     * ç–¾ç—…名称
     */
    @Excel(name = "疾病名称")
    @ApiModelProperty("疾病名称")
    private String icdName;
    /**
     * æ‰‹æœºå·
     */
    @Excel(name = "手机号")
    @ApiModelProperty("手机号")
    private String phone;
    /**
     * ç—…历号
     */
    @Excel(name = "病历号")
    @ApiModelProperty("病历号")
    private String medicalRecordNo;
}
smartor/src/main/java/com/smartor/domain/PatHetaskRelevanceVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,109 @@
package com.smartor.domain;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * æ‚£è€…与宣教任务关联对象参数 pat_hetask_relevance
 *
 * @author ruoyi
 * @date 2024-01-07
 */
@Data
@ApiModel(value = "PatHetaskRelevanceVO", description = "患者与宣教任务关联对象参数")
public class PatHetaskRelevanceVO extends BaseEntity {
    private static final long serialVersionUID = 1L;
    /**
     * ä¸»é”®
     */
    @ApiModelProperty("主键")
    private Long id;
    /**
     * æ‚£è€…ID
     */
    @Excel(name = "患者ID")
    @ApiModelProperty("患者ID")
    private Long patId;
    /**
     * å®£æ•™ä»»åŠ¡ID
     */
    @Excel(name = "宣教任务ID")
    @ApiModelProperty("宣教任务ID")
    private Long heTaskId;
    /**
     * åˆ é™¤ï¼š0不删除  1删除
     */
    @ApiModelProperty("删除:0不删除  1删除")
    private Long delFlag;
    /**
     * å§“名
     */
    @Excel(name = "姓名")
    @ApiModelProperty("姓名")
    private String name;
    /**
     * å¹´é¾„
     */
    @Excel(name = "年龄")
    @ApiModelProperty("年龄")
    private Long age;
    /**
     * æ€§åˆ«
     */
    @Excel(name = "性别")
    @ApiModelProperty("性别")
    private Long sex;
    /**
     * åºŠå·
     */
    @Excel(name = "床号")
    @ApiModelProperty("床号")
    private Long badNo;
    /**
     * ç§‘室
     */
    @Excel(name = "科室")
    @ApiModelProperty("科室")
    private String dept;
    /**
     * ç–¾ç—…名称
     */
    @Excel(name = "疾病名称")
    @ApiModelProperty("疾病名称")
    private String icdName;
    /**
     * æ‰‹æœºå·
     */
    @Excel(name = "手机号")
    @ApiModelProperty("手机号")
    private String phone;
    /**
     * ç—…历号
     */
    @Excel(name = "病历号")
    @ApiModelProperty("病历号")
    private String medicalRecordNo;
    /**
     * å®£æ•™ä»»åŠ¡
     */
    @ApiModelProperty("宣教任务")
    private HeTask heTask;
}
smartor/src/main/java/com/smartor/domain/SendMagParam.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
package com.smartor.domain;
import lombok.Data;
@Data
public class SendMagParam {
    //发送类型
    private String type;
    //电话号码
    private String phone;
    //发送内容
    private String content;
    //模板code ä¾‹å¦‚ ï¼š  SMS_461860582
    private String tmpCode;
}
smartor/src/main/java/com/smartor/domain/SvyCategoryVO.java
@@ -6,6 +6,7 @@
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -74,6 +75,6 @@
     * äºŒçº§åˆ†ç±»
     */
    @ApiModelProperty(value = "二级分类")
    private List<SvyCategory> svyCategoryList;
    private List<SvyCategory> svyCategoryList=new ArrayList<>();
}
smartor/src/main/java/com/smartor/domain/SvyLibTitle.java
@@ -1,6 +1,7 @@
package com.smartor.domain;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -111,7 +112,7 @@
     */
    @ApiModelProperty(value = "是否启用")
    @Excel(name = " æ˜¯å¦å¯ç”¨ ")
    private Long isenable;
    private String isenable = "0";
    /**
     * æœºæž„ID
@@ -161,10 +162,51 @@
    private List<SvyLibTopic> svyLibTopics;
    /**
     * æ¨¡æ¿ç§‘室关联集合
     */
    @ApiModelProperty(value = "模板科室关联集合")
    private List<TempDetpRelevance> tempDetpRelevances = new ArrayList<>();
    /**
     * æ˜¯å¦å­˜åœ¨æ“ä½œï¼š1 æ–°å¢ž 2修改 3删除
     */
    @ApiModelProperty(value = "是否存在操作:1 æ–°å¢ž 2修改 3删除")
    private Integer isoperation;
    /**
     * ç§‘室名称
     */
    @Excel(name = "科室名称")
    @ApiModelProperty("科室名称")
    private String deptNames = "";
    /**
     * æ ‡ç­¾ä¿¡æ¯
     */
    @Excel(name = "标签信息")
    @ApiModelProperty("标签信息")
    private String labelInfo = "";
    /**
     * é™¢åŒº
     */
    @Excel(name = "院区")
    @ApiModelProperty("院区")
    private String campus = "";
    /**
     * é€‚用方式:调查表1,智能语音2、人工3
     */
    @Excel(name = "院适用方式:调查表1,智能语音2、人工3区")
    @ApiModelProperty("适用方式:调查表1,智能语音2、人工3")
    private String suitway = "";
    /**
     * å…¶å®ƒæ•°æ®ï¼ˆå­˜å‚¨å˜é‡ï¼‰
     */
    @ApiModelProperty("其它数据(存储变量)")
    private String otherdata = "";
    public SvyLibTitle() {
    }
smartor/src/main/java/com/smartor/domain/SvyLibTitleCategoryVO.java
@@ -6,6 +6,7 @@
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
@@ -60,5 +61,5 @@
    private Long orgid;
    @ApiModelProperty(value = "树的子对象集合")
    private List<SvyLibTitleCategory> svyLibTitleCategoryList;
    private List<SvyLibTitleCategory> svyLibTitleCategoryList = new ArrayList<>();
}
smartor/src/main/java/com/smartor/domain/SvyLibTitleReq.java
@@ -28,6 +28,12 @@
    @ApiModelProperty(value = "问卷分类ID")
    private Long categoryid;
    /**
     * é—®å·ID
     */
    @ApiModelProperty(value = "问卷ID")
    private Long svyid;
    /**
     * é—®å·åç§°
smartor/src/main/java/com/smartor/domain/SvyLibTopic.java
@@ -1,5 +1,6 @@
package com.smartor.domain;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -53,7 +54,7 @@
     */
    @Excel(name = " é¢˜ç›®ç±»åž‹;枚举 1.单选 2多选 3填空 ")
    @ApiModelProperty("题目类型;枚举 1.单选 2多选 3填空")
    private Long topictype;
    private String topictype = "";
    /**
     * é¢˜ç›®Code
@@ -79,7 +80,7 @@
     * æ˜¯å¦å¿…å¡«
     */
    @ApiModelProperty("是否必填")
    private Long ismandatory;
    private String ismandatory;
    /**
     * æ˜¯å¦éšè—
@@ -111,7 +112,7 @@
     * ä¸Šä¼ æ ‡è®°
     */
    @ApiModelProperty("标签")
    private String tag;
    private String tag = "";
    /**
     * ä¸Šä¼ æ—¶é—´
@@ -127,11 +128,55 @@
    private Long svyTopicId;
    /**
     * é¢˜ç›®å†…容
     */
    @ApiModelProperty("题目内容")
    private String topicContent;
    /**
     * é€‚用方式:调查表1,智能语音2、人工3
     */
    @ApiModelProperty("适用方式:调查表1,智能语音2、人工3")
    private String suitway;
    /**
     * æ˜¯å¦å¯ç”¨ 0可用  1不可用
     */
    @ApiModelProperty("是否可用 0可用  1不可用")
    private String isavailable = "0";
    /**
     * è¯­è¨€
     */
    @ApiModelProperty("语言")
    private String language = "";
    /**
     * å…¶å®ƒæ•°æ®ï¼ˆå­˜å‚¨å˜é‡ï¼‰
     */
    @ApiModelProperty("其它数据(存储变量)")
    private String otherdata = "";
    /**
     * æ˜¯å¦å­˜åœ¨æ“ä½œï¼š1 æ–°å¢ž 2修改 3删除
     */
    @ApiModelProperty(value = "是否存在操作:1 æ–°å¢ž 2修改 3删除")
    private Integer isoperation;
    @ApiModelProperty("问题选项")
    private List<SvyLibTopicoption> svyLibTopicoptions;
    private List<SvyLibTopicoption> svyLibTopicoptions = new ArrayList<>();
    /**
     * pageNum
     */
    @ApiModelProperty(value = "pageNum")
    @Excel(name = "pageNum")
    private Integer pageNum;
    /**
     * pageSize
     */
    @ApiModelProperty(value = "pageSize")
    @Excel(name = "pageSize")
    private Integer pageSize;
}
smartor/src/main/java/com/smartor/domain/SvyLibTopicCategoryVO.java
@@ -6,6 +6,7 @@
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
@@ -71,6 +72,6 @@
     * å­å¯¹è±¡
     */
    @ApiModelProperty("子对象集")
    private List<SvyLibTopicCategory> svyLibTopicCategoryList;
    private List<SvyLibTopicCategory> svyLibTopicCategoryList = new ArrayList<>();
}
smartor/src/main/java/com/smartor/domain/TempDetpRelevance.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,55 @@
package com.smartor.domain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
 * æ¨¡æ¿ç§‘室关联对象 temp_detp_relevance
 *
 * @author ruoyi
 * @date 2024-01-04
 */
@Data
@ApiModel(value = "TempDetpRelevance", description = "模板科室关联对象")
public class TempDetpRelevance extends BaseEntity {
    private static final long serialVersionUID = 1L;
    /**
     *
     */
    @ApiModelProperty(value = "自增ID")
    private Long id;
    /**
     * æ¨¡æ¿id
     */
    @Excel(name = "模板id")
    @ApiModelProperty(value = "模板id")
    private Long tempid;
    /**
     * ç§‘室id
     */
    @Excel(name = "科室id")
    @ApiModelProperty(value = "科室id")
    private Long deptId;
    /**
     * 1 : é—®å·ã€2 : éšè®¿ã€3 : å®£æ•™
     */
    @Excel(name = "1 : é—®å·ã€2 : éšè®¿ã€3 : å®£æ•™")
    @ApiModelProperty(value = "1 : é—®å·ã€2 : éšè®¿ã€3 : å®£æ•™")
    private Long type;
    /**
     * åˆ é™¤ï¼š  0 æœªåˆ é™¤   1 åˆ é™¤
     */
    @ApiModelProperty(value = "删除:  0 æœªåˆ é™¤   1 åˆ é™¤")
    private Long delFlag;
}
smartor/src/main/java/com/smartor/mapper/HeTaskMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,63 @@
package com.smartor.mapper;
import com.smartor.domain.HeTask;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
 * å®£æ•™ä»»åŠ¡Mapper接口
 *
 * @author ruoyi
 * @date 2024-01-07
 */
@Mapper
public interface HeTaskMapper {
    /**
     * æŸ¥è¯¢å®£æ•™ä»»åŠ¡
     *
     * @param id å®£æ•™ä»»åС䏻键
     * @return å®£æ•™ä»»åŠ¡
     */
    public HeTask selectHeTaskById(Long id);
    /**
     * æŸ¥è¯¢å®£æ•™ä»»åŠ¡åˆ—è¡¨
     *
     * @param heTask å®£æ•™ä»»åŠ¡
     * @return å®£æ•™ä»»åŠ¡é›†åˆ
     */
    public List<HeTask> selectHeTaskList(HeTask heTask);
    /**
     * æ–°å¢žå®£æ•™ä»»åŠ¡
     *
     * @param heTask å®£æ•™ä»»åŠ¡
     * @return ç»“æžœ
     */
    public int insertHeTask(HeTask heTask);
    /**
     * ä¿®æ”¹å®£æ•™ä»»åŠ¡
     *
     * @param heTask å®£æ•™ä»»åŠ¡
     * @return ç»“æžœ
     */
    public int updateHeTask(HeTask heTask);
    /**
     * åˆ é™¤å®£æ•™ä»»åŠ¡
     *
     * @param id å®£æ•™ä»»åС䏻键
     * @return ç»“æžœ
     */
    public int deleteHeTaskById(Long id);
//    /**
//     * æ‰¹é‡åˆ é™¤å®£æ•™ä»»åŠ¡
//     *
//     * @param ids éœ€è¦åˆ é™¤çš„æ•°æ®ä¸»é”®é›†åˆ
//     * @return ç»“æžœ
//     */
//    public int deleteHeTaskByIds(Long[] ids);
}
smartor/src/main/java/com/smartor/mapper/IvrLibaTargetMapper.java
@@ -21,7 +21,7 @@
     * @param targetID æŒ‡æ ‡é€‰é¡¹åº“主键
     * @return æŒ‡æ ‡é€‰é¡¹åº“
     */
    public IvrLibaTarget selectIvrLibaTargetByTargetID(Long targetID);
    public IvrLibaTarget selectIvrLibaTargetByTargetID(Long id);
    /**
     * æŸ¥è¯¢æŒ‡æ ‡é€‰é¡¹åº“列表
@@ -55,7 +55,7 @@
     * @param targetID æŒ‡æ ‡é€‰é¡¹åº“主键
     * @return ç»“æžœ
     */
    public int deleteIvrLibaTargetByTargetID(Long targetID);
    public int deleteIvrLibaTargetByTargetID(Long id);
    /**
     * æ‰¹é‡åˆ é™¤æŒ‡æ ‡é€‰é¡¹åº“
@@ -63,5 +63,5 @@
     * @param targetIDs éœ€è¦åˆ é™¤çš„æ•°æ®ä¸»é”®é›†åˆ
     * @return ç»“æžœ
     */
    public int deleteIvrLibaTargetByTargetIDs(Long[] targetIDs);
    public int deleteIvrLibaTargetByTargetIDs(Long[] ids);
}
smartor/src/main/java/com/smartor/mapper/IvrLibaTemplateTargetMapper.java
@@ -20,7 +20,7 @@
     * @param ID æ¨¡ç‰ˆé—®é¢˜æŒ‡æ ‡åº“主键
     * @return æ¨¡ç‰ˆé—®é¢˜æŒ‡æ ‡åº“
     */
    public IvrLibaTemplateTarget selectIvrLibaTemplateTargetByID(Long ID);
    public IvrLibaTemplateTarget selectIvrLibaTemplateTargetByID(Long id);
    /**
     * æŸ¥è¯¢æ¨¡ç‰ˆé—®é¢˜æŒ‡æ ‡åº“列表
@@ -52,7 +52,7 @@
     * @param ID æ¨¡ç‰ˆé—®é¢˜æŒ‡æ ‡åº“主键
     * @return ç»“æžœ
     */
    public int deleteIvrLibaTemplateTargetByID(Long ID);
    public int deleteIvrLibaTemplateTargetByID(Long id);
    /**
     * æ‰¹é‡åˆ é™¤æ¨¡ç‰ˆé—®é¢˜æŒ‡æ ‡åº“
@@ -60,5 +60,5 @@
     * @param IDs éœ€è¦åˆ é™¤çš„æ•°æ®ä¸»é”®é›†åˆ
     * @return ç»“æžœ
     */
    public int deleteIvrLibaTemplateTargetByIDs(Long[] IDs);
    public int deleteIvrLibaTemplateTargetByIDs(Long[] ids);
}
smartor/src/main/java/com/smartor/mapper/PatHetaskRelevanceMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,64 @@
package com.smartor.mapper;
import com.smartor.domain.PatHetaskRelevance;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
 * æ‚£è€…与宣教任务关联Mapper接口
 *
 * @author ruoyi
 * @date 2024-01-07
 */
@Mapper
public interface PatHetaskRelevanceMapper
{
    /**
     * æŸ¥è¯¢æ‚£è€…与宣教任务关联
     *
     * @param id æ‚£è€…与宣教任务关联主键
     * @return æ‚£è€…与宣教任务关联
     */
    public PatHetaskRelevance selectPatHetaskRelevanceById(Long id);
    /**
     * æŸ¥è¯¢æ‚£è€…与宣教任务关联列表
     *
     * @param patHetaskRelevance æ‚£è€…与宣教任务关联
     * @return æ‚£è€…与宣教任务关联集合
     */
    public List<PatHetaskRelevance> selectPatHetaskRelevanceList(PatHetaskRelevance patHetaskRelevance);
    /**
     * æ–°å¢žæ‚£è€…与宣教任务关联
     *
     * @param patHetaskRelevance æ‚£è€…与宣教任务关联
     * @return ç»“æžœ
     */
    public int insertPatHetaskRelevance(PatHetaskRelevance patHetaskRelevance);
    /**
     * ä¿®æ”¹æ‚£è€…与宣教任务关联
     *
     * @param patHetaskRelevance æ‚£è€…与宣教任务关联
     * @return ç»“æžœ
     */
    public int updatePatHetaskRelevance(PatHetaskRelevance patHetaskRelevance);
    /**
     * åˆ é™¤æ‚£è€…与宣教任务关联
     *
     * @param id æ‚£è€…与宣教任务关联主键
     * @return ç»“æžœ
     */
    public int deletePatHetaskRelevanceById(Long id);
    /**
     * æ‰¹é‡åˆ é™¤æ‚£è€…与宣教任务关联
     *
     * @param ids éœ€è¦åˆ é™¤çš„æ•°æ®ä¸»é”®é›†åˆ
     * @return ç»“æžœ
     */
    public int deletePatHetaskRelevanceByIds(Long[] ids);
}
smartor/src/main/java/com/smartor/mapper/TempDetpRelevanceMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,63 @@
package com.smartor.mapper;
import com.smartor.domain.TempDetpRelevance;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
 * æ¨¡æ¿ç§‘室关联Mapper接口
 *
 * @author ruoyi
 * @date 2024-01-04
 */
@Mapper
public interface TempDetpRelevanceMapper {
    /**
     * æŸ¥è¯¢æ¨¡æ¿ç§‘室关联
     *
     * @param id æ¨¡æ¿ç§‘室关联主键
     * @return æ¨¡æ¿ç§‘室关联
     */
    public TempDetpRelevance selectTempDetpRelevanceById(Long id);
    /**
     * æŸ¥è¯¢æ¨¡æ¿ç§‘室关联列表
     *
     * @param tempDetpRelevance æ¨¡æ¿ç§‘室关联
     * @return æ¨¡æ¿ç§‘室关联集合
     */
    public List<TempDetpRelevance> selectTempDetpRelevanceList(TempDetpRelevance tempDetpRelevance);
    /**
     * æ–°å¢žæ¨¡æ¿ç§‘室关联
     *
     * @param tempDetpRelevance æ¨¡æ¿ç§‘室关联
     * @return ç»“æžœ
     */
    public int insertTempDetpRelevance(TempDetpRelevance tempDetpRelevance);
    /**
     * ä¿®æ”¹æ¨¡æ¿ç§‘室关联
     *
     * @param tempDetpRelevance æ¨¡æ¿ç§‘室关联
     * @return ç»“æžœ
     */
    public int updateTempDetpRelevance(TempDetpRelevance tempDetpRelevance);
    /**
     * åˆ é™¤æ¨¡æ¿ç§‘室关联
     *
     * @param id æ¨¡æ¿ç§‘室关联主键
     * @return ç»“æžœ
     */
    public int deleteTempDetpRelevanceById(Long id);
    /**
     * æ‰¹é‡åˆ é™¤æ¨¡æ¿ç§‘室关联
     *
     * @param ids éœ€è¦åˆ é™¤çš„æ•°æ®ä¸»é”®é›†åˆ
     * @return ç»“æžœ
     */
    public int deleteTempDetpRelevanceByIds(Long[] ids);
}
smartor/src/main/java/com/smartor/service/IHeLibraryService.java
@@ -53,14 +53,6 @@
    public int deleteHeLibraryByIds(Long[] ids);
    /**
     * åˆ é™¤å®£æ•™èµ„料库信息
     *
     * @param id å®£æ•™èµ„料库主键
     * @return ç»“æžœ
     */
    public int deleteHeLibraryById(Long id);
    /**
     * æ–°å¢žæˆ–修改宣教详情
     */
    public Integer saveOrUpdateScript(HeLibraryVO heLibraryVO);
@@ -68,5 +60,5 @@
    /**
     * æŸ¥è¯¢æ¨¡æ¿è¯¦æƒ…根据条件
     */
    public HeLibraryVO selectInfoByCondition(HeLibrary heLibrary);
    public List<HeLibraryVO> selectInfoByCondition(HeLibrary heLibrary);
}
smartor/src/main/java/com/smartor/service/IHeTaskService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,69 @@
package com.smartor.service;
import com.smartor.domain.*;
import java.util.List;
/**
 * å®£æ•™ä»»åŠ¡Service接口
 *
 * @author ruoyi
 * @date 2024-01-07
 */
public interface IHeTaskService {
    /**
     * æŸ¥è¯¢å®£æ•™ä»»åŠ¡
     *
     * @param id å®£æ•™ä»»åС䏻键
     * @return å®£æ•™ä»»åŠ¡
     */
    public HeTaskVO selectHeTaskById(Long id);
    /**
     * æŸ¥è¯¢å®£æ•™ä»»åŠ¡åˆ—è¡¨
     *
     * @param heTask å®£æ•™ä»»åŠ¡
     * @return å®£æ•™ä»»åŠ¡é›†åˆ
     */
    public List<PatHetaskRelevanceVO> selectHeTaskList(PatHetaskRelevanceVO patHetaskRelevanceVO);
    /**
     * æ–°å¢žå®£æ•™ä»»åŠ¡
     *
     * @param heTaskVO å®£æ•™ä»»åŠ¡
     * @return ç»“æžœ
     */
    public int insertHeTask(HeTaskVO heTaskVO);
    /**
     * ä¿®æ”¹å®£æ•™ä»»åŠ¡
     *
     * @param heTask å®£æ•™ä»»åŠ¡
     * @return ç»“æžœ
     */
    public int updateHeTask(HeTask heTask);
    /**
     * æ‰¹é‡åˆ é™¤å®£æ•™ä»»åŠ¡
     *
     * @param ids éœ€è¦åˆ é™¤çš„宣教任务主键集合
     * @return ç»“æžœ
     */
    public int deleteHeTaskByIds(Long[] ids);
    /**
     * åˆ é™¤å®£æ•™ä»»åŠ¡ä¿¡æ¯
     *
     * @param id å®£æ•™ä»»åС䏻键
     * @return ç»“æžœ
     */
    public int deleteHeTaskById(Long id);
    /**
     * èŽ·å–æ‚£è€…ä¿¡æ¯
     *
     * @param patArchiveReq
     * @return PatHetaskRelevance
     */
    public List<PatHetaskRelevance> getPatientInfo(PatArchiveReq patArchiveReq);
}
smartor/src/main/java/com/smartor/service/IIvrLibaTargetService.java
@@ -18,7 +18,7 @@
     * @param targetID æŒ‡æ ‡é€‰é¡¹åº“主键
     * @return æŒ‡æ ‡é€‰é¡¹åº“
     */
    public IvrLibaTarget selectIvrLibaTargetByTargetID(Long targetID);
    public IvrLibaTarget selectIvrLibaTargetByTargetID(Long id);
    /**
     * æŸ¥è¯¢æŒ‡æ ‡é€‰é¡¹åº“列表
@@ -59,7 +59,7 @@
     * @param targetIDs éœ€è¦åˆ é™¤çš„æŒ‡æ ‡é€‰é¡¹åº“主键集合
     * @return ç»“æžœ
     */
    public int deleteIvrLibaTargetByTargetIDs(Long[] targetIDs);
    public int deleteIvrLibaTargetByTargetIDs(Long[] ids);
    /**
     * åˆ é™¤æŒ‡æ ‡é€‰é¡¹åº“信息
@@ -67,5 +67,5 @@
     * @param targetID æŒ‡æ ‡é€‰é¡¹åº“主键
     * @return ç»“æžœ
     */
    public int deleteIvrLibaTargetByTargetID(Long targetID);
    public int deleteIvrLibaTargetByTargetID(Long id);
}
smartor/src/main/java/com/smartor/service/IPatHetaskRelevanceService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,62 @@
package com.smartor.service;
import com.smartor.domain.PatHetaskRelevance;
import java.util.List;
/**
 * æ‚£è€…与宣教任务关联Service接口
 *
 * @author ruoyi
 * @date 2024-01-07
 */
public interface IPatHetaskRelevanceService
{
    /**
     * æŸ¥è¯¢æ‚£è€…与宣教任务关联
     *
     * @param id æ‚£è€…与宣教任务关联主键
     * @return æ‚£è€…与宣教任务关联
     */
    public PatHetaskRelevance selectPatHetaskRelevanceById(Long id);
    /**
     * æŸ¥è¯¢æ‚£è€…与宣教任务关联列表
     *
     * @param patHetaskRelevance æ‚£è€…与宣教任务关联
     * @return æ‚£è€…与宣教任务关联集合
     */
    public List<PatHetaskRelevance> selectPatHetaskRelevanceList(PatHetaskRelevance patHetaskRelevance);
    /**
     * æ–°å¢žæ‚£è€…与宣教任务关联
     *
     * @param patHetaskRelevance æ‚£è€…与宣教任务关联
     * @return ç»“æžœ
     */
    public int insertPatHetaskRelevance(PatHetaskRelevance patHetaskRelevance);
    /**
     * ä¿®æ”¹æ‚£è€…与宣教任务关联
     *
     * @param patHetaskRelevance æ‚£è€…与宣教任务关联
     * @return ç»“æžœ
     */
    public int updatePatHetaskRelevance(PatHetaskRelevance patHetaskRelevance);
    /**
     * æ‰¹é‡åˆ é™¤æ‚£è€…与宣教任务关联
     *
     * @param ids éœ€è¦åˆ é™¤çš„æ‚£è€…与宣教任务关联主键集合
     * @return ç»“æžœ
     */
    public int deletePatHetaskRelevanceByIds(Long[] ids);
    /**
     * åˆ é™¤æ‚£è€…与宣教任务关联信息
     *
     * @param id æ‚£è€…与宣教任务关联主键
     * @return ç»“æžœ
     */
    public int deletePatHetaskRelevanceById(Long id);
}
smartor/src/main/java/com/smartor/service/ITempDetpRelevanceService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,62 @@
package com.smartor.service;
import com.smartor.domain.TempDetpRelevance;
import java.util.List;
/**
 * æ¨¡æ¿ç§‘室关联Service接口
 *
 * @author ruoyi
 * @date 2024-01-04
 */
public interface ITempDetpRelevanceService
{
    /**
     * æŸ¥è¯¢æ¨¡æ¿ç§‘室关联
     *
     * @param id æ¨¡æ¿ç§‘室关联主键
     * @return æ¨¡æ¿ç§‘室关联
     */
    public TempDetpRelevance selectTempDetpRelevanceById(Long id);
    /**
     * æŸ¥è¯¢æ¨¡æ¿ç§‘室关联列表
     *
     * @param tempDetpRelevance æ¨¡æ¿ç§‘室关联
     * @return æ¨¡æ¿ç§‘室关联集合
     */
    public List<TempDetpRelevance> selectTempDetpRelevanceList(TempDetpRelevance tempDetpRelevance);
    /**
     * æ–°å¢žæ¨¡æ¿ç§‘室关联
     *
     * @param tempDetpRelevance æ¨¡æ¿ç§‘室关联
     * @return ç»“æžœ
     */
    public int insertTempDetpRelevance(TempDetpRelevance tempDetpRelevance);
    /**
     * ä¿®æ”¹æ¨¡æ¿ç§‘室关联
     *
     * @param tempDetpRelevance æ¨¡æ¿ç§‘室关联
     * @return ç»“æžœ
     */
    public int updateTempDetpRelevance(TempDetpRelevance tempDetpRelevance);
    /**
     * æ‰¹é‡åˆ é™¤æ¨¡æ¿ç§‘室关联
     *
     * @param ids éœ€è¦åˆ é™¤çš„æ¨¡æ¿ç§‘室关联主键集合
     * @return ç»“æžœ
     */
    public int deleteTempDetpRelevanceByIds(Long[] ids);
    /**
     * åˆ é™¤æ¨¡æ¿ç§‘室关联信息
     *
     * @param id æ¨¡æ¿ç§‘室关联主键
     * @return ç»“æžœ
     */
    public int deleteTempDetpRelevanceById(Long id);
}
smartor/src/main/java/com/smartor/service/impl/HeLibraryAssortServiceImpl.java
@@ -10,6 +10,7 @@
import com.smartor.mapper.HeLibraryAssortMapper;
import com.smartor.service.IHeLibraryAssortService;
import io.jsonwebtoken.lang.Collections;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -22,6 +23,7 @@
 * @author ruoyi
 * @date 2023-12-24
 */
@Slf4j
@Service
public class HeLibraryAssortServiceImpl implements IHeLibraryAssortService {
    @Autowired
@@ -93,9 +95,15 @@
        }
        HeLibraryAssort heLibraryAssort = DtoConversionUtils.sourceToTarget(heLibraryAssortVO, HeLibraryAssort.class);
        Integer integer = heLibraryAssortMapper.selectSeqMax();
        if (integer != null) {
            heLibraryAssort.setSeqno(integer.longValue() + 1);
        //获取序号最大值
        Integer seqMax = null;
        try {
            seqMax = heLibraryAssortMapper.selectSeqMax();
        } catch (Exception e) {
            seqMax = 0;
        }
        if (seqMax != null) {
            heLibraryAssort.setSeqno(seqMax.longValue() + 1);
        } else {
            heLibraryAssort.setSeqno(1L);
        }
@@ -108,9 +116,14 @@
        if (CollectionUtils.isNotEmpty(heLibraryAssortVO.getHeLibraryAssortList())) {
            for (HeLibraryAssort heLibraryAssort1 : heLibraryAssortVO.getHeLibraryAssortList()) {
                heLibraryAssort1.setPid(heLibraryAssort.getId());
                Integer seqMax = heLibraryAssortMapper.selectSeqMax();
                if (seqMax != null) {
                    heLibraryAssort1.setSeqno(seqMax.longValue() + 1);
                Integer seqMax1 = null;
                try {
                    seqMax1 = heLibraryAssortMapper.selectSeqMax();
                } catch (Exception e) {
                    seqMax1 = 0;
                }
                if (seqMax1 != null) {
                    heLibraryAssort1.setSeqno(seqMax1.longValue() + 1);
                } else {
                    heLibraryAssort1.setSeqno(1L);
                }
@@ -145,6 +158,10 @@
        Integer i = null;
        for (Long id : ids) {
            if (id < 0) {
                log.info("宣教分类id小于0,为默认分类,不能删除,id:{}", id);
                continue;
            }
            i = heLibraryAssortMapper.deleteHeLibraryAssortById(id);
            //删除成功后,如果该删除的ID下有子数据,则将子数据放到未分配下面
            HeLibraryAssort heLibraryAssort = new HeLibraryAssort();
@@ -153,7 +170,7 @@
            if (CollectionUtils.isNotEmpty(heLibraryAssortList1)) {
                for (HeLibraryAssort heLibraryAssort1 : heLibraryAssortList1) {
                    //设置未分配ID
                    heLibraryAssort1.setPid(999999999L);
                    heLibraryAssort1.setPid(-1L);
                    heLibraryAssortMapper.updateHeLibraryAssort(heLibraryAssort1);
                }
            }
smartor/src/main/java/com/smartor/service/impl/HeLibraryServiceImpl.java
@@ -8,8 +8,10 @@
import com.smartor.domain.HeLibrary;
import com.smartor.domain.HeLibraryTag;
import com.smartor.domain.HeLibraryVO;
import com.smartor.domain.TempDetpRelevance;
import com.smartor.mapper.HeLibraryMapper;
import com.smartor.mapper.HeLibraryTagMapper;
import com.smartor.mapper.TempDetpRelevanceMapper;
import com.smartor.service.IHeLibraryService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
@@ -30,6 +32,9 @@
    @Autowired
    private HeLibraryTagMapper heLibraryTagMapper;
    @Autowired
    private TempDetpRelevanceMapper tempDetpRelevanceMapper;
    /**
     * æŸ¥è¯¢å®£æ•™èµ„料库
@@ -85,19 +90,13 @@
     */
    @Override
    public int deleteHeLibraryByIds(Long[] ids) {
        return heLibraryMapper.deleteHeLibraryByIds(ids);
        Integer i = null;
        for (Long id : ids) {
            i = heLibraryMapper.deleteHeLibraryById(id);
        }
        return i;
    }
    /**
     * åˆ é™¤å®£æ•™èµ„料库信息
     *
     * @param id å®£æ•™èµ„料库主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteHeLibraryById(Long id) {
        return heLibraryMapper.deleteHeLibraryById(id);
    }
    /**
     * æ–°å¢žæˆ–修改宣教详情
@@ -135,26 +134,37 @@
            }
        }
        //对科室进行处理
        for (TempDetpRelevance tempDetpRelevance : heLibraryVO.getTempDetpRelevances()) {
            if (tempDetpRelevance.getId() == null) {
                //新增
                tempDetpRelevance.setTempid(heLibrary.getId());
                tempDetpRelevance.setType(3L);
                tempDetpRelevanceMapper.insertTempDetpRelevance(tempDetpRelevance);
            } else {
                tempDetpRelevanceMapper.updateTempDetpRelevance(tempDetpRelevance);
            }
        }
        return i;
    }
    @Override
    public HeLibraryVO selectInfoByCondition(HeLibrary heLibrary) {
    public List<HeLibraryVO> selectInfoByCondition(HeLibrary heLibrary) {
        log.info("查询模板详情根据条件的入参为:{}", heLibrary);
        List<HeLibrary> heLibraries = selectHeLibraryList(heLibrary);
        if (CollectionUtils.isEmpty(heLibraries)) {
            log.info("提供的条件,查询宣教数据为空:{}", heLibraries);
            throw new BaseException("提供的条件,查询宣教数据为空");
        }
        //用于返参
        HeLibraryVO heLibraryVO = DtoConversionUtils.sourceToTarget(heLibraries.get(0), HeLibraryVO.class);
        List<HeLibraryVO> heLibraryVOS = DtoConversionUtils.sourceToTarget(heLibraries, HeLibraryVO.class);
        if (CollectionUtils.isNotEmpty(heLibraryVOS) && heLibraryVOS.size() == 1) {
        //根据宣教ID查询宣教指标集合
        HeLibraryTag heLibraryTag = new HeLibraryTag();
        heLibraryTag.setHeid(heLibraryVO.getId());
            heLibraryTag.setHeid(heLibraryVOS.get(0).getId());
        List<HeLibraryTag> heLibraryTags = heLibraryTagMapper.selectHeLibraryTagList(heLibraryTag);
        heLibraryVO.setHeLibraryTagList(heLibraryTags);
        return heLibraryVO;
            heLibraryVOS.get(0).setHeLibraryTagList(heLibraryTags);
        }
        return heLibraryVOS;
    }
}
smartor/src/main/java/com/smartor/service/impl/HeTaskServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,271 @@
package com.smartor.service.impl;
import com.ruoyi.common.enums.SendTypeEnum;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.DtoConversionUtils;
import com.smartor.common.SendService;
import com.smartor.domain.*;
import com.smartor.mapper.HeTaskMapper;
import com.smartor.mapper.PatArchiveMapper;
import com.smartor.mapper.PatHetaskRelevanceMapper;
import com.smartor.service.IHeTaskService;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
/**
 * å®£æ•™ä»»åŠ¡Service业务层处理
 *
 * @author ruoyi
 * @date 2024-01-07
 */
@Service
public class HeTaskServiceImpl implements IHeTaskService {
    @Autowired
    private HeTaskMapper heTaskMapper;
    @Autowired
    private PatArchiveMapper patArchiveMapper;
    @Autowired
    private PatArchiveServiceImpl patArchiveService;
    @Autowired
    private HeLibraryServiceImpl heLibraryService;
    @Autowired
    private PatHetaskRelevanceMapper patHetaskRelevanceMapper;
    @Autowired
    private SendService sendService;
    /**
     * æŸ¥è¯¢å®£æ•™ä»»åŠ¡
     *
     * @param id å®£æ•™ä»»åС䏻键
     * @return å®£æ•™ä»»åŠ¡
     */
    @Override
    public HeTaskVO selectHeTaskById(Long id) {
//        HeTask heTask = heTaskMapper.selectHeTaskById(id);
//        HeTaskVO heTaskVO = DtoConversionUtils.sourceToTarget(heTask, HeTaskVO.class);
//
//        //获取患者信息
//        if (StringUtils.isNotEmpty(heTask.getPatientid())) {
//            List<PatArchive> patArchives = new ArrayList<>();
//            String[] patientids = heTask.getPatientid().split(",");
//            for (String patientid : patientids) {
//                PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(Long.valueOf(patientid));
//                patArchives.add(patArchive);
//            }
//            heTaskVO.setPatArchives(patArchives);
//        }
//
//        //获取宣教模板信息
//        if (heTask.getPreachcategoryid() != null) {
//            HeLibrary heLibrary = new HeLibrary();
//            heLibrary.setId(heTask.getPreachcategoryid());
//            HeLibraryVO heLibraryVO = heLibraryService.selectInfoByCondition(heLibrary);
//            heTaskVO.setHeLibraryVOs(heLibraryVO);
//        }
        return null;
    }
    /**
     * æŸ¥è¯¢å®£æ•™ä»»åŠ¡åˆ—è¡¨
     *
     * @param patHetaskRelevanceVO å®£æ•™ä»»åŠ¡
     * @return å®£æ•™ä»»åŠ¡
     */
    @Override
    public List<PatHetaskRelevanceVO> selectHeTaskList(PatHetaskRelevanceVO patHetaskRelevanceVO) {
        PatHetaskRelevance patHetaskRelevance = new PatHetaskRelevance();
        List<PatHetaskRelevance> patHetaskRelevances = patHetaskRelevanceMapper.selectPatHetaskRelevanceList(patHetaskRelevance);
        List<PatHetaskRelevanceVO> patHetaskRelevanceVOS = DtoConversionUtils.sourceToTarget(patHetaskRelevances, PatHetaskRelevanceVO.class);
        for (PatHetaskRelevanceVO patHetaskRelevanceVO1 : patHetaskRelevanceVOS) {
            HeTask heTask1 = heTaskMapper.selectHeTaskById(patHetaskRelevanceVO1.getHeTaskId());
            patHetaskRelevanceVO1.setHeTask(heTask1);
        }
        return patHetaskRelevanceVOS;
    }
    /**
     * æ–°å¢žå®£æ•™ä»»åŠ¡
     *
     * @param heTaskVO å®£æ•™ä»»åŠ¡
     * @return ç»“æžœ
     */
    @Transactional(rollbackFor = Exception.class)
    @Override
    public int insertHeTask(HeTaskVO heTaskVO) {
        Integer integer = 0;
        //判断发送状态  0 æš‚停发送  1 å®šæ—¶å‘送  2 ç«‹å³å‘送
        if (heTaskVO.getIsSend() == 2) {
            //发送方式
            String sendtype = SendTypeEnum.getDescByCode(heTaskVO.getPreachform().intValue());
            for (PatHetaskRelevance patHetaskRelevance : heTaskVO.getPatHetaskRelevances()) {
                //开始发送
                SendMagParam sendMagParam = new SendMagParam();
                sendMagParam.setType(sendtype);
                sendMagParam.setPhone(patHetaskRelevance.getPhone());
                //这里的模板ID不确定,先这样写
                sendMagParam.setTmpCode("SMS_461860582");
                sendMagParam.setContent("Test发送数据");
                Boolean success = sendService.sendMsg(sendMagParam);
                if (success) {
                    integer = integer + 1;
                }
                //必须全部成功,才能修改发送状态
                if (heTaskVO.getPatHetaskRelevances().size() == integer) {
                    //如果发送成功
                    heTaskVO.setSendState(1L);
                }
            }
            //将任务信息新增到宣教任务表中
            HeTask heTask = DtoConversionUtils.sourceToTarget(heTaskVO, HeTask.class);
            heTask.setCreateTime(DateUtils.getNowDate());
            heTaskMapper.insertHeTask(heTask);
            //将任务与患者关联
            Integer i = null;
            if (ObjectUtils.isNotEmpty(heTaskVO.getPatHetaskRelevances())) {
                for (PatHetaskRelevance patHetaskRelevance : heTaskVO.getPatHetaskRelevances()) {
                    patHetaskRelevance.setHeTaskId(heTask.getId());
                    i = patHetaskRelevanceMapper.insertPatHetaskRelevance(patHetaskRelevance);
                }
            }
        } else if (heTaskVO.getIsSend() == 1) {
            //定时发送(异步)
            Timer timer = new Timer();
            timer.schedule(new TimerTask() {
                @Override
                public void run() {
                    Integer integer = 0;
                    for (PatHetaskRelevance patHetaskRelevance : heTaskVO.getPatHetaskRelevances()) {
                        String sendtype = SendTypeEnum.getDescByCode(heTaskVO.getPreachform().intValue());
                        SendMagParam sendMagParam = new SendMagParam();
                        sendMagParam.setType(sendtype);
                        sendMagParam.setPhone(patHetaskRelevance.getPhone());
                        //这里的模板ID不确定,先这样写
                        sendMagParam.setTmpCode("SMS_461860582");
                        sendMagParam.setContent("Test发送数据");
                        Boolean success = sendService.sendMsg(sendMagParam);
                        if (success) {
                            integer = integer + 1;
                        }
                    }
                    //必须全部成功,才能修改发送状态
                    if (heTaskVO.getPatHetaskRelevances().size() == integer) {
                        //如果发送成功
                        heTaskVO.setSendState(1L);
                    }
                    HeTask heTask = DtoConversionUtils.sourceToTarget(heTaskVO, HeTask.class);
                    heTask.setCreateTime(DateUtils.getNowDate());
                    heTaskMapper.insertHeTask(heTask);
                    if (ObjectUtils.isNotEmpty(heTaskVO.getPatHetaskRelevances())) {
                        for (PatHetaskRelevance patHetaskRelevance : heTaskVO.getPatHetaskRelevances()) {
                            patHetaskRelevance.setHeTaskId(heTask.getId());
                            patHetaskRelevanceMapper.insertPatHetaskRelevance(patHetaskRelevance);
                        }
                    }
                }
            }, heTaskVO.getSendTime());
        }
        return 1;
    }
    /**
     * ä¿®æ”¹å®£æ•™ä»»åŠ¡
     *
     * @param heTask å®£æ•™ä»»åŠ¡
     * @return ç»“æžœ
     */
    @Override
    public int updateHeTask(HeTask heTask) {
        heTask.setUpdateTime(DateUtils.getNowDate());
        return heTaskMapper.updateHeTask(heTask);
    }
    /**
     * æ‰¹é‡åˆ é™¤å®£æ•™ä»»åŠ¡
     *
     * @param ids éœ€è¦åˆ é™¤çš„宣教任务主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteHeTaskByIds(Long[] ids) {
        Integer i = null;
        for (Long id : ids) {
            i = heTaskMapper.deleteHeTaskById(id);
        }
        return i;
    }
    /**
     * åˆ é™¤å®£æ•™ä»»åŠ¡ä¿¡æ¯
     *
     * @param id å®£æ•™ä»»åС䏻键
     * @return ç»“æžœ
     */
    @Override
    public int deleteHeTaskById(Long id) {
        return heTaskMapper.deleteHeTaskById(id);
    }
    /**
     * èŽ·å–æ‚£è€…ä¿¡æ¯
     *
     * @param patArchiveReq
     * @return
     */
    @Override
    public List<PatHetaskRelevance> getPatientInfo(PatArchiveReq patArchiveReq) {
        List<PatHetaskRelevance> patHetaskRelevances = new ArrayList<>();
        List<PatArchive> patArchiveList = new ArrayList<>();
        if (patArchiveReq.getAllhosp() != null && patArchiveReq.getAllhosp() == 1) {
            //  æŸ¥çœ‹ä½é™¢  1  æŸ¥çœ‹é—¨è¯Š  2   æŸ¥çœ‹ä½“检  3
            List<PatArchive> patArchives1 = patArchiveMapper.selectPatArchiveInfoByInhosp(patArchiveReq);
            if (CollectionUtils.isNotEmpty(patArchives1)) {
                patArchiveList.addAll(patArchives1);
            }
        } else if (patArchiveReq.getAllhosp() != null && patArchiveReq.getAllhosp() == 2) {
            // æŸ¥çœ‹ä½é™¢  1  æŸ¥çœ‹é—¨è¯Š  2   æŸ¥çœ‹ä½“检  3
            List<PatArchive> patArchives2 = patArchiveMapper.selectPatArchiveInfoByOuthosp(patArchiveReq);
            if (CollectionUtils.isNotEmpty(patArchives2)) {
                patArchiveList.addAll(patArchives2);
            }
        } else if (patArchiveReq.getAllhosp() != null && patArchiveReq.getAllhosp() == 3) {
            //  æŸ¥çœ‹ä½é™¢  1  æŸ¥çœ‹é—¨è¯Š  2   æŸ¥çœ‹ä½“检  3
            List<PatArchive> patArchives3 = patArchiveMapper.selectPatArchiveInfoByPhysical(patArchiveReq);
            if (CollectionUtils.isNotEmpty(patArchives3)) {
                patArchiveList.addAll(patArchives3);
            }
        }
        for (PatArchive patArchive : patArchiveList) {
            PatHetaskRelevance patHetaskRelevance = DtoConversionUtils.sourceToTarget(patArchive, PatHetaskRelevance.class);
            patHetaskRelevance.setDept(patArchive.getArchiveby());
            patHetaskRelevance.setCreateTime(patArchive.getCreateTime());
            patHetaskRelevance.setCreateBy(patArchive.getCreateBy());
            patHetaskRelevances.add(patHetaskRelevance);
        }
        return patHetaskRelevances;
    }
}
smartor/src/main/java/com/smartor/service/impl/IvrLibaExtemplateCategoryServiceImpl.java
@@ -5,6 +5,7 @@
import com.smartor.domain.IvrLibaExtemplateCategory;
import com.smartor.mapper.IvrLibaExtemplateCategoryMapper;
import com.smartor.service.IIvrLibaExtemplateCategoryService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -17,6 +18,7 @@
 * @author ruoyi
 * @date 2023-12-27
 */
@Slf4j
@Service
public class IvrLibaExtemplateCategoryServiceImpl implements IIvrLibaExtemplateCategoryService {
    @Autowired
@@ -85,6 +87,11 @@
    public int deleteIvrLibaExtemplateCategoryByIntertcatids(Long[] intertcatids) {
        Integer i = null;
        for (Long intertcatid : intertcatids) {
            //负数的ID为默认值,不可以删除
            if (intertcatid < 0) {
                log.info("intertcatid的值为:{}", intertcatid);
                continue;
            }
            i = ivrLibaExtemplateCategoryMapper.deleteIvrLibaExtemplateCategoryByIntertcatid(intertcatid);
            //删除成功后,如果该删除的ID下有子数据,则将子数据放到未分配下面
            IvrLibaExtemplateCategory ivrLibaExtemplateCategory = new IvrLibaExtemplateCategory();
@@ -93,7 +100,7 @@
            if (CollectionUtils.isNotEmpty(ivrLibaExtemplateCategories)) {
                for (IvrLibaExtemplateCategory ivrLibaExtemplateCategory1 : ivrLibaExtemplateCategories) {
                    //设置未分配ID
                    ivrLibaExtemplateCategory1.setPid(999999999L);
                    ivrLibaExtemplateCategory1.setPid(-1L);
                    ivrLibaExtemplateCategoryMapper.updateIvrLibaExtemplateCategory(ivrLibaExtemplateCategory1);
                }
            }
smartor/src/main/java/com/smartor/service/impl/IvrLibaScriptAssortServiceImpl.java
@@ -71,7 +71,14 @@
        if (ObjectUtils.isEmpty(ivrLibaScriptAssortVO)) {
            throw new BaseException("入参为空,请检查后,再新增");
        }
        Integer seqMax = ivrLibaScriptAssortMapper.selectSeqMax();
        //获取序号最大值
        Integer seqMax = null;
        try {
            seqMax = ivrLibaScriptAssortMapper.selectSeqMax();
        } catch (Exception e) {
            seqMax = 0;
        }
        IvrLibaScriptAssort ivrLibaScriptAssort = DtoConversionUtils.sourceToTarget(ivrLibaScriptAssortVO, IvrLibaScriptAssort.class);
        if (seqMax == null) {
            ivrLibaScriptAssort.setSeqno(1);
@@ -84,7 +91,13 @@
        //新增二级树
        if (CollectionUtils.isNotEmpty(ivrLibaScriptAssortVO.getIvrLibaScriptAssortList())) {
            for (IvrLibaScriptAssort ivrLibaScriptAssort1 : ivrLibaScriptAssortVO.getIvrLibaScriptAssortList()) {
                Integer seqMax1 = ivrLibaScriptAssortMapper.selectSeqMax();
                //获取序号最大值
                Integer seqMax1 = null;
                try {
                    seqMax1 = ivrLibaScriptAssortMapper.selectSeqMax();
                } catch (Exception e) {
                    seqMax1 = 0;
                }
                ivrLibaScriptAssort1.setPid(ivrLibaScriptAssort.getId());
                if (seqMax == null) {
                    ivrLibaScriptAssort1.setSeqno(1);
@@ -122,6 +135,10 @@
    public Integer deleteIvrLibaScriptAssortByIds(Long[] ids) {
        Integer i = null;
        for (Long id : ids) {
            if (id < 0) {
                log.info("该问题话术分类id为默认ID,不能删除,id:{}", id);
                continue;
            }
            i = ivrLibaScriptAssortMapper.deleteIvrLibaScriptAssortById(id);
            //查询删除id所对就的子数据
            IvrLibaScriptAssort ivrLibaScriptAssort = new IvrLibaScriptAssort();
@@ -130,7 +147,7 @@
            if (CollectionUtils.isNotEmpty(ivrLibaScriptAssorts)) {
                for (IvrLibaScriptAssort ivrLibaScriptAssort1 : ivrLibaScriptAssorts) {
                    ivrLibaScriptAssort1.setPid(999999999L);
                    ivrLibaScriptAssort1.setPid(-1L);
                    ivrLibaScriptAssortMapper.updateIvrLibaScriptAssort(ivrLibaScriptAssort1);
                }
            }
smartor/src/main/java/com/smartor/service/impl/IvrLibaTargetAssortServiceImpl.java
@@ -85,7 +85,14 @@
        if (ObjectUtils.isEmpty(ivrLibaTargetAssortVO)) {
            throw new BaseException("入参为空,请检查后,再新增");
        }
        Integer seqMax = ivrLibaTargetAssortMapper.selectSeqMax();
        //获取序号最大值
        Integer seqMax = null;
        try {
            seqMax = ivrLibaTargetAssortMapper.selectSeqMax();
        } catch (Exception e) {
            seqMax = 0;
        }
        IvrLibaTargetAssort ivrLibaTargetAssort = DtoConversionUtils.sourceToTarget(ivrLibaTargetAssortVO, IvrLibaTargetAssort.class);
        ivrLibaTargetAssort.setSeqno(1);
        if (seqMax != null) {
@@ -97,7 +104,13 @@
        //新增二级树
        if (CollectionUtils.isNotEmpty(ivrLibaTargetAssortVO.getIvrLibaTargetAssortList())) {
            for (IvrLibaTargetAssort ivrLibaTargetAssort1 : ivrLibaTargetAssortVO.getIvrLibaTargetAssortList()) {
                int seqMax1 = ivrLibaTargetAssortMapper.selectSeqMax();
                //获取序号最大值
                Integer seqMax1 = null;
                try {
                    seqMax1 = ivrLibaTargetAssortMapper.selectSeqMax();
                } catch (Exception e) {
                    seqMax1 = 0;
                }
                ivrLibaTargetAssort1.setPid(ivrLibaTargetAssort.getId());
                ivrLibaTargetAssort1.setSeqno(1);
                if (seqMax != null) {
@@ -132,6 +145,10 @@
    public Integer deleteIvrLibaTargetAssortByIds(Long[] ids) {
        Integer i = null;
        for (Long id : ids) {
            if (id < 0) {
                log.info("该指标分类id为默认ID,不能删除,id:{}", id);
                continue;
            }
            i = ivrLibaTargetAssortMapper.deleteIvrLibaTargetAssortById(id);
            IvrLibaTargetAssort ivrLibaTargetAssort = new IvrLibaTargetAssort();
            ivrLibaTargetAssort.setPid(id);
@@ -140,7 +157,7 @@
            List<IvrLibaTargetAssort> ivrLibaTargetAssorts = ivrLibaTargetAssortMapper.selectIvrLibaTargetAssortList(ivrLibaTargetAssort);
            if (CollectionUtils.isNotEmpty(ivrLibaTargetAssorts)) {
                for (IvrLibaTargetAssort ivrLibaTargetAssort1 : ivrLibaTargetAssorts) {
                    ivrLibaTargetAssort1.setPid(999999999L);
                    ivrLibaTargetAssort1.setPid(-1L);
                    ivrLibaTargetAssortMapper.updateIvrLibaTargetAssort(ivrLibaTargetAssort1);
                }
            }
smartor/src/main/java/com/smartor/service/impl/IvrLibaTargetServiceImpl.java
@@ -37,12 +37,12 @@
    /**
     * æŸ¥è¯¢æŒ‡æ ‡é€‰é¡¹åº“
     *
     * @param targetID æŒ‡æ ‡é€‰é¡¹åº“主键
     * @param id æŒ‡æ ‡é€‰é¡¹åº“主键
     * @return æŒ‡æ ‡é€‰é¡¹åº“
     */
    @Override
    public IvrLibaTarget selectIvrLibaTargetByTargetID(Long targetID) {
        return ivrLibaTargetMapper.selectIvrLibaTargetByTargetID(targetID);
    public IvrLibaTarget selectIvrLibaTargetByTargetID(Long id) {
        return ivrLibaTargetMapper.selectIvrLibaTargetByTargetID(id);
    }
    /**
@@ -62,14 +62,14 @@
        List<IvrLibaTargetVO> ivrLibaTargetVOS = DtoConversionUtils.sourceToTarget(ivrLibaTargets, IvrLibaTargetVO.class);
        for (IvrLibaTargetVO ivrLibaTarget1 : ivrLibaTargetVOS) {
            IvrLibaTargetoption ivrLibaTargetoption = new IvrLibaTargetoption();
            ivrLibaTargetoption.setTargetid(ivrLibaTarget1.getTargetID());
            ivrLibaTargetoption.setTargetid(ivrLibaTarget1.getId());
            //获取该指标的选项
            List<IvrLibaTargetoption> ivrLibaTargetoptions = ivrLibaTargetoptionMapper.selectIvrLibaTargetoptionList(ivrLibaTargetoption);
            if (CollectionUtils.isNotEmpty(ivrLibaTargetoptions)) {
                ivrLibaTarget1.setTargetoptionList(ivrLibaTargetoptions);
            }
            //获取该指标的标签
            List<BaseTag> baseTags = ivrLibaTargetTagMapper.selectTagName(ivrLibaTarget1.getTargetID());
            List<BaseTag> baseTags = ivrLibaTargetTagMapper.selectTagName(ivrLibaTarget1.getId());
            ivrLibaTarget1.setBaseTagList(baseTags);
        }
        //下面用左外感觉有点问题,where中的option的del会导致左边的查询不全,先不用吧
@@ -95,7 +95,7 @@
        for (BaseTag baseTag : ivrLibaTargetVO.getBaseTagList()) {
            IvrLibaTargetTag ivrLibaTargetTag = new IvrLibaTargetTag();
            ivrLibaTargetTag.setTagcategoryid(baseTag.getTagcategoryid());
            ivrLibaTargetTag.setTargetid(ivrLibaTarget.getTargetID());
            ivrLibaTargetTag.setTargetid(ivrLibaTarget.getId());
            //前端传来的baseTag的tagid就是指标标签的主键id,不是baseTag的主键
            ivrLibaTargetTag.setTagid(baseTag.getTagid());
            ivrLibaTargetTagMapper.insertIvrLibaTargetTag(ivrLibaTargetTag);
@@ -105,12 +105,12 @@
        for (IvrLibaTargetoption targetoption : ivrLibaTargetVO.getTargetoptionList()) {
            if (ObjectUtils.isEmpty(targetoption)) continue;
            log.info("targetoption的数据为:{}", targetoption);
            targetoption.setTargetid(ivrLibaTarget.getTargetID());
            targetoption.setTargetid(ivrLibaTarget.getId());
            ivrLibaTargetoptionMapper.insertIvrLibaTargetoption(targetoption);
        }
        log.info("指标id为:{}", ivrLibaTarget.getTargetID().intValue());
        return ivrLibaTarget.getTargetID().intValue();
        log.info("指标id为:{}", ivrLibaTarget.getId().intValue());
        return ivrLibaTarget.getId().intValue();
    }
    /**
@@ -138,7 +138,7 @@
                    //新增
                    IvrLibaTargetTag ivrLibaTargetTag = new IvrLibaTargetTag();
                    ivrLibaTargetTag.setTagcategoryid(baseTag.getTagcategoryid());
                    ivrLibaTargetTag.setTargetid(ivrLibaTarget.getTargetID());
                    ivrLibaTargetTag.setTargetid(ivrLibaTarget.getId());
                    //前端传来的baseTag的tagid就是指标标签的主键id,不是baseTag的主键
                    ivrLibaTargetTag.setTagid(baseTag.getTagid());
                    ivrLibaTargetTagMapper.insertIvrLibaTargetTag(ivrLibaTargetTag);
@@ -154,7 +154,7 @@
            for (IvrLibaTargetoption ivrLibaTargetoption : ivrLibaTargetVO.getTargetoptionList()) {
                if (ivrLibaTargetoption.getIsoperation() != null && ivrLibaTargetoption.getIsoperation() == 1) {
                    //新增
                    ivrLibaTargetoption.setTargetid(ivrLibaTarget.getTargetID());
                    ivrLibaTargetoption.setTargetid(ivrLibaTarget.getId());
                    ivrLibaTargetoptionMapper.insertIvrLibaTargetoption(ivrLibaTargetoption);
                } else if (ivrLibaTargetoption.getIsoperation() != null && ivrLibaTargetoption.getIsoperation() == 2) {
                    //修改
@@ -167,7 +167,7 @@
            }
        }
        return ivrLibaTarget.getTargetID().intValue();
        return ivrLibaTarget.getId().intValue();
    }
@@ -178,8 +178,8 @@
     * @return ç»“æžœ
     */
    @Override
    public int deleteIvrLibaTargetByTargetIDs(Long[] targetIDs) {
        return ivrLibaTargetMapper.deleteIvrLibaTargetByTargetIDs(targetIDs);
    public int deleteIvrLibaTargetByTargetIDs(Long[] ids) {
        return ivrLibaTargetMapper.deleteIvrLibaTargetByTargetIDs(ids);
    }
    /**
@@ -189,7 +189,7 @@
     * @return ç»“æžœ
     */
    @Override
    public int deleteIvrLibaTargetByTargetID(Long targetID) {
        return ivrLibaTargetMapper.deleteIvrLibaTargetByTargetID(targetID);
    public int deleteIvrLibaTargetByTargetID(Long id) {
        return ivrLibaTargetMapper.deleteIvrLibaTargetByTargetID(id);
    }
}
smartor/src/main/java/com/smartor/service/impl/IvrLibaTemplateAssortServiceImpl.java
@@ -86,7 +86,13 @@
        if (ObjectUtils.isEmpty(ivrLibaTemplateAssortVO)) {
            throw new BaseException("入参为空,请检查后,再新增");
        }
        Integer seqMax = ivrLibaTemplateAssortMapper.selectSeqMax();
        Integer seqMax = null;
        try {
            seqMax = ivrLibaTemplateAssortMapper.selectSeqMax();
        } catch (Exception e) {
            seqMax = 0;
        }
        IvrLibaTemplateAssort ivrLibaTemplateAssort = DtoConversionUtils.sourceToTarget(ivrLibaTemplateAssortVO, IvrLibaTemplateAssort.class);
        ivrLibaTemplateAssort.setSeqno(1);
        if (seqMax != null) {
@@ -98,7 +104,12 @@
        //新增二级树
        if (CollectionUtils.isNotEmpty(ivrLibaTemplateAssortVO.getIvrLibaTemplateAssortList())) {
            for (IvrLibaTemplateAssort ivrLibaTemplateAssort1 : ivrLibaTemplateAssortVO.getIvrLibaTemplateAssortList()) {
                int seqMax1 = ivrLibaTemplateAssortMapper.selectSeqMax();
                Integer seqMax1 = null;
                try {
                    seqMax1 = ivrLibaTemplateAssortMapper.selectSeqMax();
                } catch (Exception e) {
                    seqMax1 = 0;
                }
                ivrLibaTemplateAssort1.setPid(ivrLibaTemplateAssort.getId());
                ivrLibaTemplateAssort1.setSeqno(seqMax1 + 1);
                ivrLibaTemplateAssortMapper.insertIvrLibaTemplateAssort(ivrLibaTemplateAssort1);
@@ -130,13 +141,17 @@
    public Integer deleteIvrLibaTemplateAssortByIds(Long[] ids) {
        Integer i = null;
        for (Long id : ids) {
            if (id < 0) {
                log.info("该模板分类id为默认id,不能删除,id:{}", id);
                continue;
            }
            i = ivrLibaTemplateAssortMapper.deleteIvrLibaTemplateAssortById(id);
            IvrLibaTemplateAssort ivrLibaTemplateAssort = new IvrLibaTemplateAssort();
            ivrLibaTemplateAssort.setPid(id);
            List<IvrLibaTemplateAssort> ivrLibaTemplateAssorts = ivrLibaTemplateAssortMapper.selectIvrLibaTemplateAssortList(ivrLibaTemplateAssort);
            if (CollectionUtils.isNotEmpty(ivrLibaTemplateAssorts)) {
                for (IvrLibaTemplateAssort ivrLibaTemplateAssort1 : ivrLibaTemplateAssorts) {
                    ivrLibaTemplateAssort1.setPid(999999999L);
                    ivrLibaTemplateAssort1.setPid(-1L);
                    ivrLibaTemplateAssortMapper.updateIvrLibaTemplateAssort(ivrLibaTemplateAssort1);
                }
            }
smartor/src/main/java/com/smartor/service/impl/IvrLibaTemplateServiceImpl.java
@@ -37,6 +37,9 @@
    @Autowired
    private IvrLibaTemplateScriptMapper ivrLibaTemplateScriptMapper;
    @Autowired
    private TempDetpRelevanceMapper tempDetpRelevanceMapper;
    /**
     * æŸ¥è¯¢æ¨¡æ¿åº“
     *
@@ -180,6 +183,18 @@
            }
        }
        //对科室进行处理
        for (TempDetpRelevance tempDetpRelevance : ivrLibaTemplateVO.getTempDetpRelevances()) {
            if (tempDetpRelevance.getId() == null) {
                //新增
                tempDetpRelevance.setTempid(ivrLibaTemplate.getID());
                tempDetpRelevance.setType(2L);
                tempDetpRelevanceMapper.insertTempDetpRelevance(tempDetpRelevance);
            } else {
                tempDetpRelevanceMapper.updateTempDetpRelevance(tempDetpRelevance);
            }
        }
        return i;
    }
smartor/src/main/java/com/smartor/service/impl/IvrLibaTemplateTargetServiceImpl.java
@@ -28,8 +28,8 @@
     * @return æ¨¡ç‰ˆé—®é¢˜æŒ‡æ ‡åº“
     */
    @Override
    public IvrLibaTemplateTarget selectIvrLibaTemplateTargetByID(Long ID) {
        return ivrLibaTemplateTargetMapper.selectIvrLibaTemplateTargetByID(ID);
    public IvrLibaTemplateTarget selectIvrLibaTemplateTargetByID(Long id) {
        return ivrLibaTemplateTargetMapper.selectIvrLibaTemplateTargetByID(id);
    }
    /**
@@ -75,9 +75,9 @@
     */
    @Transactional(rollbackFor = Exception.class)
    @Override
    public int deleteIvrLibaTemplateTargetByIDs(Long[] IDs) {
    public int deleteIvrLibaTemplateTargetByIDs(Long[] ids) {
        Integer i = null;
        for (Long id : IDs) {
        for (Long id : ids) {
            i = ivrLibaTemplateTargetMapper.deleteIvrLibaTemplateTargetByID(id);
        }
        return i;
@@ -90,7 +90,7 @@
     * @return ç»“æžœ
     */
    @Override
    public int deleteIvrLibaTemplateTargetByID(Long ID) {
        return ivrLibaTemplateTargetMapper.deleteIvrLibaTemplateTargetByID(ID);
    public int deleteIvrLibaTemplateTargetByID(Long id) {
        return ivrLibaTemplateTargetMapper.deleteIvrLibaTemplateTargetByID(id);
    }
}
smartor/src/main/java/com/smartor/service/impl/PatHetaskRelevanceServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,97 @@
package com.smartor.service.impl;
import com.ruoyi.common.utils.DateUtils;
import com.smartor.domain.PatHetaskRelevance;
import com.smartor.mapper.PatHetaskRelevanceMapper;
import com.smartor.service.IPatHetaskRelevanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * æ‚£è€…与宣教任务关联Service业务层处理
 *
 * @author ruoyi
 * @date 2024-01-07
 */
@Service
public class PatHetaskRelevanceServiceImpl implements IPatHetaskRelevanceService
{
    @Autowired
    private PatHetaskRelevanceMapper patHetaskRelevanceMapper;
    /**
     * æŸ¥è¯¢æ‚£è€…与宣教任务关联
     *
     * @param id æ‚£è€…与宣教任务关联主键
     * @return æ‚£è€…与宣教任务关联
     */
    @Override
    public PatHetaskRelevance selectPatHetaskRelevanceById(Long id)
    {
        return patHetaskRelevanceMapper.selectPatHetaskRelevanceById(id);
    }
    /**
     * æŸ¥è¯¢æ‚£è€…与宣教任务关联列表
     *
     * @param patHetaskRelevance æ‚£è€…与宣教任务关联
     * @return æ‚£è€…与宣教任务关联
     */
    @Override
    public List<PatHetaskRelevance> selectPatHetaskRelevanceList(PatHetaskRelevance patHetaskRelevance)
    {
        return patHetaskRelevanceMapper.selectPatHetaskRelevanceList(patHetaskRelevance);
    }
    /**
     * æ–°å¢žæ‚£è€…与宣教任务关联
     *
     * @param patHetaskRelevance æ‚£è€…与宣教任务关联
     * @return ç»“æžœ
     */
    @Override
    public int insertPatHetaskRelevance(PatHetaskRelevance patHetaskRelevance)
    {
        patHetaskRelevance.setCreateTime(DateUtils.getNowDate());
        return patHetaskRelevanceMapper.insertPatHetaskRelevance(patHetaskRelevance);
    }
    /**
     * ä¿®æ”¹æ‚£è€…与宣教任务关联
     *
     * @param patHetaskRelevance æ‚£è€…与宣教任务关联
     * @return ç»“æžœ
     */
    @Override
    public int updatePatHetaskRelevance(PatHetaskRelevance patHetaskRelevance)
    {
        patHetaskRelevance.setUpdateTime(DateUtils.getNowDate());
        return patHetaskRelevanceMapper.updatePatHetaskRelevance(patHetaskRelevance);
    }
    /**
     * æ‰¹é‡åˆ é™¤æ‚£è€…与宣教任务关联
     *
     * @param ids éœ€è¦åˆ é™¤çš„æ‚£è€…与宣教任务关联主键
     * @return ç»“æžœ
     */
    @Override
    public int deletePatHetaskRelevanceByIds(Long[] ids)
    {
        return patHetaskRelevanceMapper.deletePatHetaskRelevanceByIds(ids);
    }
    /**
     * åˆ é™¤æ‚£è€…与宣教任务关联信息
     *
     * @param id æ‚£è€…与宣教任务关联主键
     * @return ç»“æžœ
     */
    @Override
    public int deletePatHetaskRelevanceById(Long id)
    {
        return patHetaskRelevanceMapper.deletePatHetaskRelevanceById(id);
    }
}
smartor/src/main/java/com/smartor/service/impl/PersonVoiceServiceImpl.java
@@ -163,11 +163,11 @@
                    if (spans.size() != 0) {
                        Elements radio__type = spans.get(0).getElementsByClass("radio__type");
                        if (radio__type.size() != 0) {
                            svyLibTopic.setTopictype(1L);
                            svyLibTopic.setTopictype("1");
                        } else {
                            Elements checkbox__type = spans.get(0).getElementsByClass("checkbox__type");
                            if (checkbox__type.size() != 0) {
                                svyLibTopic.setTopictype(2L);
                                svyLibTopic.setTopictype("2");
                            }
                        }
@@ -224,7 +224,7 @@
                        svyLibTopic2.setTopic(legend);
                        svyLibTopic2.setDelFlag("0");
                        svyLibTopic.setIsupload(0L);
                        svyLibTopic2.setTopictype(4L);
                        svyLibTopic2.setTopictype("4");
                        svyLibTopic2.setOrgid(fileName);
                        try {
                            svyLibTopicMapper.insertSvyLibTopic(svyLibTopic2);
@@ -259,7 +259,7 @@
                        svyLibTopic3.setTopic(legend);
                        svyLibTopic3.setDelFlag("0");
                        svyLibTopic3.setIsupload(0L);
                        svyLibTopic3.setTopictype(3L);
                        svyLibTopic3.setTopictype("3");
                        svyLibTopic3.setOrgid(fileName);
                        try {
                            svyLibTopicMapper.insertSvyLibTopic(svyLibTopic3);
smartor/src/main/java/com/smartor/service/impl/SvyLibTitleCategoryServiceImpl.java
@@ -102,6 +102,10 @@
    public int deleteSvyLibTitleCategoryByIds(Long[] ids) {
        Integer i = null;
        for (Long id : ids) {
            if (id < 0) {
                log.info("问卷模板分类的ID小于0,为默认分类,不能删除,id:{}", id);
                continue;
            }
            i = svyLibTitleCategoryMapper.deleteSvyLibTitleCategoryById(id);
            SvyLibTitleCategory svyLibTitleCategory = new SvyLibTitleCategory();
            svyLibTitleCategory.setPid(id);
@@ -110,7 +114,7 @@
            List<SvyLibTitleCategory> svyLibTitleCategoryList = svyLibTitleCategoryMapper.selectSvyLibTitleCategoryList(svyLibTitleCategory);
            if (CollectionUtils.isNotEmpty(svyLibTitleCategoryList)) {
                for (SvyLibTitleCategory svyLibTitleCategory1 : svyLibTitleCategoryList) {
                    svyLibTitleCategory1.setPid(999999999L);
                    svyLibTitleCategory1.setPid(-1L);
                    svyLibTitleCategoryMapper.updateSvyLibTitleCategory(svyLibTitleCategory1);
                }
            }
@@ -124,7 +128,14 @@
        if (ObjectUtils.isEmpty(svyLibTitleCategoryVO)) {
            throw new BaseException("入参为空,请检查后,再新增");
        }
        Integer seqMax = svyLibTitleCategoryMapper.selectSeqMax();
        //获取序号最大值
        Integer seqMax = null;
        try {
            seqMax = svyLibTitleCategoryMapper.selectSeqMax();
        } catch (Exception e) {
            seqMax = 0;
        }
        SvyLibTitleCategory svyLibTitleCategory = DtoConversionUtils.sourceToTarget(svyLibTitleCategoryVO, SvyLibTitleCategory.class);
        svyLibTitleCategory.setSeqno(1);
        if (seqMax != null) {
@@ -137,7 +148,12 @@
        //新增二级树
        if (CollectionUtils.isNotEmpty(svyLibTitleCategoryVO.getSvyLibTitleCategoryList())) {
            for (SvyLibTitleCategory svyLibTitleCategory1 : svyLibTitleCategoryVO.getSvyLibTitleCategoryList()) {
                Integer seqMax1 = svyLibTitleCategoryMapper.selectSeqMax();
                Integer seqMax1 = null;
                try {
                    seqMax1 = svyLibTitleCategoryMapper.selectSeqMax();
                } catch (Exception e) {
                    seqMax1 = 0;
                }
                svyLibTitleCategory1.setPid(svyLibTitleCategory.getId());
                svyLibTitleCategory1.setSeqno(1);
                if (seqMax1 != null) {
smartor/src/main/java/com/smartor/service/impl/SvyLibTitleServiceImpl.java
@@ -1,10 +1,12 @@
package com.smartor.service.impl;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.DtoConversionUtils;
import com.ruoyi.common.utils.StringUtils;
import com.smartor.domain.*;
import com.smartor.mapper.*;
import lombok.extern.slf4j.Slf4j;
@@ -33,6 +35,8 @@
    private SvyLibTopicMapper svyLibTopicMapper;
    @Autowired
    private SvyLibTopicoptionMapper svyLibTopicoptionMapper;
    @Autowired
    private TempDetpRelevanceMapper tempDetpRelevanceMapper;
    /**
     * æŸ¥è¯¢é—®å·
@@ -63,7 +67,7 @@
            a:
            for (int j = 0; j < svyLibTopics.size(); j++) {
                log.info("问题id为:{}", svyLibTopics.get(j).getSvyTopicId());
                if (svyLibTopics.get(j).getTopictype() != null && svyLibTopics.get(j).getTopictype() == 3 || svyLibTopics.get(j).getSvyTopicId() == null) {
                if (StringUtils.isNotEmpty(svyLibTopics.get(j).getTopictype()) && svyLibTopics.get(j).getTopictype().equals("3") || svyLibTopics.get(j).getSvyTopicId() == null) {
                    //作答题,不需要选项
                    continue a;
                } else {
@@ -76,6 +80,12 @@
            }
            //将题目放到问卷列表中
            svyLibTitles.get(i).setSvyLibTopics(svyLibTopics);
            //获取每个问卷对应的科室
            TempDetpRelevance tempDetpRelevance = new TempDetpRelevance();
            tempDetpRelevance.setTempid(svyLibTitles.get(i).getSvyid());
            List<TempDetpRelevance> tempDetpRelevances = tempDetpRelevanceMapper.selectTempDetpRelevanceList(tempDetpRelevance);
            svyLibTitles.get(i).setTempDetpRelevances(CollectionUtils.isNotEmpty(tempDetpRelevances) ? tempDetpRelevances : new ArrayList<>());
        }
        //先将相同的id的icdname,整理到一块
@@ -152,7 +162,7 @@
                    svyLibTopic.setSvyid(svyLibTitle.getSvyid());
                    //题目的选项目,直接用svy_topicoption表,用svyTopicid去关联
                    svyLibTopicMapper.insertSvyLibTopic(svyLibTopic);
                } else if (svyLibTitle.getIsoperation() != null && svyLibTopic.getIsoperation() == 2) {
                } else if (svyLibTopic.getIsoperation() != null && svyLibTopic.getIsoperation() == 2) {
                    //修改
                    svyLibTopic.setSvyid(svyLibTitle.getSvyid());
                    svyLibTopicMapper.updateSvyLibTopic(svyLibTopic);
@@ -176,6 +186,20 @@
            }
        }
        if (CollectionUtils.isNotEmpty(svyLibTitle.getTempDetpRelevances())) {
            for (TempDetpRelevance tempDetpRelevance : svyLibTitle.getTempDetpRelevances()) {
                if (tempDetpRelevance.getId() == null) {
                    //新增
                    tempDetpRelevance.setTempid(svyLibTitle.getSvyid());
                    tempDetpRelevance.setType(1L);
                    tempDetpRelevanceMapper.insertTempDetpRelevance(tempDetpRelevance);
                } else {
                    tempDetpRelevanceMapper.updateTempDetpRelevance(tempDetpRelevance);
                }
            }
        }
        return i;
    }
smartor/src/main/java/com/smartor/service/impl/SvyLibTopicCategoryServiceImpl.java
@@ -102,13 +102,17 @@
    public int deleteSvyLibTopicCategoryByIds(Long[] ids) {
        Integer i = null;
        for (Long id : ids) {
            if (id < 0) {
                log.info("小于0的值为默认值不能删除:{}", id);
                continue;
            }
            i = svyLibTopicCategoryMapper.deleteSvyLibTopicCategoryById(id);
            SvyLibTopicCategory svyLibTopicCategory = new SvyLibTopicCategory();
            svyLibTopicCategory.setPid(id);
            List<SvyLibTopicCategory> svyLibTopicCategories = svyLibTopicCategoryMapper.selectSvyLibTopicCategoryList(svyLibTopicCategory);
            if (CollectionUtils.isNotEmpty(svyLibTopicCategories)) {
                for (SvyLibTopicCategory svyLibTopicCategory1 : svyLibTopicCategories) {
                    svyLibTopicCategory1.setPid(999999999L);
                    svyLibTopicCategory1.setPid(-1L);
                    svyLibTopicCategoryMapper.updateSvyLibTopicCategory(svyLibTopicCategory1);
                }
            }
@@ -122,7 +126,13 @@
        if (ObjectUtils.isEmpty(svyLibTopicCategoryVO)) {
            throw new BaseException("入参为空,请检查后,再新增");
        }
        Integer seqMax = svyLibTopicCategoryMapper.selectSeqMax();
        Integer seqMax = null;
        try {
            seqMax = svyLibTopicCategoryMapper.selectSeqMax();
        } catch (Exception e) {
            seqMax = 0;
        }
        SvyLibTopicCategory svyLibTopicCategory = DtoConversionUtils.sourceToTarget(svyLibTopicCategoryVO, SvyLibTopicCategory.class);
        svyLibTopicCategory.setSeqno(1);
        if (seqMax != null) {
@@ -134,7 +144,12 @@
        //新增二级树
        if (CollectionUtils.isNotEmpty(svyLibTopicCategoryVO.getSvyLibTopicCategoryList())) {
            for (SvyLibTopicCategory svyLibTopicCategory1 : svyLibTopicCategoryVO.getSvyLibTopicCategoryList()) {
                Integer seqMax1 = svyLibTopicCategoryMapper.selectSeqMax();
                Integer seqMax1 = null;
                try {
                    seqMax1 = svyLibTopicCategoryMapper.selectSeqMax();
                } catch (Exception e) {
                    seqMax1 = 0;
                }
                svyLibTopicCategory1.setPid(svyLibTopicCategory.getId());
                svyLibTopicCategory1.setSeqno(1);
                if (seqMax1 != null) {
smartor/src/main/java/com/smartor/service/impl/SvyLibTopicServiceImpl.java
@@ -66,12 +66,12 @@
        for (int j = 0; j < svyLibTopics.size(); j++) {
            log.info("问题id为:{}", svyLibTopics.get(j).getSvyTopicId());
            if (svyLibTopics.get(j).getTopictype() != null && svyLibTopics.get(j).getTopictype() == 3 || svyLibTopics.get(j).getSvyTopicId() == null) {
            if (StringUtils.isNotEmpty(svyLibTopics.get(j).getTopictype()) && svyLibTopics.get(j).getTopictype().equals("3") || svyLibTopics.get(j).getTopicid() == null) {
                //作答题,不需要选项
                continue;
            } else {
                SvyLibTopicoption svyLibTopicoption = new SvyLibTopicoption();
                svyLibTopicoption.setTopicid(svyLibTopics.get(j).getSvyTopicId());
                svyLibTopicoption.setTopicid(svyLibTopics.get(j).getTopicid());
                List<SvyLibTopicoption> svyLibTopicoptions = svyLibTopicoptionMapper.selectSvyLibTopicoptionList(svyLibTopicoption);
                //将查询出的选项目放到题目中
                svyLibTopics.get(j).setSvyLibTopicoptions(svyLibTopicoptions);
@@ -92,6 +92,7 @@
        return svyLibTopicMapper.insertSvyLibTopic(svyLibTopic);
    }
    @Transactional(rollbackFor = Exception.class)
    @Override
    public Integer saveOrUpdateTopic(SvyLibTopic svyLibTopic) {
        Integer i = null;
@@ -111,11 +112,16 @@
                if (svyLibTopicoption.getIsoperation() != null && svyLibTopicoption.getIsoperation() == 1) {
                    //新增
                    svyLibTopicoption.setTopicid(svyLibTopic.getTopicid());
                    svyLibTopicoption.setCreateTime(new Date());
                    svyLibTopicoptionMapper.insertSvyLibTopicoption(svyLibTopicoption);
                } else if (svyLibTopicoption.getIsoperation() != null && svyLibTopicoption.getIsoperation() == 2) {
                    //修改
                    svyLibTopicoption.setTopicid(svyLibTopic.getTopicid());
                    svyLibTopicoption.setUpdateTime(new Date());
                    svyLibTopicoptionMapper.updateSvyLibTopicoption(svyLibTopicoption);
                } else if (svyLibTopicoption.getIsoperation() != null && svyLibTopicoption.getIsoperation() == 3) {
                    //删除
                    svyLibTopicoptionMapper.deleteSvyLibTopicoptionByOptionid(svyLibTopicoption.getOptionid());
                }
            }
        }
@@ -142,7 +148,11 @@
     */
    @Override
    public int deleteSvyLibTopicByTopicids(Long[] topicids) {
        return svyLibTopicMapper.deleteSvyLibTopicByTopicids(topicids);
        Integer i = null;
        for (Long topicid : topicids) {
            i = svyLibTopicMapper.deleteSvyLibTopicByTopicid(topicid);
        }
        return i;
    }
    /**
smartor/src/main/java/com/smartor/service/impl/TempDetpRelevanceServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,97 @@
package com.smartor.service.impl;
import com.ruoyi.common.utils.DateUtils;
import com.smartor.domain.TempDetpRelevance;
import com.smartor.mapper.TempDetpRelevanceMapper;
import com.smartor.service.ITempDetpRelevanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * æ¨¡æ¿ç§‘室关联Service业务层处理
 *
 * @author ruoyi
 * @date 2024-01-04
 */
@Service
public class TempDetpRelevanceServiceImpl implements ITempDetpRelevanceService
{
    @Autowired
    private TempDetpRelevanceMapper tempDetpRelevanceMapper;
    /**
     * æŸ¥è¯¢æ¨¡æ¿ç§‘室关联
     *
     * @param id æ¨¡æ¿ç§‘室关联主键
     * @return æ¨¡æ¿ç§‘室关联
     */
    @Override
    public TempDetpRelevance selectTempDetpRelevanceById(Long id)
    {
        return tempDetpRelevanceMapper.selectTempDetpRelevanceById(id);
    }
    /**
     * æŸ¥è¯¢æ¨¡æ¿ç§‘室关联列表
     *
     * @param tempDetpRelevance æ¨¡æ¿ç§‘室关联
     * @return æ¨¡æ¿ç§‘室关联
     */
    @Override
    public List<TempDetpRelevance> selectTempDetpRelevanceList(TempDetpRelevance tempDetpRelevance)
    {
        return tempDetpRelevanceMapper.selectTempDetpRelevanceList(tempDetpRelevance);
    }
    /**
     * æ–°å¢žæ¨¡æ¿ç§‘室关联
     *
     * @param tempDetpRelevance æ¨¡æ¿ç§‘室关联
     * @return ç»“æžœ
     */
    @Override
    public int insertTempDetpRelevance(TempDetpRelevance tempDetpRelevance)
    {
        tempDetpRelevance.setCreateTime(DateUtils.getNowDate());
        return tempDetpRelevanceMapper.insertTempDetpRelevance(tempDetpRelevance);
    }
    /**
     * ä¿®æ”¹æ¨¡æ¿ç§‘室关联
     *
     * @param tempDetpRelevance æ¨¡æ¿ç§‘室关联
     * @return ç»“æžœ
     */
    @Override
    public int updateTempDetpRelevance(TempDetpRelevance tempDetpRelevance)
    {
        tempDetpRelevance.setUpdateTime(DateUtils.getNowDate());
        return tempDetpRelevanceMapper.updateTempDetpRelevance(tempDetpRelevance);
    }
    /**
     * æ‰¹é‡åˆ é™¤æ¨¡æ¿ç§‘室关联
     *
     * @param ids éœ€è¦åˆ é™¤çš„æ¨¡æ¿ç§‘室关联主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteTempDetpRelevanceByIds(Long[] ids)
    {
        return tempDetpRelevanceMapper.deleteTempDetpRelevanceByIds(ids);
    }
    /**
     * åˆ é™¤æ¨¡æ¿ç§‘室关联信息
     *
     * @param id æ¨¡æ¿ç§‘室关联主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteTempDetpRelevanceById(Long id)
    {
        return tempDetpRelevanceMapper.deleteTempDetpRelevanceById(id);
    }
}
smartor/src/main/resources/mapper/smartor/HeLibraryMapper.xml
@@ -33,22 +33,61 @@
        <result property="isavailable"    column="isavailable"    />
        <result property="suitdisease"    column="suitdisease"    />
        <result property="suitway"    column="suitway"    />
        <result property="deptNames" column="dept_names"/>
        <result property="labelInfo" column="label_info"/>
        <result property="campus" column="campus"/>
        <result property="otherdata" column="otherdata"/>
    </resultMap>
    <sql id="selectHeLibraryVo">
        select id, classification, assortid, preachname, version, preachform, preachdescription, preachcontent, templateid, preachcode, centerlibraryid, isenable, orgid, update_by, update_time, del_flag, create_by, create_time, isupload, upload_time, islocal, centerlibrarycode, pid, guid, parameter, isavailable, suitdisease, suitway from he_library
        select id,
               classification,
               assortid,
               preachname,
               version,
               preachform,
               preachdescription,
               preachcontent,
               templateid,
               preachcode,
               centerlibraryid,
               isenable,
               orgid,
               update_by,
               update_time,
               del_flag,
               create_by,
               create_time,
               isupload,
               upload_time,
               islocal,
               centerlibrarycode,
               pid,
               guid,
               parameter,
               isavailable,
               suitdisease,
               suitway,
               dept_names,
               label_info,
               campus,
               otherdata
        from he_library
    </sql>
    <select id="selectHeLibraryList" parameterType="com.smartor.domain.HeLibrary" resultMap="HeLibraryResult">
        <include refid="selectHeLibraryVo"/>
        <where>  
            del_flag=0
            <if test="id != null "> and id = #{id}</if>
            <if test="classification != null  and classification != ''"> and classification = #{classification}</if>
            <if test="assortid != null "> and assortid = #{assortid}</if>
            <if test="preachname != null  and preachname != ''"> and preachname like concat('%', #{preachname}, '%')</if>
            <if test="version != null "> and version = #{version}</if>
            <if test="preachform != null "> and preachform = #{preachform}</if>
            <if test="preachdescription != null  and preachdescription != ''"> and preachdescription = #{preachdescription}</if>
            <if test="preachdescription != null  and preachdescription != ''">and preachdescription =
                #{preachdescription}
            </if>
            <if test="preachcontent != null  and preachcontent != ''"> and preachcontent = #{preachcontent}</if>
            <if test="templateid != null "> and templateid = #{templateid}</if>
            <if test="preachcode != null  and preachcode != ''"> and preachcode = #{preachcode}</if>
@@ -58,19 +97,24 @@
            <if test="isupload != null "> and isupload = #{isupload}</if>
            <if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
            <if test="islocal != null "> and islocal = #{islocal}</if>
            <if test="centerlibrarycode != null  and centerlibrarycode != ''"> and centerlibrarycode = #{centerlibrarycode}</if>
            <if test="centerlibrarycode != null  and centerlibrarycode != ''">and centerlibrarycode =
                #{centerlibrarycode}
            </if>
            <if test="pid != null "> and pid = #{pid}</if>
            <if test="guid != null  and guid != ''"> and guid = #{guid}</if>
            <if test="parameter != null  and parameter != ''"> and parameter = #{parameter}</if>
            <if test="isavailable != null  and isavailable != ''"> and isavailable = #{isavailable}</if>
            <if test="suitdisease != null  and suitdisease != ''"> and suitdisease = #{suitdisease}</if>
            <if test="suitway != null  and suitway != ''"> and suitway = #{suitway}</if>
            <if test="deptNames != null  and deptNames != ''">and dept_names = #{deptNames}</if>
            <if test="labelInfo != null  and labelInfo != ''">and label_info = #{labelInfo}</if>
            <if test="campus != null  and campus != ''">and campus = #{campus}</if>
        </where>
    </select>
    
    <select id="selectHeLibraryById" parameterType="Long" resultMap="HeLibraryResult">
        <include refid="selectHeLibraryVo"/>
        where id = #{id}
        where del_flag=0 and id = #{id}
    </select>
        
    <insert id="insertHeLibrary" parameterType="com.smartor.domain.HeLibrary" useGeneratedKeys="true" keyProperty="id">
@@ -103,6 +147,10 @@
            <if test="isavailable != null">isavailable,</if>
            <if test="suitdisease != null">suitdisease,</if>
            <if test="suitway != null">suitway,</if>
            <if test="deptNames != null">dept_names,</if>
            <if test="labelInfo != null">label_info,</if>
            <if test="campus != null">campus,</if>
            <if test="otherdata != null">otherdata,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="classification != null">#{classification},</if>
@@ -132,6 +180,10 @@
            <if test="isavailable != null">#{isavailable},</if>
            <if test="suitdisease != null">#{suitdisease},</if>
            <if test="suitway != null">#{suitway},</if>
            <if test="deptNames != null ">#{deptNames},</if>
            <if test="labelInfo != null">#{labelInfo},</if>
            <if test="campus != null">#{campus},</if>
            <if test="otherdata != null">#{otherdata},</if>
         </trim>
    </insert>
@@ -165,13 +217,21 @@
            <if test="isavailable != null">isavailable = #{isavailable},</if>
            <if test="suitdisease != null">suitdisease = #{suitdisease},</if>
            <if test="suitway != null">suitway = #{suitway},</if>
            <if test="deptNames != null">dept_names = #{deptNames},</if>
            <if test="labelInfo != null ">label_info = #{labelInfo},</if>
            <if test="campus != null">campus = #{campus},</if>
            <if test="otherdata != null">otherdata = #{otherdata},</if>
        </trim>
        where id = #{id}
    </update>
    <delete id="deleteHeLibraryById" parameterType="Long">
        delete from he_library where id = #{id}
    </delete>
    <update id="deleteHeLibraryById" parameterType="Long">
        update he_library
        <trim prefix="SET" suffixOverrides=",">
            <if test="delFlag != null and delFlag != ''">del_flag =1,</if>
        </trim>
        where id = #{id}
    </update>
    <delete id="deleteHeLibraryByIds" parameterType="String">
        delete from he_library where id in 
smartor/src/main/resources/mapper/smartor/HeLibraryTagMapper.xml
@@ -19,6 +19,7 @@
        <result property="heid" column="heid"/>
        <result property="pid" column="pid"/>
        <result property="guid" column="guid"/>
        <result property="tagname" column="tagname"/>
    </resultMap>
    <sql id="selectHeLibraryTagVo">
@@ -35,7 +36,8 @@
               upload_time,
               heid,
               pid,
               guid
               guid,
               tagname
        from he_library_tag
    </sql>
@@ -50,6 +52,7 @@
            <if test="heid != null ">and heid = #{heid}</if>
            <if test="pid != null ">and pid = #{pid}</if>
            <if test="guid != null  and guid != ''">and guid = #{guid}</if>
            <if test="tagname != null  and tagname != ''">and tagname = #{tagname}</if>
        </where>
    </select>
@@ -75,6 +78,7 @@
            <if test="heid != null">heid,</if>
            <if test="pid != null">pid,</if>
            <if test="guid != null">guid,</if>
            <if test="tagname != null">tagname,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="tagcategoryid != null">#{tagcategoryid},</if>
@@ -90,6 +94,7 @@
            <if test="heid != null">#{heid},</if>
            <if test="pid != null">#{pid},</if>
            <if test="guid != null">#{guid},</if>
            <if test="tagname != null">#{tagname},</if>
        </trim>
    </insert>
@@ -109,6 +114,7 @@
            <if test="heid != null">heid = #{heid},</if>
            <if test="pid != null">pid = #{pid},</if>
            <if test="guid != null">guid = #{guid},</if>
            <if test="tagname != null">tagname = #{tagname},</if>
        </trim>
        where id = #{id}
    </update>
smartor/src/main/resources/mapper/smartor/HeTaskMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,230 @@
<?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.smartor.mapper.HeTaskMapper">
    <resultMap type="com.smartor.domain.HeTask" id="HeTaskResult">
        <result property="id" column="id"/>
        <result property="svrtaskid" column="svrtaskid"/>
        <result property="patientid" column="patientid"/>
        <result property="classification" column="classification"/>
        <result property="preachcategoryid" column="preachcategoryid"/>
        <result property="preachname" column="preachname"/>
        <result property="version" column="version"/>
        <result property="preachform" column="preachform"/>
        <result property="orgform" column="orgform"/>
        <result property="preachdescription" column="preachdescription"/>
        <result property="preachcontent" column="preachcontent"/>
        <result property="templateid" column="templateid"/>
        <result property="preachcode" column="preachcode"/>
        <result property="centerlibraryid" column="centerlibraryid"/>
        <result property="isenable" column="isenable"/>
        <result property="orgid" column="orgid"/>
        <result property="updateBy" column="update_by"/>
        <result property="updateTime" column="update_time"/>
        <result property="delFlag" column="del_flag"/>
        <result property="createBy" column="create_by"/>
        <result property="createTime" column="create_time"/>
        <result property="isupload" column="isupload"/>
        <result property="uploadTime" column="upload_time"/>
        <result property="islocal" column="islocal"/>
        <result property="centerlibrarycode" column="centerlibrarycode"/>
        <result property="pid" column="pid"/>
        <result property="guid" column="guid"/>
        <result property="sendTime" column="send_time"/>
        <result property="isSend" column="is_send"/>
        <result property="sendState" column="send_state"/>
    </resultMap>
    <sql id="selectHeTaskVo">
        select id,
               svrtaskid,
               patientid,
               classification,
               preachcategoryid,
               preachname,
               version,
               preachform,
               orgform,
               preachdescription,
               preachcontent,
               templateid,
               preachcode,
               centerlibraryid,
               isenable,
               orgid,
               update_by,
               update_time,
               del_flag,
               create_by,
               create_time,
               isupload,
               upload_time,
               islocal,
               centerlibrarycode,
               pid,
               guid,
               send_time,
               is_send,
               send_state
        from he_task
    </sql>
    <select id="selectHeTaskList" parameterType="com.smartor.domain.HeTask" resultMap="HeTaskResult">
        <include refid="selectHeTaskVo"/>
        <where>
            del_flag=0
            <if test="svrtaskid != null ">and svrtaskid = #{svrtaskid}</if>
            <if test="patientid != null ">and patientid = #{patientid}</if>
            <if test="classification != null  and classification != ''">and classification = #{classification}</if>
            <if test="preachcategoryid != null ">and preachcategoryid = #{preachcategoryid}</if>
            <if test="preachname != null  and preachname != ''">and preachname like concat('%', #{preachname}, '%')</if>
            <if test="version != null ">and version = #{version}</if>
            <if test="preachform != null ">and preachform = #{preachform}</if>
            <if test="orgform != null ">and orgform = #{orgform}</if>
            <if test="preachdescription != null  and preachdescription != ''">and preachdescription =
                #{preachdescription}
            </if>
            <if test="preachcontent != null  and preachcontent != ''">and preachcontent = #{preachcontent}</if>
            <if test="templateid != null ">and templateid = #{templateid}</if>
            <if test="preachcode != null  and preachcode != ''">and preachcode = #{preachcode}</if>
            <if test="centerlibraryid != null ">and centerlibraryid = #{centerlibraryid}</if>
            <if test="isenable != null ">and isenable = #{isenable}</if>
            <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
            <if test="isupload != null ">and isupload = #{isupload}</if>
            <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
            <if test="islocal != null ">and islocal = #{islocal}</if>
            <if test="centerlibrarycode != null  and centerlibrarycode != ''">and centerlibrarycode =
                #{centerlibrarycode}
            </if>
            <if test="pid != null ">and pid = #{pid}</if>
            <if test="guid != null  and guid != ''">and guid = #{guid}</if>
            <if test="sendTime != null ">and send_time = #{sendTime}</if>
            <if test="isSend != null ">and is_send = #{isSend}</if>
            <if test="sendState != null ">and send_state = #{sendState}</if>
        </where>
    </select>
    <select id="selectHeTaskById" parameterType="Long" resultMap="HeTaskResult">
        <include refid="selectHeTaskVo"/>
        where id = #{id}
    </select>
    <insert id="insertHeTask" parameterType="com.smartor.domain.HeTask" useGeneratedKeys="true" keyProperty="id">
        insert into he_task
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="svrtaskid != null">svrtaskid,</if>
            <if test="patientid != null">patientid,</if>
            <if test="classification != null">classification,</if>
            <if test="preachcategoryid != null">preachcategoryid,</if>
            <if test="preachname != null">preachname,</if>
            <if test="version != null">version,</if>
            <if test="preachform != null">preachform,</if>
            <if test="orgform != null">orgform,</if>
            <if test="preachdescription != null">preachdescription,</if>
            <if test="preachcontent != null">preachcontent,</if>
            <if test="templateid != null">templateid,</if>
            <if test="preachcode != null">preachcode,</if>
            <if test="centerlibraryid != null">centerlibraryid,</if>
            <if test="isenable != null">isenable,</if>
            <if test="orgid != null">orgid,</if>
            <if test="updateBy != null">update_by,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="delFlag != null and delFlag != ''">del_flag,</if>
            <if test="createBy != null">create_by,</if>
            <if test="createTime != null">create_time,</if>
            <if test="isupload != null">isupload,</if>
            <if test="uploadTime != null">upload_time,</if>
            <if test="islocal != null">islocal,</if>
            <if test="centerlibrarycode != null">centerlibrarycode,</if>
            <if test="pid != null">pid,</if>
            <if test="guid != null">guid,</if>
            <if test="sendTime != null">send_time,</if>
            <if test="isSend != null">is_send,</if>
            <if test="sendState != null">send_state,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="svrtaskid != null">#{svrtaskid},</if>
            <if test="patientid != null">#{patientid},</if>
            <if test="classification != null">#{classification},</if>
            <if test="preachcategoryid != null">#{preachcategoryid},</if>
            <if test="preachname != null">#{preachname},</if>
            <if test="version != null">#{version},</if>
            <if test="preachform != null">#{preachform},</if>
            <if test="orgform != null">#{orgform},</if>
            <if test="preachdescription != null">#{preachdescription},</if>
            <if test="preachcontent != null">#{preachcontent},</if>
            <if test="templateid != null">#{templateid},</if>
            <if test="preachcode != null">#{preachcode},</if>
            <if test="centerlibraryid != null">#{centerlibraryid},</if>
            <if test="isenable != null">#{isenable},</if>
            <if test="orgid != null">#{orgid},</if>
            <if test="updateBy != null">#{updateBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="delFlag != null and delFlag != ''">#{delFlag},</if>
            <if test="createBy != null">#{createBy},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="isupload != null">#{isupload},</if>
            <if test="uploadTime != null">#{uploadTime},</if>
            <if test="islocal != null">#{islocal},</if>
            <if test="centerlibrarycode != null">#{centerlibrarycode},</if>
            <if test="pid != null">#{pid},</if>
            <if test="guid != null">#{guid},</if>
            <if test="sendTime != null">#{sendTime},</if>
            <if test="isSend != null">#{isSend},</if>
            <if test="sendState != null">#{sendState},</if>
        </trim>
    </insert>
    <update id="updateHeTask" parameterType="com.smartor.domain.HeTask">
        update he_task
        <trim prefix="SET" suffixOverrides=",">
            <if test="svrtaskid != null">svrtaskid = #{svrtaskid},</if>
            <if test="patientid != null">patientid = #{patientid},</if>
            <if test="classification != null">classification = #{classification},</if>
            <if test="preachcategoryid != null">preachcategoryid = #{preachcategoryid},</if>
            <if test="preachname != null">preachname = #{preachname},</if>
            <if test="version != null">version = #{version},</if>
            <if test="preachform != null">preachform = #{preachform},</if>
            <if test="orgform != null">orgform = #{orgform},</if>
            <if test="preachdescription != null">preachdescription = #{preachdescription},</if>
            <if test="preachcontent != null">preachcontent = #{preachcontent},</if>
            <if test="templateid != null">templateid = #{templateid},</if>
            <if test="preachcode != null">preachcode = #{preachcode},</if>
            <if test="centerlibraryid != null">centerlibraryid = #{centerlibraryid},</if>
            <if test="isenable != null">isenable = #{isenable},</if>
            <if test="orgid != null">orgid = #{orgid},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
            <if test="createBy != null">create_by = #{createBy},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="isupload != null">isupload = #{isupload},</if>
            <if test="uploadTime != null">upload_time = #{uploadTime},</if>
            <if test="islocal != null">islocal = #{islocal},</if>
            <if test="centerlibrarycode != null">centerlibrarycode = #{centerlibrarycode},</if>
            <if test="pid != null">pid = #{pid},</if>
            <if test="guid != null">guid = #{guid},</if>
            <if test="sendTime != null">send_time = #{sendTime},</if>
            <if test="isSend != null">is_send = #{isSend},</if>
            <if test="sendState != null">send_state = #{sendState},</if>
        </trim>
        where id = #{id}
    </update>
    <update id="deleteHeTaskById" parameterType="Long">
        update he_task
        <trim prefix="SET" suffixOverrides=",">
            del_flag = 1
        </trim>
        where id = #{id}
    </update>
    <!--    <delete id="deleteHeTaskByIds" parameterType="String">-->
    <!--        delete from he_task where id in -->
    <!--        <foreach item="id" collection="array" open="(" separator="," close=")">-->
    <!--            #{id}-->
    <!--        </foreach>-->
    <!--    </delete>-->
</mapper>
smartor/src/main/resources/mapper/smartor/IvrLibaScriptMapper.xml
@@ -40,7 +40,7 @@
        <result property="orgid" column="orgid"/>
        <result property="pid" column="pid"/>
        <result property="guid" column="guid"/>
        <result property="parameter" column="parameter"/>
        <result property="otherdata" column="otherdata"/>
        <result property="suitway" column="suitway"/>
        <result property="isAvailable" column="isAvailable"/>
        <result property="campus" column="campus"/>
@@ -72,7 +72,7 @@
               targetid,
               targetname,
               tag,
               targetoptions, language, remark, version, usestate, adduserid, addtime, modifyuserid, modifytime, assortid, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, parameter
               targetoptions, language, remark, version, usestate, adduserid, addtime, modifyuserid, modifytime, assortid, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, otherdata
        from ivr_liba_script
    </sql>
@@ -116,7 +116,7 @@
            <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
            <if test="pid != null ">and pid = #{pid}</if>
            <if test="guid != null  and guid != ''">and guid = #{guid}</if>
            <if test="parameter != null  and parameter != ''">and parameter = #{parameter}</if>
            <if test="otherdata != null  and otherdata != ''">and otherdata = #{otherdata}</if>
        </where>
    </select>
@@ -170,7 +170,7 @@
            <if test="orgid != null">orgid,</if>
            <if test="pid != null">pid,</if>
            <if test="guid != null">guid,</if>
            <if test="parameter != null">parameter,</if>
            <if test="otherdata != null">otherdata,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="questiontitle != null">#{questiontitle},</if>
@@ -214,7 +214,7 @@
            <if test="orgid != null">#{orgid},</if>
            <if test="pid != null">#{pid},</if>
            <if test="guid != null">#{guid},</if>
            <if test="parameter != null">#{parameter},</if>
            <if test="otherdata != null">#{otherdata},</if>
        </trim>
    </insert>
@@ -258,7 +258,7 @@
            <if test="orgid != null">orgid = #{orgid},</if>
            <if test="pid != null">pid = #{pid},</if>
            <if test="guid != null">guid = #{guid},</if>
            <if test="parameter != null">parameter = #{parameter},</if>
            <if test="otherdata != null and otherdata != ''">otherdata = #{otherdata},</if>
            <if test="deptNames != null">deptNames = #{deptNames},</if>
            <if test="deptIds != null">deptIds = #{deptIds},</if>
            <if test="campus != null">campus = #{campus},</if>
smartor/src/main/resources/mapper/smartor/IvrLibaTargetMapper.xml
@@ -5,7 +5,7 @@
<mapper namespace="com.smartor.mapper.IvrLibaTargetMapper">
    <resultMap type="com.smartor.domain.IvrLibaTarget" id="IvrLibaTargetResult">
        <result property="targetID" column="targetID"/>
        <result property="id" column="id"/>
        <result property="groupid" column="groupid"/>
        <result property="targettype" column="targettype"/>
        <result property="targetname" column="targetname"/>
@@ -34,7 +34,7 @@
    </resultMap>
    <resultMap type="com.smartor.domain.IvrLibaTargetVO" id="IvrLibaTargetVOResult">
        <result property="targetID" column="targetID"/>
        <result property="id" column="id"/>
        <result property="groupid" column="groupid"/>
        <result property="targettype" column="targettype"/>
        <result property="targetname" column="targetname"/>
@@ -86,7 +86,7 @@
    </resultMap>
    <sql id="selectIvrLibaTargetVo">
        select targetID,
        select id,
               groupid,
               targettype,
               targetname,
@@ -99,8 +99,8 @@
            resultMap="IvrLibaTargetResult">
        <include refid="selectIvrLibaTargetVo"/>
        <where>
            del_flag != 1
            <if test="targetID != null ">and targetID = #{targetID}</if>
            del_flag =0
            <if test="id != null ">and id = #{id}</if>
            <if test="groupid != null  and groupid != ''">and groupid = #{groupid}</if>
            <if test="targettype != null  and targettype != ''">and targettype = #{targettype}</if>
            <if test="targetname != null  and targetname != ''">and targetname like concat('%', #{targetname}, '%')</if>
@@ -126,7 +126,7 @@
    </select>
    <select id="targetInfo" parameterType="com.smartor.domain.IvrLibaTarget" resultMap="IvrLibaTargetVOResult">
        select a.targetID,
        select a.id,
        a.groupid,
        a.targettype,
        a.targetname,
@@ -153,7 +153,7 @@
        b.optiondesc
        from ivr_liba_target a
        LEFT JOIN ivr_liba_targetoption b
        on a.targetID = b.targetid
        on a.id = b.targetid
        <where>
            a.del_flag != 1 and b.del_flag != 1
            <if test="groupid != null  and groupid != ''">and a.groupid = #{groupid}</if>
@@ -183,11 +183,11 @@
    <select id="selectIvrLibaTargetByTargetID" parameterType="Long" resultMap="IvrLibaTargetResult">
        <include refid="selectIvrLibaTargetVo"/>
        where targetID = #{targetID}
        where id = #{id}
    </select>
    <insert id="insertIvrLibaTarget" parameterType="com.smartor.domain.IvrLibaTarget" useGeneratedKeys="true"
            keyProperty="targetID">
            keyProperty="id">
        insert into ivr_liba_target
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="groupid != null">groupid,</if>
@@ -274,19 +274,19 @@
            <if test="isAvailable != null and isAvailable != ''">isAvailable = #{isAvailable},</if>
            <if test="parameter != null and parameter != ''">parameter = #{parameter},</if>
        </trim>
        where targetID = #{targetID}
        where id = #{id}
    </update>
    <delete id="deleteIvrLibaTargetByTargetID" parameterType="Long">
        delete
        from ivr_liba_target
        where targetID = #{targetID}
        where id = #{id}
    </delete>
    <delete id="deleteIvrLibaTargetByTargetIDs" parameterType="String">
        delete from ivr_liba_target where targetID in
        <foreach item="targetID" collection="array" open="(" separator="," close=")">
            #{targetID}
        delete from ivr_liba_target where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateAssortMapper.xml
@@ -23,6 +23,7 @@
            resultMap="IvrLibaTemplateAssortResult">
        <include refid="selectIvrLibaTemplateAssortVo"/>
        <where>
            del_flag=0
            <if test="indexAssortName != null  and indexAssortName != ''">and index_assort_name like concat('%',
                #{indexAssortName}, '%')
            </if>
@@ -87,7 +88,7 @@
    <select id="selectSeqMax" resultType="integer">
        select max(seqno) seqno
        from iivr_liba_template_assort
        from ivr_liba_template_assort
    </select>
</mapper>
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateMapper.xml
@@ -22,14 +22,14 @@
        <result property="modifyUserID" column="modifyUserID"/>
        <result property="modifyTime" column="modifyTime"/>
        <result property="groupID" column="groupID"/>
        <result property="labelInfo" column="labelInfo"/>
        <result property="labelInfo" column="label_info"/>
        <result property="submoduleID" column="submoduleID"/>
        <result property="playType" column="playType"/>
        <result property="icd10code" column="icd10code"/>
        <result property="icd10codename" column="icd10codename"/>
        <result property="atuoTaskDayOffset" column="atuoTaskDayOffset"/>
        <result property="deptIds" column="deptIds"/>
        <result property="deptNames" column="deptNames"/>
        <result property="deptNames" column="dept_names"/>
        <result property="fKsdm" column="F_KSDM"/>
        <result property="delFlag" column="del_flag"/>
        <result property="updateBy" column="update_by"/>
@@ -47,6 +47,8 @@
        <result property="usestate" column="usestate"/>
        <result property="campus" column="campus"/>
        <result property="tag" column="tag"/>
        <result property="suitway" column="suitway"/>
        <result property="otherdata" column="otherdata"/>
    </resultMap>
    <sql id="selectIvrLibaTemplateVo">
@@ -62,7 +64,9 @@
               usestate,
               campus,
               tag,
               submodule, language, note, isEnable, addUserID, addTime, modifyUserID, modifyTime, groupID, labelInfo, submoduleID, playType, icd10code, icd10codename, atuoTaskDayOffset, deptIds, deptNames, F_KSDM, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, assortid, parameter
               otherdata,
               suitway,
               submodule, language, note, isEnable, addUserID, addTime, modifyUserID, modifyTime, groupID, label_info, submoduleID, playType, icd10code, icd10codename, atuoTaskDayOffset, deptIds, dept_names, F_KSDM, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, assortid, parameter
        from ivr_liba_template
    </sql>
@@ -70,10 +74,12 @@
            resultMap="IvrLibaTemplateResult">
        <include refid="selectIvrLibaTemplateVo"/>
        <where>
            del_flag=0
            <if test="templateName != null  and templateName != ''">and templateName like concat('%', #{templateName},
                '%')
            </if>
            <if test="targetid != null ">and targetid = #{targetid}</if>
            <if test="suitway != null ">and suitway = #{suitway}</if>
            <if test="targetname != null and targetname !='' ">and targetname = #{targetname}</if>
            <if test="version != null and version !='' ">and version = #{version}</if>
            <if test="usestate != null and usestate !='' ">and usestate = #{usestate}</if>
@@ -90,7 +96,7 @@
            <if test="modifyUserID != null  and modifyUserID != ''">and modifyUserID = #{modifyUserID}</if>
            <if test="modifyTime != null ">and modifyTime = #{modifyTime}</if>
            <if test="groupID != null  and groupID != ''">and groupID = #{groupID}</if>
            <if test="labelInfo != null  and labelInfo != ''">and labelInfo = #{labelInfo}</if>
            <if test="labelInfo != null  and labelInfo != ''">and label_info = #{labelInfo}</if>
            <if test="submoduleID != null  and submoduleID != ''">and submoduleID = #{submoduleID}</if>
            <if test="playType != null ">and playType = #{playType}</if>
            <if test="icd10code != null  and icd10code != ''">and icd10code = #{icd10code}</if>
@@ -98,7 +104,7 @@
            <if test="icd10codename != null  and icd10codename != ''">and icd10codename like concat('%',
                #{icd10codename}, '%')
            </if>
            <if test="deptNames != null  and deptNames != ''">and deptNames like concat('%',
            <if test="deptNames != null  and deptNames != ''">and dept_names like concat('%',
                #{deptNames}, '%')
            </if>
            <if test="atuoTaskDayOffset != null ">and atuoTaskDayOffset = #{atuoTaskDayOffset}</if>
@@ -117,7 +123,7 @@
    <select id="selectIvrLibaTemplateByID" parameterType="Long" resultMap="IvrLibaTemplateResult">
        <include refid="selectIvrLibaTemplateVo"/>
        where ID = #{ID}
        where ID = #{ID} and del_flag=0
    </select>
    <insert id="insertIvrLibaTemplate" parameterType="com.smartor.domain.IvrLibaTemplate" useGeneratedKeys="true"
@@ -143,14 +149,14 @@
            <if test="modifyUserID != null">modifyUserID,</if>
            <if test="modifyTime != null">modifyTime,</if>
            <if test="groupID != null">groupID,</if>
            <if test="labelInfo != null">labelInfo,</if>
            <if test="labelInfo != null">label_info,</if>
            <if test="submoduleID != null">submoduleID,</if>
            <if test="playType != null">playType,</if>
            <if test="icd10code != null">icd10code,</if>
            <if test="icd10codename != null">icd10codename,</if>
            <if test="atuoTaskDayOffset != null">atuoTaskDayOffset,</if>
            <if test="deptIds != null">deptIds,</if>
            <if test="deptNames != null">deptNames,</if>
            <if test="deptNames != null">dept_names,</if>
            <if test="fKsdm != null">F_KSDM,</if>
            <if test="delFlag != null and delFlag != ''">del_flag,</if>
            <if test="updateBy != null">update_by,</if>
@@ -165,6 +171,8 @@
            <if test="assortid != null">assortid,</if>
            <if test="parameter != null">parameter,</if>
            <if test="tag != null">tag,</if>
            <if test="suitway != null">suitway,</if>
            <if test="otherdata != null">otherdata,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="templateName != null and templateName != ''">#{templateName},</if>
@@ -208,6 +216,8 @@
            <if test="assortid != null">#{assortid},</if>
            <if test="parameter != null">#{parameter},</if>
            <if test="tag != null">#{tag},</if>
            <if test="suitway != null">#{suitway},</if>
            <if test="otherdata != null">#{otherdata},</if>
        </trim>
    </insert>
@@ -233,14 +243,14 @@
            <if test="modifyUserID != null">modifyUserID = #{modifyUserID},</if>
            <if test="modifyTime != null">modifyTime = #{modifyTime},</if>
            <if test="groupID != null">groupID = #{groupID},</if>
            <if test="labelInfo != null">labelInfo = #{labelInfo},</if>
            <if test="labelInfo != null">label_info = #{labelInfo},</if>
            <if test="submoduleID != null">submoduleID = #{submoduleID},</if>
            <if test="playType != null">playType = #{playType},</if>
            <if test="icd10code != null">icd10code = #{icd10code},</if>
            <if test="icd10codename != null">icd10codename = #{icd10codename},</if>
            <if test="atuoTaskDayOffset != null">atuoTaskDayOffset = #{atuoTaskDayOffset},</if>
            <if test="deptIds != null">deptIds = #{deptIds},</if>
            <if test="deptNames != null">deptNames = #{deptNames},</if>
            <if test="deptNames != null">dept_names = #{deptNames},</if>
            <if test="fKsdm != null">F_KSDM = #{fKsdm},</if>
            <if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>
@@ -255,6 +265,8 @@
            <if test="assortid != null">assortid = #{assortid},</if>
            <if test="parameter != null">parameter = #{parameter},</if>
            <if test="tag != null">tag = #{tag},</if>
            <if test="suitway != null">suitway = #{suitway},</if>
            <if test="otherdata != null">otherdata = #{otherdata},</if>
        </trim>
        where ID = #{ID}
    </update>
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateScriptMapper.xml
@@ -8,7 +8,7 @@
        <result property="ID" column="ID"/>
        <result property="templateQuestionNum" column="templateQuestionNum"/>
        <result property="templateID" column="templateID"/>
        <result property="scriptID" column="scriptID"/>
        <result property="scriptid" column="scriptID"/>
        <result property="questionPoint" column="questionPoint"/>
        <result property="questionText" column="questionText"/>
        <result property="questionVoice" column="questionVoice"/>
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateTargetMapper.xml
@@ -5,7 +5,7 @@
<mapper namespace="com.smartor.mapper.IvrLibaTemplateTargetMapper">
    <resultMap type="com.smartor.domain.IvrLibaTemplateTarget" id="IvrLibaTemplateTargetResult">
        <result property="ID" column="ID"/>
        <result property="id" column="id"/>
        <result property="templateQuestionID" column="templateQuestionID"/>
        <result property="templateQuestionNum" column="templateQuestionNum"/>
        <result property="nextQuestionNum" column="nextQuestionNum"/>
@@ -18,8 +18,8 @@
        <result property="targetType" column="targetType"/>
        <result property="categoryName" column="categoryName"/>
        <result property="targetValue" column="targetValue"/>
        <result property="targetID" column="targetID"/>
        <result property="questionTargetID" column="questionTargetID"/>
        <result property="targetid" column="targetid"/>
        <result property="questionTargetid" column="questionTargetid"/>
        <result property="basicRegex" column="basicRegex"/>
        <result property="selfRegex" column="selfRegex"/>
        <result property="regexUsedType" column="regexUsedType"/>
@@ -39,7 +39,7 @@
    </resultMap>
    <sql id="selectIvrLibaTemplateTargetVo">
        select ID,
        select id,
               templateQuestionID,
               templateQuestionNum,
               nextQuestionNum,
@@ -52,8 +52,8 @@
               targetType,
               categoryName,
               targetValue,
               targetID,
               questionTargetID,
               targetid,
               questionTargetid,
               basicRegex,
               selfRegex,
               regexUsedType, language, isEnable, playType, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid
@@ -80,8 +80,8 @@
                '%')
            </if>
            <if test="targetValue != null  and targetValue != ''">and targetValue = #{targetValue}</if>
            <if test="targetID != null  and targetID != ''">and targetID = #{targetID}</if>
            <if test="questionTargetID != null  and questionTargetID != ''">and questionTargetID = #{questionTargetID}
            <if test="targetid != null  and targetid != ''">and targetid = #{targetid}</if>
            <if test="questionTargetid != null  and questionTargetid != ''">and questionTargetid = #{questionTargetid}
            </if>
            <if test="basicRegex != null  and basicRegex != ''">and basicRegex = #{basicRegex}</if>
            <if test="selfRegex != null  and selfRegex != ''">and selfRegex = #{selfRegex}</if>
@@ -99,7 +99,7 @@
    <select id="selectIvrLibaTemplateTargetByID" parameterType="Long" resultMap="IvrLibaTemplateTargetResult">
        <include refid="selectIvrLibaTemplateTargetVo"/>
        where ID = #{ID}
        where id = #{id}
    </select>
    <insert id="insertIvrLibaTemplateTarget" parameterType="com.smartor.domain.IvrLibaTemplateTarget">
@@ -117,8 +117,8 @@
            <if test="targetType != null">targetType,</if>
            <if test="categoryName != null">categoryName,</if>
            <if test="targetValue != null">targetValue,</if>
            <if test="targetID != null">targetID,</if>
            <if test="questionTargetID != null">questionTargetID,</if>
            <if test="targetid != null">targetid,</if>
            <if test="questionTargetid != null">questionTargetid,</if>
            <if test="basicRegex != null">basicRegex,</if>
            <if test="selfRegex != null">selfRegex,</if>
            <if test="regexUsedType != null">regexUsedType,</if>
@@ -149,8 +149,8 @@
            <if test="targetType != null">#{targetType},</if>
            <if test="categoryName != null">#{categoryName},</if>
            <if test="targetValue != null">#{targetValue},</if>
            <if test="targetID != null">#{targetID},</if>
            <if test="questionTargetID != null">#{questionTargetID},</if>
            <if test="targetid != null">#{targetid},</if>
            <if test="questionTargetid != null">#{questionTargetid},</if>
            <if test="basicRegex != null">#{basicRegex},</if>
            <if test="selfRegex != null">#{selfRegex},</if>
            <if test="regexUsedType != null">#{regexUsedType},</if>
@@ -185,8 +185,8 @@
            <if test="targetType != null">targetType = #{targetType},</if>
            <if test="categoryName != null">categoryName = #{categoryName},</if>
            <if test="targetValue != null">targetValue = #{targetValue},</if>
            <if test="targetID != null">targetID = #{targetID},</if>
            <if test="questionTargetID != null">questionTargetID = #{questionTargetID},</if>
            <if test="targetid != null">targetID = #{targetid},</if>
            <if test="questionTargetid != null">questionTargetid = #{questionTargetid},</if>
            <if test="basicRegex != null">basicRegex = #{basicRegex},</if>
            <if test="selfRegex != null">selfRegex = #{selfRegex},</if>
            <if test="regexUsedType != null">regexUsedType = #{regexUsedType},</if>
@@ -204,7 +204,7 @@
            <if test="pid != null">pid = #{pid},</if>
            <if test="guid != null">guid = #{guid},</if>
        </trim>
        where ID = #{ID}
        where id = #{id}
    </update>
    <update id="deleteIvrLibaTemplateTargetByID" parameterType="Long">
@@ -212,13 +212,13 @@
        <trim prefix="SET" suffixOverrides=",">
            <if test="delFlag != null and delFlag != ''">del_flag = 1,</if>
        </trim>
        where ID = #{ID}
        where id = #{id}
    </update>
    <delete id="deleteIvrLibaTemplateTargetByIDs" parameterType="String">
        delete from ivr_liba_template_target where ID in
        <foreach item="ID" collection="array" open="(" separator="," close=")">
            #{ID}
        delete from ivr_liba_template_target where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>
smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
@@ -24,6 +24,7 @@
        <result property="orgid" column="orgid"/>
        <result property="openid" column="openid"/>
        <result property="delFlag" column="del_flag"/>
        <result property="dept" column="deptname"/>
        <result property="updateBy" column="update_by"/>
        <result property="updateTime" column="update_time"/>
        <result property="createBy" column="create_by"/>
@@ -94,6 +95,7 @@
        a.birthdate
        from pat_archive a,pat_archivetag b ,base_tag c
        <where>
            a.del_flag=0 and
            a.patid = b.patid and b.tagid = c.tagid
            <if test="name != null  and name != ''">and a.name like concat('%', #{name}, '%')</if>
            <if test="idcardno != null  and idcardno != ''">and idcardno = #{idcardno}</if>
@@ -108,7 +110,7 @@
    <select id="selectPatArchiveByPatid" parameterType="Long" resultMap="PatArchiveResult">
        <include refid="selectPatArchiveVo"/>
        where patid = #{patid}
        where patid = #{patid} and del_flag=0
    </select>
    <insert id="insertPatArchive">
@@ -270,6 +272,7 @@
        b.tagid as tagid,
        a.patid,
        a.name,
        d.deptname,
        a.sex,
        a.nation,
        a.native_place,
@@ -337,6 +340,7 @@
        c.tagname as tag,
        b.tagid as tagid,
        a.patid,
        d.deptname,
        a.name,
        a.sex,
        a.nation,
@@ -404,6 +408,7 @@
        a.patid,
        a.name,
        a.sex,
        d.deptname,
        a.nation,
        a.native_place,
        a.place_of_residence,
smartor/src/main/resources/mapper/smartor/PatHetaskRelevanceMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,139 @@
<?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.smartor.mapper.PatHetaskRelevanceMapper">
    <resultMap type="com.smartor.domain.PatHetaskRelevance" id="PatHetaskRelevanceResult">
        <result property="id" column="id"/>
        <result property="patId" column="pat_id"/>
        <result property="heTaskId" column="he_task_id"/>
        <result property="delFlag" column="del_flag"/>
        <result property="createTime" column="create_time"/>
        <result property="updateTime" column="update_time"/>
        <result property="remark" column="remark"/>
        <result property="name" column="name"/>
        <result property="age" column="age"/>
        <result property="sex" column="sex"/>
        <result property="badNo" column="bad_no"/>
        <result property="dept" column="dept"/>
        <result property="icdName" column="icd_name"/>
        <result property="phone" column="phone"/>
        <result property="medicalRecordNo" column="medical_record_no"/>
    </resultMap>
    <sql id="selectPatHetaskRelevanceVo">
        select id,
               pat_id,
               he_task_id,
               del_flag,
               create_time,
               update_time,
               remark,
               name,
               age,
               sex,
               bad_no,
               dept,
               icd_name,
               phone,
               medical_record_no
        from pat_hetask_relevance
    </sql>
    <select id="selectPatHetaskRelevanceList" parameterType="com.smartor.domain.PatHetaskRelevance"
            resultMap="PatHetaskRelevanceResult">
        <include refid="selectPatHetaskRelevanceVo"/>
        <where>
            del_flag=0
            <if test="patId != null ">and pat_id = #{patId}</if>
            <if test="heTaskId != null ">and he_task_id = #{heTaskId}</if>
            <if test="name != null  and name != ''">and name like concat('%', #{name}, '%')</if>
            <if test="age != null ">and age = #{age}</if>
            <if test="sex != null ">and sex = #{sex}</if>
            <if test="badNo != null ">and bad_no = #{badNo}</if>
            <if test="dept != null  and dept != ''">and dept = #{dept}</if>
            <if test="phone != null  and phone != ''">and phone = #{phone}</if>
            <if test="medicalRecordNo != null  and medicalRecordNo != ''">and medical_record_no = #{medicalRecordNo}
            </if>
            <if test="icdName != null  and icdName != ''">and icd_name like concat('%', #{icdName}, '%')</if>
        </where>
    </select>
    <select id="selectPatHetaskRelevanceById" parameterType="Long" resultMap="PatHetaskRelevanceResult">
        <include refid="selectPatHetaskRelevanceVo"/>
        where id = #{id}
    </select>
    <insert id="insertPatHetaskRelevance" parameterType="com.smartor.domain.PatHetaskRelevance">
        insert into pat_hetask_relevance
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="patId != null">pat_id,</if>
            <if test="heTaskId != null">he_task_id,</if>
            <if test="delFlag != null">del_flag,</if>
            <if test="createTime != null">create_time,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="remark != null">remark,</if>
            <if test="name != null">name,</if>
            <if test="age != null">age,</if>
            <if test="sex != null">sex,</if>
            <if test="badNo != null">bad_no,</if>
            <if test="dept != null">dept,</if>
            <if test="icdName != null">icd_name,</if>
            <if test="phone != null">phone,</if>
            <if test="medicalRecordNo != null">medical_record_no,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="patId != null">#{patId},</if>
            <if test="heTaskId != null">#{heTaskId},</if>
            <if test="delFlag != null">#{delFlag},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="remark != null">#{remark},</if>
            <if test="name != null">#{name},</if>
            <if test="age != null">#{age},</if>
            <if test="sex != null">#{sex},</if>
            <if test="badNo != null">#{badNo},</if>
            <if test="dept != null">#{dept},</if>
            <if test="icdName != null">#{icdName},</if>
            <if test="phone != null">#{phone},</if>
            <if test="medicalRecordNo != null">#{medicalRecordNo},</if>
        </trim>
    </insert>
    <update id="updatePatHetaskRelevance" parameterType="com.smartor.domain.PatHetaskRelevance">
        update pat_hetask_relevance
        <trim prefix="SET" suffixOverrides=",">
            <if test="patId != null">pat_id = #{patId},</if>
            <if test="heTaskId != null">he_task_id = #{heTaskId},</if>
            <if test="delFlag != null">del_flag = #{delFlag},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="remark != null">remark = #{remark},</if>
            <if test="name != null">name = #{name},</if>
            <if test="age != null">age = #{age},</if>
            <if test="sex != null">sex = #{sex},</if>
            <if test="badNo != null">bad_no = #{badNo},</if>
            <if test="dept != null">dept = #{dept},</if>
            <if test="icdName != null">icd_name = #{icdName},</if>
            <if test="phone != null">phone = #{phone},</if>
            <if test="medicalRecordNo != null">medical_record_no = #{medicalRecordNo},</if>
        </trim>
        where id = #{id}
    </update>
    <update id="deletePatHetaskRelevanceById" parameterType="Long">
        update pat_hetask_relevance
        <trim prefix="SET" suffixOverrides=",">
            <if test="delFlag != null">del_flag =1,</if>
        </trim>
        where id = #{id}
    </update>
    <delete id="deletePatHetaskRelevanceByIds" parameterType="String">
        delete from pat_hetask_relevance where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>
smartor/src/main/resources/mapper/smartor/SvyLibTitleMapper.xml
@@ -26,6 +26,11 @@
        <result property="updateTime" column="update_time"/>
        <result property="isupload" column="isupload"/>
        <result property="uploadTime" column="upload_time"/>
        <result property="deptNames" column="dept_names"/>
        <result property="labelInfo" column="label_info"/>
        <result property="campus" column="campus"/>
        <result property="suitway" column="suitway"/>
        <result property="otherdata" column="otherdata"/>
    </resultMap>
    <sql id="selectSvyLibTitleVo">
@@ -49,18 +54,27 @@
               update_by,
               update_time,
               isupload,
               upload_time
               upload_time,
               dept_names,
               label_info,
               campus,
               suitway,
               otherdata
        from svy_lib_title
    </sql>
    <select id="selectSvyLibTitleList" parameterType="com.smartor.domain.SvyLibTitleReq" resultMap="SvyLibTitleResult">
        select a.svyid, a.categoryid, a.svycode, a.svyname, a.description, a.introduce,a.submitprompt, a.templateid,
        a.version,a.centerlibrarycode, a.centerlibraryid, a.islocal, a.isenable, a.orgid, a.del_flag, a.create_by,
        a.create_time, a.update_by, a.update_time, a.isupload, a.upload_time,c.icdname from svy_lib_title
        a.create_time, a.update_by, a.update_time, a.isupload, a.upload_time,a.dept_names,a.label_info,
        a.campus,a.suitway,a.otherdata
        ,c.icdname from svy_lib_title
        a,icd10_association b,icd10 c
        <where>
            a.del_flag=0 and
            a.svyid=b.SVYID and b.ICD10CODE=c.icdcode
            <if test="categoryid != null ">and a.categoryid = #{categoryid}</if>
            <if test="svyid != null ">and a.svyid = #{svyid}</if>
            <if test="svyname != null  and svyname != ''">and a.svyname like concat('%', #{svyname}, '%')</if>
            <if test="description != null  and description != ''">and a.icdname like concat('%', #{description}, '%')
            </if>
@@ -69,7 +83,7 @@
    <select id="selectSvyLibTitleBySvyid" parameterType="Long" resultMap="SvyLibTitleResult">
        <include refid="selectSvyLibTitleVo"/>
        where svyid = #{svyid}
        where svyid = #{svyid} and del_flag=0
    </select>
    <insert id="insertSvyLibTitle" parameterType="com.smartor.domain.SvyLibTitle" useGeneratedKeys="true"
@@ -96,6 +110,11 @@
            <if test="updateTime != null">update_time,</if>
            <if test="isupload != null">isupload,</if>
            <if test="uploadTime != null">upload_time,</if>
            <if test="deptNames != null">dept_names,</if>
            <if test="labelInfo != null">label_info,</if>
            <if test="campus != null">campus,</if>
            <if test="suitway != null">suitway,</if>
            <if test="otherdata != null">otherdata,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="categoryid != null">#{categoryid},</if>
@@ -118,6 +137,11 @@
            <if test="updateTime != null">#{updateTime},</if>
            <if test="isupload != null">#{isupload},</if>
            <if test="uploadTime != null">#{uploadTime},</if>
            <if test="deptNames != null">#{deptNames},</if>
            <if test="labelInfo != null">#{labelInfo},</if>
            <if test="campus != null">#{campus},</if>
            <if test="suitway != null">#{suitway},</if>
            <if test="otherdata != null">#{otherdata},</if>
        </trim>
    </insert>
@@ -144,6 +168,11 @@
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="isupload != null">isupload = #{isupload},</if>
            <if test="uploadTime != null">upload_time = #{uploadTime},</if>
            <if test="deptNames != null">dept_names=#{deptNames},</if>
            <if test="labelInfo != null">label_info=#{labelInfo},</if>
            <if test="campus != null">campus=#{campus},</if>
            <if test="suitway != null">suitway=#{suitway},</if>
            <if test="otherdata != null">otherdata=#{otherdata},</if>
        </trim>
        where svyid = #{svyid}
    </update>
smartor/src/main/resources/mapper/smartor/SvyLibTopicCategoryMapper.xml
@@ -39,7 +39,7 @@
            resultMap="SvyLibTopicCategoryResult">
        <include refid="selectSvyLibTopicCategoryVo"/>
        <where>
            del_flat=0
            del_flag=0
            <if test="name != null  and name != ''">and name like concat('%', #{name}, '%')</if>
            <if test="topicid != null ">and topicid = #{topicid}</if>
            <if test="pid != null ">and pid = #{pid}</if>
smartor/src/main/resources/mapper/smartor/SvyLibTopicMapper.xml
@@ -24,6 +24,11 @@
        <result property="uploadTime" column="upload_time"/>
        <result property="tag" column="tag"/>
        <result property="categoryid" column="categoryid"/>
        <result property="topicContent" column="topic_content"/>
        <result property="suitway" column="suitway"/>
        <result property="isavailable" column="isavailable"/>
        <result property="language" column="language"/>
        <result property="otherdata" column="otherdata"/>
    </resultMap>
    <sql id="selectSvyLibTopicVo">
@@ -46,6 +51,11 @@
               upload_time,
               tag,
               categoryid,
               topic_content,
               suitway,
               isavailable,
               otherdata,
               language,
               svy_topicid as svyTopicId
        from svy_lib_topic
    </sql>
@@ -53,13 +63,19 @@
    <select id="selectSvyLibTopicList" parameterType="com.smartor.domain.SvyLibTopic" resultMap="SvyLibTopicResult">
        <include refid="selectSvyLibTopicVo"/>
        <where>
            del_flag=0
            <if test="topicid != null ">and topicid = #{topicid}</if>
            <if test="oldid != null ">and oldid = #{oldid}</if>
            <if test="topictype != null ">and topictype = #{topictype}</if>
            <if test="topictype != null and topictype != ''">and topictype = #{topictype}</if>
            <if test="categoryid != null ">and categoryid = #{categoryid}</if>
            <if test="topic != null  and topic != ''">and topic = #{topic}</if>
            <if test="ishide != null ">and ishide = #{ishide}</if>
            <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
            <if test="svyid != null  and svyid != ''">and svyid = #{svyid}</if>
            <if test="topicContent != null  and topicContent != ''">and topic_content = #{topicContent}</if>
            <if test="suitway != null  and suitway != ''">and suitway = #{suitway}</if>
            <if test="isavailable != null  and isavailable != ''">and isavailable = #{isavailable}</if>
            <if test="language != null  and language != ''">and language = #{language}</if>
        </where>
    </select>
@@ -91,6 +107,11 @@
            <if test="tag != null">tag,</if>
            <if test="svyTopicId != null">svy_topicid,</if>
            <if test="categoryid != null">categoryid,</if>
            <if test="topicContent != null">topic_content,</if>
            <if test="suitway != null">suitway,</if>
            <if test="isavailable != null">isavailable,</if>
            <if test="language != null and language!=''">language,</if>
            <if test="otherdata != null and otherdata!=''">otherdata,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="oldid != null">#{oldid},</if>
@@ -112,6 +133,11 @@
            <if test="tag != null">#{tag},</if>
            <if test="svyTopicId != null">#{svyTopicId},</if>
            <if test="categoryid != null">#{categoryid},</if>
            <if test="topicContent != null">#{topicContent},</if>
            <if test="suitway != null">#{suitway},</if>
            <if test="isavailable != null">#{isavailable},</if>
            <if test="language != null">#{language},</if>
            <if test="otherdata != null">#{otherdata},</if>
        </trim>
    </insert>
@@ -135,15 +161,23 @@
            <if test="isupload != null">isupload = #{isupload},</if>
            <if test="uploadTime != null">upload_time = #{uploadTime},</if>
            <if test="categoryid != null">categoryid = #{categoryid},</if>
            <if test="topicContent != null">topic_content = #{topicContent},</if>
            <if test="suitway != null">suitway = #{suitway},</if>
            <if test="isavailable != null">isavailable = #{isavailable},</if>
            <if test="tag != null">tag = #{tag},</if>
            <if test="language != null and language!=''">language = #{language},</if>
            <if test="otherdata != null and otherdata!=''">otherdata = #{otherdata},</if>
        </trim>
        where topicid = #{topicid}
    </update>
    <delete id="deleteSvyLibTopicByTopicid" parameterType="Long">
        delete
        from svy_lib_topic
    <update id="deleteSvyLibTopicByTopicid" parameterType="Long">
        update svy_lib_topic
        <trim prefix="SET" suffixOverrides=",">
            <if test="delFlag != null and delFlag != ''">del_flag =1,</if>
        </trim>
        where topicid = #{topicid}
    </delete>
    </update>
    <delete id="deleteSvyLibTopicByTopicids" parameterType="String">
        delete from svy_lib_topic where topicid in
smartor/src/main/resources/mapper/smartor/SvyLibTopicoptionMapper.xml
@@ -73,9 +73,11 @@
        from svy_lib_topicoption
    </sql>
    <select id="selectSvyLibTopicoptionList" parameterType="com.smartor.domain.SvyLibTopicoption" resultMap="SvyLibTopicoptionResult">
    <select id="selectSvyLibTopicoptionList" parameterType="com.smartor.domain.SvyLibTopicoption"
            resultMap="SvyLibTopicoptionResult">
        <include refid="selectSvyLibTopicoptionVo"/>
        <where>
            del_flag=0
            <if test="topicid != null ">and topicid = #{topicid}</if>
            <if test="svyid != null ">and svyid = #{svyid}</if>
            <if test="topictype != null ">and topictype = #{topictype}</if>
@@ -215,11 +217,13 @@
        where optionid = #{optionid}
    </update>
    <delete id="deleteSvyLibTopicoptionByOptionid" parameterType="Long">
        delete
        from svy_lib_topicoption
    <update id="deleteSvyLibTopicoptionByOptionid" parameterType="Long">
        update svy_lib_topicoption
        <trim prefix="SET" suffixOverrides=",">
            <if test="delFlag != null and delFlag != ''">del_flag = 1,</if>
        </trim>
        where optionid = #{optionid}
    </delete>
    </update>
    <delete id="deleteSvyLibTopicoptionByOptionids" parameterType="String">
        delete from svy_lib_topicoption where optionid in
smartor/src/main/resources/mapper/smartor/TempDetpRelevanceMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,78 @@
<?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.smartor.mapper.TempDetpRelevanceMapper">
    <resultMap type="com.smartor.domain.TempDetpRelevance" id="TempDetpRelevanceResult">
        <result property="id"    column="id"    />
        <result property="tempid"    column="tempid"    />
        <result property="deptId"    column="dept_id"    />
        <result property="type"    column="type"    />
        <result property="delFlag"    column="del_flag"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateTime"    column="update_time"    />
    </resultMap>
    <sql id="selectTempDetpRelevanceVo">
        select id, tempid, dept_id, type, del_flag, create_time, update_time from temp_detp_relevance
    </sql>
    <select id="selectTempDetpRelevanceList" parameterType="com.smartor.domain.TempDetpRelevance" resultMap="TempDetpRelevanceResult">
        <include refid="selectTempDetpRelevanceVo"/>
        <where>
            <if test="tempid != null "> and tempid = #{tempid}</if>
            <if test="deptId != null "> and dept_id = #{deptId}</if>
            <if test="type != null "> and type = #{type}</if>
        </where>
    </select>
    <select id="selectTempDetpRelevanceById" parameterType="Long" resultMap="TempDetpRelevanceResult">
        <include refid="selectTempDetpRelevanceVo"/>
        where id = #{id}
    </select>
    <insert id="insertTempDetpRelevance" parameterType="com.smartor.domain.TempDetpRelevance" useGeneratedKeys="true" keyProperty="id">
        insert into temp_detp_relevance
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="tempid != null">tempid,</if>
            <if test="deptId != null">dept_id,</if>
            <if test="type != null">type,</if>
            <if test="delFlag != null">del_flag,</if>
            <if test="createTime != null">create_time,</if>
            <if test="updateTime != null">update_time,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="tempid != null">#{tempid},</if>
            <if test="deptId != null">#{deptId},</if>
            <if test="type != null">#{type},</if>
            <if test="delFlag != null">#{delFlag},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="updateTime != null">#{updateTime},</if>
         </trim>
    </insert>
    <update id="updateTempDetpRelevance" parameterType="com.smartor.domain.TempDetpRelevance">
        update temp_detp_relevance
        <trim prefix="SET" suffixOverrides=",">
            <if test="tempid != null">tempid = #{tempid},</if>
            <if test="deptId != null">dept_id = #{deptId},</if>
            <if test="type != null">type = #{type},</if>
            <if test="delFlag != null">del_flag = #{delFlag},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
        </trim>
        where id = #{id}
    </update>
    <delete id="deleteTempDetpRelevanceById" parameterType="Long">
        delete from temp_detp_relevance where id = #{id}
    </delete>
    <delete id="deleteTempDetpRelevanceByIds" parameterType="String">
        delete from temp_detp_relevance where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>