username@email.com
2022-11-21 10ada97c04a399429285003bfcf97bbf8b24e940
项目查询

采购代理人修改为采购人
供应商信息 全部,未完善。已完善

必须项目的所有供应商都完善了,查出来才是已完善
6个文件已修改
101 ■■■■■ 已修改文件
zhengcaioa/DTO/ProjectDTO.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/ProjectService.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/ProjectController.cs 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/Project/Add.cshtml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/Project/Select.cshtml 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/Shared/_Layout_Search.cshtml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/ProjectDTO.cs
@@ -190,5 +190,7 @@
        public string Chuanbiaofenxi { get; set; }
        public string Shifouqueren { get; set; }
        public string Wanshan { get; set; }
    }
}
zhengcaioa/Services/ProjectService.cs
@@ -612,7 +612,41 @@
            //}
            if (!string.IsNullOrEmpty(searchEntity.Wanshan))
            {
                if (searchEntity.Wanshan == "A")
                {
                    sql.Append(" and ( a.[drhx] is null or exists  ( select b.[Id] from    [CooperatecustomCustomer] b where b.rec_status='A' and a.[drhx] = b.[name] union  select c.[Id] from    [IntentionCustomer] c where c.rec_status='A' and a.[drhx] = c.[name] ) ) ");
                    sql.Append(" and ( a.[drhx] is null or  exists  ( select b.[Id] from    [CooperatecustomCustomer] b where b.rec_status='A' and a.[dshx] = b.[name] union  select c.[Id] from    [IntentionCustomer] c where c.rec_status='A' and a.[dshx] = c.[name] )  ) ");
                    sql.Append(" and  ( a.[drhx] is null or  exists  ( select b.[Id] from    [CooperatecustomCustomer] b where b.rec_status='A' and a.[caigourenname] = b.[name] union  select c.[Id] from    [IntentionCustomer] c where c.rec_status='A' and a.[caigourenname] = c.[name] ) )  ");
                    sql.Append(" and ( a.[drhx] is null or  exists  ( select b.[Id] from    [CooperatecustomCustomer] b where b.rec_status='A' and a.[dailiname] = b.[name] union  select c.[Id] from    [IntentionCustomer] c where c.rec_status='A' and a.[dailiname] = c.[name] ) )  ");
                    sql.Append(" and (  a.[drhx] is null or  exists  ( select b.[Id] from    [CooperatecustomCustomer] b where b.rec_status='A' and a.[drhx] = b.[name] union  select c.[Id] from    [IntentionCustomer] c where c.rec_status='A' and a.[drhx] = c.[name] ) )  ");
                    sql.Append(" and  (  (select count(b.zhongbiaoId)  from [Projectzhongbiao] b  where  a.[Id]=b.[ProjectId] )  = 0  or    ( (select count(b.zhongbiaoId)  from [Projectzhongbiao] b  where  a.[Id]=b.[ProjectId] ) = ( select count(b.zhongbiaoId) from [Projectzhongbiao] b  where  a.[Id]=b.[ProjectId]    and exists  ( select d.[Id] from    [CooperatecustomCustomer] d where d.rec_status='A' and b.[names] = d.[name] union  select c.[Id] from     [IntentionCustomer] c where c.rec_status='A' and b.[names] = c.[name] )   )))     ");
                    sql.Append(" and  (  (select count(b.youxiaoId)  from [Projectyouxiao] b  where  a.[Id]=b.[ProjectId] )  = 0  or    ( (select count(b.youxiaoId)  from [Projectyouxiao] b  where  a.[Id]=b.[ProjectId] ) = ( select count(b.youxiaoId) from [Projectyouxiao] b  where  a.[Id]=b.[ProjectId]    and exists  ( select d.[Id] from    [CooperatecustomCustomer] d where d.rec_status='A' and b.[namesyouxiao] = d.[name] union  select c.[Id] from     [IntentionCustomer] c where c.rec_status='A' and b.[namesyouxiao] = c.[name] )   )))     ");
                    sql.Append(" and  (  (select count(b.reasonId)  from [Projectreason] b  where  a.[Id]=b.[ProjectId] )  = 0   or    ( (select count(b.reasonId)  from [Projectreason] b  where  a.[Id]=b.[ProjectId] ) = ( select count(b.reasonId) from [Projectreason] b  where  a.[Id]=b.[ProjectId]    and exists  ( select d.[Id] from    [CooperatecustomCustomer] d where d.rec_status='A' and b.[reasonname] = d.[name] union  select c.[Id] from     [IntentionCustomer] c where c.rec_status='A' and b.[reasonname] = c.[name] )   )))     ");
                }
                else
                {
                    sql.Append(" and not  ( ( a.[drhx] is null or exists  ( select b.[Id] from    [CooperatecustomCustomer] b where b.rec_status='A' and a.[drhx] = b.[name] union  select c.[Id] from    [IntentionCustomer] c where c.rec_status='A' and a.[drhx] = c.[name] ) ) ");
                    sql.Append(" and ( a.[drhx] is null or  exists  ( select b.[Id] from    [CooperatecustomCustomer] b where b.rec_status='A' and a.[dshx] = b.[name] union  select c.[Id] from    [IntentionCustomer] c where c.rec_status='A' and a.[dshx] = c.[name] )  ) ");
                    sql.Append(" and  ( a.[drhx] is null or  exists  ( select b.[Id] from    [CooperatecustomCustomer] b where b.rec_status='A' and a.[caigourenname] = b.[name] union  select c.[Id] from    [IntentionCustomer] c where c.rec_status='A' and a.[caigourenname] = c.[name] ) )  ");
                    sql.Append(" and ( a.[drhx] is null or  exists  ( select b.[Id] from    [CooperatecustomCustomer] b where b.rec_status='A' and a.[dailiname] = b.[name] union  select c.[Id] from    [IntentionCustomer] c where c.rec_status='A' and a.[dailiname] = c.[name] ) )  ");
                    sql.Append(" and (  a.[drhx] is null or  exists  ( select b.[Id] from    [CooperatecustomCustomer] b where b.rec_status='A' and a.[drhx] = b.[name] union  select c.[Id] from    [IntentionCustomer] c where c.rec_status='A' and a.[drhx] = c.[name] ) )  ");
                    sql.Append(" and  (  (select count(b.zhongbiaoId)  from [Projectzhongbiao] b  where  a.[Id]=b.[ProjectId] )  = 0  or    ( (select count(b.zhongbiaoId)  from [Projectzhongbiao] b  where  a.[Id]=b.[ProjectId] ) = ( select count(b.zhongbiaoId) from [Projectzhongbiao] b  where  a.[Id]=b.[ProjectId]    and exists  ( select d.[Id] from    [CooperatecustomCustomer] d where d.rec_status='A' and b.[names] = d.[name] union  select c.[Id] from     [IntentionCustomer] c where c.rec_status='A' and b.[names] = c.[name] )   )))     ");
                    sql.Append(" and  (  (select count(b.youxiaoId)  from [Projectyouxiao] b  where  a.[Id]=b.[ProjectId] )  = 0  or    ( (select count(b.youxiaoId)  from [Projectyouxiao] b  where  a.[Id]=b.[ProjectId] ) = ( select count(b.youxiaoId) from [Projectyouxiao] b  where  a.[Id]=b.[ProjectId]    and exists  ( select d.[Id] from    [CooperatecustomCustomer] d where d.rec_status='A' and b.[namesyouxiao] = d.[name] union  select c.[Id] from     [IntentionCustomer] c where c.rec_status='A' and b.[namesyouxiao] = c.[name] )   )))     ");
                    sql.Append(" and  (  (select count(b.reasonId)  from [Projectreason] b  where  a.[Id]=b.[ProjectId] )  = 0   or    ( (select count(b.reasonId)  from [Projectreason] b  where  a.[Id]=b.[ProjectId] ) = ( select count(b.reasonId) from [Projectreason] b  where  a.[Id]=b.[ProjectId]    and exists  ( select d.[Id] from    [CooperatecustomCustomer] d where d.rec_status='A' and b.[reasonname] = d.[name] union  select c.[Id] from     [IntentionCustomer] c where c.rec_status='A' and b.[reasonname] = c.[name] )   ))) )    ");
                }
            }
