代码无效引用清理,试压包资料界面看板修改

This commit is contained in:
2025-10-10 14:33:21 +08:00
parent 87fb529521
commit 55b798135c
933 changed files with 5897 additions and 7541 deletions
+19 -22
View File
@@ -1,13 +1,10 @@
using Model;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using NPOI.SS.UserModel;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Numerics;
using WIA;
namespace BLL
{
@@ -374,7 +371,7 @@ namespace BLL
}
public static string PushDataToHSE(string projectId, string contractNum,string costManageId)
public static string PushDataToHSE(string projectId, string contractNum, string costManageId)
{
try
{
@@ -384,12 +381,12 @@ namespace BLL
where x.ProjectId == projectId && x.ContractNum == contractNum && x.States == Const.State_2
orderby x.CostManageDate descending
select x;
var projectModel=ProjectService.GetProjectByProjectId(projectId);
var projectModel = ProjectService.GetProjectByProjectId(projectId);
var contractModel = CostManageService.GetCostManageById(costManageId);
//decimal totalAmount = costData.Sum(x => x.SumMoney ?? 0);
var files = new List<object>();
if (contractModel!=null)
{
if (contractModel != null)
{
var url = ConstValue.GetConstByConstText("PU_PUSH_URL")?.ConstValue;
if (string.IsNullOrEmpty(url))
{
@@ -414,16 +411,16 @@ namespace BLL
{
message = "获取Pu系统Token失败,Token为空";
return message;
}
}
Dictionary<string, string> headers = new Dictionary<string, string>();
headers.Add("Authorization", "Bearer " + accessToken);
#region
var getRequestUrl = url + "/pu_api/payCraftAmountToHSE/get";
var getRequestbody= $"{{\"projectNumber\":\"{projectModel.ProjectCode}\",\"contractNo\":\"{contractNum}\"}}";
APICommonService.SaveSysHttpLog("PU_GetPuPayCraftAmount", getRequestUrl, getRequestbody, "Requset");
var getRequestbody = $"{{\"projectNumber\":\"{projectModel.ProjectCode}\",\"contractNo\":\"{contractNum}\"}}";
APICommonService.SaveSysHttpLog("PU_GetPuPayCraftAmount", getRequestUrl, getRequestbody, "Requset");
var getResponse = Funs.RequestPost(getRequestUrl, headers, getRequestbody);
APICommonService.SaveSysHttpLog("PU_GetPuPayCraftAmount", getRequestUrl, getResponse, "Response");
var getResponseStr = JsonConvert.DeserializeObject<JObject>(getResponse);
APICommonService.SaveSysHttpLog("PU_GetPuPayCraftAmount", getRequestUrl, getResponse, "Response");
var getResponseStr = JsonConvert.DeserializeObject<JObject>(getResponse);
if (getResponseStr == null)
{
message = "推送数据到HSE系统失败";
@@ -433,9 +430,9 @@ namespace BLL
{
message = getResponseStr["message"]?.ToString();
return message;
}
var getResponseOutput = JsonConvert.DeserializeObject<List<PuGetApiOutput>>(getResponseStr["data"]?.ToString()) ;
if (getResponseOutput.Any() && getResponseOutput.Count(x=>x.itemNo== costManageId)>0)
}
var getResponseOutput = JsonConvert.DeserializeObject<List<PuGetApiOutput>>(getResponseStr["data"]?.ToString());
if (getResponseOutput.Any() && getResponseOutput.Count(x => x.itemNo == costManageId) > 0)
{
message = "当前费用已推送,无需重复推送!";
return message;
@@ -459,9 +456,9 @@ namespace BLL
itemId= costManageId,
contractNo = contractNum,
amountHSE = contractModel.SumMoney.ToString(),
files = files
}
};
files = files
}
};
var jsonBody = JsonConvert.SerializeObject(puAddApiInputs);
APICommonService.SaveSysHttpLog("PU_AddPuPayCraftAmount", requestUrl, jsonBody, "Requset");
var responseHSE = Funs.RequestPost(requestUrl, headers, jsonBody);
@@ -472,7 +469,7 @@ namespace BLL
message = "推送数据到HSE系统失败";
return message;
}
else if ( string.IsNullOrEmpty(responseHSEStr["code"]?.ToString()))
else if (string.IsNullOrEmpty(responseHSEStr["code"]?.ToString()))
{
message = responseHSE;
return message;
@@ -482,7 +479,7 @@ namespace BLL
message = responseHSEStr["message"]?.ToString();
return message;
}
else
else
{
message = "";
return message;
@@ -534,12 +531,12 @@ namespace BLL
});
continue;//只取第一个文件
}
}
}
}
}
return result;
}