From ed3015095f1b0e88bc579877c678a3fac191381f Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期一, 28 六月 2021 14:32:26 +0800
Subject: [PATCH] Merge branch 'master' of http://47.108.235.38:8080/r/zhengcaioa
---
zhengcaioa/Services/SimService.cs | 14 ++++++
zhengcaioa/Services/HrSalaryService.cs | 4 +-
zhengcaioa/zhengcaioa/Views/SalaryCheck/Edit.cshtml | 2
zhengcaioa/IServices/IHrSalaryService.cs | 2
zhengcaioa/zhengcaioa/Controllers/admin/SimCostController.cs | 4 +
申诉记录表.sql | 22 ++++++++++
zhengcaioa/DTO/HrSalaryDTO.cs | 52 +++++++++++++++++++++++---
zhengcaioa/zhengcaioa/Controllers/HR/SalaryCheckController.cs | 2
8 files changed, 88 insertions(+), 14 deletions(-)
diff --git a/zhengcaioa/DTO/HrSalaryDTO.cs b/zhengcaioa/DTO/HrSalaryDTO.cs
index 7677933..7438883 100644
--- a/zhengcaioa/DTO/HrSalaryDTO.cs
+++ b/zhengcaioa/DTO/HrSalaryDTO.cs
@@ -4,6 +4,7 @@
namespace DTO
{
+
public class HrSalaryDTO
{
public string Id { get; set; }
@@ -33,8 +34,8 @@
{
get
{
- return ( (Jibengongzi??0) + (Baomifei??0) + (Gongzuobutie??0) + (Jiabangongzi??0) + (Shebao??0) +
- (Dianhuabutie??0) + (Quanqinjiang??0) + (Jiaotngbutie??0) + (Jixiaoticheng??0) + (Jiangjin??0) + (Bufagongzi??0));
+ return ((Jibengongzi ?? 0) + (Baomifei ?? 0) + (Gongzuobutie ?? 0) + (Jiabangongzi ?? 0) + (Shebao ?? 0) +
+ (Dianhuabutie ?? 0) + (Quanqinjiang ?? 0) + (Jiaotngbutie ?? 0) + (Jixiaoticheng ?? 0) + (Jiangjin ?? 0) + (Bufagongzi ?? 0));
}
}
@@ -44,12 +45,12 @@
public decimal? Queqin { get; set; }
public decimal? Fakuan { get; set; }
public decimal? Peichang { get; set; }
- public decimal? Jiucuo { get; set; }
+ public decimal? Jiucuo { get; set; }
public decimal sum_kgz
{
get
{
- return (Shebaokou??0) + (Geshui?? 0) + (Dianhuafei ?? 0) + (Queqin ?? 0) + (Fakuan ?? 0) + (Peichang ?? 0) + (Jiucuo ?? 0);
+ return (Shebaokou ?? 0) + (Geshui ?? 0) + (Dianhuafei ?? 0) + (Queqin ?? 0) + (Fakuan ?? 0) + (Peichang ?? 0) + (Jiucuo ?? 0);
}
}
@@ -83,10 +84,12 @@
public string Islock { get; set; }
- public string IslockChs { get
+ public string IslockChs
+ {
+ get
{
string str = "";
- switch(Islock)
+ switch (Islock)
{
case "D":
str = "鏈‘璁�";
@@ -120,6 +123,43 @@
}
+ public class HrSalaryUpDTO
+ {
+ public string Id { get; set; }
+
+ public string Modifier { get; set; }
+
+
+ public decimal? Jibengongzi { get; set; }
+ public decimal? Baomifei { get; set; }
+ public decimal? Gongzuobutie { get; set; }
+
+ public decimal? Jiabangongzi { get; set; }
+
+ public decimal? Shebao { get; set; }
+ public decimal? Dianhuabutie { get; set; }
+ public decimal? Quanqinjiang { get; set; }
+ public decimal? Jiaotngbutie { get; set; }
+ public decimal? Jixiaoticheng { get; set; }
+ public decimal? Jiangjin { get; set; }
+ public decimal? Bufagongzi { get; set; }
+
+
+ public decimal? Shebaokou { get; set; }
+ public decimal? Geshui { get; set; }
+ public decimal? Dianhuafei { get; set; }
+ public decimal? Queqin { get; set; }
+ public decimal? Fakuan { get; set; }
+ public decimal? Peichang { get; set; }
+ public decimal? Jiucuo { get; set; }
+
+
+ public decimal? Daozhanggongzi { get; set; }
+ public decimal? Yufagongzi { get; set; }
+ public decimal? Yufagongziheji { get; set; }
+
+ }
+
public partial class HrSalaryDTOSearch : SearchEntity
{
public string searchDate { get; set; }
diff --git a/zhengcaioa/IServices/IHrSalaryService.cs b/zhengcaioa/IServices/IHrSalaryService.cs
index 38ff3a9..1bc8834 100644
--- a/zhengcaioa/IServices/IHrSalaryService.cs
+++ b/zhengcaioa/IServices/IHrSalaryService.cs
@@ -33,7 +33,7 @@
ResultDataEntity<HrSalaryDTO> SearchSalaryByPaging(HrSalaryDTOSearch searchEntity);
- ResultEntity SaveCheckSalary(HrSalaryDTO dto);
+ ResultEntity SaveCheckSalary(HrSalaryUpDTO dto);
void AutoCheck();
}
diff --git a/zhengcaioa/Services/HrSalaryService.cs b/zhengcaioa/Services/HrSalaryService.cs
index b2a8ea3..656f00c 100644
--- a/zhengcaioa/Services/HrSalaryService.cs
+++ b/zhengcaioa/Services/HrSalaryService.cs
@@ -93,7 +93,7 @@
return resultEntity;
}
- public ResultEntity SaveCheckSalary(HrSalaryDTO dto)
+ public ResultEntity SaveCheckSalary(HrSalaryUpDTO dto)
{
ResultEntity resultEntity = new ResultEntity();
try
@@ -102,7 +102,7 @@
if(updatepltRole!=null)
{
//鏇存柊鐢佃瘽璐圭敤鐘舵��
- var sim = _context.SimCost.Where(c => c.bill_year == dto.Year && c.bill_month <= dto.Month && c.user_id == dto.Userid && c.status == "0").ToList();
+ var sim = _context.SimCost.Where(c => c.bill_year == updatepltRole.Year && c.bill_month <= updatepltRole.Month && c.user_id == updatepltRole.Userid && c.status == "0").ToList();
foreach(var item in sim)
{
item.status = "1";
diff --git a/zhengcaioa/Services/SimService.cs b/zhengcaioa/Services/SimService.cs
index 674535e..e932f53 100644
--- a/zhengcaioa/Services/SimService.cs
+++ b/zhengcaioa/Services/SimService.cs
@@ -374,7 +374,19 @@
year = int.Parse(searchEntity.searchtime);
}
- var dt = (from c in _context.SimCostYearView where c.bill_year==year orderby c.sim select c).ToList();
+ var dt = (from c in _context.SimCostYearView where c.bill_year==year select c).ToList();
+ //娣诲姞鏈湁璁板綍鐨�
+ var stringId = dt.Select(c => c.sim_id).ToList();
+ var nolog = (from c in _context.SimBindView where !stringId.Contains(c.Id) select c).ToList();
+ foreach(var item in nolog)
+ {
+ SimCostYearView ss = new SimCostYearView();
+ ss.bill_year = year;
+ ss.sim_id = item.Id;
+ ss.sim = item.simcard;
+ dt.Add(ss);
+ }
+ dt = dt.OrderBy(c => c.sim).ToList();
if (!string.IsNullOrEmpty(searchEntity.searchsim))
{
diff --git a/zhengcaioa/zhengcaioa/Controllers/HR/SalaryCheckController.cs b/zhengcaioa/zhengcaioa/Controllers/HR/SalaryCheckController.cs
index ebd980b..dd2c3c8 100644
--- a/zhengcaioa/zhengcaioa/Controllers/HR/SalaryCheckController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/HR/SalaryCheckController.cs
@@ -89,7 +89,7 @@
/// <param name="data"></param>
/// <returns></returns>
[HttpPost]
- public IActionResult SaveCheck(HrSalaryDTO data)
+ public IActionResult SaveCheck(HrSalaryUpDTO data)
{
var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
ResultEntity resultEntity = new ResultEntity();
diff --git a/zhengcaioa/zhengcaioa/Controllers/admin/SimCostController.cs b/zhengcaioa/zhengcaioa/Controllers/admin/SimCostController.cs
index fad240b..f1cf0d5 100644
--- a/zhengcaioa/zhengcaioa/Controllers/admin/SimCostController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/admin/SimCostController.cs
@@ -77,6 +77,7 @@
public IActionResult GetList(int year, string sim)
{
var list = _simService.SearchSimCostByPage(sim, year);
+
//var result = new
//{
// total:"1",
@@ -143,7 +144,8 @@
/// <returns></returns>
public IActionResult GetSimYearList(SimCostDTOSearch search)
{
- return new JsonResult(_simService.SearchSimCostYearByPage(search));
+ var list = _simService.SearchSimCostYearByPage(search);
+ return new JsonResult(list);
}
[HttpPost]
diff --git a/zhengcaioa/zhengcaioa/Views/SalaryCheck/Edit.cshtml b/zhengcaioa/zhengcaioa/Views/SalaryCheck/Edit.cshtml
index b8f850e..197060d 100644
--- a/zhengcaioa/zhengcaioa/Views/SalaryCheck/Edit.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/SalaryCheck/Edit.cshtml
@@ -60,7 +60,7 @@
<label class="text-right col-sm-3 col-md-3 control-label">鍛樺伐濮撳悕</label>
<div class="col-sm-9 col-md-9">
<input class="form-control" labtype="txt" addvisible="true" readonly="readonly" type="text" value="@Model.UserName">
- <input type="hidden" name="id" value="@Model.Id" />
+ <input type="hidden" name="Id" value="@Model.Id" />
</div>
</div>
<div class="clearfix layer-area" style="padding-bottom:15px;">
diff --git "a/\347\224\263\350\257\211\350\256\260\345\275\225\350\241\250.sql" "b/\347\224\263\350\257\211\350\256\260\345\275\225\350\241\250.sql"
index d1c29f8..1b5deba 100644
--- "a/\347\224\263\350\257\211\350\256\260\345\275\225\350\241\250.sql"
+++ "b/\347\224\263\350\257\211\350\256\260\345\275\225\350\241\250.sql"
@@ -34,4 +34,24 @@
go
INSERT [dbo].[plt_page] ([Id], [system_id], [page_name], [display_seq], [page_path], [page_method], [page_type], [page_superior], [open_type], [rec_status], [creater], [createtime]) VALUES (newid(), N'1', N'工资核准', 9, N'/SalaryCheck/Index', N'01', N'M', N'6a13cb10-35d9-4176-a231-8887948e059e', 0, N'A', N'e4c93811-b9b1-4998-89f5-c416ebab0c07', getdate())
-go
\ No newline at end of file
+go
+
+
+--2021-6-28 电话费
+SELECT td.sim_id, td.bill_year, td.Jan, td.Feb, td.Mar, td.Apr, td.May, td.Jun, td.Jul, td.Aug, td.Sept, td.Oct, td.Nov, td.Dece,
+ b.goods_name AS sim
+FROM (SELECT sim_id, bill_year, SUM(CASE [bill_month] WHEN '1' THEN (bill_amount) ELSE 0 END) AS Jan,
+ SUM(CASE [bill_month] WHEN '2' THEN (bill_amount) ELSE 0 END) AS Feb,
+ SUM(CASE [bill_month] WHEN '3' THEN (bill_amount) ELSE 0 END) AS Mar,
+ SUM(CASE [bill_month] WHEN '4' THEN (bill_amount) ELSE 0 END) AS Apr,
+ SUM(CASE [bill_month] WHEN '5' THEN (bill_amount) ELSE 0 END) AS May,
+ SUM(CASE [bill_month] WHEN '6' THEN (bill_amount) ELSE 0 END) AS Jun,
+ SUM(CASE [bill_month] WHEN '7' THEN (bill_amount) ELSE 0 END) AS Jul,
+ SUM(CASE [bill_month] WHEN '8' THEN (bill_amount) ELSE 0 END) AS Aug,
+ SUM(CASE [bill_month] WHEN '9' THEN (bill_amount) ELSE 0 END) AS Sept,
+ SUM(CASE [bill_month] WHEN '10' THEN (bill_amount) ELSE 0 END) AS Oct,
+ SUM(CASE [bill_month] WHEN '11' THEN (bill_amount) ELSE 0 END) AS Nov,
+ SUM(CASE [bill_month] WHEN '12' THEN (bill_amount) ELSE 0 END) AS Dece
+ FROM dbo.t_sim_cost
+ GROUP BY sim_id, bill_year) AS td INNER JOIN
+ dbo.adm_goods_manage AS b ON td.sim_id = b.Id
\ No newline at end of file
--
Gitblit v1.9.1