From 0de684b2cd131f9801ca96abdb9028f7e30cd31b Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期三, 22 十月 2025 08:46:10 +0800
Subject: [PATCH] 启用日期提交之后也要默认
---
CY_ECommercePlatform/CY.SQLDAL/OA/OA_ProcurementDAL.cs | 38 +++++++++++++++++++++++++++++++++-----
1 files changed, 33 insertions(+), 5 deletions(-)
diff --git a/CY_ECommercePlatform/CY.SQLDAL/OA/OA_ProcurementDAL.cs b/CY_ECommercePlatform/CY.SQLDAL/OA/OA_ProcurementDAL.cs
index e24d161..bc6c627 100644
--- a/CY_ECommercePlatform/CY.SQLDAL/OA/OA_ProcurementDAL.cs
+++ b/CY_ECommercePlatform/CY.SQLDAL/OA/OA_ProcurementDAL.cs
@@ -36,10 +36,21 @@
{
return false;
}
+ SqlParameter SuppliersId = null;
+ if (trueModel.SuppliersId.HasValue)
+ {
+ SuppliersId = new SqlParameter("@SuppliersId", trueModel.SuppliersId);
+ }
+ else
+ {
+ SuppliersId = new SqlParameter("@SuppliersId", DBNull.Value);
+ }
+
+
IList<SqlParameter> sqlParms = new List<SqlParameter>()
{
new SqlParameter("@FirmId",trueModel.FirmId),
- new SqlParameter("@SuppliersId",trueModel.SuppliersId),
+ SuppliersId,
new SqlParameter("@GoodsId",trueModel.GoodsId),
new SqlParameter("@ClearingStatusId",trueModel.ClearingStatusId),
new SqlParameter("@Price",trueModel.Price),
@@ -55,7 +66,11 @@
new SqlParameter("@PaperWeightId",trueModel.PaperWeightId),
new SqlParameter("@tanPrice",trueModel.TanPrice??0),
new SqlParameter("@ReceiveMoney",decimal.Parse("0")),
- new SqlParameter("@Commodityid",trueModel.Commodityid)
+ new SqlParameter("@Commodityid",trueModel.Commodityid),
+ new SqlParameter("@orderId",trueModel.orderId.HasValue?trueModel.orderId.Value:0),
+ new SqlParameter("@DocumentName",string.IsNullOrEmpty(trueModel.DocumentName)?"":trueModel.DocumentName),
+ new SqlParameter("@CaigourenId",trueModel.CaigourenId.HasValue?trueModel.CaigourenId.Value:0),
+ new SqlParameter("@Caigouren",string.IsNullOrEmpty(trueModel.Caigouren)?"":trueModel.Caigouren),
};
try
{
@@ -80,11 +95,21 @@
{
return false;
}
+
+ SqlParameter SuppliersId = null;
+ if (trueModel.SuppliersId.HasValue)
+ {
+ SuppliersId = new SqlParameter("@SuppliersId", trueModel.SuppliersId);
+ }
+ else
+ {
+ SuppliersId = new SqlParameter("@SuppliersId", DBNull.Value);
+ }
IList<SqlParameter> sqlParms = new List<SqlParameter>()
{
new SqlParameter("@Keyid",trueModel.Keyid),
new SqlParameter("@FirmId",trueModel.FirmId),
- new SqlParameter("@SuppliersId",trueModel.SuppliersId),
+ SuppliersId,
new SqlParameter("@GoodsId",trueModel.GoodsId),
new SqlParameter("@ClearingStatusId",trueModel.ClearingStatusId),
new SqlParameter("@Price",trueModel.Price),
@@ -100,7 +125,10 @@
new SqlParameter("@PaperWeightId",trueModel.PaperWeightId),
new SqlParameter("@tanPrice",trueModel.TanPrice??0),
new SqlParameter("@ReceiveMoney",trueModel.ReceiveMoney),
- new SqlParameter("@Commodityid",trueModel.Commodityid)
+ new SqlParameter("@Commodityid",trueModel.Commodityid),
+ new SqlParameter("@WarehouseName",string.IsNullOrEmpty(trueModel.WarehouseName)?"":trueModel.WarehouseName),
+ new SqlParameter("@CaigourenId",trueModel.CaigourenId.HasValue?trueModel.CaigourenId.Value:0),
+ new SqlParameter("@Caigouren",string.IsNullOrEmpty(trueModel.Caigouren)?"":trueModel.Caigouren),
};
try
{
@@ -186,7 +214,7 @@
}
if (!string.IsNullOrEmpty(Operator))
{
- Condition += string.Format(" and Operator='{0}'", Operator);
+ Condition += string.Format(" and Caigouren like '%{0}%'", Operator);
}
if (!string.IsNullOrEmpty(ClearingStatusId))
{
--
Gitblit v1.9.1