| | |
| | | //斯莫尔 |
| | | string appKey = "dingkdddbhdcssk7jduw"; |
| | | string appSecret = "iv07c-GLfJPnzfJaNAAOfJDl3Z-eODvDAhlInMZCZhGorkle5Evbaxx3ImylvdjQ"; |
| | | Console.WriteLine("程序正在执行,请不要关闭!!!!"); |
| | | Console.WriteLine("安灯程序正在执行,请不要关闭!!!!"); |
| | | // 记录上次执行新定时任务的时间 |
| | | DateTime lastNewTaskExecution = DateTime.MinValue; |
| | | while (true) |
| | |
| | | } |
| | | |
| | | //异常工艺参数预警(每 5 分钟执行一次) |
| | | if ((DateTime.Now - lastNewTaskExecution).TotalMinutes >= 5) |
| | | DBHelper.CustomWriteLog("开始进入执行循环:", DateTime.Now.ToString("yyyy-MM-dd")); |
| | | if ((DateTime.Now - lastNewTaskExecution).TotalMinutes >= 4) |
| | | { |
| | | DBHelper.CustomWriteLog("已进入执行循环:", DateTime.Now.ToString("yyyy-MM-dd")); |
| | | //查询出要更新已经发送的异常参数 |
| | | string Sql = "select HItemID from Sb_EquipMentCollectionTechParam_ERR where HCreateTime>=DATEADD(minute, - 1, GETDATE());"; |
| | | dt = oCN.RunProcReturn(Sql, "Sb_EquipMentCollectionTechParam_ERR"); |
| | | string Sql = "select HItemID from Sb_EquipMentCollectionTechParam_ERR where HCreateTime>=DATEADD(minute, - 1, GETDATE()) AND HSendFlag = 0"; |
| | | DBHelper.CustomWriteLog("查询出异常的参数:"+Sql, DateTime.Now.ToString("yyyy-MM-dd")); |
| | | dt = oCN.RunProcReturn(Sql, "Sb_EquipMentCollectionTechParam_ERR"); |
| | | if (dt != null && dt.Tables[0].Rows.Count > 0) |
| | | { |
| | | List<string> itemIds = new List<string>(); |
| | | foreach (DataRow row in dt.Tables[0].Rows) |
| | | { |
| | | itemIds.Add(row["HItemID"].ToString()); |
| | | } |
| | | DBHelper.CustomWriteLog("返回的异常参数集合:" + string.Join(", ", itemIds), DateTime.Now.ToString("yyyy-MM-dd")); |
| | | } |
| | | DBHelper.CustomWriteLog("要进入更新的语句", DateTime.Now.ToString("yyyy-MM-dd")); |
| | | if (dt.Tables[0].Rows.Count > 0) |
| | | { |
| | | DBHelper.CustomWriteLog("进入更新的语句", DateTime.Now.ToString("yyyy-MM-dd")); |
| | | //更新要发送的单子 |
| | | if (dt != null && dt.Tables != null && dt.Tables.Count > 0) |
| | | { |
| | | for (int i = 0; i < dt.Tables[0].Rows.Count; i++) |
| | | { |
| | | string ycSql = "update Sb_EquipMentCollectionTechParam_ERR set HSendFlag = 1 where HItemID = " + dt.Tables[0].Rows[i]["HItemID"].ToString(); |
| | | DBHelper.CustomWriteLog("钉钉异常预警更新语句:" + ycSql, DateTime.Now.ToString("yyyy - MM - dd")); |
| | | DBHelper.CustomWriteLog("钉钉异常预警更新语句:" + ycSql, DateTime.Now.ToString("yyyy-MM-dd")); |
| | | oCN.RunProc(ycSql); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | // 可以在这里添加适当的处理,比如记录日志表明没有可处理的数据表 |
| | | DBHelper.CustomWriteLog("没有可用于处理的数据表", DateTime.Now.ToString("yyyy - MM - dd")); |
| | | } |
| | | DBHelper.CustomWriteLog("没有更新的语句", DateTime.Now.ToString("yyyy-MM-dd")); |
| | | } |
| | | //查询出要发信息的异常参数 |
| | | string newSql = @"select STUFF((SELECT '; ' + 设备编码 + ' - ' + 工艺参数名称 + ' - 数采值: ' + CAST(数采值 as VARCHAR(10)) + ' - 上限值: ' + CAST(上限值 as VARCHAR(10)) + ' - 下限值: ' + CAST(下限值 as VARCHAR(10)) |
| | | FROM h_v_Sb_EquipMentCollectionTechParam_ERRList WHERE 发现异常时间 >= DATEADD(minute, -1, GETDATE()) FOR XML PATH('')), 1, 2, '') as 内容"; |
| | | //string newSql = @"select STUFF((SELECT '; ' + 设备编码 + ' - ' + 工艺参数名称 + ' - 数采值: ' + CAST(数采值 as VARCHAR(10)) + ' - 上限值: ' + CAST(上限值 as VARCHAR(10)) + ' - 下限值: ' + CAST(下限值 as VARCHAR(10)) |
| | | //FROM h_v_Sb_EquipMentCollectionTechParam_ERRList WHERE 发现异常时间 >= DATEADD(minute, -1, GETDATE()) FOR XML PATH('')), 1, 2, '') as 内容"; |
| | | string newSql = @"SELECT 车间, STUFF(( SELECT '; ' + 设备编码 + ' - ' + 工艺参数名称 + ' - 数采值: ' + CAST(数采值 AS VARCHAR(10)) + ' - 上限值: ' + CAST(上限值 AS VARCHAR(10)) + ' - 下限值: ' + CAST(下限值 AS VARCHAR(10)) |
| | | FROM h_v_Sb_EquipMentCollectionTechParam_ERRList AS InnerTable WHERE InnerTable.车间 = OuterTable.车间 AND 发现异常时间 >= DATEADD(minute, -1, GETDATE()) |
| | | FOR XML PATH('') ), 1, 2, '') AS 内容 FROM h_v_Sb_EquipMentCollectionTechParam_ERRList AS OuterTable GROUP BY 车间 "; |
| | | DBHelper.CustomWriteLog("查询出要发信息的异常参数"+newSql, DateTime.Now.ToString("yyyy-MM-dd")); |
| | | dt = oCN.RunProcReturn(newSql, "h_v_Sb_EquipMentCollectionTechParam_ERRList"); |
| | | string HContext = ""; |
| | | string HContext = ""; string HDeptName = ""; |
| | | HContext = dt.Tables[0].Rows[0]["内容"].ToString(); |
| | | HDeptName= dt.Tables[0].Rows[0]["车间"].ToString(); |
| | | DBHelper.CustomWriteLog("查询出要发信息的内容" + HContext, DateTime.Now.ToString("yyyy-MM-dd")); |
| | | //查询出要发送的人 |
| | | string newSql1 = @"select a.HDingDingUserID 钉钉id,a.Czymc 接收人 from Gy_Czygl a left join System_UserGroupInfo b on a.Czybm = b.UserId |
| | | left join System_UserGroup c on b.GroupId = c.GroupID where c.GroupName = '工艺异常预警接收人'"; |
| | | left join System_UserGroup c on b.GroupId = c.GroupID where c.GroupName = '"+ HDeptName + "工艺异常预警接收人'"; |
| | | DBHelper.CustomWriteLog("查询出要发送的人:" + newSql1, DateTime.Now.ToString("yyyy-MM-dd")); |
| | | dt = oCN.RunProcReturn(newSql1, "Gy_Czygl"); |
| | | dt = oCN.RunProcReturn(newSql1, "Gy_Czygl"); |
| | | DBHelper.CustomWriteLog("开始进入发信息", DateTime.Now.ToString("yyyy-MM-dd")); |
| | | if (dt.Tables[0].Rows.Count > 0) |
| | | { |
| | | DBHelper.CustomWriteLog("进入发信息", DateTime.Now.ToString("yyyy-MM-dd")); |
| | | for (int i = 0; i < dt.Tables[0].Rows.Count; i++) |
| | | { |
| | | string HName = dt.Tables[0].Rows[i]["钉钉id"].ToString(); |
| | |
| | | --> |
| | | <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <PropertyGroup> |
| | | <History>True|2024-09-23T10:16:07.9656797Z;</History> |
| | | <History>True|2024-10-20T02:01:37.4542558Z;True|2024-10-14T12:26:09.3008697+08:00;True|2024-10-11T17:14:32.1495789+08:00;True|2024-10-11T17:01:27.4785195+08:00;True|2024-10-11T16:54:48.1999562+08:00;True|2024-10-11T14:35:28.0629168+08:00;True|2024-09-23T18:16:07.9656797+08:00;</History> |
| | | </PropertyGroup> |
| | | </Project> |
New file |
| | |
| | | 2024/10/11 17:12:41 开始进入执行循环: |
| | | |
| | | 2024/10/11 17:12:47 已进入执行循环: |
| | | |
| | | 2024/10/11 17:12:50 查询出异常的参数:select HItemID from Sb_EquipMentCollectionTechParam_ERR where HCreateTime>=DATEADD(minute, - 1, GETDATE()) AND HSendFlag = 0 |
| | | |
| | | 2024/10/11 17:13:47 开始进入执行循环: |
| | | |
| | | 2024/10/11 17:13:48 已进入执行循环: |
| | | |
| | | 2024/10/11 17:13:48 查询出异常的参数:select HItemID from Sb_EquipMentCollectionTechParam_ERR where HCreateTime>=DATEADD(minute, - 1, GETDATE()) AND HSendFlag = 0 |
| | | |
| | | 2024/10/11 17:13:49 要进入更新的语句 |
| | |
| | | } |
| | | public DBHelper() |
| | | { |
| | | //sServer = "47.96.97.237,15127"; |
| | | //sDataBase = "HX_LMESsys"; |
| | | //sUser = "HX_USER"; |
| | | //sPassword = "lc@841022"; |
| | | ////斯莫尔 |
| | | sServer = "30.10.7.6"; |
| | | sDataBase = "HX_LMESsys_test"; |
| | | sServer = "47.96.97.237,15127"; |
| | | sDataBase = "HX_LMESsys"; |
| | | sUser = "HX_USER"; |
| | | sPassword = "lc@841022"; |
| | | ////斯莫尔 |
| | | //sServer = "30.10.7.6"; |
| | | //sDataBase = "HX_LMESsys_test"; |
| | | //sUser = "HX_USER"; |
| | | //sPassword = "lc@841022"; |
| | | } |
| | | |
| | | private bool CnOpen()//OPEN数据库连接 |
| | |
| | | static async Task Main(string[] args) |
| | | { |
| | | //本地 |
| | | //string appKey = "dingrsrzhdyn3mlaof95"; |
| | | //string appSecret = "RAqH6YtZnPLCpDbuqfaYQkKkVtVdS0wqfC8I26X6qiS-8eoCJCNrzx3fubGND4Sq"; |
| | | string appKey = "dingrsrzhdyn3mlaof95"; |
| | | string appSecret = "RAqH6YtZnPLCpDbuqfaYQkKkVtVdS0wqfC8I26X6qiS-8eoCJCNrzx3fubGND4Sq"; |
| | | //斯莫尔 |
| | | string appKey = "dingkdddbhdcssk7jduw"; |
| | | string appSecret = "iv07c-GLfJPnzfJaNAAOfJDl3Z-eODvDAhlInMZCZhGorkle5Evbaxx3ImylvdjQ"; |
| | | Console.WriteLine("程序正在执行,请不要关闭!!!!"); |
| | | //string appKey = "dingkdddbhdcssk7jduw"; |
| | | //string appSecret = "iv07c-GLfJPnzfJaNAAOfJDl3Z-eODvDAhlInMZCZhGorkle5Evbaxx3ImylvdjQ"; |
| | | Console.WriteLine("程序2正在执行,请不要关闭!!!!"); |
| | | string HDeptName = ""; |
| | | // 记录上次执行新定时任务的时间 |
| | | while (true) |
| | | { |
| | | //查找设备保养预警 |
| | | string sql = "SELECT a.HInterID,b.HEntryID,c.HEquipFileNo 设备编码, c.HName 设备名称 FROM Sb_EquipMaintainPlanBillMain a " + |
| | | string sql = "SELECT a.HInterID,b.HEntryID,c.HEquipFileNo 设备编码, c.HName 设备名称,d.HName 设备部门 FROM Sb_EquipMaintainPlanBillMain a " + |
| | | "INNER JOIN Sb_EquipMaintainPlanBillSub_Plan b ON a.HInterID = b.HInterID " + |
| | | "LEFT JOIN Gy_EquipFileBillMain c ON a.HEquipID = c.HInterID " + |
| | | "WHERE CAST(CONVERT(datetime, b.HErrBeginTime, 120) AS DATE) = CAST(GETDATE() AS DATE) and HSendFlag = '0'"; |
| | | "LEFT JOIN Gy_Department d ON a.HDeptID = d.HItemID " + |
| | | " WHERE CONVERT(date, b.HErrBeginTime, 120) = CONVERT(date, GETDATE(), 120) and HSendFlag = '0'"; |
| | | DBHelper.CustomWriteLog("查询设备保养计划:" + sql, DateTime.Now.ToString("yyyy-MM-dd")); |
| | | dt = oCN.RunProcReturn(sql, "Sb_EquipMaintainPlanBillMain"); |
| | | //设备保养预警自动发信息 |
| | | if (dt.Tables[0].Rows.Count > 0) |
| | |
| | | |
| | | for (int i = 0; i < dt.Tables[0].Rows.Count; i++) |
| | | { |
| | | HContext = "设备编码为:"+dt.Tables[0].Rows[i]["设备编码"].ToString()+ ",设备名称为:"+dt.Tables[0].Rows[i]["设备名称"].ToString()+",已到保养预警日期,需尽快进行保养"; |
| | | HContext = "设备编码为:" + dt.Tables[0].Rows[i]["设备编码"].ToString() + ",设备名称为:" + dt.Tables[0].Rows[i]["设备名称"].ToString() + ",已到保养预警日期,需尽快进行保养"; |
| | | //更新设备保养计划预警 子表 |
| | | string sql1 = "update Sb_EquipMaintainPlanBillSub_Plan set HSendFlag='1' where HInterID="+ dt.Tables[0].Rows[i]["HInterID"].ToString() + " and HEntryID=" + dt.Tables[0].Rows[i]["HEntryID"].ToString()+""; ; |
| | | string sql1 = "update Sb_EquipMaintainPlanBillSub_Plan set HSendFlag='1' where HInterID=" + dt.Tables[0].Rows[i]["HInterID"].ToString() + " and HEntryID=" + dt.Tables[0].Rows[i]["HEntryID"].ToString() + ""; ; |
| | | oCN.RunProc(sql1); |
| | | DBHelper.CustomWriteLog("设备保养计划预警:" + sql1 + " 更新子表语句:" + sql1, DateTime.Now.ToString("yyyy-MM-dd")); |
| | | |
| | | HDeptName = dt.Tables[0].Rows[i]["设备部门"].ToString(); |
| | | string sql2 = "select a.HDingDingUserID 钉钉id,a.Czymc 接收人 from Gy_Czygl a left join System_UserGroupInfo b on a.Czybm = b.UserId" + |
| | | "left join System_UserGroup c on b.GroupId = c.GroupID where c.GroupName = '设备保养计划预警接收人'"; |
| | | " left join System_UserGroup c on b.GroupId = c.GroupID where c.GroupName = '" + HDeptName + "设备保养计划预警接收人'"; |
| | | DBHelper.CustomWriteLog("设备保养计划预警接收人:" + sql2, DateTime.Now.ToString("yyyy-MM-dd")); |
| | | dts = oCN.RunProcReturn(sql2, "Gy_Czygl"); |
| | | for (int j = 0; j < dts.Tables[0].Rows.Count; j++) |
| | | { |
| | |
| | | response = await msg.SendTextMessage(accessToken, agentId, userIdList, deptIdList, toAllUser, message); |
| | | ResponseData responseData = JsonConvert.DeserializeObject<ResponseData>(response); |
| | | if (responseData.errcode == 0) |
| | | { |
| | | { |
| | | DBHelper.CustomWriteLog("钉钉发送信息成功!", DateTime.Now.ToString("yyyy-MM-dd")); |
| | | } |
| | | else |
| | |
| | | Console.WriteLine(responseData.errcode); |
| | | DBHelper.CustomWriteLog("钉钉返回信息:" + response, DateTime.Now.ToString("yyyy-MM-dd")); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | //查找模具保养预警 |
| | | string newsql = "SELECT a.HInterID,b.HEntryID,c.HMouldNo 模具编码, c.HName 模具名称,B.HErrBeginQty,HSendFlag FROM Sc_MouldMaintainPlanBillMain a " + |
| | | string newsql = "SELECT a.HInterID,b.HEntryID,c.HMouldNo 模具编码, c.HName 模具名称,B.HErrBeginQty,HSendFlag,d.HName 模具部门 FROM Sc_MouldMaintainPlanBillMain a " + |
| | | "INNER JOIN Sc_MouldMaintainPlanBillSub_Plan b ON a.HInterID = b.HInterID " + |
| | | "LEFT JOIN Gy_MouldFileMain c ON a.HMouldID = c.HInterID " + |
| | | "WHERE b.HErrBeginQty >= (select sum(HUseLife) from Sc_MouldLifeUseBillSub WHERE HMaterID = a.HMouldID) and b.HSendFlag = '0'"; |
| | | "LEFT JOIN Gy_Department d ON a.HDeptID = d.HItemID " + |
| | | " WHERE b.HErrBeginQty <= (select b.HUseNowQty+sum(HUseLife) from Sc_MouldLifeUseBillSub WHERE HMaterID = a.HMouldID) and b.HSendFlag = '0'"; |
| | | DBHelper.CustomWriteLog("查询模具保养计划:"+newsql, DateTime.Now.ToString("yyyy-MM-dd")); |
| | | dt = oCN.RunProcReturn(newsql, "Sb_EquipMaintainPlanBillMain"); |
| | | //模具保养预警自动发信息 |
| | | if (dt.Tables[0].Rows.Count > 0) |
| | |
| | | |
| | | for (int i = 0; i < dt.Tables[0].Rows.Count; i++) |
| | | { |
| | | HContext = "模具编码为:" + dt.Tables[0].Rows[i]["模具编码"].ToString() + ",模具名称为:" + dt.Tables[0].Rows[i]["模具名称"].ToString() + ",已到保养预警日期,需尽快进行保养"; |
| | | HContext = "模具编码为:" + dt.Tables[0].Rows[i]["模具编码"].ToString() + ",模具名称为:" + dt.Tables[0].Rows[i]["模具名称"].ToString() + ",已到保养预警次数,需尽快进行保养"; |
| | | //更新模具保养计划预警 子表 |
| | | string sql1 = "update Sc_MouldMaintainPlanBillSub_Plan set HSendFlag='1' where HInterID=" + dt.Tables[0].Rows[i]["HInterID"].ToString() + " and HEntryID=" + dt.Tables[0].Rows[i]["HEntryID"].ToString() + ""; ; |
| | | oCN.RunProc(sql1); |
| | | DBHelper.CustomWriteLog("模具保养计划预警:" + sql1 + " 更新子表语句:" + sql1, DateTime.Now.ToString("yyyy-MM-dd")); |
| | | |
| | | HDeptName = dt.Tables[0].Rows[i]["模具部门"].ToString(); |
| | | string sql2 = "select a.HDingDingUserID 钉钉id,a.Czymc 接收人 from Gy_Czygl a left join System_UserGroupInfo b on a.Czybm = b.UserId" + |
| | | "left join System_UserGroup c on b.GroupId = c.GroupID where c.GroupName = '模具保养计划预警接收人'"; |
| | | " left join System_UserGroup c on b.GroupId = c.GroupID where c.GroupName = '模具保养计划预警接收人'"; |
| | | DBHelper.CustomWriteLog("模具保养计划预警接收人:" + sql2, DateTime.Now.ToString("yyyy-MM-dd")); |
| | | dts = oCN.RunProcReturn(sql2, "Gy_Czygl"); |
| | | for (int j = 0; j < dts.Tables[0].Rows.Count; j++) |
| | | { |
| | |
| | | string accessToken = responseJson["accessToken"].ToString(); |
| | | |
| | | //调用方法发送消息 |
| | | //string agentId = "3118119317";//钉钉后台建立的小程序id |
| | | string agentId = "3118119317";//钉钉后台建立的小程序id |
| | | //斯莫尔 |
| | | string agentId = "3151454458";//钉钉后台建立的小程序id |
| | | //string agentId = "3151454458";//钉钉后台建立的小程序id |
| | | string userIdList = HName;//钉钉人员的id |
| | | string deptIdList = "0"; // 空字符串表示不指定部门 |
| | | string toAllUser = "false"; |
| | |
| | | --> |
| | | <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <PropertyGroup> |
| | | <History>True|2024-09-23T10:14:50.8540058Z;</History> |
| | | <History>True|2024-10-20T02:24:51.4832669Z;True|2024-10-14T12:09:10.5729183+08:00;True|2024-10-14T12:08:44.6720595+08:00;True|2024-10-14T12:06:19.5939470+08:00;True|2024-10-14T12:05:38.2281865+08:00;True|2024-10-14T12:01:34.1788799+08:00;True|2024-10-14T11:55:04.4773797+08:00;True|2024-10-14T11:48:05.5386326+08:00;True|2024-09-26T15:53:45.6428349+08:00;True|2024-09-23T18:14:50.8540058+08:00;</History> |
| | | </PropertyGroup> |
| | | </Project> |
New file |
| | |
| | | 2024/10/24 15:48:17 查询模具保养计划:SELECT a.HInterID,b.HEntryID,c.HMouldNo 模具编码, c.HName 模具名称,B.HErrBeginQty,HSendFlag,d.HName 模具部门 FROM Sc_MouldMaintainPlanBillMain a INNER JOIN Sc_MouldMaintainPlanBillSub_Plan b ON a.HInterID = b.HInterID LEFT JOIN Gy_MouldFileMain c ON a.HMouldID = c.HInterID LEFT JOIN Gy_Department d ON a.HDeptID = d.HItemID WHERE b.HErrBeginQty <= (select b.HUseNowQty+sum(HUseLife) from Sc_MouldLifeUseBillSub WHERE HMaterID = a.HMouldID) and b.HSendFlag = '0' |
| | | |
| | | 2024/10/24 15:48:33 查询模具保养计划:SELECT a.HInterID,b.HEntryID,c.HMouldNo 模具编码, c.HName 模具名称,B.HErrBeginQty,HSendFlag,d.HName 模具部门 FROM Sc_MouldMaintainPlanBillMain a INNER JOIN Sc_MouldMaintainPlanBillSub_Plan b ON a.HInterID = b.HInterID LEFT JOIN Gy_MouldFileMain c ON a.HMouldID = c.HInterID LEFT JOIN Gy_Department d ON a.HDeptID = d.HItemID WHERE b.HErrBeginQty <= (select b.HUseNowQty+sum(HUseLife) from Sc_MouldLifeUseBillSub WHERE HMaterID = a.HMouldID) and b.HSendFlag = '0' |
| | | |
| | | 2024/10/24 15:49:34 查询模具保养计划:SELECT a.HInterID,b.HEntryID,c.HMouldNo 模具编码, c.HName 模具名称,B.HErrBeginQty,HSendFlag,d.HName 模具部门 FROM Sc_MouldMaintainPlanBillMain a INNER JOIN Sc_MouldMaintainPlanBillSub_Plan b ON a.HInterID = b.HInterID LEFT JOIN Gy_MouldFileMain c ON a.HMouldID = c.HInterID LEFT JOIN Gy_Department d ON a.HDeptID = d.HItemID WHERE b.HErrBeginQty <= (select b.HUseNowQty+sum(HUseLife) from Sc_MouldLifeUseBillSub WHERE HMaterID = a.HMouldID) and b.HSendFlag = '0' |
| | | |
| | | 2024/10/24 15:50:34 查询模具保养计划:SELECT a.HInterID,b.HEntryID,c.HMouldNo 模具编码, c.HName 模具名称,B.HErrBeginQty,HSendFlag,d.HName 模具部门 FROM Sc_MouldMaintainPlanBillMain a INNER JOIN Sc_MouldMaintainPlanBillSub_Plan b ON a.HInterID = b.HInterID LEFT JOIN Gy_MouldFileMain c ON a.HMouldID = c.HInterID LEFT JOIN Gy_Department d ON a.HDeptID = d.HItemID WHERE b.HErrBeginQty <= (select b.HUseNowQty+sum(HUseLife) from Sc_MouldLifeUseBillSub WHERE HMaterID = a.HMouldID) and b.HSendFlag = '0' |
| | | |
| | | 2024/10/24 15:51:34 查询模具保养计划:SELECT a.HInterID,b.HEntryID,c.HMouldNo 模具编码, c.HName 模具名称,B.HErrBeginQty,HSendFlag,d.HName 模具部门 FROM Sc_MouldMaintainPlanBillMain a INNER JOIN Sc_MouldMaintainPlanBillSub_Plan b ON a.HInterID = b.HInterID LEFT JOIN Gy_MouldFileMain c ON a.HMouldID = c.HInterID LEFT JOIN Gy_Department d ON a.HDeptID = d.HItemID WHERE b.HErrBeginQty <= (select b.HUseNowQty+sum(HUseLife) from Sc_MouldLifeUseBillSub WHERE HMaterID = a.HMouldID) and b.HSendFlag = '0' |
| | | |
| | | 2024/10/24 15:51:50 查询模具保养计划:SELECT a.HInterID,b.HEntryID,c.HMouldNo 模具编码, c.HName 模具名称,B.HErrBeginQty,HSendFlag,d.HName 模具部门 FROM Sc_MouldMaintainPlanBillMain a INNER JOIN Sc_MouldMaintainPlanBillSub_Plan b ON a.HInterID = b.HInterID LEFT JOIN Gy_MouldFileMain c ON a.HMouldID = c.HInterID LEFT JOIN Gy_Department d ON a.HDeptID = d.HItemID WHERE b.HErrBeginQty <= (select b.HUseNowQty+sum(HUseLife) from Sc_MouldLifeUseBillSub WHERE HMaterID = a.HMouldID) and b.HSendFlag = '0' |
| | | |
| | | 2024/10/24 15:52:04 查询模具保养计划:SELECT a.HInterID,b.HEntryID,c.HMouldNo 模具编码, c.HName 模具名称,B.HErrBeginQty,HSendFlag,d.HName 模具部门 FROM Sc_MouldMaintainPlanBillMain a INNER JOIN Sc_MouldMaintainPlanBillSub_Plan b ON a.HInterID = b.HInterID LEFT JOIN Gy_MouldFileMain c ON a.HMouldID = c.HInterID LEFT JOIN Gy_Department d ON a.HDeptID = d.HItemID WHERE b.HErrBeginQty <= (select b.HUseNowQty+sum(HUseLife) from Sc_MouldLifeUseBillSub WHERE HMaterID = a.HMouldID) and b.HSendFlag = '0' |
| | | |
| | | 2024/10/24 15:54:39 查询模具保养计划:SELECT a.HInterID,b.HEntryID,c.HMouldNo 模具编码, c.HName 模具名称,B.HErrBeginQty,HSendFlag,d.HName 模具部门 FROM Sc_MouldMaintainPlanBillMain a INNER JOIN Sc_MouldMaintainPlanBillSub_Plan b ON a.HInterID = b.HInterID LEFT JOIN Gy_MouldFileMain c ON a.HMouldID = c.HInterID LEFT JOIN Gy_Department d ON a.HDeptID = d.HItemID WHERE b.HErrBeginQty <= (select b.HUseNowQty+sum(HUseLife) from Sc_MouldLifeUseBillSub WHERE HMaterID = a.HMouldID) and b.HSendFlag = '0' |
| | | |
| | | 2024/10/24 15:54:54 模具保养计划预警:update Sc_MouldMaintainPlanBillSub_Plan set HSendFlag='1' where HInterID=34 and HEntryID=1 更新子表语句:update Sc_MouldMaintainPlanBillSub_Plan set HSendFlag='1' where HInterID=34 and HEntryID=1 |
| | | |
| | | 2024/10/24 15:54:54 模具保养计划预警接收人:select a.HDingDingUserID 钉钉id,a.Czymc 接收人 from Gy_Czygl a left join System_UserGroupInfo b on a.Czybm = b.UserIdleft join System_UserGroup c on b.GroupId = c.GroupID where c.GroupName = '模具保养计划预警接收人' |
| | | |
| | | 2024/10/24 15:54:57 查询模具保养计划:SELECT a.HInterID,b.HEntryID,c.HMouldNo 模具编码, c.HName 模具名称,B.HErrBeginQty,HSendFlag,d.HName 模具部门 FROM Sc_MouldMaintainPlanBillMain a INNER JOIN Sc_MouldMaintainPlanBillSub_Plan b ON a.HInterID = b.HInterID LEFT JOIN Gy_MouldFileMain c ON a.HMouldID = c.HInterID LEFT JOIN Gy_Department d ON a.HDeptID = d.HItemID WHERE b.HErrBeginQty <= (select b.HUseNowQty+sum(HUseLife) from Sc_MouldLifeUseBillSub WHERE HMaterID = a.HMouldID) and b.HSendFlag = '0' |
| | | |
| | | 2024/10/24 15:55:26 查询模具保养计划:SELECT a.HInterID,b.HEntryID,c.HMouldNo 模具编码, c.HName 模具名称,B.HErrBeginQty,HSendFlag,d.HName 模具部门 FROM Sc_MouldMaintainPlanBillMain a INNER JOIN Sc_MouldMaintainPlanBillSub_Plan b ON a.HInterID = b.HInterID LEFT JOIN Gy_MouldFileMain c ON a.HMouldID = c.HInterID LEFT JOIN Gy_Department d ON a.HDeptID = d.HItemID WHERE b.HErrBeginQty <= (select b.HUseNowQty+sum(HUseLife) from Sc_MouldLifeUseBillSub WHERE HMaterID = a.HMouldID) and b.HSendFlag = '0' |
| | | |
| | | 2024/10/24 15:56:44 查询模具保养计划:SELECT a.HInterID,b.HEntryID,c.HMouldNo 模具编码, c.HName 模具名称,B.HErrBeginQty,HSendFlag,d.HName 模具部门 FROM Sc_MouldMaintainPlanBillMain a INNER JOIN Sc_MouldMaintainPlanBillSub_Plan b ON a.HInterID = b.HInterID LEFT JOIN Gy_MouldFileMain c ON a.HMouldID = c.HInterID LEFT JOIN Gy_Department d ON a.HDeptID = d.HItemID WHERE b.HErrBeginQty <= (select b.HUseNowQty+sum(HUseLife) from Sc_MouldLifeUseBillSub WHERE HMaterID = a.HMouldID) and b.HSendFlag = '0' |
| | | |
| | | 2024/10/24 15:57:47 查询模具保养计划:SELECT a.HInterID,b.HEntryID,c.HMouldNo 模具编码, c.HName 模具名称,B.HErrBeginQty,HSendFlag,d.HName 模具部门 FROM Sc_MouldMaintainPlanBillMain a INNER JOIN Sc_MouldMaintainPlanBillSub_Plan b ON a.HInterID = b.HInterID LEFT JOIN Gy_MouldFileMain c ON a.HMouldID = c.HInterID LEFT JOIN Gy_Department d ON a.HDeptID = d.HItemID WHERE b.HErrBeginQty <= (select b.HUseNowQty+sum(HUseLife) from Sc_MouldLifeUseBillSub WHERE HMaterID = a.HMouldID) and b.HSendFlag = '0' |
| | | |
| | | 2024/10/24 15:58:52 查询模具保养计划:SELECT a.HInterID,b.HEntryID,c.HMouldNo 模具编码, c.HName 模具名称,B.HErrBeginQty,HSendFlag,d.HName 模具部门 FROM Sc_MouldMaintainPlanBillMain a INNER JOIN Sc_MouldMaintainPlanBillSub_Plan b ON a.HInterID = b.HInterID LEFT JOIN Gy_MouldFileMain c ON a.HMouldID = c.HInterID LEFT JOIN Gy_Department d ON a.HDeptID = d.HItemID WHERE b.HErrBeginQty <= (select b.HUseNowQty+sum(HUseLife) from Sc_MouldLifeUseBillSub WHERE HMaterID = a.HMouldID) and b.HSendFlag = '0' |
| | | |
| | | 2024/10/24 15:59:05 模具保养计划预警:update Sc_MouldMaintainPlanBillSub_Plan set HSendFlag='1' where HInterID=34 and HEntryID=1 更新子表语句:update Sc_MouldMaintainPlanBillSub_Plan set HSendFlag='1' where HInterID=34 and HEntryID=1 |
| | | |
| | | 2024/10/24 15:59:45 模具保养计划预警接收人:select a.HDingDingUserID 钉钉id,a.Czymc 接收人 from Gy_Czygl a left join System_UserGroupInfo b on a.Czybm = b.UserIdleft join System_UserGroup c on b.GroupId = c.GroupID where c.GroupName = '模具保养计划预警接收人' |
| | | |
| | | 2024/10/24 16:01:01 查询模具保养计划:SELECT a.HInterID,b.HEntryID,c.HMouldNo 模具编码, c.HName 模具名称,B.HErrBeginQty,HSendFlag,d.HName 模具部门 FROM Sc_MouldMaintainPlanBillMain a INNER JOIN Sc_MouldMaintainPlanBillSub_Plan b ON a.HInterID = b.HInterID LEFT JOIN Gy_MouldFileMain c ON a.HMouldID = c.HInterID LEFT JOIN Gy_Department d ON a.HDeptID = d.HItemID WHERE b.HErrBeginQty <= (select b.HUseNowQty+sum(HUseLife) from Sc_MouldLifeUseBillSub WHERE HMaterID = a.HMouldID) and b.HSendFlag = '0' |
| | | |
| | | 2024/10/24 16:01:09 模具保养计划预警:update Sc_MouldMaintainPlanBillSub_Plan set HSendFlag='1' where HInterID=34 and HEntryID=1 更新子表语句:update Sc_MouldMaintainPlanBillSub_Plan set HSendFlag='1' where HInterID=34 and HEntryID=1 |
| | | |
| | | 2024/10/24 16:01:11 模具保养计划预警接收人:select a.HDingDingUserID 钉钉id,a.Czymc 接收人 from Gy_Czygl a left join System_UserGroupInfo b on a.Czybm = b.UserId left join System_UserGroup c on b.GroupId = c.GroupID where c.GroupName = '模具保养计划预警接收人' |
| | | |
| | | 2024/10/24 16:01:24 钉钉发送信息成功! |
| | | |
| | | 2024/10/24 16:01:42 钉钉发送信息成功! |
New file |
| | |
| | | 2024/11/1 13:41:17 查询模具保养计划:SELECT a.HInterID,b.HEntryID,c.HMouldNo 模具编码, c.HName 模具名称,B.HErrBeginQty,HSendFlag,d.HName 模具部门 FROM Sc_MouldMaintainPlanBillMain a INNER JOIN Sc_MouldMaintainPlanBillSub_Plan b ON a.HInterID = b.HInterID LEFT JOIN Gy_MouldFileMain c ON a.HMouldID = c.HInterID LEFT JOIN Gy_Department d ON a.HDeptID = d.HItemID WHERE b.HErrBeginQty <= (select b.HUseNowQty+sum(HUseLife) from Sc_MouldLifeUseBillSub WHERE HMaterID = a.HMouldID) and b.HSendFlag = '0' |
| | | |
| | | 2024/11/1 13:41:18 模具保养计划预警:update Sc_MouldMaintainPlanBillSub_Plan set HSendFlag='1' where HInterID=34 and HEntryID=1 更新子表语句:update Sc_MouldMaintainPlanBillSub_Plan set HSendFlag='1' where HInterID=34 and HEntryID=1 |
| | | |
| | | 2024/11/1 13:41:18 模具保养计划预警接收人:select a.HDingDingUserID 钉钉id,a.Czymc 接收人 from Gy_Czygl a left join System_UserGroupInfo b on a.Czybm = b.UserId left join System_UserGroup c on b.GroupId = c.GroupID where c.GroupName = '模具保养计划预警接收人' |
| | | |
| | | 2024/11/1 13:41:20 钉钉发送信息成功! |
| | | |
| | | 2024/11/1 13:41:20 钉钉发送信息成功! |
| | | |
| | | 2024/11/1 13:42:20 查询模具保养计划:SELECT a.HInterID,b.HEntryID,c.HMouldNo 模具编码, c.HName 模具名称,B.HErrBeginQty,HSendFlag,d.HName 模具部门 FROM Sc_MouldMaintainPlanBillMain a INNER JOIN Sc_MouldMaintainPlanBillSub_Plan b ON a.HInterID = b.HInterID LEFT JOIN Gy_MouldFileMain c ON a.HMouldID = c.HInterID LEFT JOIN Gy_Department d ON a.HDeptID = d.HItemID WHERE b.HErrBeginQty <= (select b.HUseNowQty+sum(HUseLife) from Sc_MouldLifeUseBillSub WHERE HMaterID = a.HMouldID) and b.HSendFlag = '0' |
| | | |
| | | 2024/11/1 13:43:20 查询模具保养计划:SELECT a.HInterID,b.HEntryID,c.HMouldNo 模具编码, c.HName 模具名称,B.HErrBeginQty,HSendFlag,d.HName 模具部门 FROM Sc_MouldMaintainPlanBillMain a INNER JOIN Sc_MouldMaintainPlanBillSub_Plan b ON a.HInterID = b.HInterID LEFT JOIN Gy_MouldFileMain c ON a.HMouldID = c.HInterID LEFT JOIN Gy_Department d ON a.HDeptID = d.HItemID WHERE b.HErrBeginQty <= (select b.HUseNowQty+sum(HUseLife) from Sc_MouldLifeUseBillSub WHERE HMaterID = a.HMouldID) and b.HSendFlag = '0' |
| | | |
| | | 2024/11/1 13:44:20 查询模具保养计划:SELECT a.HInterID,b.HEntryID,c.HMouldNo 模具编码, c.HName 模具名称,B.HErrBeginQty,HSendFlag,d.HName 模具部门 FROM Sc_MouldMaintainPlanBillMain a INNER JOIN Sc_MouldMaintainPlanBillSub_Plan b ON a.HInterID = b.HInterID LEFT JOIN Gy_MouldFileMain c ON a.HMouldID = c.HInterID LEFT JOIN Gy_Department d ON a.HDeptID = d.HItemID WHERE b.HErrBeginQty <= (select b.HUseNowQty+sum(HUseLife) from Sc_MouldLifeUseBillSub WHERE HMaterID = a.HMouldID) and b.HSendFlag = '0' |
| | | |
| | | 2024/11/1 13:44:20 模具保养计划预警:update Sc_MouldMaintainPlanBillSub_Plan set HSendFlag='1' where HInterID=34 and HEntryID=1 更新子表语句:update Sc_MouldMaintainPlanBillSub_Plan set HSendFlag='1' where HInterID=34 and HEntryID=1 |
| | | |
| | | 2024/11/1 13:44:20 模具保养计划预警接收人:select a.HDingDingUserID 钉钉id,a.Czymc 接收人 from Gy_Czygl a left join System_UserGroupInfo b on a.Czybm = b.UserId left join System_UserGroup c on b.GroupId = c.GroupID where c.GroupName = '模具保养计划预警接收人' |
| | | |
| | | 2024/11/1 13:44:21 钉钉发送信息成功! |
| | | |
| | | 2024/11/1 13:44:21 钉钉发送信息成功! |
| | |
| | | D:\智云迈思\DingDingMsg\DingDingMsg_EarlyWarning\bin\Debug\netcoreapp3.1\runtimes\win-x86\native\sni.dll |
| | | D:\智云迈思\DingDingMsg\DingDingMsg_EarlyWarning\bin\Debug\netcoreapp3.1\runtimes\unix\lib\netcoreapp2.1\System.Data.SqlClient.dll |
| | | D:\智云迈思\DingDingMsg\DingDingMsg_EarlyWarning\bin\Debug\netcoreapp3.1\runtimes\win\lib\netcoreapp2.1\System.Data.SqlClient.dll |
| | | D:\智云迈思\DingDingMsg\DingDingMsg_EarlyWarning\obj\Debug\netcoreapp3.1\DingDingMsg_EarlyWarning.csproj.AssemblyReference.cache |
| | | D:\智云迈思\DingDingMsg\DingDingMsg_EarlyWarning\obj\Debug\netcoreapp3.1\DingDingMsg_EarlyWarning.AssemblyInfoInputs.cache |
| | | D:\智云迈思\DingDingMsg\DingDingMsg_EarlyWarning\obj\Debug\netcoreapp3.1\DingDingMsg_EarlyWarning.AssemblyInfo.cs |
| | | D:\智云迈思\DingDingMsg\DingDingMsg_EarlyWarning\obj\Debug\netcoreapp3.1\DingDingMsg_EarlyWarning.csproj.CoreCompileInputs.cache |
| | |
| | | D:\智云迈思\DingDingMsg\DingDingMsg_EarlyWarning\obj\Debug\netcoreapp3.1\DingDingMsg_EarlyWarning.dll |
| | | D:\智云迈思\DingDingMsg\DingDingMsg_EarlyWarning\obj\Debug\netcoreapp3.1\DingDingMsg_EarlyWarning.pdb |
| | | D:\智云迈思\DingDingMsg\DingDingMsg_EarlyWarning\obj\Debug\netcoreapp3.1\DingDingMsg_EarlyWarning.genruntimeconfig.cache |
| | | D:\智云迈思\DingDingMsg\DingDingMsg_EarlyWarning\obj\Debug\netcoreapp3.1\DingDingMsg_EarlyWarning.csproj.AssemblyReference.cache |