From 760eede869d8bc0b1b5a4ff38b2d3d94f5e2cb86 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期三, 04 八月 2021 14:29:15 +0800
Subject: [PATCH] 今日开发          专家派工-没有审批的专家不能派工   意向客户访问新增,短信发送不要红星   合作客户  在客户资料列表增加快捷访问链接                        工作报表  修改排版                        问题维护    试用法条  改为1000字, 问题查询打开直接默认未审核,不要停两秒再刷新   项目新增 增加字段:采购预算 万元   工作考评  考聘不称职当天无工资

---
 zhengcaioa/Services/CooperVisitService.cs |   40 ++++++++++++++++++++++++++++------------
 1 files changed, 28 insertions(+), 12 deletions(-)

diff --git a/zhengcaioa/Services/CooperVisitService.cs b/zhengcaioa/Services/CooperVisitService.cs
index c093088..19f433a 100644
--- a/zhengcaioa/Services/CooperVisitService.cs
+++ b/zhengcaioa/Services/CooperVisitService.cs
@@ -130,20 +130,36 @@
 
             var query = (from a in _context.CooperVisits
                          join b in listCode.Where(x => x.CodeTable == "CooperVisit" && x.CodeField == "visType")
-                         on a.VisType equals b.CodeSn
+                           on a.VisType equals b.CodeSn
+                            into bzsssss
+                         from bzzzzz in bzsssss.DefaultIfEmpty()
+
                          join c in listCode.Where(x => x.CodeTable == "CooperVisit" && x.CodeField == "jtype")
                          on a.Jtype equals c.CodeSn
+                           into czsssss
+                         from czzzzz in czsssss.DefaultIfEmpty()
+
                          join d in listCode.Where(x => x.CodeTable == "CooperVisit" && x.CodeField == "zw")
                           on a.Zw equals d.CodeSn
+                            into dzsssss
+                         from dzzzzz in dzsssss.DefaultIfEmpty()
+
                          join e in listCode.Where(x => x.CodeTable == "CooperVisit" && x.CodeField == "yx")
                          on a.Yx equals e.CodeSn
+                           into ezsssss
+                         from ezzzzz in ezsssss.DefaultIfEmpty()
+
                          join f in listCode.Where(x => x.CodeTable == "CooperVisit" && x.CodeField == "jy")
                           on a.Jy equals f.CodeSn
-                         join zz in _context.CooperatecustomCustomers.Where(x => x.RecStatus == "A")
+                            into fzsssss
+                         from fzzzzz in fzsssss.DefaultIfEmpty()
+
+                         join zz in _context.CooperatecustomCustomers
                          on a.Viscustomer equals zz.Id
-                         join g in _context.Areas on zz.Sheng equals g.CodeId
-                         join h in _context.Areas on zz.City equals h.CodeId
-                         join i in _context.Areas on zz.AreaId equals i.CodeId
+                          
+                             //join g in _context.Areas on zz.Sheng equals g.CodeId
+                             //join h in _context.Areas on zz.City equals h.CodeId
+                             //join i in _context.Areas on zz.AreaId equals i.CodeId
 
 
 
@@ -158,7 +174,7 @@
                               && (string.IsNullOrWhiteSpace(searchEntity.Sheng) || zz.Sheng == searchEntity.Sheng.Trim())
                                && (string.IsNullOrWhiteSpace(searchEntity.City) || zz.City == searchEntity.City.Trim())
                                 && (string.IsNullOrWhiteSpace(searchEntity.AreaId) || zz.AreaId == searchEntity.AreaId.Trim())
-
+                                 && (string.IsNullOrWhiteSpace(searchEntity.Viscustomer) || a.Viscustomer == searchEntity.Viscustomer.Trim())
                          select new CooperVisitDTO
                          {
                              Id = a.Id,
@@ -168,12 +184,12 @@
                              Name = zz.Name,
                              Jtype = a.Jtype,
                              Jdr = a.Jdr,
-                             ShengName = g.Name + "-" + h.Name + "-" + i.Name,
-                             VisTypeName = b.Comments,
-                             JtypeName = c.Comments,
-                             ZwName = d.Comments,
-                             YxName = e.Comments,
-                             JyName = f.Comments,
+                             //ShengName = g.Name + "-" + h.Name + "-" + i.Name,
+                             VisTypeName = bzzzzz.Comments,
+                             JtypeName = czzzzz.Comments,
+                             ZwName = dzzzzz.Comments,
+                             YxName = ezzzzz.Comments,
+                             JyName = fzzzzz.Comments,
                              Zw = a.Zw,
                              Talk = a.Talk,
                              Khfk = a.Khfk,

--
Gitblit v1.9.1