批量任务与账单
This commit is contained in:
parent
d9cfee4494
commit
bbe1efc28a
BIN
postdischarge-admin/src/main/resources/template/批量发送任务信息.xlsx
Normal file
BIN
postdischarge-admin/src/main/resources/template/批量发送任务信息.xlsx
Normal file
Binary file not shown.
@ -0,0 +1,30 @@
|
||||
package com.xinelu.common.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @Description 账单来源
|
||||
* @Author zh
|
||||
* @Date 2026-04-20
|
||||
*/
|
||||
@Getter
|
||||
public enum BillSourceEnum {
|
||||
|
||||
/**
|
||||
* 电话
|
||||
*/
|
||||
TELEPHONE("telephone"),
|
||||
|
||||
|
||||
/**
|
||||
* 短信
|
||||
*/
|
||||
MESSAGE("message"),
|
||||
;
|
||||
|
||||
final private String info;
|
||||
|
||||
BillSourceEnum(String info) {
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
@ -18,6 +18,11 @@ public enum NodeExecuteStatusEnum {
|
||||
* 未执行
|
||||
*/
|
||||
UNEXECUTED("UNEXECUTED"),
|
||||
|
||||
/**
|
||||
* 执行中
|
||||
*/
|
||||
EXECUTING("EXECUTING"),
|
||||
;
|
||||
final private String info;
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ public enum PhoneDialMethodEnum {
|
||||
|
||||
|
||||
/**
|
||||
* AI
|
||||
* ALL
|
||||
*/
|
||||
ALL("ALL"),
|
||||
|
||||
|
||||
@ -0,0 +1,45 @@
|
||||
package com.xinelu.common.utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* @description: 字符串获取工具类
|
||||
* @author: zh
|
||||
* @createDate: 2026-04-26
|
||||
*/
|
||||
public class BracketExtractor {
|
||||
|
||||
/**
|
||||
* 提取字符串中所有【】内的文字,返回List<String>
|
||||
*
|
||||
* @param input 原始字符串
|
||||
* @return 包含所有【】内文字的列表(不会为null,若无匹配则返回空列表)
|
||||
*/
|
||||
public static List<String> extractToList(String input) {
|
||||
List<String> result = new ArrayList<>();
|
||||
if (input == null || input.isEmpty()) {
|
||||
return result;
|
||||
}
|
||||
// 正则:匹配【 后任意字符(非贪婪)直到 】
|
||||
Pattern pattern = Pattern.compile("【(.*?)】");
|
||||
Matcher matcher = pattern.matcher(input);
|
||||
while (matcher.find()) {
|
||||
result.add(matcher.group(1)); // group(1) 是括号内捕获的内容
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 提取字符串中所有【】内的文字,返回String[]
|
||||
*
|
||||
* @param input 原始字符串
|
||||
* @return 包含所有【】内文字的数组
|
||||
*/
|
||||
public static String[] extractToArray(String input) {
|
||||
List<String> list = extractToList(input);
|
||||
return list.toArray(new String[0]);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,120 @@
|
||||
package com.xinelu.manage.controller.batchsendtaskinfo;
|
||||
|
||||
import com.xinelu.common.annotation.Log;
|
||||
import com.xinelu.common.constant.Constants;
|
||||
import com.xinelu.common.core.controller.BaseController;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.core.page.TableDataInfo;
|
||||
import com.xinelu.common.enums.BusinessType;
|
||||
import com.xinelu.common.utils.poi.ExcelUtil;
|
||||
import com.xinelu.manage.domain.batchsendtaskinfo.BatchSendTaskInfo;
|
||||
import com.xinelu.manage.dto.batchsendtaskrecordinfo.BatchSendTaskRecordDto;
|
||||
import com.xinelu.manage.service.batchsendtaskinfo.IBatchSendTaskInfoService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 批量推送任务信息Controller
|
||||
*
|
||||
* @author zh
|
||||
* @date 2026-04-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/batchSendTaskInfo")
|
||||
public class BatchSendTaskInfoController extends BaseController {
|
||||
@Resource
|
||||
private IBatchSendTaskInfoService batchSendTaskInfoService;
|
||||
|
||||
/**
|
||||
* 查询批量推送任务信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:batchSendTaskInfo:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BatchSendTaskInfo batchSendTaskInfo) {
|
||||
startPage();
|
||||
List<BatchSendTaskInfo> list = batchSendTaskInfoService.selectBatchSendTaskInfoList(batchSendTaskInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出批量推送任务信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:batchSendTaskInfo:export')")
|
||||
@Log(title = "批量推送任务信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BatchSendTaskInfo batchSendTaskInfo) {
|
||||
List<BatchSendTaskInfo> list = batchSendTaskInfoService.selectBatchSendTaskInfoList(batchSendTaskInfo);
|
||||
ExcelUtil<BatchSendTaskInfo> util = new ExcelUtil<>(BatchSendTaskInfo.class);
|
||||
util.exportExcel(response, list, "批量推送任务信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取批量推送任务信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:batchSendTaskInfo:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(batchSendTaskInfoService.selectBatchSendTaskInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增批量推送任务信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:batchSendTaskInfo:add')")
|
||||
@Log(title = "批量推送任务信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BatchSendTaskInfo batchSendTaskInfo) {
|
||||
return toAjax(batchSendTaskInfoService.insertBatchSendTaskInfo(batchSendTaskInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改批量推送任务信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:batchSendTaskInfo:edit')")
|
||||
@Log(title = "批量推送任务信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BatchSendTaskInfo batchSendTaskInfo) {
|
||||
return toAjax(batchSendTaskInfoService.updateBatchSendTaskInfo(batchSendTaskInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除批量推送任务信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:batchSendTaskInfo:remove')")
|
||||
@Log(title = "批量推送任务信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(batchSendTaskInfoService.deleteBatchSendTaskInfoByIds(ids));
|
||||
}
|
||||
|
||||
@ApiOperation("批量推送任务信息导入")
|
||||
@PostMapping("/batchSendTaskUpload")
|
||||
public AjaxResult batchSendTaskUpload(MultipartFile file, Integer isDistinct, String importName) throws Exception {
|
||||
//判断excel里面是否有数据/文件格式
|
||||
if (Objects.isNull(file) || StringUtils.isBlank(file.getOriginalFilename())) {
|
||||
return AjaxResult.error("请选择需要导入的文件!");
|
||||
}
|
||||
// 获取文件名
|
||||
String filename = file.getOriginalFilename();
|
||||
if (!filename.endsWith(Constants.XLSX) && !filename.endsWith(Constants.XLS)) {
|
||||
return AjaxResult.error("导入文件格式不正确,请导入xlsx或xls格式的文件!");
|
||||
}
|
||||
ExcelUtil<BatchSendTaskInfo> util = new ExcelUtil<>(BatchSendTaskInfo.class);
|
||||
List<BatchSendTaskInfo> list = util.importExcel(file.getInputStream());
|
||||
return batchSendTaskInfoService.batchSendTaskUpload(list, isDistinct, filename, importName);
|
||||
}
|
||||
|
||||
@ApiOperation("创建批量推送任务")
|
||||
@PostMapping("/batchSend")
|
||||
public AjaxResult batchSend(@RequestBody BatchSendTaskRecordDto batchSendTaskRecordDto) throws Exception {
|
||||
return batchSendTaskInfoService.batchSend(batchSendTaskRecordDto);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
package com.xinelu.manage.controller.batchsendtaskrecordinfo;
|
||||
|
||||
import com.xinelu.common.annotation.Log;
|
||||
import com.xinelu.common.core.controller.BaseController;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.core.page.TableDataInfo;
|
||||
import com.xinelu.common.enums.BusinessType;
|
||||
import com.xinelu.common.utils.poi.ExcelUtil;
|
||||
import com.xinelu.manage.domain.batchsendtaskrecordinfo.BatchSendTaskRecordInfo;
|
||||
import com.xinelu.manage.service.batchsendtaskrecordinfo.IBatchSendTaskRecordInfoService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 批量推送任务记录Controller
|
||||
*
|
||||
* @author zh
|
||||
* @date 2026-04-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/batchSendTaskRecordInfo")
|
||||
public class BatchSendTaskRecordInfoController extends BaseController {
|
||||
@Resource
|
||||
private IBatchSendTaskRecordInfoService batchSendTaskRecordInfoService;
|
||||
|
||||
/**
|
||||
* 查询批量推送任务记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:batchSendTaskRecordInfo:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BatchSendTaskRecordInfo batchSendTaskRecordInfo) {
|
||||
startPage();
|
||||
List<BatchSendTaskRecordInfo> list = batchSendTaskRecordInfoService.selectBatchSendTaskRecordInfoList(batchSendTaskRecordInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出批量推送任务记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:batchSendTaskRecordInfo:export')")
|
||||
@Log(title = "批量推送任务记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BatchSendTaskRecordInfo batchSendTaskRecordInfo) {
|
||||
List<BatchSendTaskRecordInfo> list = batchSendTaskRecordInfoService.selectBatchSendTaskRecordInfoList(batchSendTaskRecordInfo);
|
||||
ExcelUtil<BatchSendTaskRecordInfo> util = new ExcelUtil<>(BatchSendTaskRecordInfo.class);
|
||||
util.exportExcel(response, list, "批量推送任务记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取批量推送任务记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:batchSendTaskRecordInfo:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(batchSendTaskRecordInfoService.selectBatchSendTaskRecordInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增批量推送任务记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:batchSendTaskRecordInfo:add')")
|
||||
@Log(title = "批量推送任务记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BatchSendTaskRecordInfo batchSendTaskRecordInfo) {
|
||||
return toAjax(batchSendTaskRecordInfoService.insertBatchSendTaskRecordInfo(batchSendTaskRecordInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改批量推送任务记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:batchSendTaskRecordInfo:edit')")
|
||||
@Log(title = "批量推送任务记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BatchSendTaskRecordInfo batchSendTaskRecordInfo) {
|
||||
return toAjax(batchSendTaskRecordInfoService.updateBatchSendTaskRecordInfo(batchSendTaskRecordInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除批量推送任务记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:batchSendTaskRecordInfo:remove')")
|
||||
@Log(title = "批量推送任务记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(batchSendTaskRecordInfoService.deleteBatchSendTaskRecordInfoByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取短信或电话模板
|
||||
*/
|
||||
@GetMapping("/getTemplate")
|
||||
public List<BatchSendTaskRecordInfo> getTemplate(String batchTaskSource) {
|
||||
return batchSendTaskRecordInfoService.getTemplate(batchTaskSource);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,94 @@
|
||||
package com.xinelu.manage.controller.batchsendtaskvariableinfo;
|
||||
|
||||
import com.xinelu.common.annotation.Log;
|
||||
import com.xinelu.common.core.controller.BaseController;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.core.page.TableDataInfo;
|
||||
import com.xinelu.common.enums.BusinessType;
|
||||
import com.xinelu.common.utils.poi.ExcelUtil;
|
||||
import com.xinelu.manage.domain.batchsendtaskvariableinfo.BatchSendTaskVariableInfo;
|
||||
import com.xinelu.manage.service.batchsendtaskvariableinfo.IBatchSendTaskVariableInfoService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 批量推送任务记录变量属性Controller
|
||||
*
|
||||
* @author zh
|
||||
* @date 2026-04-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/batchSendTaskVariableInfo")
|
||||
public class BatchSendTaskVariableInfoController extends BaseController {
|
||||
@Resource
|
||||
private IBatchSendTaskVariableInfoService batchSendTaskVariableInfoService;
|
||||
|
||||
/**
|
||||
* 查询批量推送任务记录变量属性列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:batchSendTaskVariableInfo:list')")
|
||||
//@GetMapping("/list")
|
||||
public TableDataInfo list(BatchSendTaskVariableInfo batchSendTaskVariableInfo) {
|
||||
startPage();
|
||||
List<BatchSendTaskVariableInfo> list = batchSendTaskVariableInfoService.selectBatchSendTaskVariableInfoList(batchSendTaskVariableInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出批量推送任务记录变量属性列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:batchSendTaskVariableInfo:export')")
|
||||
@Log(title = "批量推送任务记录变量属性", businessType = BusinessType.EXPORT)
|
||||
//@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BatchSendTaskVariableInfo batchSendTaskVariableInfo) {
|
||||
List<BatchSendTaskVariableInfo> list = batchSendTaskVariableInfoService.selectBatchSendTaskVariableInfoList(batchSendTaskVariableInfo);
|
||||
ExcelUtil<BatchSendTaskVariableInfo> util = new ExcelUtil<>(BatchSendTaskVariableInfo.class);
|
||||
util.exportExcel(response, list, "批量推送任务记录变量属性数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取批量推送任务记录变量属性详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:batchSendTaskVariableInfo:query')")
|
||||
//@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(batchSendTaskVariableInfoService.selectBatchSendTaskVariableInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增批量推送任务记录变量属性
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:batchSendTaskVariableInfo:add')")
|
||||
@Log(title = "批量推送任务记录变量属性", businessType = BusinessType.INSERT)
|
||||
//@PostMapping
|
||||
public AjaxResult add(@RequestBody BatchSendTaskVariableInfo batchSendTaskVariableInfo) {
|
||||
return toAjax(batchSendTaskVariableInfoService.insertBatchSendTaskVariableInfo(batchSendTaskVariableInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改批量推送任务记录变量属性
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:batchSendTaskVariableInfo:edit')")
|
||||
@Log(title = "批量推送任务记录变量属性", businessType = BusinessType.UPDATE)
|
||||
//@PutMapping
|
||||
public AjaxResult edit(@RequestBody BatchSendTaskVariableInfo batchSendTaskVariableInfo) {
|
||||
return toAjax(batchSendTaskVariableInfoService.updateBatchSendTaskVariableInfo(batchSendTaskVariableInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除批量推送任务记录变量属性
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:batchSendTaskVariableInfo:remove')")
|
||||
@Log(title = "批量推送任务记录变量属性", businessType = BusinessType.DELETE)
|
||||
//@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(batchSendTaskVariableInfoService.deleteBatchSendTaskVariableInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,110 @@
|
||||
package com.xinelu.manage.controller.billinfo;
|
||||
|
||||
import com.xinelu.common.annotation.Log;
|
||||
import com.xinelu.common.core.controller.BaseController;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.core.page.TableDataInfo;
|
||||
import com.xinelu.common.enums.BusinessType;
|
||||
import com.xinelu.common.utils.poi.ExcelUtil;
|
||||
import com.xinelu.manage.domain.billinfo.BillInfo;
|
||||
import com.xinelu.manage.dto.billinfo.BillInfoDto;
|
||||
import com.xinelu.manage.service.billinfo.IBillInfoService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 账单信息Controller
|
||||
*
|
||||
* @author zh
|
||||
* @date 2026-04-16
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/billInfo")
|
||||
public class BillInfoController extends BaseController {
|
||||
@Resource
|
||||
private IBillInfoService billInfoService;
|
||||
|
||||
/**
|
||||
* 查询账单信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:billInfo:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BillInfo billInfo) {
|
||||
startPage();
|
||||
List<BillInfo> list = billInfoService.selectBillInfoList(billInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出账单信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:billInfo:export')")
|
||||
@Log(title = "账单信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BillInfo billInfo) {
|
||||
List<BillInfo> list = billInfoService.selectBillInfoList(billInfo);
|
||||
ExcelUtil<BillInfo> util = new ExcelUtil<>(BillInfo.class);
|
||||
util.exportExcel(response, list, "账单信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取账单信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:billInfo:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(billInfoService.selectBillInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取账单信息详细信息
|
||||
*/
|
||||
@GetMapping(value = "/view")
|
||||
public AjaxResult view(String billCode) {
|
||||
return AjaxResult.success(billInfoService.selectBillDetails(billCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增账单信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:billInfo:add')")
|
||||
@Log(title = "账单信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BillInfo billInfo) {
|
||||
return toAjax(billInfoService.insertBillInfo(billInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改账单信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:billInfo:edit')")
|
||||
@Log(title = "账单信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BillInfo billInfo) {
|
||||
return toAjax(billInfoService.updateBillInfo(billInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除账单信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:billInfo:remove')")
|
||||
@Log(title = "账单信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(billInfoService.deleteBillInfoByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出账单明细信息列表
|
||||
*/
|
||||
@PostMapping("/exportDetails")
|
||||
public void exportDetails(HttpServletResponse response, BillInfo billInfo) {
|
||||
List<BillInfoDto> list = billInfoService.selectBillDetails(billInfo.getBillCode());
|
||||
ExcelUtil<BillInfoDto> util = new ExcelUtil<>(BillInfoDto.class);
|
||||
util.exportExcel(response, list, "账单信息数据");
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,92 @@
|
||||
package com.xinelu.manage.controller.phonedialrecord;
|
||||
|
||||
import com.xinelu.common.annotation.Log;
|
||||
import com.xinelu.common.core.controller.BaseController;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.core.page.TableDataInfo;
|
||||
import com.xinelu.common.enums.BusinessType;
|
||||
import com.xinelu.common.utils.poi.ExcelUtil;
|
||||
import com.xinelu.manage.domain.phonedialrecord.PhoneDialRecord;
|
||||
import com.xinelu.manage.service.phonedialrecord.IPhoneDialRecordService;
|
||||
import com.xinelu.manage.vo.phonedialrecord.BillPhoneDialVo;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 电话拨打记录Controller
|
||||
*
|
||||
* @author zh
|
||||
* @date 2026-04-17
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/phoneDialRecord")
|
||||
public class PhoneDialRecordController extends BaseController {
|
||||
@Resource
|
||||
private IPhoneDialRecordService phoneDialRecordService;
|
||||
|
||||
/**
|
||||
* 查询电话拨打记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:phoneDialRecord:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BillPhoneDialVo phoneDialRecord) {
|
||||
startPage();
|
||||
List<BillPhoneDialVo> list = phoneDialRecordService.selectPhoneDialRecordList(phoneDialRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出电话拨打记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:phoneDialRecord:export')")
|
||||
@Log(title = "电话拨打记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BillPhoneDialVo phoneDialRecord) {
|
||||
List<BillPhoneDialVo> list = phoneDialRecordService.selectPhoneDialRecordList(phoneDialRecord);
|
||||
ExcelUtil<BillPhoneDialVo> util = new ExcelUtil<>(BillPhoneDialVo.class);
|
||||
util.exportExcel(response, list, "电话拨打记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取电话拨打记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:phoneDialRecord:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(phoneDialRecordService.selectPhoneDialRecordById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增电话拨打记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:phoneDialRecord:add')")
|
||||
@Log(title = "电话拨打记录", businessType = BusinessType.INSERT)
|
||||
//@PostMapping
|
||||
public AjaxResult add(@RequestBody PhoneDialRecord phoneDialRecord) {
|
||||
return toAjax(phoneDialRecordService.insertPhoneDialRecord(phoneDialRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改电话拨打记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:phoneDialRecord:edit')")
|
||||
@Log(title = "电话拨打记录", businessType = BusinessType.UPDATE)
|
||||
//@PutMapping
|
||||
public AjaxResult edit(@RequestBody PhoneDialRecord phoneDialRecord) {
|
||||
return toAjax(phoneDialRecordService.updatePhoneDialRecord(phoneDialRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除电话拨打记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:phoneDialRecord:remove')")
|
||||
@Log(title = "电话拨打记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(phoneDialRecordService.deletePhoneDialRecordByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -140,4 +140,12 @@ public class ScriptInfoController extends BaseController {
|
||||
public AjaxResult updateScriptEdgeNode(@RequestBody ScriptVO scriptVO) {
|
||||
return scriptInfoService.updateScriptEdgeNode(scriptVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询话术变量
|
||||
*/
|
||||
@GetMapping("/selectScriptVariable")
|
||||
public AjaxResult selectScriptVariable(Long id) {
|
||||
return scriptInfoService.selectScriptVariable(id);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,92 @@
|
||||
package com.xinelu.manage.controller.shortmessagesendrecord;
|
||||
|
||||
import com.xinelu.common.annotation.Log;
|
||||
import com.xinelu.common.core.controller.BaseController;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.core.page.TableDataInfo;
|
||||
import com.xinelu.common.enums.BusinessType;
|
||||
import com.xinelu.common.utils.poi.ExcelUtil;
|
||||
import com.xinelu.manage.domain.shortmessagesendrecord.ShortMessageSendRecord;
|
||||
import com.xinelu.manage.service.shortmessagesendrecord.IShortMessageSendRecordService;
|
||||
import com.xinelu.manage.vo.shortmessagesendrecord.ShortMessageSendRecordVo;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 短信发送结果记录Controller
|
||||
*
|
||||
* @author zh
|
||||
* @date 2026-04-17
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/shortMessageSendRecord")
|
||||
public class ShortMessageSendRecordController extends BaseController {
|
||||
@Resource
|
||||
private IShortMessageSendRecordService shortMessageSendRecordService;
|
||||
|
||||
/**
|
||||
* 查询短信发送结果记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:shortMessageSendRecord:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ShortMessageSendRecordVo shortMessageSendRecord) {
|
||||
startPage();
|
||||
List<ShortMessageSendRecordVo> list = shortMessageSendRecordService.selectShortMessageSendRecordList(shortMessageSendRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出短信发送结果记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:shortMessageSendRecord:export')")
|
||||
@Log(title = "短信发送结果记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ShortMessageSendRecordVo shortMessageSendRecord) {
|
||||
List<ShortMessageSendRecordVo> list = shortMessageSendRecordService.selectShortMessageSendRecordList(shortMessageSendRecord);
|
||||
ExcelUtil<ShortMessageSendRecordVo> util = new ExcelUtil<>(ShortMessageSendRecordVo.class);
|
||||
util.exportExcel(response, list, "短信发送结果记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取短信发送结果记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:shortMessageSendRecord:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(shortMessageSendRecordService.selectShortMessageSendRecordById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增短信发送结果记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:shortMessageSendRecord:add')")
|
||||
@Log(title = "短信发送结果记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ShortMessageSendRecord shortMessageSendRecord) {
|
||||
return toAjax(shortMessageSendRecordService.insertShortMessageSendRecord(shortMessageSendRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改短信发送结果记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:shortMessageSendRecord:edit')")
|
||||
@Log(title = "短信发送结果记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ShortMessageSendRecord shortMessageSendRecord) {
|
||||
return toAjax(shortMessageSendRecordService.updateShortMessageSendRecord(shortMessageSendRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除短信发送结果记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:shortMessageSendRecord:remove')")
|
||||
@Log(title = "短信发送结果记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(shortMessageSendRecordService.deleteShortMessageSendRecordByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -74,7 +74,7 @@ public class SignPatientManageRouteController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增签约患者管理任务路径(手动创建任务)
|
||||
* 新增签约患者管理任务路径(手动创建任务)患者导入
|
||||
*/
|
||||
@Log(title = "签约患者管理任务路径", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
|
||||
@ -117,4 +117,12 @@ public class TextMessageController extends BaseController {
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(textMessageService.deleteTextMessageByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询话术变量
|
||||
*/
|
||||
@GetMapping("/selectTextMessageVariable")
|
||||
public AjaxResult selectTextMessageVariable(Long id) {
|
||||
return textMessageService.selectTextMessageVariable(id);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,210 @@
|
||||
package com.xinelu.manage.domain.batchsendtaskinfo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xinelu.common.annotation.Excel;
|
||||
import com.xinelu.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 批量推送任务信息对象 batch_send_task_info
|
||||
*
|
||||
* @author zh
|
||||
* @date 2026-04-26
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ApiModel(value = "批量推送任务信息对象", description = "batch_send_task_info")
|
||||
public class BatchSendTaskInfo extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 导入数据id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 序号
|
||||
*/
|
||||
@ApiModelProperty(value = "序号")
|
||||
private Long orderNum;
|
||||
|
||||
/**
|
||||
* 流水号/导入编号
|
||||
*/
|
||||
@ApiModelProperty(value = "流水号/导入编号")
|
||||
private String sn;
|
||||
|
||||
/**
|
||||
* 导入批次名称
|
||||
*/
|
||||
@ApiModelProperty(value = "导入批次名称")
|
||||
private String importName;
|
||||
|
||||
/**
|
||||
* 团体名称
|
||||
*/
|
||||
@ApiModelProperty(value = "团体名称")
|
||||
@Excel(name = "团体名称")
|
||||
private String teamName;
|
||||
|
||||
/**
|
||||
* 所属机构ID
|
||||
*/
|
||||
@ApiModelProperty(value = "所属机构ID")
|
||||
private Long hospitalAgencyId;
|
||||
|
||||
/**
|
||||
* 所属医院名称
|
||||
*/
|
||||
@ApiModelProperty(value = "所属医院名称")
|
||||
@Excel(name = "所属医院")
|
||||
private String hospitalAgencyName;
|
||||
|
||||
/**
|
||||
* 匹配的科室ID
|
||||
*/
|
||||
@ApiModelProperty(value = "匹配的科室ID")
|
||||
private Long departmentId;
|
||||
|
||||
/**
|
||||
* 匹配的科室名称
|
||||
*/
|
||||
@ApiModelProperty(value = "匹配的科室名称")
|
||||
@Excel(name = "所属科室")
|
||||
private String departmentName;
|
||||
|
||||
/**
|
||||
* 就诊/体检时间,时间格式:yyyy-MM-dd
|
||||
*/
|
||||
@ApiModelProperty(value = "就诊/体检时间,时间格式:yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "就诊/体检时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date visitDate;
|
||||
|
||||
/**
|
||||
* 门诊/住院/体检号
|
||||
*/
|
||||
@ApiModelProperty(value = "门诊/住院/体检号")
|
||||
@Excel(name = "门诊/住院/体检号")
|
||||
private String inHospitalNumber;
|
||||
|
||||
/**
|
||||
* 患者姓名
|
||||
*/
|
||||
@ApiModelProperty(value = "患者姓名")
|
||||
@Excel(name = "姓名")
|
||||
private String patientName;
|
||||
|
||||
/**
|
||||
* 患者电话
|
||||
*/
|
||||
@ApiModelProperty(value = "患者电话")
|
||||
@Excel(name = "电话")
|
||||
private String patientPhone;
|
||||
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
@ApiModelProperty(value = "性别")
|
||||
@Excel(name = "性别")
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
@ApiModelProperty(value = "年龄")
|
||||
@Excel(name = "年龄")
|
||||
private Long age;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
@ApiModelProperty(value = "身份证号")
|
||||
@Excel(name = "身份证号")
|
||||
private String cardNo;
|
||||
|
||||
/**
|
||||
* 人群id
|
||||
*/
|
||||
@ApiModelProperty(value = "人群id")
|
||||
private Long crowdId;
|
||||
|
||||
/**
|
||||
* 人群名称
|
||||
*/
|
||||
@ApiModelProperty(value = "人群名称")
|
||||
@Excel(name = "所属人群")
|
||||
private String crowdName;
|
||||
|
||||
/**
|
||||
* 体检总结/主要诊断
|
||||
*/
|
||||
@ApiModelProperty(value = "体检总结/主要诊断")
|
||||
@Excel(name = "体检总结/主要诊断")
|
||||
private String physicalExaminationSummary;
|
||||
|
||||
/**
|
||||
* 总结标签,逗号隔断
|
||||
*/
|
||||
@ApiModelProperty(value = "总结标签,逗号隔断")
|
||||
private String physicalExaminationLabel;
|
||||
|
||||
/**
|
||||
* 删除标识,0:未删除,1:已删除
|
||||
*/
|
||||
private Integer delFlag;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
BatchSendTaskInfo that = (BatchSendTaskInfo) o;
|
||||
return Objects.equals(inHospitalNumber, that.inHospitalNumber) && Objects.equals(patientPhone, that.patientPhone);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(inHospitalNumber, patientPhone);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("orderNum", getOrderNum())
|
||||
.append("sn", getSn())
|
||||
.append("importName", getImportName())
|
||||
.append("teamName", getTeamName())
|
||||
.append("hospitalAgencyId", getHospitalAgencyId())
|
||||
.append("hospitalAgencyName", getHospitalAgencyName())
|
||||
.append("departmentId", getDepartmentId())
|
||||
.append("departmentName", getDepartmentName())
|
||||
.append("visitDate", getVisitDate())
|
||||
.append("inHospitalNumber", getInHospitalNumber())
|
||||
.append("patientName", getPatientName())
|
||||
.append("patientPhone", getPatientPhone())
|
||||
.append("age", getAge())
|
||||
.append("cardNo", getCardNo())
|
||||
.append("crowdId", getCrowdId())
|
||||
.append("crowdName", getCrowdName())
|
||||
.append("physicalExaminationSummary", getPhysicalExaminationSummary())
|
||||
.append("physicalExaminationLabel", getPhysicalExaminationLabel())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,130 @@
|
||||
package com.xinelu.manage.domain.batchsendtaskrecordinfo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xinelu.common.annotation.Excel;
|
||||
import com.xinelu.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 批量推送任务记录对象 batch_send_task_record_info
|
||||
*
|
||||
* @author zh
|
||||
* @date 2026-04-26
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "批量推送任务记录对象", description = "batch_send_task_record_info")
|
||||
public class BatchSendTaskRecordInfo extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 批量发送任务id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 批量发送任务编号
|
||||
*/
|
||||
@ApiModelProperty(value = "批量发送任务编号")
|
||||
@Excel(name = "批量发送任务编号")
|
||||
private String batchTaskNumber;
|
||||
|
||||
/**
|
||||
* 批量发送任务名称
|
||||
*/
|
||||
@ApiModelProperty(value = "批量发送任务名称")
|
||||
@Excel(name = "批量发送任务名称")
|
||||
private String batchTaskName;
|
||||
|
||||
/**
|
||||
* 批量任务:BATCH_TASK,单个实时拔打任务:ACTUAL_TIME_TASK
|
||||
*/
|
||||
@ApiModelProperty(value = "批量任务:BATCH_TASK,单个实时拔打任务:ACTUAL_TIME_TASK")
|
||||
private String taskExecuteType;
|
||||
|
||||
/**
|
||||
* 任务计划执行时间
|
||||
*/
|
||||
@ApiModelProperty(value = "任务计划执行时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "任务计划执行时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private LocalDateTime nodePlanTime;
|
||||
|
||||
/**
|
||||
* 模版类型,短信:message;电话:telephone
|
||||
*/
|
||||
@ApiModelProperty(value = "模版类型,短信:message;电话:telephone")
|
||||
@Excel(name = "模版类型,短信:message;电话:telephone")
|
||||
private String batchTaskSource;
|
||||
|
||||
/**
|
||||
* 第三方平台模板ID
|
||||
*/
|
||||
@ApiModelProperty(value = "第三方平台模板ID")
|
||||
private String robotPublishId;
|
||||
|
||||
/**
|
||||
* 模板表id
|
||||
*/
|
||||
@ApiModelProperty(value = "模板表id")
|
||||
private String templateId;
|
||||
|
||||
/**
|
||||
* 电话模板名称
|
||||
*/
|
||||
@ApiModelProperty(value = "电话模板名称")
|
||||
@Excel(name = "模板名称")
|
||||
private String templateName;
|
||||
|
||||
/**
|
||||
* 内容(变量使用特殊符号进行标记)
|
||||
*/
|
||||
@ApiModelProperty(value = "内容")
|
||||
@Excel(name = "内容", readConverterExp = "变量使用特殊符号进行标记")
|
||||
private String nodeContent;
|
||||
|
||||
/**
|
||||
* 节点任务执行状态,已执行:EXECUTED,未执行:UNEXECUTED,执行中:EXECUTING
|
||||
*/
|
||||
@ApiModelProperty(value = "节点任务执行状态,已执行:EXECUTED,未执行:UNEXECUTED,执行中:EXECUTING")
|
||||
@Excel(name = "节点任务执行状态,已执行:EXECUTED,未执行:UNEXECUTED,执行中:EXECUTING")
|
||||
private String nodeExecuteStatus;
|
||||
|
||||
/**
|
||||
* 总结标签,逗号隔断
|
||||
*/
|
||||
@ApiModelProperty(value = "总结标签,逗号隔断")
|
||||
@Excel(name = "总结标签")
|
||||
private String physicalExaminationLabel;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("batchTaskNumber", getBatchTaskNumber())
|
||||
.append("batchTaskName", getBatchTaskName())
|
||||
.append("taskExecuteType", getTaskExecuteType())
|
||||
.append("nodePlanTime", getNodePlanTime())
|
||||
.append("batchTaskSource", getBatchTaskSource())
|
||||
.append("robotPublishId", getRobotPublishId())
|
||||
.append("templateId", getTemplateId())
|
||||
.append("templateName", getTemplateName())
|
||||
.append("nodeContent", getNodeContent())
|
||||
.append("nodeExecuteStatus", getNodeExecuteStatus())
|
||||
.append("physicalExaminationLabel", getPhysicalExaminationLabel())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.xinelu.manage.domain.batchsendtaskvariableinfo;
|
||||
|
||||
import com.xinelu.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 批量推送任务记录变量属性对象 batch_send_task_variable_info
|
||||
*
|
||||
* @author zh
|
||||
* @date 2026-04-26
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "批量推送任务记录变量属性对象", description = "batch_send_task_variable_info")
|
||||
public class BatchSendTaskVariableInfo extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 导入数据id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 变量
|
||||
*/
|
||||
@ApiModelProperty(value = "变量")
|
||||
private String variable;
|
||||
|
||||
/**
|
||||
* 变量属性
|
||||
*/
|
||||
@ApiModelProperty(value = "变量属性")
|
||||
private String variableAttribute;
|
||||
|
||||
/**
|
||||
* 批量推送任务记录表id
|
||||
*/
|
||||
@ApiModelProperty(value = "批量推送任务记录表id")
|
||||
private Long batchSendTaskRecordId;
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("variable", getVariable())
|
||||
.append("variableAttribute", getVariableAttribute())
|
||||
.append("batchSendTaskRecordId", getBatchSendTaskRecordId())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
package com.xinelu.manage.domain.billinfo;
|
||||
|
||||
import com.xinelu.common.annotation.Excel;
|
||||
import com.xinelu.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 账单信息对象 bill_info
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2026-04-16
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "账单信息对象", description = "bill_info")
|
||||
public class BillInfo extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 账单主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 账单编号
|
||||
*/
|
||||
@ApiModelProperty(value = "账单编号")
|
||||
@Excel(name = "账单编号")
|
||||
private String billCode;
|
||||
|
||||
/**
|
||||
* 账单名称
|
||||
*/
|
||||
@ApiModelProperty(value = "账单名称")
|
||||
@Excel(name = "账单名称")
|
||||
private String billName;
|
||||
|
||||
/**
|
||||
* 账单月份
|
||||
*/
|
||||
@ApiModelProperty(value = "账单月份")
|
||||
@Excel(name = "账单月份")
|
||||
private String billMonth;
|
||||
|
||||
/**
|
||||
* 条数/时长
|
||||
*/
|
||||
@ApiModelProperty(value = "条数/时长")
|
||||
@Excel(name = "条数/时长")
|
||||
private BigDecimal pushLength;
|
||||
|
||||
/**
|
||||
* 账单金额
|
||||
*/
|
||||
@ApiModelProperty(value = "账单金额")
|
||||
@Excel(name = "账单金额")
|
||||
private BigDecimal billExpense;
|
||||
|
||||
/**
|
||||
* 缴费状态,已缴费:PAID,未交费:UNPAID_FEES
|
||||
*/
|
||||
@ApiModelProperty(value = "缴费状态,已缴费:PAID,未交费:UNPAID_FEES")
|
||||
@Excel(name = "缴费状态,已缴费:PAID,未交费:UNPAID_FEES")
|
||||
private String paymentStatus;
|
||||
|
||||
/**
|
||||
* 账单来源,短信:message;电话:telephone
|
||||
*/
|
||||
@ApiModelProperty(value = "账单来源,短信:message;电话:telephone")
|
||||
@Excel(name = "账单来源,短信:message;电话:telephone")
|
||||
private String billSource;
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("billCode", getBillCode())
|
||||
.append("billName", getBillName())
|
||||
.append("billMonth", getBillMonth())
|
||||
.append("pushLength", getPushLength())
|
||||
.append("billExpense", getBillExpense())
|
||||
.append("paymentStatus", getPaymentStatus())
|
||||
.append("billSource", getBillSource())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -12,6 +12,7 @@ import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
@ -37,21 +38,19 @@ public class PhoneDialRecord extends BaseEntity {
|
||||
* 患者id
|
||||
*/
|
||||
@ApiModelProperty(value = "患者id")
|
||||
@Excel(name = "患者id")
|
||||
private Long patientId;
|
||||
|
||||
/**
|
||||
* 签约患者管理任务节点表id
|
||||
*/
|
||||
@ApiModelProperty(value = "签约患者管理任务节点表id")
|
||||
@Excel(name = "签约患者管理任务节点表id")
|
||||
private Long manageRouteNodeId;
|
||||
|
||||
/**
|
||||
* 患者手机号
|
||||
*/
|
||||
@ApiModelProperty(value = "患者手机号")
|
||||
@Excel(name = "患者手机号")
|
||||
@Excel(name = "手机号")
|
||||
private String patientPhone;
|
||||
|
||||
/**
|
||||
@ -66,42 +65,37 @@ public class PhoneDialRecord extends BaseEntity {
|
||||
* 电话模板id
|
||||
*/
|
||||
@ApiModelProperty(value = "电话模板id")
|
||||
@Excel(name = "电话模板id")
|
||||
private String phoneTemplateId;
|
||||
|
||||
/**
|
||||
* 电话模板名称
|
||||
*/
|
||||
@ApiModelProperty(value = "电话模板名称")
|
||||
@Excel(name = "电话模板名称")
|
||||
@Excel(name = "模板名称")
|
||||
private String phoneTemplateName;
|
||||
|
||||
/**
|
||||
* 替换标签之后的电话内容
|
||||
*/
|
||||
@ApiModelProperty(value = "替换标签之后的电话内容")
|
||||
@Excel(name = "替换标签之后的电话内容")
|
||||
private String messageNodeContent;
|
||||
|
||||
/**
|
||||
* AI :自动外呼 或 COMMON:人工随访电话,否则为空
|
||||
*/
|
||||
@ApiModelProperty(value = "AI :自动外呼 或 COMMON:人工随访电话,否则为空")
|
||||
@Excel(name = "AI :自动外呼 或 COMMON:人工随访电话,否则为空")
|
||||
private String phoneDialMethod;
|
||||
|
||||
/**
|
||||
* 推送结果状态码(0表示成功)
|
||||
*/
|
||||
@ApiModelProperty(value = "推送结果状态码")
|
||||
@Excel(name = "推送结果状态码", readConverterExp = "0表示成功")
|
||||
private Long errorCode;
|
||||
|
||||
/**
|
||||
* 推送结果状态码,success:成功,fail:失败
|
||||
*/
|
||||
@ApiModelProperty(value = "推送结果状态码,success:成功,fail:失败")
|
||||
@Excel(name = "推送结果状态码,success:成功,fail:失败")
|
||||
private String errorStatus;
|
||||
|
||||
/**
|
||||
@ -116,6 +110,33 @@ public class PhoneDialRecord extends BaseEntity {
|
||||
@ApiModelProperty(value = "通话录音存储路径")
|
||||
private String phoneDialRecordVideo;
|
||||
|
||||
/**
|
||||
* 通话时长
|
||||
*/
|
||||
@ApiModelProperty(value = "通话时长")
|
||||
@Excel(name = "通话时长")
|
||||
private BigDecimal phoneDuration;
|
||||
|
||||
/**
|
||||
* 通话费用
|
||||
*/
|
||||
@ApiModelProperty(value = "单价")
|
||||
@Excel(name = "单价")
|
||||
private BigDecimal phoneUnitPrice;
|
||||
|
||||
/**
|
||||
* 通话费用
|
||||
*/
|
||||
@ApiModelProperty(value = "通话费用")
|
||||
@Excel(name = "通话费用")
|
||||
private BigDecimal phoneExpense;
|
||||
|
||||
/**
|
||||
* 关联账单id
|
||||
*/
|
||||
@ApiModelProperty(value = "关联账单id")
|
||||
private Long billId;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
@ -134,6 +155,12 @@ public class PhoneDialRecord extends BaseEntity {
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("ctUuid", getCtUuid())
|
||||
.append("phoneDialRecordVideo", getPhoneDialRecordVideo())
|
||||
.append("phoneDuration", getPhoneDuration())
|
||||
.append("phoneCost", getPhoneExpense())
|
||||
.append("phoneUnitPrice", getPhoneUnitPrice())
|
||||
.append("billId", getBillId())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,8 +12,8 @@ import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 短信发送结果记录对象 short_message_send_record
|
||||
@ -38,21 +38,19 @@ public class ShortMessageSendRecord extends BaseEntity {
|
||||
* 患者id
|
||||
*/
|
||||
@ApiModelProperty(value = "患者id")
|
||||
@Excel(name = "患者id")
|
||||
private Long patientId;
|
||||
|
||||
/**
|
||||
* 签约患者管理任务节点表id
|
||||
*/
|
||||
@ApiModelProperty(value = "签约患者管理任务节点表id")
|
||||
@Excel(name = "签约患者管理任务节点表id")
|
||||
private Long manageRouteNodeId;
|
||||
|
||||
/**
|
||||
* 患者手机号
|
||||
*/
|
||||
@ApiModelProperty(value = "患者手机号")
|
||||
@Excel(name = "患者手机号")
|
||||
@Excel(name = "手机号")
|
||||
private String patientPhone;
|
||||
|
||||
/**
|
||||
@ -67,37 +65,65 @@ public class ShortMessageSendRecord extends BaseEntity {
|
||||
* 消息模板id
|
||||
*/
|
||||
@ApiModelProperty(value = "消息模板id")
|
||||
@Excel(name = "消息模板id")
|
||||
private String messageTemplateId;
|
||||
|
||||
/**
|
||||
* 消息内容
|
||||
*/
|
||||
@ApiModelProperty(value = "消息内容")
|
||||
@Excel(name = "消息内容")
|
||||
private String messageNodeContent;
|
||||
|
||||
/**
|
||||
* 推送结果状态码(0表示成功)
|
||||
*/
|
||||
@ApiModelProperty(value = "推送结果状态码")
|
||||
@Excel(name = "推送结果状态码", readConverterExp = "0表示成功")
|
||||
private Long errorCode;
|
||||
|
||||
/**
|
||||
* 推送结果状态码,success:成功,fail:失败
|
||||
*/
|
||||
@ApiModelProperty(value = "推送结果状态码,success:成功,fail:失败")
|
||||
@Excel(name = "推送结果状态码,success:成功,fail:失败")
|
||||
private String errorStatus;
|
||||
|
||||
/**
|
||||
* PHONE_MSG:电话同时发短信时;COMMON:通用
|
||||
*/
|
||||
@ApiModelProperty(value = "PHONE_MSG:电话同时发短信时;COMMON:通用")
|
||||
@Excel(name = "PHONE_MSG:电话同时发短信时;COMMON:通用")
|
||||
private String messageType;
|
||||
|
||||
/**
|
||||
* 短信长度
|
||||
*/
|
||||
@ApiModelProperty(value = "短信长度")
|
||||
@Excel(name = "短信长度")
|
||||
private Long messageLength;
|
||||
|
||||
/**
|
||||
* 短信数量
|
||||
*/
|
||||
@ApiModelProperty(value = "短信数量")
|
||||
@Excel(name = "短信数量")
|
||||
private Long messageQuantity;
|
||||
|
||||
/**
|
||||
* 短信单价
|
||||
*/
|
||||
@ApiModelProperty(value = "短信单价")
|
||||
@Excel(name = "短信单价")
|
||||
private BigDecimal messageUnitPrice;
|
||||
|
||||
/**
|
||||
* 短信价格
|
||||
*/
|
||||
@ApiModelProperty(value = "短信价格")
|
||||
@Excel(name = "短信价格")
|
||||
private BigDecimal messageExpense;
|
||||
|
||||
/**
|
||||
* 关联账单id
|
||||
*/
|
||||
@ApiModelProperty(value = "关联账单id")
|
||||
private Long billId;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
@ -116,6 +142,11 @@ public class ShortMessageSendRecord extends BaseEntity {
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("messageType", getMessageType())
|
||||
.append("messageLength", getMessageLength())
|
||||
.append("messageQuantity", getMessageQuantity())
|
||||
.append("messageUnitPrice", getMessageUnitPrice())
|
||||
.append("messageExpense", getMessageExpense())
|
||||
.append("billId", getBillId())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,6 @@ import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
|
||||
/**
|
||||
* 签约患者管理任务路径对象 sign_patient_manage_route
|
||||
@ -140,4 +139,11 @@ public class SignPatientManageRoute extends BaseEntity {
|
||||
@Excel(name = "导入患者主表ID")
|
||||
private String importMainId;
|
||||
|
||||
/** 批量推送任务表id */
|
||||
@ApiModelProperty(value = "批量推送任务表id")
|
||||
private Long batchSendTaskRecordId;
|
||||
|
||||
/** 批量推送信息表id */
|
||||
@ApiModelProperty(value = "批量推送信息表id")
|
||||
private Long batchSendTaskId;
|
||||
}
|
||||
|
||||
@ -112,6 +112,10 @@ public class TextMessage extends BaseEntity {
|
||||
*/
|
||||
private Long sourceTemplateId;
|
||||
|
||||
/**
|
||||
* 短信变量,竖线隔开。来源于创建短息任务页面
|
||||
*/
|
||||
private String variables;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
@ -128,6 +132,7 @@ public class TextMessage extends BaseEntity {
|
||||
.append("textMessageStatus", getTextMessageStatus())
|
||||
.append("textMessageSort", getTextMessageSort())
|
||||
.append("textMessageRemark", getTextMessageRemark())
|
||||
.append("variables", getVariables())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
|
||||
@ -44,6 +44,11 @@ public class CreateTaskDto {
|
||||
*/
|
||||
private List<Integer> forbidDialDate;
|
||||
|
||||
/**
|
||||
* 禁呼时间,默认为空,表示不限制禁呼时间 :[{"forbidDialStartTime":"12:00","forbidDialEndTime":"13:00"},{"forbidDialStartTime":"14:00","forbidDialEndTime":"15:00"}]
|
||||
*/
|
||||
private List<RetryRuleList> forbidDialTime;
|
||||
|
||||
/**
|
||||
* 重试次数,整数,且 N ≤ 3,默认为空,表示不重试
|
||||
*/
|
||||
@ -64,12 +69,21 @@ public class CreateTaskDto {
|
||||
*/
|
||||
private Boolean isOpenPhoneDown = false;
|
||||
|
||||
/**
|
||||
* 是否开启重复号码过滤,true为开启,false为关闭
|
||||
*/
|
||||
private Boolean isOpenRepeatFilter = true;
|
||||
|
||||
/**
|
||||
* 号码类型过滤 1-400号码;2-800号码;3-手机号码;4-固话;5-95号码;6-96号码;7-其他
|
||||
*/
|
||||
private List<Integer> numTypeFilterList;
|
||||
|
||||
/**
|
||||
* 是否开启任务回调 默认false
|
||||
*/
|
||||
private Boolean taskDataCallback;
|
||||
|
||||
/**
|
||||
* 任务级回调地址设置
|
||||
*/
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
package com.xinelu.manage.dto.aiob;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 禁呼时间
|
||||
*/
|
||||
@Data
|
||||
public class RetryRuleList {
|
||||
|
||||
/**
|
||||
* 禁呼开始时间
|
||||
*/
|
||||
private String forbidDialStartTime;
|
||||
|
||||
/**
|
||||
* 禁呼截止时间
|
||||
*/
|
||||
private String forbidDialEndTime;
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package com.xinelu.manage.dto.batchsendtaskrecordinfo;
|
||||
|
||||
import com.xinelu.manage.domain.batchsendtaskinfo.BatchSendTaskInfo;
|
||||
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 批量任务创建dto
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class BatchSendTaskRecordDto extends SignPatientManageRouteNode {
|
||||
|
||||
/**
|
||||
* 总结标签,逗号隔断
|
||||
*/
|
||||
@ApiModelProperty(value = "总结标签,逗号隔断")
|
||||
private String physicalExaminationLabel;
|
||||
|
||||
/**
|
||||
* 模版类型,短信:message;电话:telephone
|
||||
*/
|
||||
@ApiModelProperty(value = "模版类型,短信:message;电话:telephone")
|
||||
private String batchTaskSource;
|
||||
|
||||
List<BatchSendTaskInfo> list;
|
||||
|
||||
/**
|
||||
* 名单的变量variable map,模板需要用到的变量,{"key1": "value1","key2": "value2"}
|
||||
*/
|
||||
private String variable;
|
||||
|
||||
private Map<String, String> vars;
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
package com.xinelu.manage.dto.billinfo;
|
||||
|
||||
import com.xinelu.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 账单dto
|
||||
*/
|
||||
@Data
|
||||
public class BillInfoDto {
|
||||
|
||||
/**
|
||||
* 患者姓名
|
||||
*/
|
||||
@ApiModelProperty(value = "患者姓名")
|
||||
@Excel(name = "姓名")
|
||||
private String patientName;
|
||||
|
||||
/**
|
||||
* 患者电话
|
||||
*/
|
||||
@ApiModelProperty(value = "患者电话")
|
||||
@Excel(name = "电话")
|
||||
private String patientPhone;
|
||||
|
||||
/**
|
||||
* 模版名称
|
||||
*/
|
||||
@ApiModelProperty(value = "模版名称")
|
||||
@Excel(name = "模版名称")
|
||||
private String template;
|
||||
|
||||
/**
|
||||
* 推送时间
|
||||
*/
|
||||
@ApiModelProperty(value = "推送时间")
|
||||
@Excel(name = "推送时间")
|
||||
private LocalDate pushTime;
|
||||
|
||||
/**
|
||||
* 条数/时长
|
||||
*/
|
||||
@ApiModelProperty(value = "条数/时长")
|
||||
@Excel(name = "条数/时长")
|
||||
private BigDecimal pushLength;
|
||||
|
||||
/**
|
||||
* 单价
|
||||
*/
|
||||
@ApiModelProperty(value = "单价")
|
||||
@Excel(name = "单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
/**
|
||||
* 费用
|
||||
*/
|
||||
@ApiModelProperty(value = "费用")
|
||||
@Excel(name = "费用")
|
||||
private BigDecimal expense;
|
||||
}
|
||||
@ -31,4 +31,9 @@ public class SmsInfoDTO {
|
||||
* 模板中的变量替换JSON串
|
||||
*/
|
||||
private JSONObject templateParam;
|
||||
|
||||
/**
|
||||
* 外部流水扩展字段
|
||||
*/
|
||||
private String OutId;
|
||||
}
|
||||
|
||||
@ -120,4 +120,9 @@ public class TextMessageTaskDTO extends BaseEntity {
|
||||
|
||||
@ApiModelProperty(value = "适用任务类型字典表ids")
|
||||
private Long[] suitTaskTypeIds;
|
||||
|
||||
/**
|
||||
* 短信变量,竖线隔开。来源于创建短息任务页面
|
||||
*/
|
||||
private String variables;
|
||||
}
|
||||
|
||||
@ -0,0 +1,69 @@
|
||||
package com.xinelu.manage.mapper.batchsendtaskinfo;
|
||||
|
||||
import com.xinelu.manage.domain.batchsendtaskinfo.BatchSendTaskInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 批量推送任务信息Mapper接口
|
||||
*
|
||||
* @author zh
|
||||
* @date 2026-04-26
|
||||
*/
|
||||
public interface BatchSendTaskInfoMapper {
|
||||
/**
|
||||
* 查询批量推送任务信息
|
||||
*
|
||||
* @param id 批量推送任务信息主键
|
||||
* @return 批量推送任务信息
|
||||
*/
|
||||
BatchSendTaskInfo selectBatchSendTaskInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询批量推送任务信息列表
|
||||
*
|
||||
* @param batchSendTaskInfo 批量推送任务信息
|
||||
* @return 批量推送任务信息集合
|
||||
*/
|
||||
List<BatchSendTaskInfo> selectBatchSendTaskInfoList(BatchSendTaskInfo batchSendTaskInfo);
|
||||
|
||||
/**
|
||||
* 新增批量推送任务信息
|
||||
*
|
||||
* @param batchSendTaskInfo 批量推送任务信息
|
||||
* @return 结果
|
||||
*/
|
||||
int insertBatchSendTaskInfo(BatchSendTaskInfo batchSendTaskInfo);
|
||||
|
||||
/**
|
||||
* 修改批量推送任务信息
|
||||
*
|
||||
* @param batchSendTaskInfo 批量推送任务信息
|
||||
* @return 结果
|
||||
*/
|
||||
int updateBatchSendTaskInfo(BatchSendTaskInfo batchSendTaskInfo);
|
||||
|
||||
/**
|
||||
* 删除批量推送任务信息
|
||||
*
|
||||
* @param id 批量推送任务信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteBatchSendTaskInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除批量推送任务信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteBatchSendTaskInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 新增患者信息
|
||||
*
|
||||
* @param batchSendTaskInfoList 批量任务信息
|
||||
* @return 结果
|
||||
*/
|
||||
int insertBatchSendTaskInfoList(List<BatchSendTaskInfo> batchSendTaskInfoList);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.xinelu.manage.mapper.batchsendtaskrecordinfo;
|
||||
|
||||
import com.xinelu.manage.domain.batchsendtaskrecordinfo.BatchSendTaskRecordInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 批量推送任务记录Mapper接口
|
||||
*
|
||||
* @author zh
|
||||
* @date 2026-04-26
|
||||
*/
|
||||
public interface BatchSendTaskRecordInfoMapper {
|
||||
/**
|
||||
* 查询批量推送任务记录
|
||||
*
|
||||
* @param id 批量推送任务记录主键
|
||||
* @return 批量推送任务记录
|
||||
*/
|
||||
BatchSendTaskRecordInfo selectBatchSendTaskRecordInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询批量推送任务记录列表
|
||||
*
|
||||
* @param batchSendTaskRecordInfo 批量推送任务记录
|
||||
* @return 批量推送任务记录集合
|
||||
*/
|
||||
List<BatchSendTaskRecordInfo> selectBatchSendTaskRecordInfoList(BatchSendTaskRecordInfo batchSendTaskRecordInfo);
|
||||
|
||||
/**
|
||||
* 新增批量推送任务记录
|
||||
*
|
||||
* @param batchSendTaskRecordInfo 批量推送任务记录
|
||||
* @return 结果
|
||||
*/
|
||||
int insertBatchSendTaskRecordInfo(BatchSendTaskRecordInfo batchSendTaskRecordInfo);
|
||||
|
||||
/**
|
||||
* 修改批量推送任务记录
|
||||
*
|
||||
* @param batchSendTaskRecordInfo 批量推送任务记录
|
||||
* @return 结果
|
||||
*/
|
||||
int updateBatchSendTaskRecordInfo(BatchSendTaskRecordInfo batchSendTaskRecordInfo);
|
||||
|
||||
/**
|
||||
* 删除批量推送任务记录
|
||||
*
|
||||
* @param id 批量推送任务记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteBatchSendTaskRecordInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除批量推送任务记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteBatchSendTaskRecordInfoByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
package com.xinelu.manage.mapper.batchsendtaskvariableinfo;
|
||||
|
||||
import com.xinelu.manage.domain.batchsendtaskvariableinfo.BatchSendTaskVariableInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 批量推送任务记录变量属性Mapper接口
|
||||
*
|
||||
* @author zh
|
||||
* @date 2026-04-26
|
||||
*/
|
||||
public interface BatchSendTaskVariableInfoMapper {
|
||||
/**
|
||||
* 查询批量推送任务记录变量属性
|
||||
*
|
||||
* @param id 批量推送任务记录变量属性主键
|
||||
* @return 批量推送任务记录变量属性
|
||||
*/
|
||||
BatchSendTaskVariableInfo selectBatchSendTaskVariableInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询批量推送任务记录变量属性列表
|
||||
*
|
||||
* @param batchSendTaskVariableInfo 批量推送任务记录变量属性
|
||||
* @return 批量推送任务记录变量属性集合
|
||||
*/
|
||||
List<BatchSendTaskVariableInfo> selectBatchSendTaskVariableInfoList(BatchSendTaskVariableInfo batchSendTaskVariableInfo);
|
||||
|
||||
/**
|
||||
* 新增批量推送任务记录变量属性
|
||||
*
|
||||
* @param batchSendTaskVariableInfo 批量推送任务记录变量属性
|
||||
* @return 结果
|
||||
*/
|
||||
int insertBatchSendTaskVariableInfo(BatchSendTaskVariableInfo batchSendTaskVariableInfo);
|
||||
|
||||
/**
|
||||
* 修改批量推送任务记录变量属性
|
||||
*
|
||||
* @param batchSendTaskVariableInfo 批量推送任务记录变量属性
|
||||
* @return 结果
|
||||
*/
|
||||
int updateBatchSendTaskVariableInfo(BatchSendTaskVariableInfo batchSendTaskVariableInfo);
|
||||
|
||||
/**
|
||||
* 删除批量推送任务记录变量属性
|
||||
*
|
||||
* @param id 批量推送任务记录变量属性主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteBatchSendTaskVariableInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除批量推送任务记录变量属性
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteBatchSendTaskVariableInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量添加变量表
|
||||
*
|
||||
* @param batchSendTaskVariableInfos 变量信息
|
||||
* @return int
|
||||
*/
|
||||
int insertBatchSendTaskVariableInfos(List<BatchSendTaskVariableInfo> batchSendTaskVariableInfos);
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
package com.xinelu.manage.mapper.billinfo;
|
||||
|
||||
import com.xinelu.manage.domain.billinfo.BillInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 账单信息Mapper接口
|
||||
*
|
||||
* @author zh
|
||||
* @date 2026-04-16
|
||||
*/
|
||||
public interface BillInfoMapper {
|
||||
/**
|
||||
* 查询账单信息
|
||||
*
|
||||
* @param id 账单信息主键
|
||||
* @return 账单信息
|
||||
*/
|
||||
BillInfo selectBillInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询账单信息
|
||||
*
|
||||
* @param code 账单信息
|
||||
* @return 账单信息
|
||||
*/
|
||||
BillInfo selectBillInfoByCode(String code);
|
||||
|
||||
/**
|
||||
* 查询账单信息列表
|
||||
*
|
||||
* @param billInfo 账单信息
|
||||
* @return 账单信息集合
|
||||
*/
|
||||
List<BillInfo> selectBillInfoList(BillInfo billInfo);
|
||||
|
||||
/**
|
||||
* 新增账单信息
|
||||
*
|
||||
* @param billInfo 账单信息
|
||||
* @return 结果
|
||||
*/
|
||||
int insertBillInfo(BillInfo billInfo);
|
||||
|
||||
/**
|
||||
* 修改账单信息
|
||||
*
|
||||
* @param billInfo 账单信息
|
||||
* @return 结果
|
||||
*/
|
||||
int updateBillInfo(BillInfo billInfo);
|
||||
|
||||
/**
|
||||
* 删除账单信息
|
||||
*
|
||||
* @param id 账单信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteBillInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除账单信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteBillInfoByIds(Long[] ids);
|
||||
}
|
||||
@ -1,9 +1,12 @@
|
||||
package com.xinelu.manage.mapper.phonedialrecord;
|
||||
|
||||
import com.xinelu.manage.domain.phonedialrecord.PhoneDialRecord;
|
||||
import com.xinelu.manage.dto.billinfo.BillInfoDto;
|
||||
import com.xinelu.manage.dto.phonedialrecord.PhoneDialRecordDto;
|
||||
import com.xinelu.manage.dto.statistics.FollowUpRateDto;
|
||||
import com.xinelu.manage.vo.phonedialrecord.BillPhoneDialVo;
|
||||
import com.xinelu.manage.vo.phonedialrecord.PhoneDialRecordVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -29,6 +32,14 @@ public interface PhoneDialRecordMapper {
|
||||
*/
|
||||
List<PhoneDialRecord> selectPhoneDialRecordList(PhoneDialRecord phoneDialRecord);
|
||||
|
||||
/**
|
||||
* 查询电话拨打记录列表
|
||||
*
|
||||
* @param phoneDialRecord 电话拨打记录
|
||||
* @return 电话拨打记录集合
|
||||
*/
|
||||
List<BillPhoneDialVo> selectPhoneDialRecords(BillPhoneDialVo phoneDialRecord);
|
||||
|
||||
/**
|
||||
* 新增电话拨打记录
|
||||
*
|
||||
@ -86,4 +97,12 @@ public interface PhoneDialRecordMapper {
|
||||
* @return 电话拨打记录集合
|
||||
*/
|
||||
List<PhoneDialRecord> getNoVideoList(PhoneDialRecordDto phoneDialRecordDto);
|
||||
|
||||
/**
|
||||
* 根据账单id查询电话推送记录
|
||||
*
|
||||
* @param billId 账单id
|
||||
* @return BillInfoDto
|
||||
*/
|
||||
List<BillInfoDto> selectPhoneDialStatisticByBillId(Long billId);
|
||||
}
|
||||
|
||||
@ -81,4 +81,11 @@ public interface ScriptInfoMapper {
|
||||
int deleteScriptInfoNode(Long id);
|
||||
|
||||
int deleteScriptInfoEdge(Long id);
|
||||
|
||||
|
||||
/**
|
||||
* 查询话术信息列表
|
||||
* @return 话术信息集合
|
||||
*/
|
||||
List<ScriptInfo> selectScriptInfos();
|
||||
}
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
package com.xinelu.manage.mapper.shortmessagesendrecord;
|
||||
|
||||
import com.xinelu.manage.domain.shortmessagesendrecord.ShortMessageSendRecord;
|
||||
import com.xinelu.manage.dto.billinfo.BillInfoDto;
|
||||
import com.xinelu.manage.dto.statistics.FollowUpRateDto;
|
||||
import com.xinelu.manage.vo.shortmessagesendrecord.ShortMessageSendRecordVo;
|
||||
import com.xinelu.manage.vo.statistics.MessageSendVo;
|
||||
import com.xinelu.manage.vo.subscribemessagesendrecord.RecordNum;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@ -31,6 +33,14 @@ public interface ShortMessageSendRecordMapper {
|
||||
*/
|
||||
List<ShortMessageSendRecord> selectShortMessageSendRecordList(ShortMessageSendRecord shortMessageSendRecord);
|
||||
|
||||
/**
|
||||
* 查询短信发送结果记录列表
|
||||
*
|
||||
* @param shortMessageSendRecord 短信发送结果记录
|
||||
* @return 短信发送结果记录集合
|
||||
*/
|
||||
List<ShortMessageSendRecordVo> selectShortMessageSendRecords(ShortMessageSendRecordVo shortMessageSendRecord);
|
||||
|
||||
/**
|
||||
* 新增短信发送结果记录
|
||||
*
|
||||
@ -72,4 +82,12 @@ public interface ShortMessageSendRecordMapper {
|
||||
List<RecordNum> selectShortMessageRecordCountByManageRouteNodeIds(@Param("manageRouteNodeIds") List<Long> manageRouteNodeIds);
|
||||
|
||||
List<MessageSendVo> getStatisticNum(FollowUpRateDto queryDto);
|
||||
|
||||
/**
|
||||
* 根据账单id查询短信推送记录
|
||||
*
|
||||
* @param billId 账单id
|
||||
* @return BillInfoDto
|
||||
*/
|
||||
List<BillInfoDto> selectShortMessageRecordByBillId(Long billId);
|
||||
}
|
||||
|
||||
@ -173,6 +173,15 @@ public interface SignPatientManageRouteNodeMapper {
|
||||
*/
|
||||
int updateNodeExecuteStatusByIds(@Param("manageRouteNodeIds") List<Long> manageRouteNodeIds, @Param("nodeExecuteStatus") String nodeExecuteStatus, @Param("appletStatus") String appletStatus, @Param("messageStatus") String messageStatus, @Param("officialStatus") String officialStatus, @Param("nodeFinishDate") LocalDateTime nodeFinishDate);
|
||||
|
||||
/**
|
||||
* 修改执行状态
|
||||
*
|
||||
* @param manageRouteNodeIds 节点id
|
||||
* @param taskIdExt 第三方返回的任务ID
|
||||
* @return int
|
||||
*/
|
||||
int updateTaskIdExtBuIds(@Param("manageRouteNodeIds") List<Long> manageRouteNodeIds, @Param("taskIdExt") String taskIdExt);
|
||||
|
||||
/**
|
||||
* 根据创建时间查询任务数量
|
||||
*
|
||||
|
||||
@ -100,4 +100,11 @@ public interface TextMessageMapper {
|
||||
* 检查除当前记录之外是否存在同名的短信模板名称
|
||||
*/
|
||||
int countByTextMessageNameExcludingId(@Param("id") Long id, @Param("departmentId") Long departmentId, @Param("textMessageName") String textMessageName);
|
||||
|
||||
/**
|
||||
* 查询短信模板信息列表
|
||||
*
|
||||
* @return 短信模板信息集合
|
||||
*/
|
||||
List<TextMessageVO> selectTextMessages();
|
||||
}
|
||||
|
||||
@ -0,0 +1,83 @@
|
||||
package com.xinelu.manage.service.batchsendtaskinfo;
|
||||
|
||||
import com.aliyuncs.exceptions.ClientException;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.manage.domain.batchsendtaskinfo.BatchSendTaskInfo;
|
||||
import com.xinelu.manage.dto.batchsendtaskrecordinfo.BatchSendTaskRecordDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 批量推送任务信息Service接口
|
||||
*
|
||||
* @author zh
|
||||
* @date 2026-04-26
|
||||
*/
|
||||
public interface IBatchSendTaskInfoService {
|
||||
/**
|
||||
* 查询批量推送任务信息
|
||||
*
|
||||
* @param id 批量推送任务信息主键
|
||||
* @return 批量推送任务信息
|
||||
*/
|
||||
BatchSendTaskInfo selectBatchSendTaskInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询批量推送任务信息列表
|
||||
*
|
||||
* @param batchSendTaskInfo 批量推送任务信息
|
||||
* @return 批量推送任务信息集合
|
||||
*/
|
||||
List<BatchSendTaskInfo> selectBatchSendTaskInfoList(BatchSendTaskInfo batchSendTaskInfo);
|
||||
|
||||
/**
|
||||
* 新增批量推送任务信息
|
||||
*
|
||||
* @param batchSendTaskInfo 批量推送任务信息
|
||||
* @return 结果
|
||||
*/
|
||||
int insertBatchSendTaskInfo(BatchSendTaskInfo batchSendTaskInfo);
|
||||
|
||||
/**
|
||||
* 修改批量推送任务信息
|
||||
*
|
||||
* @param batchSendTaskInfo 批量推送任务信息
|
||||
* @return 结果
|
||||
*/
|
||||
int updateBatchSendTaskInfo(BatchSendTaskInfo batchSendTaskInfo);
|
||||
|
||||
/**
|
||||
* 批量删除批量推送任务信息
|
||||
*
|
||||
* @param ids 需要删除的批量推送任务信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteBatchSendTaskInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除批量推送任务信息信息
|
||||
*
|
||||
* @param id 批量推送任务信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteBatchSendTaskInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 患者导入
|
||||
*
|
||||
* @param list 患者信息结合
|
||||
* @param isDistinct 1,表示自动去重;0表示不去重;
|
||||
* @param filename 附件名称
|
||||
* @return AjaxResult
|
||||
*/
|
||||
AjaxResult batchSendTaskUpload(List<BatchSendTaskInfo> list, Integer isDistinct, String filename, String importName);
|
||||
|
||||
/**
|
||||
* 创建批量推送任务
|
||||
*
|
||||
* @param batchSendTaskRecordDto 任务信息
|
||||
* @return AjaxResult
|
||||
* @throws ClientException
|
||||
*/
|
||||
AjaxResult batchSend(BatchSendTaskRecordDto batchSendTaskRecordDto) throws ClientException;
|
||||
}
|
||||
@ -0,0 +1,502 @@
|
||||
package com.xinelu.manage.service.batchsendtaskinfo.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.aliyuncs.DefaultAcsClient;
|
||||
import com.aliyuncs.IAcsClient;
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest;
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
|
||||
import com.aliyuncs.exceptions.ClientException;
|
||||
import com.aliyuncs.profile.DefaultProfile;
|
||||
import com.aliyuncs.profile.IClientProfile;
|
||||
import com.xinelu.common.config.AliYunSmsConfig;
|
||||
import com.xinelu.common.config.AliYunSmsTwoConfig;
|
||||
import com.xinelu.common.constant.Constants;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.core.domain.entity.SysDictData;
|
||||
import com.xinelu.common.core.domain.entity.SysUser;
|
||||
import com.xinelu.common.enums.*;
|
||||
import com.xinelu.common.exception.ServiceException;
|
||||
import com.xinelu.common.utils.BracketExtractor;
|
||||
import com.xinelu.common.utils.SecurityUtils;
|
||||
import com.xinelu.common.utils.regex.RegexUtil;
|
||||
import com.xinelu.manage.domain.agency.Agency;
|
||||
import com.xinelu.manage.domain.batchsendtaskinfo.BatchSendTaskInfo;
|
||||
import com.xinelu.manage.domain.batchsendtaskrecordinfo.BatchSendTaskRecordInfo;
|
||||
import com.xinelu.manage.domain.batchsendtaskvariableinfo.BatchSendTaskVariableInfo;
|
||||
import com.xinelu.manage.domain.dialtime.DialTime;
|
||||
import com.xinelu.manage.domain.shortmessagesendrecord.ShortMessageSendRecord;
|
||||
import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute;
|
||||
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
|
||||
import com.xinelu.manage.dto.aiob.CreateTaskDto;
|
||||
import com.xinelu.manage.dto.aiob.CustomerInfoDto;
|
||||
import com.xinelu.manage.dto.aiob.ImportTaskDto;
|
||||
import com.xinelu.manage.dto.aiob.RetryRuleList;
|
||||
import com.xinelu.manage.dto.batchsendtaskrecordinfo.BatchSendTaskRecordDto;
|
||||
import com.xinelu.manage.dto.smssend.SmsInfoDTO;
|
||||
import com.xinelu.manage.mapper.agency.AgencyMapper;
|
||||
import com.xinelu.manage.mapper.batchsendtaskinfo.BatchSendTaskInfoMapper;
|
||||
import com.xinelu.manage.mapper.batchsendtaskrecordinfo.BatchSendTaskRecordInfoMapper;
|
||||
import com.xinelu.manage.mapper.batchsendtaskvariableinfo.BatchSendTaskVariableInfoMapper;
|
||||
import com.xinelu.manage.mapper.patientinfoimportmain.PatientInfoImportMainMapper;
|
||||
import com.xinelu.manage.mapper.signpatientmanageroute.SignPatientManageRouteMapper;
|
||||
import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper;
|
||||
import com.xinelu.manage.service.aiob.IAIOBService;
|
||||
import com.xinelu.manage.service.batchsendtaskinfo.IBatchSendTaskInfoService;
|
||||
import com.xinelu.system.mapper.SysUserMapper;
|
||||
import com.xinelu.system.service.ISysDictTypeService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 批量推送任务信息Service业务层处理
|
||||
*
|
||||
* @author zh
|
||||
* @date 2026-04-26
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class BatchSendTaskInfoServiceImpl implements IBatchSendTaskInfoService {
|
||||
@Resource
|
||||
private BatchSendTaskInfoMapper batchSendTaskInfoMapper;
|
||||
@Resource
|
||||
private SysUserMapper sysUserMapper;
|
||||
@Resource
|
||||
private AgencyMapper agencyMapper;
|
||||
@Resource
|
||||
private SignPatientManageRouteMapper signPatientManageRouteMapper;
|
||||
@Resource
|
||||
private BatchSendTaskRecordInfoMapper batchSendTaskRecordInfoMapper;
|
||||
@Resource
|
||||
private BatchSendTaskVariableInfoMapper batchSendTaskVariableInfoMapper;
|
||||
@Resource
|
||||
private SignPatientManageRouteNodeMapper signPatientManageRouteNodeMapper;
|
||||
@Resource
|
||||
private IAIOBService aiobService;
|
||||
@Resource
|
||||
private PatientInfoImportMainMapper patientInfoImportMainMapper;
|
||||
@Resource
|
||||
private ISysDictTypeService iSysDictTypeService;
|
||||
@Resource
|
||||
private RegexUtil regexUtil;
|
||||
@Resource
|
||||
private AliYunSmsTwoConfig aliYunSmsTwoConfig;
|
||||
@Value("${aiob.callBackUrl}")
|
||||
private String callBackUrl;
|
||||
@Resource
|
||||
private AliYunSmsConfig aliyunSmsConfig;
|
||||
private static final String SUCCESS = "OK";
|
||||
|
||||
/**
|
||||
* 查询批量推送任务信息
|
||||
*
|
||||
* @param id 批量推送任务信息主键
|
||||
* @return 批量推送任务信息
|
||||
*/
|
||||
@Override
|
||||
public BatchSendTaskInfo selectBatchSendTaskInfoById(Long id) {
|
||||
return batchSendTaskInfoMapper.selectBatchSendTaskInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询批量推送任务信息列表
|
||||
*
|
||||
* @param batchSendTaskInfo 批量推送任务信息
|
||||
* @return 批量推送任务信息
|
||||
*/
|
||||
@Override
|
||||
public List<BatchSendTaskInfo> selectBatchSendTaskInfoList(BatchSendTaskInfo batchSendTaskInfo) {
|
||||
return batchSendTaskInfoMapper.selectBatchSendTaskInfoList(batchSendTaskInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增批量推送任务信息
|
||||
*
|
||||
* @param batchSendTaskInfo 批量推送任务信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBatchSendTaskInfo(BatchSendTaskInfo batchSendTaskInfo) {
|
||||
batchSendTaskInfo.setCreateTime(LocalDateTime.now());
|
||||
return batchSendTaskInfoMapper.insertBatchSendTaskInfo(batchSendTaskInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改批量推送任务信息
|
||||
*
|
||||
* @param batchSendTaskInfo 批量推送任务信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBatchSendTaskInfo(BatchSendTaskInfo batchSendTaskInfo) {
|
||||
return batchSendTaskInfoMapper.updateBatchSendTaskInfo(batchSendTaskInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除批量推送任务信息
|
||||
*
|
||||
* @param ids 需要删除的批量推送任务信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBatchSendTaskInfoByIds(Long[] ids) {
|
||||
return batchSendTaskInfoMapper.deleteBatchSendTaskInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除批量推送任务信息信息
|
||||
*
|
||||
* @param id 批量推送任务信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBatchSendTaskInfoById(Long id) {
|
||||
return batchSendTaskInfoMapper.deleteBatchSendTaskInfoById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult batchSendTaskUpload(List<BatchSendTaskInfo> list, Integer isDistinct, String filename, String importName) {
|
||||
if (CollectionUtils.isEmpty(list) || list.size() == 0) {
|
||||
return AjaxResult.success("导入数据列表是空!");
|
||||
}
|
||||
if (Objects.isNull(isDistinct) || isDistinct == 1) {
|
||||
list = list.stream().filter(Objects::nonNull).distinct().collect(Collectors.toList());
|
||||
}
|
||||
List<BatchSendTaskInfo> collect = list.stream().filter(Objects::nonNull).filter(item -> StringUtils.isEmpty(item.getPatientName()) || StringUtils.isEmpty(item.getPatientPhone()) || StringUtils.isEmpty(item.getInHospitalNumber())).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(collect)) {
|
||||
return AjaxResult.error("用户信息不完整,姓名均不允许为空,请完善后重试;");
|
||||
}
|
||||
SysUser sysUser = sysUserMapper.selectUserById(SecurityUtils.getUserId());
|
||||
Agency agency = agencyMapper.selectAgencyById(sysUser.getHospitalAgencyId());
|
||||
if (Objects.isNull(agency) || StringUtils.isEmpty(agency.getNodeType())) {
|
||||
return AjaxResult.error("该账号无所属医院信息,请先配置该账号所属的医院信息!");
|
||||
}
|
||||
String sn = "batch_" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"));
|
||||
for (BatchSendTaskInfo batchSendTaskInfo : list) {
|
||||
batchSendTaskInfo.setSn(sn);
|
||||
batchSendTaskInfo.setHospitalAgencyId(agency.getId());
|
||||
batchSendTaskInfo.setHospitalAgencyName(agency.getAgencyName());
|
||||
batchSendTaskInfo.setImportName(importName);
|
||||
batchSendTaskInfo.setCreateTime(LocalDateTime.now());
|
||||
batchSendTaskInfo.setCreateBy(SecurityUtils.getUsername());
|
||||
batchSendTaskInfo.setDelFlag(0);
|
||||
if (StringUtils.isBlank(batchSendTaskInfo.getDepartmentName())) {
|
||||
batchSendTaskInfo.setDepartmentName("无");
|
||||
}
|
||||
if (StringUtils.isBlank(batchSendTaskInfo.getTeamName())) {
|
||||
batchSendTaskInfo.setTeamName("无");
|
||||
}
|
||||
if (StringUtils.isNotBlank(batchSendTaskInfo.getPhysicalExaminationSummary())) {
|
||||
String[] strings = BracketExtractor.extractToArray(batchSendTaskInfo.getPhysicalExaminationSummary());
|
||||
batchSendTaskInfo.setPhysicalExaminationLabel(Arrays.toString(strings));
|
||||
if (batchSendTaskInfo.getPhysicalExaminationSummary().length() > 999) {
|
||||
batchSendTaskInfo.setPhysicalExaminationSummary(batchSendTaskInfo.getPhysicalExaminationSummary().substring(0, 999));
|
||||
}
|
||||
}
|
||||
}
|
||||
batchSendTaskInfoMapper.insertBatchSendTaskInfoList(list);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建批量推送任务
|
||||
*
|
||||
* @param batchSendTaskRecordDto 任务信息
|
||||
* @return AjaxResult
|
||||
* @throws ClientException
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult batchSend(BatchSendTaskRecordDto batchSendTaskRecordDto) throws ClientException {
|
||||
BatchSendTaskRecordInfo batchSendTaskRecordInfo = new BatchSendTaskRecordInfo();
|
||||
batchSendTaskRecordInfo.setBatchTaskName(batchSendTaskRecordDto.getManageRouteName());
|
||||
String batchTaskNumber = null;
|
||||
if (batchSendTaskRecordDto.getBatchTaskSource().equals(BillSourceEnum.MESSAGE.getInfo())) {
|
||||
batchTaskNumber = "hkqdermyy_message_batch" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"));
|
||||
batchSendTaskRecordInfo.setTemplateId(batchSendTaskRecordDto.getMessageTemplateId().toString());
|
||||
batchSendTaskRecordInfo.setTemplateName(batchSendTaskRecordDto.getMessageTemplateName());
|
||||
batchSendTaskRecordInfo.setRobotPublishId(batchSendTaskRecordDto.getMessageTemplateCode());
|
||||
}
|
||||
if (batchSendTaskRecordDto.getBatchTaskSource().equals(BillSourceEnum.TELEPHONE.getInfo())) {
|
||||
batchTaskNumber = "hkqdermyy_phone_batch" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"));
|
||||
batchSendTaskRecordInfo.setTemplateId(batchSendTaskRecordDto.getPhoneTemplateId());
|
||||
batchSendTaskRecordInfo.setTemplateName(batchSendTaskRecordDto.getPhoneTemplateName());
|
||||
batchSendTaskRecordInfo.setRobotPublishId(batchSendTaskRecordInfo.getRobotPublishId());
|
||||
}
|
||||
batchSendTaskRecordInfo.setBatchTaskNumber(batchTaskNumber);
|
||||
batchSendTaskRecordInfo.setTaskExecuteType(TaskExcuteTypeEnum.BATCH_TASK.getInfo());
|
||||
batchSendTaskRecordInfo.setNodePlanTime(batchSendTaskRecordDto.getNodePlanTime());
|
||||
batchSendTaskRecordInfo.setCreateBy(SecurityUtils.getUsername());
|
||||
batchSendTaskRecordInfo.setBatchTaskSource(batchSendTaskRecordDto.getBatchTaskSource());
|
||||
batchSendTaskRecordInfo.setCreateTime(LocalDateTime.now());
|
||||
int insertBatchSendTaskRecord = batchSendTaskRecordInfoMapper.insertBatchSendTaskRecordInfo(batchSendTaskRecordInfo);
|
||||
if (insertBatchSendTaskRecord <= 0) {
|
||||
log.info("新增批量推送任务记录失败");
|
||||
return AjaxResult.error("上传任务失败!请联系管理员!");
|
||||
}
|
||||
//保存变量
|
||||
if (Objects.nonNull(batchSendTaskRecordDto.getVars())) {
|
||||
List<BatchSendTaskVariableInfo> batchSendTaskVariableInfos = new ArrayList<>();
|
||||
Set<String> keys = batchSendTaskRecordDto.getVars().keySet();
|
||||
for (String key : keys) {
|
||||
BatchSendTaskVariableInfo batchSendTaskVariableInfo = new BatchSendTaskVariableInfo();
|
||||
batchSendTaskVariableInfo.setBatchSendTaskRecordId(batchSendTaskRecordInfo.getId());
|
||||
batchSendTaskVariableInfo.setVariable(key);
|
||||
batchSendTaskVariableInfo.setVariableAttribute(batchSendTaskRecordDto.getVars().get(key));
|
||||
batchSendTaskVariableInfo.setCreateBy(SecurityUtils.getUsername());
|
||||
batchSendTaskRecordInfo.setCreateTime(LocalDateTime.now());
|
||||
batchSendTaskVariableInfos.add(batchSendTaskVariableInfo);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(batchSendTaskVariableInfos)) {
|
||||
batchSendTaskVariableInfoMapper.insertBatchSendTaskVariableInfos(batchSendTaskVariableInfos);
|
||||
}
|
||||
}
|
||||
List<SignPatientManageRoute> signPatientManageRoutes = new ArrayList<>();
|
||||
List<SignPatientManageRouteNode> signPatientManageRouteNodes = new ArrayList<>();
|
||||
List<ShortMessageSendRecord> shortMessageSendRecords = new ArrayList<>();
|
||||
for (BatchSendTaskInfo batchSendTaskInfo : batchSendTaskRecordDto.getList()) {
|
||||
//节点主表
|
||||
SignPatientManageRoute signPatientManageRoute = new SignPatientManageRoute();
|
||||
signPatientManageRoute.setRouteName(batchSendTaskRecordDto.getManageRouteName());
|
||||
signPatientManageRoute.setTaskCreateType(TaskCreateTypeEnum.MANUAL_CREATE.getInfo());
|
||||
signPatientManageRoute.setCreateBy(SecurityUtils.getUsername());
|
||||
signPatientManageRoute.setCreateTime(LocalDateTime.now());
|
||||
signPatientManageRoute.setTaskExcuteType(TaskExcuteTypeEnum.BATCH_TASK.getInfo());
|
||||
signPatientManageRoute.setPatientName(batchSendTaskInfo.getPatientName());
|
||||
signPatientManageRoute.setBatchSendTaskRecordId(batchSendTaskRecordInfo.getId());
|
||||
signPatientManageRoute.setBatchSendTaskId(batchSendTaskInfo.getId());
|
||||
signPatientManageRoutes.add(signPatientManageRoute);
|
||||
//节点node表
|
||||
SignPatientManageRouteNode signPatientManageRouteNode = new SignPatientManageRouteNode();
|
||||
signPatientManageRouteNode.setManageRouteName(batchSendTaskRecordDto.getManageRouteName());
|
||||
signPatientManageRouteNode.setSn(batchTaskNumber);
|
||||
signPatientManageRouteNode.setDialStatus(DialStatusEnum.NODIALED.getInfo());
|
||||
signPatientManageRouteNode.setTaskExcuteType(TaskExcuteTypeEnum.BATCH_TASK.getInfo());
|
||||
signPatientManageRouteNode.setNodePlanTime(batchSendTaskRecordDto.getNodePlanTime());
|
||||
signPatientManageRouteNode.setTaskNodeType(TaskNodeTypeEnum.PHONE_OUTBOUND.getInfo());
|
||||
if (batchSendTaskRecordDto.getBatchTaskSource().equals(BillSourceEnum.TELEPHONE.getInfo())) {
|
||||
signPatientManageRouteNode.setPhonePushSign(1);
|
||||
signPatientManageRouteNode.setScriptInfoId(Objects.isNull(batchSendTaskRecordDto.getScriptInfoId()) ? null : batchSendTaskRecordDto.getScriptInfoId());
|
||||
signPatientManageRouteNode.setRobotPublishId(batchSendTaskRecordDto.getRobotPublishId());
|
||||
signPatientManageRouteNode.setPhoneTemplateId(Objects.isNull(batchSendTaskRecordDto.getPhoneTemplateId()) ? null : batchSendTaskRecordDto.getPhoneTemplateId());
|
||||
signPatientManageRouteNode.setPhoneTemplateName(StringUtils.isBlank(batchSendTaskRecordDto.getPhoneTemplateName()) ? null : batchSendTaskRecordDto.getPhoneTemplateName());
|
||||
signPatientManageRouteNode.setPhoneNodeContent(StringUtils.isBlank(batchSendTaskRecordDto.getPhoneNodeContent()) ? null : batchSendTaskRecordDto.getPhoneNodeContent());
|
||||
signPatientManageRouteNode.setPhoneRedialTimes(StringUtils.isBlank(batchSendTaskRecordDto.getPhoneRedialTimes()) ? null : batchSendTaskRecordDto.getPhoneRedialTimes());
|
||||
signPatientManageRouteNode.setPhoneTimeInterval(Objects.isNull(batchSendTaskRecordDto.getPhoneTimeInterval()) ? null : batchSendTaskRecordDto.getPhoneTimeInterval());
|
||||
signPatientManageRouteNode.setPhoneMessageRemind(StringUtils.isBlank(batchSendTaskRecordDto.getPhoneMessageRemind()) ? null : batchSendTaskRecordDto.getPhoneMessageRemind());
|
||||
signPatientManageRouteNode.setPhoneMessageTemplateId(Objects.isNull(batchSendTaskRecordDto.getPhoneMessageTemplateId()) ? null : batchSendTaskRecordDto.getPhoneMessageTemplateId());
|
||||
signPatientManageRouteNode.setPhoneMessageTemplateName(StringUtils.isBlank(batchSendTaskRecordDto.getPhoneMessageTemplateName()) ? null : batchSendTaskRecordDto.getPhoneMessageTemplateName());
|
||||
signPatientManageRouteNode.setPhoneDialMethod(PhoneDialMethodEnum.AI.getInfo());
|
||||
}
|
||||
if (batchSendTaskRecordDto.getBatchTaskSource().equals(BillSourceEnum.MESSAGE.getInfo())) {
|
||||
signPatientManageRouteNode.setMessagePushSign(1);
|
||||
signPatientManageRouteNode.setMessageTemplateId(Objects.isNull(batchSendTaskRecordDto.getMessageTemplateId()) ? null : batchSendTaskRecordDto.getMessageTemplateId());
|
||||
signPatientManageRouteNode.setMessageTemplateCode(Objects.isNull(batchSendTaskRecordDto.getMessageTemplateCode()) ? null : batchSendTaskRecordDto.getMessageTemplateCode());
|
||||
signPatientManageRouteNode.setMessageTemplateName(StringUtils.isBlank(batchSendTaskRecordDto.getMessageTemplateName()) ? null : batchSendTaskRecordDto.getMessageTemplateName());
|
||||
signPatientManageRouteNode.setMessageNodeContent(batchSendTaskRecordDto.getMessageNodeContent());
|
||||
|
||||
}
|
||||
signPatientManageRouteNode.setRouteCheckStatus(RouteCheckStatusEnum.AGREE.getInfo());
|
||||
signPatientManageRouteNode.setNodeExecuteStatus(NodeExecuteStatusEnum.EXECUTING.getInfo());
|
||||
signPatientManageRouteNode.setDelFlag(0);
|
||||
signPatientManageRouteNode.setCreateBy(SecurityUtils.getUsername());
|
||||
signPatientManageRouteNode.setCreateTime(LocalDateTime.now());
|
||||
signPatientManageRouteNodes.add(signPatientManageRouteNode);
|
||||
//短信发送记录表
|
||||
ShortMessageSendRecord shortMessageSendRecord = new ShortMessageSendRecord();
|
||||
shortMessageSendRecord.setMessageType(ShortMessageTypeEnum.COMMON.getInfo());
|
||||
shortMessageSendRecord.setPatientPhone(batchSendTaskInfo.getPatientPhone());
|
||||
shortMessageSendRecord.setSendTime(LocalDateTime.now());
|
||||
shortMessageSendRecord.setMessageTemplateId(batchSendTaskRecordDto.getMessageTemplateCode());
|
||||
shortMessageSendRecord.setMessageNodeContent(batchSendTaskRecordDto.getMessageNodeContent());
|
||||
shortMessageSendRecord.setCreateTime(LocalDateTime.now());
|
||||
shortMessageSendRecords.add(shortMessageSendRecord);
|
||||
}
|
||||
signPatientManageRouteMapper.insertBatch(signPatientManageRoutes);
|
||||
for (int i = 0; i < signPatientManageRouteNodes.size(); i++) {
|
||||
signPatientManageRouteNodes.get(i).setManageRouteId(signPatientManageRoutes.get(i).getId());
|
||||
}
|
||||
signPatientManageRouteNodeMapper.insertBatch(signPatientManageRouteNodes);
|
||||
if (batchSendTaskRecordDto.getBatchTaskSource().equals(BillSourceEnum.TELEPHONE.getInfo())) {
|
||||
SysUser sysUser = sysUserMapper.selectUserById(SecurityUtils.getUserId());
|
||||
Agency agency = agencyMapper.selectAgencyById(sysUser.getHospitalAgencyId());
|
||||
DialTime dialTime = patientInfoImportMainMapper.selectDialTimeById(agency.getId());
|
||||
LocalTime localStartTime = null;
|
||||
LocalTime localEndTime = null;
|
||||
LocalTime dateStartTime;
|
||||
LocalTime dateEndTime;
|
||||
if (Objects.nonNull(dialTime)) {
|
||||
localStartTime = LocalTime.parse(dialTime.getDialStartTime());
|
||||
localEndTime = LocalTime.parse(dialTime.getDialEndTime());
|
||||
} else {
|
||||
localStartTime = LocalTime.parse("08:00");
|
||||
localEndTime = LocalTime.parse("19:00");
|
||||
}
|
||||
List<SysDictData> sysDictDataList = iSysDictTypeService.selectDictDataByType(Constants.DIAL_TIME);
|
||||
if (CollectionUtils.isEmpty(sysDictDataList) || sysDictDataList.size() != 2) {
|
||||
dateStartTime = LocalTime.parse("08:00");
|
||||
dateEndTime = LocalTime.parse("19:00");
|
||||
} else {
|
||||
dateStartTime = LocalTime.parse(sysDictDataList.get(0).getDictValue());
|
||||
dateEndTime = LocalTime.parse(sysDictDataList.get(1).getDictValue());
|
||||
}
|
||||
if (dateStartTime.isAfter(localStartTime)) {
|
||||
localStartTime = dateStartTime;
|
||||
}
|
||||
if (dateEndTime.isBefore(localEndTime)) {
|
||||
localEndTime = dateEndTime;
|
||||
}
|
||||
log.info("开始创建批量电话推送任务---------------");
|
||||
CreateTaskDto createTaskDto = new CreateTaskDto();
|
||||
//临时重复测试用,
|
||||
String taskName = batchTaskNumber + "-" + batchSendTaskRecordDto.getPhoneTemplateName();
|
||||
log.info("任务名称:" + taskName);
|
||||
createTaskDto.setTaskName(taskName);
|
||||
createTaskDto.setRobotId(batchSendTaskRecordDto.getRobotPublishId());
|
||||
createTaskDto.setDialStartDate(batchSendTaskRecordDto.getNodePlanTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
||||
//默认为空,表示不限制终止时间
|
||||
//createTaskDto.setDialEndDate(batchSendTaskRecordDto.getNodePlanTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
||||
createTaskDto.setForbidDialDate(Arrays.asList(99));
|
||||
List<RetryRuleList> retryRuleLists = new ArrayList<>();
|
||||
RetryRuleList retryRuleList = new RetryRuleList();
|
||||
retryRuleList.setForbidDialStartTime("11:50");
|
||||
retryRuleList.setForbidDialEndTime("13:30");
|
||||
createTaskDto.setForbidDialTime(retryRuleLists);
|
||||
createTaskDto.setRetryTimes(StringUtils.isBlank(batchSendTaskRecordDto.getPhoneRedialTimes()) ? 0 : PhoneRedialTimesEnum.getValueByInfo(batchSendTaskRecordDto.getPhoneRedialTimes()).getValue());
|
||||
createTaskDto.setRetryInterval(batchSendTaskRecordDto.getPhoneTimeInterval());
|
||||
createTaskDto.setNumTypeFilterList(Arrays.asList(1, 2));
|
||||
createTaskDto.setTaskDataCallback(true);
|
||||
createTaskDto.setCallBackUrl(callBackUrl + "/taskCallBack");
|
||||
createTaskDto.setDialStartTime(localStartTime.format(DateTimeFormatter.ofPattern("HH:mm")));
|
||||
createTaskDto.setDialEndTime(localEndTime.format(DateTimeFormatter.ofPattern("HH:mm")));
|
||||
//1.创建任务
|
||||
String taskId = aiobService.createTask(createTaskDto);
|
||||
//2.任务状态变更
|
||||
aiobService.updateTaskStatus(taskId, 2);
|
||||
//3.导入名单
|
||||
List<CustomerInfoDto> customerInfoList = new ArrayList<>();
|
||||
signPatientManageRouteNodes.forEach(node -> {
|
||||
CustomerInfoDto customerInfoDto = new CustomerInfoDto();
|
||||
customerInfoDto.setExtJson(node.getId() + "");
|
||||
SignPatientManageRoute signPatientManageRoute = signPatientManageRoutes.stream().filter(Objects::nonNull).filter(item -> item.getId().equals(node.getManageRouteId())).findFirst().orElse(new SignPatientManageRoute());
|
||||
BatchSendTaskInfo batchSendTaskInfo = batchSendTaskRecordDto.getList().stream().filter(Objects::nonNull).filter(item -> item.getId().equals(signPatientManageRoute.getBatchSendTaskId())).findFirst().orElse(new BatchSendTaskInfo());
|
||||
//校验手机号
|
||||
if (StringUtils.isNotBlank(batchSendTaskInfo.getPatientPhone())) {
|
||||
if (regexUtil.regexPhone(batchSendTaskInfo.getPatientPhone())) {
|
||||
customerInfoDto.setMobile(batchSendTaskInfo.getPatientPhone());
|
||||
// 处理变量
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
if (Objects.nonNull(batchSendTaskRecordDto.getVars())) {
|
||||
Set<String> keys = batchSendTaskRecordDto.getVars().keySet();
|
||||
keys.forEach(variable -> {
|
||||
jsonObject.fluentPut(variable, ObjectUtils.isEmpty(batchSendTaskRecordDto.getVars().get(variable)) ? "" : batchSendTaskRecordDto.getVars().get(variable));
|
||||
});
|
||||
}
|
||||
customerInfoDto.setVar(jsonObject);
|
||||
customerInfoList.add(customerInfoDto);
|
||||
}
|
||||
}
|
||||
});
|
||||
//3.1上传名单
|
||||
log.info("任务导入客户名单......");
|
||||
ImportTaskDto importTaskDto = new ImportTaskDto();
|
||||
importTaskDto.setTaskId(taskId);
|
||||
importTaskDto.setSecretType(2);
|
||||
importTaskDto.setCustomerInfoList(customerInfoList);
|
||||
aiobService.importTask(importTaskDto);
|
||||
//根据机器人id查询智能外呼系统的任务id
|
||||
log.info("创建批量电话推送任务执行完成......");
|
||||
return AjaxResult.success("创建批量电话推送任务执行完成");
|
||||
}
|
||||
if (batchSendTaskRecordDto.getBatchTaskSource().equals(BillSourceEnum.MESSAGE.getInfo())) {
|
||||
SmsInfoDTO smsInfoDTO = new SmsInfoDTO();
|
||||
List<String> phones = batchSendTaskRecordDto.getList().stream().filter(Objects::nonNull).map(BatchSendTaskInfo::getPatientPhone).distinct().collect(Collectors.toList());
|
||||
String phoneString = String.join(",", phones);
|
||||
smsInfoDTO.setPhoneNumbers(phoneString);
|
||||
smsInfoDTO.setSignName(aliYunSmsTwoConfig.getSignName());
|
||||
// 处理变量
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
if (Objects.nonNull(batchSendTaskRecordDto.getVars())) {
|
||||
Set<String> keys = batchSendTaskRecordDto.getVars().keySet();
|
||||
keys.forEach(variable -> {
|
||||
jsonObject.fluentPut(variable, ObjectUtils.isEmpty(batchSendTaskRecordDto.getVars().get(variable)) ? "" : batchSendTaskRecordDto.getVars().get(variable));
|
||||
});
|
||||
}
|
||||
smsInfoDTO.setTemplateParam(jsonObject);
|
||||
// 根据模版id发送
|
||||
smsInfoDTO.setTemplateCode(batchSendTaskRecordDto.getMessageTemplateCode());
|
||||
Boolean aBoolean = sendSms(smsInfoDTO);
|
||||
if (!aBoolean) {
|
||||
return AjaxResult.error("短信发送失败");
|
||||
}
|
||||
for (int i = 0; i < signPatientManageRouteNodes.size(); i++) {
|
||||
shortMessageSendRecords.get(i).setManageRouteNodeId(signPatientManageRouteNodes.get(i).getId());
|
||||
shortMessageSendRecords.get(i).setErrorCode(0L);
|
||||
shortMessageSendRecords.get(i).setErrorStatus(ErrorStatusEnum.success.getValue());
|
||||
}
|
||||
//发送记录批量
|
||||
log.info("创建批量电信推送任务执行完成......");
|
||||
return AjaxResult.success("短信发送成功");
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 单{code}替换值,发送短信
|
||||
*/
|
||||
public Boolean sendSms(SmsInfoDTO smsInfoDTO) throws ClientException, ServiceException {
|
||||
try {
|
||||
// 短信发送参数非空性判断
|
||||
if (ObjectUtils.isEmpty(smsInfoDTO)) {
|
||||
throw new ServiceException("短信发送参数不能为空!");
|
||||
}
|
||||
if (StringUtils.isBlank(smsInfoDTO.getPhoneNumbers())) {
|
||||
throw new ServiceException("待发送手机号不能为空!");
|
||||
}
|
||||
if (StringUtils.isBlank(smsInfoDTO.getSignName())) {
|
||||
throw new ServiceException("短信签名不能为空!");
|
||||
}
|
||||
if (StringUtils.isBlank(smsInfoDTO.getTemplateCode())) {
|
||||
throw new ServiceException("短信模板Code不能为空!");
|
||||
}
|
||||
|
||||
// 设置系统的默认连接超时时间和读取超时时间
|
||||
System.setProperty("sun.net.client.defaultConnectTimeout", "10000");
|
||||
System.setProperty("sun.net.client.defaultReadTimeout", "10000");
|
||||
|
||||
// 初始化acsClient,暂不支持region化
|
||||
IClientProfile profile = DefaultProfile.getProfile(aliyunSmsConfig.getRegionId(), aliyunSmsConfig.getAccessKeyId(), aliyunSmsConfig.getAccessKeySecret());
|
||||
DefaultProfile.addEndpoint(aliyunSmsConfig.getRegionId(), aliyunSmsConfig.getProduct(), aliyunSmsConfig.getDomain());
|
||||
IAcsClient acsClient = new DefaultAcsClient(profile);
|
||||
|
||||
// 组装请求对象
|
||||
SendSmsRequest request = new SendSmsRequest();
|
||||
request.setPhoneNumbers(smsInfoDTO.getPhoneNumbers());
|
||||
request.setSignName(smsInfoDTO.getSignName());
|
||||
request.setTemplateCode(smsInfoDTO.getTemplateCode());
|
||||
request.setTemplateParam(smsInfoDTO.getTemplateParam().toJSONString());
|
||||
|
||||
SendSmsResponse sendSmsResponse = acsClient.getAcsResponse(request);
|
||||
// 判断响应的结果
|
||||
if (!SUCCESS.equals(sendSmsResponse.getCode())) {
|
||||
SmsErrorCodeEnum errorCode = SmsErrorCodeEnum.getMsgByCode(sendSmsResponse.getCode());
|
||||
log.error("短信发送失败,错误码:{},错误信息:{}", sendSmsResponse.getCode(), errorCode.getMessage());
|
||||
return false;
|
||||
}
|
||||
log.info("短信发送成功:code:{}", sendSmsResponse.getCode());
|
||||
return true;
|
||||
} catch (ClientException e) {
|
||||
log.error("发送短信出现异常,异常信息:{}", e.getMessage());
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package com.xinelu.manage.service.batchsendtaskrecordinfo;
|
||||
|
||||
import com.xinelu.manage.domain.batchsendtaskrecordinfo.BatchSendTaskRecordInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 批量推送任务记录Service接口
|
||||
*
|
||||
* @author zh
|
||||
* @date 2026-04-26
|
||||
*/
|
||||
public interface IBatchSendTaskRecordInfoService {
|
||||
|
||||
/**
|
||||
* 查询批量推送任务记录
|
||||
*
|
||||
* @param id 批量推送任务记录主键
|
||||
* @return 批量推送任务记录
|
||||
*/
|
||||
BatchSendTaskRecordInfo selectBatchSendTaskRecordInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询批量推送任务记录列表
|
||||
*
|
||||
* @param batchSendTaskRecordInfo 批量推送任务记录
|
||||
* @return 批量推送任务记录集合
|
||||
*/
|
||||
List<BatchSendTaskRecordInfo> selectBatchSendTaskRecordInfoList(BatchSendTaskRecordInfo batchSendTaskRecordInfo);
|
||||
|
||||
/**
|
||||
* 新增批量推送任务记录
|
||||
*
|
||||
* @param batchSendTaskRecordInfo 批量推送任务记录
|
||||
* @return 结果
|
||||
*/
|
||||
int insertBatchSendTaskRecordInfo(BatchSendTaskRecordInfo batchSendTaskRecordInfo);
|
||||
|
||||
/**
|
||||
* 修改批量推送任务记录
|
||||
*
|
||||
* @param batchSendTaskRecordInfo 批量推送任务记录
|
||||
* @return 结果
|
||||
*/
|
||||
int updateBatchSendTaskRecordInfo(BatchSendTaskRecordInfo batchSendTaskRecordInfo);
|
||||
|
||||
/**
|
||||
* 批量删除批量推送任务记录
|
||||
*
|
||||
* @param ids 需要删除的批量推送任务记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteBatchSendTaskRecordInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除批量推送任务记录信息
|
||||
*
|
||||
* @param id 批量推送任务记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteBatchSendTaskRecordInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 获取短信或电话模板
|
||||
*
|
||||
* @param batchTaskSource 短信或电话
|
||||
* @return BatchSendTaskRecordInfo
|
||||
*/
|
||||
List<BatchSendTaskRecordInfo> getTemplate(String batchTaskSource);
|
||||
}
|
||||
@ -0,0 +1,137 @@
|
||||
package com.xinelu.manage.service.batchsendtaskrecordinfo.impl;
|
||||
|
||||
import com.xinelu.common.annotation.DataScope;
|
||||
import com.xinelu.common.enums.BillSourceEnum;
|
||||
import com.xinelu.manage.domain.batchsendtaskrecordinfo.BatchSendTaskRecordInfo;
|
||||
import com.xinelu.manage.domain.scriptInfo.ScriptInfo;
|
||||
import com.xinelu.manage.mapper.batchsendtaskrecordinfo.BatchSendTaskRecordInfoMapper;
|
||||
import com.xinelu.manage.mapper.scriptInfo.ScriptInfoMapper;
|
||||
import com.xinelu.manage.mapper.textmessage.TextMessageMapper;
|
||||
import com.xinelu.manage.service.batchsendtaskrecordinfo.IBatchSendTaskRecordInfoService;
|
||||
import com.xinelu.manage.vo.textmessage.TextMessageVO;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 批量推送任务记录Service业务层处理
|
||||
*
|
||||
* @author zh
|
||||
* @date 2026-04-26
|
||||
*/
|
||||
@Service
|
||||
public class BatchSendTaskRecordInfoServiceImpl implements IBatchSendTaskRecordInfoService {
|
||||
@Resource
|
||||
private BatchSendTaskRecordInfoMapper batchSendTaskRecordInfoMapper;
|
||||
@Resource
|
||||
private ScriptInfoMapper scriptInfoMapper;
|
||||
@Resource
|
||||
private TextMessageMapper textMessageMapper;
|
||||
|
||||
/**
|
||||
* 查询批量推送任务记录
|
||||
*
|
||||
* @param id 批量推送任务记录主键
|
||||
* @return 批量推送任务记录
|
||||
*/
|
||||
@Override
|
||||
public BatchSendTaskRecordInfo selectBatchSendTaskRecordInfoById(Long id) {
|
||||
return batchSendTaskRecordInfoMapper.selectBatchSendTaskRecordInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询批量推送任务记录列表
|
||||
*
|
||||
* @param batchSendTaskRecordInfo 批量推送任务记录
|
||||
* @return 批量推送任务记录
|
||||
*/
|
||||
@Override
|
||||
public List<BatchSendTaskRecordInfo> selectBatchSendTaskRecordInfoList(BatchSendTaskRecordInfo batchSendTaskRecordInfo) {
|
||||
return batchSendTaskRecordInfoMapper.selectBatchSendTaskRecordInfoList(batchSendTaskRecordInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增批量推送任务记录
|
||||
*
|
||||
* @param batchSendTaskRecordInfo 批量推送任务记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBatchSendTaskRecordInfo(BatchSendTaskRecordInfo batchSendTaskRecordInfo) {
|
||||
batchSendTaskRecordInfo.setCreateTime(LocalDateTime.now());
|
||||
return batchSendTaskRecordInfoMapper.insertBatchSendTaskRecordInfo(batchSendTaskRecordInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改批量推送任务记录
|
||||
*
|
||||
* @param batchSendTaskRecordInfo 批量推送任务记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBatchSendTaskRecordInfo(BatchSendTaskRecordInfo batchSendTaskRecordInfo) {
|
||||
return batchSendTaskRecordInfoMapper.updateBatchSendTaskRecordInfo(batchSendTaskRecordInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除批量推送任务记录
|
||||
*
|
||||
* @param ids 需要删除的批量推送任务记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBatchSendTaskRecordInfoByIds(Long[] ids) {
|
||||
return batchSendTaskRecordInfoMapper.deleteBatchSendTaskRecordInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除批量推送任务记录信息
|
||||
*
|
||||
* @param id 批量推送任务记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBatchSendTaskRecordInfoById(Long id) {
|
||||
return batchSendTaskRecordInfoMapper.deleteBatchSendTaskRecordInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取短信或电话模板
|
||||
*
|
||||
* @param batchTaskSource 短信或电话
|
||||
* @return BatchSendTaskRecordInfo
|
||||
*/
|
||||
@DataScope(agencyAlias = "d")
|
||||
@Override
|
||||
public List<BatchSendTaskRecordInfo> getTemplate(String batchTaskSource) {
|
||||
if (StringUtils.isBlank(batchTaskSource)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<BatchSendTaskRecordInfo> batchSendTaskRecordInfos = new ArrayList<>();
|
||||
if (batchTaskSource.equals(BillSourceEnum.TELEPHONE.getInfo())) {
|
||||
List<ScriptInfo> scriptInfos = scriptInfoMapper.selectScriptInfos();
|
||||
for (ScriptInfo scriptInfo : scriptInfos) {
|
||||
BatchSendTaskRecordInfo batchSendTaskRecordInfo = new BatchSendTaskRecordInfo();
|
||||
batchSendTaskRecordInfo.setTemplateId(scriptInfo.getScriptId());
|
||||
batchSendTaskRecordInfo.setRobotPublishId(scriptInfo.getRobotPublishId());
|
||||
batchSendTaskRecordInfo.setTemplateName(scriptInfo.getScriptName());
|
||||
batchSendTaskRecordInfos.add(batchSendTaskRecordInfo);
|
||||
}
|
||||
}
|
||||
if (batchTaskSource.equals(BillSourceEnum.MESSAGE.getInfo())) {
|
||||
List<TextMessageVO> textMessageVOS = textMessageMapper.selectTextMessages();
|
||||
for (TextMessageVO textMessageVO : textMessageVOS) {
|
||||
BatchSendTaskRecordInfo batchSendTaskRecordInfo = new BatchSendTaskRecordInfo();
|
||||
batchSendTaskRecordInfo.setTemplateId(textMessageVO.getId().toString());
|
||||
batchSendTaskRecordInfo.setRobotPublishId(textMessageVO.getTextMessageId());
|
||||
batchSendTaskRecordInfo.setTemplateName(textMessageVO.getTextMessageName());
|
||||
batchSendTaskRecordInfos.add(batchSendTaskRecordInfo);
|
||||
}
|
||||
}
|
||||
return batchSendTaskRecordInfos;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.xinelu.manage.service.batchsendtaskvariableinfo;
|
||||
|
||||
import com.xinelu.manage.domain.batchsendtaskvariableinfo.BatchSendTaskVariableInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 批量推送任务记录变量属性Service接口
|
||||
*
|
||||
* @author zh
|
||||
* @date 2026-04-26
|
||||
*/
|
||||
public interface IBatchSendTaskVariableInfoService {
|
||||
/**
|
||||
* 查询批量推送任务记录变量属性
|
||||
*
|
||||
* @param id 批量推送任务记录变量属性主键
|
||||
* @return 批量推送任务记录变量属性
|
||||
*/
|
||||
BatchSendTaskVariableInfo selectBatchSendTaskVariableInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询批量推送任务记录变量属性列表
|
||||
*
|
||||
* @param batchSendTaskVariableInfo 批量推送任务记录变量属性
|
||||
* @return 批量推送任务记录变量属性集合
|
||||
*/
|
||||
List<BatchSendTaskVariableInfo> selectBatchSendTaskVariableInfoList(BatchSendTaskVariableInfo batchSendTaskVariableInfo);
|
||||
|
||||
/**
|
||||
* 新增批量推送任务记录变量属性
|
||||
*
|
||||
* @param batchSendTaskVariableInfo 批量推送任务记录变量属性
|
||||
* @return 结果
|
||||
*/
|
||||
int insertBatchSendTaskVariableInfo(BatchSendTaskVariableInfo batchSendTaskVariableInfo);
|
||||
|
||||
/**
|
||||
* 修改批量推送任务记录变量属性
|
||||
*
|
||||
* @param batchSendTaskVariableInfo 批量推送任务记录变量属性
|
||||
* @return 结果
|
||||
*/
|
||||
int updateBatchSendTaskVariableInfo(BatchSendTaskVariableInfo batchSendTaskVariableInfo);
|
||||
|
||||
/**
|
||||
* 批量删除批量推送任务记录变量属性
|
||||
*
|
||||
* @param ids 需要删除的批量推送任务记录变量属性主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteBatchSendTaskVariableInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除批量推送任务记录变量属性信息
|
||||
*
|
||||
* @param id 批量推送任务记录变量属性主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteBatchSendTaskVariableInfoById(Long id);
|
||||
}
|
||||
@ -0,0 +1,89 @@
|
||||
package com.xinelu.manage.service.batchsendtaskvariableinfo.impl;
|
||||
|
||||
import com.xinelu.manage.domain.batchsendtaskvariableinfo.BatchSendTaskVariableInfo;
|
||||
import com.xinelu.manage.mapper.batchsendtaskvariableinfo.BatchSendTaskVariableInfoMapper;
|
||||
import com.xinelu.manage.service.batchsendtaskvariableinfo.IBatchSendTaskVariableInfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 批量推送任务记录变量属性Service业务层处理
|
||||
*
|
||||
* @author zh
|
||||
* @date 2026-04-26
|
||||
*/
|
||||
@Service
|
||||
public class BatchSendTaskVariableInfoServiceImpl implements IBatchSendTaskVariableInfoService {
|
||||
@Resource
|
||||
private BatchSendTaskVariableInfoMapper batchSendTaskVariableInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询批量推送任务记录变量属性
|
||||
*
|
||||
* @param id 批量推送任务记录变量属性主键
|
||||
* @return 批量推送任务记录变量属性
|
||||
*/
|
||||
@Override
|
||||
public BatchSendTaskVariableInfo selectBatchSendTaskVariableInfoById(Long id) {
|
||||
return batchSendTaskVariableInfoMapper.selectBatchSendTaskVariableInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询批量推送任务记录变量属性列表
|
||||
*
|
||||
* @param batchSendTaskVariableInfo 批量推送任务记录变量属性
|
||||
* @return 批量推送任务记录变量属性
|
||||
*/
|
||||
@Override
|
||||
public List<BatchSendTaskVariableInfo> selectBatchSendTaskVariableInfoList(BatchSendTaskVariableInfo batchSendTaskVariableInfo) {
|
||||
return batchSendTaskVariableInfoMapper.selectBatchSendTaskVariableInfoList(batchSendTaskVariableInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增批量推送任务记录变量属性
|
||||
*
|
||||
* @param batchSendTaskVariableInfo 批量推送任务记录变量属性
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBatchSendTaskVariableInfo(BatchSendTaskVariableInfo batchSendTaskVariableInfo) {
|
||||
batchSendTaskVariableInfo.setCreateTime(LocalDateTime.now());
|
||||
return batchSendTaskVariableInfoMapper.insertBatchSendTaskVariableInfo(batchSendTaskVariableInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改批量推送任务记录变量属性
|
||||
*
|
||||
* @param batchSendTaskVariableInfo 批量推送任务记录变量属性
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBatchSendTaskVariableInfo(BatchSendTaskVariableInfo batchSendTaskVariableInfo) {
|
||||
return batchSendTaskVariableInfoMapper.updateBatchSendTaskVariableInfo(batchSendTaskVariableInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除批量推送任务记录变量属性
|
||||
*
|
||||
* @param ids 需要删除的批量推送任务记录变量属性主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBatchSendTaskVariableInfoByIds(Long[] ids) {
|
||||
return batchSendTaskVariableInfoMapper.deleteBatchSendTaskVariableInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除批量推送任务记录变量属性信息
|
||||
*
|
||||
* @param id 批量推送任务记录变量属性主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBatchSendTaskVariableInfoById(Long id) {
|
||||
return batchSendTaskVariableInfoMapper.deleteBatchSendTaskVariableInfoById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package com.xinelu.manage.service.billinfo;
|
||||
|
||||
import com.xinelu.manage.domain.billinfo.BillInfo;
|
||||
import com.xinelu.manage.dto.billinfo.BillInfoDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 账单信息Service接口
|
||||
*
|
||||
* @author zh
|
||||
* @date 2026-04-16
|
||||
*/
|
||||
public interface IBillInfoService {
|
||||
/**
|
||||
* 查询账单信息
|
||||
*
|
||||
* @param id 账单信息主键
|
||||
* @return 账单信息
|
||||
*/
|
||||
BillInfo selectBillInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询账单信息列表
|
||||
*
|
||||
* @param billInfo 账单信息
|
||||
* @return 账单信息集合
|
||||
*/
|
||||
List<BillInfo> selectBillInfoList(BillInfo billInfo);
|
||||
|
||||
/**
|
||||
* 新增账单信息
|
||||
*
|
||||
* @param billInfo 账单信息
|
||||
* @return 结果
|
||||
*/
|
||||
int insertBillInfo(BillInfo billInfo);
|
||||
|
||||
/**
|
||||
* 修改账单信息
|
||||
*
|
||||
* @param billInfo 账单信息
|
||||
* @return 结果
|
||||
*/
|
||||
int updateBillInfo(BillInfo billInfo);
|
||||
|
||||
/**
|
||||
* 批量删除账单信息
|
||||
*
|
||||
* @param ids 需要删除的账单信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteBillInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除账单信息信息
|
||||
*
|
||||
* @param id 账单信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteBillInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 账单明细信息列表
|
||||
*
|
||||
* @param code 账单编号
|
||||
* @return BillInfoDto
|
||||
*/
|
||||
List<BillInfoDto> selectBillDetails(String code);
|
||||
}
|
||||
@ -0,0 +1,130 @@
|
||||
package com.xinelu.manage.service.billinfo.impl;
|
||||
|
||||
import com.xinelu.common.enums.BillSourceEnum;
|
||||
import com.xinelu.manage.domain.billinfo.BillInfo;
|
||||
import com.xinelu.manage.dto.billinfo.BillInfoDto;
|
||||
import com.xinelu.manage.mapper.billinfo.BillInfoMapper;
|
||||
import com.xinelu.manage.mapper.phonedialrecord.PhoneDialRecordMapper;
|
||||
import com.xinelu.manage.mapper.shortmessagesendrecord.ShortMessageSendRecordMapper;
|
||||
import com.xinelu.manage.service.billinfo.IBillInfoService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 账单信息Service业务层处理
|
||||
*
|
||||
* @author zh
|
||||
* @date 2026-04-16
|
||||
*/
|
||||
@Service
|
||||
public class BillInfoServiceImpl implements IBillInfoService {
|
||||
@Resource
|
||||
private BillInfoMapper billInfoMapper;
|
||||
@Resource
|
||||
private PhoneDialRecordMapper phoneDialRecordMapper;
|
||||
@Resource
|
||||
private ShortMessageSendRecordMapper shortMessageSendRecordMapper;
|
||||
|
||||
/**
|
||||
* 查询账单信息
|
||||
*
|
||||
* @param id 账单信息主键
|
||||
* @return 账单信息
|
||||
*/
|
||||
@Override
|
||||
public BillInfo selectBillInfoById(Long id) {
|
||||
return billInfoMapper.selectBillInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询账单信息列表
|
||||
*
|
||||
* @param billInfo 账单信息
|
||||
* @return 账单信息
|
||||
*/
|
||||
@Override
|
||||
public List<BillInfo> selectBillInfoList(BillInfo billInfo) {
|
||||
return billInfoMapper.selectBillInfoList(billInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增账单信息
|
||||
*
|
||||
* @param billInfo 账单信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBillInfo(BillInfo billInfo) {
|
||||
billInfo.setCreateTime(LocalDateTime.now());
|
||||
return billInfoMapper.insertBillInfo(billInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改账单信息
|
||||
*
|
||||
* @param billInfo 账单信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBillInfo(BillInfo billInfo) {
|
||||
return billInfoMapper.updateBillInfo(billInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除账单信息
|
||||
*
|
||||
* @param ids 需要删除的账单信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBillInfoByIds(Long[] ids) {
|
||||
return billInfoMapper.deleteBillInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除账单信息信息
|
||||
*
|
||||
* @param id 账单信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBillInfoById(Long id) {
|
||||
return billInfoMapper.deleteBillInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 账单明细信息列表
|
||||
*
|
||||
* @param code 账单编号
|
||||
* @return BillInfoDto
|
||||
*/
|
||||
@Override
|
||||
public List<BillInfoDto> selectBillDetails(String code) {
|
||||
//查询总账单信息
|
||||
BillInfo billInfo = billInfoMapper.selectBillInfoByCode(code);
|
||||
if (Objects.isNull(billInfo) || StringUtils.isBlank(billInfo.getBillSource())) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
BillInfoDto billInfoDto = new BillInfoDto();
|
||||
billInfoDto.setPatientName("总计");
|
||||
billInfoDto.setPushLength(billInfo.getPushLength());
|
||||
billInfoDto.setExpense(billInfo.getBillExpense());
|
||||
List<BillInfoDto> bills = new ArrayList<>();
|
||||
//根据账单查询数据
|
||||
if (billInfo.getBillSource().equals(BillSourceEnum.TELEPHONE.getInfo())) {
|
||||
bills = phoneDialRecordMapper.selectPhoneDialStatisticByBillId(billInfo.getId());
|
||||
bills.add(billInfoDto);
|
||||
}
|
||||
if (billInfo.getBillSource().equals(BillSourceEnum.MESSAGE.getInfo())) {
|
||||
bills = shortMessageSendRecordMapper.selectShortMessageRecordByBillId(billInfo.getId());
|
||||
bills.add(billInfoDto);
|
||||
}
|
||||
return bills;
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,7 @@
|
||||
package com.xinelu.manage.service.phonedialrecord;
|
||||
|
||||
import com.xinelu.manage.domain.phonedialrecord.PhoneDialRecord;
|
||||
import com.xinelu.manage.vo.phonedialrecord.BillPhoneDialVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -25,7 +26,7 @@ public interface IPhoneDialRecordService {
|
||||
* @param phoneDialRecord 电话拨打记录
|
||||
* @return 电话拨打记录集合
|
||||
*/
|
||||
List<PhoneDialRecord> selectPhoneDialRecordList(PhoneDialRecord phoneDialRecord);
|
||||
List<BillPhoneDialVo> selectPhoneDialRecordList(BillPhoneDialVo phoneDialRecord);
|
||||
|
||||
/**
|
||||
* 新增电话拨打记录
|
||||
|
||||
@ -3,6 +3,7 @@ package com.xinelu.manage.service.phonedialrecord.impl;
|
||||
import com.xinelu.manage.domain.phonedialrecord.PhoneDialRecord;
|
||||
import com.xinelu.manage.mapper.phonedialrecord.PhoneDialRecordMapper;
|
||||
import com.xinelu.manage.service.phonedialrecord.IPhoneDialRecordService;
|
||||
import com.xinelu.manage.vo.phonedialrecord.BillPhoneDialVo;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -38,8 +39,8 @@ public class PhoneDialRecordServiceImpl implements IPhoneDialRecordService {
|
||||
* @return 电话拨打记录
|
||||
*/
|
||||
@Override
|
||||
public List<PhoneDialRecord> selectPhoneDialRecordList(PhoneDialRecord phoneDialRecord) {
|
||||
return phoneDialRecordMapper.selectPhoneDialRecordList(phoneDialRecord);
|
||||
public List<BillPhoneDialVo> selectPhoneDialRecordList(BillPhoneDialVo phoneDialRecord) {
|
||||
return phoneDialRecordMapper.selectPhoneDialRecords(phoneDialRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -78,4 +78,9 @@ public interface IScriptInfoService {
|
||||
* 新增话术节点
|
||||
*/
|
||||
AjaxResult updateScriptEdgeNode(ScriptVO scriptVO);
|
||||
|
||||
/**
|
||||
* 查询话术变量
|
||||
*/
|
||||
AjaxResult selectScriptVariable(Long id);
|
||||
}
|
||||
|
||||
@ -8,7 +8,6 @@ import com.xinelu.common.exception.ServiceException;
|
||||
import com.xinelu.common.utils.SecurityUtils;
|
||||
import com.xinelu.common.utils.file.FileUploadUtils;
|
||||
import com.xinelu.common.utils.file.MimeTypeUtils;
|
||||
import com.xinelu.common.utils.uuid.IdUtils;
|
||||
import com.xinelu.manage.domain.scriptInfo.ScriptInfo;
|
||||
import com.xinelu.manage.domain.scriptinfoedge.ScriptInfoEdge;
|
||||
import com.xinelu.manage.dto.script.ScriptInfoDto;
|
||||
@ -19,17 +18,16 @@ import com.xinelu.manage.service.scriptInfo.IScriptInfoService;
|
||||
import com.xinelu.manage.vo.scriptInfo.Edge;
|
||||
import com.xinelu.manage.vo.scriptInfo.Node;
|
||||
import com.xinelu.manage.vo.scriptInfo.ScriptVO;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import javax.annotation.Resource;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 话术信息Service业务层处理
|
||||
*
|
||||
@ -292,4 +290,18 @@ public class ScriptInfoServiceImpl implements IScriptInfoService {
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult selectScriptVariable(Long id) {
|
||||
ScriptInfo scriptInfo = scriptInfoMapper.selectScriptInfoById(id);
|
||||
if (Objects.isNull(scriptInfo) || StringUtils.isBlank(scriptInfo.getVariables())) {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
List<String> variables = Arrays.asList(scriptInfo.getVariables().split("\\|"));
|
||||
Map<String, String> variablehMap = new HashMap<>();
|
||||
for (String variable : variables) {
|
||||
variablehMap.put(variable, null);
|
||||
}
|
||||
return AjaxResult.success(variablehMap);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.xinelu.manage.service.shortmessagesendrecord;
|
||||
|
||||
import com.xinelu.manage.domain.shortmessagesendrecord.ShortMessageSendRecord;
|
||||
import com.xinelu.manage.vo.shortmessagesendrecord.ShortMessageSendRecordVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -25,7 +26,7 @@ public interface IShortMessageSendRecordService {
|
||||
* @param shortMessageSendRecord 短信发送结果记录
|
||||
* @return 短信发送结果记录集合
|
||||
*/
|
||||
List<ShortMessageSendRecord> selectShortMessageSendRecordList(ShortMessageSendRecord shortMessageSendRecord);
|
||||
List<ShortMessageSendRecordVo> selectShortMessageSendRecordList(ShortMessageSendRecordVo shortMessageSendRecord);
|
||||
|
||||
/**
|
||||
* 新增短信发送结果记录
|
||||
|
||||
@ -3,6 +3,7 @@ package com.xinelu.manage.service.shortmessagesendrecord.impl;
|
||||
import com.xinelu.manage.domain.shortmessagesendrecord.ShortMessageSendRecord;
|
||||
import com.xinelu.manage.mapper.shortmessagesendrecord.ShortMessageSendRecordMapper;
|
||||
import com.xinelu.manage.service.shortmessagesendrecord.IShortMessageSendRecordService;
|
||||
import com.xinelu.manage.vo.shortmessagesendrecord.ShortMessageSendRecordVo;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -38,8 +39,8 @@ public class ShortMessageSendRecordServiceImpl implements IShortMessageSendRecor
|
||||
* @return 短信发送结果记录
|
||||
*/
|
||||
@Override
|
||||
public List<ShortMessageSendRecord> selectShortMessageSendRecordList(ShortMessageSendRecord shortMessageSendRecord) {
|
||||
return shortMessageSendRecordMapper.selectShortMessageSendRecordList(shortMessageSendRecord);
|
||||
public List<ShortMessageSendRecordVo> selectShortMessageSendRecordList(ShortMessageSendRecordVo shortMessageSendRecord) {
|
||||
return shortMessageSendRecordMapper.selectShortMessageSendRecords(shortMessageSendRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -200,7 +200,7 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
||||
SignPatientManageRouteNodeDto signPatientManageRouteNode = new SignPatientManageRouteNodeDto();
|
||||
signPatientManageRouteNode.setNodePlanTime(LocalDateTime.now());
|
||||
List<SignPatientManageRouteNode> signPatientManageRouteNodes = signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeList(signPatientManageRouteNode);
|
||||
if (CollectionUtils.isNotEmpty(signPatientManageRouteNodes) && signPatientManageRouteNodes.size() >= 100) {
|
||||
if (CollectionUtils.isNotEmpty(signPatientManageRouteNodes) && signPatientManageRouteNodes.size() >= 1000) {
|
||||
return AjaxResult.error("今日创建任务已达上线,请改日创建任务!");
|
||||
}
|
||||
//获取患者信息
|
||||
@ -208,10 +208,10 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
||||
PatientInfoDto patientInfo = new PatientInfoDto();
|
||||
patientInfo.setSn(signPatientManageRoute.getSn());
|
||||
listPatient = patientInfoMapper.getPatientList(patientInfo);
|
||||
if (CollectionUtils.isNotEmpty(listPatient) && listPatient.size() > 100) {
|
||||
if (CollectionUtils.isNotEmpty(listPatient) && listPatient.size() > 1000) {
|
||||
return AjaxResult.error("创建任务数量超出当日上限,请减少创建任务数量!");
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(listPatient) && CollectionUtils.isNotEmpty(signPatientManageRouteNodes) && (listPatient.size() + signPatientManageRouteNodes.size()) > 100) {
|
||||
if (CollectionUtils.isNotEmpty(listPatient) && CollectionUtils.isNotEmpty(signPatientManageRouteNodes) && (listPatient.size() + signPatientManageRouteNodes.size()) > 1000) {
|
||||
return AjaxResult.error("创建任务数量超出当日上限,请减少创建任务数量!");
|
||||
}
|
||||
for (PatientInfoVo patientInfoVo : listPatient) {
|
||||
@ -274,10 +274,7 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
||||
if (insertBatchCount < 0) {
|
||||
return AjaxResult.error(901, "新增签约患者管理任务路径失败!请联系管理员!");
|
||||
}
|
||||
|
||||
|
||||
SignPatientRecord signPatientRecord = new SignPatientRecord();
|
||||
|
||||
// if(Objects.isNull(signPatientManageRoute.getSignPatientRecordId())) {
|
||||
// //更新 签约记录的 审核状态为 已审核,适用场景:手动创建任务 zyk 20241204
|
||||
// signPatientRecord.setRouteCheckStatus(RouteCheckStatusEnum.AGREE.getInfo());
|
||||
@ -301,12 +298,10 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
||||
LabelField labelField = new LabelField();
|
||||
labelField.setLabelFieldAndPartitionDictList(labelFieldAndPartitionDictList);
|
||||
labelFieldContentService.insertLabelField(labelField);
|
||||
|
||||
// 替换手动生成的任务中的标签
|
||||
signPatientManageRouteNodeService.manualCreateTaskLabelReplaceByPatientId(signPatientManageRoute.getPatientId());
|
||||
|
||||
}
|
||||
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@ -1452,10 +1447,9 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
||||
if (StringUtils.isNotBlank(signPatientManageRoute.getSn())) {
|
||||
signPatientManageRouteNode.setTaskExcuteType(TaskExcuteTypeEnum.BATCH_TASK.getInfo());
|
||||
signPatientManageRouteNode.setSn(signPatientManageRoute.getSn());
|
||||
|
||||
} else
|
||||
signPatientManageRouteNode.setTaskExcuteType(TaskExcuteTypeEnum.ACTUAL_TIME_TASK.getInfo());
|
||||
signPatientManageRouteNode.setNodePlanTime(routeNode.getNodePlanTime());
|
||||
signPatientManageRouteNode.setNodePlanTime(routeNode.getNodePlanTime());
|
||||
|
||||
//电话外呼
|
||||
if (Objects.nonNull(routeNode) && TaskNodeTypeEnum.PHONE_OUTBOUND.getInfo().equals(routeNode.getTaskNodeType())) {
|
||||
@ -1515,7 +1509,6 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
||||
signPatientManageRouteNode.setMessagePushSign(Objects.isNull(routeNode.getMessagePushSign()) ? null : routeNode.getMessagePushSign());
|
||||
signPatientManageRouteNode.setMessageTemplateId(Objects.isNull(routeNode.getMessageTemplateId()) ? null : routeNode.getMessageTemplateId());
|
||||
signPatientManageRouteNode.setMessageTemplateCode(Objects.isNull(routeNode.getMessageTemplateCode()) ? null : routeNode.getMessageTemplateCode());
|
||||
;
|
||||
signPatientManageRouteNode.setMessageTemplateName(StringUtils.isBlank(routeNode.getMessageTemplateName()) ? null : routeNode.getMessageTemplateName());
|
||||
//公众号
|
||||
signPatientManageRouteNode.setOfficialPushSign(Objects.isNull(routeNode.getOfficialPushSign()) ? null : routeNode.getOfficialPushSign());
|
||||
|
||||
@ -1,10 +1,9 @@
|
||||
package com.xinelu.manage.service.textmessage;
|
||||
|
||||
import com.xinelu.common.core.page.TableDataInfo;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.manage.dto.textmessage.TextMessageDTO;
|
||||
import com.xinelu.manage.dto.textmessage.TextMessageTaskDTO;
|
||||
import com.xinelu.manage.vo.textmessage.TextMessageTaskVO;
|
||||
import com.xinelu.manage.vo.textmessage.TextMessageVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -62,4 +61,9 @@ public interface ITextMessageService {
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTextMessageById(Long id);
|
||||
|
||||
/**
|
||||
* 查询话术变量
|
||||
*/
|
||||
AjaxResult selectTextMessageVariable(Long id);
|
||||
}
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
package com.xinelu.manage.service.textmessage.impl;
|
||||
|
||||
import com.xinelu.common.annotation.DataScope;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.core.domain.entity.SysDictData;
|
||||
import com.xinelu.common.exception.ServiceException;
|
||||
import com.xinelu.common.utils.SecurityUtils;
|
||||
import com.xinelu.common.utils.bean.BeanUtils;
|
||||
import com.xinelu.common.utils.uuid.IdUtils;
|
||||
import com.xinelu.manage.domain.textmessage.TextMessage;
|
||||
import com.xinelu.manage.domain.textmessagesuittask.TextMessageSuitTask;
|
||||
import com.xinelu.manage.dto.textmessage.TextMessageDTO;
|
||||
@ -15,13 +15,13 @@ import com.xinelu.manage.service.textmessage.ITextMessageService;
|
||||
import com.xinelu.manage.vo.textmessage.TextMessageTaskVO;
|
||||
import com.xinelu.manage.vo.textmessage.TextMessageVO;
|
||||
import com.xinelu.system.mapper.SysDictDataMapper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@ -218,4 +218,21 @@ public class TextMessageServiceImpl implements ITextMessageService {
|
||||
public int deleteTextMessageById(Long id) {
|
||||
return textMessageMapper.deleteTextMessageById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询话术变量
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult selectTextMessageVariable(Long id) {
|
||||
TextMessage textMessage = textMessageMapper.selectTextMessageById(id);
|
||||
if (Objects.isNull(textMessage) || StringUtils.isBlank(textMessage.getVariables())) {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
List<String> variables = Arrays.asList(textMessage.getVariables().split("\\|"));
|
||||
Map<String, String> variablehMap = new HashMap<>();
|
||||
for (String variable : variables) {
|
||||
variablehMap.put(variable, null);
|
||||
}
|
||||
return AjaxResult.success(variablehMap);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,125 @@
|
||||
package com.xinelu.manage.vo.phonedialrecord;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xinelu.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 电话账单信息
|
||||
*/
|
||||
@Data
|
||||
public class BillPhoneDialVo {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 患者id
|
||||
*/
|
||||
@ApiModelProperty(value = "患者id")
|
||||
private Long patientId;
|
||||
|
||||
/**
|
||||
* 患者姓名
|
||||
*/
|
||||
@ApiModelProperty(value = "患者姓名")
|
||||
@Excel(name = "姓名")
|
||||
private String patientName;
|
||||
|
||||
/**
|
||||
* 签约患者管理任务节点表id
|
||||
*/
|
||||
@ApiModelProperty(value = "签约患者管理任务节点表id")
|
||||
private Long manageRouteNodeId;
|
||||
|
||||
/**
|
||||
* 患者手机号
|
||||
*/
|
||||
@ApiModelProperty(value = "患者手机号")
|
||||
@Excel(name = "手机号")
|
||||
private String patientPhone;
|
||||
|
||||
/**
|
||||
* 呼叫时间
|
||||
*/
|
||||
@ApiModelProperty(value = "呼叫时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "呼叫时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private LocalDateTime dialTime;
|
||||
|
||||
/**
|
||||
* 电话模板id
|
||||
*/
|
||||
@ApiModelProperty(value = "电话模板id")
|
||||
private String phoneTemplateId;
|
||||
|
||||
/**
|
||||
* 电话模板名称
|
||||
*/
|
||||
@ApiModelProperty(value = "电话模板名称")
|
||||
@Excel(name = "模板名称")
|
||||
private String phoneTemplateName;
|
||||
|
||||
/**
|
||||
* 替换标签之后的电话内容
|
||||
*/
|
||||
@ApiModelProperty(value = "替换标签之后的电话内容")
|
||||
private String messageNodeContent;
|
||||
|
||||
/**
|
||||
* AI :自动外呼 或 COMMON:人工随访电话,否则为空
|
||||
*/
|
||||
@ApiModelProperty(value = "AI :自动外呼 或 COMMON:人工随访电话,否则为空")
|
||||
private String phoneDialMethod;
|
||||
|
||||
/**
|
||||
* 生成通话录音唯一标识,可通过该标识,获取录音
|
||||
*/
|
||||
@ApiModelProperty(value = "生成通话录音唯一标识,可通过该标识,获取录音")
|
||||
private String ctUuid;
|
||||
|
||||
/**
|
||||
* 通话录音存储路径
|
||||
*/
|
||||
@ApiModelProperty(value = "通话录音存储路径")
|
||||
private String phoneDialRecordVideo;
|
||||
|
||||
/**
|
||||
* 通话时长
|
||||
*/
|
||||
@ApiModelProperty(value = "通话时长")
|
||||
@Excel(name = "通话时长")
|
||||
private BigDecimal phoneDuration;
|
||||
|
||||
/**
|
||||
* 通话费用
|
||||
*/
|
||||
@ApiModelProperty(value = "单价")
|
||||
@Excel(name = "单价")
|
||||
private BigDecimal phoneUnitPrice;
|
||||
|
||||
/**
|
||||
* 通话费用
|
||||
*/
|
||||
@ApiModelProperty(value = "通话费用")
|
||||
@Excel(name = "通话费用")
|
||||
private BigDecimal phoneExpense;
|
||||
|
||||
/**
|
||||
* 关联账单id
|
||||
*/
|
||||
@ApiModelProperty(value = "关联账单id")
|
||||
private Long billId;
|
||||
|
||||
/**
|
||||
* 关联账单名称
|
||||
*/
|
||||
@ApiModelProperty(value = "关联账单名称")
|
||||
private Long billName;
|
||||
}
|
||||
@ -0,0 +1,114 @@
|
||||
package com.xinelu.manage.vo.shortmessagesendrecord;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xinelu.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 账单短信
|
||||
*/
|
||||
@Data
|
||||
public class ShortMessageSendRecordVo {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 患者id
|
||||
*/
|
||||
@ApiModelProperty(value = "患者id")
|
||||
private Long patientId;
|
||||
|
||||
/**
|
||||
* 患者姓名
|
||||
*/
|
||||
@ApiModelProperty(value = "患者姓名")
|
||||
@Excel(name = "姓名")
|
||||
private String patientName;
|
||||
|
||||
/**
|
||||
* 签约患者管理任务节点表id
|
||||
*/
|
||||
@ApiModelProperty(value = "签约患者管理任务节点表id")
|
||||
private Long manageRouteNodeId;
|
||||
|
||||
/**
|
||||
* 患者手机号
|
||||
*/
|
||||
@ApiModelProperty(value = "患者手机号")
|
||||
@Excel(name = "手机号")
|
||||
private String patientPhone;
|
||||
|
||||
/**
|
||||
* 消息发送时间
|
||||
*/
|
||||
@ApiModelProperty(value = "消息发送时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "消息发送时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private LocalDateTime sendTime;
|
||||
|
||||
/**
|
||||
* 消息模板id
|
||||
*/
|
||||
@ApiModelProperty(value = "消息模板id")
|
||||
private String messageTemplateId;
|
||||
|
||||
/**
|
||||
* 电话模板名称
|
||||
*/
|
||||
@ApiModelProperty(value = "电话模板名称")
|
||||
@Excel(name = "模板名称")
|
||||
private String template;
|
||||
|
||||
/**
|
||||
* 消息内容
|
||||
*/
|
||||
@ApiModelProperty(value = "消息内容")
|
||||
private String messageNodeContent;
|
||||
|
||||
/**
|
||||
* 短信长度
|
||||
*/
|
||||
@ApiModelProperty(value = "短信长度")
|
||||
@Excel(name = "短信长度")
|
||||
private Long messageLength;
|
||||
|
||||
/**
|
||||
* 短信数量
|
||||
*/
|
||||
@ApiModelProperty(value = "短信数量")
|
||||
@Excel(name = "短信数量")
|
||||
private Long messageQuantity;
|
||||
|
||||
/**
|
||||
* 短信单价
|
||||
*/
|
||||
@ApiModelProperty(value = "短信单价")
|
||||
@Excel(name = "短信单价")
|
||||
private BigDecimal messageUnitPrice;
|
||||
|
||||
/**
|
||||
* 短信价格
|
||||
*/
|
||||
@ApiModelProperty(value = "短信价格")
|
||||
@Excel(name = "短信价格")
|
||||
private BigDecimal messageExpense;
|
||||
|
||||
/**
|
||||
* 关联账单id
|
||||
*/
|
||||
@ApiModelProperty(value = "关联账单id")
|
||||
private Long billId;
|
||||
|
||||
/**
|
||||
* 关联账单名称
|
||||
*/
|
||||
@ApiModelProperty(value = "关联账单名称")
|
||||
private Long billName;
|
||||
}
|
||||
@ -122,4 +122,9 @@ public class TextMessageTaskVO {
|
||||
* 短信模版code(手动创建人任务使用)
|
||||
*/
|
||||
private String messageTemplateCode;
|
||||
|
||||
/**
|
||||
* 短信变量,竖线隔开。来源于创建短息任务页面
|
||||
*/
|
||||
private String variables;
|
||||
}
|
||||
|
||||
@ -122,4 +122,9 @@ public class TextMessageVO extends BaseEntity {
|
||||
* 短信模版code(手动创建人任务使用)
|
||||
*/
|
||||
private String messageTemplateCode;
|
||||
|
||||
/**
|
||||
* 短信变量,竖线隔开。来源于创建短息任务页面
|
||||
*/
|
||||
private String variables;
|
||||
}
|
||||
|
||||
@ -0,0 +1,368 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xinelu.manage.mapper.batchsendtaskinfo.BatchSendTaskInfoMapper">
|
||||
|
||||
<resultMap type="com.xinelu.manage.domain.batchsendtaskinfo.BatchSendTaskInfo" id="BatchSendTaskInfoResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="orderNum" column="order_num"/>
|
||||
<result property="sn" column="sn"/>
|
||||
<result property="importName" column="import_name"/>
|
||||
<result property="teamName" column="team_name"/>
|
||||
<result property="hospitalAgencyId" column="hospital_agency_id"/>
|
||||
<result property="hospitalAgencyName" column="hospital_agency_name"/>
|
||||
<result property="departmentId" column="department_id"/>
|
||||
<result property="departmentName" column="department_name"/>
|
||||
<result property="visitDate" column="visit_date"/>
|
||||
<result property="inHospitalNumber" column="in_hospital_number"/>
|
||||
<result property="patientName" column="patient_name"/>
|
||||
<result property="patientPhone" column="patient_phone"/>
|
||||
<result property="age" column="age"/>
|
||||
<result property="sex" column="sex"/>
|
||||
<result property="cardNo" column="card_no"/>
|
||||
<result property="crowdId" column="crowd_id"/>
|
||||
<result property="crowdName" column="crowd_name"/>
|
||||
<result property="physicalExaminationSummary" column="physical_examination_summary"/>
|
||||
<result property="physicalExaminationLabel" column="physical_examination_label"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBatchSendTaskInfoVo">
|
||||
select id,
|
||||
order_num,
|
||||
sn,
|
||||
import_name,
|
||||
team_name,
|
||||
hospital_agency_id,
|
||||
hospital_agency_name,
|
||||
department_id,
|
||||
department_name,
|
||||
visit_date,
|
||||
in_hospital_number,
|
||||
patient_name,
|
||||
patient_phone,
|
||||
age,
|
||||
sex,
|
||||
card_no,
|
||||
crowd_id,
|
||||
crowd_name,
|
||||
physical_examination_summary,
|
||||
physical_examination_label,
|
||||
create_by,
|
||||
create_time,
|
||||
del_flag
|
||||
from batch_send_task_info
|
||||
</sql>
|
||||
|
||||
<select id="selectBatchSendTaskInfoList"
|
||||
parameterType="com.xinelu.manage.domain.batchsendtaskinfo.BatchSendTaskInfo"
|
||||
resultMap="BatchSendTaskInfoResult">
|
||||
<include refid="selectBatchSendTaskInfoVo"/>
|
||||
<where>
|
||||
del_flag = 0
|
||||
<if test="orderNum != null ">
|
||||
and order_num = #{orderNum}
|
||||
</if>
|
||||
<if test="sn != null and sn != ''">
|
||||
and sn = #{sn}
|
||||
</if>
|
||||
<if test="importName != null and importName != ''">
|
||||
and import_name like concat('%', #{importName}, '%')
|
||||
</if>
|
||||
<if test="teamName != null and teamName != ''">
|
||||
and team_name like concat('%', #{teamName}, '%')
|
||||
</if>
|
||||
<if test="hospitalAgencyId != null ">
|
||||
and hospital_agency_id = #{hospitalAgencyId}
|
||||
</if>
|
||||
<if test="hospitalAgencyName != null and hospitalAgencyName != ''">
|
||||
and hospital_agency_name like concat('%', #{hospitalAgencyName}, '%')
|
||||
</if>
|
||||
<if test="departmentId != null ">
|
||||
and department_id = #{departmentId}
|
||||
</if>
|
||||
<if test="departmentName != null and departmentName != ''">
|
||||
and department_name like concat('%', #{departmentName}, '%')
|
||||
</if>
|
||||
<if test="visitDate != null ">
|
||||
and visit_date = #{visitDate}
|
||||
</if>
|
||||
<if test="inHospitalNumber != null and inHospitalNumber != ''">
|
||||
and in_hospital_number = #{inHospitalNumber}
|
||||
</if>
|
||||
<if test="patientName != null and patientName != ''">
|
||||
and patient_name like concat('%', #{patientName}, '%')
|
||||
</if>
|
||||
<if test="patientPhone != null and patientPhone != ''">
|
||||
and patient_phone = #{patientPhone}
|
||||
</if>
|
||||
<if test="age != null ">
|
||||
and age = #{age}
|
||||
</if>
|
||||
<if test="sex != null">
|
||||
and sex = #{sex}
|
||||
</if>
|
||||
<if test="cardNo != null and cardNo != ''">
|
||||
and card_no = #{cardNo}
|
||||
</if>
|
||||
<if test="crowdId != null ">
|
||||
and crowd_id = #{crowdId}
|
||||
</if>
|
||||
<if test="crowdName != null and crowdName != ''">
|
||||
and crowd_name like concat('%', #{crowdName}, '%')
|
||||
</if>
|
||||
<if test="physicalExaminationSummary != null and physicalExaminationSummary != ''">
|
||||
and physical_examination_summary = #{physicalExaminationSummary}
|
||||
</if>
|
||||
<if test="physicalExaminationLabel != null and physicalExaminationLabel != ''">
|
||||
and physical_examination_label = #{physicalExaminationLabel}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBatchSendTaskInfoById" parameterType="Long"
|
||||
resultMap="BatchSendTaskInfoResult">
|
||||
<include refid="selectBatchSendTaskInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBatchSendTaskInfo" parameterType="com.xinelu.manage.domain.batchsendtaskinfo.BatchSendTaskInfo"
|
||||
useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into batch_send_task_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderNum != null">order_num,
|
||||
</if>
|
||||
<if test="sn != null and sn != ''">sn,
|
||||
</if>
|
||||
<if test="importName != null">import_name,
|
||||
</if>
|
||||
<if test="teamName != null">team_name,
|
||||
</if>
|
||||
<if test="hospitalAgencyId != null">hospital_agency_id,
|
||||
</if>
|
||||
<if test="hospitalAgencyName != null">hospital_agency_name,
|
||||
</if>
|
||||
<if test="departmentId != null">department_id,
|
||||
</if>
|
||||
<if test="departmentName != null">department_name,
|
||||
</if>
|
||||
<if test="visitDate != null">visit_date,
|
||||
</if>
|
||||
<if test="inHospitalNumber != null and inHospitalNumber != ''">in_hospital_number,
|
||||
</if>
|
||||
<if test="patientName != null and patientName != ''">patient_name,
|
||||
</if>
|
||||
<if test="patientPhone != null and patientPhone != ''">patient_phone,
|
||||
</if>
|
||||
<if test="age != null">age,
|
||||
</if>
|
||||
<if test="sex != null">sex,
|
||||
</if>
|
||||
<if test="cardNo != null">card_no,
|
||||
</if>
|
||||
<if test="crowdId != null">crowd_id,
|
||||
</if>
|
||||
<if test="crowdName != null">crowd_name,
|
||||
</if>
|
||||
<if test="physicalExaminationSummary != null">physical_examination_summary,
|
||||
</if>
|
||||
<if test="physicalExaminationLabel != null">physical_examination_label,
|
||||
</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
<if test="delFlag != null">del_flag,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderNum != null">#{orderNum},
|
||||
</if>
|
||||
<if test="sn != null and sn != ''">#{sn},
|
||||
</if>
|
||||
<if test="importName != null">#{importName},
|
||||
</if>
|
||||
<if test="teamName != null">#{teamName},
|
||||
</if>
|
||||
<if test="hospitalAgencyId != null">#{hospitalAgencyId},
|
||||
</if>
|
||||
<if test="hospitalAgencyName != null">#{hospitalAgencyName},
|
||||
</if>
|
||||
<if test="departmentId != null">#{departmentId},
|
||||
</if>
|
||||
<if test="departmentName != null">#{departmentName},
|
||||
</if>
|
||||
<if test="visitDate != null">#{visitDate},
|
||||
</if>
|
||||
<if test="inHospitalNumber != null and inHospitalNumber != ''">#{inHospitalNumber},
|
||||
</if>
|
||||
<if test="patientName != null and patientName != ''">#{patientName},
|
||||
</if>
|
||||
<if test="patientPhone != null and patientPhone != ''">#{patientPhone},
|
||||
</if>
|
||||
<if test="age != null">#{age},
|
||||
</if>
|
||||
<if test="sex != null">#{sex},
|
||||
</if>
|
||||
<if test="cardNo != null">#{cardNo},
|
||||
</if>
|
||||
<if test="crowdId != null">#{crowdId},
|
||||
</if>
|
||||
<if test="crowdName != null">#{crowdName},
|
||||
</if>
|
||||
<if test="physicalExaminationSummary != null">#{physicalExaminationSummary},
|
||||
</if>
|
||||
<if test="physicalExaminationLabel != null">#{physicalExaminationLabel},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="delFlag != null">#{delFlag},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBatchSendTaskInfo" parameterType="com.xinelu.manage.domain.batchsendtaskinfo.BatchSendTaskInfo">
|
||||
update batch_send_task_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="orderNum != null">order_num =
|
||||
#{orderNum},
|
||||
</if>
|
||||
<if test="sn != null and sn != ''">sn =
|
||||
#{sn},
|
||||
</if>
|
||||
<if test="importName != null">import_name =
|
||||
#{importName},
|
||||
</if>
|
||||
<if test="teamName != null">team_name =
|
||||
#{teamName},
|
||||
</if>
|
||||
<if test="hospitalAgencyId != null">hospital_agency_id =
|
||||
#{hospitalAgencyId},
|
||||
</if>
|
||||
<if test="hospitalAgencyName != null">hospital_agency_name =
|
||||
#{hospitalAgencyName},
|
||||
</if>
|
||||
<if test="departmentId != null">department_id =
|
||||
#{departmentId},
|
||||
</if>
|
||||
<if test="departmentName != null">department_name =
|
||||
#{departmentName},
|
||||
</if>
|
||||
<if test="visitDate != null">visit_date =
|
||||
#{visitDate},
|
||||
</if>
|
||||
<if test="inHospitalNumber != null and inHospitalNumber != ''">in_hospital_number =
|
||||
#{inHospitalNumber},
|
||||
</if>
|
||||
<if test="patientName != null and patientName != ''">patient_name =
|
||||
#{patientName},
|
||||
</if>
|
||||
<if test="patientPhone != null and patientPhone != ''">patient_phone =
|
||||
#{patientPhone},
|
||||
</if>
|
||||
<if test="age != null">age =
|
||||
#{age},
|
||||
</if>
|
||||
<if test="sex != null">
|
||||
sex = #{sex},
|
||||
</if>
|
||||
<if test="cardNo != null">card_no =
|
||||
#{cardNo},
|
||||
</if>
|
||||
<if test="crowdId != null">crowd_id =
|
||||
#{crowdId},
|
||||
</if>
|
||||
<if test="crowdName != null">crowd_name =
|
||||
#{crowdName},
|
||||
</if>
|
||||
<if test="physicalExaminationSummary != null">physical_examination_summary =
|
||||
#{physicalExaminationSummary},
|
||||
</if>
|
||||
<if test="physicalExaminationLabel != null">physical_examination_label =
|
||||
#{physicalExaminationLabel},
|
||||
</if>
|
||||
<if test="createBy != null">create_by =
|
||||
#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="delFlag != null">del_flag =
|
||||
#{delFlag},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBatchSendTaskInfoById" parameterType="Long">
|
||||
delete
|
||||
from batch_send_task_info
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBatchSendTaskInfoByIds" parameterType="String">
|
||||
delete from batch_send_task_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="insertBatchSendTaskInfoList" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into batch_send_task_info(
|
||||
order_num,
|
||||
sn,
|
||||
import_name,
|
||||
team_name,
|
||||
hospital_agency_id,
|
||||
hospital_agency_name,
|
||||
department_id,
|
||||
department_name,
|
||||
visit_date,
|
||||
in_hospital_number,
|
||||
patient_name,
|
||||
patient_phone,
|
||||
age,
|
||||
sex,
|
||||
card_no,
|
||||
crowd_id,
|
||||
crowd_name,
|
||||
physical_examination_summary,
|
||||
physical_examination_label,
|
||||
del_flag,
|
||||
create_by,
|
||||
create_time
|
||||
) values
|
||||
<foreach item="BatchSendTaskInfo" index="index" collection="list" separator=",">
|
||||
(
|
||||
#{BatchSendTaskInfo.orderNum},
|
||||
#{BatchSendTaskInfo.sn},
|
||||
#{BatchSendTaskInfo.importname},
|
||||
#{BatchSendTaskInfo.teamName},
|
||||
#{BatchSendTaskInfo.hospitalAgencyId},
|
||||
#{BatchSendTaskInfo.hospitalAgencyName},
|
||||
#{BatchSendTaskInfo.departmentId},
|
||||
#{BatchSendTaskInfo.departmentName},
|
||||
#{BatchSendTaskInfo.visitDate},
|
||||
#{BatchSendTaskInfo.inHospitalNumber},
|
||||
#{BatchSendTaskInfo.patientName},
|
||||
#{BatchSendTaskInfo.patientPhone},
|
||||
#{BatchSendTaskInfo.age},
|
||||
#{BatchSendTaskInfo.sex},
|
||||
#{BatchSendTaskInfo.cardNo},
|
||||
#{BatchSendTaskInfo.crowdId},
|
||||
#{BatchSendTaskInfo.crowdName},
|
||||
#{BatchSendTaskInfo.physicalExaminationSummary},
|
||||
#{BatchSendTaskInfo.physicalExaminationLabel},
|
||||
#{BatchSendTaskInfo.delFlag},
|
||||
#{BatchSendTaskInfo.createBy},
|
||||
#{BatchSendTaskInfo.createTime}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
@ -0,0 +1,196 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xinelu.manage.mapper.batchsendtaskrecordinfo.BatchSendTaskRecordInfoMapper">
|
||||
|
||||
<resultMap type="com.xinelu.manage.domain.batchsendtaskrecordinfo.BatchSendTaskRecordInfo"
|
||||
id="BatchSendTaskRecordInfoResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="batchTaskNumber" column="batch_task_number"/>
|
||||
<result property="batchTaskName" column="batch_task_name"/>
|
||||
<result property="taskExecuteType" column="task_execute_type"/>
|
||||
<result property="nodePlanTime" column="node_plan_time"/>
|
||||
<result property="batchTaskSource" column="batch_task_source"/>
|
||||
<result property="templateId" column="template_id"/>
|
||||
<result property="templateName" column="template_name"/>
|
||||
<result property="nodeContent" column="node_content"/>
|
||||
<result property="nodeExecuteStatus" column="node_execute_status"/>
|
||||
<result property="physicalExaminationLabel" column="physical_examination_label"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBatchSendTaskRecordInfoVo">
|
||||
select id,
|
||||
batch_task_number,
|
||||
batch_task_name,
|
||||
task_execute_type,
|
||||
node_plan_time,
|
||||
batch_task_source,
|
||||
template_id,
|
||||
template_name,
|
||||
node_content,
|
||||
node_execute_status,
|
||||
physical_examination_label,
|
||||
create_by,
|
||||
create_time
|
||||
from batch_send_task_record_info
|
||||
</sql>
|
||||
|
||||
<select id="selectBatchSendTaskRecordInfoList" parameterType="BatchSendTaskRecordInfo"
|
||||
resultMap="BatchSendTaskRecordInfoResult">
|
||||
<include refid="selectBatchSendTaskRecordInfoVo"/>
|
||||
<where>
|
||||
<if test="batchTaskNumber != null ">
|
||||
and batch_task_number = #{batchTaskNumber}
|
||||
</if>
|
||||
<if test="batchTaskName != null and batchTaskName != ''">
|
||||
and batch_task_name like concat('%', #{batchTaskName}, '%')
|
||||
</if>
|
||||
<if test="taskExecuteType != null and taskExecuteType != ''">
|
||||
and task_execute_type = #{taskExecuteType}
|
||||
</if>
|
||||
<if test="nodePlanTime != null ">
|
||||
and node_plan_time = #{nodePlanTime}
|
||||
</if>
|
||||
<if test="batchTaskSource != null and batchTaskSource != ''">
|
||||
and batch_task_source = #{batchTaskSource}
|
||||
</if>
|
||||
<if test="templateId != null and templateId != ''">
|
||||
and template_id = #{templateId}
|
||||
</if>
|
||||
<if test="templateName != null and templateName != ''">
|
||||
and template_name like concat('%', #{templateName}, '%')
|
||||
</if>
|
||||
<if test="nodeContent != null and nodeContent != ''">
|
||||
and node_content = #{nodeContent}
|
||||
</if>
|
||||
<if test="nodeExecuteStatus != null and nodeExecuteStatus != ''">
|
||||
and node_execute_status = #{nodeExecuteStatus}
|
||||
</if>
|
||||
<if test="physicalExaminationLabel != null and physicalExaminationLabel != ''">
|
||||
and physical_examination_label = #{physicalExaminationLabel}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBatchSendTaskRecordInfoById" parameterType="Long"
|
||||
resultMap="BatchSendTaskRecordInfoResult">
|
||||
<include refid="selectBatchSendTaskRecordInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBatchSendTaskRecordInfo" parameterType="BatchSendTaskRecordInfo" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into batch_send_task_record_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="batchTaskNumber != null">batch_task_number,
|
||||
</if>
|
||||
<if test="batchTaskName != null">batch_task_name,
|
||||
</if>
|
||||
<if test="taskExecuteType != null">task_execute_type,
|
||||
</if>
|
||||
<if test="nodePlanTime != null">node_plan_time,
|
||||
</if>
|
||||
<if test="batchTaskSource != null">batch_task_source,
|
||||
</if>
|
||||
<if test="templateId != null">template_id,
|
||||
</if>
|
||||
<if test="templateName != null">template_name,
|
||||
</if>
|
||||
<if test="nodeContent != null">node_content,
|
||||
</if>
|
||||
<if test="nodeExecuteStatus != null">node_execute_status,
|
||||
</if>
|
||||
<if test="physicalExaminationLabel != null">physical_examination_label,
|
||||
</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="batchTaskNumber != null">#{batchTaskNumber},
|
||||
</if>
|
||||
<if test="batchTaskName != null">#{batchTaskName},
|
||||
</if>
|
||||
<if test="taskExecuteType != null">#{taskExecuteType},
|
||||
</if>
|
||||
<if test="nodePlanTime != null">#{nodePlanTime},
|
||||
</if>
|
||||
<if test="batchTaskSource != null">#{batchTaskSource},
|
||||
</if>
|
||||
<if test="templateId != null">#{templateId},
|
||||
</if>
|
||||
<if test="templateName != null">#{templateName},
|
||||
</if>
|
||||
<if test="nodeContent != null">#{nodeContent},
|
||||
</if>
|
||||
<if test="nodeExecuteStatus != null">#{nodeExecuteStatus},
|
||||
</if>
|
||||
<if test="physicalExaminationLabel != null">#{physicalExaminationLabel},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBatchSendTaskRecordInfo" parameterType="BatchSendTaskRecordInfo">
|
||||
update batch_send_task_record_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="batchTaskNumber != null">batch_task_number =
|
||||
#{batchTaskNumber},
|
||||
</if>
|
||||
<if test="batchTaskName != null">batch_task_name =
|
||||
#{batchTaskName},
|
||||
</if>
|
||||
<if test="taskExecuteType != null">task_execute_type =
|
||||
#{taskExecuteType},
|
||||
</if>
|
||||
<if test="nodePlanTime != null">node_plan_time =
|
||||
#{nodePlanTime},
|
||||
</if>
|
||||
<if test="batchTaskSource != null">batch_task_source =
|
||||
#{batchTaskSource},
|
||||
</if>
|
||||
<if test="templateId != null">template_id =
|
||||
#{templateId},
|
||||
</if>
|
||||
<if test="templateName != null">template_name =
|
||||
#{templateName},
|
||||
</if>
|
||||
<if test="nodeContent != null">node_content =
|
||||
#{nodeContent},
|
||||
</if>
|
||||
<if test="nodeExecuteStatus != null">node_execute_status =
|
||||
#{nodeExecuteStatus},
|
||||
</if>
|
||||
<if test="physicalExaminationLabel != null">physical_examination_label =
|
||||
#{physicalExaminationLabel},
|
||||
</if>
|
||||
<if test="createBy != null">create_by =
|
||||
#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBatchSendTaskRecordInfoById" parameterType="Long">
|
||||
delete
|
||||
from batch_send_task_record_info
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBatchSendTaskRecordInfoByIds" parameterType="String">
|
||||
delete from batch_send_task_record_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,121 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xinelu.manage.mapper.batchsendtaskvariableinfo.BatchSendTaskVariableInfoMapper">
|
||||
|
||||
<resultMap type="com.xinelu.manage.domain.batchsendtaskvariableinfo.BatchSendTaskVariableInfo" id="BatchSendTaskVariableInfoResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="variable" column="variable"/>
|
||||
<result property="variableAttribute" column="variable_attribute"/>
|
||||
<result property="batchSendTaskRecordId" column="batch_send_task_record_id"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBatchSendTaskVariableInfoVo">
|
||||
select id, variable, variable_attribute, batch_send_task_record_id, create_by, create_time from batch_send_task_variable_info
|
||||
</sql>
|
||||
|
||||
<select id="selectBatchSendTaskVariableInfoList" parameterType="com.xinelu.manage.domain.batchsendtaskvariableinfo.BatchSendTaskVariableInfo" resultMap="BatchSendTaskVariableInfoResult">
|
||||
<include refid="selectBatchSendTaskVariableInfoVo"/>
|
||||
<where>
|
||||
<if test="variable != null and variable != ''">
|
||||
and variable = #{variable}
|
||||
</if>
|
||||
<if test="variableAttribute != null and variableAttribute != ''">
|
||||
and variable_attribute = #{variableAttribute}
|
||||
</if>
|
||||
<if test="batchSendTaskRecordId != null ">
|
||||
and batch_send_task_record_id = #{batchSendTaskRecordId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBatchSendTaskVariableInfoById" parameterType="Long"
|
||||
resultMap="BatchSendTaskVariableInfoResult">
|
||||
<include refid="selectBatchSendTaskVariableInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBatchSendTaskVariableInfo" parameterType="com.xinelu.manage.domain.batchsendtaskvariableinfo.BatchSendTaskVariableInfo" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into batch_send_task_variable_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="variable != null">variable,
|
||||
</if>
|
||||
<if test="variableAttribute != null">variable_attribute,
|
||||
</if>
|
||||
<if test="batchSendTaskRecordId != null">batch_send_task_record_id,
|
||||
</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="variable != null">#{variable},
|
||||
</if>
|
||||
<if test="variableAttribute != null">#{variableAttribute},
|
||||
</if>
|
||||
<if test="batchSendTaskRecordId != null">#{batchSendTaskRecordId},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBatchSendTaskVariableInfo" parameterType="com.xinelu.manage.domain.batchsendtaskvariableinfo.BatchSendTaskVariableInfo">
|
||||
update batch_send_task_variable_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="variable != null">variable =
|
||||
#{variable},
|
||||
</if>
|
||||
<if test="variableAttribute != null">variable_attribute =
|
||||
#{variableAttribute},
|
||||
</if>
|
||||
<if test="batchSendTaskRecordId != null">batch_send_task_record_id =
|
||||
#{batchSendTaskRecordId},
|
||||
</if>
|
||||
<if test="createBy != null">create_by =
|
||||
#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBatchSendTaskVariableInfoById" parameterType="Long">
|
||||
delete from batch_send_task_variable_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBatchSendTaskVariableInfoByIds" parameterType="String">
|
||||
delete from batch_send_task_variable_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="insertBatchSendTaskVariableInfos">
|
||||
insert into batch_send_task_variable_info(
|
||||
variable,
|
||||
variable_attribute,
|
||||
batch_send_task_record_id,
|
||||
create_by,
|
||||
create_time)
|
||||
values
|
||||
<foreach item="BatchSendTaskVariableInfo" index="index" collection="list" separator=",">
|
||||
(
|
||||
#{BatchSendTaskVariableInfo.variable},
|
||||
#{BatchSendTaskVariableInfo.variableAttribute},
|
||||
#{BatchSendTaskVariableInfo.batchSendTaskRecordId},
|
||||
#{BatchSendTaskVariableInfo.createBy},
|
||||
#{BatchSendTaskVariableInfo.createTime}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xinelu.manage.mapper.billinfo.BillInfoMapper">
|
||||
|
||||
<resultMap type="BillInfo" id="BillInfoResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="billCode" column="bill_code"/>
|
||||
<result property="billName" column="bill_name"/>
|
||||
<result property="billMonth" column="bill_month"/>
|
||||
<result property="billExpense" column="bill_expense"/>
|
||||
<result property="paymentStatus" column="payment_status"/>
|
||||
<result property="billSource" column="bill_source"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBillInfoVo">
|
||||
select id,
|
||||
bill_code,
|
||||
bill_name,
|
||||
bill_month,
|
||||
bill_expense,
|
||||
payment_status,
|
||||
bill_source,
|
||||
create_time
|
||||
from bill_info
|
||||
</sql>
|
||||
|
||||
<select id="selectBillInfoList" parameterType="BillInfo" resultMap="BillInfoResult">
|
||||
<include refid="selectBillInfoVo"/>
|
||||
<where>
|
||||
<if test="billCode != null and billCode != ''">
|
||||
and bill_code = #{billCode}
|
||||
</if>
|
||||
<if test="billName != null and billName != ''">
|
||||
and bill_name like concat('%', #{billName}, '%')
|
||||
</if>
|
||||
<if test="billMonth != null and billMonth != ''">
|
||||
and bill_month = #{billMonth}
|
||||
</if>
|
||||
<if test="billExpense != null ">
|
||||
and bill_expense = #{billExpense}
|
||||
</if>
|
||||
<if test="paymentStatus != null and paymentStatus != ''">
|
||||
and payment_status = #{paymentStatus}
|
||||
</if>
|
||||
<if test="billSource != null and billSource != ''">
|
||||
and bill_source = #{billSource}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBillInfoById" parameterType="Long"
|
||||
resultMap="BillInfoResult">
|
||||
<include refid="selectBillInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="selectBillInfoByCode" resultType="com.xinelu.manage.domain.billinfo.BillInfo">
|
||||
<include refid="selectBillInfoVo"/>
|
||||
where bill_code = #{billCode}
|
||||
</select>
|
||||
|
||||
<insert id="insertBillInfo" parameterType="BillInfo" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into bill_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="billCode != null and billCode != ''">bill_code,
|
||||
</if>
|
||||
<if test="billName != null and billName != ''">bill_name,
|
||||
</if>
|
||||
<if test="billMonth != null and billMonth != ''">bill_month,
|
||||
</if>
|
||||
<if test="billExpense != null">bill_expense,
|
||||
</if>
|
||||
<if test="paymentStatus != null and paymentStatus != ''">payment_status,
|
||||
</if>
|
||||
<if test="billSource != null and billSource != ''">bill_source,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="billCode != null and billCode != ''">#{billCode},
|
||||
</if>
|
||||
<if test="billName != null and billName != ''">#{billName},
|
||||
</if>
|
||||
<if test="billMonth != null and billMonth != ''">#{billMonth},
|
||||
</if>
|
||||
<if test="billExpense != null">#{billExpense},
|
||||
</if>
|
||||
<if test="paymentStatus != null and paymentStatus != ''">#{paymentStatus},
|
||||
</if>
|
||||
<if test="billSource != null and billSource != ''">#{billSource},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBillInfo" parameterType="BillInfo">
|
||||
update bill_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="billCode != null and billCode != ''">bill_code =
|
||||
#{billCode},
|
||||
</if>
|
||||
<if test="billName != null and billName != ''">bill_name =
|
||||
#{billName},
|
||||
</if>
|
||||
<if test="billMonth != null and billMonth != ''">bill_month =
|
||||
#{billMonth},
|
||||
</if>
|
||||
<if test="billExpense != null">bill_expense =
|
||||
#{billExpense},
|
||||
</if>
|
||||
<if test="paymentStatus != null and paymentStatus != ''">payment_status =
|
||||
#{paymentStatus},
|
||||
</if>
|
||||
<if test="billSource != null and billSource != ''">bill_source =
|
||||
#{billSource},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBillInfoById" parameterType="Long">
|
||||
delete
|
||||
from bill_info
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBillInfoByIds" parameterType="String">
|
||||
delete from bill_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -20,9 +20,12 @@
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="ctUuid" column="ct_uuid"/>
|
||||
<result property="phoneDialRecordVideo" column="phone_dial_record_video"/>
|
||||
|
||||
<result property="ctUuid" column="ct_uuid"/>
|
||||
<result property="phoneDialRecordVideo" column="phone_dial_record_video"/>
|
||||
<result property="phoneDuration" column="phone_duration"/>
|
||||
<result property="phoneExpense" column="phone_expense"/>
|
||||
<result property="phoneUnitPrice" column="phone_unit_price"/>
|
||||
<result property="billId" column="bill_id"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPhoneDialRecordVo">
|
||||
@ -42,7 +45,11 @@
|
||||
update_by,
|
||||
update_time,
|
||||
ct_uuid,
|
||||
phone_dial_record_video
|
||||
phone_dial_record_video,
|
||||
phone_duration,
|
||||
phone_expense,
|
||||
phone_unit_price,
|
||||
bill_id
|
||||
from phone_dial_record
|
||||
</sql>
|
||||
|
||||
@ -79,9 +86,63 @@
|
||||
<if test="errorStatus != null and errorStatus != ''">
|
||||
and error_status = #{errorStatus}
|
||||
</if>
|
||||
<if test="ctUuid != null and ctUuid != ''">
|
||||
and ct_uuid = #{ctUuid}
|
||||
</if>
|
||||
<if test="phoneDialRecordVideo != null and phoneDialRecordVideo != ''">
|
||||
and phone_dial_record_video = #{phoneDialRecordVideo}
|
||||
</if>
|
||||
<if test="phoneDuration != null ">
|
||||
and phone_duration = #{phoneDuration}
|
||||
</if>
|
||||
<if test="phoneExpense != null ">
|
||||
and phone_expense = #{phoneExpense}
|
||||
</if>
|
||||
<if test="billId != null ">
|
||||
and bill_id = #{billId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectPhoneDialRecords" resultType="com.xinelu.manage.vo.phonedialrecord.BillPhoneDialVo">
|
||||
select
|
||||
record.id,
|
||||
record.patient_id,
|
||||
record.manage_route_node_id,
|
||||
record.patient_phone,
|
||||
record.dial_time,
|
||||
record.phone_template_id,
|
||||
record.phone_template_name,
|
||||
record.message_node_content,
|
||||
record.ct_uuid,
|
||||
record.phone_dial_record_video,
|
||||
record.phone_duration,
|
||||
record.phone_expense,
|
||||
record.phone_unit_price,
|
||||
record.bill_id,
|
||||
patient.patient_name,
|
||||
bill.bill_name
|
||||
from phone_dial_record record
|
||||
left join patient_info patient on patient.id = record.patient_id
|
||||
left join bill_info bill ON record.bill_id = bill.id
|
||||
where 1 = 1
|
||||
<if test="patientName != null and patientName != ''">
|
||||
and patient.patient_name = #{patientName}
|
||||
</if>
|
||||
<if test="patientPhone != null and patientPhone != ''">
|
||||
and record.patient_phone = #{patientPhone}
|
||||
</if>
|
||||
<if test="dialTime != null ">
|
||||
and record.dial_time = #{dialTime}
|
||||
</if>
|
||||
<if test="phoneTemplateId != null and phoneTemplateId != ''">
|
||||
and record.phone_template_id = #{phoneTemplateId}
|
||||
</if>
|
||||
<if test="billId != null ">
|
||||
and record.bill_id = #{billId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectPhoneDialRecordById" parameterType="Long"
|
||||
resultMap="PhoneDialRecordResult">
|
||||
<include refid="selectPhoneDialRecordVo"/>
|
||||
@ -120,10 +181,16 @@
|
||||
</if>
|
||||
<if test="updateTime != null">update_time,
|
||||
</if>
|
||||
<if test="ctUuid != null">ct_uuid,
|
||||
</if>
|
||||
<if test="phoneDialRecordVideo != null">phone_dial_record_video,
|
||||
</if>
|
||||
<if test="ctUuid != null">ct_uuid,
|
||||
</if>
|
||||
<if test="phoneDialRecordVideo != null">phone_dial_record_video,
|
||||
</if>
|
||||
<if test="phoneDuration != null">phone_duration,
|
||||
</if>
|
||||
<if test="phoneExpense != null">phone_expense,
|
||||
</if>
|
||||
<if test="billId != null">bill_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="patientId != null">#{patientId},
|
||||
@ -154,10 +221,16 @@
|
||||
</if>
|
||||
<if test="updateTime != null">#{updateTime},
|
||||
</if>
|
||||
<if test="ctUuid != null">#{ctUuid},
|
||||
</if>
|
||||
<if test="phoneDialRecordVideo != null">#{phoneDialRecordVideo},
|
||||
</if>
|
||||
<if test="ctUuid != null">#{ctUuid},
|
||||
</if>
|
||||
<if test="phoneDialRecordVideo != null">#{phoneDialRecordVideo},
|
||||
</if>
|
||||
<if test="phoneDuration != null">#{phoneDuration},
|
||||
</if>
|
||||
<if test="phoneExpense != null">#{phoneExpense},
|
||||
</if>
|
||||
<if test="billId != null">#{billId},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -206,12 +279,21 @@
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="ctUuid != null">ct_uuid =
|
||||
#{ctUuid},
|
||||
</if>
|
||||
<if test="phoneDialRecordVideo != null">phone_dial_record_video =
|
||||
#{phoneDialRecordVideo},
|
||||
</if>
|
||||
<if test="ctUuid != null">ct_uuid =
|
||||
#{ctUuid},
|
||||
</if>
|
||||
<if test="phoneDialRecordVideo != null">phone_dial_record_video =
|
||||
#{phoneDialRecordVideo},
|
||||
</if>
|
||||
<if test="phoneDuration != null">phone_duration =
|
||||
#{phoneDuration},
|
||||
</if>
|
||||
<if test="phoneExpense != null">phone_expense =
|
||||
#{phoneExpense},
|
||||
</if>
|
||||
<if test="billId != null">bill_id =
|
||||
#{billId},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@ -282,4 +364,17 @@
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectPhoneDialStatisticByBillId" resultType="com.xinelu.manage.dto.billinfo.BillInfoDto">
|
||||
select record.phone_template_name template,
|
||||
record.send_time pushTime,
|
||||
record.phone_duration pushLength,
|
||||
record.phone_expense price,
|
||||
record.phone_unit_price unitPrice,
|
||||
patient.patient_name,
|
||||
patient.patient_phone
|
||||
from phone_dial_record record
|
||||
left join patient_info patient on patient.id = record.patient_id
|
||||
where record.bill_id = #{billId}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -361,4 +361,8 @@
|
||||
from script_info_edge
|
||||
where script_info_id = #{id}
|
||||
</delete>
|
||||
|
||||
<select id="selectScriptInfos" resultType="com.xinelu.manage.domain.scriptInfo.ScriptInfo">
|
||||
<include refid="selectScriptInfoVo"/>
|
||||
</select>
|
||||
</mapper>
|
||||
@ -19,6 +19,11 @@
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="messageType" column="message_type"/>
|
||||
<result property="messageLength" column="message_length"/>
|
||||
<result property="messageQuantity" column="message_quantity"/>
|
||||
<result property="messageUnitPrice" column="message_unit_price"/>
|
||||
<result property="messageExpense" column="message_expense"/>
|
||||
<result property="billId" column="bill_id"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectShortMessageSendRecordVo">
|
||||
@ -35,7 +40,12 @@
|
||||
create_time,
|
||||
update_by,
|
||||
update_time,
|
||||
message_type
|
||||
message_type,
|
||||
message_length,
|
||||
message_quantity,
|
||||
message_unit_price,
|
||||
message_expense,
|
||||
bill_id
|
||||
from short_message_send_record
|
||||
</sql>
|
||||
|
||||
@ -70,9 +80,60 @@
|
||||
<if test="messageType != null and messageType != ''">
|
||||
and message_type = #{messageType}
|
||||
</if>
|
||||
<if test="messageLength != null ">
|
||||
and message_length = #{messageLength}
|
||||
</if>
|
||||
<if test="messageQuantity != null ">
|
||||
and message_quantity = #{messageQuantity}
|
||||
</if>
|
||||
<if test="messageUnitPrice != null ">
|
||||
and message_unit_price = #{messageUnitPrice}
|
||||
</if>
|
||||
<if test="messageExpense != null ">
|
||||
and message_expense = #{messageExpense}
|
||||
</if>
|
||||
<if test="billId != null ">
|
||||
and bill_id = #{billId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectShortMessageSendRecords"
|
||||
resultType="com.xinelu.manage.vo.shortmessagesendrecord.ShortMessageSendRecordVo">
|
||||
select record.id,
|
||||
record.patient_id,
|
||||
record.manage_route_node_id,
|
||||
record.patient_phone,
|
||||
record.send_time,
|
||||
record.message_template_id,
|
||||
record.message_length,
|
||||
record.message_quantity,
|
||||
record.message_unit_price,
|
||||
record.message_expense,
|
||||
record.bill_id,
|
||||
patient.patient_name,
|
||||
bill.bill_name
|
||||
from short_message_send_record record
|
||||
left join patient_info patient on patient.id = record.patient_id
|
||||
left join bill_info bill ON record.bill_id = bill.id
|
||||
where 1 = 1
|
||||
<if test="patientName != null and patientName != ''">
|
||||
and patient.patient_name = #{patientName}
|
||||
</if>
|
||||
<if test="patientPhone != null and patientPhone != ''">
|
||||
and record.patient_phone = #{patientPhone}
|
||||
</if>
|
||||
<if test="sendTime != null ">
|
||||
and record.send_time = #{sendTime}
|
||||
</if>
|
||||
<if test="messageTemplateId != null">
|
||||
and record.message_template_id = #{messageTemplateId}
|
||||
</if>
|
||||
<if test="billId != null ">
|
||||
and record.bill_id = #{billId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectShortMessageSendRecordById" parameterType="Long"
|
||||
resultMap="ShortMessageSendRecordResult">
|
||||
<include refid="selectShortMessageSendRecordVo"/>
|
||||
@ -109,6 +170,16 @@
|
||||
</if>
|
||||
<if test="messageType != null">message_type,
|
||||
</if>
|
||||
<if test="messageLength != null">message_length,
|
||||
</if>
|
||||
<if test="messageQuantity != null">message_quantity,
|
||||
</if>
|
||||
<if test="messageUnitPrice != null">message_unit_price,
|
||||
</if>
|
||||
<if test="messageExpense != null">message_expense,
|
||||
</if>
|
||||
<if test="billId != null">bill_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="patientId != null">#{patientId},
|
||||
@ -137,6 +208,16 @@
|
||||
</if>
|
||||
<if test="messageType != null">#{messageType},
|
||||
</if>
|
||||
<if test="messageLength != null">#{messageLength},
|
||||
</if>
|
||||
<if test="messageQuantity != null">#{messageQuantity},
|
||||
</if>
|
||||
<if test="messageUnitPrice != null">#{messageUnitPrice},
|
||||
</if>
|
||||
<if test="messageExpense != null">#{messageExpense},
|
||||
</if>
|
||||
<if test="billId != null">#{billId},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -182,6 +263,21 @@
|
||||
<if test="messageType != null">message_type =
|
||||
#{messageType},
|
||||
</if>
|
||||
<if test="messageLength != null">message_length =
|
||||
#{messageLength},
|
||||
</if>
|
||||
<if test="messageQuantity != null">message_quantity =
|
||||
#{messageQuantity},
|
||||
</if>
|
||||
<if test="messageUnitPrice != null">message_unit_price =
|
||||
#{messageUnitPrice},
|
||||
</if>
|
||||
<if test="messageExpense != null">message_expense =
|
||||
#{messageExpense},
|
||||
</if>
|
||||
<if test="billId != null">bill_id =
|
||||
#{billId},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@ -238,4 +334,18 @@
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectShortMessageRecordByBillId" resultType="com.xinelu.manage.dto.billinfo.BillInfoDto">
|
||||
select message.text_message_name template,
|
||||
record.send_time pushTime,
|
||||
record.message_quantity pushLength,
|
||||
record.message_expense price,
|
||||
record.message_unit_price unitPrice,
|
||||
patient.patient_name,
|
||||
patient.patient_phone
|
||||
from short_message_send_record record
|
||||
left join patient_info patient on patient.id = record.patient_id
|
||||
left join text_message message on record.message_template_id = message.id
|
||||
where record.bill_id = #{billId}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -586,7 +586,9 @@
|
||||
suit_range,
|
||||
task_excute_type,
|
||||
create_by,
|
||||
create_time
|
||||
create_time,
|
||||
batch_send_task_record_id,
|
||||
batch_send_task_id
|
||||
) values
|
||||
<foreach item="SignPatientManageRoute" index="index" collection="list" separator=",">
|
||||
(
|
||||
@ -599,7 +601,9 @@
|
||||
#{SignPatientManageRoute.suitRange},
|
||||
#{SignPatientManageRoute.taskExcuteType},
|
||||
#{SignPatientManageRoute.createBy},
|
||||
#{SignPatientManageRoute.createTime}
|
||||
#{SignPatientManageRoute.createTime},
|
||||
#{SignPatientManageRoute.batchSendTaskRecordId},
|
||||
#{SignPatientManageRoute.batchSendTaskId}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
@ -564,27 +564,28 @@
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="insertBatch">
|
||||
insert into sign_patient_manage_route_node(manage_route_id, manage_route_name, route_node_id, route_node_name, route_node_day,sn,task_excute_type,node_plan_time, task_type, task_status, task_subdivision, task_node_type, second_classify_describe,
|
||||
execute_time, phone_push_sign, script_info_id, robot_publish_id, phone_template_id, phone_template_name, phone_node_content, phone_result_json, phone_redial_times, phone_time_interval, phone_message_remind, phone_message_template_id,
|
||||
phone_message_template_name, phone_message_template_content,question_info_id, questionnaire_name, questionnaire_content, question_expiration_date, propaganda_info_id, propaganda_title, propaganda_content, message_push_sign,
|
||||
message_template_id, message_template_code, message_template_name, message_preview, message_node_content, official_push_sign, official_template_id, official_template_code,official_template_name, official_remind_content,
|
||||
official_node_content, applet_push_sign, applet_template_id, applet_template_code, applet_template_name, applet_remind_content, applet_prompt_description, applet_node_content,
|
||||
route_check_status, route_check_person, route_check_date, route_check_remark, route_node_remark, node_execute_status, route_handle_remark,phone_connect_status,
|
||||
route_handle_id, route_handle_person, route_link, text_remind_content,node_content, del_flag, create_by, create_time, update_by, update_time,phone_dial_method,follow_template_id, follow_template_name, task_id_ext)
|
||||
values
|
||||
<foreach collection="nodeList" item="item" separator=",">
|
||||
(#{item.manageRouteId},#{item.manageRouteName},#{item.routeNodeId},#{item.routeNodeName},#{item.routeNodeDay},#{item.sn},#{item.taskExcuteType},#{item.nodePlanTime},#{item.taskType},#{item.taskStatus},#{item.taskSubdivision},#{item.taskNodeType},#{item.secondClassifyDescribe},
|
||||
#{item.executeTime},#{item.phonePushSign},#{item.scriptInfoId},#{item.robotPublishId},#{item.phoneTemplateId},#{item.phoneTemplateName},#{item.phoneNodeContent},#{item.phoneResultJson},#{item.phoneRedialTimes},#{item.phoneTimeInterval},#{item.phoneMessageRemind},#{item.phoneMessageTemplateId},
|
||||
#{item.phoneMessageTemplateName},#{item.phoneMessageTemplateContent},
|
||||
#{item.questionInfoId},#{item.questionnaireName},#{item.questionnaireContent},#{item.questionExpirationDate},#{item.propagandaInfoId},#{item.propagandaTitle},#{item.propagandaContent},#{item.messagePushSign},
|
||||
#{item.messageTemplateId}, #{item.messageTemplateCode},
|
||||
#{item.messageTemplateName},#{item.messagePreview},#{item.messageNodeContent},#{item.officialPushSign},#{item.officialTemplateId},#{item.officialTemplateCode},#{item.officialTemplateName},#{item.officialRemindContent},#{item.officialNodeContent},
|
||||
#{item.appletPushSign},#{item.appletTemplateId},#{item.appletTemplateCode},#{item.appletTemplateName},#{item.appletRemindContent},#{item.appletPromptDescription},#{item.appletNodeContent},
|
||||
#{item.routeCheckStatus},#{item.routeCheckPerson},#{item.routeCheckDate},#{item.routeCheckRemark},#{item.routeNodeRemark},#{item.nodeExecuteStatus},#{item.routeHandleRemark},#{item.phoneConnectStatus},
|
||||
#{item.routeHandleId},#{item.routeHandlePerson},#{item.routeLink},#{item.textRemindContent},#{item.nodeContent},0,#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.phoneDialMethod},#{item.followTemplateId},#{item.followTemplateName},#{item.taskIdExt})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="insertBatch">
|
||||
insert into sign_patient_manage_route_node(manage_route_id, manage_route_name, route_node_id, route_node_name,route_node_day,sn,dial_status,task_excute_type,node_plan_time, task_type, task_status, task_subdivision, task_node_type, second_classify_describe,
|
||||
execute_time, phone_push_sign, script_info_id, robot_publish_id, phone_template_id, phone_template_name, phone_node_content, phone_result_json, phone_redial_times, phone_time_interval, phone_message_remind, phone_message_template_id,
|
||||
phone_message_template_name, phone_message_template_content,question_info_id, questionnaire_name, questionnaire_content, question_expiration_date, propaganda_info_id, propaganda_title, propaganda_content, message_push_sign,
|
||||
message_template_id, message_template_code, message_template_name, message_preview, message_node_content, official_push_sign, official_template_id, official_template_code,official_template_name, official_remind_content,
|
||||
official_node_content, applet_push_sign, applet_template_id, applet_template_code, applet_template_name, applet_remind_content, applet_prompt_description, applet_node_content,
|
||||
route_check_status, route_check_person, route_check_date, route_check_remark, route_node_remark, node_execute_status, route_handle_remark,phone_connect_status,
|
||||
route_handle_id, route_handle_person, route_link, text_remind_content,node_content, del_flag, create_by, create_time, update_by, update_time,phone_dial_method,follow_template_id, follow_template_name, task_id_ext)
|
||||
values
|
||||
<foreach collection="nodeList" item="item" separator=",">
|
||||
(#{item.manageRouteId},#{item.manageRouteName},#{item.routeNodeId},#{item.routeNodeName},#{item.routeNodeDay},#{item.sn},#{item.dialStatus},#{item.taskExcuteType},#{item.nodePlanTime},#{item.taskType},#{item.taskStatus},#{item.taskSubdivision},#{item.taskNodeType},#{item.secondClassifyDescribe},
|
||||
#{item.executeTime},#{item.phonePushSign},#{item.scriptInfoId},#{item.robotPublishId},#{item.phoneTemplateId},#{item.phoneTemplateName},#{item.phoneNodeContent},#{item.phoneResultJson},#{item.phoneRedialTimes},#{item.phoneTimeInterval},#{item.phoneMessageRemind},#{item.phoneMessageTemplateId},
|
||||
#{item.phoneMessageTemplateName},#{item.phoneMessageTemplateContent},
|
||||
#{item.questionInfoId},#{item.questionnaireName},#{item.questionnaireContent},#{item.questionExpirationDate},#{item.propagandaInfoId},#{item.propagandaTitle},#{item.propagandaContent},#{item.messagePushSign},
|
||||
#{item.messageTemplateId}, #{item.messageTemplateCode},
|
||||
#{item.messageTemplateName},#{item.messagePreview},#{item.messageNodeContent},#{item.officialPushSign},#{item.officialTemplateId},#{item.officialTemplateCode},#{item.officialTemplateName},#{item.officialRemindContent},#{item.officialNodeContent},
|
||||
#{item.appletPushSign},#{item.appletTemplateId},#{item.appletTemplateCode},#{item.appletTemplateName},#{item.appletRemindContent},#{item.appletPromptDescription},#{item.appletNodeContent},
|
||||
#{item.routeCheckStatus},#{item.routeCheckPerson},#{item.routeCheckDate},#{item.routeCheckRemark},#{item.routeNodeRemark},#{item.nodeExecuteStatus},#{item.routeHandleRemark},#{item.phoneConnectStatus},
|
||||
#{item.routeHandleId},#{item.routeHandlePerson},#{item.routeLink},#{item.textRemindContent},#{item.nodeContent},0,#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.phoneDialMethod},#{item.followTemplateId},#{item.followTemplateName},#{item.taskIdExt}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateSignPatientManageRouteNode" parameterType="SignPatientManageRouteNode">
|
||||
update sign_patient_manage_route_node
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
@ -852,10 +853,10 @@
|
||||
</update>
|
||||
|
||||
<update id="updateDialStatus" parameterType="SignPatientManageRouteNode">
|
||||
update sign_patient_manage_route_node set dial_status = #{dialStatus}
|
||||
where
|
||||
sn = #{sn}
|
||||
and script_info_id = #{scriptInfoId}
|
||||
update sign_patient_manage_route_node
|
||||
set dial_status = #{dialStatus}
|
||||
where sn = #{sn}
|
||||
and script_info_id = #{scriptInfoId}
|
||||
</update>
|
||||
|
||||
<update id="updateDialStatusByNodeId" parameterType="SignPatientManageRouteNode">
|
||||
@ -1045,6 +1046,14 @@
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<update id="updateTaskIdExtBuIds">
|
||||
update sign_patient_manage_route_node
|
||||
set task_id_ext = #{taskIdExt}
|
||||
where id in
|
||||
<foreach item="manageRouteNodeIds" collection="manageRouteNodeIds" open="(" separator="," close=")">
|
||||
#{manageRouteNodeIds}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="selectNodeCountByCreateTime" resultType="java.lang.Integer">
|
||||
select count(1)
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
<result property="textMessageSort" column="text_message_sort"/>
|
||||
<result property="textMessageRemark" column="text_message_remark"/>
|
||||
<result property="sourceTemplateId" column="source_template_id"/>
|
||||
<result property="variables" column="variables"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
@ -39,6 +40,7 @@
|
||||
<result column="text_message_sort" property="textMessageSort"/>
|
||||
<result column="text_message_remark" property="textMessageRemark"/>
|
||||
<result property="sourceTemplateId" column="source_template_id"/>
|
||||
<result property="variables" column="variables"/>
|
||||
<collection property="suitTaskList" ofType="com.xinelu.manage.domain.textmessagesuittask.TextMessageSuitTask">
|
||||
<id column="taskId" property="id"/>
|
||||
<result column="message_id" property="messageId"/>
|
||||
@ -61,6 +63,7 @@
|
||||
text_message_sort,
|
||||
text_message_remark,
|
||||
source_template_id,
|
||||
variables,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
@ -87,6 +90,7 @@
|
||||
tm.text_message_channel,
|
||||
tm.text_message_status,
|
||||
tm.text_message_sort,
|
||||
tm.variables,
|
||||
tm.text_message_remark,
|
||||
tmst.id AS taskId,
|
||||
tmst.message_id,
|
||||
@ -114,6 +118,7 @@
|
||||
tm.text_message_sort,
|
||||
tm.text_message_remark,
|
||||
tm.source_template_id,
|
||||
tm.variables,
|
||||
tmst.id AS taskId,
|
||||
tmst.message_id,
|
||||
tmst.suit_task_type_id,
|
||||
@ -195,6 +200,8 @@
|
||||
</if>
|
||||
<if test="sourceTemplateId != null">source_template_id,
|
||||
</if>
|
||||
<if test="variables != null">variables,
|
||||
</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
@ -229,6 +236,8 @@
|
||||
</if>
|
||||
<if test="sourceTemplateId != null">#{sourceTemplateId},
|
||||
</if>
|
||||
<if test="variables != null">#{variables},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
@ -295,6 +304,7 @@
|
||||
<if test="sourceTemplateId != null">source_template_id =
|
||||
#{sourceTemplateId},
|
||||
</if>
|
||||
variables = #{variables},
|
||||
<if test="createBy != null">create_by =
|
||||
#{createBy},
|
||||
</if>
|
||||
@ -354,4 +364,8 @@
|
||||
from text_message_suit_task
|
||||
where message_id = #{id}
|
||||
</delete>
|
||||
|
||||
<select id="selectTextMessages" resultType="com.xinelu.manage.vo.textmessage.TextMessageVO">
|
||||
<include refid="selectTextMessageVo"/>
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user