@@ -625,6 +659,9 @@
            
            
            //if (searchEntity.totalrows == 0)
                searchEntity.totalrows = query.Count();
            var lianlist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList();
zhengcaioa/zhengcaioa/Controllers/ProjectController.cs
@@ -389,6 +389,9 @@
            ViewBag.Baomingtimebegin = DateTime.Now.AddMonths(-6).ToString("yyyy-MM-dd");
            ViewBag.Baomingtimeend = DateTime.Now.ToString("yyyy-MM-dd");
            ViewBag.wanshan = _liaotianService.GetSYScode("Project", "wanshan").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
            return View();
        }
@@ -452,6 +455,15 @@
                            }
                        }
                        var feibiaoliyous = cDocumet.QuerySelectorAll("div").Where(m => m.Id == "_notice_content_reason-reason");
                        if (feibiaoliyous != null && feibiaoliyous.ToList().Count > 0)
                        {
                            var feibiaoliyou = feibiaoliyous.First();
                            projectDTO.Fbyy = feibiaoliyou.TextContent.Replace("\n", "").Replace("\t", "");
                            projectDTO.Fblx = "终止采购";
                        }
                        var Numbers = cDocumet.QuerySelectorAll("h4");
                        foreach(var Number in Numbers )
                        {
@@ -479,6 +491,7 @@
                            {
                                var Fbyy = Number.QuerySelector("span");
                                projectDTO.Fbyy = Fbyy.TextContent.Trim();
                                projectDTO.Fblx = "停止评审";
                            }
                        }
                        var Caigourennames = cDocumet.QuerySelectorAll("span").Where(m => m.Id == "_notice_content_noticePurchase-purchaserOrgName");
