From 0a5ccddc62a2a858df09f9ec6791ed26cb03018c Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期一, 25 四月 2022 08:52:36 +0800
Subject: [PATCH] 不需要填写银行账号,会员提款申请
---
zhengcaioa/zhengcaioa/Controllers/ProjectController.cs | 181 +++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 173 insertions(+), 8 deletions(-)
diff --git a/zhengcaioa/zhengcaioa/Controllers/ProjectController.cs b/zhengcaioa/zhengcaioa/Controllers/ProjectController.cs
index a0f7ae5..800b4cb 100644
--- a/zhengcaioa/zhengcaioa/Controllers/ProjectController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/ProjectController.cs
@@ -24,15 +24,20 @@
private readonly ILiaotianService _liaotianService;
private readonly IIntentionCustomerService _intentionCustomerService;
private readonly IUserService _userService;
+ private readonly ICooperatecustomCustomerService _cooperatecustomCustomerService;
+ private readonly ISysBaimingdanService _sysBaimingdanService;
-
- public ProjectController(ILogger<ProjectController> logger, IProjectService projectService, ILiaotianService liaotianService,IIntentionCustomerService intentionCustomerService, IUserService userService)
+ public ProjectController(ILogger<ProjectController> logger, IProjectService projectService, ILiaotianService liaotianService,IIntentionCustomerService intentionCustomerService, IUserService userService
+ , ICooperatecustomCustomerService cooperatecustomCustomerService
+ , ISysBaimingdanService sysBaimingdanService)
{
_logger = logger;
_projectService = projectService;
_liaotianService = liaotianService;
_intentionCustomerService = intentionCustomerService;
_userService = userService;
+ _cooperatecustomCustomerService = cooperatecustomCustomerService;
+ _sysBaimingdanService = sysBaimingdanService;
}
[CheckLogin]
public IActionResult Index()
@@ -68,6 +73,7 @@
{
projectDTO = _projectService.GetLiaotianEntity(id);
var intentionCustomerDTOs = _intentionCustomerService.GetList();
+ var cooperatecustomCustomerDTOs = _cooperatecustomCustomerService.GetList();
if (projectDTO.Projectzhongbiaos!=null && projectDTO.Projectzhongbiaos.Count > 0)
{
@@ -75,6 +81,11 @@
{
var intt = intentionCustomerDTOs.Count(x=>x.Name == projectDTO.Projectzhongbiaos[i].Names);
+ if (intt > 0)
+ {
+ projectDTO.Projectzhongbiaos[i].ProjectId = "yes";
+ }
+ intt = cooperatecustomCustomerDTOs.Count(x => x.Name == projectDTO.Projectzhongbiaos[i].Names);
if (intt > 0)
{
projectDTO.Projectzhongbiaos[i].ProjectId = "yes";
@@ -89,12 +100,22 @@
{
projectDTO.Drcunzai = "yes";
}
+ intt = cooperatecustomCustomerDTOs.Count(x => x.Name == projectDTO.Drhx);
+ if (intt > 0)
+ {
+ projectDTO.Drcunzai = "yes";
+ }
}
if (!string.IsNullOrWhiteSpace(projectDTO.Dshx))
{
var intt = intentionCustomerDTOs.Count(x => x.Name == projectDTO.Dshx);
+ if (intt > 0)
+ {
+ projectDTO.Dscunzai = "yes";
+ }
+ intt = cooperatecustomCustomerDTOs.Count(x => x.Name == projectDTO.Dshx);
if (intt > 0)
{
projectDTO.Dscunzai = "yes";
@@ -106,6 +127,11 @@
{
var intt = intentionCustomerDTOs.Count(x => x.Name == projectDTO.projectreasons[i].Reasonname);
+ if (intt > 0)
+ {
+ projectDTO.projectreasons[i].ProjectId = "yes";
+ }
+ intt = cooperatecustomCustomerDTOs.Count(x => x.Name == projectDTO.projectreasons[i].Reasonname);
if (intt > 0)
{
projectDTO.projectreasons[i].ProjectId = "yes";
@@ -123,6 +149,41 @@
{
projectDTO.Projectyouxiaos[i].ProjectId = "yes";
}
+ intt = cooperatecustomCustomerDTOs.Count(x => x.Name == projectDTO.Projectyouxiaos[i].Namesyouxiao);
+ if (intt > 0)
+ {
+ projectDTO.Projectyouxiaos[i].ProjectId = "yes";
+ }
+ }
+ }
+
+ if (!string.IsNullOrWhiteSpace(projectDTO.Caigourenname))
+ {
+ var intt = intentionCustomerDTOs.Count(x => x.Name == projectDTO.Caigourenname);
+
+ if (intt > 0)
+ {
+ projectDTO.Caigourennamecunzai = "yes";
+ }
+ intt = cooperatecustomCustomerDTOs.Count(x => x.Name == projectDTO.Caigourenname);
+ if (intt > 0)
+ {
+ projectDTO.Caigourennamecunzai = "yes";
+ }
+ }
+
+ if (!string.IsNullOrWhiteSpace(projectDTO.Dailiname))
+ {
+ var intt = intentionCustomerDTOs.Count(x => x.Name == projectDTO.Dailiname);
+
+ if (intt > 0)
+ {
+ projectDTO.Dailinamecunzai = "yes";
+ }
+ intt = cooperatecustomCustomerDTOs.Count(x => x.Name == projectDTO.Dailiname);
+ if (intt > 0)
+ {
+ projectDTO.Dailinamecunzai = "yes";
}
}
@@ -140,14 +201,28 @@
Projectyouxiaolist.Add(new Projectyouxiao());
projectDTO.Projectyouxiaos = Projectyouxiaolist;
- var Projectzhongbiaoslist = new List<Projectzhongbiao>();
- Projectzhongbiaoslist.Add(new Projectzhongbiao());
+ var Projectzhongbiaoslist = new List<ProjectzhongbiaoDTO>();
+ Projectzhongbiaoslist.Add(new ProjectzhongbiaoDTO());
projectDTO.Projectzhongbiaos = Projectzhongbiaoslist;
projectDTO.StartTime = DateTime.Now;
}
var zhuanjia = _projectService.Getzhuanjie();
var cgfs = _projectService.GetCgfs();
- var sheng = _projectService.Getsheng();
+ var areaDTOs = _projectService.Getsheng().ToList();
+ foreach (var areaDTO in areaDTOs)
+ {
+ if (areaDTO.CodeId == "510000")
+ {
+ areaDTOs.Remove(areaDTO);
+ break;
+ }
+ }
+ var areaDTOsic = new Area();
+ areaDTOsic.CodeId = "510000";
+ areaDTOsic.Name = "鍥涘窛鐪�";
+ areaDTOsic.ParentId = "0 ";
+ areaDTOs.Insert(1, areaDTOsic);
+ var sheng = areaDTOs;
var shi = _projectService.Getshi(projectDTO.Sheng);
var quxian = _projectService.Getquxian(projectDTO.City);
@@ -239,7 +314,21 @@
ViewData["ActionInfo"] = actionlist;
ViewBag.ProjectDropDown = _projectService.AllcgfsDropDown().Select(x => new { code = x.Value, label = x.Text }).ToList();
//ViewBag.flbx = _liaotianService.GetSYScode("Project", "flbx").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
- ViewBag.ShengDropDown = _projectService.Getsheng().Select(x => new { code = x.CodeId, label = x.Name }).ToList();
+ var areaDTOs = _projectService.Getsheng().ToList();
+ foreach (var areaDTO in areaDTOs)
+ {
+ if (areaDTO.CodeId == "510000")
+ {
+ areaDTOs.Remove(areaDTO);
+ break;
+ }
+ }
+ var areaDTOsic = new Area();
+ areaDTOsic.CodeId = "510000";
+ areaDTOsic.Name = "鍥涘窛鐪�";
+ areaDTOsic.ParentId = "0 ";
+ areaDTOs.Insert(1, areaDTOsic);
+ ViewBag.ShengDropDown = areaDTOs.Select(x => new { code = x.CodeId, label = x.Name }).ToList();
ViewBag.Creater = _userService.GetList().Select(x => new { code = x.Id, label = x.UserName }).ToList();
ViewBag.flbx = _liaotianService.GetSYScode("system", "shifou").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
@@ -329,7 +418,7 @@
}
else if (select != null && select.TextContent.IndexOf("涓爣锛堟垚浜わ級淇℃伅") >= 0)
{
- projectDTO.Projectzhongbiaos = new List<Projectzhongbiao>();
+ projectDTO.Projectzhongbiaos = new List<ProjectzhongbiaoDTO>();
if (table[i + 1] != null)
{
@@ -342,7 +431,7 @@
var surpliernames = surpliername.Split(',');
for(int j = 0;j< surpliernames.Length; j++)
{
- var projectzhongbiao = new Projectzhongbiao();
+ var projectzhongbiao = new ProjectzhongbiaoDTO();
projectzhongbiao.Names = surpliernames[j].Trim();
//if (table[i + 2] != null)
//{
@@ -578,5 +667,81 @@
}
}
+
+
+ //鑾峰彇瀵规墜鍒嗘瀽
+ public IActionResult GetProjectFenxi([FromBody] ProjectDTOSearch search)
+ {
+ ReturnMsg<List<ProjectDTO>> returnMsg = new ReturnMsg<List<ProjectDTO>>();
+ returnMsg.code = 2;
+
+ var sysBaimingdanDTOs = _sysBaimingdanService.GetList();
+ if (!string.IsNullOrEmpty(search.Zhuanjia))
+ {
+ var sss = sysBaimingdanDTOs.Where(x => x.PostType == "01" && search.Zhuanjia.Contains(x.BaimingdanName)).Count();
+ if (sss > 0)
+ {
+ returnMsg.code = 2;
+ returnMsg.error = "璇ヤ笓瀹惰鐩存帴鑱旂郴鏀块噰鍜ㄨ";
+ returnMsg.count = 0;
+ return new JsonResult(returnMsg);
+ }
+ }
+ if (!string.IsNullOrEmpty(search.Names))
+ {
+ var sss = sysBaimingdanDTOs.Where(x => x.PostType == "02" && search.Names.Contains(x.BaimingdanName)).Count();
+ if (sss > 0)
+ {
+ returnMsg.code = 11;
+ returnMsg.error = "璇ヤ緵搴斿晢璇风洿鎺ヨ仈绯绘斂閲囧挩璇�";
+ returnMsg.count = 0;
+ return new JsonResult(returnMsg);
+ }
+ }
+ if (!string.IsNullOrEmpty(search.NamesToubiao))
+ {
+ var sss = sysBaimingdanDTOs.Where(x => x.PostType == "02" && search.NamesToubiao.Contains(x.BaimingdanName)).Count();
+ if (sss > 0)
+ {
+ returnMsg.code = 11;
+ returnMsg.error = "璇ヤ緵搴斿晢璇风洿鎺ヨ仈绯绘斂閲囧挩璇�";
+ returnMsg.count = 0;
+ return new JsonResult(returnMsg);
+ }
+ }
+ if (!string.IsNullOrEmpty(search.Reasonname))
+ {
+ var sss = sysBaimingdanDTOs.Where(x => x.PostType == "02" && search.Reasonname.Contains(x.BaimingdanName)).Count();
+ if (sss > 0)
+ {
+ returnMsg.code = 11;
+ returnMsg.error = "璇ヤ緵搴斿晢璇风洿鎺ヨ仈绯绘斂閲囧挩璇�";
+ returnMsg.count = 0;
+ return new JsonResult(returnMsg);
+ }
+ }
+
+
+ try
+ {
+
+ //search.page = 1;
+ //search.rows = 1;
+ ResultDataEntity<ProjectDTO> resultDataEntity = _projectService.SearchByPaging(search);
+
+ returnMsg.code = 1;
+ returnMsg.count = search.totalrows;
+ returnMsg.returnObj = resultDataEntity.DataList;
+
+ }
+ catch (Exception ex)
+ {
+ returnMsg.code = 2;
+ returnMsg.error = "娌℃湁鑾峰彇鍒皌oken";
+ returnMsg.count = 0;
+
+ }
+ return new JsonResult(returnMsg);
+ }
}
}
--
Gitblit v1.9.1