Browse Source

Merge branch 'master' of 123.57.209.16:bjquanjiang/DigitalScholl

西昌缴费二期
liangkun 4 years ago
parent
commit
b4ecb18df8
20 changed files with 3585 additions and 3341 deletions
  1. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/AssReportController.cs
  2. +10
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_InformationPushController.cs
  3. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_InformationPush/Index.js
  4. +9
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/NoticeController.cs
  5. +29
    -7
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/MpManagementApi.cs
  6. +28
    -15
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Message/LR_StrategyInfo/LR_StrategyInfoBLL.cs
  7. +14
    -8
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/AssScrap/AssScrapService.cs
  8. +0
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfo/Ass_AssetsInfoService.cs
  9. +0
    -4
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfoApply/Ass_AssetsInfoApplyService.cs
  10. +8
    -13
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfoItem/Ass_AssetsInfoItemEntity.cs
  11. +3221
    -3209
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM
  12. +88
    -3
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EADateArrange/EADateArrangeService.cs
  13. +21
    -15
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SYS_SendMessage/SYS_SendMessageService.cs
  14. +24
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_InformationPush/Sys_InformationPushBLL.cs
  15. +7
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_InformationPush/Sys_InformationPushIBLL.cs
  16. +26
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_InformationPush/Sys_InformationPushService.cs
  17. +42
    -30
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileService.cs
  18. +21
    -15
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileService.cs
  19. +17
    -5
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Thermography/ThermographyService.cs
  20. +17
    -9
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/WfTask/WfTaskService.cs

+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/AssReportController.cs View File

