From 727a27340fc49d41bf9f7efd81a9a44ade7a9677 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期二, 28 六月 2022 13:15:52 +0800
Subject: [PATCH] 合同盖章
---
zhengcaioa/Services/CooperatecustomCustomerService.cs | 61 ++++++++++++++++++++++++++++--
1 files changed, 56 insertions(+), 5 deletions(-)
diff --git a/zhengcaioa/Services/CooperatecustomCustomerService.cs b/zhengcaioa/Services/CooperatecustomCustomerService.cs
index 0f51554..fe95ca7 100644
--- a/zhengcaioa/Services/CooperatecustomCustomerService.cs
+++ b/zhengcaioa/Services/CooperatecustomCustomerService.cs
@@ -98,7 +98,42 @@
updateproject.Shifoutianjiaweixin = cooperatecustomCustomer.Shifoutianjiaweixin;
updateproject.Weixintime = cooperatecustomCustomer.Weixintime;
updateproject.Weixiner = cooperatecustomCustomer.Weixiner;
+ updateproject.Shouxinedu = cooperatecustomCustomer.Shouxinedu;
+ updateproject.Taocanjianshu = cooperatecustomCustomer.Taocanjianshu;
}
+
+ _context.SaveChanges();
+ resultEntity.ReturnID = cooperatecustomCustomer.Id;
+ resultEntity.Result = true;
+ }
+ catch (Exception ex)
+ {
+ resultEntity.Result = false;
+ resultEntity.Message = "淇濆瓨澶辫触锛岃鑱旂郴绠$悊鍛�";
+
+ }
+ return resultEntity;
+ }
+
+
+ public ResultEntity saveyufukuan(CooperatecustomCustomerDTO cooperatecustomCustomerDTO)
+ {
+ ResultEntity resultEntity = new ResultEntity();
+ try
+ {
+
+
+ var cooperatecustomCustomer = _mapper.Map<CooperatecustomCustomer>(cooperatecustomCustomerDTO);
+
+
+
+ var updateproject = _context.CooperatecustomCustomers.Find(cooperatecustomCustomer.Id);
+
+
+ updateproject.Yufukuan = cooperatecustomCustomer.Yufukuan;
+ updateproject.Shenyushouxin = cooperatecustomCustomer.Shenyushouxin;
+ updateproject.Shouxinedu = cooperatecustomCustomer.Shouxinedu;
+
_context.SaveChanges();
resultEntity.ReturnID = cooperatecustomCustomer.Id;
@@ -168,7 +203,7 @@
DateTime.TryParse(Createtimes[1], out Createtimeend);
Createtimeend = Createtimeend.AddDays(1);
}
-
+
var query = (from a in _context.CooperatecustomCustomers
join b in listCode.Where(x => x.CodeTable == "CooperatecustomCustomer" && x.CodeField == "khly")
@@ -193,12 +228,12 @@
from abi in esss.DefaultIfEmpty()
- join i in _context.CooperOrders.Where(x => x.RecStatus == "A" && x.ChedanStatus !="A" ).GroupBy(q => new { q.Khdw }).Select(q => new
+ join i in _context.CooperOrders.Where(x => x.RecStatus == "A" && x.ChedanStatus != "A").GroupBy(q => new { q.Khdw }).Select(q => new
{
Khdw = q.Key.Khdw,
Moneycount = q.Sum(i => i.Money),
Ordercount = q.Count(),
- }
+ }
)
on a.Id equals i.Khdw
into isss
@@ -232,7 +267,7 @@
&& (string.IsNullOrWhiteSpace(searchEntity.Sheng) || a.Sheng == searchEntity.Sheng.Trim())
&& (string.IsNullOrWhiteSpace(searchEntity.City) || a.City == searchEntity.City.Trim())
&& (string.IsNullOrWhiteSpace(searchEntity.AreaId) || a.AreaId == searchEntity.AreaId.Trim())
- && (string.IsNullOrWhiteSpace(searchEntity.Shifouweixin) || a.Shifoutianjiaweixin == searchEntity.Shifouweixin.Trim())
+ && (string.IsNullOrWhiteSpace(searchEntity.Shifouweixin) || a.Shifoutianjiaweixin == searchEntity.Shifouweixin.Trim())
&& (string.IsNullOrWhiteSpace(searchEntity.HuiyuanId) || a.HuiyuanId == searchEntity.HuiyuanId.Trim())
select new CooperatecustomCustomerDTO
@@ -245,7 +280,7 @@
Hyfl = a.Hyfl,
Khlx = a.Khlx,
Ywjl = a.Ywjl,
- ShengName = fff.Name + "-" + ggg.Name+ "-" + hhh.Name,
+ ShengName = fff.Name + "-" + ggg.Name + "-" + hhh.Name,
CityName = ggg.Name,
AreaIdName = hhh.Name,
KhlyName = bbb.Comments,
@@ -259,6 +294,7 @@
Tel = a.Tel,
Ordercount = iii.Ordercount.ToString(),
Moneycount = iii.Moneycount.ToString(),
+ Moneycountde = iii.Moneycount,
Phone = a.Phone,
Qq = a.Qq,
Email = a.Email,
@@ -286,6 +322,13 @@
HuiyuanId = a.HuiyuanId,
Weixiner = a.Weixiner,
Weixintime = a.Weixintime,
+ Yufukuan = a.Yufukuan ?? 0,
+ Shouxinedu = a.Shouxinedu ?? 0,
+ Shenyushouxin = a.Shenyushouxin ?? 0,
+ YufukuanName = a.Yufukuan.HasValue ? a.Yufukuan.Value.ToString("f2") : "",
+ ShouxineduName = a.Shouxinedu.HasValue ? a.Shouxinedu.Value.ToString("f2") : "",
+ ShenyushouxinName = a.Shenyushouxin.HasValue ? a.Shenyushouxin.Value.ToString("f2") : "",
+ Taocanjianshu = a.Taocanjianshu ?? 0,
}
).OrderByDescending(x => x.Modifytime).ToList();
@@ -293,7 +336,15 @@
//if (searchEntity.totalrows == 0)
searchEntity.totalrows = query.Count();
+ data.Heji1 = Math.Round(query.Sum(x => x.Yufukuan) ?? 0, 2);
+ data.Heji2 = Math.Round(query.Sum(x => x.Shouxinedu) ?? 0, 2);
+ data.Heji3 = Math.Round(query.Sum(x => x.Shenyushouxin) ?? 0, 2);
+ data.Heji4 = Math.Round(query.Sum(x => x.Moneycountde) ?? 0, 2);
var lianlist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList();
+ data.DangyeHeji1 = Math.Round(lianlist.Sum(x => x.Yufukuan) ?? 0, 2);
+ data.DangyeHeji2 = Math.Round(lianlist.Sum(x => x.Shouxinedu) ?? 0, 2);
+ data.DangyeHeji3 = Math.Round(lianlist.Sum(x => x.Shenyushouxin) ?? 0, 2);
+ data.DangyeHeji4 = Math.Round(lianlist.Sum(x => x.Moneycountde) ?? 0, 2);
data.LoadData(searchEntity, lianlist);
return data;
}
--
Gitblit v1.9.1