From cf4b34c45f52ff8951d8eb1ff564c039593f4b31 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期五, 22 十一月 2024 08:45:35 +0800
Subject: [PATCH] 修改合办工单,专版工单格式,计划订单上传格式
---
CY_ECommercePlatform/CY.BLL/EC/EC_OrderBasicBLL.cs | 98 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 97 insertions(+), 1 deletions(-)
diff --git a/CY_ECommercePlatform/CY.BLL/EC/EC_OrderBasicBLL.cs b/CY_ECommercePlatform/CY.BLL/EC/EC_OrderBasicBLL.cs
index 8d97fd8..e397294 100644
--- a/CY_ECommercePlatform/CY.BLL/EC/EC_OrderBasicBLL.cs
+++ b/CY_ECommercePlatform/CY.BLL/EC/EC_OrderBasicBLL.cs
@@ -29,6 +29,9 @@
using CY.Model;
using CY.IDAL;
using CY.Infrastructure.Query;
+using CY.Model.Inquiry;
+using CY.Infrastructure.Common;
+using CY.IDAL.EC;
namespace CY.BLL.EC
{
@@ -38,10 +41,11 @@
public class EC_OrderBasicBLL
{
IEC_OrderBasicDAL _eC_OrderBasicDAL = null;
-
+ IEC_OrderPrintParameterDAL _eC_OrderPrintParameterDAL = null;
public EC_OrderBasicBLL()
{
_eC_OrderBasicDAL = AbstractFactory.Factory.GetDALByInterfaceName(AbstractFactory.DALInterface.IEC_OrderBasicDAL) as IEC_OrderBasicDAL;
+ _eC_OrderPrintParameterDAL = AbstractFactory.Factory.GetDALByInterfaceName(AbstractFactory.DALInterface.IEC_OrderPrintParameterDAL) as IEC_OrderPrintParameterDAL;
}
/// <summary>
@@ -64,6 +68,17 @@
public IEnumerable<EC_OrderBasic> SelectModelPage_Seller(Infrastructure.Query.Pagination pagination, Dictionary<int, object> searchParam)
{
return _eC_OrderBasicDAL.SelectModelPage_Seller(pagination, searchParam);
+ }
+
+
+ /// <summary>
+ /// 浣滀笟鏈�佽揣鍒嗛〉鏌ヨ
+ /// </summary>
+ /// <param name="pagination"></param>
+ /// <returns></returns>
+ public IEnumerable<EC_OrderBasic> SelectModelPageWorkBook(Infrastructure.Query.Pagination pagination, Guid _MemberID, string txtBeginDate, string txtEndDate, string txtOrderId, string txtSearchyjname, string selCustormerManager, string selBusinessManager, string selOrderStates)
+ {
+ return _eC_OrderBasicDAL.SelectModelPageWorkBook(pagination, _MemberID, txtBeginDate, txtEndDate, txtOrderId, txtSearchyjname, selCustormerManager, selBusinessManager, selOrderStates);
}
/// <summary>
@@ -119,6 +134,17 @@
public bool AcceptOrder(int orderId, double commission)
{
return _eC_OrderBasicDAL.AcceptOrder(orderId, commission);
+ }
+
+ /// <summary>
+ /// 閿佸畾璁㈠崟
+ /// </summary>
+ /// <param name="orderId">璁㈠崟缂栧彿</param>
+ /// <param name="operator">鎿嶄綔浜�</param>
+ /// <returns></returns>
+ public bool SuodingOrder(int orderId, string operater)
+ {
+ return _eC_OrderBasicDAL.SuodingOrder(orderId, operater);
}
/// <summary>
@@ -634,5 +660,75 @@
{
return _eC_OrderBasicDAL.GetEC_OrderBasicListBydeliverorderId(deliverorderId, FirmId);
}
+
+
+ /// <summary>
+ /// 閲嶆柊璁$畻璁㈠崟鐨勯噾棰�
+ /// </summary>
+ /// <param name="orderOperate"></param>
+ /// <returns></returns>
+ public bool UpdateorderJine(int orderId)
+ {
+ CoreCmsPlanOrderBLL _PlanOrderBLL = new CoreCmsPlanOrderBLL();
+ CoreCmsPlanOrderItemBLL _coreCmsPlanOrderItemBLL = new CoreCmsPlanOrderItemBLL();
+
+ var eC_OrderBasic = this.SelectModelById(orderId);
+ EC_OrderPrintParameterBLL _OrderPrintParameterBLL = new EC_OrderPrintParameterBLL();
+ var eC_OrderPrintParameter = _OrderPrintParameterBLL.GetModel(orderId);
+ InquiryCommonModel model = SerializationHelper.DeSerialize(typeof(InquiryCommonModel), eC_OrderPrintParameter.PrintParameter) as InquiryCommonModel;
+
+ //eC_OrderBasic.SumPrice =12 ;
+ //eC_OrderBasic.UnitPrice = 12;
+ var sss = model.InquiryWorkBookList;
+
+ var coreCmsPlanOrders = _PlanOrderBLL.GetModelByorderid(orderId).ToList();
+
+
+ decimal SumPrice = 0;
+ int num = 0;
+
+ var coreCmsPlanOrders2 = new List<CoreCmsPlanOrderItem>();
+
+ foreach (var coreCmsPlanOrder in coreCmsPlanOrders)
+ {
+ var coreCmsPlanOrders1 = _coreCmsPlanOrderItemBLL.GetModelsByOrderid(coreCmsPlanOrder.id).ToList();
+ coreCmsPlanOrders2.AddRange(coreCmsPlanOrders1);
+
+ num += coreCmsPlanOrders1.Sum(x=>x.nums);
+ SumPrice += coreCmsPlanOrders1.Sum(x => x.amount);
+
+ }
+
+ eC_OrderBasic.SumPrice = SumPrice;
+ if (num > 0)
+ {
+ eC_OrderBasic.UnitPrice = Math.Round(SumPrice / new decimal(num), 4);
+ }
+ else
+ {
+ eC_OrderBasic.UnitPrice = 0;
+ }
+
+
+
+ model.PrintCount = num;
+ foreach ( var inquiryWorkBookModel in model.InquiryWorkBookList)
+ {
+ var sssssss = coreCmsPlanOrders2.Where(x => x.name == inquiryWorkBookModel.WorkBookNameTxt && x.specification == inquiryWorkBookModel.WorkBookSizeTxt).ToList();
+ inquiryWorkBookModel.WorkBookCount = sssssss.Sum(x=>x.nums).ToString2();
+ inquiryWorkBookModel.WorkBookMoney = sssssss.Sum(x=>x.amount).ToString2();
+ }
+
+
+ var isWin = _eC_OrderBasicDAL.Updatejinedanjia(eC_OrderBasic.Keyid.Value, eC_OrderBasic.SumPrice.Value, eC_OrderBasic.UnitPrice.Value, num);
+
+ eC_OrderPrintParameter.PrintParameter = SerializationHelper.Serialize(model);
+ isWin = _eC_OrderPrintParameterDAL.UpdateModel(eC_OrderPrintParameter);
+
+
+
+ return isWin;
+ }
+
}
}
--
Gitblit v1.9.1