From 072169e3c5446f94e2cf4e570e5c7952bb5b15b9 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期二, 27 七月 2021 14:47:44 +0800
Subject: [PATCH] 今日开发     考勤规则里增加  公司安排加班                  调整请假时间计算                  加班日考勤计算

---
 zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs |   30 ++++++++++++++++++++++++++----
 1 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs b/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs
index f223d0c..562766a 100644
--- a/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs
@@ -30,9 +30,11 @@
         private readonly ICooperatecustomCustomerService _cooperatecustomCustomerService;
         private readonly IUserService _userService;
         private readonly ICooperVisitService _cooperVisitService;
+        private readonly ICusFangwenjiluService _cusFangwenjiluService; 
 
 
-        public CooperVisitController(ILogger<CooperVisitController> logger, IProjectService projectService, ILiaotianService liaotianService, ICooperatecustomCustomerService cooperatecustomCustomerService, IUserService userService, ICooperVisitService cooperVisitService)
+        public CooperVisitController(ILogger<CooperVisitController> logger, IProjectService projectService, ILiaotianService liaotianService, ICooperatecustomCustomerService cooperatecustomCustomerService, IUserService userService, ICooperVisitService cooperVisitService
+            , ICusFangwenjiluService cusFangwenjiluService)
         {
             _logger = logger;
             _projectService = projectService;
@@ -40,6 +42,7 @@
             _cooperatecustomCustomerService = cooperatecustomCustomerService;
             _userService = userService;
             _cooperVisitService = cooperVisitService;
+            _cusFangwenjiluService = cusFangwenjiluService;
         }
 
         public IActionResult Index()
@@ -194,7 +197,7 @@
             {
                 for (int i = 0; i < result.Count; i++)
                 {
-                    number.Append(result[i].Phone);
+                    number.Append(string.IsNullOrEmpty(result[i].Phone) ? result[i].Tel : result[i].Phone);
                     customename += result[i].Name + ",";
                     if (i != result.Count - 1)
                     {
@@ -213,8 +216,18 @@
             {
                 resultEntity.Result = false;
                 resultEntity.Message = "鐭俊鍙戦�佸け璐�";
-
+                return new JsonResult(resultEntity);
             }
+            CusFangwenjiluDTO dto = new CusFangwenjiluDTO();
+            dto.Fasongfangshi = "01";
+            dto.Fasongneirong = neirong;
+            dto.Jieshouren = baifangid;
+            dto.RecStatus = "A";
+            dto.Creater = curentuser.Id;
+            dto.Modifytime = DateTime.Now;
+            dto.Modifier = curentuser.Id;
+            dto.Createtime = dto.Modifytime;
+            resultEntity = _cusFangwenjiluService.save(dto);
             _logger.LogInformation(curentuser.UserName + "鍙戦�佺煭淇$粰瀹㈡埛" + customename);
             return new JsonResult(resultEntity);
         }
@@ -284,7 +297,16 @@
             {
                 return new JsonResult(resultEntity);
             }
-
+            CusFangwenjiluDTO dto = new CusFangwenjiluDTO();
+            dto.Fasongfangshi = "02";
+            dto.Fasongneirong = neirong;
+            dto.Jieshouren = baifangid;
+            dto.RecStatus = "A";
+            dto.Creater = curentuser.Id;
+            dto.Modifytime = DateTime.Now;
+            dto.Modifier = curentuser.Id;
+            dto.Createtime = dto.Modifytime;
+            resultEntity = _cusFangwenjiluService.save(dto);
             _logger.LogInformation(curentuser.UserName + "鍙戦�侀偖浠剁粰瀹㈡埛" + customename);
 
             return new JsonResult(resultEntity);

--
Gitblit v1.9.1