From 72e4a4d81cb1b9776ffb7287e0c5ed67592eda8b Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期一, 11 十二月 2023 15:20:28 +0800 Subject: [PATCH] 试用期工资计算 --- zhengcaioa/zhengcaioa/Timer/TimedBackgroundService.cs | 42 +++++++++++++++++++++++++++++++++++------- 1 files changed, 35 insertions(+), 7 deletions(-) diff --git a/zhengcaioa/zhengcaioa/Timer/TimedBackgroundService.cs b/zhengcaioa/zhengcaioa/Timer/TimedBackgroundService.cs index 5a71989..80469f1 100644 --- a/zhengcaioa/zhengcaioa/Timer/TimedBackgroundService.cs +++ b/zhengcaioa/zhengcaioa/Timer/TimedBackgroundService.cs @@ -139,14 +139,13 @@ jisuangonglinggongzi(); } - - _logger.LogInformation("鎶婅秴杩�90澶╄繕娌℃湁杞寲鐨勬。妗堝鎴风殑涓氬姟缁忕悊褰掍负鏃�"); - this.ywjlguiling(); - _logger.LogInformation("鎶婅秴杩�90澶╄繕娌℃湁杞寲鐨勬。妗堝鎴风殑涓氬姟缁忕悊褰掍负鏃犳墽琛岀粨鏉�"); - _logger.LogInformation("鎶婁細鍛樼郴缁熷拰oa绯荤粺鎵嬫満鍙风浉鍚岀殑瀹㈡埛鍏宠仈璧锋潵"); this.huiyuanguanlian(); _logger.LogInformation("鎶婁細鍛樼郴缁熷拰oa绯荤粺鎵嬫満鍙风浉鍚岀殑瀹㈡埛鍏宠仈璧锋潵鎵ц缁撴潫"); + + _logger.LogInformation("鎶婅秴杩�90澶╄繕娌℃湁杞寲鐨勬。妗堝鎴风殑涓氬姟缁忕悊褰掍负鏃�"); + this.ywjlguiling(); + _logger.LogInformation("鎶婅秴杩�90澶╄繕娌℃湁杞寲鐨勬。妗堝鎴风殑涓氬姟缁忕悊褰掍负鏃犳墽琛岀粨鏉�"); } catch (Exception ex) { @@ -329,6 +328,18 @@ if (frameworkUser != null) { cooperatecustomCustomer.HuiyuanId = frameworkUser.Id.ToString(); + //2023-03-23 娣诲姞鍦ㄨ亴浼佷笟 + var customerGuanlianhuiyuan1 = _context.CustomerGuanlianhuiyuans.Where(x => x.Huiyuanid == cooperatecustomCustomer.HuiyuanId && x.Customerid == cooperatecustomCustomer.Id).FirstOrDefault(); + if (customerGuanlianhuiyuan1 == null) + { + CustomerGuanlianhuiyuan customerGuanlianhuiyuan = new CustomerGuanlianhuiyuan(); + customerGuanlianhuiyuan.Id = Guid.NewGuid().ToString(); + customerGuanlianhuiyuan.Huiyuanid = cooperatecustomCustomer.HuiyuanId; + customerGuanlianhuiyuan.Customerid = cooperatecustomCustomer.Id; + customerGuanlianhuiyuan.Customertype = "鍚堜綔瀹㈡埛"; + _context.CustomerGuanlianhuiyuans.Add(customerGuanlianhuiyuan); + } + } } @@ -349,6 +360,17 @@ if (frameworkUser != null) { intentionCustomer.HuiyuanId = frameworkUser.Id.ToString(); + //2023-03-23 娣诲姞鍦ㄨ亴浼佷笟 + var customerGuanlianhuiyuan1 = _context.CustomerGuanlianhuiyuans.Where(x => x.Huiyuanid == intentionCustomer.HuiyuanId && x.Customerid == intentionCustomer.Id).FirstOrDefault(); + if (customerGuanlianhuiyuan1 == null) + { + CustomerGuanlianhuiyuan customerGuanlianhuiyuan = new CustomerGuanlianhuiyuan(); + customerGuanlianhuiyuan.Id = Guid.NewGuid().ToString(); + customerGuanlianhuiyuan.Huiyuanid = intentionCustomer.HuiyuanId; + customerGuanlianhuiyuan.Customerid = intentionCustomer.Id; + customerGuanlianhuiyuan.Customertype = "妗f瀹㈡埛"; + _context.CustomerGuanlianhuiyuans.Add(customerGuanlianhuiyuan); + } } } @@ -1852,9 +1874,15 @@ } + if(shiyongqichuqinlv>0 || hrSalaryDTO.Gongzuobutie != new decimal(0)) + { + hrSalaryDTO.Gongzuobutie += Math.Round((BasicPrice * zhuanzhengchuqinlv ), 2); + } + else + { + hrSalaryDTO.Gongzuobutie += Math.Round((BasicPrice * zhuanzhengchuqinlv - hrSalaryDTO.Baomifei.Value - hrSalaryDTO.Jibengongzi.Value), 2); + } - - hrSalaryDTO.Gongzuobutie += Math.Round((BasicPrice * zhuanzhengchuqinlv - hrSalaryDTO.Baomifei.Value - hrSalaryDTO.Jibengongzi.Value) , 2); -- Gitblit v1.9.1