@@ -112,7 +112,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
public ActionResult AssStatusData()
{
List<Ass_AssetsInfoItemEntity> data = assAssetsInfoItemIbll.GetLists("{\"a\":\"false\"}").ToList();
var list = data.GroupBy(a => a.AIIsScrap).Select(a => new { a.Key, price = a.Sum(b => b.AIAssValue), num = a.Count() }).ToList();
var list = data.GroupBy(a => a.AIASSState==2).Select(a => new { a.Key, price = a.Sum(b => b.AIAssValue), num = a.Count() }).ToList();
List<object> list2 = new List<object>();
List<String> list1 = new List<String>();
foreach (var item in list)
@@ -130,7 +130,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
public ActionResult AssStatusList()
{
List<Ass_AssetsInfoItemEntity> data = assAssetsInfoItemIbll.GetLists("{\"a\":\"false\"}").ToList();
var list =data.GroupBy(a => a.AIIsScrap).Select(a => new { a.Key, price = a.Sum(b => b.AIAssValue), num = a.Count() }).ToList();
var list =data.GroupBy(a => a.AIASSState == 2).Select(a => new { a.Key, price = a.Sum(b => b.AIAssValue), num = a.Count() }).ToList();
List<object> list2 = new List<object>();
foreach (var item in list)
{


+ 10
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_InformationPushController.cs View File

@@ -110,12 +110,22 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
Sys_InformationPushEntity entity = strEntity.ToObject<Sys_InformationPushEntity>();
if (string.IsNullOrEmpty(keyValue))
{
var aa = sys_InformationPushIBLL.GetEntityByPushItem(entity.PushItem);
if (aa != null)
{
return Fail("推送项目已存在!");
}
entity.CreateUserId = userInfo.userId;
entity.CreateUserName = userInfo.realName;
entity.CreateTime = DateTime.Now;
}
else
{
var aa = sys_InformationPushIBLL.GetEntityByPushItem(entity.PushItem);
if (aa != null && aa.Id != keyValue)
{
return Fail("推送项目已存在!");
}
entity.ModifyUserId = userInfo.userId;
entity.ModifyUserName = userInfo.realName;
entity.ModifyTime = DateTime.Now;


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_InformationPush/Index.js View File

@@ -102,7 +102,7 @@ var bootstrap = function ($, learun) {
url: top.$.rootUrl + '/EducationalAdministration/Sys_InformationPush/GetPageList',
headData: [
{
label: "推送项目", name: "PushItem", width: 150, align: "left",
label: "推送项目", name: "PushItem", width: 200, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,


+ 9
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/NoticeController.cs View File

@@ -15,6 +15,7 @@ using Learun.Util.Operat;
using Microsoft.AspNet.SignalR.Client;
using Microsoft.Owin.Logging;
using Newtonsoft.Json;
using Learun.Application.TwoDevelopment.EducationalAdministration;

namespace Learun.Application.Web.Areas.LR_OAModule.Controllers
{
@@ -34,6 +35,7 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers
private UserRelationIBLL userRelationIBLL = new UserRelationBLL();
private DataItemIBLL dataItemIbll = new DataItemBLL();
private DepartmentIBLL departmentIbll = new DepartmentBLL();
private Sys_InformationPushIBLL sys_InformationPushIBLL = new Sys_InformationPushBLL();
#region 视图功能
/// <summary>
/// 管理页面
@@ -285,8 +287,13 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers
{
entity.F_NewsContent = WebHelper.HtmlEncode(entity.F_NewsContent);
noticeIBLL.SaveEntity(keyValue, entity);
//推送微信
Task.Run(async () => { await DoWeixinPush(entity); });
//读取信息推送管理-通知公告推送(01)的配置
var informationPushEntity = sys_InformationPushIBLL.GetEntityByPushItem("01");
if (informationPushEntity != null && informationPushEntity.Status == true)
{
//推送微信
Task.Run(async () => { await DoWeixinPush(entity); });
}
if (entity.F_IsSendFX.HasValue && entity.F_IsSendFX == true)
{
Task.Run(async () =>


+ 29
- 7
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/MpManagementApi.cs View File

@@ -32,6 +32,7 @@ namespace Learun.Application.WebApi
private RoleIBLL roleIBLL = new RoleBLL();
private UserRelationIBLL userRelationIBLL = new UserRelationBLL();
private UserIBLL userIBLL = new UserBLL();
private Sys_InformationPushIBLL sys_InformationPushIBLL = new Sys_InformationPushBLL();


/// <summary>
@@ -59,7 +60,7 @@ namespace Learun.Application.WebApi
var departmentList = mpEntity.MPDepartment.Split(',').ToList();
var UserList = new List<UserEntity>();
var title = "";
foreach (var departmentId in departmentList)
{
var entityList = userIBLL.GetUserByDepartmentId(departmentId).Where(a => roleUserList.Contains(a.F_UserId) && !hasUploadUsers.Contains(a.F_UserId)).ToList();
@@ -75,19 +76,40 @@ namespace Learun.Application.WebApi
if (mpEntity.MPType == 0)
{
title = "内控检查";
FeiXinPush(title, "nk", UserList);
//读取信息推送管理-内控管理推送(06)的配置
var informationPushEntity = sys_InformationPushIBLL.GetEntityByPushItem("06");
if (informationPushEntity != null && informationPushEntity.Status == true)
{
//飞星推送
FeiXinPush(title, "nk", UserList);
}

}
else if (mpEntity.MPType == 1)
{
title = "绩效跟踪";
FeiXinPush(title, "jx", UserList);
//读取信息推送管理-内控管理推送(06)的配置
var informationPushEntity = sys_InformationPushIBLL.GetEntityByPushItem("06");
if (informationPushEntity != null && informationPushEntity.Status == true)
{
//飞星推送
FeiXinPush(title, "jx", UserList);
}

}
else
{
title = "质量目标";
FeiXinPush(title, "zl", UserList);
//读取信息推送管理-内控管理推送(06)的配置
var informationPushEntity = sys_InformationPushIBLL.GetEntityByPushItem("06");
if (informationPushEntity != null && informationPushEntity.Status == true)
{
//飞星推送
FeiXinPush(title, "zl", UserList);
}

}


}
@@ -95,7 +117,7 @@ namespace Learun.Application.WebApi
return Success("推送成功");
}

public void FeiXinPush(string title,string code,List<UserEntity> UserList)
public void FeiXinPush(string title, string code, List<UserEntity> UserList)
{
//飞星推送
Task.Run(async () =>
@@ -104,7 +126,7 @@ namespace Learun.Application.WebApi
{
var hubProxy = hubConnection.CreateHubProxy("SignalRHub");
await hubConnection.Start();
await hubProxy.Invoke("PushAnnouncement", "", title+"材料上传", title, code, string.Join(",", UserList.Select(m => m.F_UserId)), "");
await hubProxy.Invoke("PushAnnouncement", "", title + "材料上传", title, code, string.Join(",", UserList.Select(m => m.F_UserId)), "");
}
});
OperateLogModel operateLogModel = new OperateLogModel();


+ 28
- 15
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Message/LR_StrategyInfo/LR_StrategyInfoBLL.cs View File

@@ -12,6 +12,7 @@ using Learun.Application.Base.SystemModule;
using Learun.Application.TwoDevelopment.LR_Desktop;
using Microsoft.AspNet.SignalR.Client;
using Newtonsoft.Json;
using Learun.Application.TwoDevelopment.EducationalAdministration;

namespace Learun.Application.Message
{
@@ -27,9 +28,10 @@ namespace Learun.Application.Message
private LR_StrategyInfoService lR_StrategyInfoService = new LR_StrategyInfoService();
private UserRelationIBLL userRelationIBLL = new UserRelationBLL();
private UserIBLL userIBLL = new UserBLL();
WeChatConfigIBLL weChatConfigIbll=new WeChatConfigBLL();
WeChatConfigIBLL weChatConfigIbll = new WeChatConfigBLL();
private WeChatTempletIBLL weChatTempletIbll = new WeChatTempletBLL();
private IMSysUserIBLL iMSysUserIBLL = new IMSysUserBLL();
private Sys_InformationPushIBLL sys_InformationPushIBLL = new Sys_InformationPushBLL();

#region 获取数据

@@ -37,7 +39,7 @@ namespace Learun.Application.Message
/// 获取列表数据
/// <summary>
/// <returns></returns>
public IEnumerable<LR_MS_StrategyInfoEntity> GetList( string queryJson )
public IEnumerable<LR_MS_StrategyInfoEntity> GetList(string queryJson)
{
try
{
@@ -187,7 +189,7 @@ namespace Learun.Application.Message
{
try
{
return lR_StrategyInfoService.ExistStrategyCode(keyValue,F_StrategyCode);
return lR_StrategyInfoService.ExistStrategyCode(keyValue, F_StrategyCode);
}
catch (Exception ex)
{
@@ -299,7 +301,12 @@ namespace Learun.Application.Message
EmailSend(content, list);
break;
case "2"://微信,调用微信发送方法
PushWeixin(list,content, taskMsgEntity);
//读取信息推送管理-消息策略待办事项提醒推送(07)的配置
var informationPushEntity = sys_InformationPushIBLL.GetEntityByPushItem("07");
if (informationPushEntity != null && informationPushEntity.Status == true)
{
PushWeixin(list, content, taskMsgEntity);
}
break;
case "3": //短信,调用短信发送方法
SMSSend(content, list);
@@ -308,7 +315,12 @@ namespace Learun.Application.Message
IMSend(content, list);
break;
case "5": //飞星发送
PushFeixin(list, content, taskMsgEntity);
//读取信息推送管理-消息策略待办事项提醒推送(07)的配置
var informationPushEntity2 = sys_InformationPushIBLL.GetEntityByPushItem("07");
if (informationPushEntity2 != null && informationPushEntity2.Status == true)
{
PushFeixin(list, content, taskMsgEntity);
}
break;
default:
break;
@@ -341,7 +353,7 @@ namespace Learun.Application.Message
/// <param name="content">消息内容</param>
/// <param name="list">用户列表信息</param>
/// <returns></returns>
public void EmailSend(string content,List<UserEntity> list)
public void EmailSend(string content, List<UserEntity> list)
{
try
{
@@ -402,14 +414,14 @@ namespace Learun.Application.Message
/// <param name="needpostuserlist"></param>
/// <param name="content"></param>
/// <param name="taskentity"></param>
public void PushWeixin(List<UserEntity> needpostuserlist,string content, NWFTaskMsgEntity taskentity)
public void PushWeixin(List<UserEntity> needpostuserlist, string content, NWFTaskMsgEntity taskentity)
{
try
{
var WeChatConfigentity = weChatConfigIbll.GetEnableEntity();
string appid = WeChatConfigentity.APPId;
string secret = WeChatConfigentity.secret;
var wechatemplete = weChatTempletIbll.GetWeChatTemplateEntityByCodeConfigId(WeChatConfigentity.ID,"task");
var wechatemplete = weChatTempletIbll.GetWeChatTemplateEntityByCodeConfigId(WeChatConfigentity.ID, "task");
string weixintaskurl = wechatemplete.TUrl;
string weixintasktempid = wechatemplete.TempId;
var responsejson = Util.HttpMethods.HttpGet("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + appid + "&secret=" + secret);
@@ -420,7 +432,7 @@ namespace Learun.Application.Message
logEntity.F_OperateType = "weixin";
logEntity.F_OperateAccount = "system";
logEntity.F_ExecuteResult = 200;
logEntity.F_ExecuteResultJson ="调取微信tokken:"+ appid+ secret+ weixintasktempid+"responsejson"+ responsejson;
logEntity.F_ExecuteResultJson = "调取微信tokken:" + appid + secret + weixintasktempid + "responsejson" + responsejson;
logEntity.F_Description = "PC端";
logEntity.WriteLog();
foreach (UserEntity userinfo in needpostuserlist)
@@ -443,12 +455,12 @@ namespace Learun.Application.Message
"\"first\": {\"value\":\"待办事项提醒\",\"color\":\"#173177\"}," +
"\"keyword1\":{\"value\":\"流程待办 \",\"color\":\"#173177\"}," +
"\"keyword2\": {\"value\":\"" + taskentity.F_Title + "\",\"color\":\"#173177\"}," +
"\"keyword3\": {\"value\":\""+ taskentity.F_NodeName + "\",\"color\":\"#173177\"}," +
"\"keyword4\": {\"value\":\""+ content+ "\",\"color\":\"#173177\"}" +
"\"keyword3\": {\"value\":\"" + taskentity.F_NodeName + "\",\"color\":\"#173177\"}," +
"\"keyword4\": {\"value\":\"" + content + "\",\"color\":\"#173177\"}" +
"}" +
"}";
string pushresult = Util.HttpMethods.HttpPost("https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=" + access_token, jsondata);
logEntity.F_ExecuteResultJson = "推送完成:"+jsondata + pushresult;
logEntity.F_ExecuteResultJson = "推送完成:" + jsondata + pushresult;
logEntity.WriteLog();
}
}
@@ -496,7 +508,7 @@ namespace Learun.Application.Message
/// <param name="list">用户列表</param>
/// <returns></returns>
public void SMSSend(string content, List<UserEntity> list)
{
{

}
/// <summary>
@@ -508,7 +520,8 @@ namespace Learun.Application.Message
public void IMSend(string content, List<UserEntity> list)
{
List<string> userList = new List<string>();
foreach (var user in list) {
foreach (var user in list)
{
userList.Add(user.F_UserId);
}
iMSysUserIBLL.SendMsg("IMSystem", userList, content);
@@ -522,7 +535,7 @@ namespace Learun.Application.Message
/// 主键
/// </summary>
/// <returns></returns>
public string F_Id { get; set; }
/// <summary>
/// 流程进程主键


+ 14
- 8
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/AssScrap/AssScrapService.cs View File

@@ -223,26 +223,30 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem

public void ModifyStatusByProcessId(int pastatus, string processId)
{
var db = this.BaseRepository().BeginTrans();
try
{
var entity = this.BaseRepository().FindEntity<Ass_ScrapEntity>(a => a.SPProcessId == processId);
entity.SPStatus = pastatus;
this.BaseRepository().Update(entity);
db.Update(entity);
if (pastatus == 2)
{
var listScrapItem = this.BaseRepository().FindList<Ass_ScrapItemEntity>(a => a.SPId == entity.SPID);
var listScrapItem = db.FindList<Ass_ScrapItemEntity>(a => a.SPId == entity.SPID);
foreach (var item in listScrapItem)
{
var assInfo = this.BaseRepository().FindEntity<Ass_AssetsInfoEntity>(a => a.AId == item.AAIAId);
var assInfoItem = this.BaseRepository().FindEntity<Ass_AssetsInfoItemEntity>(a => a.AId == item.AAIAId);
var assInfoItem = db.FindEntity<Ass_AssetsInfoItemEntity>(a => a.AIId == item.AAIAId);
var assInfo = db.FindEntity<Ass_AssetsInfoEntity>(a => a.AId == assInfoItem.AId);
if (assInfoItem.AIIsInStorage == true)
{
assInfoItem.AIIsInStorage = false;
assInfo.AStock = assInfo.AStock - 1;
assInfoItem.AIASSState = 1;
if (assInfo != null)
{
assInfo.AStock = assInfo.AStock - 1;
db.Update(assInfo);
}
assInfoItem.AIASSState = 2;

this.BaseRepository().Update(assInfoItem);
this.BaseRepository().Update(assInfo);
db.Update(assInfoItem);
}


@@ -250,10 +254,12 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
}

}
db.Commit();

}
catch (Exception e)
{
db.Rollback();
if (e is ExceptionEx)
{
throw;


+ 0
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfo/Ass_AssetsInfoService.cs View File

@@ -229,7 +229,6 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
infoItem.AId = assInfoEntity.AId;
infoItem.AICode = assInfoEntity.ACode + "_" + codeNum.ToString();
infoItem.AICodeNum = codeNum;
infoItem.AIIsScrap = false;
}

this.BaseRepository().Update(assInfoItemList2);


+ 0
- 4
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfoApply/Ass_AssetsInfoApplyService.cs View File

@@ -316,7 +316,6 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
insertassinfoitem.AICodeNumJY = assinfoitem.ACode + "_" + insertassinfoitem.AICodeNum.ToString();
insertassinfoitem.AIIStorageId = assitemapp.AAIStorageId;
insertassinfoitem.AIASSName = assitemapp.AAIName;
insertassinfoitem.AIIsScrap = false;
insertassinfoitem.AIIStoragePosition = assitemapp.AAIStoragePosition;
insertassinfoitem.AIIsInStorage = true;
insertassinfoitem.AISpecification = assitemapp.AAISpecification;
@@ -371,7 +370,6 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
if (insertassinfoitem.AIIsInStorage == false)
{
insertassinfoitem.AIIsInStorage = true;
insertassinfoitem.AIIsScrap = false;
db.Update(insertassinfoitem);
}
}
@@ -417,7 +415,6 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
insertassinfoitem.AICodeNumJY = insertAss_AssetsInfo.ACode + "_" + insertassinfoitem.AICodeNum.ToString();
insertassinfoitem.AIASSName = assitemapp.AAIName;
insertassinfoitem.AIIStorageId = assitemapp.AAIStorageId;
insertassinfoitem.AIIsScrap = false;
insertassinfoitem.AIAssType = assinfoapp.AAAssType;
insertassinfoitem.AIIStoragePosition = assitemapp.AAIStoragePosition;
insertassinfoitem.AIIsInStorage = true;
@@ -475,7 +472,6 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
insertassinfoitem.AICodeNumJY = insertAss_AssetsInfo.ACode + "_" + insertassinfoitem.AICodeNum.ToString();
insertassinfoitem.AIASSName = assitemapp.AAIName;
insertassinfoitem.AIIStorageId = assitemapp.AAIStorageId;
insertassinfoitem.AIIsScrap = false;
insertassinfoitem.AIAssType = assinfoapp.AAAssType;
insertassinfoitem.AIIStoragePosition = assitemapp.AAIStoragePosition;
insertassinfoitem.AIIsInStorage = true;


+ 8
- 13
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfoItem/Ass_AssetsInfoItemEntity.cs View File

@@ -15,37 +15,37 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
{
#region 实体成员
/// <summary>
/// AIId
/// ID
/// </summary>
[Column("AIID")]
public string AIId { get; set; }
/// <summary>
/// AId
/// 资产ID
/// </summary>
[Column("AID")]
public string AId { get; set; }
/// <summary>
/// AICodeNum
/// 编号
/// </summary>
[Column("AICODENUM")]
public int? AICodeNum { get; set; }
/// <summary>
/// AICode
/// 资产明细编号
/// </summary>
[Column("AICODE")]
public string AICode { get; set; }
/// <summary>
/// AIIStorageId
/// 所在库房Id
/// </summary>
[Column("AIISTORAGEID")]
public string AIIStorageId { get; set; }
/// <summary>
/// AIIStoragePosition
/// 所在库位
/// </summary>
[Column("AIISTORAGEPOSITION")]
public string AIIStoragePosition { get; set; }
/// <summary>
/// AIIsInStorage
/// 是否在库
/// </summary>
[Column("AIISINSTORAGE")]
public bool? AIIsInStorage { get; set; }
@@ -100,7 +100,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
[Column("AIASSCLASS")]
public string AIASSClass { get; set; }
/// <summary>
/// 资产状态
/// 资产状态 0 正常使用 2 报废
/// </summary>
[Column("AIASSSTATE")]
public int? AIASSState { get; set; }
@@ -209,11 +209,6 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
/// </summary>
[Column("AIUSE")]
public string AIUse { get; set; }
/// <summary>
/// 是否报废
/// </summary>
[Column("AIISSCRAP")]
public bool? AIIsScrap { get; set; }

/// <summary>
/// 资产类别


+ 3221
- 3209
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM
File diff suppressed because it is too large
View File


+ 88
- 3
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EADateArrange/EADateArrangeService.cs View File

@@ -1,10 +1,18 @@
using Dapper;
using Learun.Application.Organization;
using Learun.Application.TwoDevelopment.LR_Desktop;
using Learun.DataBase.Repository;
using Learun.Util;
using Microsoft.AspNet.SignalR.Client;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
@@ -174,6 +182,38 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
try
{
this.BaseRepository("CollegeMIS").ExecuteBySql("update EADateArrange set CheckMark=" + checkMark + " where dm='" + keyValue + "'");
if (checkMark == 1)//审核
{
var entity = this.BaseRepository("CollegeMIS").FindEntity<EADateArrangeEntity>(keyValue);
if (entity != null)
{
var needpostuserlist = this.BaseRepository().FindList<UserEntity>(m => m.F_DeleteMark != 1 && m.F_EnabledMark == 1 && m.F_Description == "教师").ToList();
//读取信息推送管理-教学工作安排推送(08)的配置
var informationPushEntity = this.BaseRepository().FindEntity<Sys_InformationPushEntity>(x => x.PushItem == "08");
if (informationPushEntity != null && informationPushEntity.Status == true)
{
//微信推送
try
{
PushWeixin(needpostuserlist, entity.WorkName);
}
catch (Exception e)
{
}
//飞星推送
Task.Run(async () =>
{
using (var hubConnection = new HubConnection(ConfigurationManager.AppSettings["CommunicationServeraddress"]))
{
var hubProxy = hubConnection.CreateHubProxy("SignalRHub");
await hubConnection.Start();
await hubProxy.Invoke("PushAnnouncement", LoginUserInfo.Get().userId, entity.WorkName, Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(entity.WorkName)).Length < 20 ? Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(entity.WorkName)) : Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(entity.WorkName)).Substring(0, 20), "eadatearrange", string.Join(",", needpostuserlist.Select(m => m.F_UserId)), "");
}
});
}

}
}
}
catch (Exception ex)
{
@@ -269,7 +309,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
//成绩录入前初始化数据
//必修课
if (string.IsNullOrEmpty(entity.LessonSortNo) ||entity.LessonSortNo=="1")
if (string.IsNullOrEmpty(entity.LessonSortNo) || entity.LessonSortNo == "1")
{
//dyy:20190429
string sql = @"insert into stuscore(NoticeBookNo,StuNo,DeptNo,MajorNo,ClassNo,StuName,GenderNo,AcademicYearNo,Semester,OpenLessonDeptNo,OpenLessonMajorNo,LessonNo,LessonName,LessonNameEn,TeachClassNo,LessonSortNo,StuSortNo,Grade,StudyScore,TotalStudyHour,OrdinaryScore,TermInScore,TermEndScore,OtherScore,IsInEffect,Remark,ConflictLessonNo,IsPitchOn,CheckMark,TechPlanNo,EmpNo,PartCode,ScoreRecordStyleNo,TestModeNo,zysx,TestKindNo,IsEditable,F_SchoolId)
@@ -283,7 +323,7 @@ where s.CheckMark='1'
) as sl
where StuNo not in(Select StuNo from stuscore s where s.Academicyearno=sl.Academicyearno
and s.Semester=sl.Semester and s.lessonno=sl.lessonno and s.teachclassno=sl.teachclassno and s.LessonSortNo='1'
and s.Academicyearno='"+entity.AcademicYearNo+ "' and s.Semester='"+entity.Semester+ "') and sl.AcademicYearNo='"+entity.AcademicYearNo+ "' and sl.Semester='"+entity.Semester+"'";
and s.Academicyearno='" + entity.AcademicYearNo + "' and s.Semester='" + entity.Semester + "') and sl.AcademicYearNo='" + entity.AcademicYearNo + "' and sl.Semester='" + entity.Semester + "'";
BaseRepository("CollegeMIS").ExecuteBySql(sql);
//dyy:20190722
//初始化教师成绩单提交表
@@ -299,7 +339,7 @@ where s.lessonsortno='1'
) as bb
where bb.EmpNo not in
(select a.EmpNo from EmpReportCard a where a.AcademicYearNo=bb.AcademicYearNo and a.Semester=bb.Semester and a.LessonNo=bb.LessonNo and a.ClassNo=bb.ClassNo and a.LessonSortNo=bb.LessonSortNo and a.LessonSortNo='1'
and a.Academicyearno='" + entity.AcademicYearNo + "' and a.Semester='" + entity.Semester+ "') and bb.AcademicYearNo='" + entity.AcademicYearNo + "' and bb.Semester='" + entity.Semester + "' order by bb.EmpNo";
and a.Academicyearno='" + entity.AcademicYearNo + "' and a.Semester='" + entity.Semester + "') and bb.AcademicYearNo='" + entity.AcademicYearNo + "' and bb.Semester='" + entity.Semester + "' order by bb.EmpNo";
BaseRepository("CollegeMIS").ExecuteBySql(sql3);
}
//选修课
@@ -350,5 +390,50 @@ and a.Academicyearno='" + entity.AcademicYearNo + "' and a.Semester='" + entity.
}
}
}


public void PushWeixin(List<UserEntity> needpostuserlist, string title)
{
var WeChatConfigentity = BaseRepository().FindEntity<WeChatConfigEntity>(m => m.IsEnable == true);
string appid = WeChatConfigentity.APPId;
string secret = WeChatConfigentity.secret;
var wechatemplete = BaseRepository()
.FindEntity<WeChatTemplateEntity>(m => m.WeID == WeChatConfigentity.ID && m.TCode == "task");
string weixintaskurl = wechatemplete.TUrl;
string weixintasktempid = wechatemplete.TempId;
var responsejson = Util.HttpMethods.HttpGet("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + appid + "&secret=" + secret);
foreach (UserEntity userinfo in needpostuserlist)
{
if (userinfo != null && !string.IsNullOrEmpty(userinfo.OpenIdForWeixin))
{
//执行推送任务
if (!string.IsNullOrEmpty(appid) && !string.IsNullOrEmpty(secret) && !string.IsNullOrEmpty(weixintaskurl) && !string.IsNullOrEmpty(weixintasktempid))
{
if (!string.IsNullOrEmpty(responsejson))
{
var weixintokenobj = JsonConvert.DeserializeObject<dynamic>(responsejson);
if (string.IsNullOrEmpty(weixintokenobj.errcode))
{
string access_token = weixintokenobj.access_token;
string jsondata = "{\"touser\":\"" + userinfo.OpenIdForWeixin + "\"," +
"\"template_id\":\"" + weixintasktempid + "\"," +
"\"url\":\"" + weixintaskurl + "\"," +
"\"data\":{" +
"\"first\": {\"value\":\"您有新的教学工作安排\",\"color\":\"#173177\"}," +
"\"keyword1\":{\"value\":\"教学工作安排\",\"color\":\"#173177\"}," +
"\"keyword2\": {\"value\":\"" + title + "\",\"color\":\"#173177\"}," +
"\"keyword3\": {\"value\":\"待查看\",\"color\":\"#173177\"}," +
"\"keyword4\": {\"value\":\"您有新的教学工作安排需要查看【" + title + "】\",\"color\":\"#173177\"}" +
"}" +
"}";
string pushresult = Util.HttpMethods.HttpPost("https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=" + access_token, jsondata);
}
}
}
}
}
}


}
}

+ 21
- 15
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SYS_SendMessage/SYS_SendMessageService.cs View File

@@ -233,24 +233,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
this.BaseRepository().Insert(receiveMessageEntity);
}
this.BaseRepository().Commit();
//微信推送
try
//读取信息推送管理-内部邮件推送(03)的配置
var informationPushEntity = this.BaseRepository().FindEntity<Sys_InformationPushEntity>(x => x.PushItem == "03");
if (informationPushEntity != null && informationPushEntity.Status == true)
{
PushWeixin(userInfos, messageentity.TITLE);
}
catch (Exception e)
{
}
//飞星推送
Task.Run(async () =>
{
using (var hubConnection = new HubConnection(ConfigurationManager.AppSettings["CommunicationServeraddress"]))
//微信推送
try
{
PushWeixin(userInfos, messageentity.TITLE);
}
catch (Exception e)
{
var hubProxy = hubConnection.CreateHubProxy("SignalRHub");
await hubConnection.Start();
await hubProxy.Invoke("PushAnnouncement", messageentity.MESSAGEID, messageentity.TITLE, Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(messageentity.CONTENTS)).Length < 20 ? Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(messageentity.CONTENTS)) : Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(messageentity.CONTENTS)).Substring(0, 20), "mail", string.Join(",", userInfos.Select(m => m.F_UserId)), "");
}
});
//飞星推送
Task.Run(async () =>
{
using (var hubConnection = new HubConnection(ConfigurationManager.AppSettings["CommunicationServeraddress"]))
{
var hubProxy = hubConnection.CreateHubProxy("SignalRHub");
await hubConnection.Start();
await hubProxy.Invoke("PushAnnouncement", messageentity.MESSAGEID, messageentity.TITLE, Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(messageentity.CONTENTS)).Length < 20 ? Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(messageentity.CONTENTS)) : Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(messageentity.CONTENTS)).Substring(0, 20), "mail", string.Join(",", userInfos.Select(m => m.F_UserId)), "");
}
});
}

}
catch (Exception ex)
{


+ 24
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_InformationPush/Sys_InformationPushBLL.cs View File

@@ -67,6 +67,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 获取Sys_InformationPush表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public Sys_InformationPushEntity GetEntityByPushItem(string pushItem)
{
try
{
return sys_InformationPushService.GetEntityByPushItem(pushItem);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据


+ 7
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_InformationPush/Sys_InformationPushIBLL.cs View File

@@ -27,6 +27,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="keyValue">主键</param>
/// <returns></returns>
Sys_InformationPushEntity GetSys_InformationPushEntity(string keyValue);

/// <summary>
/// 获取Sys_InformationPush表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
Sys_InformationPushEntity GetEntityByPushItem(string pushItem);
#endregion

#region 提交数据


+ 26
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_InformationPush/Sys_InformationPushService.cs View File

@@ -41,7 +41,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
return this.BaseRepository().FindList<Sys_InformationPushEntity>(strSql.ToString(),dp, pagination);
return this.BaseRepository().FindList<Sys_InformationPushEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
@@ -80,6 +80,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 获取Sys_InformationPush表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public Sys_InformationPushEntity GetEntityByPushItem(string pushItem)
{
try
{
return this.BaseRepository().FindEntity<Sys_InformationPushEntity>(x => x.PushItem == pushItem);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据
@@ -92,7 +116,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
try
{
this.BaseRepository().Delete<Sys_InformationPushEntity>(t=>t.Id == keyValue);
this.BaseRepository().Delete<Sys_InformationPushEntity>(t => t.Id == keyValue);
}
catch (Exception ex)
{


+ 42
- 30
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileService.cs View File

@@ -412,24 +412,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
Sys_SendFile.ReceiverId = stringBuilder.ToString().TrimEnd(',');
db.Update(Sys_SendFile);
db.Commit();
//微信推送
try
//读取信息推送管理-公文下发推送(02)的配置
var informationPushEntity = this.BaseRepository().FindEntity<Sys_InformationPushEntity>(x => x.PushItem == "02");
if (informationPushEntity != null && informationPushEntity.Status == true)
{
PushWeixin(teacherlist, Sys_SendFile.Title);
}
catch (Exception e)
{
}
//飞星推送
Task.Run(async () =>
{
using (var hubConnection = new HubConnection(ConfigurationManager.AppSettings["CommunicationServeraddress"]))
//微信推送
try
{
PushWeixin(teacherlist, Sys_SendFile.Title);
}
catch (Exception e)
{
var hubProxy = hubConnection.CreateHubProxy("SignalRHub");
await hubConnection.Start();
await hubProxy.Invoke("PushAnnouncement", Sys_SendFile.SenderId, Sys_SendFile.Title, Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_SendFile.Contents)).Length < 20 ? Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_SendFile.Contents)) : Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_SendFile.Contents)).Substring(0, 20), "sendfile", string.Join(",", teacherlist.Select(m => m.F_UserId)), "");
}
});
//飞星推送
Task.Run(async () =>
{
using (var hubConnection = new HubConnection(ConfigurationManager.AppSettings["CommunicationServeraddress"]))
{
var hubProxy = hubConnection.CreateHubProxy("SignalRHub");
await hubConnection.Start();
await hubProxy.Invoke("PushAnnouncement", Sys_SendFile.SenderId, Sys_SendFile.Title, Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_SendFile.Contents)).Length < 20 ? Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_SendFile.Contents)) : Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_SendFile.Contents)).Substring(0, 20), "sendfile", string.Join(",", teacherlist.Select(m => m.F_UserId)), "");
}
});
}

}
catch (Exception ex)
{
@@ -507,24 +513,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
Sys_ReceiveDocument.ReceiverId = stringBuilder.ToString().TrimEnd(',');
db.Update(Sys_ReceiveDocument);
db.Commit();
//微信推送
try
//读取信息推送管理-公文下发推送(02)的配置
var informationPushEntity = this.BaseRepository().FindEntity<Sys_InformationPushEntity>(x => x.PushItem == "02");
if (informationPushEntity != null && informationPushEntity.Status == true)
{
PushWeixin(teacherlist, Sys_ReceiveDocument.RTitle);
}
catch (Exception e)
{
}
//飞星推送
Task.Run(async () =>
{
using (var hubConnection = new HubConnection(ConfigurationManager.AppSettings["CommunicationServeraddress"]))
//微信推送
try
{
PushWeixin(teacherlist, Sys_ReceiveDocument.RTitle);
}
catch (Exception e)
{
var hubProxy = hubConnection.CreateHubProxy("SignalRHub");
await hubConnection.Start();
await hubProxy.Invoke("PushAnnouncement", Sys_ReceiveDocument.SenderId, Sys_ReceiveDocument.RTitle, Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_ReceiveDocument.RContent)).Length < 20 ? Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_ReceiveDocument.RContent)) : Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_ReceiveDocument.RContent)).Substring(0, 20), "sendfile", string.Join(",", teacherlist.Select(m => m.F_UserId)), "");
}
});
//飞星推送
Task.Run(async () =>
{
using (var hubConnection = new HubConnection(ConfigurationManager.AppSettings["CommunicationServeraddress"]))
{
var hubProxy = hubConnection.CreateHubProxy("SignalRHub");
await hubConnection.Start();
await hubProxy.Invoke("PushAnnouncement", Sys_ReceiveDocument.SenderId, Sys_ReceiveDocument.RTitle, Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_ReceiveDocument.RContent)).Length < 20 ? Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_ReceiveDocument.RContent)) : Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_ReceiveDocument.RContent)).Substring(0, 20), "sendfile", string.Join(",", teacherlist.Select(m => m.F_UserId)), "");
}
});
}

}
catch (Exception ex)
{


+ 21
- 15
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileService.cs View File

@@ -362,24 +362,30 @@ on a.F_UserId=b.F_UserId where b.F_ObjectId in(" + string.Join(",", ppostid) +
Sys_SendFile.SendTime = DateTime.Now;
db.Update(Sys_SendFile);
db.Commit();
//微信推送
try
//读取信息推送管理-公文下发推送(02)的配置
var informationPushEntity = this.BaseRepository().FindEntity<Sys_InformationPushEntity>(x => x.PushItem == "02");
if (informationPushEntity != null && informationPushEntity.Status == true)
{
PushWeixin(needpostuserlist, Sys_SendFile.Title);
}
catch (Exception e)
{
}
//飞星推送
Task.Run(async () =>
{
using (var hubConnection = new HubConnection(ConfigurationManager.AppSettings["CommunicationServeraddress"]))
//微信推送
try
{
PushWeixin(needpostuserlist, Sys_SendFile.Title);
}
catch (Exception e)
{
var hubProxy = hubConnection.CreateHubProxy("SignalRHub");
await hubConnection.Start();
await hubProxy.Invoke("PushAnnouncement", Sys_SendFile.SenderId, Sys_SendFile.Title, Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_SendFile.Contents)).Length < 20 ? Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_SendFile.Contents)) : Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_SendFile.Contents)).Substring(0, 20), "sendfile", string.Join(",", needpostuserlist.Select(m => m.F_UserId)), "");
}
});
//飞星推送
Task.Run(async () =>
{
using (var hubConnection = new HubConnection(ConfigurationManager.AppSettings["CommunicationServeraddress"]))
{
var hubProxy = hubConnection.CreateHubProxy("SignalRHub");
await hubConnection.Start();
await hubProxy.Invoke("PushAnnouncement", Sys_SendFile.SenderId, Sys_SendFile.Title, Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_SendFile.Contents)).Length < 20 ? Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_SendFile.Contents)) : Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_SendFile.Contents)).Substring(0, 20), "sendfile", string.Join(",", needpostuserlist.Select(m => m.F_UserId)), "");
}
});
}

}
catch (Exception ex)
{


+ 17
- 5
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Thermography/ThermographyService.cs View File

@@ -403,12 +403,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
LogEntity logEntity = new LogEntity();
logEntity.F_LogId = Guid.NewGuid().ToString();
logEntity.F_Module = "Thermography";
logEntity.F_ExecuteResultJson = "Thermography Status="+entity.Status;
logEntity.F_ExecuteResultJson = "Thermography Status=" + entity.Status;
logEntity.WriteLog();
//体温异常
if (entity.Status == "2")
{
//微信推送
try
{
var stuModel = this.BaseRepository("CollegeMIS").FindEntity<StuInfoBasicEntity>(x => x.StuNo == entity.PersonBeingMeasured);
@@ -420,7 +419,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
logEntity.F_ExecuteResultJson = "Thermography stuModelStuNo=" + stuModel.StuNo;
logEntity.WriteLog();
var title = string.Format("{0}({1})", stuModel.StuName, stuModel.StuNo);
PushWeixin(title);
//读取信息推送管理-班级自诊打卡体温异常学生推送(05)的配置
var informationPushEntity = this.BaseRepository().FindEntity<Sys_InformationPushEntity>(x => x.PushItem == "05");
if (informationPushEntity != null && informationPushEntity.Status == true)
{
//微信推送
PushWeixin(title);
}

}
}
catch (Exception e)
@@ -532,14 +538,20 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
//体温异常
if (entity.Status == "2")
{
//微信推送
try
{
var stuModel = db.FindEntity<StuInfoBasicEntity>(x => x.StuNo == entity.PersonBeingMeasured);
if (stuModel != null)
{
var title = string.Format("{0}({1})", stuModel.StuName, stuModel.StuNo);
PushWeixin(title);
//读取信息推送管理-班级自诊打卡体温异常学生推送(05)的配置
var informationPushEntity = this.BaseRepository().FindEntity<Sys_InformationPushEntity>(x => x.PushItem == "05");
if (informationPushEntity != null && informationPushEntity.Status == true)
{
//微信推送
PushWeixin(title);
}

}
}
catch (Exception e)


+ 17
- 9
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/WfTask/WfTaskService.cs View File

@@ -12,6 +12,7 @@ using Learun.Application.Organization;
using Learun.Application.TwoDevelopment.LR_Desktop;
using Microsoft.AspNet.SignalR.Client;
using Newtonsoft.Json;
using Learun.Application.TwoDevelopment.EducationalAdministration;

namespace Learun.Application.WorkFlow
{
@@ -492,13 +493,20 @@ namespace Learun.Application.WorkFlow

wfTaskEntity.Create();
this.BaseRepository().Insert(wfTaskEntity);
try
{
PushWeixin(wfTaskEntity);
}
catch (Exception e)
//读取信息推送管理-待办流程推送(04)的配置
var informationPushEntity = this.BaseRepository().FindEntity<Sys_InformationPushEntity>(x => x.PushItem == "04");
if (informationPushEntity != null && informationPushEntity.Status == true)
{
//微信推送
try
{
PushWeixin(wfTaskEntity);
}
catch (Exception e)
{
}
}

}
}
else
@@ -588,9 +596,9 @@ namespace Learun.Application.WorkFlow
if (userinfo != null && !string.IsNullOrEmpty(userinfo.OpenIdForWeixin) && processinstance != null)
{
//执行推送任务
if (!string.IsNullOrEmpty(appid) && !string.IsNullOrEmpty(secret)&& !string.IsNullOrEmpty(weixintaskurl)&&!string.IsNullOrEmpty(weixintasktempid))
if (!string.IsNullOrEmpty(appid) && !string.IsNullOrEmpty(secret) && !string.IsNullOrEmpty(weixintaskurl) && !string.IsNullOrEmpty(weixintasktempid))
{
if (!string.IsNullOrEmpty(responsejson))
{
var weixintokenobj = JsonConvert.DeserializeObject<dynamic>(responsejson);
@@ -598,7 +606,7 @@ namespace Learun.Application.WorkFlow
{
string access_token = weixintokenobj.access_token;
string jsondata = "{\"touser\":\"" + userinfo.OpenIdForWeixin + "\"," +
"\"template_id\":\""+ weixintasktempid + "\"," +
"\"template_id\":\"" + weixintasktempid + "\"," +
"\"url\":\"" + weixintaskurl + "\"," +
"\"data\":{" +
"\"first\": {\"value\":\"" + processinstance.F_SchemeName + "\",\"color\":\"#173177\"}," +
@@ -609,7 +617,7 @@ namespace Learun.Application.WorkFlow
//"\"remark\":{\"value\":\"欢迎再次购买!\",\"color\":\"#173177\"}" +
"}" +
"}";
string pushresult= Util.HttpMethods.HttpPost("https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=" + access_token, jsondata);
string pushresult = Util.HttpMethods.HttpPost("https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=" + access_token, jsondata);
}
}
}


Loading…
Cancel
Save