@@ -567,6 +580,14 @@
                        }
                        projectDTO.StartTimestr = timestr;
                    }
                    var tittle = document.QuerySelector("h1");
                    if (tittle != null)
                    {
                        string tittlestr = tittle.TextContent;
                        projectDTO.Name = tittlestr;
                    }
                    var table = document.QuerySelector("table").QuerySelectorAll("tr");
                    if (table != null)
                    {
@@ -587,14 +608,34 @@
                                }
                            }
                            else if (select != null && select.TextContent.IndexOf("项目名称") >= 0)
                            //else if (select != null && select.TextContent.IndexOf("项目名称") >= 0)
                            //{
                            //    if (table[i + 1] != null)
                            //    {
                            //        var td1 = table[i + 1].QuerySelector("td");
                            //        if (td1 != null)
                            //        {
                            //            projectDTO.Name = table[i + 1].QuerySelector("td").TextContent.Trim();//OuterHtml
                            //        }
                            //    }
                            //}
                            else if (select != null && select.TextContent.IndexOf("项目终止的原因") >= 0)
                            {
                                if (table[i + 1] != null)
                                {
                                    var td1 = table[i + 1].QuerySelector("td");
                                    if (td1 != null)
                                    {
                                        projectDTO.Name = table[i + 1].QuerySelector("td").TextContent.Trim();//OuterHtml
                                        projectDTO.Fbyy = table[i + 1].QuerySelector("td").TextContent.Trim();//OuterHtml
                                        if (projectDTO.Fbyy.IndexOf("终止")<0)
                                        {
                                            projectDTO.Fblx = "停止评审";
                                        }
                                        else
                                        {
                                            projectDTO.Fblx = "终止采购";
                                        }
                                    }
                                }
zhengcaioa/zhengcaioa/Views/Project/Add.cshtml
@@ -942,6 +942,9 @@
                    Caigouyusuan.val(data.CaigouyusuanName);
                    var Fbyy = $("#Fbyy");
                    Fbyy.val(data.Fbyy);
                    var Fblx = $("#Fblx");
                    Fblx.val(data.Fblx);
                    var Name = $("#Name");
                    Name.val(data.Name);
                    var Zhuanjia = $("#Zhuanjia");
zhengcaioa/zhengcaioa/Views/Project/Select.cshtml
@@ -16,7 +16,7 @@
        var ShiFouyReasonname = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.ShiFouyReasonname))';
          var Baomingtimebegin = '@Html.Raw(ViewBag.Baomingtimebegin)';
        var Baomingtimeend = '@Html.Raw(ViewBag.Baomingtimeend)';
        var wanshan  = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.wanshan))';
        loseherght = 110;
        dataCol = [
            { label: 'id', name: 'Id', labtype: 'txt', hidden: true },
@@ -129,7 +129,7 @@
            { label: '项目名称', name: 'Name', labtype: 'txt', hidden: false },
            { label: '评审专家', name: 'Zhuanjia', labtype: 'txt', hidden: false/*, cwidth: '8.5%', cccwidth: '15%' */ },
            { label: '采购代理人', name: 'Caigourenname', labtype: 'txt', hidden: false },
            { label: '采购人', name: 'Caigourenname', labtype: 'txt', hidden: false },
            { label: '采购代理机构', name: 'Dailiname', labtype: 'txt', hidden: false },
            { label: '采购方式', name: 'Cgfs', labtype: 'combox', hidden: false, data: JSON.parse(projectDropDown) },
@@ -147,6 +147,8 @@
            { label: '供应商数量', name: 'Shuliang', labtype: 'txt', hidden: false/*, cwidth: '8.5%', cccwidth: '15%' */ },
            //{ label: '价差小于', name: 'Baojiachaxiaoyu', labtype: 'txt', hidden: false/*, cwidth: '8.5%', cccwidth: '15%' */ },
            { label: '是否确认', name: 'Shifouqueren',  labtype: 'combox', hidden: false, data: JSON.parse(flbx) },
            { label: '供应商信息', name: 'Wanshan', labtype: 'combox', hidden: false, data: JSON.parse(wanshan) },
        ];
