代码无效引用清理,试压包资料界面看板修改
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
@@ -10,7 +8,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class CostManageItemService
|
||||
{
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除费用管理明细
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class CostSmallDetailItemService
|
||||
{
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取安全费用投入登记明细
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class CostSmallDetailService
|
||||
{
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取安全费用投入登记
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using WIA;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
@@ -27,7 +25,7 @@ namespace BLL
|
||||
join y in db.Base_CostType on x.CostTypeId equals y.CostTypeId
|
||||
select new
|
||||
{
|
||||
ExpenseId=expenseId,
|
||||
ExpenseId = expenseId,
|
||||
SupCostTypeId = y.CostTypeId,
|
||||
SupCostTypeName = y.CostTypeName,
|
||||
SupSortIndex = y.CostTypeCode,
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace BLL
|
||||
select x;
|
||||
if (!string.IsNullOrEmpty(unitId) && unitId != Const._Null)
|
||||
{
|
||||
getData = getData.Where(x =>x.UnitId == unitId);
|
||||
getData = getData.Where(x => x.UnitId == unitId);
|
||||
}
|
||||
if (year.HasValue)
|
||||
{
|
||||
@@ -69,10 +69,10 @@ namespace BLL
|
||||
ProjectId = expense.ProjectId,
|
||||
ExpenseCode = expense.ExpenseCode,
|
||||
UnitId = expense.UnitId,
|
||||
ReportDate=expense.ReportDate,
|
||||
ReportDate = expense.ReportDate,
|
||||
CreateDate = expense.CreateDate,
|
||||
States = expense.States,
|
||||
CompileMan = expense.CompileMan,
|
||||
CompileMan = expense.CompileMan,
|
||||
CompileDate = expense.CompileDate,
|
||||
SortIndex = expense.SortIndex,
|
||||
Year = expense.Year,
|
||||
@@ -94,7 +94,7 @@ namespace BLL
|
||||
{
|
||||
//newExpense.ProjectId = expense.ProjectId;
|
||||
newExpense.ExpenseCode = expense.ExpenseCode;
|
||||
newExpense.UnitId = expense.UnitId;
|
||||
newExpense.UnitId = expense.UnitId;
|
||||
newExpense.States = expense.States;
|
||||
newExpense.Months = expense.Months;
|
||||
newExpense.ReportDate = expense.ReportDate;
|
||||
@@ -142,16 +142,16 @@ namespace BLL
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="Year"></param>
|
||||
public static void SetSumYearExpense(string projectId,int Year)
|
||||
public static void SetSumYearExpense(string projectId, int Year)
|
||||
{
|
||||
var getYearEx = Funs.DB. CostGoods_Expense.FirstOrDefault(x=>x.ProjectId == projectId && x.Year == Year && x.UnitId == null);
|
||||
var getYearEx = Funs.DB.CostGoods_Expense.FirstOrDefault(x => x.ProjectId == projectId && x.Year == Year && x.UnitId == null);
|
||||
if (getYearEx != null)
|
||||
{
|
||||
Funs.DB.CostGoods_Expense.DeleteOnSubmit(getYearEx);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
var getALLEx=from x in Funs.DB.CostGoods_Expense where x.ProjectId == projectId && x.Year == Year && x.UnitId != null select x;
|
||||
var getALLEx = from x in Funs.DB.CostGoods_Expense where x.ProjectId == projectId && x.Year == Year && x.UnitId != null select x;
|
||||
if (getALLEx.Count() > 0)
|
||||
{
|
||||
Model.CostGoods_Expense newExpense = new Model.CostGoods_Expense
|
||||
|
||||
Reference in New Issue
Block a user