Compare commits
3 Commits
dev_hekous
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a7d679c72 | ||
|
|
882d683f53 | ||
|
|
4a221c666f |
@ -6,15 +6,22 @@ spring:
|
|||||||
druid:
|
druid:
|
||||||
# 主库数据源
|
# 主库数据源
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://127.0.0.1:3306/post-discharge-hkey?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true
|
url: jdbc:mysql://8.131.93.145:54081/post-discharge?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true
|
||||||
username: root
|
username: root
|
||||||
password: Hk2y!@#$
|
password: 1qaz!@#$
|
||||||
|
# 从库数据源
|
||||||
|
slave:
|
||||||
|
# 从数据源开关/默认关闭
|
||||||
|
enabled: false
|
||||||
|
url:
|
||||||
|
username:
|
||||||
|
password:
|
||||||
hkhis:
|
hkhis:
|
||||||
# 从数据源开关/默认关闭
|
# 从数据源开关/默认关闭
|
||||||
enabled: true
|
enabled: true
|
||||||
url: jdbc:mysql://127.0.0.1:3306/post-discharge-hkey?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true
|
url: jdbc:mysql://127.0.0.1:3306/post-discharge?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true
|
||||||
username: root
|
username: root
|
||||||
password: Hk2y!@#$
|
password: sa123456
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
# 初始连接数
|
# 初始连接数
|
||||||
initialSize: 5
|
initialSize: 5
|
||||||
|
|||||||
@ -110,7 +110,7 @@ token:
|
|||||||
# 令牌有效期(默认30分钟)
|
# 令牌有效期(默认30分钟)
|
||||||
expireTime: 120
|
expireTime: 120
|
||||||
# 请求拦截白名单
|
# 请求拦截白名单
|
||||||
ant-matchers: /postDischarge/**,/testMobile/**,/postDischargeApplet/**,/api/**,/manage/patientInfoimporttemp/**,/monitor/sendTextMessage/**,/system/batchSendTaskInfo/batchSendTaskUpload
|
ant-matchers: /postDischarge/**,/testMobile/**,/postDischargeApplet/**,/api/**,/manage/patientInfoimporttemp/**
|
||||||
|
|
||||||
## MyBatis-Plus配置
|
## MyBatis-Plus配置
|
||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
@ -239,9 +239,11 @@ aliyun-sms:
|
|||||||
# 地域ID
|
# 地域ID
|
||||||
regionId: cn-qingdao
|
regionId: cn-qingdao
|
||||||
# 阿里云登录确认验证模板-短信签名
|
# 阿里云登录确认验证模板-短信签名
|
||||||
signName: 山东新医路信息科技有限公司
|
signName: 新医路
|
||||||
# 任务执行回调地址--正式
|
# 阿里云登录确认验证模板-模板CODE
|
||||||
callBackUrl: http://47.104.245.3:8105/api/taskMessageBack
|
templateCode: SMS_152466667
|
||||||
|
# 阿里云登录确认验证模板-模板内容
|
||||||
|
templateContent: 验证码${code},您正在登录,若非本人操作,请勿泄露。
|
||||||
|
|
||||||
# 阿里云参数配置
|
# 阿里云参数配置
|
||||||
aliyun-sms2:
|
aliyun-sms2:
|
||||||
@ -256,9 +258,11 @@ aliyun-sms2:
|
|||||||
# 地域ID
|
# 地域ID
|
||||||
regionId: cn-qingdao
|
regionId: cn-qingdao
|
||||||
# 阿里云登录确认验证模板-短信签名
|
# 阿里云登录确认验证模板-短信签名
|
||||||
signName: 河口区第二人民医院
|
signName: 山东新医路信息科技
|
||||||
# 任务执行回调地址--正式
|
# 阿里云登录确认验证模板-模板CODE
|
||||||
callBackUrl: http://47.104.245.3:8105/api/taskMessageBack
|
templateCode: SMS_499195589
|
||||||
|
# 阿里云登录确认验证模板-模板内容
|
||||||
|
templateContent: 尊敬的用户,馨医健康致电您未成功接通,请放心接听。也可通过馨医健康小程序消息中心查看相关信息;
|
||||||
|
|
||||||
# 小程序首页路径
|
# 小程序首页路径
|
||||||
applet-page-config:
|
applet-page-config:
|
||||||
@ -288,7 +292,10 @@ aiob:
|
|||||||
accessKey: 9a61c68abf134ab9823e39f61f2c2f72
|
accessKey: 9a61c68abf134ab9823e39f61f2c2f72
|
||||||
secretKey: 4287bfa1d5a34c229aacb5e056c94682
|
secretKey: 4287bfa1d5a34c229aacb5e056c94682
|
||||||
# 任务执行回调地址--测试
|
# 任务执行回调地址--测试
|
||||||
callBackUrl: http://47.104.245.3:8105/api
|
callBackUrl: http://8.131.93.145:54086/api/taskCallBack
|
||||||
|
# callBackUrl: http://182.92.166.109:19090/api/taskCallBack
|
||||||
|
# callBackUrl: http://101.200.89.70:19090/api/taskCallBack
|
||||||
|
# callBackUrl: http://8.131.93.145:54011/api/taskCallBack
|
||||||
|
|
||||||
xinyilu-database:
|
xinyilu-database:
|
||||||
# 公共机构ID(新医路,用于宣教库公共库查询)
|
# 公共机构ID(新医路,用于宣教库公共库查询)
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<!-- 日志存放路径 -->
|
<!-- 日志存放路径 -->
|
||||||
<property name="log.path" value="E:\\PostDischarge\\logs"/>
|
<property name="log.path" value="D:\\PostDischarge\\logs"/>
|
||||||
<!-- 日志输出格式 -->
|
<!-- 日志输出格式 -->
|
||||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -220,15 +220,10 @@ public class Constants {
|
|||||||
public static final String OUTPATIENT = "outpatient";
|
public static final String OUTPATIENT = "outpatient";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 患者导入
|
* 门诊患者
|
||||||
*/
|
*/
|
||||||
public static final String PATIENT_INFO_IMPORT = "patientInfoImport";
|
public static final String PATIENT_INFO_IMPORT = "patientInfoImport";
|
||||||
|
|
||||||
/**
|
|
||||||
* 患者导入
|
|
||||||
*/
|
|
||||||
public static final String BATCH_SEND_TASK_INFO = "batchSendTaskInfo";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 预住院
|
* 预住院
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,41 +0,0 @@
|
|||||||
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;
|
|
||||||
private final String code;
|
|
||||||
|
|
||||||
|
|
||||||
BillSourceEnum(String info, String code) {
|
|
||||||
this.info = info;
|
|
||||||
this.code = code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInfo() {
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -13,30 +13,15 @@ public enum NodeExecuteStatusEnum {
|
|||||||
/**
|
/**
|
||||||
* 已执行
|
* 已执行
|
||||||
*/
|
*/
|
||||||
EXECUTED("EXECUTED", "已执行"),
|
EXECUTED("EXECUTED"),
|
||||||
/**
|
/**
|
||||||
* 未执行
|
* 未执行
|
||||||
*/
|
*/
|
||||||
UNEXECUTED("UNEXECUTED", "未执行"),
|
UNEXECUTED("UNEXECUTED"),
|
||||||
|
|
||||||
/**
|
|
||||||
* 执行中
|
|
||||||
*/
|
|
||||||
EXECUTING("EXECUTING", "执行中"),
|
|
||||||
;
|
;
|
||||||
final private String info;
|
final private String info;
|
||||||
private final String code;
|
|
||||||
|
|
||||||
NodeExecuteStatusEnum(String info, String code) {
|
NodeExecuteStatusEnum(String info) {
|
||||||
this.info = info;
|
this.info = info;
|
||||||
this.code = code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInfo() {
|
|
||||||
return info;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,41 +0,0 @@
|
|||||||
package com.xinelu.common.enums;
|
|
||||||
|
|
||||||
public enum PersonnelTypeEnum {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 在院
|
|
||||||
*/
|
|
||||||
IN_HOSPITAL("IN_HOSPITAL", "在院"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 门诊
|
|
||||||
*/
|
|
||||||
OUTPATIENT("OUTPATIENT", "门诊"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 出院
|
|
||||||
*/
|
|
||||||
DISCHARGED("DISCHARGED", "出院"),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 体检
|
|
||||||
*/
|
|
||||||
PHYSICAL_EXAMINATION("PHYSICAL_EXAMINATION", "体检");
|
|
||||||
|
|
||||||
private final String code;
|
|
||||||
|
|
||||||
final private String info;
|
|
||||||
|
|
||||||
PersonnelTypeEnum(String code, String info) {
|
|
||||||
this.code = code;
|
|
||||||
this.info = info;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInfo() {
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -13,7 +13,7 @@ public enum PhoneDialMethodEnum {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ALL
|
* AI
|
||||||
*/
|
*/
|
||||||
ALL("ALL"),
|
ALL("ALL"),
|
||||||
|
|
||||||
|
|||||||
@ -1,45 +0,0 @@
|
|||||||
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]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -35,6 +35,14 @@ public class DruidConfig {
|
|||||||
return druidProperties.dataSource(dataSource);
|
return druidProperties.dataSource(dataSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConfigurationProperties("spring.datasource.druid.slave")
|
||||||
|
@ConditionalOnProperty(prefix = "spring.datasource.druid.slave", name = "enabled", havingValue = "true")
|
||||||
|
public DataSource slaveDataSource(DruidProperties druidProperties) {
|
||||||
|
DruidDataSource dataSource = DruidDataSourceBuilder.create().build();
|
||||||
|
return druidProperties.dataSource(dataSource);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@ConfigurationProperties("spring.datasource.druid.hkhis")
|
@ConfigurationProperties("spring.datasource.druid.hkhis")
|
||||||
@ -49,6 +57,7 @@ public class DruidConfig {
|
|||||||
public DynamicDataSource dataSource(DataSource masterDataSource) {
|
public DynamicDataSource dataSource(DataSource masterDataSource) {
|
||||||
Map<Object, Object> targetDataSources = new HashMap<>();
|
Map<Object, Object> targetDataSources = new HashMap<>();
|
||||||
targetDataSources.put(DataSourceType.MASTER.name(), masterDataSource);
|
targetDataSources.put(DataSourceType.MASTER.name(), masterDataSource);
|
||||||
|
setDataSource(targetDataSources, DataSourceType.SLAVE.name(), "slaveDataSource");
|
||||||
setDataSource(targetDataSources, DataSourceType.HKHIS.name(), "hkhisDataSource");
|
setDataSource(targetDataSources, DataSourceType.HKHIS.name(), "hkhisDataSource");
|
||||||
return new DynamicDataSource(masterDataSource, targetDataSources);
|
return new DynamicDataSource(masterDataSource, targetDataSources);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,135 +0,0 @@
|
|||||||
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.batchsendtaskinfo.BatchSendTaskDto;
|
|
||||||
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(BatchSendTaskDto batchSendTaskInfo) {
|
|
||||||
startPage();
|
|
||||||
List<BatchSendTaskInfo> list = batchSendTaskInfoService.selectBatchSendTaskInfoList(batchSendTaskInfo);
|
|
||||||
return getDataTable(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询批量推送任务信息列表
|
|
||||||
*/
|
|
||||||
@GetMapping("/batchSendTaskList")
|
|
||||||
public List<BatchSendTaskInfo> batchSendTaskList(BatchSendTaskDto batchSendTaskInfo) {
|
|
||||||
return batchSendTaskInfoService.selectBatchSendTaskInfoList(batchSendTaskInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出批量推送任务信息列表
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('system:batchSendTaskInfo:export')")
|
|
||||||
@Log(title = "批量推送任务信息", businessType = BusinessType.EXPORT)
|
|
||||||
@PostMapping("/export")
|
|
||||||
public void export(HttpServletResponse response, BatchSendTaskDto 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);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("标签信息")
|
|
||||||
@GetMapping("/getPhysicalExaminationLabel")
|
|
||||||
public List<String> getPhysicalExaminationLabel(){
|
|
||||||
return batchSendTaskInfoService.getPhysicalExaminationLabel();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,99 +0,0 @@
|
|||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,94 +0,0 @@
|
|||||||
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));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,110 +0,0 @@
|
|||||||
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, "账单信息数据");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -44,31 +44,34 @@ public class ImportDownloadController {
|
|||||||
throw new ServiceException("请选择文件类型!");
|
throw new ServiceException("请选择文件类型!");
|
||||||
}
|
}
|
||||||
File file = null;
|
File file = null;
|
||||||
//本地服务使用 classpath:template
|
|
||||||
switch (fileType) {
|
switch (fileType) {
|
||||||
case Constants.AGENCY:
|
case Constants.AGENCY:
|
||||||
file = ResourceUtils.getFile("template/机构信息导入表.xlsx");
|
file = ResourceUtils.getFile("classpath:template/机构信息导入表.xlsx");
|
||||||
break;
|
break;
|
||||||
case Constants.DEPARTMENT:
|
case Constants.DEPARTMENT:
|
||||||
file = ResourceUtils.getFile("template/科室信息导入表.xlsx");
|
file = ResourceUtils.getFile("classpath:template/科室信息导入表.xlsx");
|
||||||
break;
|
break;
|
||||||
case Constants.PRE_HOSPITALIZED: // 预住院患者
|
case Constants.PRE_HOSPITALIZED: // 预住院患者
|
||||||
file = ResourceUtils.getFile("template/预住院患者信息导入表.xlsx");
|
file = ResourceUtils.getFile("classpath:template/预住院患者信息导入表.xlsx");
|
||||||
break;
|
break;
|
||||||
case Constants.IN_HOSPITAL: // 在院患者
|
case Constants.IN_HOSPITAL: // 在院患者
|
||||||
file = ResourceUtils.getFile("template/在院患者信息导入表.xlsx");
|
file = ResourceUtils.getFile("classpath:template/在院患者信息导入表.xlsx");
|
||||||
break;
|
break;
|
||||||
case Constants.DISCHARGED: // 出院患者
|
case Constants.DISCHARGED: // 出院患者
|
||||||
file = ResourceUtils.getFile("template/出院患者信息导入表.xlsx");
|
file = ResourceUtils.getFile("classpath:template/出院患者信息导入表.xlsx");
|
||||||
break;
|
break;
|
||||||
case Constants.OUTPATIENT: // 门诊患者
|
case Constants.OUTPATIENT: // 门诊患者
|
||||||
file = ResourceUtils.getFile("template/门诊患者信息导入表.xlsx");
|
file = ResourceUtils.getFile("classpath:template/门诊患者信息导入表.xlsx");
|
||||||
break;
|
break;
|
||||||
case Constants.PATIENT_INFO_IMPORT: // 门诊患者
|
case Constants.PATIENT_INFO_IMPORT: // 门诊患者
|
||||||
file = ResourceUtils.getFile("template/OutpatientFollowUpRecords.xlsx");
|
//本地服务
|
||||||
break;
|
//file = ResourceUtils.getFile("classpath:template/OutpatientFollowUpRecords.xlsx");
|
||||||
case Constants.BATCH_SEND_TASK_INFO:
|
//线上服务
|
||||||
file = ResourceUtils.getFile("template/批量推送人员信息表.xlsx");
|
Resource resource = new ClassPathResource("classpath:template/OutpatientFollowUpRecords.xlsx");
|
||||||
|
String filePath= this.getClass().getClassLoader().getResource("classpath:template/OutpatientFollowUpRecords.xlsx").getFile();
|
||||||
|
file= new File(filePath);
|
||||||
|
// 通过流讲文件复制到file中
|
||||||
|
FileUtils.copyToFile(resource.getInputStream(), file);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (Objects.isNull(file)) {
|
if (Objects.isNull(file)) {
|
||||||
|
|||||||
@ -1,92 +0,0 @@
|
|||||||
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,12 +140,4 @@ public class ScriptInfoController extends BaseController {
|
|||||||
public AjaxResult updateScriptEdgeNode(@RequestBody ScriptVO scriptVO) {
|
public AjaxResult updateScriptEdgeNode(@RequestBody ScriptVO scriptVO) {
|
||||||
return scriptInfoService.updateScriptEdgeNode(scriptVO);
|
return scriptInfoService.updateScriptEdgeNode(scriptVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询话术变量
|
|
||||||
*/
|
|
||||||
@GetMapping("/selectScriptVariable")
|
|
||||||
public AjaxResult selectScriptVariable(Long id) {
|
|
||||||
return scriptInfoService.selectScriptVariable(id);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,92 +0,0 @@
|
|||||||
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)
|
@Log(title = "签约患者管理任务路径", businessType = BusinessType.INSERT)
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
|
|||||||
@ -117,12 +117,4 @@ public class TextMessageController extends BaseController {
|
|||||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||||
return toAjax(textMessageService.deleteTextMessageByIds(ids));
|
return toAjax(textMessageService.deleteTextMessageByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询话术变量
|
|
||||||
*/
|
|
||||||
@GetMapping("/selectTextMessageVariable")
|
|
||||||
public AjaxResult selectTextMessageVariable(Long id) {
|
|
||||||
return textMessageService.selectTextMessageVariable(id);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,220 +0,0 @@
|
|||||||
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.time.LocalDateTime;
|
|
||||||
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 HH:mm:ss")
|
|
||||||
private LocalDateTime visitDate;
|
|
||||||
|
|
||||||
@Excel(name = "就诊/出院/体检时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
private Date visitTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 体检/门诊/住院号
|
|
||||||
*/
|
|
||||||
@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;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 人员类型,在院:IN_HOSPITAL,门诊:OUTPATIENT,出院:DISCHARGED,体检:PHYSICAL_EXAMINATION
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "人员类型")
|
|
||||||
@Excel(name = "人员类型")
|
|
||||||
private String personnelType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 人群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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,48 +0,0 @@
|
|||||||
package com.xinelu.manage.domain.batchsendtasklabelinfo;
|
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量推送任务标签信息表对象 batch_send_task_label_info
|
|
||||||
*
|
|
||||||
* @author xinelu
|
|
||||||
* @date 2026-04-29
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@ApiModel(value = "批量推送任务标签信息表对象", description = "batch_send_task_label_info")
|
|
||||||
public class BatchSendTaskLabelInfo extends BaseEntity {
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 标签id
|
|
||||||
*/
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 总结标签
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "总结标签")
|
|
||||||
@Excel(name = "总结标签")
|
|
||||||
private String physicalExaminationLabel;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("id", getId())
|
|
||||||
.append("physicalExaminationLabel", getPhysicalExaminationLabel())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,135 +0,0 @@
|
|||||||
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;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除标识,0:未删除,1:已删除
|
|
||||||
*/
|
|
||||||
private Integer delFlag;
|
|
||||||
|
|
||||||
@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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,68 +0,0 @@
|
|||||||
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;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量推送任务表id
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "批量推送任务表id")
|
|
||||||
private Long batchSendTaskId;
|
|
||||||
|
|
||||||
@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("batchSendTaskId", getBatchSendTaskId())
|
|
||||||
.append("createBy", getCreateBy())
|
|
||||||
.append("createTime", getCreateTime())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,99 +0,0 @@
|
|||||||
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,7 +12,6 @@ import lombok.NoArgsConstructor;
|
|||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -38,19 +37,21 @@ public class PhoneDialRecord extends BaseEntity {
|
|||||||
* 患者id
|
* 患者id
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "患者id")
|
@ApiModelProperty(value = "患者id")
|
||||||
|
@Excel(name = "患者id")
|
||||||
private Long patientId;
|
private Long patientId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 签约患者管理任务节点表id
|
* 签约患者管理任务节点表id
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "签约患者管理任务节点表id")
|
@ApiModelProperty(value = "签约患者管理任务节点表id")
|
||||||
|
@Excel(name = "签约患者管理任务节点表id")
|
||||||
private Long manageRouteNodeId;
|
private Long manageRouteNodeId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 患者手机号
|
* 患者手机号
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "患者手机号")
|
@ApiModelProperty(value = "患者手机号")
|
||||||
@Excel(name = "手机号")
|
@Excel(name = "患者手机号")
|
||||||
private String patientPhone;
|
private String patientPhone;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -65,37 +66,42 @@ public class PhoneDialRecord extends BaseEntity {
|
|||||||
* 电话模板id
|
* 电话模板id
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "电话模板id")
|
@ApiModelProperty(value = "电话模板id")
|
||||||
|
@Excel(name = "电话模板id")
|
||||||
private String phoneTemplateId;
|
private String phoneTemplateId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电话模板名称
|
* 电话模板名称
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "电话模板名称")
|
@ApiModelProperty(value = "电话模板名称")
|
||||||
@Excel(name = "模板名称")
|
@Excel(name = "电话模板名称")
|
||||||
private String phoneTemplateName;
|
private String phoneTemplateName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 替换标签之后的电话内容
|
* 替换标签之后的电话内容
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "替换标签之后的电话内容")
|
@ApiModelProperty(value = "替换标签之后的电话内容")
|
||||||
|
@Excel(name = "替换标签之后的电话内容")
|
||||||
private String messageNodeContent;
|
private String messageNodeContent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AI :自动外呼 或 COMMON:人工随访电话,否则为空
|
* AI :自动外呼 或 COMMON:人工随访电话,否则为空
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "AI :自动外呼 或 COMMON:人工随访电话,否则为空")
|
@ApiModelProperty(value = "AI :自动外呼 或 COMMON:人工随访电话,否则为空")
|
||||||
|
@Excel(name = "AI :自动外呼 或 COMMON:人工随访电话,否则为空")
|
||||||
private String phoneDialMethod;
|
private String phoneDialMethod;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 推送结果状态码(0表示成功)
|
* 推送结果状态码(0表示成功)
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "推送结果状态码")
|
@ApiModelProperty(value = "推送结果状态码")
|
||||||
|
@Excel(name = "推送结果状态码", readConverterExp = "0表示成功")
|
||||||
private Long errorCode;
|
private Long errorCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 推送结果状态码,success:成功,fail:失败
|
* 推送结果状态码,success:成功,fail:失败
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "推送结果状态码,success:成功,fail:失败")
|
@ApiModelProperty(value = "推送结果状态码,success:成功,fail:失败")
|
||||||
|
@Excel(name = "推送结果状态码,success:成功,fail:失败")
|
||||||
private String errorStatus;
|
private String errorStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -110,33 +116,6 @@ public class PhoneDialRecord extends BaseEntity {
|
|||||||
@ApiModelProperty(value = "通话录音存储路径")
|
@ApiModelProperty(value = "通话录音存储路径")
|
||||||
private String phoneDialRecordVideo;
|
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
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||||
@ -155,12 +134,6 @@ public class PhoneDialRecord extends BaseEntity {
|
|||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", getUpdateBy())
|
.append("updateBy", getUpdateBy())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
.append("ctUuid", getCtUuid())
|
|
||||||
.append("phoneDialRecordVideo", getPhoneDialRecordVideo())
|
|
||||||
.append("phoneDuration", getPhoneDuration())
|
|
||||||
.append("phoneCost", getPhoneExpense())
|
|
||||||
.append("phoneUnitPrice", getPhoneUnitPrice())
|
|
||||||
.append("billId", getBillId())
|
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,8 +12,8 @@ import lombok.NoArgsConstructor;
|
|||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 短信发送结果记录对象 short_message_send_record
|
* 短信发送结果记录对象 short_message_send_record
|
||||||
@ -38,19 +38,21 @@ public class ShortMessageSendRecord extends BaseEntity {
|
|||||||
* 患者id
|
* 患者id
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "患者id")
|
@ApiModelProperty(value = "患者id")
|
||||||
|
@Excel(name = "患者id")
|
||||||
private Long patientId;
|
private Long patientId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 签约患者管理任务节点表id
|
* 签约患者管理任务节点表id
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "签约患者管理任务节点表id")
|
@ApiModelProperty(value = "签约患者管理任务节点表id")
|
||||||
|
@Excel(name = "签约患者管理任务节点表id")
|
||||||
private Long manageRouteNodeId;
|
private Long manageRouteNodeId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 患者手机号
|
* 患者手机号
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "患者手机号")
|
@ApiModelProperty(value = "患者手机号")
|
||||||
@Excel(name = "手机号")
|
@Excel(name = "患者手机号")
|
||||||
private String patientPhone;
|
private String patientPhone;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -65,71 +67,37 @@ public class ShortMessageSendRecord extends BaseEntity {
|
|||||||
* 消息模板id
|
* 消息模板id
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "消息模板id")
|
@ApiModelProperty(value = "消息模板id")
|
||||||
|
@Excel(name = "消息模板id")
|
||||||
private String messageTemplateId;
|
private String messageTemplateId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 消息内容
|
* 消息内容
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "消息内容")
|
@ApiModelProperty(value = "消息内容")
|
||||||
|
@Excel(name = "消息内容")
|
||||||
private String messageNodeContent;
|
private String messageNodeContent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 推送结果状态码(0表示成功)
|
* 推送结果状态码(0表示成功)
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "推送结果状态码")
|
@ApiModelProperty(value = "推送结果状态码")
|
||||||
|
@Excel(name = "推送结果状态码", readConverterExp = "0表示成功")
|
||||||
private Long errorCode;
|
private Long errorCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 推送结果状态码,success:成功,fail:失败
|
* 推送结果状态码,success:成功,fail:失败
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "推送结果状态码,success:成功,fail:失败")
|
@ApiModelProperty(value = "推送结果状态码,success:成功,fail:失败")
|
||||||
|
@Excel(name = "推送结果状态码,success:成功,fail:失败")
|
||||||
private String errorStatus;
|
private String errorStatus;
|
||||||
|
|
||||||
/**
|
|
||||||
* 错误码信息描述
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "错误码信息描述")
|
|
||||||
private String errMsg;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHONE_MSG:电话同时发短信时;COMMON:通用
|
* PHONE_MSG:电话同时发短信时;COMMON:通用
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "PHONE_MSG:电话同时发短信时;COMMON:通用")
|
@ApiModelProperty(value = "PHONE_MSG:电话同时发短信时;COMMON:通用")
|
||||||
|
@Excel(name = "PHONE_MSG:电话同时发短信时;COMMON:通用")
|
||||||
private String messageType;
|
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
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
@ -148,11 +116,6 @@ public class ShortMessageSendRecord extends BaseEntity {
|
|||||||
.append("updateBy", getUpdateBy())
|
.append("updateBy", getUpdateBy())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
.append("messageType", getMessageType())
|
.append("messageType", getMessageType())
|
||||||
.append("messageLength", getMessageLength())
|
|
||||||
.append("messageQuantity", getMessageQuantity())
|
|
||||||
.append("messageUnitPrice", getMessageUnitPrice())
|
|
||||||
.append("messageExpense", getMessageExpense())
|
|
||||||
.append("billId", getBillId())
|
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import lombok.NoArgsConstructor;
|
|||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.LocalTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 签约患者管理任务路径对象 sign_patient_manage_route
|
* 签约患者管理任务路径对象 sign_patient_manage_route
|
||||||
@ -139,11 +140,4 @@ public class SignPatientManageRoute extends BaseEntity {
|
|||||||
@Excel(name = "导入患者主表ID")
|
@Excel(name = "导入患者主表ID")
|
||||||
private String importMainId;
|
private String importMainId;
|
||||||
|
|
||||||
/** 批量推送任务表id */
|
|
||||||
@ApiModelProperty(value = "批量推送任务表id")
|
|
||||||
private Long batchSendTaskRecordId;
|
|
||||||
|
|
||||||
/** 批量推送信息表id */
|
|
||||||
@ApiModelProperty(value = "批量推送信息表id")
|
|
||||||
private Long batchSendTaskId;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,55 +0,0 @@
|
|||||||
package com.xinelu.manage.domain.textmessage;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 对SendSms和SendBatchSms短信发送接口设置回执接收
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class SmsReport {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 转发给运营商的时间。
|
|
||||||
*/
|
|
||||||
private String send_time;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 收到运营商回执的时间。
|
|
||||||
*/
|
|
||||||
private String report_time;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否发送成功。取值:true:发送成功。false:发送失败。
|
|
||||||
*/
|
|
||||||
private Boolean success;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 错误码信息描述。
|
|
||||||
*/
|
|
||||||
private String err_msg;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 错误码。
|
|
||||||
*/
|
|
||||||
private String err_code;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 短信接收号码
|
|
||||||
*/
|
|
||||||
private String phone_number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 短信长度。
|
|
||||||
*/
|
|
||||||
private String sms_size;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 发送回执ID,即发送流水号
|
|
||||||
*/
|
|
||||||
private String biz_id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用发送短信SendSms接口时传的outId。
|
|
||||||
*/
|
|
||||||
private String out_id;
|
|
||||||
}
|
|
||||||
@ -1,38 +0,0 @@
|
|||||||
package com.xinelu.manage.domain.textmessage;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 阿里云回调服务数据库表
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class TaskMessageBackEntity {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键
|
|
||||||
*/
|
|
||||||
private Integer id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 回调数据
|
|
||||||
*/
|
|
||||||
private JSONArray messageBackData;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 已读状态,0:未读,1:已读
|
|
||||||
*/
|
|
||||||
private Integer readState;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建时间
|
|
||||||
*/
|
|
||||||
private Date createDate;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改时间
|
|
||||||
*/
|
|
||||||
private Date updateDate;
|
|
||||||
}
|
|
||||||
@ -112,10 +112,6 @@ public class TextMessage extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private Long sourceTemplateId;
|
private Long sourceTemplateId;
|
||||||
|
|
||||||
/**
|
|
||||||
* 短信变量,竖线隔开。来源于创建短息任务页面
|
|
||||||
*/
|
|
||||||
private String variables;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
@ -132,7 +128,6 @@ public class TextMessage extends BaseEntity {
|
|||||||
.append("textMessageStatus", getTextMessageStatus())
|
.append("textMessageStatus", getTextMessageStatus())
|
||||||
.append("textMessageSort", getTextMessageSort())
|
.append("textMessageSort", getTextMessageSort())
|
||||||
.append("textMessageRemark", getTextMessageRemark())
|
.append("textMessageRemark", getTextMessageRemark())
|
||||||
.append("variables", getVariables())
|
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", getCreateBy())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", getUpdateBy())
|
.append("updateBy", getUpdateBy())
|
||||||
|
|||||||
@ -44,11 +44,6 @@ public class CreateTaskDto {
|
|||||||
*/
|
*/
|
||||||
private List<Integer> forbidDialDate;
|
private List<Integer> forbidDialDate;
|
||||||
|
|
||||||
/**
|
|
||||||
* 禁呼时间,默认为空,表示不限制禁呼时间 :[{"forbidDialStartTime":"12:00","forbidDialEndTime":"13:00"},{"forbidDialStartTime":"14:00","forbidDialEndTime":"15:00"}]
|
|
||||||
*/
|
|
||||||
private List<RetryRuleList> forbidDialTime;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重试次数,整数,且 N ≤ 3,默认为空,表示不重试
|
* 重试次数,整数,且 N ≤ 3,默认为空,表示不重试
|
||||||
*/
|
*/
|
||||||
@ -69,21 +64,12 @@ public class CreateTaskDto {
|
|||||||
*/
|
*/
|
||||||
private Boolean isOpenPhoneDown = false;
|
private Boolean isOpenPhoneDown = false;
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否开启重复号码过滤,true为开启,false为关闭
|
|
||||||
*/
|
|
||||||
private Boolean isOpenRepeatFilter = true;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 号码类型过滤 1-400号码;2-800号码;3-手机号码;4-固话;5-95号码;6-96号码;7-其他
|
* 号码类型过滤 1-400号码;2-800号码;3-手机号码;4-固话;5-95号码;6-96号码;7-其他
|
||||||
*/
|
*/
|
||||||
private List<Integer> numTypeFilterList;
|
private List<Integer> numTypeFilterList;
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否开启任务回调 默认false
|
|
||||||
*/
|
|
||||||
private Boolean taskDataCallback;
|
private Boolean taskDataCallback;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 任务级回调地址设置
|
* 任务级回调地址设置
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,20 +0,0 @@
|
|||||||
package com.xinelu.manage.dto.aiob;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 禁呼时间
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class RetryRuleList {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 禁呼开始时间
|
|
||||||
*/
|
|
||||||
private String forbidDialStartTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 禁呼截止时间
|
|
||||||
*/
|
|
||||||
private String forbidDialEndTime;
|
|
||||||
}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
package com.xinelu.manage.dto.batchsendtaskinfo;
|
|
||||||
|
|
||||||
import com.xinelu.manage.domain.batchsendtaskinfo.BatchSendTaskInfo;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
|
|
||||||
public class BatchSendTaskDto extends BatchSendTaskInfo {
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "开始时间")
|
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
|
||||||
private LocalDate startDate;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "结束时间")
|
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
|
||||||
private LocalDate endDate;
|
|
||||||
}
|
|
||||||
@ -1,40 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
||||||
@ -1,64 +0,0 @@
|
|||||||
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,9 +31,4 @@ public class SmsInfoDTO {
|
|||||||
* 模板中的变量替换JSON串
|
* 模板中的变量替换JSON串
|
||||||
*/
|
*/
|
||||||
private JSONObject templateParam;
|
private JSONObject templateParam;
|
||||||
|
|
||||||
/**
|
|
||||||
* 外部流水扩展字段
|
|
||||||
*/
|
|
||||||
private String OutId;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -120,9 +120,4 @@ public class TextMessageTaskDTO extends BaseEntity {
|
|||||||
|
|
||||||
@ApiModelProperty(value = "适用任务类型字典表ids")
|
@ApiModelProperty(value = "适用任务类型字典表ids")
|
||||||
private Long[] suitTaskTypeIds;
|
private Long[] suitTaskTypeIds;
|
||||||
|
|
||||||
/**
|
|
||||||
* 短信变量,竖线隔开。来源于创建短息任务页面
|
|
||||||
*/
|
|
||||||
private String variables;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import org.apache.ibatis.annotations.Param;
|
|||||||
* @Author haown
|
* @Author haown
|
||||||
* @Date 2025-12-23 15:45
|
* @Date 2025-12-23 15:45
|
||||||
*/
|
*/
|
||||||
|
@DataSource(DataSourceType.SLAVE)
|
||||||
public interface AIOBCallbackMapper {
|
public interface AIOBCallbackMapper {
|
||||||
|
|
||||||
List<AIOBCallbackEntity> getList(AIOBCallbackEntity query);
|
List<AIOBCallbackEntity> getList(AIOBCallbackEntity query);
|
||||||
|
|||||||
@ -1,70 +0,0 @@
|
|||||||
package com.xinelu.manage.mapper.batchsendtaskinfo;
|
|
||||||
|
|
||||||
import com.xinelu.manage.domain.batchsendtaskinfo.BatchSendTaskInfo;
|
|
||||||
import com.xinelu.manage.dto.batchsendtaskinfo.BatchSendTaskDto;
|
|
||||||
|
|
||||||
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(BatchSendTaskDto 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);
|
|
||||||
}
|
|
||||||
@ -1,70 +0,0 @@
|
|||||||
package com.xinelu.manage.mapper.batchsendtasklabelinfo;
|
|
||||||
|
|
||||||
import com.xinelu.manage.domain.batchsendtasklabelinfo.BatchSendTaskLabelInfo;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量推送任务标签信息表Mapper接口
|
|
||||||
*
|
|
||||||
* @author xinelu
|
|
||||||
* @date 2026-04-29
|
|
||||||
*/
|
|
||||||
public interface BatchSendTaskLabelInfoMapper {
|
|
||||||
/**
|
|
||||||
* 查询批量推送任务标签信息表
|
|
||||||
*
|
|
||||||
* @param id 批量推送任务标签信息表主键
|
|
||||||
* @return 批量推送任务标签信息表
|
|
||||||
*/
|
|
||||||
BatchSendTaskLabelInfo selectBatchSendTaskLabelInfoById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询批量推送任务标签信息表列表
|
|
||||||
*
|
|
||||||
* @param batchSendTaskLabelInfo 批量推送任务标签信息表
|
|
||||||
* @return 批量推送任务标签信息表集合
|
|
||||||
*/
|
|
||||||
List<BatchSendTaskLabelInfo> selectBatchSendTaskLabelInfoList(BatchSendTaskLabelInfo batchSendTaskLabelInfo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增批量推送任务标签信息表
|
|
||||||
*
|
|
||||||
* @param batchSendTaskLabelInfo 批量推送任务标签信息表
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
int insertBatchSendTaskLabelInfo(BatchSendTaskLabelInfo batchSendTaskLabelInfo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改批量推送任务标签信息表
|
|
||||||
*
|
|
||||||
* @param batchSendTaskLabelInfo 批量推送任务标签信息表
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
int updateBatchSendTaskLabelInfo(BatchSendTaskLabelInfo batchSendTaskLabelInfo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除批量推送任务标签信息表
|
|
||||||
*
|
|
||||||
* @param id 批量推送任务标签信息表主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
int deleteBatchSendTaskLabelInfoById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除批量推送任务标签信息表
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的数据主键集合
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
int deleteBatchSendTaskLabelInfoByIds(Long[] ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增患者信息
|
|
||||||
*
|
|
||||||
* @param labels 批量任务信息
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
int insertBatchSendTaskLabelInfList(@Param("list") List<String> labels);
|
|
||||||
}
|
|
||||||
@ -1,70 +0,0 @@
|
|||||||
package com.xinelu.manage.mapper.batchsendtaskrecordinfo;
|
|
||||||
|
|
||||||
import com.xinelu.manage.domain.batchsendtaskrecordinfo.BatchSendTaskRecordInfo;
|
|
||||||
import com.xinelu.manage.vo.batchsendtaskrecordinfo.BatchSendTaskRecordVo;
|
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询批量推送任务记录
|
|
||||||
*
|
|
||||||
* @param id 批量推送任务记录主键
|
|
||||||
* @return 批量推送任务记录
|
|
||||||
*/
|
|
||||||
BatchSendTaskRecordVo selectBatchSendTaskRecordVoById(Long id);
|
|
||||||
}
|
|
||||||
@ -1,69 +0,0 @@
|
|||||||
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);
|
|
||||||
}
|
|
||||||
@ -1,69 +0,0 @@
|
|||||||
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);
|
|
||||||
}
|
|
||||||
@ -117,7 +117,7 @@ public interface PatientInfoMapper {
|
|||||||
* @param now 当前时间
|
* @param now 当前时间
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
int getPatientInfoCountByCreateTime(@Param("firstDay") LocalDate firstDay, @Param("now") LocalDate now, @Param("hospitalAgencyId")Long hospitalAgencyId);
|
int getPatientInfoCountByCreateTime(@Param("firstDay") LocalDate firstDay, @Param("now") LocalDate now);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据签约时间查询患者数量
|
* 根据签约时间查询患者数量
|
||||||
@ -126,14 +126,14 @@ public interface PatientInfoMapper {
|
|||||||
* @param now 当前时间
|
* @param now 当前时间
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
int selectPatientInfoCountBySignTime(@Param("firstDay") LocalDate firstDay, @Param("now") LocalDate now, @Param("hospitalAgencyId")Long hospitalAgencyId);
|
int selectPatientInfoCountBySignTime(@Param("firstDay") LocalDate firstDay, @Param("now") LocalDate now);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 已签约总数
|
* 已签约总数
|
||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
int selectPatientSignTotalCount(Long hospitalAgencyId);
|
int selectPatientSignTotalCount();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务中患者总数
|
* 服务中患者总数
|
||||||
|
|||||||
@ -48,5 +48,5 @@ public interface PatientPreHospitalizationMapper {
|
|||||||
* @param now 当前时间
|
* @param now 当前时间
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
int getPatientPreHospitalizationCountByCreateTime(@Param("firstDay") LocalDate firstDay, @Param("now") LocalDate now, @Param("hospitalAgencyId")Long hospitalAgencyId);
|
int getPatientPreHospitalizationCountByCreateTime(@Param("firstDay") LocalDate firstDay, @Param("now") LocalDate now);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,12 +1,9 @@
|
|||||||
package com.xinelu.manage.mapper.phonedialrecord;
|
package com.xinelu.manage.mapper.phonedialrecord;
|
||||||
|
|
||||||
import com.xinelu.manage.domain.phonedialrecord.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.phonedialrecord.PhoneDialRecordDto;
|
||||||
import com.xinelu.manage.dto.statistics.FollowUpRateDto;
|
import com.xinelu.manage.dto.statistics.FollowUpRateDto;
|
||||||
import com.xinelu.manage.vo.phonedialrecord.BillPhoneDialVo;
|
|
||||||
import com.xinelu.manage.vo.phonedialrecord.PhoneDialRecordVo;
|
import com.xinelu.manage.vo.phonedialrecord.PhoneDialRecordVo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -32,14 +29,6 @@ public interface PhoneDialRecordMapper {
|
|||||||
*/
|
*/
|
||||||
List<PhoneDialRecord> selectPhoneDialRecordList(PhoneDialRecord phoneDialRecord);
|
List<PhoneDialRecord> selectPhoneDialRecordList(PhoneDialRecord phoneDialRecord);
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询电话拨打记录列表
|
|
||||||
*
|
|
||||||
* @param phoneDialRecord 电话拨打记录
|
|
||||||
* @return 电话拨打记录集合
|
|
||||||
*/
|
|
||||||
List<BillPhoneDialVo> selectPhoneDialRecords(BillPhoneDialVo phoneDialRecord);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增电话拨打记录
|
* 新增电话拨打记录
|
||||||
*
|
*
|
||||||
@ -97,12 +86,4 @@ public interface PhoneDialRecordMapper {
|
|||||||
* @return 电话拨打记录集合
|
* @return 电话拨打记录集合
|
||||||
*/
|
*/
|
||||||
List<PhoneDialRecord> getNoVideoList(PhoneDialRecordDto phoneDialRecordDto);
|
List<PhoneDialRecord> getNoVideoList(PhoneDialRecordDto phoneDialRecordDto);
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据账单id查询电话推送记录
|
|
||||||
*
|
|
||||||
* @param billId 账单id
|
|
||||||
* @return BillInfoDto
|
|
||||||
*/
|
|
||||||
List<BillInfoDto> selectPhoneDialStatisticByBillId(Long billId);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -81,19 +81,4 @@ public interface ScriptInfoMapper {
|
|||||||
int deleteScriptInfoNode(Long id);
|
int deleteScriptInfoNode(Long id);
|
||||||
|
|
||||||
int deleteScriptInfoEdge(Long id);
|
int deleteScriptInfoEdge(Long id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询话术信息列表
|
|
||||||
* @return 话术信息集合
|
|
||||||
*/
|
|
||||||
List<ScriptInfo> selectScriptInfos();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据机器人编号查询变量信息
|
|
||||||
*
|
|
||||||
* @param robotPublishId
|
|
||||||
* @return String
|
|
||||||
*/
|
|
||||||
String selectVariablesByRobotPublishId(String robotPublishId);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
package com.xinelu.manage.mapper.shortmessagesendrecord;
|
package com.xinelu.manage.mapper.shortmessagesendrecord;
|
||||||
|
|
||||||
import com.xinelu.manage.domain.shortmessagesendrecord.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.dto.statistics.FollowUpRateDto;
|
||||||
import com.xinelu.manage.vo.shortmessagesendrecord.ShortMessageSendRecordVo;
|
|
||||||
import com.xinelu.manage.vo.statistics.MessageSendVo;
|
import com.xinelu.manage.vo.statistics.MessageSendVo;
|
||||||
import com.xinelu.manage.vo.subscribemessagesendrecord.RecordNum;
|
import com.xinelu.manage.vo.subscribemessagesendrecord.RecordNum;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
@ -33,14 +31,6 @@ public interface ShortMessageSendRecordMapper {
|
|||||||
*/
|
*/
|
||||||
List<ShortMessageSendRecord> selectShortMessageSendRecordList(ShortMessageSendRecord shortMessageSendRecord);
|
List<ShortMessageSendRecord> selectShortMessageSendRecordList(ShortMessageSendRecord shortMessageSendRecord);
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询短信发送结果记录列表
|
|
||||||
*
|
|
||||||
* @param shortMessageSendRecord 短信发送结果记录
|
|
||||||
* @return 短信发送结果记录集合
|
|
||||||
*/
|
|
||||||
List<ShortMessageSendRecordVo> selectShortMessageSendRecords(ShortMessageSendRecordVo shortMessageSendRecord);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增短信发送结果记录
|
* 新增短信发送结果记录
|
||||||
*
|
*
|
||||||
@ -82,20 +72,4 @@ public interface ShortMessageSendRecordMapper {
|
|||||||
List<RecordNum> selectShortMessageRecordCountByManageRouteNodeIds(@Param("manageRouteNodeIds") List<Long> manageRouteNodeIds);
|
List<RecordNum> selectShortMessageRecordCountByManageRouteNodeIds(@Param("manageRouteNodeIds") List<Long> manageRouteNodeIds);
|
||||||
|
|
||||||
List<MessageSendVo> getStatisticNum(FollowUpRateDto queryDto);
|
List<MessageSendVo> getStatisticNum(FollowUpRateDto queryDto);
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据账单id查询短信推送记录
|
|
||||||
*
|
|
||||||
* @param billId 账单id
|
|
||||||
* @return BillInfoDto
|
|
||||||
*/
|
|
||||||
List<BillInfoDto> selectShortMessageRecordByBillId(Long billId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量新增短信发送结果记录
|
|
||||||
*
|
|
||||||
* @param shortMessageSendRecords 短信发送结果记录
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
int insertShortMessageSendRecords(List<ShortMessageSendRecord> shortMessageSendRecords);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -173,15 +173,6 @@ 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);
|
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);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据创建时间查询任务数量
|
* 根据创建时间查询任务数量
|
||||||
*
|
*
|
||||||
@ -206,7 +197,7 @@ public interface SignPatientManageRouteNodeMapper {
|
|||||||
*
|
*
|
||||||
* @return PatientAndNode
|
* @return PatientAndNode
|
||||||
*/
|
*/
|
||||||
List<PatientAndNode> selectNodeExecuteStatus(Long hospitalAgencyId);
|
List<PatientAndNode> selectNodeExecuteStatus();
|
||||||
|
|
||||||
List<PatientFollowUpPlanVo> getFollowUpPlan(FollowUpRateDto queryDto);
|
List<PatientFollowUpPlanVo> getFollowUpPlan(FollowUpRateDto queryDto);
|
||||||
|
|
||||||
|
|||||||
@ -100,11 +100,4 @@ public interface TextMessageMapper {
|
|||||||
* 检查除当前记录之外是否存在同名的短信模板名称
|
* 检查除当前记录之外是否存在同名的短信模板名称
|
||||||
*/
|
*/
|
||||||
int countByTextMessageNameExcludingId(@Param("id") Long id, @Param("departmentId") Long departmentId, @Param("textMessageName") String textMessageName);
|
int countByTextMessageNameExcludingId(@Param("id") Long id, @Param("departmentId") Long departmentId, @Param("textMessageName") String textMessageName);
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询短信模板信息列表
|
|
||||||
*
|
|
||||||
* @return 短信模板信息集合
|
|
||||||
*/
|
|
||||||
List<TextMessageVO> selectTextMessages();
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,24 +1,11 @@
|
|||||||
package com.xinelu.manage.service.aiob.impl;
|
package com.xinelu.manage.service.aiob.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
|
||||||
import com.alibaba.fastjson2.JSONArray;
|
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
|
||||||
import com.xinelu.common.exception.ServiceException;
|
|
||||||
import com.xinelu.manage.domain.aiob.AIOBCallbackEntity;
|
import com.xinelu.manage.domain.aiob.AIOBCallbackEntity;
|
||||||
import com.xinelu.manage.mapper.aiob.AIOBCallbackMapper;
|
import com.xinelu.manage.mapper.aiob.AIOBCallbackMapper;
|
||||||
import com.xinelu.manage.service.aiob.IAIOBCallbackService;
|
import com.xinelu.manage.service.aiob.IAIOBCallbackService;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.http.HttpEntity;
|
|
||||||
import org.springframework.http.HttpMethod;
|
|
||||||
import org.springframework.http.ResponseEntity;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.web.client.RestTemplate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 阿里云服务器百度外呼回调Service实现
|
* @description: 阿里云服务器百度外呼回调Service实现
|
||||||
@ -26,46 +13,16 @@ import org.springframework.web.client.RestTemplate;
|
|||||||
* @create: 2025-12-23 15:30
|
* @create: 2025-12-23 15:30
|
||||||
**/
|
**/
|
||||||
@Service
|
@Service
|
||||||
@Slf4j
|
|
||||||
public class AIOBCallbackServiceImpl implements IAIOBCallbackService {
|
public class AIOBCallbackServiceImpl implements IAIOBCallbackService {
|
||||||
@Resource
|
@Resource
|
||||||
private AIOBCallbackMapper aiobCallbackMapper;
|
private AIOBCallbackMapper aiobCallbackMapper;
|
||||||
@Value("${aiob.callBackUrl}")
|
|
||||||
private String callBackUrl;
|
|
||||||
@Override
|
@Override
|
||||||
public List<AIOBCallbackEntity> getList(AIOBCallbackEntity query) {
|
public List<AIOBCallbackEntity> getList(AIOBCallbackEntity query) {
|
||||||
// 接口获取外呼回调数据app
|
return aiobCallbackMapper.getList(query);
|
||||||
List<AIOBCallbackEntity> callbackEntityList = new ArrayList<>();
|
|
||||||
HttpEntity<JSONObject> requestEntity = new HttpEntity<>((JSONObject) JSON.toJSON(query));
|
|
||||||
RestTemplate restTemplate = new RestTemplate();
|
|
||||||
ResponseEntity<String> responseEntity = restTemplate.exchange(callBackUrl + "/getList", HttpMethod.POST, requestEntity, String.class);
|
|
||||||
JSONObject object = JSON.parseObject(responseEntity.getBody());
|
|
||||||
if (object == null || object.getInteger("code") == null || object.getInteger("code") != 0) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (object.containsKey("data")) {
|
|
||||||
JSONArray data = object.getJSONArray("data");
|
|
||||||
if (data != null && data.size() > 0) {
|
|
||||||
callbackEntityList = data.toJavaList(AIOBCallbackEntity.class);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return callbackEntityList;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public Integer updateReadState(Integer readState, Integer id) {
|
@Override public Integer updateReadState(Integer readState, Integer id) {
|
||||||
log.info("修改百度外呼回调数据已读状态--id:{}", id);
|
return aiobCallbackMapper.updateReadState(readState, id);
|
||||||
JSONObject TaskCallbackUpdateDto = new JSONObject();
|
|
||||||
TaskCallbackUpdateDto.fluentPut("id", id).fluentPut("readState", readState);
|
|
||||||
HttpEntity<JSONObject> requestEntity = new HttpEntity<>(TaskCallbackUpdateDto);
|
|
||||||
RestTemplate restTemplate = new RestTemplate();
|
|
||||||
ResponseEntity<String> responseEntity = restTemplate.exchange(callBackUrl + "/updateReadState", HttpMethod.POST, requestEntity, String.class);
|
|
||||||
JSONObject object = JSON.parseObject(responseEntity.getBody());
|
|
||||||
if (object == null || object.getInteger("code") == null || object.getInteger("code") != 0) {
|
|
||||||
log.info("修改百度外呼回调数据已读状态失败--id:{},原因:{}", id, object.getString("message"));
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
log.info("修改百度外呼回调数据已读状态成功--id:{}", id);
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public Integer deleteData() {
|
@Override public Integer deleteData() {
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import com.alibaba.fastjson2.JSON;
|
|||||||
import com.alibaba.fastjson2.JSONArray;
|
import com.alibaba.fastjson2.JSONArray;
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.aliyuncs.exceptions.ClientException;
|
import com.aliyuncs.exceptions.ClientException;
|
||||||
|
import com.sun.media.jfxmedia.logging.Logger;
|
||||||
import com.xinelu.common.config.AliYunSmsTwoConfig;
|
import com.xinelu.common.config.AliYunSmsTwoConfig;
|
||||||
import com.xinelu.common.config.SystemBusinessConfig;
|
import com.xinelu.common.config.SystemBusinessConfig;
|
||||||
import com.xinelu.common.constant.*;
|
import com.xinelu.common.constant.*;
|
||||||
@ -12,7 +13,6 @@ import com.xinelu.common.core.redis.RedisCache;
|
|||||||
import com.xinelu.common.enums.*;
|
import com.xinelu.common.enums.*;
|
||||||
import com.xinelu.common.exception.ServiceException;
|
import com.xinelu.common.exception.ServiceException;
|
||||||
import com.xinelu.common.utils.StringUtils;
|
import com.xinelu.common.utils.StringUtils;
|
||||||
import com.xinelu.manage.domain.batchsendtaskinfo.BatchSendTaskInfo;
|
|
||||||
import com.xinelu.manage.domain.patientinfo.PatientInfo;
|
import com.xinelu.manage.domain.patientinfo.PatientInfo;
|
||||||
import com.xinelu.manage.domain.patientquestionoptionresult.PatientQuestionOptionResult;
|
import com.xinelu.manage.domain.patientquestionoptionresult.PatientQuestionOptionResult;
|
||||||
import com.xinelu.manage.domain.patientquestionsubjectresult.PatientQuestionSubjectResult;
|
import com.xinelu.manage.domain.patientquestionsubjectresult.PatientQuestionSubjectResult;
|
||||||
@ -31,7 +31,6 @@ import com.xinelu.manage.domain.textmessage.TextMessage;
|
|||||||
import com.xinelu.manage.dto.aiob.*;
|
import com.xinelu.manage.dto.aiob.*;
|
||||||
import com.xinelu.manage.dto.patientquestionsubmitresult.PatientQuestionSubmitResultDTO;
|
import com.xinelu.manage.dto.patientquestionsubmitresult.PatientQuestionSubmitResultDTO;
|
||||||
import com.xinelu.manage.dto.smssend.SmsInfoDTO;
|
import com.xinelu.manage.dto.smssend.SmsInfoDTO;
|
||||||
import com.xinelu.manage.mapper.batchsendtaskinfo.BatchSendTaskInfoMapper;
|
|
||||||
import com.xinelu.manage.mapper.labelfieldcontent.LabelFieldContentMapper;
|
import com.xinelu.manage.mapper.labelfieldcontent.LabelFieldContentMapper;
|
||||||
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
|
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
|
||||||
import com.xinelu.manage.mapper.patientquestionoptionresult.PatientQuestionOptionResultMapper;
|
import com.xinelu.manage.mapper.patientquestionoptionresult.PatientQuestionOptionResultMapper;
|
||||||
@ -144,8 +143,6 @@ public class AIOBServiceImpl implements IAIOBService {
|
|||||||
private ScriptInfoTaskInfoMapper scriptInfoTaskInfoMapper;
|
private ScriptInfoTaskInfoMapper scriptInfoTaskInfoMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private PatientVisitRecordMapper patientVisitRecordMapper;
|
private PatientVisitRecordMapper patientVisitRecordMapper;
|
||||||
@Resource
|
|
||||||
private BatchSendTaskInfoMapper batchSendTaskInfoMapper;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 获取外呼平台accessToken
|
* @description 获取外呼平台accessToken
|
||||||
@ -369,6 +366,7 @@ public class AIOBServiceImpl implements IAIOBService {
|
|||||||
signPatientManageRouteNode.setNodeFinishStatus(NodeExecuteResultStatusEnum.FAILURE.getInfo());
|
signPatientManageRouteNode.setNodeFinishStatus(NodeExecuteResultStatusEnum.FAILURE.getInfo());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
signPatientManageRouteNode.setPhoneNodeExecuteResultStatus(NodeExecuteResultStatusEnum.SUCCESS.getInfo());
|
signPatientManageRouteNode.setPhoneNodeExecuteResultStatus(NodeExecuteResultStatusEnum.SUCCESS.getInfo());
|
||||||
@ -400,25 +398,24 @@ public class AIOBServiceImpl implements IAIOBService {
|
|||||||
patientTaskExecuteRecord.setPatientId(signPatientManageRoute.getPatientId());
|
patientTaskExecuteRecord.setPatientId(signPatientManageRoute.getPatientId());
|
||||||
patientTaskExecuteRecord.setPatientName(signPatientManageRoute.getPatientName());
|
patientTaskExecuteRecord.setPatientName(signPatientManageRoute.getPatientName());
|
||||||
// 签约记录
|
// 签约记录
|
||||||
SignPatientRecord signPatientRecord = new SignPatientRecord();
|
SignPatientRecord signPatientRecord = signPatientRecordMapper.selectByPrimaryKey(signPatientManageRoute.getSignPatientRecordId());
|
||||||
//针对batch_send_task_info表未签约未存patient_info表处理
|
|
||||||
if (Objects.nonNull(signPatientManageRoute.getSignPatientRecordId())){
|
|
||||||
signPatientRecord = signPatientRecordMapper.selectByPrimaryKey(signPatientManageRoute.getSignPatientRecordId());
|
|
||||||
}
|
|
||||||
if (ObjectUtils.isNotEmpty(signPatientRecord)) {
|
if (ObjectUtils.isNotEmpty(signPatientRecord)) {
|
||||||
patientTaskExecuteRecord.setVisitRecordId(signPatientRecord.getPatientVisitRecordId());
|
patientTaskExecuteRecord.setVisitRecordId(signPatientRecord.getPatientVisitRecordId());
|
||||||
}
|
}
|
||||||
|
|
||||||
// 发送短信
|
// 发送短信
|
||||||
if (needSendSms) {
|
if (needSendSms) {
|
||||||
sendSms(signPatientManageRoute.getPatientId(), signPatientManageRouteNode, signPatientManageRoute.getBatchSendTaskId());
|
//System.out.println("发送短信-------------------------------------------");
|
||||||
|
sendSms(signPatientManageRoute.getPatientId(), signPatientManageRouteNode);
|
||||||
}
|
}
|
||||||
// 重拨
|
// 重拨
|
||||||
if (needRedial) {
|
if (needRedial) {
|
||||||
if (ObjectUtils.isNotEmpty(signPatientRecord)) {
|
if (ObjectUtils.isNotEmpty(signPatientRecord)) {
|
||||||
PatientVisitRecord patientVisitRecord = patientVisitRecordMapper.selectPatientVisitRecordById(signPatientRecord.getPatientVisitRecordId());
|
PatientVisitRecord patientVisitRecord = patientVisitRecordMapper.selectPatientVisitRecordById(signPatientRecord.getPatientVisitRecordId());
|
||||||
redialInfoSave(signPatientManageRouteNode, patientVisitRecord);
|
redialInfoSave(signPatientManageRouteNode, patientVisitRecord);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
redialInfoSave(signPatientManageRouteNode, null);
|
redialInfoSave(signPatientManageRouteNode, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -448,13 +445,11 @@ public class AIOBServiceImpl implements IAIOBService {
|
|||||||
|
|
||||||
phoneDialRecordMapper.insertPhoneDialRecord(phoneDialRecord);
|
phoneDialRecordMapper.insertPhoneDialRecord(phoneDialRecord);
|
||||||
|
|
||||||
// 修改任务统计表数据 添加getPatientId判断针对batch_send_task_info表未签约未存patient_info表处理
|
// 修改任务统计表数据
|
||||||
if (Objects.nonNull(patientTaskExecuteRecord.getPatientId()) && patientTaskExecuteRecordMapper.insertPatientTaskExecuteRecord(patientTaskExecuteRecord) > 0) {
|
if (patientTaskExecuteRecordMapper.insertPatientTaskExecuteRecord(patientTaskExecuteRecord) > 0) {
|
||||||
// 任务统计表修改
|
// 任务统计表修改
|
||||||
if (Objects.nonNull(signPatientManageRoute.getPatientId())){
|
|
||||||
patientTaskStatisticsService.updateNum(signPatientManageRoute.getPatientId(), TaskStatisticsTypeConstants.TASK_EXECUTE_NUM, 1);
|
patientTaskStatisticsService.updateNum(signPatientManageRoute.getPatientId(), TaskStatisticsTypeConstants.TASK_EXECUTE_NUM, 1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//接通状态,1-已接通
|
//接通状态,1-已接通
|
||||||
if (data.getEndType() != null && data.getEndType() == 1) {
|
if (data.getEndType() != null && data.getEndType() == 1) {
|
||||||
@ -508,21 +503,12 @@ public class AIOBServiceImpl implements IAIOBService {
|
|||||||
return obj.getOrDefault("downloadUrl", null).toString();
|
return obj.getOrDefault("downloadUrl", null).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendSms(Long patientId, SignPatientManageRouteNode signPatientManageRouteNode, Long batchSendTaskId) throws ClientException {
|
private void sendSms(Long patientId, SignPatientManageRouteNode signPatientManageRouteNode) throws ClientException {
|
||||||
TextMessage textMessage = textMessageMapper.selectTextMessageById(signPatientManageRouteNode.getPhoneMessageTemplateId());
|
TextMessage textMessage = textMessageMapper.selectTextMessageById(signPatientManageRouteNode.getPhoneMessageTemplateId());
|
||||||
if (ObjectUtils.isNotEmpty(textMessage)) {
|
if (ObjectUtils.isNotEmpty(textMessage)) {
|
||||||
// 发送短信
|
// 发送短信
|
||||||
SmsInfoDTO smsInfoDTO = new SmsInfoDTO();
|
SmsInfoDTO smsInfoDTO = new SmsInfoDTO();
|
||||||
String patientPhone = null;
|
String patientPhone = signPatientManageRouteMapper.selectPatientPhone(patientId);
|
||||||
//添加PatientId判断针对batch_send_task_info表未签约未存patient_info表处理
|
|
||||||
if (Objects.nonNull(patientId)){
|
|
||||||
patientPhone = signPatientManageRouteMapper.selectPatientPhone(patientId);
|
|
||||||
}
|
|
||||||
if (Objects.nonNull(patientId)){
|
|
||||||
//批量推送任务表没有同步到患者表,所以分开查询
|
|
||||||
BatchSendTaskInfo batchSendTaskInfo = batchSendTaskInfoMapper.selectBatchSendTaskInfoById(batchSendTaskId);
|
|
||||||
patientPhone = batchSendTaskInfo.getPatientPhone();
|
|
||||||
}
|
|
||||||
smsInfoDTO.setPhoneNumbers(patientPhone);
|
smsInfoDTO.setPhoneNumbers(patientPhone);
|
||||||
smsInfoDTO.setSignName(aliYunSmsTwoConfig.getSignName());
|
smsInfoDTO.setSignName(aliYunSmsTwoConfig.getSignName());
|
||||||
smsInfoDTO.setTemplateCode(textMessage.getTextMessageId());
|
smsInfoDTO.setTemplateCode(textMessage.getTextMessageId());
|
||||||
|
|||||||
@ -1,91 +0,0 @@
|
|||||||
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.batchsendtaskinfo.BatchSendTaskDto;
|
|
||||||
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(BatchSendTaskDto 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, IllegalAccessException;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 搜素框添加 标签信息
|
|
||||||
*
|
|
||||||
* @return String
|
|
||||||
*/
|
|
||||||
List<String> getPhysicalExaminationLabel();
|
|
||||||
}
|
|
||||||
@ -1,614 +0,0 @@
|
|||||||
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.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.batchsendtasklabelinfo.BatchSendTaskLabelInfo;
|
|
||||||
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.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.batchsendtaskinfo.BatchSendTaskDto;
|
|
||||||
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.batchsendtasklabelinfo.BatchSendTaskLabelInfoMapper;
|
|
||||||
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.scriptInfo.ScriptInfoMapper;
|
|
||||||
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.collections4.ListUtils;
|
|
||||||
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.lang.reflect.Field;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.LocalTime;
|
|
||||||
import java.time.ZoneId;
|
|
||||||
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 BatchSendTaskLabelInfoMapper batchSendTaskLabelInfoMapper;
|
|
||||||
@Resource
|
|
||||||
private ScriptInfoMapper scriptInfoMapper;
|
|
||||||
|
|
||||||
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(BatchSendTaskDto batchSendTaskInfo) {
|
|
||||||
List<BatchSendTaskInfo> batchSendTaskInfos = batchSendTaskInfoMapper.selectBatchSendTaskInfoList(batchSendTaskInfo);
|
|
||||||
if (CollectionUtils.isEmpty(batchSendTaskInfos)) {
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
for (BatchSendTaskInfo sendTaskInfo : batchSendTaskInfos) {
|
|
||||||
if (sendTaskInfo.getPersonnelType().equals(PersonnelTypeEnum.DISCHARGED.getCode())) {
|
|
||||||
sendTaskInfo.setPersonnelType(PersonnelTypeEnum.DISCHARGED.getInfo());
|
|
||||||
}
|
|
||||||
if (sendTaskInfo.getPersonnelType().equals(PersonnelTypeEnum.OUTPATIENT.getCode())) {
|
|
||||||
sendTaskInfo.setPersonnelType(PersonnelTypeEnum.OUTPATIENT.getInfo());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sendTaskInfo.getPersonnelType().equals(PersonnelTypeEnum.IN_HOSPITAL.getCode())) {
|
|
||||||
sendTaskInfo.setPersonnelType(PersonnelTypeEnum.IN_HOSPITAL.getInfo());
|
|
||||||
}
|
|
||||||
if (sendTaskInfo.getPersonnelType().equals(PersonnelTypeEnum.PHYSICAL_EXAMINATION.getCode())) {
|
|
||||||
sendTaskInfo.setPersonnelType(PersonnelTypeEnum.PHYSICAL_EXAMINATION.getInfo());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return batchSendTaskInfos;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增批量推送任务信息
|
|
||||||
*
|
|
||||||
* @param batchSendTaskInfo 批量推送任务信息
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int insertBatchSendTaskInfo(BatchSendTaskInfo batchSendTaskInfo) {
|
|
||||||
batchSendTaskInfo.setCreateTime(LocalDateTime.now());
|
|
||||||
if (batchSendTaskInfo.getPersonnelType().equals(PersonnelTypeEnum.DISCHARGED.getInfo())) {
|
|
||||||
batchSendTaskInfo.setPersonnelType(PersonnelTypeEnum.DISCHARGED.getCode());
|
|
||||||
}
|
|
||||||
if (batchSendTaskInfo.getPersonnelType().equals(PersonnelTypeEnum.OUTPATIENT.getInfo())) {
|
|
||||||
batchSendTaskInfo.setPersonnelType(PersonnelTypeEnum.OUTPATIENT.getCode());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (batchSendTaskInfo.getPersonnelType().equals(PersonnelTypeEnum.IN_HOSPITAL.getInfo())) {
|
|
||||||
batchSendTaskInfo.setPersonnelType(PersonnelTypeEnum.IN_HOSPITAL.getCode());
|
|
||||||
}
|
|
||||||
if (batchSendTaskInfo.getPersonnelType().equals(PersonnelTypeEnum.PHYSICAL_EXAMINATION.getInfo())) {
|
|
||||||
batchSendTaskInfo.setPersonnelType(PersonnelTypeEnum.PHYSICAL_EXAMINATION.getCode());
|
|
||||||
}
|
|
||||||
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.getPersonnelType())).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"));
|
|
||||||
List<String> stringList = new ArrayList<>();
|
|
||||||
//遍历塞值
|
|
||||||
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);
|
|
||||||
batchSendTaskInfo.setVisitDate(batchSendTaskInfo.getVisitTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime());
|
|
||||||
if (batchSendTaskInfo.getPersonnelType().equals(PersonnelTypeEnum.DISCHARGED.getInfo())) {
|
|
||||||
batchSendTaskInfo.setPersonnelType(PersonnelTypeEnum.DISCHARGED.getCode());
|
|
||||||
}
|
|
||||||
if (batchSendTaskInfo.getPersonnelType().equals(PersonnelTypeEnum.OUTPATIENT.getInfo())) {
|
|
||||||
batchSendTaskInfo.setPersonnelType(PersonnelTypeEnum.OUTPATIENT.getCode());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (batchSendTaskInfo.getPersonnelType().equals(PersonnelTypeEnum.IN_HOSPITAL.getInfo())) {
|
|
||||||
batchSendTaskInfo.setPersonnelType(PersonnelTypeEnum.IN_HOSPITAL.getCode());
|
|
||||||
}
|
|
||||||
if (batchSendTaskInfo.getPersonnelType().equals(PersonnelTypeEnum.PHYSICAL_EXAMINATION.getInfo())) {
|
|
||||||
batchSendTaskInfo.setPersonnelType(PersonnelTypeEnum.PHYSICAL_EXAMINATION.getCode());
|
|
||||||
}
|
|
||||||
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());
|
|
||||||
stringList.addAll(Arrays.asList(strings));
|
|
||||||
String result = Arrays.toString(strings).replaceAll("^\\[|\\]$", "");
|
|
||||||
batchSendTaskInfo.setPhysicalExaminationLabel(result);
|
|
||||||
if (batchSendTaskInfo.getPhysicalExaminationSummary().length() > 999) {
|
|
||||||
batchSendTaskInfo.setPhysicalExaminationSummary(batchSendTaskInfo.getPhysicalExaminationSummary().substring(0, 999));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//处理标签
|
|
||||||
List<BatchSendTaskLabelInfo> batchSendTaskLabelInfos = batchSendTaskLabelInfoMapper.selectBatchSendTaskLabelInfoList(null);
|
|
||||||
List<String> data = batchSendTaskLabelInfos.stream().filter(Objects::nonNull).map(BatchSendTaskLabelInfo::getPhysicalExaminationLabel).collect(Collectors.toList());
|
|
||||||
List<String> collect1 = stringList.stream().filter(Objects::nonNull).distinct().collect(Collectors.toList());
|
|
||||||
List<String> subtract = ListUtils.subtract(collect1, data);
|
|
||||||
if (CollectionUtils.isNotEmpty(subtract)) {
|
|
||||||
batchSendTaskLabelInfoMapper.insertBatchSendTaskLabelInfList(subtract);
|
|
||||||
}
|
|
||||||
batchSendTaskInfoMapper.insertBatchSendTaskInfoList(list);
|
|
||||||
return AjaxResult.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建批量推送任务
|
|
||||||
*
|
|
||||||
* @param batchSendTaskRecordDto 任务信息
|
|
||||||
* @return AjaxResult
|
|
||||||
* @throws ClientException
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public AjaxResult batchSend(BatchSendTaskRecordDto batchSendTaskRecordDto) throws ClientException, IllegalAccessException {
|
|
||||||
log.info("开始创建批量推送任务---------------");
|
|
||||||
//新增批量推送任务记录
|
|
||||||
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(batchSendTaskRecordDto.getRobotPublishId());
|
|
||||||
}
|
|
||||||
batchSendTaskRecordInfo.setNodeExecuteStatus(NodeExecuteStatusEnum.EXECUTING.getInfo());
|
|
||||||
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());
|
|
||||||
batchSendTaskRecordInfo.setPhysicalExaminationLabel(batchSendTaskRecordDto.getPhysicalExaminationLabel());
|
|
||||||
batchSendTaskRecordInfo.setDelFlag(0);
|
|
||||||
//保存短信变量
|
|
||||||
List<BatchSendTaskVariableInfo> batchSendTaskVariableInfos = new ArrayList<>();
|
|
||||||
if (Objects.nonNull(batchSendTaskRecordDto.getVars()) && batchSendTaskRecordDto.getBatchTaskSource().equals(BillSourceEnum.MESSAGE.getInfo())) {
|
|
||||||
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);
|
|
||||||
batchSendTaskRecordDto.setMessageNodeContent(batchSendTaskRecordDto.getMessageNodeContent().replace("${ " + key + "}", batchSendTaskRecordDto.getVars().get(key)));
|
|
||||||
batchSendTaskRecordInfo.setNodeContent(batchSendTaskRecordDto.getMessageNodeContent());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
int insertBatchSendTaskRecord = batchSendTaskRecordInfoMapper.insertBatchSendTaskRecordInfo(batchSendTaskRecordInfo);
|
|
||||||
if (insertBatchSendTaskRecord <= 0) {
|
|
||||||
log.info("新增批量推送任务记录失败");
|
|
||||||
return AjaxResult.error("上传任务失败!请联系管理员!");
|
|
||||||
}
|
|
||||||
List<SignPatientManageRoute> signPatientManageRoutes = new ArrayList<>();
|
|
||||||
List<SignPatientManageRouteNode> signPatientManageRouteNodes = new ArrayList<>();
|
|
||||||
String[] keys = new String[0];
|
|
||||||
if (batchSendTaskRecordDto.getBatchTaskSource().equals(BillSourceEnum.TELEPHONE.getInfo())) {
|
|
||||||
String s1 = scriptInfoMapper.selectVariablesByRobotPublishId(batchSendTaskRecordDto.getRobotPublishId());
|
|
||||||
keys = s1.split("\\|");
|
|
||||||
}
|
|
||||||
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.setTaskExcuteType(TaskExcuteTypeEnum.BATCH_TASK.getInfo());
|
|
||||||
signPatientManageRouteNode.setNodePlanTime(batchSendTaskRecordDto.getNodePlanTime());
|
|
||||||
if (batchSendTaskRecordDto.getBatchTaskSource().equals(BillSourceEnum.TELEPHONE.getInfo())) {
|
|
||||||
signPatientManageRouteNode.setDialStatus(DialStatusEnum.NODIALED.getInfo());
|
|
||||||
signPatientManageRouteNode.setTaskNodeType(TaskNodeTypeEnum.PHONE_OUTBOUND.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.setTaskNodeType(TaskNodeTypeEnum.TEXT_REMIND.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);
|
|
||||||
//电话变量
|
|
||||||
if (batchSendTaskRecordDto.getBatchTaskSource().equals(BillSourceEnum.TELEPHONE.getInfo())) {
|
|
||||||
for (String key : keys) {
|
|
||||||
// 获取对象的Class对象
|
|
||||||
Class<?> objClass = batchSendTaskInfo.getClass();
|
|
||||||
// 获取所有属性
|
|
||||||
Field[] fields = objClass.getDeclaredFields();
|
|
||||||
//匹配属性名
|
|
||||||
Field field = Arrays.stream(fields).filter(Objects::nonNull).filter(s -> Objects.equals(s.getName().toUpperCase(), key.replaceAll("_", "").toUpperCase())).findFirst().orElse(null);
|
|
||||||
if (Objects.isNull(field)) {
|
|
||||||
return AjaxResult.error("该模板变量" + key + "不存在!");
|
|
||||||
}
|
|
||||||
BatchSendTaskVariableInfo batchSendTaskVariableInfo = new BatchSendTaskVariableInfo();
|
|
||||||
batchSendTaskVariableInfo.setBatchSendTaskRecordId(batchSendTaskRecordInfo.getId());
|
|
||||||
batchSendTaskVariableInfo.setBatchSendTaskId(batchSendTaskInfo.getId());
|
|
||||||
batchSendTaskVariableInfo.setVariable(key);
|
|
||||||
// 设置可以访问私有变量
|
|
||||||
field.setAccessible(true);
|
|
||||||
batchSendTaskVariableInfo.setVariableAttribute(field.get(batchSendTaskInfo).toString());
|
|
||||||
batchSendTaskVariableInfo.setCreateBy(SecurityUtils.getUsername());
|
|
||||||
batchSendTaskRecordInfo.setCreateTime(LocalDateTime.now());
|
|
||||||
batchSendTaskVariableInfos.add(batchSendTaskVariableInfo);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//新增节点表主表
|
|
||||||
signPatientManageRouteMapper.insertBatch(signPatientManageRoutes);
|
|
||||||
//筛如节点表主表id
|
|
||||||
for (int i = 0; i < signPatientManageRouteNodes.size(); i++) {
|
|
||||||
signPatientManageRouteNodes.get(i).setManageRouteId(signPatientManageRoutes.get(i).getId());
|
|
||||||
}
|
|
||||||
//新增节点明细表
|
|
||||||
signPatientManageRouteNodeMapper.insertBatch(signPatientManageRouteNodes);
|
|
||||||
//新增变量表
|
|
||||||
if (CollectionUtils.isNotEmpty(batchSendTaskVariableInfos)) {
|
|
||||||
batchSendTaskVariableInfoMapper.insertBatchSendTaskVariableInfos(batchSendTaskVariableInfos);
|
|
||||||
}
|
|
||||||
//电话推送
|
|
||||||
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;
|
|
||||||
LocalTime localEndTime;
|
|
||||||
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().plusDays(2).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().toString());
|
|
||||||
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());
|
|
||||||
List<BatchSendTaskVariableInfo> batchSendTaskVariableList = batchSendTaskVariableInfos.stream().filter(Objects::nonNull).filter(item -> item.getBatchSendTaskId().equals(batchSendTaskInfo.getId())).collect(Collectors.toList());
|
|
||||||
//校验手机号
|
|
||||||
if (StringUtils.isNotBlank(batchSendTaskInfo.getPatientPhone())) {
|
|
||||||
if (regexUtil.regexPhone(batchSendTaskInfo.getPatientPhone())) {
|
|
||||||
customerInfoDto.setMobile(batchSendTaskInfo.getPatientPhone());
|
|
||||||
// 处理变量
|
|
||||||
JSONObject jsonObject = new JSONObject();
|
|
||||||
if (CollectionUtils.isNotEmpty(batchSendTaskVariableList)) {
|
|
||||||
batchSendTaskVariableList.forEach(variable -> {
|
|
||||||
jsonObject.fluentPut(variable.getVariable(), ObjectUtils.isEmpty(variable.getVariableAttribute()) ? "" : variable.getVariableAttribute());
|
|
||||||
});
|
|
||||||
}
|
|
||||||
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())) {
|
|
||||||
log.info("创建批量短信推送任务---------------");
|
|
||||||
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> keySet = batchSendTaskRecordDto.getVars().keySet();
|
|
||||||
keySet.forEach(variable -> {
|
|
||||||
jsonObject.fluentPut(variable, ObjectUtils.isEmpty(batchSendTaskRecordDto.getVars().get(variable)) ? "" : batchSendTaskRecordDto.getVars().get(variable));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
smsInfoDTO.setTemplateParam(jsonObject);
|
|
||||||
// 根据模版id发送
|
|
||||||
smsInfoDTO.setTemplateCode(batchSendTaskRecordDto.getMessageTemplateCode());
|
|
||||||
smsInfoDTO.setOutId(batchSendTaskRecordInfo.getId().toString());
|
|
||||||
Boolean aBoolean = sendSms(smsInfoDTO);
|
|
||||||
if (!aBoolean) {
|
|
||||||
return AjaxResult.error("短信上传失败");
|
|
||||||
}
|
|
||||||
log.info("创建批量短信推送任务执行完成......");
|
|
||||||
return AjaxResult.success("短信上传成功");
|
|
||||||
}
|
|
||||||
return AjaxResult.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 搜素框添加 标签信息
|
|
||||||
*
|
|
||||||
* @return String
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<String> getPhysicalExaminationLabel() {
|
|
||||||
List<BatchSendTaskLabelInfo> batchSendTaskLabelInfos = batchSendTaskLabelInfoMapper.selectBatchSendTaskLabelInfoList(null);
|
|
||||||
if (CollectionUtils.isEmpty(batchSendTaskLabelInfos)) {
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return batchSendTaskLabelInfos.stream().filter(Objects::nonNull).map(BatchSendTaskLabelInfo::getPhysicalExaminationLabel).collect(Collectors.toList());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 变量替换值,发送短信
|
|
||||||
*/
|
|
||||||
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(aliYunSmsTwoConfig.getRegionId(), aliYunSmsTwoConfig.getAccessKeyId(), aliYunSmsTwoConfig.getAccessKeySecret());
|
|
||||||
DefaultProfile.addEndpoint(aliYunSmsTwoConfig.getRegionId(), aliYunSmsTwoConfig.getProduct(), aliYunSmsTwoConfig.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());
|
|
||||||
request.setOutId(smsInfoDTO.getOutId());
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,62 +0,0 @@
|
|||||||
package com.xinelu.manage.service.batchsendtasklabelinfo;
|
|
||||||
|
|
||||||
import com.xinelu.manage.domain.batchsendtasklabelinfo.BatchSendTaskLabelInfo;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量推送任务标签信息表Service接口
|
|
||||||
*
|
|
||||||
* @author xinelu
|
|
||||||
* @date 2026-04-29
|
|
||||||
*/
|
|
||||||
public interface IBatchSendTaskLabelInfoService {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询批量推送任务标签信息表
|
|
||||||
*
|
|
||||||
* @param id 批量推送任务标签信息表主键
|
|
||||||
* @return 批量推送任务标签信息表
|
|
||||||
*/
|
|
||||||
BatchSendTaskLabelInfo selectBatchSendTaskLabelInfoById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询批量推送任务标签信息表列表
|
|
||||||
*
|
|
||||||
* @param batchSendTaskLabelInfo 批量推送任务标签信息表
|
|
||||||
* @return 批量推送任务标签信息表集合
|
|
||||||
*/
|
|
||||||
List<BatchSendTaskLabelInfo> selectBatchSendTaskLabelInfoList(BatchSendTaskLabelInfo batchSendTaskLabelInfo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增批量推送任务标签信息表
|
|
||||||
*
|
|
||||||
* @param batchSendTaskLabelInfo 批量推送任务标签信息表
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
int insertBatchSendTaskLabelInfo(BatchSendTaskLabelInfo batchSendTaskLabelInfo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改批量推送任务标签信息表
|
|
||||||
*
|
|
||||||
* @param batchSendTaskLabelInfo 批量推送任务标签信息表
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
int updateBatchSendTaskLabelInfo(BatchSendTaskLabelInfo batchSendTaskLabelInfo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除批量推送任务标签信息表
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的批量推送任务标签信息表主键集合
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
int deleteBatchSendTaskLabelInfoByIds(Long[] ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除批量推送任务标签信息表信息
|
|
||||||
*
|
|
||||||
* @param id 批量推送任务标签信息表主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
int deleteBatchSendTaskLabelInfoById(Long id);
|
|
||||||
}
|
|
||||||
@ -1,87 +0,0 @@
|
|||||||
package com.xinelu.manage.service.batchsendtasklabelinfo.impl;
|
|
||||||
|
|
||||||
import com.xinelu.manage.domain.batchsendtasklabelinfo.BatchSendTaskLabelInfo;
|
|
||||||
import com.xinelu.manage.mapper.batchsendtasklabelinfo.BatchSendTaskLabelInfoMapper;
|
|
||||||
import com.xinelu.manage.service.batchsendtasklabelinfo.IBatchSendTaskLabelInfoService;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量推送任务标签信息表Service业务层处理
|
|
||||||
*
|
|
||||||
* @author xinelu
|
|
||||||
* @date 2026-04-29
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class BatchSendTaskLabelInfoServiceImpl implements IBatchSendTaskLabelInfoService {
|
|
||||||
@Resource
|
|
||||||
private BatchSendTaskLabelInfoMapper batchSendTaskLabelInfoMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询批量推送任务标签信息表
|
|
||||||
*
|
|
||||||
* @param id 批量推送任务标签信息表主键
|
|
||||||
* @return 批量推送任务标签信息表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public BatchSendTaskLabelInfo selectBatchSendTaskLabelInfoById(Long id) {
|
|
||||||
return batchSendTaskLabelInfoMapper.selectBatchSendTaskLabelInfoById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询批量推送任务标签信息表列表
|
|
||||||
*
|
|
||||||
* @param batchSendTaskLabelInfo 批量推送任务标签信息表
|
|
||||||
* @return 批量推送任务标签信息表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<BatchSendTaskLabelInfo> selectBatchSendTaskLabelInfoList(BatchSendTaskLabelInfo batchSendTaskLabelInfo) {
|
|
||||||
return batchSendTaskLabelInfoMapper.selectBatchSendTaskLabelInfoList(batchSendTaskLabelInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增批量推送任务标签信息表
|
|
||||||
*
|
|
||||||
* @param batchSendTaskLabelInfo 批量推送任务标签信息表
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int insertBatchSendTaskLabelInfo(BatchSendTaskLabelInfo batchSendTaskLabelInfo) {
|
|
||||||
return batchSendTaskLabelInfoMapper.insertBatchSendTaskLabelInfo(batchSendTaskLabelInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改批量推送任务标签信息表
|
|
||||||
*
|
|
||||||
* @param batchSendTaskLabelInfo 批量推送任务标签信息表
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int updateBatchSendTaskLabelInfo(BatchSendTaskLabelInfo batchSendTaskLabelInfo) {
|
|
||||||
return batchSendTaskLabelInfoMapper.updateBatchSendTaskLabelInfo(batchSendTaskLabelInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除批量推送任务标签信息表
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的批量推送任务标签信息表主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int deleteBatchSendTaskLabelInfoByIds(Long[] ids) {
|
|
||||||
return batchSendTaskLabelInfoMapper.deleteBatchSendTaskLabelInfoByIds(ids);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除批量推送任务标签信息表信息
|
|
||||||
*
|
|
||||||
* @param id 批量推送任务标签信息表主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int deleteBatchSendTaskLabelInfoById(Long id) {
|
|
||||||
return batchSendTaskLabelInfoMapper.deleteBatchSendTaskLabelInfoById(id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,71 +0,0 @@
|
|||||||
package com.xinelu.manage.service.batchsendtaskrecordinfo;
|
|
||||||
|
|
||||||
import com.xinelu.manage.domain.batchsendtaskrecordinfo.BatchSendTaskRecordInfo;
|
|
||||||
import com.xinelu.manage.vo.batchsendtaskrecordinfo.BatchSendTaskRecordVo;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量推送任务记录Service接口
|
|
||||||
*
|
|
||||||
* @author zh
|
|
||||||
* @date 2026-04-26
|
|
||||||
*/
|
|
||||||
public interface IBatchSendTaskRecordInfoService {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询批量推送任务记录
|
|
||||||
*
|
|
||||||
* @param id 批量推送任务记录主键
|
|
||||||
* @return 批量推送任务记录
|
|
||||||
*/
|
|
||||||
BatchSendTaskRecordVo 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);
|
|
||||||
}
|
|
||||||
@ -1,161 +0,0 @@
|
|||||||
package com.xinelu.manage.service.batchsendtaskrecordinfo.impl;
|
|
||||||
|
|
||||||
import com.xinelu.common.annotation.DataScope;
|
|
||||||
import com.xinelu.common.enums.BillSourceEnum;
|
|
||||||
import com.xinelu.common.enums.NodeExecuteStatusEnum;
|
|
||||||
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.batchsendtaskrecordinfo.BatchSendTaskRecordVo;
|
|
||||||
import com.xinelu.manage.vo.textmessage.TextMessageVO;
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.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 BatchSendTaskRecordVo selectBatchSendTaskRecordInfoById(Long id) {
|
|
||||||
return batchSendTaskRecordInfoMapper.selectBatchSendTaskRecordVoById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询批量推送任务记录列表
|
|
||||||
*
|
|
||||||
* @param batchSendTaskRecordInfo 批量推送任务记录
|
|
||||||
* @return 批量推送任务记录
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<BatchSendTaskRecordInfo> selectBatchSendTaskRecordInfoList(BatchSendTaskRecordInfo batchSendTaskRecordInfo) {
|
|
||||||
List<BatchSendTaskRecordInfo> batchSendTaskRecordInfos = batchSendTaskRecordInfoMapper.selectBatchSendTaskRecordInfoList(batchSendTaskRecordInfo);
|
|
||||||
if (CollectionUtils.isEmpty(batchSendTaskRecordInfos)) {
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
for (BatchSendTaskRecordInfo sendTaskRecordInfo : batchSendTaskRecordInfos) {
|
|
||||||
if (StringUtils.isNotBlank(sendTaskRecordInfo.getNodeExecuteStatus()) && sendTaskRecordInfo.getNodeExecuteStatus().equals(NodeExecuteStatusEnum.EXECUTED.getInfo())) {
|
|
||||||
sendTaskRecordInfo.setNodeExecuteStatus(NodeExecuteStatusEnum.EXECUTED.getCode());
|
|
||||||
}
|
|
||||||
if (StringUtils.isNotBlank(sendTaskRecordInfo.getNodeExecuteStatus()) && sendTaskRecordInfo.getNodeExecuteStatus().equals(NodeExecuteStatusEnum.UNEXECUTED.getInfo())) {
|
|
||||||
sendTaskRecordInfo.setNodeExecuteStatus(NodeExecuteStatusEnum.UNEXECUTED.getCode());
|
|
||||||
}
|
|
||||||
if (StringUtils.isNotBlank(sendTaskRecordInfo.getNodeExecuteStatus()) && sendTaskRecordInfo.getNodeExecuteStatus().equals(NodeExecuteStatusEnum.EXECUTING.getInfo())) {
|
|
||||||
sendTaskRecordInfo.setNodeExecuteStatus(NodeExecuteStatusEnum.EXECUTING.getCode());
|
|
||||||
}
|
|
||||||
if (StringUtils.isNotBlank(sendTaskRecordInfo.getBatchTaskSource()) && sendTaskRecordInfo.getBatchTaskSource().equals(BillSourceEnum.TELEPHONE.getInfo())) {
|
|
||||||
sendTaskRecordInfo.setBatchTaskSource(BillSourceEnum.TELEPHONE.getCode());
|
|
||||||
}
|
|
||||||
if (StringUtils.isNotBlank(sendTaskRecordInfo.getBatchTaskSource()) && sendTaskRecordInfo.getBatchTaskSource().equals(BillSourceEnum.MESSAGE.getInfo())) {
|
|
||||||
sendTaskRecordInfo.setBatchTaskSource(BillSourceEnum.MESSAGE.getCode());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return batchSendTaskRecordInfos;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增批量推送任务记录
|
|
||||||
*
|
|
||||||
* @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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,61 +0,0 @@
|
|||||||
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);
|
|
||||||
}
|
|
||||||
@ -1,89 +0,0 @@
|
|||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,70 +0,0 @@
|
|||||||
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);
|
|
||||||
}
|
|
||||||
@ -1,130 +0,0 @@
|
|||||||
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,18 +1,13 @@
|
|||||||
package com.xinelu.manage.service.homepage.impl;
|
package com.xinelu.manage.service.homepage.impl;
|
||||||
|
|
||||||
import com.xinelu.common.core.domain.entity.SysUser;
|
|
||||||
import com.xinelu.common.enums.NodeExecuteStatusEnum;
|
import com.xinelu.common.enums.NodeExecuteStatusEnum;
|
||||||
import com.xinelu.common.enums.PhoneDialMethodEnum;
|
import com.xinelu.common.enums.PhoneDialMethodEnum;
|
||||||
import com.xinelu.common.utils.SecurityUtils;
|
|
||||||
import com.xinelu.manage.domain.agency.Agency;
|
|
||||||
import com.xinelu.manage.mapper.agency.AgencyMapper;
|
|
||||||
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
|
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
|
||||||
import com.xinelu.manage.mapper.patientprehospitalization.PatientPreHospitalizationMapper;
|
import com.xinelu.manage.mapper.patientprehospitalization.PatientPreHospitalizationMapper;
|
||||||
import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper;
|
import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper;
|
||||||
import com.xinelu.manage.mapper.signpatientrecord.SignPatientRecordMapper;
|
import com.xinelu.manage.mapper.signpatientrecord.SignPatientRecordMapper;
|
||||||
import com.xinelu.manage.service.homepage.SystemHomePageService;
|
import com.xinelu.manage.service.homepage.SystemHomePageService;
|
||||||
import com.xinelu.manage.vo.homepage.*;
|
import com.xinelu.manage.vo.homepage.*;
|
||||||
import com.xinelu.system.mapper.SysUserMapper;
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@ -43,10 +38,6 @@ public class SystemHomePageServiceImpl implements SystemHomePageService {
|
|||||||
private SignPatientManageRouteNodeMapper signPatientManageRouteNodeMapper;
|
private SignPatientManageRouteNodeMapper signPatientManageRouteNodeMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private SignPatientRecordMapper signPatientRecordMapper;
|
private SignPatientRecordMapper signPatientRecordMapper;
|
||||||
@Resource
|
|
||||||
private SysUserMapper sysUserMapper;
|
|
||||||
@Resource
|
|
||||||
private AgencyMapper agencyMapper;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 顶部统计
|
* 顶部统计
|
||||||
@ -56,31 +47,23 @@ public class SystemHomePageServiceImpl implements SystemHomePageService {
|
|||||||
@Override
|
@Override
|
||||||
public TopStatisticsVO topStatistics() {
|
public TopStatisticsVO topStatistics() {
|
||||||
LocalDate now = LocalDate.now();
|
LocalDate now = LocalDate.now();
|
||||||
Long hospitalAgencyId = null;
|
|
||||||
SysUser sysUser = sysUserMapper.selectUserById(SecurityUtils.getUserId());
|
|
||||||
if(Objects.nonNull(sysUser.getHospitalAgencyId())){
|
|
||||||
Agency agency = agencyMapper.selectAgencyById(sysUser.getHospitalAgencyId());
|
|
||||||
if (Objects.nonNull(agency.getId())){
|
|
||||||
hospitalAgencyId = agency.getId();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
TopStatisticsVO topStatisticsVO = new TopStatisticsVO();
|
TopStatisticsVO topStatisticsVO = new TopStatisticsVO();
|
||||||
//本月第一天
|
//本月第一天
|
||||||
LocalDate firstDay = now.with(TemporalAdjusters.firstDayOfMonth());
|
LocalDate firstDay = now.with(TemporalAdjusters.firstDayOfMonth());
|
||||||
//本月患者数量
|
//本月患者数量
|
||||||
int createPatientCount = patientInfoMapper.getPatientInfoCountByCreateTime(firstDay, now, hospitalAgencyId);
|
int createPatientCount = patientInfoMapper.getPatientInfoCountByCreateTime(firstDay, now);
|
||||||
//本月预住院数量
|
//本月预住院数量
|
||||||
int patientPreHospitalizationCount = patientPreHospitalizationMapper.getPatientPreHospitalizationCountByCreateTime(firstDay, now, hospitalAgencyId);
|
int patientPreHospitalizationCount = patientPreHospitalizationMapper.getPatientPreHospitalizationCountByCreateTime(firstDay, now);
|
||||||
//本月患者数
|
//本月患者数
|
||||||
topStatisticsVO.setThisMonthPatient(createPatientCount + patientPreHospitalizationCount);
|
topStatisticsVO.setThisMonthPatient(createPatientCount + patientPreHospitalizationCount);
|
||||||
//本月本月出院患者数 统计门诊/出院的 患者数量
|
//本月本月出院患者数 统计门诊/出院的 患者数量
|
||||||
topStatisticsVO.setThisMonthDischargePatient(createPatientCount);
|
topStatisticsVO.setThisMonthDischargePatient(createPatientCount);
|
||||||
//本月签约数
|
//本月签约数
|
||||||
topStatisticsVO.setSignPatientCount(patientInfoMapper.selectPatientInfoCountBySignTime(firstDay, now, hospitalAgencyId));
|
topStatisticsVO.setSignPatientCount(patientInfoMapper.selectPatientInfoCountBySignTime(firstDay, now));
|
||||||
//本月任务数
|
//本月任务数
|
||||||
topStatisticsVO.setNodeCount(signPatientManageRouteNodeMapper.selectNodeCountByCreateTime(firstDay, now));
|
topStatisticsVO.setNodeCount(signPatientManageRouteNodeMapper.selectNodeCountByCreateTime(firstDay, now));
|
||||||
//已签约总数
|
//已签约总数
|
||||||
topStatisticsVO.setPatientSignCount(patientInfoMapper.selectPatientSignTotalCount(hospitalAgencyId));
|
topStatisticsVO.setPatientSignCount(patientInfoMapper.selectPatientSignTotalCount());
|
||||||
//服务中患者数
|
//服务中患者数
|
||||||
topStatisticsVO.setPatientSignServiceCount(patientInfoMapper.selectPatientSignServiceCount());
|
topStatisticsVO.setPatientSignServiceCount(patientInfoMapper.selectPatientSignServiceCount());
|
||||||
return topStatisticsVO;
|
return topStatisticsVO;
|
||||||
@ -94,14 +77,6 @@ public class SystemHomePageServiceImpl implements SystemHomePageService {
|
|||||||
@Override
|
@Override
|
||||||
public List<SignPatientCount> signPatientCount() {
|
public List<SignPatientCount> signPatientCount() {
|
||||||
//时间集合
|
//时间集合
|
||||||
Long hospitalAgencyId = null;
|
|
||||||
SysUser sysUser = sysUserMapper.selectUserById(SecurityUtils.getUserId());
|
|
||||||
if(Objects.nonNull(sysUser.getHospitalAgencyId())){
|
|
||||||
Agency agency = agencyMapper.selectAgencyById(sysUser.getHospitalAgencyId());
|
|
||||||
if (Objects.nonNull(agency.getId())){
|
|
||||||
hospitalAgencyId = agency.getId();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
List<LocalDate> localDates = new ArrayList<>();
|
List<LocalDate> localDates = new ArrayList<>();
|
||||||
List<SignPatientCount> signPatientCounts = new ArrayList<>();
|
List<SignPatientCount> signPatientCounts = new ArrayList<>();
|
||||||
LocalDate now = LocalDate.now();
|
LocalDate now = LocalDate.now();
|
||||||
@ -115,11 +90,11 @@ public class SystemHomePageServiceImpl implements SystemHomePageService {
|
|||||||
LocalDate firstDay = localDate.with(TemporalAdjusters.firstDayOfMonth());
|
LocalDate firstDay = localDate.with(TemporalAdjusters.firstDayOfMonth());
|
||||||
LocalDate lastDay = localDate.with(TemporalAdjusters.lastDayOfMonth());
|
LocalDate lastDay = localDate.with(TemporalAdjusters.lastDayOfMonth());
|
||||||
//患者数量
|
//患者数量
|
||||||
int createPatientCount = patientInfoMapper.getPatientInfoCountByCreateTime(firstDay, lastDay,hospitalAgencyId);
|
int createPatientCount = patientInfoMapper.getPatientInfoCountByCreateTime(firstDay, lastDay);
|
||||||
int patientPreHospitalizationCount = patientPreHospitalizationMapper.getPatientPreHospitalizationCountByCreateTime(firstDay, lastDay,hospitalAgencyId);
|
int patientPreHospitalizationCount = patientPreHospitalizationMapper.getPatientPreHospitalizationCountByCreateTime(firstDay, lastDay);
|
||||||
int i = patientInfoMapper.selectPatientInfoCountBySignTime(firstDay, lastDay,hospitalAgencyId);
|
int i = patientInfoMapper.selectPatientInfoCountBySignTime(firstDay, lastDay);
|
||||||
//签约
|
//签约
|
||||||
int signPatient = patientInfoMapper.selectPatientInfoCountBySignTime(firstDay, now,hospitalAgencyId);
|
int signPatient = patientInfoMapper.selectPatientInfoCountBySignTime(firstDay, now);
|
||||||
signPatientCount.setTime(localDate);
|
signPatientCount.setTime(localDate);
|
||||||
signPatientCount.setPatientCount(createPatientCount + patientPreHospitalizationCount);
|
signPatientCount.setPatientCount(createPatientCount + patientPreHospitalizationCount);
|
||||||
signPatientCount.setSignPatientCount(signPatient);
|
signPatientCount.setSignPatientCount(signPatient);
|
||||||
@ -174,14 +149,6 @@ public class SystemHomePageServiceImpl implements SystemHomePageService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<TaskSituation> taskSituation() {
|
public List<TaskSituation> taskSituation() {
|
||||||
Long hospitalAgencyId = null;
|
|
||||||
SysUser sysUser = sysUserMapper.selectUserById(SecurityUtils.getUserId());
|
|
||||||
if(Objects.nonNull(sysUser.getHospitalAgencyId())){
|
|
||||||
Agency agency = agencyMapper.selectAgencyById(sysUser.getHospitalAgencyId());
|
|
||||||
if (Objects.nonNull(agency.getId())){
|
|
||||||
hospitalAgencyId = agency.getId();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
LocalDate now = LocalDate.now();
|
LocalDate now = LocalDate.now();
|
||||||
List<TaskSituation> taskSituations = new ArrayList<>();
|
List<TaskSituation> taskSituations = new ArrayList<>();
|
||||||
//未审核
|
//未审核
|
||||||
@ -189,7 +156,7 @@ public class SystemHomePageServiceImpl implements SystemHomePageService {
|
|||||||
//全部
|
//全部
|
||||||
int signTimeCount = signPatientRecordMapper.selectCheckStatus(null, "SERVICE_CENTER");
|
int signTimeCount = signPatientRecordMapper.selectCheckStatus(null, "SERVICE_CENTER");
|
||||||
//任务
|
//任务
|
||||||
List<PatientAndNode> patientAndNodes = signPatientManageRouteNodeMapper.selectNodeExecuteStatus(hospitalAgencyId);
|
List<PatientAndNode> patientAndNodes = signPatientManageRouteNodeMapper.selectNodeExecuteStatus();
|
||||||
//未审核
|
//未审核
|
||||||
int unExecutedCount = 0;
|
int unExecutedCount = 0;
|
||||||
//全部
|
//全部
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
package com.xinelu.manage.service.phonedialrecord;
|
package com.xinelu.manage.service.phonedialrecord;
|
||||||
|
|
||||||
import com.xinelu.manage.domain.phonedialrecord.PhoneDialRecord;
|
import com.xinelu.manage.domain.phonedialrecord.PhoneDialRecord;
|
||||||
import com.xinelu.manage.vo.phonedialrecord.BillPhoneDialVo;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -26,7 +25,7 @@ public interface IPhoneDialRecordService {
|
|||||||
* @param phoneDialRecord 电话拨打记录
|
* @param phoneDialRecord 电话拨打记录
|
||||||
* @return 电话拨打记录集合
|
* @return 电话拨打记录集合
|
||||||
*/
|
*/
|
||||||
List<BillPhoneDialVo> selectPhoneDialRecordList(BillPhoneDialVo phoneDialRecord);
|
List<PhoneDialRecord> selectPhoneDialRecordList(PhoneDialRecord phoneDialRecord);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增电话拨打记录
|
* 新增电话拨打记录
|
||||||
|
|||||||
@ -3,7 +3,6 @@ package com.xinelu.manage.service.phonedialrecord.impl;
|
|||||||
import com.xinelu.manage.domain.phonedialrecord.PhoneDialRecord;
|
import com.xinelu.manage.domain.phonedialrecord.PhoneDialRecord;
|
||||||
import com.xinelu.manage.mapper.phonedialrecord.PhoneDialRecordMapper;
|
import com.xinelu.manage.mapper.phonedialrecord.PhoneDialRecordMapper;
|
||||||
import com.xinelu.manage.service.phonedialrecord.IPhoneDialRecordService;
|
import com.xinelu.manage.service.phonedialrecord.IPhoneDialRecordService;
|
||||||
import com.xinelu.manage.vo.phonedialrecord.BillPhoneDialVo;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@ -39,8 +38,8 @@ public class PhoneDialRecordServiceImpl implements IPhoneDialRecordService {
|
|||||||
* @return 电话拨打记录
|
* @return 电话拨打记录
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<BillPhoneDialVo> selectPhoneDialRecordList(BillPhoneDialVo phoneDialRecord) {
|
public List<PhoneDialRecord> selectPhoneDialRecordList(PhoneDialRecord phoneDialRecord) {
|
||||||
return phoneDialRecordMapper.selectPhoneDialRecords(phoneDialRecord);
|
return phoneDialRecordMapper.selectPhoneDialRecordList(phoneDialRecord);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -78,9 +78,4 @@ public interface IScriptInfoService {
|
|||||||
* 新增话术节点
|
* 新增话术节点
|
||||||
*/
|
*/
|
||||||
AjaxResult updateScriptEdgeNode(ScriptVO scriptVO);
|
AjaxResult updateScriptEdgeNode(ScriptVO scriptVO);
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询话术变量
|
|
||||||
*/
|
|
||||||
AjaxResult selectScriptVariable(Long id);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import com.xinelu.common.exception.ServiceException;
|
|||||||
import com.xinelu.common.utils.SecurityUtils;
|
import com.xinelu.common.utils.SecurityUtils;
|
||||||
import com.xinelu.common.utils.file.FileUploadUtils;
|
import com.xinelu.common.utils.file.FileUploadUtils;
|
||||||
import com.xinelu.common.utils.file.MimeTypeUtils;
|
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.scriptInfo.ScriptInfo;
|
||||||
import com.xinelu.manage.domain.scriptinfoedge.ScriptInfoEdge;
|
import com.xinelu.manage.domain.scriptinfoedge.ScriptInfoEdge;
|
||||||
import com.xinelu.manage.dto.script.ScriptInfoDto;
|
import com.xinelu.manage.dto.script.ScriptInfoDto;
|
||||||
@ -18,16 +19,17 @@ import com.xinelu.manage.service.scriptInfo.IScriptInfoService;
|
|||||||
import com.xinelu.manage.vo.scriptInfo.Edge;
|
import com.xinelu.manage.vo.scriptInfo.Edge;
|
||||||
import com.xinelu.manage.vo.scriptInfo.Node;
|
import com.xinelu.manage.vo.scriptInfo.Node;
|
||||||
import com.xinelu.manage.vo.scriptInfo.ScriptVO;
|
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.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 话术信息Service业务层处理
|
* 话术信息Service业务层处理
|
||||||
*
|
*
|
||||||
@ -290,18 +292,4 @@ public class ScriptInfoServiceImpl implements IScriptInfoService {
|
|||||||
}
|
}
|
||||||
return AjaxResult.success();
|
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,7 +1,6 @@
|
|||||||
package com.xinelu.manage.service.shortmessagesendrecord;
|
package com.xinelu.manage.service.shortmessagesendrecord;
|
||||||
|
|
||||||
import com.xinelu.manage.domain.shortmessagesendrecord.ShortMessageSendRecord;
|
import com.xinelu.manage.domain.shortmessagesendrecord.ShortMessageSendRecord;
|
||||||
import com.xinelu.manage.vo.shortmessagesendrecord.ShortMessageSendRecordVo;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -26,7 +25,7 @@ public interface IShortMessageSendRecordService {
|
|||||||
* @param shortMessageSendRecord 短信发送结果记录
|
* @param shortMessageSendRecord 短信发送结果记录
|
||||||
* @return 短信发送结果记录集合
|
* @return 短信发送结果记录集合
|
||||||
*/
|
*/
|
||||||
List<ShortMessageSendRecordVo> selectShortMessageSendRecordList(ShortMessageSendRecordVo shortMessageSendRecord);
|
List<ShortMessageSendRecord> selectShortMessageSendRecordList(ShortMessageSendRecord shortMessageSendRecord);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增短信发送结果记录
|
* 新增短信发送结果记录
|
||||||
|
|||||||
@ -3,7 +3,6 @@ package com.xinelu.manage.service.shortmessagesendrecord.impl;
|
|||||||
import com.xinelu.manage.domain.shortmessagesendrecord.ShortMessageSendRecord;
|
import com.xinelu.manage.domain.shortmessagesendrecord.ShortMessageSendRecord;
|
||||||
import com.xinelu.manage.mapper.shortmessagesendrecord.ShortMessageSendRecordMapper;
|
import com.xinelu.manage.mapper.shortmessagesendrecord.ShortMessageSendRecordMapper;
|
||||||
import com.xinelu.manage.service.shortmessagesendrecord.IShortMessageSendRecordService;
|
import com.xinelu.manage.service.shortmessagesendrecord.IShortMessageSendRecordService;
|
||||||
import com.xinelu.manage.vo.shortmessagesendrecord.ShortMessageSendRecordVo;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@ -39,8 +38,8 @@ public class ShortMessageSendRecordServiceImpl implements IShortMessageSendRecor
|
|||||||
* @return 短信发送结果记录
|
* @return 短信发送结果记录
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<ShortMessageSendRecordVo> selectShortMessageSendRecordList(ShortMessageSendRecordVo shortMessageSendRecord) {
|
public List<ShortMessageSendRecord> selectShortMessageSendRecordList(ShortMessageSendRecord shortMessageSendRecord) {
|
||||||
return shortMessageSendRecordMapper.selectShortMessageSendRecords(shortMessageSendRecord);
|
return shortMessageSendRecordMapper.selectShortMessageSendRecordList(shortMessageSendRecord);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -200,7 +200,7 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
|||||||
SignPatientManageRouteNodeDto signPatientManageRouteNode = new SignPatientManageRouteNodeDto();
|
SignPatientManageRouteNodeDto signPatientManageRouteNode = new SignPatientManageRouteNodeDto();
|
||||||
signPatientManageRouteNode.setNodePlanTime(LocalDateTime.now());
|
signPatientManageRouteNode.setNodePlanTime(LocalDateTime.now());
|
||||||
List<SignPatientManageRouteNode> signPatientManageRouteNodes = signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeList(signPatientManageRouteNode);
|
List<SignPatientManageRouteNode> signPatientManageRouteNodes = signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeList(signPatientManageRouteNode);
|
||||||
if (CollectionUtils.isNotEmpty(signPatientManageRouteNodes) && signPatientManageRouteNodes.size() >= 1000) {
|
if (CollectionUtils.isNotEmpty(signPatientManageRouteNodes) && signPatientManageRouteNodes.size() >= 100) {
|
||||||
return AjaxResult.error("今日创建任务已达上线,请改日创建任务!");
|
return AjaxResult.error("今日创建任务已达上线,请改日创建任务!");
|
||||||
}
|
}
|
||||||
//获取患者信息
|
//获取患者信息
|
||||||
@ -208,10 +208,10 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
|||||||
PatientInfoDto patientInfo = new PatientInfoDto();
|
PatientInfoDto patientInfo = new PatientInfoDto();
|
||||||
patientInfo.setSn(signPatientManageRoute.getSn());
|
patientInfo.setSn(signPatientManageRoute.getSn());
|
||||||
listPatient = patientInfoMapper.getPatientList(patientInfo);
|
listPatient = patientInfoMapper.getPatientList(patientInfo);
|
||||||
if (CollectionUtils.isNotEmpty(listPatient) && listPatient.size() > 1000) {
|
if (CollectionUtils.isNotEmpty(listPatient) && listPatient.size() > 100) {
|
||||||
return AjaxResult.error("创建任务数量超出当日上限,请减少创建任务数量!");
|
return AjaxResult.error("创建任务数量超出当日上限,请减少创建任务数量!");
|
||||||
}
|
}
|
||||||
if (CollectionUtils.isNotEmpty(listPatient) && CollectionUtils.isNotEmpty(signPatientManageRouteNodes) && (listPatient.size() + signPatientManageRouteNodes.size()) > 1000) {
|
if (CollectionUtils.isNotEmpty(listPatient) && CollectionUtils.isNotEmpty(signPatientManageRouteNodes) && (listPatient.size() + signPatientManageRouteNodes.size()) > 100) {
|
||||||
return AjaxResult.error("创建任务数量超出当日上限,请减少创建任务数量!");
|
return AjaxResult.error("创建任务数量超出当日上限,请减少创建任务数量!");
|
||||||
}
|
}
|
||||||
for (PatientInfoVo patientInfoVo : listPatient) {
|
for (PatientInfoVo patientInfoVo : listPatient) {
|
||||||
@ -274,7 +274,10 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
|||||||
if (insertBatchCount < 0) {
|
if (insertBatchCount < 0) {
|
||||||
return AjaxResult.error(901, "新增签约患者管理任务路径失败!请联系管理员!");
|
return AjaxResult.error(901, "新增签约患者管理任务路径失败!请联系管理员!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SignPatientRecord signPatientRecord = new SignPatientRecord();
|
SignPatientRecord signPatientRecord = new SignPatientRecord();
|
||||||
|
|
||||||
// if(Objects.isNull(signPatientManageRoute.getSignPatientRecordId())) {
|
// if(Objects.isNull(signPatientManageRoute.getSignPatientRecordId())) {
|
||||||
// //更新 签约记录的 审核状态为 已审核,适用场景:手动创建任务 zyk 20241204
|
// //更新 签约记录的 审核状态为 已审核,适用场景:手动创建任务 zyk 20241204
|
||||||
// signPatientRecord.setRouteCheckStatus(RouteCheckStatusEnum.AGREE.getInfo());
|
// signPatientRecord.setRouteCheckStatus(RouteCheckStatusEnum.AGREE.getInfo());
|
||||||
@ -298,10 +301,12 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
|||||||
LabelField labelField = new LabelField();
|
LabelField labelField = new LabelField();
|
||||||
labelField.setLabelFieldAndPartitionDictList(labelFieldAndPartitionDictList);
|
labelField.setLabelFieldAndPartitionDictList(labelFieldAndPartitionDictList);
|
||||||
labelFieldContentService.insertLabelField(labelField);
|
labelFieldContentService.insertLabelField(labelField);
|
||||||
|
|
||||||
// 替换手动生成的任务中的标签
|
// 替换手动生成的任务中的标签
|
||||||
signPatientManageRouteNodeService.manualCreateTaskLabelReplaceByPatientId(signPatientManageRoute.getPatientId());
|
signPatientManageRouteNodeService.manualCreateTaskLabelReplaceByPatientId(signPatientManageRoute.getPatientId());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1447,6 +1452,7 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
|||||||
if (StringUtils.isNotBlank(signPatientManageRoute.getSn())) {
|
if (StringUtils.isNotBlank(signPatientManageRoute.getSn())) {
|
||||||
signPatientManageRouteNode.setTaskExcuteType(TaskExcuteTypeEnum.BATCH_TASK.getInfo());
|
signPatientManageRouteNode.setTaskExcuteType(TaskExcuteTypeEnum.BATCH_TASK.getInfo());
|
||||||
signPatientManageRouteNode.setSn(signPatientManageRoute.getSn());
|
signPatientManageRouteNode.setSn(signPatientManageRoute.getSn());
|
||||||
|
|
||||||
} else
|
} else
|
||||||
signPatientManageRouteNode.setTaskExcuteType(TaskExcuteTypeEnum.ACTUAL_TIME_TASK.getInfo());
|
signPatientManageRouteNode.setTaskExcuteType(TaskExcuteTypeEnum.ACTUAL_TIME_TASK.getInfo());
|
||||||
signPatientManageRouteNode.setNodePlanTime(routeNode.getNodePlanTime());
|
signPatientManageRouteNode.setNodePlanTime(routeNode.getNodePlanTime());
|
||||||
@ -1509,6 +1515,7 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
|||||||
signPatientManageRouteNode.setMessagePushSign(Objects.isNull(routeNode.getMessagePushSign()) ? null : routeNode.getMessagePushSign());
|
signPatientManageRouteNode.setMessagePushSign(Objects.isNull(routeNode.getMessagePushSign()) ? null : routeNode.getMessagePushSign());
|
||||||
signPatientManageRouteNode.setMessageTemplateId(Objects.isNull(routeNode.getMessageTemplateId()) ? null : routeNode.getMessageTemplateId());
|
signPatientManageRouteNode.setMessageTemplateId(Objects.isNull(routeNode.getMessageTemplateId()) ? null : routeNode.getMessageTemplateId());
|
||||||
signPatientManageRouteNode.setMessageTemplateCode(Objects.isNull(routeNode.getMessageTemplateCode()) ? null : routeNode.getMessageTemplateCode());
|
signPatientManageRouteNode.setMessageTemplateCode(Objects.isNull(routeNode.getMessageTemplateCode()) ? null : routeNode.getMessageTemplateCode());
|
||||||
|
;
|
||||||
signPatientManageRouteNode.setMessageTemplateName(StringUtils.isBlank(routeNode.getMessageTemplateName()) ? null : routeNode.getMessageTemplateName());
|
signPatientManageRouteNode.setMessageTemplateName(StringUtils.isBlank(routeNode.getMessageTemplateName()) ? null : routeNode.getMessageTemplateName());
|
||||||
//公众号
|
//公众号
|
||||||
signPatientManageRouteNode.setOfficialPushSign(Objects.isNull(routeNode.getOfficialPushSign()) ? null : routeNode.getOfficialPushSign());
|
signPatientManageRouteNode.setOfficialPushSign(Objects.isNull(routeNode.getOfficialPushSign()) ? null : routeNode.getOfficialPushSign());
|
||||||
@ -1554,7 +1561,7 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发送短信(无变量)
|
* 发送短信
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Boolean sendSms(SmsInfoDTO smsInfoDTO) throws ClientException, ServiceException {
|
public Boolean sendSms(SmsInfoDTO smsInfoDTO) throws ClientException, ServiceException {
|
||||||
|
|||||||
@ -13,13 +13,11 @@ import com.xinelu.common.constant.TemplateTypeConstants;
|
|||||||
import com.xinelu.common.constant.TriggerConditionOperatorConstants;
|
import com.xinelu.common.constant.TriggerConditionOperatorConstants;
|
||||||
import com.xinelu.common.constant.TriggerLogicConstants;
|
import com.xinelu.common.constant.TriggerLogicConstants;
|
||||||
import com.xinelu.common.constant.VisitMethodConstants;
|
import com.xinelu.common.constant.VisitMethodConstants;
|
||||||
import com.xinelu.common.core.domain.entity.SysUser;
|
|
||||||
import com.xinelu.common.enums.*;
|
import com.xinelu.common.enums.*;
|
||||||
import com.xinelu.common.exception.ServiceException;
|
import com.xinelu.common.exception.ServiceException;
|
||||||
import com.xinelu.common.utils.SecurityUtils;
|
import com.xinelu.common.utils.SecurityUtils;
|
||||||
import com.xinelu.common.utils.StringUtils;
|
import com.xinelu.common.utils.StringUtils;
|
||||||
import com.xinelu.common.utils.bean.BeanUtils;
|
import com.xinelu.common.utils.bean.BeanUtils;
|
||||||
import com.xinelu.manage.domain.agency.Agency;
|
|
||||||
import com.xinelu.manage.domain.patientinfo.PatientAllInfoViewUppercase;
|
import com.xinelu.manage.domain.patientinfo.PatientAllInfoViewUppercase;
|
||||||
import com.xinelu.manage.domain.patientinfo.PatientInfo;
|
import com.xinelu.manage.domain.patientinfo.PatientInfo;
|
||||||
import com.xinelu.manage.domain.patientnodeparamscurrent.PatientNodeParamsCurrent;
|
import com.xinelu.manage.domain.patientnodeparamscurrent.PatientNodeParamsCurrent;
|
||||||
@ -41,7 +39,6 @@ import com.xinelu.manage.domain.textmessage.TextMessage;
|
|||||||
import com.xinelu.manage.domain.wechattemplate.WechatTemplate;
|
import com.xinelu.manage.domain.wechattemplate.WechatTemplate;
|
||||||
import com.xinelu.manage.dto.patientinfo.PatientInfoDto;
|
import com.xinelu.manage.dto.patientinfo.PatientInfoDto;
|
||||||
import com.xinelu.manage.dto.signpatientmanageroutenode.*;
|
import com.xinelu.manage.dto.signpatientmanageroutenode.*;
|
||||||
import com.xinelu.manage.mapper.agency.AgencyMapper;
|
|
||||||
import com.xinelu.manage.mapper.labelfieldcontent.LabelFieldContentMapper;
|
import com.xinelu.manage.mapper.labelfieldcontent.LabelFieldContentMapper;
|
||||||
import com.xinelu.manage.mapper.patientinfo.PatientAllInfoViewMapper;
|
import com.xinelu.manage.mapper.patientinfo.PatientAllInfoViewMapper;
|
||||||
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
|
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
|
||||||
@ -90,8 +87,6 @@ import java.util.regex.Matcher;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import com.xinelu.system.mapper.SysUserMapper;
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.jsoup.Jsoup;
|
import org.jsoup.Jsoup;
|
||||||
@ -153,10 +148,6 @@ public class SignPatientManageRouteNodeServiceImpl implements ISignPatientManage
|
|||||||
private PhoneDialRecordMapper phoneDialRecordMapper;
|
private PhoneDialRecordMapper phoneDialRecordMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private IAIOBService aiobService;
|
private IAIOBService aiobService;
|
||||||
@Resource
|
|
||||||
private SysUserMapper sysUserMapper;
|
|
||||||
@Resource
|
|
||||||
private AgencyMapper agencyMapper;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询签约患者管理任务路径节点
|
* 查询签约患者管理任务路径节点
|
||||||
@ -1418,14 +1409,6 @@ public class SignPatientManageRouteNodeServiceImpl implements ISignPatientManage
|
|||||||
if (Objects.nonNull(uploadRobotPublishRecordDto)){
|
if (Objects.nonNull(uploadRobotPublishRecordDto)){
|
||||||
uploadRobotPublishRecordDto.setQuestionType(QuestionTypeEnum.FEEDBACK_BLANKS_SUBJECT.getInfo());
|
uploadRobotPublishRecordDto.setQuestionType(QuestionTypeEnum.FEEDBACK_BLANKS_SUBJECT.getInfo());
|
||||||
}
|
}
|
||||||
//登录用户科室信息
|
|
||||||
SysUser sysUser = sysUserMapper.selectUserById(SecurityUtils.getUserId());
|
|
||||||
if (Objects.nonNull(sysUser) && Objects.nonNull(sysUser.getHospitalAgencyId())){
|
|
||||||
Agency agency = agencyMapper.selectAgencyById(sysUser.getHospitalAgencyId());
|
|
||||||
if (Objects.nonNull(agency) && Objects.nonNull(agency.getId())){
|
|
||||||
uploadRobotPublishRecordDto.setHospitalAgencyId(agency.getId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
List<UploadRobotPublishRecordVo> uploadRobotPublishRecordVos = signPatientManageRouteNodeMapper.selectTaskContented(uploadRobotPublishRecordDto);
|
List<UploadRobotPublishRecordVo> uploadRobotPublishRecordVos = signPatientManageRouteNodeMapper.selectTaskContented(uploadRobotPublishRecordDto);
|
||||||
//总分为0设为null
|
//总分为0设为null
|
||||||
if(CollectionUtils.isNotEmpty(uploadRobotPublishRecordVos)){
|
if(CollectionUtils.isNotEmpty(uploadRobotPublishRecordVos)){
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
package com.xinelu.manage.service.textmessage;
|
package com.xinelu.manage.service.textmessage;
|
||||||
|
|
||||||
import com.xinelu.common.core.domain.AjaxResult;
|
import com.xinelu.common.core.page.TableDataInfo;
|
||||||
import com.xinelu.manage.dto.textmessage.TextMessageDTO;
|
import com.xinelu.manage.dto.textmessage.TextMessageDTO;
|
||||||
import com.xinelu.manage.dto.textmessage.TextMessageTaskDTO;
|
import com.xinelu.manage.dto.textmessage.TextMessageTaskDTO;
|
||||||
import com.xinelu.manage.vo.textmessage.TextMessageTaskVO;
|
import com.xinelu.manage.vo.textmessage.TextMessageTaskVO;
|
||||||
|
import com.xinelu.manage.vo.textmessage.TextMessageVO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -61,9 +62,4 @@ public interface ITextMessageService {
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteTextMessageById(Long id);
|
public int deleteTextMessageById(Long id);
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询话术变量
|
|
||||||
*/
|
|
||||||
AjaxResult selectTextMessageVariable(Long id);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
package com.xinelu.manage.service.textmessage.impl;
|
package com.xinelu.manage.service.textmessage.impl;
|
||||||
|
|
||||||
import com.xinelu.common.annotation.DataScope;
|
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.core.domain.entity.SysDictData;
|
||||||
import com.xinelu.common.exception.ServiceException;
|
import com.xinelu.common.exception.ServiceException;
|
||||||
import com.xinelu.common.utils.SecurityUtils;
|
import com.xinelu.common.utils.SecurityUtils;
|
||||||
import com.xinelu.common.utils.bean.BeanUtils;
|
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.textmessage.TextMessage;
|
||||||
import com.xinelu.manage.domain.textmessagesuittask.TextMessageSuitTask;
|
import com.xinelu.manage.domain.textmessagesuittask.TextMessageSuitTask;
|
||||||
import com.xinelu.manage.dto.textmessage.TextMessageDTO;
|
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.TextMessageTaskVO;
|
||||||
import com.xinelu.manage.vo.textmessage.TextMessageVO;
|
import com.xinelu.manage.vo.textmessage.TextMessageVO;
|
||||||
import com.xinelu.system.mapper.SysDictDataMapper;
|
import com.xinelu.system.mapper.SysDictDataMapper;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -218,21 +218,4 @@ public class TextMessageServiceImpl implements ITextMessageService {
|
|||||||
public int deleteTextMessageById(Long id) {
|
public int deleteTextMessageById(Long id) {
|
||||||
return textMessageMapper.deleteTextMessageById(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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,43 +0,0 @@
|
|||||||
package com.xinelu.manage.vo.batchsendtaskinfo;
|
|
||||||
|
|
||||||
import com.xinelu.manage.domain.batchsendtaskinfo.BatchSendTaskInfo;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量推送任务查看vo
|
|
||||||
*/
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Data
|
|
||||||
public class BatchSendTaskVo extends BatchSendTaskInfo {
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "拨打状态:DIALED,已拨打:NODIALED:未拨打;默认NULL表示未拨打")
|
|
||||||
private String dialStatus;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 节点任务执行状态,已执行:EXECUTED,未执行:UNEXECUTED
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "节点任务执行状态,已执行:EXECUTED,未执行:UNEXECUTED")
|
|
||||||
private String nodeExecuteStatus;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "默认已接通:CONNECTED;未接通:NOTCONNECTED")
|
|
||||||
private String phoneConnectStatus;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 电话拨通情况;SUCCESS:成功;FAILURE:失败;EXPIRED:超期自动作废(如超期一周);NULL或空字符串:缺省值,表示未执行;
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "电话拨通情况")
|
|
||||||
private String phoneNodeExecuteResultStatus;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 短信发送情况;SUCCESS:成功;FAILURE:失败;EXPIRED:超期自动作废(如超期一周);NULL或空字符串:缺省值,表示未执行;
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "短信发送情况")
|
|
||||||
private String messageNodeExecuteResultStatus;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 任务状态
|
|
||||||
*/
|
|
||||||
private String taskStatus;
|
|
||||||
}
|
|
||||||
@ -1,18 +0,0 @@
|
|||||||
package com.xinelu.manage.vo.batchsendtaskrecordinfo;
|
|
||||||
|
|
||||||
import com.xinelu.manage.domain.batchsendtaskrecordinfo.BatchSendTaskRecordInfo;
|
|
||||||
import com.xinelu.manage.vo.batchsendtaskinfo.BatchSendTaskVo;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量推送任务查看vo
|
|
||||||
*/
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Data
|
|
||||||
public class BatchSendTaskRecordVo extends BatchSendTaskRecordInfo {
|
|
||||||
|
|
||||||
List<BatchSendTaskVo> batchSendTaskInfos;
|
|
||||||
}
|
|
||||||
@ -1,125 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
||||||
@ -1,114 +0,0 @@
|
|||||||
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,9 +122,4 @@ public class TextMessageTaskVO {
|
|||||||
* 短信模版code(手动创建人任务使用)
|
* 短信模版code(手动创建人任务使用)
|
||||||
*/
|
*/
|
||||||
private String messageTemplateCode;
|
private String messageTemplateCode;
|
||||||
|
|
||||||
/**
|
|
||||||
* 短信变量,竖线隔开。来源于创建短息任务页面
|
|
||||||
*/
|
|
||||||
private String variables;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -122,9 +122,4 @@ public class TextMessageVO extends BaseEntity {
|
|||||||
* 短信模版code(手动创建人任务使用)
|
* 短信模版code(手动创建人任务使用)
|
||||||
*/
|
*/
|
||||||
private String messageTemplateCode;
|
private String messageTemplateCode;
|
||||||
|
|
||||||
/**
|
|
||||||
* 短信变量,竖线隔开。来源于创建短息任务页面
|
|
||||||
*/
|
|
||||||
private String variables;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,389 +0,0 @@
|
|||||||
<?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="personnelType" column="personnel_type"/>
|
|
||||||
<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,
|
|
||||||
personnel_type,
|
|
||||||
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.dto.batchsendtaskinfo.BatchSendTaskDto"
|
|
||||||
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="startDate != null ">
|
|
||||||
and date_format(visit_date, '%y%m%d') >= date_format(#{startDate}, '%y%m%d')
|
|
||||||
</if>
|
|
||||||
<if test="endDate != null ">
|
|
||||||
and date_format(visit_date, '%y%m%d') <= date_format(#{endDate}, '%y%m%d')
|
|
||||||
</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="personnelType != null and personnelType != ''">
|
|
||||||
and personnel_type = #{personnelType}
|
|
||||||
</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 like concat('%', #{physicalExaminationLabel}, '%')
|
|
||||||
</if>
|
|
||||||
ORDER BY create_time DESC
|
|
||||||
</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="personnelType != null">personnel_type,
|
|
||||||
</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="personnelType != null">#{personnelType},
|
|
||||||
</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="personnelType != null">personnel_type =
|
|
||||||
#{personnelType},
|
|
||||||
</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,
|
|
||||||
personnel_type,
|
|
||||||
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.personnelType},
|
|
||||||
#{BatchSendTaskInfo.crowdId},
|
|
||||||
#{BatchSendTaskInfo.crowdName},
|
|
||||||
#{BatchSendTaskInfo.physicalExaminationSummary},
|
|
||||||
#{BatchSendTaskInfo.physicalExaminationLabel},
|
|
||||||
#{BatchSendTaskInfo.delFlag},
|
|
||||||
#{BatchSendTaskInfo.createBy},
|
|
||||||
#{BatchSendTaskInfo.createTime}
|
|
||||||
)
|
|
||||||
</foreach>
|
|
||||||
</insert>
|
|
||||||
</mapper>
|
|
||||||
@ -1,79 +0,0 @@
|
|||||||
<?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.batchsendtasklabelinfo.BatchSendTaskLabelInfoMapper">
|
|
||||||
|
|
||||||
<resultMap type="BatchSendTaskLabelInfo" id="BatchSendTaskLabelInfoResult">
|
|
||||||
<result property="id" column="id"/>
|
|
||||||
<result property="physicalExaminationLabel" column="physical_examination_label"/>
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<sql id="selectBatchSendTaskLabelInfoVo">
|
|
||||||
select id, physical_examination_label
|
|
||||||
from batch_send_task_label_info
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<select id="selectBatchSendTaskLabelInfoList" parameterType="BatchSendTaskLabelInfo"
|
|
||||||
resultMap="BatchSendTaskLabelInfoResult">
|
|
||||||
<include refid="selectBatchSendTaskLabelInfoVo"/>
|
|
||||||
<where>
|
|
||||||
<if test="physicalExaminationLabel != null and physicalExaminationLabel != ''">
|
|
||||||
and physical_examination_label = #{physicalExaminationLabel}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectBatchSendTaskLabelInfoById" parameterType="Long"
|
|
||||||
resultMap="BatchSendTaskLabelInfoResult">
|
|
||||||
<include refid="selectBatchSendTaskLabelInfoVo"/>
|
|
||||||
where id = #{id}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<insert id="insertBatchSendTaskLabelInfo" parameterType="BatchSendTaskLabelInfo" useGeneratedKeys="true"
|
|
||||||
keyProperty="id">
|
|
||||||
insert into batch_send_task_label_info
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="physicalExaminationLabel != null">physical_examination_label,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="physicalExaminationLabel != null">#{physicalExaminationLabel},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<update id="updateBatchSendTaskLabelInfo" parameterType="BatchSendTaskLabelInfo">
|
|
||||||
update batch_send_task_label_info
|
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
|
||||||
<if test="physicalExaminationLabel != null">physical_examination_label =
|
|
||||||
#{physicalExaminationLabel},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<delete id="deleteBatchSendTaskLabelInfoById" parameterType="Long">
|
|
||||||
delete
|
|
||||||
from batch_send_task_label_info
|
|
||||||
where id = #{id}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<delete id="deleteBatchSendTaskLabelInfoByIds" parameterType="String">
|
|
||||||
delete from batch_send_task_label_info where id in
|
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
||||||
#{id}
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
|
|
||||||
<insert id="insertBatchSendTaskLabelInfList">
|
|
||||||
insert into batch_send_task_label_info(
|
|
||||||
physical_examination_label
|
|
||||||
)
|
|
||||||
values
|
|
||||||
<foreach collection="list" item="label" separator=",">
|
|
||||||
(#{label})
|
|
||||||
</foreach>
|
|
||||||
</insert>
|
|
||||||
</mapper>
|
|
||||||
@ -1,313 +0,0 @@
|
|||||||
<?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>
|
|
||||||
|
|
||||||
<resultMap type="com.xinelu.manage.vo.batchsendtaskrecordinfo.BatchSendTaskRecordVo"
|
|
||||||
id="BatchSendTaskRecordVoResult">
|
|
||||||
<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"/>
|
|
||||||
<collection property="batchSendTaskInfos" javaType="java.util.List"
|
|
||||||
resultMap="BatchSendTaskVoResult"/>
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<resultMap type="com.xinelu.manage.vo.batchsendtaskinfo.BatchSendTaskVo" id="BatchSendTaskVoResult">
|
|
||||||
<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="personnelType" column="personnel_type"/>
|
|
||||||
<result property="crowdId" column="crowd_id"/>
|
|
||||||
<result property="crowdName" column="crowd_name"/>
|
|
||||||
<result property="physicalExaminationLabel" column="physical_examination_label"/>
|
|
||||||
<result property="dialStatus" column="dial_status"/>
|
|
||||||
<result property="phoneNodeExecuteResultStatus" column="phone_node_execute_result_status"/>
|
|
||||||
<result property="messageNodeExecuteResultStatus" column="message_node_execute_result_status"/>
|
|
||||||
<result property="nodeExecuteStatus" column="node_execute_status"/>
|
|
||||||
<result property="phoneConnectStatus" column="phone_connect_status"/>
|
|
||||||
<result property="taskStatus" column="taskStatus"/>
|
|
||||||
</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,
|
|
||||||
robot_publish_id,
|
|
||||||
node_content,
|
|
||||||
node_execute_status,
|
|
||||||
physical_examination_label,
|
|
||||||
del_flag,
|
|
||||||
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>
|
|
||||||
ORDER BY create_time DESC
|
|
||||||
</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="robotPublishId != null">robot_publish_id,
|
|
||||||
</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="delFlag != null">del_flag,
|
|
||||||
</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="robotPublishId != null">#{robotPublishId},
|
|
||||||
</if>
|
|
||||||
<if test="nodeContent != null">#{nodeContent},
|
|
||||||
</if>
|
|
||||||
<if test="nodeExecuteStatus != null">#{nodeExecuteStatus},
|
|
||||||
</if>
|
|
||||||
<if test="physicalExaminationLabel != null">#{physicalExaminationLabel},
|
|
||||||
</if>
|
|
||||||
<if test="delFlag != null">#{delFlag},
|
|
||||||
</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="robotPublishId != null">robot_publish_id =
|
|
||||||
#{robotPublishId},
|
|
||||||
</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="delFlag != null">del_flag =
|
|
||||||
#{delFlag},
|
|
||||||
</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>
|
|
||||||
|
|
||||||
<select id="selectBatchSendTaskRecordVoById"
|
|
||||||
resultMap="BatchSendTaskRecordVoResult">
|
|
||||||
select bstri.id,
|
|
||||||
bstri.batch_task_number,
|
|
||||||
bstri.batch_task_name,
|
|
||||||
bstri.task_execute_type,
|
|
||||||
bstri.node_plan_time,
|
|
||||||
bstri.batch_task_source,
|
|
||||||
bstri.template_id,
|
|
||||||
bstri.template_name,
|
|
||||||
bstri.node_content,
|
|
||||||
bstri.node_execute_status,
|
|
||||||
bstri.physical_examination_label,
|
|
||||||
bstri.create_by,
|
|
||||||
bstri.create_time,
|
|
||||||
bsti.id,
|
|
||||||
bsti.order_num,
|
|
||||||
bsti.sn,
|
|
||||||
bsti.import_name,
|
|
||||||
bsti.team_name,
|
|
||||||
bsti.hospital_agency_id,
|
|
||||||
bsti.hospital_agency_name,
|
|
||||||
bsti.department_id,
|
|
||||||
bsti.department_name,
|
|
||||||
bsti.visit_date,
|
|
||||||
bsti.in_hospital_number,
|
|
||||||
bsti.patient_name,
|
|
||||||
bsti.patient_phone,
|
|
||||||
bsti.age,
|
|
||||||
bsti.sex,
|
|
||||||
bsti.card_no,
|
|
||||||
bsti.personnel_type,
|
|
||||||
bsti.crowd_id,
|
|
||||||
bsti.crowd_name,
|
|
||||||
bsti.physical_examination_label,
|
|
||||||
spmrn.dial_status,
|
|
||||||
spmrn.node_execute_status,
|
|
||||||
spmrn.phone_connect_status,
|
|
||||||
spmrn.phone_node_execute_result_status,
|
|
||||||
spmrn.message_node_execute_result_status,
|
|
||||||
CASE
|
|
||||||
WHEN bstri.batch_task_source = 'message' THEN spmrn.phone_node_execute_result_status
|
|
||||||
WHEN bstri.batch_task_source = 'telephone' THEN spmrn.message_node_execute_result_status
|
|
||||||
ELSE null
|
|
||||||
END AS taskStatus
|
|
||||||
from batch_send_task_record_info bstri
|
|
||||||
LEFT JOIN sign_patient_manage_route spmr on bstri.id = spmr.batch_send_task_record_id
|
|
||||||
LEFT JOIN sign_patient_manage_route_node spmrn on spmr.id = spmrn.manage_route_id
|
|
||||||
LEFT JOIN batch_send_task_info bsti on spmr.batch_send_task_id = bsti.id
|
|
||||||
where bstri.id = #{id}
|
|
||||||
</select>
|
|
||||||
</mapper>
|
|
||||||
@ -1,121 +0,0 @@
|
|||||||
<?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>
|
|
||||||
@ -1,141 +0,0 @@
|
|||||||
<?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>
|
|
||||||
@ -80,7 +80,7 @@
|
|||||||
or tpd.apply_range = 'PUBLIC'
|
or tpd.apply_range = 'PUBLIC'
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
group by lfi.task_partition_dict_id,lfi.task_partition_dict_name
|
group by task_partition_dict_id
|
||||||
order by ttd.task_type_sort,tpd.task_partition_sort
|
order by ttd.task_type_sort,tpd.task_partition_sort
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@ -837,9 +837,6 @@
|
|||||||
<if test="firstDay != null">
|
<if test="firstDay != null">
|
||||||
and DATE(create_time) <= #{now}
|
and DATE(create_time) <= #{now}
|
||||||
</if>
|
</if>
|
||||||
<if test="hospitalAgencyId != null">
|
|
||||||
and hospital_agency_id = #{hospitalAgencyId}
|
|
||||||
</if>
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectPatientInfoCountBySignTime" resultType="java.lang.Integer">
|
<select id="selectPatientInfoCountBySignTime" resultType="java.lang.Integer">
|
||||||
@ -854,9 +851,6 @@
|
|||||||
<if test="firstDay != null">
|
<if test="firstDay != null">
|
||||||
and DATE(sign_time) <= #{now}
|
and DATE(sign_time) <= #{now}
|
||||||
</if>
|
</if>
|
||||||
<if test="hospitalAgencyId != null">
|
|
||||||
and hospital_agency_id = #{hospitalAgencyId}
|
|
||||||
</if>
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectPatientSignTotalCount" resultType="java.lang.Integer">
|
<select id="selectPatientSignTotalCount" resultType="java.lang.Integer">
|
||||||
@ -864,9 +858,6 @@
|
|||||||
from patient_info
|
from patient_info
|
||||||
where del_flag = 0
|
where del_flag = 0
|
||||||
and (service_status = 'SERVICE_CENTER' or service_status = 'SERVICE_END')
|
and (service_status = 'SERVICE_CENTER' or service_status = 'SERVICE_END')
|
||||||
<if test="hospitalAgencyId != null">
|
|
||||||
and hospital_agency_id = #{hospitalAgencyId}
|
|
||||||
</if>
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectPatientSignServiceCount" resultType="java.lang.Integer">
|
<select id="selectPatientSignServiceCount" resultType="java.lang.Integer">
|
||||||
|
|||||||
@ -396,11 +396,9 @@
|
|||||||
select
|
select
|
||||||
count(1)
|
count(1)
|
||||||
from patient_pre_hospitalization
|
from patient_pre_hospitalization
|
||||||
where del_flag = 0
|
where
|
||||||
|
del_flag = 0
|
||||||
and create_time >= #{firstDay}
|
and create_time >= #{firstDay}
|
||||||
and create_time <= #{now}
|
and create_time <= #{now}
|
||||||
<if test="hospitalAgencyId != null">
|
|
||||||
and hospital_agency_id = #{hospitalAgencyId}
|
|
||||||
</if>
|
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -22,10 +22,7 @@
|
|||||||
<result property="updateTime" column="update_time"/>
|
<result property="updateTime" column="update_time"/>
|
||||||
<result property="ctUuid" column="ct_uuid"/>
|
<result property="ctUuid" column="ct_uuid"/>
|
||||||
<result property="phoneDialRecordVideo" column="phone_dial_record_video"/>
|
<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>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectPhoneDialRecordVo">
|
<sql id="selectPhoneDialRecordVo">
|
||||||
@ -45,11 +42,7 @@
|
|||||||
update_by,
|
update_by,
|
||||||
update_time,
|
update_time,
|
||||||
ct_uuid,
|
ct_uuid,
|
||||||
phone_dial_record_video,
|
phone_dial_record_video
|
||||||
phone_duration,
|
|
||||||
phone_expense,
|
|
||||||
phone_unit_price,
|
|
||||||
bill_id
|
|
||||||
from phone_dial_record
|
from phone_dial_record
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
@ -86,63 +79,9 @@
|
|||||||
<if test="errorStatus != null and errorStatus != ''">
|
<if test="errorStatus != null and errorStatus != ''">
|
||||||
and error_status = #{errorStatus}
|
and error_status = #{errorStatus}
|
||||||
</if>
|
</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>
|
</where>
|
||||||
</select>
|
</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"
|
<select id="selectPhoneDialRecordById" parameterType="Long"
|
||||||
resultMap="PhoneDialRecordResult">
|
resultMap="PhoneDialRecordResult">
|
||||||
<include refid="selectPhoneDialRecordVo"/>
|
<include refid="selectPhoneDialRecordVo"/>
|
||||||
@ -185,12 +124,6 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="phoneDialRecordVideo != null">phone_dial_record_video,
|
<if test="phoneDialRecordVideo != null">phone_dial_record_video,
|
||||||
</if>
|
</if>
|
||||||
<if test="phoneDuration != null">phone_duration,
|
|
||||||
</if>
|
|
||||||
<if test="phoneExpense != null">phone_expense,
|
|
||||||
</if>
|
|
||||||
<if test="billId != null">bill_id,
|
|
||||||
</if>
|
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="patientId != null">#{patientId},
|
<if test="patientId != null">#{patientId},
|
||||||
@ -225,12 +158,6 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="phoneDialRecordVideo != null">#{phoneDialRecordVideo},
|
<if test="phoneDialRecordVideo != null">#{phoneDialRecordVideo},
|
||||||
</if>
|
</if>
|
||||||
<if test="phoneDuration != null">#{phoneDuration},
|
|
||||||
</if>
|
|
||||||
<if test="phoneExpense != null">#{phoneExpense},
|
|
||||||
</if>
|
|
||||||
<if test="billId != null">#{billId},
|
|
||||||
</if>
|
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@ -285,15 +212,6 @@
|
|||||||
<if test="phoneDialRecordVideo != null">phone_dial_record_video =
|
<if test="phoneDialRecordVideo != null">phone_dial_record_video =
|
||||||
#{phoneDialRecordVideo},
|
#{phoneDialRecordVideo},
|
||||||
</if>
|
</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>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
@ -364,17 +282,4 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</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>
|
</mapper>
|
||||||
@ -361,12 +361,4 @@
|
|||||||
from script_info_edge
|
from script_info_edge
|
||||||
where script_info_id = #{id}
|
where script_info_id = #{id}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="selectScriptInfos" resultType="com.xinelu.manage.domain.scriptInfo.ScriptInfo">
|
|
||||||
<include refid="selectScriptInfoVo"/>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectVariablesByRobotPublishId" resultType="java.lang.String">
|
|
||||||
select variables from script_info where robot_publish_id = #{robotPublishId}
|
|
||||||
</select>
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -14,17 +14,11 @@
|
|||||||
<result property="messageNodeContent" column="message_node_content"/>
|
<result property="messageNodeContent" column="message_node_content"/>
|
||||||
<result property="errorCode" column="error_code"/>
|
<result property="errorCode" column="error_code"/>
|
||||||
<result property="errorStatus" column="error_status"/>
|
<result property="errorStatus" column="error_status"/>
|
||||||
<result property="errMsg" column="err_msg"/>
|
|
||||||
<result property="createBy" column="create_by"/>
|
<result property="createBy" column="create_by"/>
|
||||||
<result property="createTime" column="create_time"/>
|
<result property="createTime" column="create_time"/>
|
||||||
<result property="updateBy" column="update_by"/>
|
<result property="updateBy" column="update_by"/>
|
||||||
<result property="updateTime" column="update_time"/>
|
<result property="updateTime" column="update_time"/>
|
||||||
<result property="messageType" column="message_type"/>
|
<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>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectShortMessageSendRecordVo">
|
<sql id="selectShortMessageSendRecordVo">
|
||||||
@ -37,17 +31,11 @@
|
|||||||
message_node_content,
|
message_node_content,
|
||||||
error_code,
|
error_code,
|
||||||
error_status,
|
error_status,
|
||||||
err_msg,
|
|
||||||
create_by,
|
create_by,
|
||||||
create_time,
|
create_time,
|
||||||
update_by,
|
update_by,
|
||||||
update_time,
|
update_time,
|
||||||
message_type,
|
message_type
|
||||||
message_length,
|
|
||||||
message_quantity,
|
|
||||||
message_unit_price,
|
|
||||||
message_expense,
|
|
||||||
bill_id
|
|
||||||
from short_message_send_record
|
from short_message_send_record
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
@ -82,60 +70,9 @@
|
|||||||
<if test="messageType != null and messageType != ''">
|
<if test="messageType != null and messageType != ''">
|
||||||
and message_type = #{messageType}
|
and message_type = #{messageType}
|
||||||
</if>
|
</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>
|
</where>
|
||||||
</select>
|
</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"
|
<select id="selectShortMessageSendRecordById" parameterType="Long"
|
||||||
resultMap="ShortMessageSendRecordResult">
|
resultMap="ShortMessageSendRecordResult">
|
||||||
<include refid="selectShortMessageSendRecordVo"/>
|
<include refid="selectShortMessageSendRecordVo"/>
|
||||||
@ -162,8 +99,6 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="errorStatus != null">error_status,
|
<if test="errorStatus != null">error_status,
|
||||||
</if>
|
</if>
|
||||||
<if test="errMsg != null">err_msg,
|
|
||||||
</if>
|
|
||||||
<if test="createBy != null">create_by,
|
<if test="createBy != null">create_by,
|
||||||
</if>
|
</if>
|
||||||
<if test="createTime != null">create_time,
|
<if test="createTime != null">create_time,
|
||||||
@ -174,16 +109,6 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="messageType != null">message_type,
|
<if test="messageType != null">message_type,
|
||||||
</if>
|
</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>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="patientId != null">#{patientId},
|
<if test="patientId != null">#{patientId},
|
||||||
@ -202,8 +127,6 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="errorStatus != null">#{errorStatus},
|
<if test="errorStatus != null">#{errorStatus},
|
||||||
</if>
|
</if>
|
||||||
<if test="errMsg != null">#{errMsg},
|
|
||||||
</if>
|
|
||||||
<if test="createBy != null">#{createBy},
|
<if test="createBy != null">#{createBy},
|
||||||
</if>
|
</if>
|
||||||
<if test="createTime != null">#{createTime},
|
<if test="createTime != null">#{createTime},
|
||||||
@ -214,16 +137,6 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="messageType != null">#{messageType},
|
<if test="messageType != null">#{messageType},
|
||||||
</if>
|
</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>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@ -254,9 +167,6 @@
|
|||||||
<if test="errorStatus != null">error_status =
|
<if test="errorStatus != null">error_status =
|
||||||
#{errorStatus},
|
#{errorStatus},
|
||||||
</if>
|
</if>
|
||||||
<if test="errMsg != null">err_msg =
|
|
||||||
#{errMsg},
|
|
||||||
</if>
|
|
||||||
<if test="createBy != null">create_by =
|
<if test="createBy != null">create_by =
|
||||||
#{createBy},
|
#{createBy},
|
||||||
</if>
|
</if>
|
||||||
@ -272,21 +182,6 @@
|
|||||||
<if test="messageType != null">message_type =
|
<if test="messageType != null">message_type =
|
||||||
#{messageType},
|
#{messageType},
|
||||||
</if>
|
</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>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
@ -343,62 +238,4 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</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>
|
|
||||||
|
|
||||||
<insert id="insertShortMessageSendRecords">
|
|
||||||
insert into short_message_send_record(
|
|
||||||
patient_id,
|
|
||||||
manage_route_node_id,
|
|
||||||
patient_phone,
|
|
||||||
send_time,
|
|
||||||
message_template_id,
|
|
||||||
message_node_content,
|
|
||||||
error_code,
|
|
||||||
error_status,
|
|
||||||
err_msg,
|
|
||||||
create_by,
|
|
||||||
create_time,
|
|
||||||
message_type,
|
|
||||||
message_length,
|
|
||||||
message_quantity,
|
|
||||||
message_unit_price,
|
|
||||||
message_expense,
|
|
||||||
bill_id
|
|
||||||
)
|
|
||||||
values
|
|
||||||
<foreach item="ShortMessageSendRecord" index="index" collection="list" separator=",">
|
|
||||||
(
|
|
||||||
#{ShortMessageSendRecord.patientId},
|
|
||||||
#{ShortMessageSendRecord.manageRouteNodeId},
|
|
||||||
#{ShortMessageSendRecord.patientPhone},
|
|
||||||
#{ShortMessageSendRecord.sendTime},
|
|
||||||
#{ShortMessageSendRecord.messageTemplateId},
|
|
||||||
#{ShortMessageSendRecord.messageNodeContent},
|
|
||||||
#{ShortMessageSendRecord.errorCode},
|
|
||||||
#{ShortMessageSendRecord.errorStatus},
|
|
||||||
#{ShortMessageSendRecord.errMsg},
|
|
||||||
#{ShortMessageSendRecord.createBy},
|
|
||||||
#{ShortMessageSendRecord.createTime},
|
|
||||||
#{ShortMessageSendRecord.messageType},
|
|
||||||
#{ShortMessageSendRecord.messageLength},
|
|
||||||
#{ShortMessageSendRecord.messageQuantity},
|
|
||||||
#{ShortMessageSendRecord.messageUnitPrice},
|
|
||||||
#{ShortMessageSendRecord.messageExpense},
|
|
||||||
#{ShortMessageSendRecord.billId}
|
|
||||||
)
|
|
||||||
</foreach>
|
|
||||||
</insert>
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -586,9 +586,7 @@
|
|||||||
suit_range,
|
suit_range,
|
||||||
task_excute_type,
|
task_excute_type,
|
||||||
create_by,
|
create_by,
|
||||||
create_time,
|
create_time
|
||||||
batch_send_task_record_id,
|
|
||||||
batch_send_task_id
|
|
||||||
) values
|
) values
|
||||||
<foreach item="SignPatientManageRoute" index="index" collection="list" separator=",">
|
<foreach item="SignPatientManageRoute" index="index" collection="list" separator=",">
|
||||||
(
|
(
|
||||||
@ -601,9 +599,7 @@
|
|||||||
#{SignPatientManageRoute.suitRange},
|
#{SignPatientManageRoute.suitRange},
|
||||||
#{SignPatientManageRoute.taskExcuteType},
|
#{SignPatientManageRoute.taskExcuteType},
|
||||||
#{SignPatientManageRoute.createBy},
|
#{SignPatientManageRoute.createBy},
|
||||||
#{SignPatientManageRoute.createTime},
|
#{SignPatientManageRoute.createTime}
|
||||||
#{SignPatientManageRoute.batchSendTaskRecordId},
|
|
||||||
#{SignPatientManageRoute.batchSendTaskId}
|
|
||||||
)
|
)
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|||||||
@ -564,8 +564,8 @@
|
|||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertBatch" useGeneratedKeys="true" keyProperty="id">
|
<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,
|
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,
|
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,
|
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,
|
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,
|
||||||
@ -574,7 +574,7 @@
|
|||||||
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)
|
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
|
values
|
||||||
<foreach collection="nodeList" item="item" separator=",">
|
<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.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.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.phoneMessageTemplateName},#{item.phoneMessageTemplateContent},
|
||||||
#{item.questionInfoId},#{item.questionnaireName},#{item.questionnaireContent},#{item.questionExpirationDate},#{item.propagandaInfoId},#{item.propagandaTitle},#{item.propagandaContent},#{item.messagePushSign},
|
#{item.questionInfoId},#{item.questionnaireName},#{item.questionnaireContent},#{item.questionExpirationDate},#{item.propagandaInfoId},#{item.propagandaTitle},#{item.propagandaContent},#{item.messagePushSign},
|
||||||
@ -582,8 +582,7 @@
|
|||||||
#{item.messageTemplateName},#{item.messagePreview},#{item.messageNodeContent},#{item.officialPushSign},#{item.officialTemplateId},#{item.officialTemplateCode},#{item.officialTemplateName},#{item.officialRemindContent},#{item.officialNodeContent},
|
#{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.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.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}
|
#{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>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
<update id="updateSignPatientManageRouteNode" parameterType="SignPatientManageRouteNode">
|
<update id="updateSignPatientManageRouteNode" parameterType="SignPatientManageRouteNode">
|
||||||
@ -853,9 +852,9 @@
|
|||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="updateDialStatus" parameterType="SignPatientManageRouteNode">
|
<update id="updateDialStatus" parameterType="SignPatientManageRouteNode">
|
||||||
update sign_patient_manage_route_node
|
update sign_patient_manage_route_node set dial_status = #{dialStatus}
|
||||||
set dial_status = #{dialStatus}
|
where
|
||||||
where sn = #{sn}
|
sn = #{sn}
|
||||||
and script_info_id = #{scriptInfoId}
|
and script_info_id = #{scriptInfoId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
@ -1046,14 +1045,6 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</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 id="selectNodeCountByCreateTime" resultType="java.lang.Integer">
|
||||||
select count(1)
|
select count(1)
|
||||||
@ -1093,9 +1084,6 @@
|
|||||||
and spmrn.phone_push_sign = 1
|
and spmrn.phone_push_sign = 1
|
||||||
AND spmrn.route_check_status = 'AGREE'
|
AND spmrn.route_check_status = 'AGREE'
|
||||||
AND spmrn.task_node_type in ('PHONE_OUTBOUND','QUESTIONNAIRE_SCALE')
|
AND spmrn.task_node_type in ('PHONE_OUTBOUND','QUESTIONNAIRE_SCALE')
|
||||||
<if test="hospitalAgencyId != null">
|
|
||||||
and pi.hospital_agency_id = #{hospitalAgencyId}
|
|
||||||
</if>
|
|
||||||
</select>
|
</select>
|
||||||
<select id="getFollowUpPlan" resultType="com.xinelu.manage.vo.signpatientmanageroutenode.PatientFollowUpPlanVo">
|
<select id="getFollowUpPlan" resultType="com.xinelu.manage.vo.signpatientmanageroutenode.PatientFollowUpPlanVo">
|
||||||
SELECT task.manage_route_node_id as id,
|
SELECT task.manage_route_node_id as id,
|
||||||
@ -1161,6 +1149,10 @@
|
|||||||
spmrn.sn,
|
spmrn.sn,
|
||||||
spmrn.phone_node_execute_result_status,
|
spmrn.phone_node_execute_result_status,
|
||||||
CASE
|
CASE
|
||||||
|
WHEN spmrn.node_execute_status = 'EXECUTED' THEN '已随访'
|
||||||
|
WHEN spmrn.node_execute_status = 'UNEXECUTED' THEN '未随访'
|
||||||
|
END AS followUpStatus,
|
||||||
|
CASE
|
||||||
WHEN spmrn.phone_dial_method = 'AI' THEN 'AI'
|
WHEN spmrn.phone_dial_method = 'AI' THEN 'AI'
|
||||||
WHEN spmrn.phone_dial_method = 'COMMON' THEN spmrn.route_handle_person
|
WHEN spmrn.phone_dial_method = 'COMMON' THEN spmrn.route_handle_person
|
||||||
END AS phoneDialMethod,
|
END AS phoneDialMethod,
|
||||||
@ -1174,46 +1166,23 @@
|
|||||||
pqsr.remarkable_flag,
|
pqsr.remarkable_flag,
|
||||||
pqsr.id,
|
pqsr.id,
|
||||||
pqsr.total_score,
|
pqsr.total_score,
|
||||||
CASE
|
pi.patient_phone,
|
||||||
WHEN spmr.patient_id is null THEN bsti.patient_name
|
pi.patient_name,
|
||||||
WHEN spmr.patient_id is not null THEN pi.patient_name
|
|
||||||
END AS patientName,
|
|
||||||
CASE
|
|
||||||
WHEN spmr.patient_id is null THEN bsti.patient_phone
|
|
||||||
WHEN spmr.patient_id is not null THEN pi.patient_phone
|
|
||||||
END AS patientPhone,
|
|
||||||
CASE
|
|
||||||
WHEN spmr.patient_id is null THEN bsti.hospital_agency_id
|
|
||||||
WHEN spmr.patient_id is not null THEN pi.hospital_agency_id
|
|
||||||
END AS hospitalAgencyId,
|
|
||||||
CASE
|
|
||||||
WHEN spmr.patient_id is null THEN bsti.hospital_agency_name
|
|
||||||
WHEN spmr.patient_id is not null THEN pi.hospital_agency_name
|
|
||||||
END AS hospitalAgencyName,
|
|
||||||
CASE
|
|
||||||
WHEN spmr.patient_id is null THEN bsti.department_name
|
|
||||||
WHEN spmr.patient_id is not null THEN pi.department_name
|
|
||||||
END AS departmentName,
|
|
||||||
CASE
|
|
||||||
WHEN spmr.patient_id is null THEN bsti.department_id
|
|
||||||
WHEN spmr.patient_id is not null THEN pi.department_id
|
|
||||||
END AS departmentId,
|
|
||||||
CASE
|
|
||||||
WHEN spmr.patient_id is null THEN bsti.visit_date
|
|
||||||
WHEN spmr.patient_id is not null THEN pi.visit_date
|
|
||||||
END AS visitDate,
|
|
||||||
CASE
|
|
||||||
WHEN spmr.patient_id is null THEN bsti.age
|
|
||||||
WHEN spmr.patient_id is not null THEN pi.age
|
|
||||||
END AS age,
|
|
||||||
pi.id AS patientId,
|
pi.id AS patientId,
|
||||||
|
pi.department_name,
|
||||||
|
pi.department_id,
|
||||||
|
pi.hospital_agency_id,
|
||||||
|
pi.hospital_agency_name,
|
||||||
|
pi.visit_date,
|
||||||
|
pi.age,
|
||||||
pi.patient_visit_record_id,
|
pi.patient_visit_record_id,
|
||||||
|
pvr.main_diagnosis,
|
||||||
CASE
|
CASE
|
||||||
WHEN spmrn.task_node_type = 'PHONE_OUTBOUND' THEN spmrn.script_info_id
|
WHEN spmrn.task_node_type = 'PHONE_OUTBOUND' THEN spmrn.script_info_id
|
||||||
WHEN spmrn.task_node_type = 'QUESTIONNAIRE_SCALE' THEN qi.script_info_id
|
WHEN spmrn.task_node_type = 'QUESTIONNAIRE_SCALE' THEN qi.script_info_id
|
||||||
END AS scriptTemplateId,
|
END AS scriptTemplateId,
|
||||||
CASE
|
CASE
|
||||||
WHEN spmrn.task_node_type = 'PHONE_OUTBOUND' THEN spmrn.phone_template_name
|
WHEN spmrn.task_node_type = 'PHONE_OUTBOUND' THEN si.script_name
|
||||||
WHEN spmrn.task_node_type = 'QUESTIONNAIRE_SCALE' THEN qi.script_name
|
WHEN spmrn.task_node_type = 'QUESTIONNAIRE_SCALE' THEN qi.script_name
|
||||||
END AS scriptTemplateName,
|
END AS scriptTemplateName,
|
||||||
(select fill_blanks_answer from patient_question_subject_result
|
(select fill_blanks_answer from patient_question_subject_result
|
||||||
@ -1222,17 +1191,16 @@
|
|||||||
LEFT JOIN sign_patient_manage_route spmr ON spmr.id = spmrn.manage_route_id
|
LEFT JOIN sign_patient_manage_route spmr ON spmr.id = spmrn.manage_route_id
|
||||||
LEFT JOIN patient_question_submit_result pqsr ON pqsr.manage_route_node_id = spmrn.id
|
LEFT JOIN patient_question_submit_result pqsr ON pqsr.manage_route_node_id = spmrn.id
|
||||||
LEFT JOIN patient_info pi ON spmr.patient_id = pi.id
|
LEFT JOIN patient_info pi ON spmr.patient_id = pi.id
|
||||||
-- LEFT JOIN patient_visit_record pvr ON pi.id = pvr.patient_id
|
LEFT JOIN patient_visit_record pvr ON pi.id = pvr.patient_id
|
||||||
LEFT JOIN question_info qi on spmrn.question_info_id = qi.id
|
LEFT JOIN question_info qi on spmrn.question_info_id = qi.id
|
||||||
-- LEFT JOIN script_info si on si.id = spmrn.script_info_id
|
LEFT JOIN script_info si on si.id = spmrn.script_info_id
|
||||||
LEFT JOIN batch_send_task_info bsti on spmr.batch_send_task_id = bsti.id
|
|
||||||
WHERE
|
WHERE
|
||||||
spmrn.del_flag = 0 and spmrn.task_node_type in ('PHONE_OUTBOUND', 'QUESTIONNAIRE_SCALE')
|
spmrn.del_flag = 0
|
||||||
<if test="departmentId != null">
|
<if test="departmentId != null">
|
||||||
and pi.department_id = #{departmentId}
|
and pi.department_id = #{departmentId}
|
||||||
</if>
|
</if>
|
||||||
<if test="hospitalAgencyId != null">
|
<if test="hospitalAgencyId != null">
|
||||||
and (pi.hospital_agency_id = #{hospitalAgencyId} or bsti.hospital_agency_id = #{hospitalAgencyId})
|
and pi.hospital_agency_id = #{hospitalAgencyId}
|
||||||
</if>
|
</if>
|
||||||
<if test="patientId != null">
|
<if test="patientId != null">
|
||||||
and pi.id = #{patientId}
|
and pi.id = #{patientId}
|
||||||
@ -1243,6 +1211,9 @@
|
|||||||
<if test="patientPhone != null">
|
<if test="patientPhone != null">
|
||||||
and pi.patient_phone = #{patientPhone}
|
and pi.patient_phone = #{patientPhone}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="taskNodeType != null and taskNodeType != ''">
|
||||||
|
and spmrn.task_node_type = #{taskNodeType}
|
||||||
|
</if>
|
||||||
<if test="questionInfoId != null">
|
<if test="questionInfoId != null">
|
||||||
AND spmrn.question_info_id = #{questionInfoId}
|
AND spmrn.question_info_id = #{questionInfoId}
|
||||||
</if>
|
</if>
|
||||||
@ -1267,17 +1238,17 @@
|
|||||||
<if test="contentedFlag != null and contentedFlag != ''">
|
<if test="contentedFlag != null and contentedFlag != ''">
|
||||||
and pqsr.contented_flag = #{contentedFlag}
|
and pqsr.contented_flag = #{contentedFlag}
|
||||||
</if>
|
</if>
|
||||||
|
${params.dataScope}
|
||||||
ORDER BY spmrn.create_time DESC
|
ORDER BY spmrn.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="questionnaireTaskStatistics"
|
<select id="questionnaireTaskStatistics"
|
||||||
resultType="com.xinelu.manage.vo.statistics.QuestionnaireTaskStatisticsVo">
|
resultType="com.xinelu.manage.vo.statistics.QuestionnaireTaskStatisticsVo"
|
||||||
|
resultMap="QuestionnaireTaskStatisticsVoResult">
|
||||||
select
|
select
|
||||||
qi.create_time,
|
qi.create_time,
|
||||||
qi.questionnaire_name,
|
qi.questionnaire_name,
|
||||||
spmrn.id manageRouteNodeId,
|
|
||||||
spmrn.question_info_id,
|
spmrn.question_info_id,
|
||||||
pqsjr.question_submit_result_id questionSubmitResultId,
|
|
||||||
pqsjr.question_subject_id,
|
pqsjr.question_subject_id,
|
||||||
pqsjr.question_number,
|
pqsjr.question_number,
|
||||||
pqsjr.question_type,
|
pqsjr.question_type,
|
||||||
@ -1286,7 +1257,39 @@
|
|||||||
pqor.question_subject_option_id questionSubjectOptionId,
|
pqor.question_subject_option_id questionSubjectOptionId,
|
||||||
pqor.option_name,
|
pqor.option_name,
|
||||||
pqor.option_sort,
|
pqor.option_sort,
|
||||||
pqor.option_choose_sign
|
(
|
||||||
|
SELECT
|
||||||
|
count( f.option_choose_sign = 0 OR NULL )
|
||||||
|
FROM
|
||||||
|
sign_patient_manage_route_node a
|
||||||
|
LEFT JOIN sign_patient_manage_route b ON b.id = a.manage_route_id
|
||||||
|
LEFT JOIN patient_info c ON b.patient_id = c.id
|
||||||
|
LEFT JOIN patient_question_submit_result d ON a.id = d.manage_route_node_id
|
||||||
|
LEFT JOIN patient_question_subject_result e ON d.id = e.question_submit_result_id
|
||||||
|
LEFT JOIN patient_question_option_result f ON e.id = f.question_subject_result_id
|
||||||
|
WHERE
|
||||||
|
c.del_flag = 0
|
||||||
|
AND a.question_info_id = spmrn.question_info_id
|
||||||
|
AND e.question_subject_id = pqsjr.question_subject_id
|
||||||
|
AND f.question_subject_option_id = pqor.question_subject_option_id
|
||||||
|
<if test="taskStartTime != null"><!-- 开始时间检索 -->
|
||||||
|
AND date_format(a.node_finish_date,'%y%m%d') >= date_format(#{taskStartTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="taskEndTime != null"><!-- 结束时间检索 -->
|
||||||
|
AND date_format(a.node_finish_date,'%y%m%d') <= date_format(#{taskEndTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="visitStartTime != null and visitEndTime != null">
|
||||||
|
and( (date_format(c.visit_date, '%y%m%d') >= date_format(#{visitStartTime}, '%y%m%d')
|
||||||
|
and date_format(c.visit_date, '%y%m%d') <= date_format(#{visitEndTime}, '%y%m%d'))
|
||||||
|
or (date_format(c.discharge_time,'%y%m%d') >= date_format(#{visitStartTime}, '%y%m%d') and
|
||||||
|
date_format(c.discharge_time,'%y%m%d') <= date_format(#{visitEndTime}, '%y%m%d')))
|
||||||
|
</if>
|
||||||
|
) choiceNumber,
|
||||||
|
(
|
||||||
|
SELECT count( 1 ) FROM sign_patient_manage_route_node a
|
||||||
|
LEFT JOIN patient_question_submit_result d ON a.id = d.manage_route_node_id
|
||||||
|
WHERE a.question_info_id = spmrn.question_info_id
|
||||||
|
) total
|
||||||
from sign_patient_manage_route_node spmrn
|
from sign_patient_manage_route_node spmrn
|
||||||
left join question_info qi on spmrn.question_info_id = qi.id
|
left join question_info qi on spmrn.question_info_id = qi.id
|
||||||
left join sign_patient_manage_route spmr on spmr.id = spmrn.manage_route_id
|
left join sign_patient_manage_route spmr on spmr.id = spmrn.manage_route_id
|
||||||
|
|||||||
@ -18,7 +18,6 @@
|
|||||||
<result property="textMessageSort" column="text_message_sort"/>
|
<result property="textMessageSort" column="text_message_sort"/>
|
||||||
<result property="textMessageRemark" column="text_message_remark"/>
|
<result property="textMessageRemark" column="text_message_remark"/>
|
||||||
<result property="sourceTemplateId" column="source_template_id"/>
|
<result property="sourceTemplateId" column="source_template_id"/>
|
||||||
<result property="variables" column="variables"/>
|
|
||||||
<result property="createBy" column="create_by"/>
|
<result property="createBy" column="create_by"/>
|
||||||
<result property="createTime" column="create_time"/>
|
<result property="createTime" column="create_time"/>
|
||||||
<result property="updateBy" column="update_by"/>
|
<result property="updateBy" column="update_by"/>
|
||||||
@ -40,7 +39,6 @@
|
|||||||
<result column="text_message_sort" property="textMessageSort"/>
|
<result column="text_message_sort" property="textMessageSort"/>
|
||||||
<result column="text_message_remark" property="textMessageRemark"/>
|
<result column="text_message_remark" property="textMessageRemark"/>
|
||||||
<result property="sourceTemplateId" column="source_template_id"/>
|
<result property="sourceTemplateId" column="source_template_id"/>
|
||||||
<result property="variables" column="variables"/>
|
|
||||||
<collection property="suitTaskList" ofType="com.xinelu.manage.domain.textmessagesuittask.TextMessageSuitTask">
|
<collection property="suitTaskList" ofType="com.xinelu.manage.domain.textmessagesuittask.TextMessageSuitTask">
|
||||||
<id column="taskId" property="id"/>
|
<id column="taskId" property="id"/>
|
||||||
<result column="message_id" property="messageId"/>
|
<result column="message_id" property="messageId"/>
|
||||||
@ -63,7 +61,6 @@
|
|||||||
text_message_sort,
|
text_message_sort,
|
||||||
text_message_remark,
|
text_message_remark,
|
||||||
source_template_id,
|
source_template_id,
|
||||||
variables,
|
|
||||||
create_by,
|
create_by,
|
||||||
create_time,
|
create_time,
|
||||||
update_by,
|
update_by,
|
||||||
@ -90,7 +87,6 @@
|
|||||||
tm.text_message_channel,
|
tm.text_message_channel,
|
||||||
tm.text_message_status,
|
tm.text_message_status,
|
||||||
tm.text_message_sort,
|
tm.text_message_sort,
|
||||||
tm.variables,
|
|
||||||
tm.text_message_remark,
|
tm.text_message_remark,
|
||||||
tmst.id AS taskId,
|
tmst.id AS taskId,
|
||||||
tmst.message_id,
|
tmst.message_id,
|
||||||
@ -118,7 +114,6 @@
|
|||||||
tm.text_message_sort,
|
tm.text_message_sort,
|
||||||
tm.text_message_remark,
|
tm.text_message_remark,
|
||||||
tm.source_template_id,
|
tm.source_template_id,
|
||||||
tm.variables,
|
|
||||||
tmst.id AS taskId,
|
tmst.id AS taskId,
|
||||||
tmst.message_id,
|
tmst.message_id,
|
||||||
tmst.suit_task_type_id,
|
tmst.suit_task_type_id,
|
||||||
@ -200,8 +195,6 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="sourceTemplateId != null">source_template_id,
|
<if test="sourceTemplateId != null">source_template_id,
|
||||||
</if>
|
</if>
|
||||||
<if test="variables != null">variables,
|
|
||||||
</if>
|
|
||||||
<if test="createBy != null">create_by,
|
<if test="createBy != null">create_by,
|
||||||
</if>
|
</if>
|
||||||
<if test="createTime != null">create_time,
|
<if test="createTime != null">create_time,
|
||||||
@ -236,8 +229,6 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="sourceTemplateId != null">#{sourceTemplateId},
|
<if test="sourceTemplateId != null">#{sourceTemplateId},
|
||||||
</if>
|
</if>
|
||||||
<if test="variables != null">#{variables},
|
|
||||||
</if>
|
|
||||||
<if test="createBy != null">#{createBy},
|
<if test="createBy != null">#{createBy},
|
||||||
</if>
|
</if>
|
||||||
<if test="createTime != null">#{createTime},
|
<if test="createTime != null">#{createTime},
|
||||||
@ -304,7 +295,6 @@
|
|||||||
<if test="sourceTemplateId != null">source_template_id =
|
<if test="sourceTemplateId != null">source_template_id =
|
||||||
#{sourceTemplateId},
|
#{sourceTemplateId},
|
||||||
</if>
|
</if>
|
||||||
variables = #{variables},
|
|
||||||
<if test="createBy != null">create_by =
|
<if test="createBy != null">create_by =
|
||||||
#{createBy},
|
#{createBy},
|
||||||
</if>
|
</if>
|
||||||
@ -364,8 +354,4 @@
|
|||||||
from text_message_suit_task
|
from text_message_suit_task
|
||||||
where message_id = #{id}
|
where message_id = #{id}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="selectTextMessages" resultType="com.xinelu.manage.vo.textmessage.TextMessageVO">
|
|
||||||
<include refid="selectTextMessageVo"/>
|
|
||||||
</select>
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -1,23 +1,12 @@
|
|||||||
package com.xinelu.quartz.controller;
|
package com.xinelu.quartz.controller;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
|
||||||
import com.aliyuncs.exceptions.ClientException;
|
import com.aliyuncs.exceptions.ClientException;
|
||||||
import com.xinelu.manage.domain.shortmessagesendrecord.ShortMessageSendRecord;
|
|
||||||
import com.xinelu.manage.domain.textmessage.SmsReport;
|
|
||||||
import com.xinelu.manage.mapper.shortmessagesendrecord.ShortMessageSendRecordMapper;
|
|
||||||
import com.xinelu.quartz.service.SendTextMessageService;
|
|
||||||
import com.xinelu.quartz.task.SendTextMessageTask;
|
import com.xinelu.quartz.task.SendTextMessageTask;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description 短信相关定时任务
|
* @Description 短信相关定时任务
|
||||||
@ -30,12 +19,6 @@ public class SendTextMessageController {
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private SendTextMessageTask textMessageTask;
|
private SendTextMessageTask textMessageTask;
|
||||||
@Resource
|
|
||||||
private SendTextMessageService sendTextMessageService;
|
|
||||||
@Resource
|
|
||||||
private ShortMessageSendRecordMapper shortMessageSendRecordMapper;
|
|
||||||
@Resource
|
|
||||||
private SendTextMessageTask sendTextMessageTask;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 手动执行短信发送定时任务
|
* 手动执行短信发送定时任务
|
||||||
@ -44,24 +27,4 @@ public class SendTextMessageController {
|
|||||||
public void textMessageSend() throws ClientException {
|
public void textMessageSend() throws ClientException {
|
||||||
textMessageTask.automaticSendTextMessageTask();
|
textMessageTask.automaticSendTextMessageTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/textMessageSendBask")
|
|
||||||
public JSONObject textMessageSendBask(SmsReport data) {
|
|
||||||
JSONObject retObj = new JSONObject();
|
|
||||||
retObj.fluentPut("code", 0).fluentPut("msg", "成功");
|
|
||||||
if (Objects.isNull(data) || StringUtils.isBlank(data.getPhone_number())) {
|
|
||||||
return retObj;
|
|
||||||
}
|
|
||||||
List<ShortMessageSendRecord> shortMessageSendRecords = new ArrayList<>();
|
|
||||||
JSONObject jsonObject = sendTextMessageService.taskTextMessageSendBack(data, shortMessageSendRecords);
|
|
||||||
if (CollectionUtils.isNotEmpty(shortMessageSendRecords)) {
|
|
||||||
shortMessageSendRecordMapper.insertShortMessageSendRecords(shortMessageSendRecords);
|
|
||||||
}
|
|
||||||
return jsonObject;
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/aa")
|
|
||||||
public void aa() {
|
|
||||||
sendTextMessageTask.smsReportBack();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,12 +1,6 @@
|
|||||||
package com.xinelu.quartz.service;
|
package com.xinelu.quartz.service;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
|
||||||
import com.aliyuncs.exceptions.ClientException;
|
import com.aliyuncs.exceptions.ClientException;
|
||||||
import com.xinelu.manage.domain.shortmessagesendrecord.ShortMessageSendRecord;
|
|
||||||
import com.xinelu.manage.domain.textmessage.SmsReport;
|
|
||||||
import com.xinelu.manage.domain.textmessage.TaskMessageBackEntity;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description 短信发送定时任务业务层
|
* @Description 短信发送定时任务业务层
|
||||||
@ -19,18 +13,4 @@ public interface SendTextMessageService {
|
|||||||
* 签约患者管理任务路径节点短信发送定时任务
|
* 签约患者管理任务路径节点短信发送定时任务
|
||||||
*/
|
*/
|
||||||
void sendTextMessageSendTask() throws ClientException;
|
void sendTextMessageSendTask() throws ClientException;
|
||||||
|
|
||||||
List<TaskMessageBackEntity> taskMessageBack(TaskMessageBackEntity taskMessageBackEntity);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 任务执行回调方法
|
|
||||||
*
|
|
||||||
* @param data 任务单通电话回调传输data
|
|
||||||
* @return JSONObject
|
|
||||||
*/
|
|
||||||
JSONObject taskTextMessageSendBack(SmsReport data, List<ShortMessageSendRecord> shortMessageSendRecords);
|
|
||||||
|
|
||||||
Integer updateReadState(Integer readState, List<Integer> ids);
|
|
||||||
|
|
||||||
Integer deleteData();
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,16 +1,10 @@
|
|||||||
package com.xinelu.quartz.service.impl;
|
package com.xinelu.quartz.service.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
|
||||||
import com.alibaba.fastjson2.JSONArray;
|
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
|
||||||
import com.aliyuncs.exceptions.ClientException;
|
import com.aliyuncs.exceptions.ClientException;
|
||||||
import com.xinelu.common.config.AliYunSmsTwoConfig;
|
import com.xinelu.common.config.AliYunSmsTwoConfig;
|
||||||
import com.xinelu.common.config.PushMessageRestrictions;
|
import com.xinelu.common.config.PushMessageRestrictions;
|
||||||
import com.xinelu.common.enums.*;
|
import com.xinelu.common.enums.*;
|
||||||
import com.xinelu.manage.domain.shortmessagesendrecord.ShortMessageSendRecord;
|
import com.xinelu.manage.domain.shortmessagesendrecord.ShortMessageSendRecord;
|
||||||
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
|
|
||||||
import com.xinelu.manage.domain.textmessage.SmsReport;
|
|
||||||
import com.xinelu.manage.domain.textmessage.TaskMessageBackEntity;
|
|
||||||
import com.xinelu.manage.dto.smssend.SmsInfoDTO;
|
import com.xinelu.manage.dto.smssend.SmsInfoDTO;
|
||||||
import com.xinelu.manage.mapper.shortmessagesendrecord.ShortMessageSendRecordMapper;
|
import com.xinelu.manage.mapper.shortmessagesendrecord.ShortMessageSendRecordMapper;
|
||||||
import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper;
|
import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper;
|
||||||
@ -21,20 +15,12 @@ import com.xinelu.mobile.utils.SmsSendUtils;
|
|||||||
import com.xinelu.quartz.service.SendTextMessageService;
|
import com.xinelu.quartz.service.SendTextMessageService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.http.HttpEntity;
|
|
||||||
import org.springframework.http.HttpMethod;
|
|
||||||
import org.springframework.http.ResponseEntity;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.web.client.RestTemplate;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
|
||||||
import java.time.temporal.ChronoUnit;
|
import java.time.temporal.ChronoUnit;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@ -60,8 +46,6 @@ public class SendTextMessageServiceImpl implements SendTextMessageService {
|
|||||||
private ShortMessageSendRecordMapper shortMessageSendRecordMapper;
|
private ShortMessageSendRecordMapper shortMessageSendRecordMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private IPatientTaskStatisticsService patientTaskStatisticsService;
|
private IPatientTaskStatisticsService patientTaskStatisticsService;
|
||||||
@Value("${aiob.callBackUrl}")
|
|
||||||
private String callBackUrl;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 签约患者管理任务路径节点短信发送定时任务
|
* 签约患者管理任务路径节点短信发送定时任务
|
||||||
@ -103,7 +87,7 @@ public class SendTextMessageServiceImpl implements SendTextMessageService {
|
|||||||
localDate = textMessage.getVisitDate().plusDays(textMessage.getRouteNodeDay());
|
localDate = textMessage.getVisitDate().plusDays(textMessage.getRouteNodeDay());
|
||||||
}
|
}
|
||||||
//没有天数按执行时间处理NodePlanTime
|
//没有天数按执行时间处理NodePlanTime
|
||||||
if (Objects.isNull(textMessage.getRouteNodeDay()) && Objects.nonNull(textMessage.getNodePlanTime())) {
|
if (Objects.isNull(textMessage.getRouteNodeDay()) && Objects.nonNull(textMessage.getNodePlanTime())){
|
||||||
localDate = textMessage.getNodePlanTime().toLocalDate();//新加的外呼立即执行没有getRouteNodeDay
|
localDate = textMessage.getNodePlanTime().toLocalDate();//新加的外呼立即执行没有getRouteNodeDay
|
||||||
}
|
}
|
||||||
if (Objects.isNull(localDate)) {
|
if (Objects.isNull(localDate)) {
|
||||||
@ -118,7 +102,7 @@ public class SendTextMessageServiceImpl implements SendTextMessageService {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//没有天数按执行时间处理NodePlanTime
|
//没有天数按执行时间处理NodePlanTime
|
||||||
if (Objects.isNull(textMessage.getRouteNodeDay()) && now.isBefore(textMessage.getNodePlanTime())) {
|
if (Objects.isNull(textMessage.getRouteNodeDay()) && now.isBefore(textMessage.getNodePlanTime())){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
textMessage.setRouteNodeName(RouteNodeNameEnum.getNameByInfo(textMessage.getRouteNodeName()).getName());
|
textMessage.setRouteNodeName(RouteNodeNameEnum.getNameByInfo(textMessage.getRouteNodeName()).getName());
|
||||||
@ -223,89 +207,4 @@ public class SendTextMessageServiceImpl implements SendTextMessageService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<TaskMessageBackEntity> taskMessageBack(TaskMessageBackEntity taskMessageBackEntity) {
|
|
||||||
// 接口获取外呼回调数据app
|
|
||||||
List<TaskMessageBackEntity> taskMessageBackEntityList = new ArrayList<>();
|
|
||||||
HttpEntity<JSONObject> requestEntity = new HttpEntity<>((JSONObject) JSON.toJSON(taskMessageBackEntity));
|
|
||||||
RestTemplate restTemplate = new RestTemplate();
|
|
||||||
log.info("接口获取短信回调数据");
|
|
||||||
ResponseEntity<String> responseEntity = restTemplate.exchange(callBackUrl + "/getMessageBackList", HttpMethod.POST, requestEntity, String.class);
|
|
||||||
JSONObject object = JSON.parseObject(responseEntity.getBody());
|
|
||||||
if (object == null || object.getInteger("code") == null || object.getInteger("code") != 0) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (object.containsKey("data")) {
|
|
||||||
JSONArray data = object.getJSONArray("data");
|
|
||||||
if (data != null && data.size() > 0) {
|
|
||||||
taskMessageBackEntityList = data.toJavaList(TaskMessageBackEntity.class);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
log.info("共短信回调数据" + taskMessageBackEntityList.size() + "条");
|
|
||||||
return taskMessageBackEntityList;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public JSONObject taskTextMessageSendBack(SmsReport data, List<ShortMessageSendRecord> shortMessageSendRecords) {
|
|
||||||
JSONObject retObj = new JSONObject();
|
|
||||||
retObj.fluentPut("code", 0).fluentPut("msg", "成功");
|
|
||||||
SignPatientManageRouteNode signPatientManageRouteNode = signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeById(Long.valueOf(data.getOut_id()));
|
|
||||||
if (Objects.isNull(signPatientManageRouteNode) || signPatientManageRouteNode.getNodeExecuteStatus().equals(NodeExecuteStatusEnum.EXECUTED.getInfo())) {
|
|
||||||
return retObj;
|
|
||||||
}
|
|
||||||
ShortMessageSendRecord shortMessageSendRecord = new ShortMessageSendRecord();
|
|
||||||
if (ObjectUtils.isNotEmpty(signPatientManageRouteNode) && signPatientManageRouteNode.getMessagePushSign() == 1) {
|
|
||||||
if (data.getSuccess()) {
|
|
||||||
// 标记任务执行状态
|
|
||||||
signPatientManageRouteNode.setNodeExecuteStatus(NodeExecuteStatusEnum.EXECUTED.getInfo());
|
|
||||||
signPatientManageRouteNode.setMessageNodeExecuteResultStatus(NodeExecuteResultStatusEnum.SUCCESS.getInfo());
|
|
||||||
shortMessageSendRecord.setErrorStatus(ErrorStatusEnum.success.getValue());
|
|
||||||
shortMessageSendRecord.setErrorCode(0L);
|
|
||||||
} else {
|
|
||||||
// 标记任务执行状态
|
|
||||||
signPatientManageRouteNode.setNodeExecuteStatus(NodeExecuteStatusEnum.EXECUTED.getInfo());
|
|
||||||
signPatientManageRouteNode.setMessageNodeExecuteResultStatus(NodeExecuteResultStatusEnum.FAILURE.getInfo());
|
|
||||||
shortMessageSendRecord.setErrorStatus(ErrorStatusEnum.fail.getValue());
|
|
||||||
shortMessageSendRecord.setErrorCode(1L);
|
|
||||||
shortMessageSendRecord.setErrMsg(data.getErr_msg());
|
|
||||||
}
|
|
||||||
shortMessageSendRecord.setSendTime(LocalDateTime.parse(data.getSend_time(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
|
||||||
shortMessageSendRecord.setManageRouteNodeId(signPatientManageRouteNode.getId());
|
|
||||||
shortMessageSendRecord.setPatientPhone(data.getPhone_number());
|
|
||||||
shortMessageSendRecord.setMessageTemplateId(signPatientManageRouteNode.getMessageTemplateCode());
|
|
||||||
shortMessageSendRecord.setMessageNodeContent(signPatientManageRouteNode.getMessageNodeContent());
|
|
||||||
shortMessageSendRecord.setMessageType("COMMON");
|
|
||||||
shortMessageSendRecord.setMessageQuantity(Long.valueOf(data.getSms_size()));
|
|
||||||
shortMessageSendRecord.setMessageUnitPrice(new BigDecimal("0.1"));
|
|
||||||
shortMessageSendRecord.setCreateBy("system");
|
|
||||||
shortMessageSendRecord.setCreateTime(LocalDateTime.now());
|
|
||||||
shortMessageSendRecord.setMessageExpense(shortMessageSendRecord.getMessageUnitPrice().multiply(new BigDecimal(shortMessageSendRecord.getMessageQuantity())));
|
|
||||||
shortMessageSendRecords.add(shortMessageSendRecord);
|
|
||||||
signPatientManageRouteNodeMapper.updateSignPatientManageRouteNode(signPatientManageRouteNode);
|
|
||||||
}
|
|
||||||
return retObj;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Integer updateReadState(Integer readState, List<Integer> ids) {
|
|
||||||
log.info("修改短信回调数据已读状态--id:{}", ids);
|
|
||||||
JSONObject TaskCallbackUpdateDto = new JSONObject();
|
|
||||||
TaskCallbackUpdateDto.fluentPut("ids", ids.toString()).fluentPut("readState", readState);
|
|
||||||
HttpEntity<JSONObject> requestEntity = new HttpEntity<>(TaskCallbackUpdateDto);
|
|
||||||
RestTemplate restTemplate = new RestTemplate();
|
|
||||||
ResponseEntity<String> responseEntity = restTemplate.exchange(callBackUrl + "/updateMessageBackReadState", HttpMethod.POST, requestEntity, String.class);
|
|
||||||
JSONObject object = JSON.parseObject(responseEntity.getBody());
|
|
||||||
if (object == null || object.getInteger("code") == null || object.getInteger("code") != 0) {
|
|
||||||
log.info("修改百度外呼回调数据已读状态失败--id:{},原因:{}", ids, object.getString("message"));
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
log.info("修改百度外呼回调数据已读状态成功--id:{}", ids);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Integer deleteData() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,22 +1,12 @@
|
|||||||
package com.xinelu.quartz.task;
|
package com.xinelu.quartz.task;
|
||||||
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
|
||||||
import com.aliyuncs.exceptions.ClientException;
|
import com.aliyuncs.exceptions.ClientException;
|
||||||
import com.xinelu.manage.domain.shortmessagesendrecord.ShortMessageSendRecord;
|
|
||||||
import com.xinelu.manage.domain.textmessage.SmsReport;
|
|
||||||
import com.xinelu.manage.domain.textmessage.TaskMessageBackEntity;
|
|
||||||
import com.xinelu.manage.mapper.shortmessagesendrecord.ShortMessageSendRecordMapper;
|
|
||||||
import com.xinelu.quartz.service.SendTextMessageService;
|
import com.xinelu.quartz.service.SendTextMessageService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description 短信相关定时任务
|
* @Description 短信相关定时任务
|
||||||
@ -29,8 +19,6 @@ public class SendTextMessageTask {
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private SendTextMessageService sendTextMessageService;
|
private SendTextMessageService sendTextMessageService;
|
||||||
@Resource
|
|
||||||
private ShortMessageSendRecordMapper shortMessageSendRecordMapper;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 签约患者管理任务路径节点短信发送定时任务
|
* 签约患者管理任务路径节点短信发送定时任务
|
||||||
@ -40,45 +28,4 @@ public class SendTextMessageTask {
|
|||||||
sendTextMessageService.sendTextMessageSendTask();
|
sendTextMessageService.sendTextMessageSendTask();
|
||||||
log.info("完成订阅签约患者管理任务路径节点推送定时任务......");
|
log.info("完成订阅签约患者管理任务路径节点推送定时任务......");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void smsReportBack() {
|
|
||||||
log.info("开始执行同步短信回调数据定时任务......");
|
|
||||||
TaskMessageBackEntity taskMessageBackEntity = new TaskMessageBackEntity();
|
|
||||||
taskMessageBackEntity.setReadState(0);
|
|
||||||
List<TaskMessageBackEntity> taskMessageBackEntityList = sendTextMessageService.taskMessageBack(taskMessageBackEntity);
|
|
||||||
List<ShortMessageSendRecord> shortMessageSendRecords = new ArrayList<>();
|
|
||||||
if (!CollectionUtils.isEmpty(taskMessageBackEntityList)) {
|
|
||||||
// 回调数据提取
|
|
||||||
List<SmsReport> smsReports = new ArrayList<>();
|
|
||||||
taskMessageBackEntityList.forEach(entity -> {
|
|
||||||
// JSONString 转 SmsReport
|
|
||||||
smsReports.addAll(JSON.parseArray(entity.getMessageBackData().toString(), SmsReport.class));
|
|
||||||
});
|
|
||||||
log.info("短信数据提取完成共" + smsReports.size() + "条");
|
|
||||||
if (CollectionUtils.isNotEmpty(smsReports)) {
|
|
||||||
for (SmsReport smsReport : smsReports) {
|
|
||||||
// 回调数据解析
|
|
||||||
sendTextMessageService.taskTextMessageSendBack(smsReport, shortMessageSendRecords);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (CollectionUtils.isNotEmpty(shortMessageSendRecords)) {
|
|
||||||
log.info("新增短信发送记录" + shortMessageSendRecords.size() + "条");
|
|
||||||
shortMessageSendRecordMapper.insertShortMessageSendRecords(shortMessageSendRecords);
|
|
||||||
}
|
|
||||||
List<Integer> ids = taskMessageBackEntityList.stream().filter(Objects::nonNull).map(TaskMessageBackEntity::getId).collect(Collectors.toList());
|
|
||||||
// 修改阿里云服务器回调数据已读状态
|
|
||||||
if (CollectionUtils.isNotEmpty(ids)) {
|
|
||||||
log.info("修改中站记录" + ids.size() + "条");
|
|
||||||
sendTextMessageService.updateReadState(1, ids);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
log.info("完成同步短信回调数据定时任务......");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void clearCallbackData() {
|
|
||||||
log.info("开始执行清除过期的百度外呼回调数据定时任务......");
|
|
||||||
// 清除一个月前的数据
|
|
||||||
int count = sendTextMessageService.deleteData();
|
|
||||||
log.info("完成清除过期的百度外呼回调数据定时任务,共清除" + count + "条......");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -161,17 +161,10 @@ public class UploadRobotPublishTask {
|
|||||||
if (StringUtils.isBlank(taskId)) {
|
if (StringUtils.isBlank(taskId)) {
|
||||||
Long aLong = patientInfoImportMainMapper.selectHospitalAgencyId(sn);
|
Long aLong = patientInfoImportMainMapper.selectHospitalAgencyId(sn);
|
||||||
DialTime dialTime = patientInfoImportMainMapper.selectDialTimeById(aLong);
|
DialTime dialTime = patientInfoImportMainMapper.selectDialTimeById(aLong);
|
||||||
LocalTime localStartTime = null;
|
LocalTime localStartTime = LocalTime.parse(dialTime.getDialStartTime());
|
||||||
LocalTime localEndTime = null;
|
LocalTime localEndTime = LocalTime.parse(dialTime.getDialEndTime());
|
||||||
LocalTime dateStartTime;
|
LocalTime dateStartTime;
|
||||||
LocalTime dateEndTime;
|
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);
|
List<SysDictData> sysDictDataList = iSysDictTypeService.selectDictDataByType(Constants.DIAL_TIME);
|
||||||
if (CollectionUtils.isEmpty(sysDictDataList) || sysDictDataList.size() != 2) {
|
if (CollectionUtils.isEmpty(sysDictDataList) || sysDictDataList.size() != 2) {
|
||||||
dateStartTime = LocalTime.parse("08:00");
|
dateStartTime = LocalTime.parse("08:00");
|
||||||
@ -180,7 +173,7 @@ public class UploadRobotPublishTask {
|
|||||||
dateStartTime = LocalTime.parse(sysDictDataList.get(0).getDictValue());
|
dateStartTime = LocalTime.parse(sysDictDataList.get(0).getDictValue());
|
||||||
dateEndTime = LocalTime.parse(sysDictDataList.get(1).getDictValue());
|
dateEndTime = LocalTime.parse(sysDictDataList.get(1).getDictValue());
|
||||||
}
|
}
|
||||||
if (dateStartTime.isAfter(localStartTime)) {
|
if (dateStartTime.isAfter(localStartTime) ) {
|
||||||
localStartTime = dateStartTime;
|
localStartTime = dateStartTime;
|
||||||
}
|
}
|
||||||
if (dateEndTime.isBefore(localEndTime)) {
|
if (dateEndTime.isBefore(localEndTime)) {
|
||||||
@ -204,7 +197,7 @@ public class UploadRobotPublishTask {
|
|||||||
createTaskDto.setRetryInterval(nodeFirstTemp.getPhoneTimeInterval());
|
createTaskDto.setRetryInterval(nodeFirstTemp.getPhoneTimeInterval());
|
||||||
createTaskDto.setNumTypeFilterList(Arrays.asList(1, 2));
|
createTaskDto.setNumTypeFilterList(Arrays.asList(1, 2));
|
||||||
createTaskDto.setTaskDataCallback(true);
|
createTaskDto.setTaskDataCallback(true);
|
||||||
createTaskDto.setCallBackUrl(callBackUrl+ "/taskCallBack");
|
createTaskDto.setCallBackUrl(callBackUrl);
|
||||||
createTaskDto.setDialStartTime(localStartTime.format(DateTimeFormatter.ofPattern("HH:mm")));
|
createTaskDto.setDialStartTime(localStartTime.format(DateTimeFormatter.ofPattern("HH:mm")));
|
||||||
createTaskDto.setDialEndTime(localEndTime.format(DateTimeFormatter.ofPattern("HH:mm")));
|
createTaskDto.setDialEndTime(localEndTime.format(DateTimeFormatter.ofPattern("HH:mm")));
|
||||||
taskId = aiobService.createTask(createTaskDto);
|
taskId = aiobService.createTask(createTaskDto);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user