2024-03-11 合同发票修改
This commit is contained in:
@@ -10,6 +10,7 @@ using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
@@ -21,12 +24,18 @@ namespace BLL
|
||||
return Funs.DB.PHTGL_Approve.FirstOrDefault(e => e.ApproveId == ApproveId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取未审批记录
|
||||
/// </summary>
|
||||
/// <param name="contractId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.PHTGL_Approve> GetPHTGL_ApproveByContractId(string contractId)
|
||||
{
|
||||
var q = (from x in Funs.DB.PHTGL_Approve where x.ContractId == contractId && x.State == 0 select x).ToList();
|
||||
|
||||
return q;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///获取当前人员的所有审批信息
|
||||
/// </summary>
|
||||
@@ -80,6 +89,22 @@ namespace BLL
|
||||
return IsExit;
|
||||
}
|
||||
/// <summary>
|
||||
/// 判断当前人员是否正在审批
|
||||
/// </summary>
|
||||
/// <param name="contractId"></param>
|
||||
/// <param name="approveMan"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsApprovingMan(string contractId, string approveMan)
|
||||
{
|
||||
bool IsExit = false;
|
||||
var q = (from x in Funs.DB.PHTGL_Approve where x.ContractId == contractId && x.ApproveMan == approveMan && x.State==0 select x).ToList();
|
||||
if (q.Count>0)
|
||||
{
|
||||
IsExit = true;
|
||||
}
|
||||
return IsExit;
|
||||
}
|
||||
/// <summary>
|
||||
/// 添加审批人员记录
|
||||
/// </summary>
|
||||
/// <param name="newtable"></param>
|
||||
@@ -207,23 +232,70 @@ namespace BLL
|
||||
/// </summary>
|
||||
/// <param name="ContractId"></param>
|
||||
/// <returns></returns>
|
||||
public static DataTable GetAllApproveData(string ContractId)
|
||||
//public static DataTable GetAllApproveData(string ContractId)
|
||||
//{
|
||||
// string strSql = @" select u.PersonName as ApproveMan,
|
||||
// App.ApproveDate,
|
||||
// (CASE App.IsAgree WHEN '1' THEN '不同意'
|
||||
// WHEN '2' THEN '同意' END) AS IsAgree,
|
||||
// App.ApproveIdea,
|
||||
// App.ApproveId,
|
||||
// App.ApproveType
|
||||
// from PHTGL_Approve as App"
|
||||
// + @" left join Person_Persons AS U ON U.PersonId = App.ApproveMan WHERE 1=1 and App.IsAgree <>0 and app.ContractId= @ContractId order by convert(datetime ,App.ApproveDate) ";
|
||||
// List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
// listStr.Add(new SqlParameter("@ContractId", ContractId));
|
||||
// SqlParameter[] parameter = listStr.ToArray();
|
||||
// DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
// return tb;
|
||||
//}
|
||||
public static IEnumerable GetAllApproveData(string contractId)
|
||||
{
|
||||
string strSql = @" select u.PersonName as ApproveMan,
|
||||
App.ApproveDate,
|
||||
(CASE App.IsAgree WHEN '1' THEN '不同意'
|
||||
WHEN '2' THEN '同意' END) AS IsAgree,
|
||||
App.ApproveIdea,
|
||||
App.ApproveId,
|
||||
App.ApproveType
|
||||
from PHTGL_Approve as App"
|
||||
+ @" left join Person_Persons AS U ON U.PersonId = App.ApproveMan WHERE 1=1 and App.IsAgree <>0 and app.ContractId= @ContractId order by convert(datetime ,App.ApproveDate) ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ContractId", ContractId));
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
return tb;
|
||||
var result = (from x in Funs.DB.PHTGL_Approve
|
||||
join u in Funs.DB.Person_Persons on x.ApproveMan equals u.PersonId
|
||||
where x.IsAgree != 0 && x.ContractId == contractId
|
||||
orderby x.ApproveDate
|
||||
select new
|
||||
{
|
||||
ApproveMan = u.PersonName,
|
||||
x.ApproveDate,
|
||||
IsAgree = x.IsAgree == 1 ? "不同意" : "同意",
|
||||
x.ApproveIdea,
|
||||
x.ApproveId,
|
||||
x.ApproveType,
|
||||
x.ApproveForm
|
||||
}
|
||||
|
||||
).ToList();
|
||||
|
||||
return result;
|
||||
}
|
||||
public static IEnumerable GetAllApproveData(string contractId,string aproveForm)
|
||||
{
|
||||
var result = (from x in Funs.DB.PHTGL_Approve
|
||||
join u in Funs.DB.Person_Persons on x.ApproveMan equals u.PersonId
|
||||
where x.IsAgree != 0 && x.ContractId == contractId
|
||||
orderby x.ApproveDate
|
||||
select new
|
||||
{
|
||||
ApproveMan = u.PersonName,
|
||||
x.ApproveDate,
|
||||
IsAgree = x.IsAgree == 1 ? "不同意" : "同意",
|
||||
x.ApproveIdea,
|
||||
x.ApproveId,
|
||||
x.ApproveType,
|
||||
x.ApproveForm
|
||||
}
|
||||
|
||||
).ToList();
|
||||
if (!string.IsNullOrEmpty(aproveForm))
|
||||
{
|
||||
result = result.Where(x => x.ApproveForm == aproveForm).ToList();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取最后拒绝的人员
|
||||
/// </summary>
|
||||
@@ -243,57 +315,4 @@ namespace BLL
|
||||
return tb;
|
||||
}
|
||||
}
|
||||
public class ApproveManModel
|
||||
{
|
||||
public int Number
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public string userid
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public string Rolename
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
}
|
||||
public class PrintModel
|
||||
{
|
||||
public int Number
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public string Rolename
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public string UserName
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public string Image
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public string ApproveIdea
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public string ApproveDate
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,8 +217,6 @@ namespace BLL
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void UpdatePHTGL_ContractTrack(PHTGL_ContractTrack newtable)
|
||||
{
|
||||
var table = Funs.DB.PHTGL_ContractTrack.FirstOrDefault(x => x.Id == newtable.Id);
|
||||
@@ -1341,110 +1339,5 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
public class PHTGL_ContractTrackDtoIn
|
||||
{
|
||||
/// <summary>
|
||||
/// 序号
|
||||
/// </summary>
|
||||
[ExcelColumnIndex("A")] public string SerialNumber { get; set; }
|
||||
/// <summary>
|
||||
/// 主项号
|
||||
/// </summary>
|
||||
[ExcelColumnIndex("B")] public string MainItemCode { get; set; }
|
||||
/// <summary>
|
||||
/// 主项名称
|
||||
/// </summary>
|
||||
[ExcelColumnIndex("C")] public string MainItemName { get; set; }
|
||||
/// <summary>
|
||||
/// 专业代码
|
||||
/// </summary>
|
||||
[ExcelColumnIndex("D")] public string MajorCode { get; set; }
|
||||
/// <summary>
|
||||
/// 专业工程名称
|
||||
/// </summary>
|
||||
[ExcelColumnIndex("E")] public string MajorName { get; set; }
|
||||
/// <summary>
|
||||
/// 分部工程
|
||||
/// </summary>
|
||||
[ExcelColumnIndex("F")] public string SubProject { get; set; }
|
||||
/// <summary>
|
||||
/// 分项工程
|
||||
/// </summary>
|
||||
[ExcelColumnIndex("G")] public string SubItemProject { get; set; }
|
||||
/// <summary>
|
||||
/// 项目编码
|
||||
/// </summary>
|
||||
[ExcelColumnIndex("H")] public string ProjectCode { get; set; }
|
||||
/// <summary>
|
||||
/// 项目名称
|
||||
/// </summary>
|
||||
[ExcelColumnIndex("I")] public string ProjectName { get; set; }
|
||||
/// <summary>
|
||||
/// 项目特征描述
|
||||
/// </summary>
|
||||
[ExcelColumnIndex("J")] public string ProjectDescription { get; set; }
|
||||
/// <summary>
|
||||
/// 计量单位
|
||||
/// </summary>
|
||||
[ExcelColumnIndex("K")] public string UnitOfMeasurement { get; set; }
|
||||
/// <summary>
|
||||
/// 工程量
|
||||
/// </summary>
|
||||
[ExcelColumnIndex("L")] public string Quantity { get; set; }
|
||||
/// <summary>
|
||||
/// 全费用固定综合单价
|
||||
/// </summary>
|
||||
[ExcelColumnIndex("M")] public decimal TotalCostFixedComprehensiveUnitPrice { get; set; }
|
||||
/// <summary>
|
||||
/// 其中:主材费
|
||||
/// </summary>
|
||||
[ExcelColumnIndex("N")] public decimal MainMaterialCost { get; set; }
|
||||
/// <summary>
|
||||
/// 合价/元
|
||||
/// </summary>
|
||||
[ExcelColumnIndex("O")] public decimal TotalPrice { get; set; }
|
||||
/// <summary>
|
||||
/// 计算规则
|
||||
/// </summary>
|
||||
[ExcelColumnIndex("P")] public string CalculationRule { get; set; }
|
||||
/// <summary>
|
||||
/// 工作内容
|
||||
/// </summary>
|
||||
[ExcelColumnIndex("Q")] public string WorkContent { get; set; }
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
[ExcelColumnIndex("R")] public string Remarks { get; set; }
|
||||
/// <summary>
|
||||
/// 施工分包商
|
||||
/// </summary>
|
||||
[ExcelColumnIndex("S")] public string ConstructionSubcontractor { get; set; }
|
||||
/// <summary>
|
||||
/// 主材供应方
|
||||
/// </summary>
|
||||
[ExcelColumnIndex("T")] public string MaterialSupplier { get; set; }
|
||||
/// <summary>
|
||||
/// 是否总包合同范围内
|
||||
/// </summary>
|
||||
[ExcelColumnIndex("U")]
|
||||
public string IsWithinGeneralContractScope { get; set; }
|
||||
/// <summary>
|
||||
/// 概算工程量
|
||||
/// </summary>
|
||||
[ExcelColumnIndex("V")] public string EstimatedQuantity { get; set; }
|
||||
/// <summary>
|
||||
/// 概算金额
|
||||
/// </summary>
|
||||
[ExcelColumnIndex("W")] public decimal EstimatedAmount { get; set; }
|
||||
/// <summary>
|
||||
/// 预算工程量
|
||||
/// </summary>
|
||||
[ExcelColumnIndex("X")] public string SettledQuantity { get; set; }
|
||||
/// <summary>
|
||||
/// 预算金额
|
||||
/// </summary>
|
||||
[ExcelColumnIndex("Y")] public decimal SettledAmount { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user