暂停微信通知发放

This commit is contained in:
andy 2026-07-29 09:48:02 +08:00
parent 35e75d8e68
commit c34cb201f6
4 changed files with 103 additions and 49 deletions

View File

@ -215,19 +215,19 @@ public class TestController {
// params.add("files", resource);
//// params.add("files", resource1);
// StringBuilder markdownMsg = new StringBuilder();
// markdownMsg.append("### 🚀 安全库存提醒\n\n")
// .append("今日暂无安全库存预警数据。\n\n");
// markdownMsg.append("### 🚀 安全库存提醒")
// .append("今日暂无安全库存预警数据。");
// // 只显示前三个安全库存数据
// markdownMsg.append("**物料编号: ").append("123321").append("**\n")
// .append("- 物料名称: ").append("测试测试567").append("\n")
// .append("- 预计可用量: ").append("200").append("\n")
// .append("- 即时库存: ").append("100").append("\n")
// .append("- 最大库存: ").append("50").append("\n")
// .append("- 创建时间: ").append(DateUtil.formatDateTime(new Date())).append("\n")
// .append("---\n"); // 添加分隔线
// markdownMsg.append("**物料编号: ").append("123321").append("**")
// .append("- 物料名称: ").append("测试测试567").append("")
// .append("- 预计可用量: ").append("200").append("")
// .append("- 即时库存: ").append("100").append("")
// .append("- 最大库存: ").append("50").append("")
// .append("- 创建时间: ").append(DateUtil.formatDateTime(new Date())).append("")
// .append("---"); // 添加分隔线
// // 添加总数汇总
// markdownMsg.append("**总数汇总**\n")
// .append("- 今日安全库存预警数据总数: **").append(50).append("**\n");
// markdownMsg.append("**总数汇总**")
// .append("- 今日安全库存预警数据总数: **").append(50).append("**");
//
//
//
@ -255,36 +255,36 @@ public class TestController {
//String data = "{\"FormId\":\"BD_Empinfo\",\"FieldKeys\":\"FID\",\"FilterString\":[{\"Left\":\"\",\"FieldName\":\"FStaffNumber\",\"Compare\":\"17\",\"Value\":\"00046\",\"Right\":\"\",\"Logic\":0}],\"OrderString\":\"\",\"TopRowCount\":0,\"StartRow\":0,\"Limit\":2000,\"SubSystemId\":\"\"}";
//
// String data = "{\n" +
// " \"FormId\" : \"PRD_MO\",\n" +
// " \"FieldKeys\" : \"F_HBYT_SCLH,FBillNo,FWorkShopID.FName,FMaterialId.FNumber,FMaterialName,FPlanStartDate,FPlanFinishDate,FPickMtrlStatus\",\n" +
// " \"FilterString\" : [ {\n" +
// " \"FieldName\" : \"FStatus\",\n" +
// " \"Compare\" : \"105\",\n" +
// " \"Value\" : \"4\",\n" +
// " \"Left\" : \"\",\n" +
// " \"Right\" : \"\",\n" +
// " \"Logic\" : 0\n" +
// " }, {\n" +
// " \"FieldName\" : \"FPickMtrlStatus\",\n" +
// " \"Compare\" : \"29\",\n" +
// " \"Value\" : \"1\",\n" +
// " \"Left\" : \"\",\n" +
// " \"Right\" : \"\",\n" +
// " \"Logic\" : 0\n" +
// " }, {\n" +
// " \"FieldName\" : \"F_HBYT_SCLH\",\n" +
// " \"Compare\" : \"67\",\n" +
// " \"Value\" : \"QB-26-163-XCL\",\n" +
// " \"Left\" : \"\",\n" +
// " \"Right\" : \"\",\n" +
// " \"Logic\" : 0\n" +
// " } ],\n" +
// " \"OrderString\" : \"\",\n" +
// " \"TopRowCount\" : 0,\n" +
// " \"StartRow\" : 0,\n" +
// " \"Limit\" : 10000,\n" +
// " \"SubSystemId\" : \"\"\n" +
// String data = "{" +
// " \"FormId\" : \"PRD_MO\"," +
// " \"FieldKeys\" : \"F_HBYT_SCLH,FBillNo,FWorkShopID.FName,FMaterialId.FNumber,FMaterialName,FPlanStartDate,FPlanFinishDate,FPickMtrlStatus\"," +
// " \"FilterString\" : [ {" +
// " \"FieldName\" : \"FStatus\"," +
// " \"Compare\" : \"105\"," +
// " \"Value\" : \"4\"," +
// " \"Left\" : \"\"," +
// " \"Right\" : \"\"," +
// " \"Logic\" : 0" +
// " }, {" +
// " \"FieldName\" : \"FPickMtrlStatus\"," +
// " \"Compare\" : \"29\"," +
// " \"Value\" : \"1\"," +
// " \"Left\" : \"\"," +
// " \"Right\" : \"\"," +
// " \"Logic\" : 0" +
// " }, {" +
// " \"FieldName\" : \"F_HBYT_SCLH\"," +
// " \"Compare\" : \"67\"," +
// " \"Value\" : \"QB-26-163-XCL\"," +
// " \"Left\" : \"\"," +
// " \"Right\" : \"\"," +
// " \"Logic\" : 0" +
// " } ]," +
// " \"OrderString\" : \"\"," +
// " \"TopRowCount\" : 0," +
// " \"StartRow\" : 0," +
// " \"Limit\" : 10000," +
// " \"SubSystemId\" : \"\"" +
// "}";
//
// return AjaxResult.success(HttpUtils.sendPost("http://localhost:8089/distribution/kingdee/send", JSONObject.toJSONString(
@ -539,13 +539,62 @@ public class TestController {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new FileReader(new File("D:\\andy\\文档\\考勤\\岗位任职部门信息.txt")));
String line = reader.readLine();
while (line != null) {
String[] configData = line.split("_");
System.out.println("update sys_dict_data set dict_value='"+line+"' where dict_value='"+configData[0]+"';\n");
line = reader.readLine();
String str = "郝卫明,7410" +
";郝亮,1313" +
";柳晓龙,1575" +
";王旭,800" +
";张克龙,1560" +
";贾会涛,800" +
";李凯伟,2658" +
";石泽明,600" +
";马明广,514" +
";宋金娜,1085" +
";吴海庆,300" +
";冯翠莎,300" +
";赵科飞,1000" +
";李进江,299" +
";李佳铭,1190" +
";耿利刚,800" +
";张雨轩,500" +
";李永文,1046" +
";代程翼,1000" +
";李晓亮,1200" +
";李兴酉,922" +
";王晓凡,975" +
";董献召,300" +
";王晓军,800" +
";苏冰,2424" +
";吴建彬,300" +
";赵兰争,1000" +
";齐乐芳,600" +
";魏佳蕊,600" +
";范会雨,500" +
";康坤兰,600" +
";牛立革,1059" +
";付佳兴,320" +
";王春炜,342" +
";游梦浩,336" +
";魏辰强,875" +
";吴凯亮,500" +
";董亚军,134" +
";王怀志,1000" +
";张广适,60" +
";赵雄飞,810" +
";宁世汉,270" +
";张会杰,600";
String[] aa = str.split(";");
for (int i = 0; i < aa.length; i++) {
String a = aa[i].trim();
String[] ss = a.split(",");
System.out.println("update sys_staff_detail ssd left join sys_staff ss on ss.user_id = ssd.staff_id set ssd.other_subsidies = ifnull(ssd.other_subsidies, 0)+"+ss[1]+" where ss.name = '"+ss[0]+"';");
}
// BufferedReader reader = new BufferedReader(new FileReader(new File("D:\\andy\\文档\\考勤\\岗位任职部门信息.txt")));
// String line = reader.readLine();
// while (line != null) {
// String[] configData = line.split("_");
// System.out.println("update sys_dict_data set dict_value='"+line+"' where dict_value='"+configData[0]+"';");
// line = reader.readLine();
// }
}

View File

@ -121,6 +121,10 @@ public class ParamUtils {
return param.getParamValue();
}
public static Boolean sendWeiXin(){
RzSysParam param= paramService.getRzSysParam("是否发送微信通知", "send_we_chat","true","是否允许发送微信通知");
return Boolean.valueOf(param.getParamValue());
}
/***
* 不住宿的实习生人员

View File

@ -5,6 +5,7 @@ import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.evo.common.config.Global;
import com.evo.common.utils.Collections;
import com.evo.common.utils.ParamUtils;
import com.evo.wechat.TemplateMessageUtil;
import com.evo.wechat.config.GZHProperties;
import com.evo.wechat.dto.AbnormalAttendanceTemplate;
@ -33,7 +34,7 @@ public class SendClientService {
public String sendAbnormalAttendance(String deptName, String userName, String info, Date date, String openId){
//检查是否为生产环境, 非生产环境,无需发送
if("druid".equals(Global.newInstance().getActive())){
if("druid".equals(Global.newInstance().getActive()) && ParamUtils.sendWeiXin()){
AbnormalAttendanceTemplate templateData = new AbnormalAttendanceTemplate();
templateData.setThing1((JSONObject) JSON.toJSON(Collections.asMap("value", deptName)));
templateData.setThing2((JSONObject)JSON.toJSON(Collections.asMap("value",userName)));//动态跟换车牌号

View File

@ -50,7 +50,7 @@ spring:
# 国际化资源文件路径
basename: i18n/messages
profiles:
active: ${profiles.active:dev}
active: ${profiles.active:druid}
# 文件上传
servlet:
multipart: