葛恒:奖惩
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
using Model;
|
||||
using Model;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.ComTypes;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
@@ -89,7 +87,7 @@ namespace BLL
|
||||
if (dataList.Count() > 0)
|
||||
{
|
||||
var thisUnit = CommonService.GetIsThisUnit();
|
||||
var porject = BLL.ProjectService.GetProjectByProjectId(projectId);
|
||||
var project = BLL.ProjectService.GetProjectByProjectId(projectId);
|
||||
var pushData = new ClassMeetingData
|
||||
{
|
||||
CollCropCode = thisUnit.CollCropCode,//分包单位社会统一信用码
|
||||
@@ -97,25 +95,28 @@ namespace BLL
|
||||
UnitName = thisUnit.UnitName,//分包单位名称
|
||||
ShortUnitName = thisUnit.ShortUnitName,//分包单位简称
|
||||
UnitDomain = Funs.SGGLUrl,//分包单位域名地址【文件存储地址】
|
||||
SubjectUnit = porject.SubjectUnit,//主包单位Id
|
||||
SubjectProject = porject.SubjectProject,//主包项目Id
|
||||
SubjectUnit = project.SubjectUnit,//主包单位Id
|
||||
SubjectProject = project.SubjectProject,//主包项目Id
|
||||
Items = dataList//会议数据
|
||||
};
|
||||
var pushContent = JsonConvert.SerializeObject(pushData);
|
||||
|
||||
//获取总包单位接口apiurl地址
|
||||
var Url = BLL.UnitService.getUnitApiUrlByUnitId(porject.SubjectUnit);
|
||||
var ApiUrl = string.Empty;
|
||||
var WebUrl = string.Empty;
|
||||
if (Url != null)
|
||||
{
|
||||
var urls = Url.Split(',');
|
||||
ApiUrl = urls[0];
|
||||
if (urls.Length > 1)
|
||||
{
|
||||
WebUrl = urls[1];
|
||||
}
|
||||
}
|
||||
////获取总包单位接口apiurl地址
|
||||
//var Url = BLL.UnitService.getUnitApiUrlByUnitId(porject.SubjectUnit);
|
||||
//var ApiUrl = string.Empty;
|
||||
//var WebUrl = string.Empty;
|
||||
//if (Url != null)
|
||||
//{
|
||||
// var urls = Url.Split(',');
|
||||
// ApiUrl = urls[0];
|
||||
// if (urls.Length > 1)
|
||||
// {
|
||||
// WebUrl = urls[1];
|
||||
// }
|
||||
//}
|
||||
//总包单位接口地址
|
||||
string ApiUrl = project.SubjectUnitApiUrl;
|
||||
string WebUrl = project.SubjectUnitWebUrl;
|
||||
var baseurl = $"{ApiUrl}/api/MeetingSync/ReceiveSaveProjectClassMeetingData";
|
||||
string contenttype = "application/json;charset=unicode";
|
||||
//Hashtable newToken = new Hashtable
|
||||
@@ -125,9 +126,12 @@ namespace BLL
|
||||
var returndata = APIGetHttpService.Http(baseurl, "Post", contenttype, null, pushContent);
|
||||
if (!string.IsNullOrEmpty(returndata))
|
||||
{
|
||||
// ErrLogInfo.WriteLog($"【班前会返回结果】接口地址:{baseurl};{returndata}");
|
||||
JObject obj = JObject.Parse(returndata);
|
||||
string mess = obj["message"].ToString();
|
||||
string code = obj["code"].ToString();
|
||||
string message = obj["message"].ToString();
|
||||
responeData.code = int.Parse(code);
|
||||
responeData.message = message;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -160,8 +164,6 @@ namespace BLL
|
||||
string result = string.Empty;
|
||||
if (data.Items.Count() > 0)
|
||||
{
|
||||
//var jsonData = JsonConvert.SerializeObject(data);
|
||||
//ErrLogInfo.WriteLog($"【班前会接收数据】{jsonData}");
|
||||
//1、判断分包单位是否存在
|
||||
var unit = UnitService.getUnitByCollCropCodeUnitName(data.CollCropCode, data.UnitName);
|
||||
if (unit == null)
|
||||
@@ -209,7 +211,7 @@ namespace BLL
|
||||
//model.Remark = item.Remark;
|
||||
model.Remark = $"{(!string.IsNullOrWhiteSpace(data.ShortUnitName) ? data.ShortUnitName : data.UnitName)}#{item.CompileManName}";
|
||||
model.CompileDate = item.CompileDate;
|
||||
//newModel.CompileMan = item.CompileMan;
|
||||
model.CompileMan = item.CompileMan;
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
@@ -239,14 +241,12 @@ namespace BLL
|
||||
//newModel.Remark = item.Remark;
|
||||
newModel.Remark = $"{(!string.IsNullOrWhiteSpace(data.ShortUnitName) ? data.ShortUnitName : data.UnitName)}#{item.CompileManName}";
|
||||
newModel.CompileDate = item.CompileDate;
|
||||
//newModel.CompileMan = item.CompileMan;
|
||||
newModel.CompileMan = item.CompileMan;
|
||||
|
||||
db.Meeting_ClassMeeting.InsertOnSubmit(newModel);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
succ++;
|
||||
|
||||
//ErrLogInfo.WriteLog($"【班前会接收数据——内容附件】UnitDomain:{data.UnitDomain};AttachFileId:{item.AttachFileId};ToKeyId:{item.ToKeyId};AttachSource:{item.AttachSource};AttachUrl:{item.AttachUrl}");
|
||||
//附件处理:内容附件
|
||||
BLL.FileInsertService.SaveAttachFileRecords(data.UnitDomain, item.AttachFileId, item.ToKeyId, item.AttachSource, item.AttachUrl);
|
||||
//附件处理:签到表
|
||||
|
||||
Reference in New Issue
Block a user