@@ -293,7 +295,7 @@
            $("#PBSReasonname").parent().after("<br>");
            $("#PBSCreater").parent().next().remove();
            $("#PBSFenchadayu").parent().after("<br>");
            $("#PBSShifouqueren").parent().next().remove();
            $("#PBSStartTimestarend").val(Baomingtimeend);
zhengcaioa/zhengcaioa/Views/Shared/_Layout_Search.cshtml
@@ -30,7 +30,7 @@
        if (MaxCol>0) {
        } else {
            MaxCol = 20;
            MaxCol = 30;
        }
    </script>
@@ -100,12 +100,12 @@
                        <a class="btn btn-default btn-outline  @(item.OpenType==1? "J_menuItem": "")" @(item.OpenType == 2 ? "target=_blank" : "") @(item.OpenType != 0 ? "href=" + item.ActionUrl + "" : "") @(item.OpenType == 0 ? "onclick=_page" + item.ActionFun + "()" : "")>
                            <!--<i class="glyphicon glyphicon-search"></i>--><i class="@item.PageIco"></i>&nbsp;&nbsp;<span class="bold">@item.ActionName</span>
                        </a>
                        if (item.ActionFun == "Search")
                        @*if (item.ActionFun == "Search")
                        {
                            <a id="searchmorendatabtn" class="btn btn-default btn-outline  @(item.OpenType == 1 ? "J_menuItem" : "")" @(item.OpenType == 2 ? "target=_blank" : "") @(item.OpenType != 0 ? "href=" + item.ActionUrl + "" : "") @(item.OpenType == 0 ? "onclick=_pageSearchMoren()" : "")>
                                <i class="fa fa-search-plus"></i>&nbsp;&nbsp;<span class="bold">高级</span>
                            </a>
                        }
                        }*@
                    }
                    
                </div>