葛恒:奖惩

This commit is contained in:
2026-03-16 20:12:55 +08:00
parent 13364fcbf7
commit ab33ffa365
53 changed files with 6455 additions and 1032 deletions
@@ -2,9 +2,7 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections;
using System.Linq;
using System.Runtime.InteropServices.ComTypes;
namespace BLL
{
@@ -40,8 +38,8 @@ namespace BLL
from blt in bltGroup.DefaultIfEmpty()
join su in db.Sys_User on x.CompileMan equals su.UserId into sUser
from su in sUser.DefaultIfEmpty()
//join uw in db.WBS_UnitWork on x.WorkAreaId equals uw.UnitWorkId into uwGroup
//from uw in uwGroup.DefaultIfEmpty()
//join uw in db.WBS_UnitWork on x.WorkAreaId equals uw.UnitWorkId into uwGroup
//from uw in uwGroup.DefaultIfEmpty()
join att in db.AttachFile on x.LicenseManagerId equals att.ToKeyId into attTemp
from att in attTemp.DefaultIfEmpty()
join att1 in db.AttachFile on (x.LicenseManagerId + "_GB") equals att1.ToKeyId into att1Temp
@@ -88,7 +86,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 LicenseManagerData
{
CollCropCode = thisUnit.CollCropCode,//分包单位社会统一信用码
@@ -96,34 +94,41 @@ 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(project.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/LicenseSync/ReceiveSaveProjectLicenseManagerData";
string contenttype = "application/json;charset=unicode";
//Hashtable newToken = new Hashtable
//{
// { "token", ServerService.GetToken().Token }
//};
//ErrLogInfo.WriteLog($"【班前会推送数据】接口地址:{baseurl}{pushContent}");
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();
@@ -183,7 +188,7 @@ namespace BLL
{
try
{
var model= db.License_LicenseManager.FirstOrDefault(e => e.LicenseManagerId == item.LicenseManagerId);
var model = db.License_LicenseManager.FirstOrDefault(e => e.LicenseManagerId == item.LicenseManagerId);
if (model != null)
{//编辑
model.ProjectId = data.SubjectProject;