LR-20210131IOQH\Administrator
2021-06-28 dc8d3e2b064fe4e32d0135126b006b4cd923eb01
修改异常
8个文件已修改
102 ■■■■ 已修改文件
zhengcaioa/DTO/HrSalaryDTO.cs 52 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/IServices/IHrSalaryService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/HrSalaryService.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/SimService.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/HR/SalaryCheckController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/admin/SimCostController.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/SalaryCheck/Edit.cshtml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
申诉记录表.sql 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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; }
zhengcaioa/IServices/IHrSalaryService.cs
@@ -33,7 +33,7 @@
        ResultDataEntity<HrSalaryDTO> SearchSalaryByPaging(HrSalaryDTOSearch searchEntity);
        ResultEntity SaveCheckSalary(HrSalaryDTO dto);
        ResultEntity SaveCheckSalary(HrSalaryUpDTO dto);
        void AutoCheck();
    }
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";
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))
                {
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();
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]
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;">
ÉêË߼Ǽ±í.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
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