预警短信发送,修试入库数量显示
This commit is contained in:
parent
f547c8af75
commit
e91ff17b80
|
|
@ -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()) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue