预警短信发送,修试入库数量显示

This commit is contained in:
hongchao 2025-08-29 14:51:46 +08:00
parent f547c8af75
commit e91ff17b80
4 changed files with 23 additions and 7 deletions

View File

@ -43,7 +43,9 @@ public class ScheduledCheckWarning {
/**
* 定时任务执行频率每周三/五天上午9点执行一次
*/
private String cronExpression = "0 0 9 ? * WED,FRI";
// private String cronExpression = "0 0 9 ? * WED,FRI";
private String cronExpression = "0 0 17 ? * WED,FRI";
/**
@ -71,7 +73,8 @@ public class ScheduledCheckWarning {
private String getCronFromDatabase() {
// 这里假设从数据库中获取 cron 表达式
//return "0 */1 * * * ?";
return "0 0 9 ? * WED,FRI";
return "0 0 17 ? * WED,FRI";
// return "0 0 9 ? * WED,FRI";
}
/**
@ -104,12 +107,15 @@ public class ScheduledCheckWarning {
if(userList !=null && userList.size()>0){
for (UseMaintenanceWarningBean item : userList){
UseMaintenanceWarningBean item1 = mapper.getUserPhoneById(item);
mobileList.add(item1.getClzPhone());
if(item1.getClzPhone() != null){
mobileList.add(item1.getClzPhone());
}
}
}
mobileList.add(leaderPhone);
mobileList.add(engPhone);
System.out.println("短信发送成功: " + mobileList);
if (CollectionUtils.isNotEmpty(mobileList)){
JSONObject sendResult = SmsTool.sendSms(new BatchSmsByContentParam(mobileList, content), BmConfigItems.ANHUI_COMPANY_SMS_KEY);
if (sendResult != null && !sendResult.isEmpty()) {
@ -141,10 +147,12 @@ public class ScheduledCheckWarning {
if(userManger !=null && userManger.size()>0){
for (UseMaintenanceWarningBean item : userManger){
UseMaintenanceWarningBean item1 = mapper.getUserPhoneById(item);
mobileList2.add(item1.getFkzPhone());
if(item1.getClzPhone() != null){
mobileList2.add(item1.getClzPhone());
}
}
}
System.out.println("短信发送成功: " + mobileList2);
if (CollectionUtils.isNotEmpty(mobileList2)){
JSONObject sendResult = SmsTool.sendSms(new BatchSmsByContentParam(mobileList2, content2), BmConfigItems.ANHUI_COMPANY_SMS_KEY);
if (sendResult != null && !sendResult.isEmpty()) {

View File

@ -85,7 +85,7 @@ public class UseMaintenanceWarningBean extends BaseEntity {
* 工程标段ID
*/
@ApiModelProperty(value = "工程标段ID")
private Long projectId;
private String projectId;
/**
* 临检天数
@ -126,4 +126,8 @@ public class UseMaintenanceWarningBean extends BaseEntity {
@ApiModelProperty(value = "所属分公司")
private Long deptId;
private String userName;
private Long userId;
}

View File

@ -45,6 +45,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bpi.pro_name AS backPro,
su.nick_name AS createBy,
tt.CODE AS inputCode,
SUM(IFNULL(rd.repair_num, 0)) as pendingInputNum,
SUM(IFNULL(rd.input_num, 0)) as inputNum,
GROUP_CONCAT(DISTINCT mt2.type_name) AS materialType,
tta.agreement_id as agreementId,
GROUP_CONCAT( DISTINCT mt4.type_id) as firstId
@ -102,6 +104,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bpi.pro_name AS backPro,
su.nick_name AS createBy,
tt.CODE AS inputCode,
SUM(IFNULL(rd.repair_num, 0)) as pendingInputNum,
SUM(IFNULL(rd.input_num, 0)) as inputNum,
GROUP_CONCAT(DISTINCT mt2.type_name) AS materialType,
tta.agreement_id as agreementId,
GROUP_CONCAT( DISTINCT mt4.type_id) as firstId

View File

@ -275,7 +275,7 @@
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-scratchpad</artifactId>
<version>5.2.3</version>
<version>4.1.2</version>
</dependency>
<dependency>
<groupId>fr.opensagres.xdocreport</groupId>