username@email.com
2021-08-17 1eaeeb1efd83e7b0b04cdb1bdc1076e839bfebfe
提交
9个文件已修改
3个文件已添加
496 ■■■■■ 已修改文件
zhengcaioa/DTO/AdmAskGoodDTO.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/AdmBreakPrecedentDTO.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/HrSalaryDTO.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/IServices/IAdmBreakPrecedentService.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/AdmBreakPrecedentService.cs 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/HrSalaryService.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/HR/SalaryCheckController.cs 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/admin/AdmBreakPrecedentController.cs 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/AdmBreakPrecedent/IndexGoods.cshtml 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/AdmBreakPrecedent/IndexRenshi.cshtml 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/SalaryCheck/SearchIndexRenshi.cshtml 125 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/User/Index.cshtml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/AdmAskGoodDTO.cs
@@ -8,6 +8,7 @@
    {
        public string Id { get; set; }
        public string GoodsId { get; set; }
        public string GoodsName { get; set; }
        public decimal? Shuliang { get; set; }
        public string ShuliangName { get; set; }
        public string Remark { get; set; }
@@ -15,6 +16,7 @@
        public string RecStatus { get; set; }
        public string Creater { get; set; }
        public DateTime Createtime { get; set; }
        public string CreatetimeName { get; set; }
        public string Modifier { get; set; }
        public DateTime Modifytime { get; set; }
        public string CreaterName { get; set; }
zhengcaioa/DTO/AdmBreakPrecedentDTO.cs
@@ -32,6 +32,9 @@
        public string DeptId { get; set; }
        public string UserName { get; set; }
        public string BreakThing { get; set; }
        public string UserId { get; set; }
        public string Goods { get; set; }
    }
}
zhengcaioa/DTO/HrSalaryDTO.cs
@@ -170,6 +170,7 @@
        public string Usernumber { get; set; }
        public string DeptId { get; set; }
        public string UserName { get; set; }
        public string UserId { get; set; }
    }
}
zhengcaioa/IServices/IAdmBreakPrecedentService.cs
@@ -19,5 +19,8 @@
        List<AdmBreakPrecedentDTO> GetList (string userid, DateTime datemin, DateTime datemax);
        ResultDataEntity<AdmAskGoodDTO> SearchByPagingGoods(AdmBreakPrecedentDTOSearch searchEntity);
    }
}
zhengcaioa/Services/AdmBreakPrecedentService.cs
@@ -133,8 +133,8 @@
                           && (string.IsNullOrWhiteSpace(searchEntity.DeptId) || bbb.DeptId == searchEntity.DeptId.Trim())
                          && (string.IsNullOrWhiteSpace(searchEntity.UserName) || bbb.UserName.Contains(searchEntity.UserName.Trim()))
                           && (string.IsNullOrWhiteSpace(searchEntity.BreakThing) || a.BreakThing.Contains(searchEntity.BreakThing.Trim()))
                            && (string.IsNullOrWhiteSpace(searchEntity.UserId) || a.UserId == searchEntity.UserId.Trim())
@@ -213,5 +213,91 @@
            return result;
        }
        public ResultDataEntity<AdmAskGoodDTO> SearchByPagingGoods(AdmBreakPrecedentDTOSearch searchEntity)
        {
            ResultDataEntity<AdmAskGoodDTO> data = new ResultDataEntity<AdmAskGoodDTO>();
            List<AdmAskGoodDTO> list = new List<AdmAskGoodDTO>();
            DateTime BreakTimestart = DateTime.Now;
            DateTime BreakTimeend = DateTime.Now;
            if (!string.IsNullOrWhiteSpace(searchEntity.BreakTime))
            {
                string[] BreakTimes = searchEntity.BreakTime.Split("|");
                DateTime.TryParse(BreakTimes[0], out BreakTimestart);
                DateTime.TryParse(BreakTimes[1], out BreakTimeend);
                BreakTimeend = BreakTimeend.AddDays(1);
            }
            ///AdmBreakPrecedents
            var query = (from a in _context.AdmAskGoods
                         join b in _context.AdmGoodsManages
                 on a.GoodsId equals b.Id
                 into bsssss
                         from bbb in bsssss.DefaultIfEmpty()
                         join k in _context.PltUsers
                 on a.Creater equals k.Id
                 into ksssss
                         from kkk in ksssss.DefaultIfEmpty()
                         join c in _context.HrDepts
               on kkk.DeptId equals c.Id
               into csssss
                         from ccc in csssss.DefaultIfEmpty()
                         where a.RecStatus == "A" && a.ShenpiStatus == "A"
                          && (string.IsNullOrWhiteSpace(searchEntity.BreakTime) || (a.Createtime >= BreakTimestart && a.Createtime <= BreakTimeend))
                           && (string.IsNullOrWhiteSpace(searchEntity.Goods) || bbb.GoodsName.Contains(searchEntity.Goods.Trim()))
                            && (string.IsNullOrWhiteSpace(searchEntity.UserId) || a.Creater == searchEntity.UserId.Trim())
                         select new AdmAskGoodDTO
                         {
                             Id = a.Id,
                             Createtime = a.Createtime,
                             CreatetimeName = a.Createtime.ToString("yyyy-MM-dd"),
                             GoodsId = a.GoodsId,
                             GoodsName = bbb.GoodsName,
                             Shuliang = a.Shuliang,
                             ShuliangName = a.Shuliang.HasValue? a.Shuliang.Value.ToString("F2"):"0",
                             Creater = a.Creater,
                             RecStatus = a.RecStatus,
                             Modifier = a.Modifier,
                             Modifytime = a.Modifytime,
                         }
                ).OrderByDescending(x => x.Createtime).ToList();
            //if (searchEntity.totalrows == 0)
            searchEntity.totalrows = query.Count();
            var lianlist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList();
            data.LoadData(searchEntity, lianlist);
            return data;
        }
    }
}
zhengcaioa/Services/HrSalaryService.cs
@@ -809,7 +809,10 @@
                          && (string.IsNullOrWhiteSpace(searchEntity.Usernumber) || f.Usernumber == searchEntity.Usernumber.Trim())
                            && (string.IsNullOrWhiteSpace(searchEntity.DeptId) || f.DeptId == searchEntity.DeptId.Trim())
                              && (string.IsNullOrWhiteSpace(searchEntity.UserName) || f.UserName.Contains(searchEntity.UserName.Trim()))
                         select new HrSalaryDTO
                               && (string.IsNullOrWhiteSpace(searchEntity.UserId) || a.Userid.Contains(searchEntity.UserId.Trim()))
                        select new HrSalaryDTO
                         {
                             Id = a.Id,
zhengcaioa/zhengcaioa/Controllers/HR/SalaryCheckController.cs
@@ -310,7 +310,53 @@
            return new JsonResult(_hrSalaryService.SearchByPagingFinish(search));
        }
        #endregion
        #region 工资查询
        public IActionResult SearchIndexRenshi(string UserId)
        {
            List<ActionEntity> actionlist = new List<ActionEntity>();
            ActionEntity actionEntity = new ActionEntity();
            actionEntity.OpenType = 0;
            actionEntity.ActionUrl = "";
            actionEntity.ActionFun = "Search";
            actionEntity.PageIco = "fa fa-search";
            actionEntity.ActionName = "查询";
            actionlist.Add(actionEntity);
            ViewData["ActionInfo"] = actionlist;
            //ViewBag.dept = _hrDeptService.GetList().Select(x => new { code = x.Id, label = x.DeptName }).ToList();
            ViewBag.stime = new DateTime(DateTime.Now.Year,1,1).ToString("yyyy-MM-dd");
            ViewBag.etime = DateTime.Now.AddDays(1 - DateTime.Now.Day).Date.AddMonths(1).AddSeconds(-1).ToString("yyyy-MM-dd");
            ViewBag.UserId = UserId;
            return View();
        }
        /// <summary>
        /// 列表内容
        /// </summary>
        /// <param name="search"></param>
        /// <returns></returns>
        public IActionResult GetSearchListRenshi(HrSalaryDTOSearch search)
        {
            //自动确认
            //_hrSalaryService.AutoCheck();
            if (string.IsNullOrEmpty(search.searchDate))
            {
                search.searchDate = new DateTime(DateTime.Now.Year, 1, 1).ToString("yyyy-MM-dd") + "|" + DateTime.Now.AddDays(1 - DateTime.Now.Day).Date.AddMonths(1).AddSeconds(-1).ToString("yyyy-MM-dd");
            }
            return new JsonResult(_hrSalaryService.SearchByPagingFinish(search));
        }
        #endregion
    }
}
zhengcaioa/zhengcaioa/Controllers/admin/AdmBreakPrecedentController.cs
@@ -173,5 +173,62 @@
            return new JsonResult(resultEntity);
        }
        public IActionResult IndexRenshi(string UserId)
        {
            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
            ViewData["curentuser"] = curentuser;
            List<ActionEntity> actionlist = new List<ActionEntity>();
            ActionEntity actionEntity = new ActionEntity();
            actionEntity.OpenType = 0;
            actionEntity.ActionUrl = "";
            actionEntity.ActionFun = "Search";
            actionEntity.PageIco = "fa fa-search";
            actionEntity.ActionName = "查询";
            actionlist.Add(actionEntity);
            ViewData["ActionInfo"] = actionlist;
            ViewBag.UserId = UserId;
            return View();
        }
        public IActionResult GetListRenshi(AdmBreakPrecedentDTOSearch search)
        {
            //JsonResult jsonResult =   new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver());
            return new JsonResult(_admBreakPrecedentService.SearchByPaging(search));
        }
        public IActionResult IndexGoods(string UserId)
        {
            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
            ViewData["curentuser"] = curentuser;
            List<ActionEntity> actionlist = new List<ActionEntity>();
            ActionEntity actionEntity = new ActionEntity();
            actionEntity.OpenType = 0;
            actionEntity.ActionUrl = "";
            actionEntity.ActionFun = "Search";
            actionEntity.PageIco = "fa fa-search";
            actionEntity.ActionName = "查询";
            actionlist.Add(actionEntity);
            ViewData["ActionInfo"] = actionlist;
            ViewBag.UserId = UserId;
            return View();
        }
        public IActionResult GetListGoods(AdmBreakPrecedentDTOSearch search)
        {
            //JsonResult jsonResult =   new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver());
            return new JsonResult(_admBreakPrecedentService.SearchByPagingGoods(search));
        }
    }
}
zhengcaioa/zhengcaioa/Views/AdmBreakPrecedent/IndexGoods.cshtml
New file
@@ -0,0 +1,76 @@
@{
    ViewBag.Title = "AdmBreakPrecedent";
    Layout = "~/Views/Shared/_Layout_Search.cshtml";
}
@section headerStyle{
    <script type="text/javascript">
        var UserId = '@Html.Raw(ViewBag.UserId)';
        loseherght = 30;
        dataCol = [
            { label: 'id', name: 'Id', labtype: 'txt', hidden: true },
            {
                label: '申请时间', name: 'CreatetimeName', labtype: 'txt', hidden: false, width: 100
                //,
                //formatter: function (cellvalue, options, rowObject) {
                //    return "<a onclick=\"OpenWindow('" + cellvalue.replace(/'/g, '') + "','98%','100%', '/AdmBreakPrecedent/Edit?id=" + rowObject.Id + "')\"  >" + cellvalue + "</a>";
                //}
            },
            { label: '物品名称', name: 'GoodsName', labtype: 'txt', hidden: false, width: 100  },
            { label: '领用数量', name: 'ShuliangName', labtype: 'txt', hidden: false, width: 100 },
        ];
        dataUrl = "/AdmBreakPrecedent/GetListGoods?UserId=" + UserId;
        searchCol = [
            { label: '工作时间', name: 'BreakTime', labtype: 'datearea', hidden: false },
            //{ label: '部门', name: 'DeptId', labtype: 'combox', hidden: false, data: JSON.parse(DeptId), cwidth: '5%', cccwidth: '8%' },
            //{ label: '员工姓名', name: 'UserName', labtype: 'txt', hidden: false },
            { label: '物品名称', name: 'Goods', labtype: 'txt', hidden: false },
        ];
        var _pageAdd = function () {
            OpenWindow("新增违纪处理", "98%", "90%", "/AdmBreakPrecedent/Edit/");
        }
        var _afterSave = function (result) {
            if (result) {
                toastr.success("保存成功");
            } else {
                toastr.error("保存失败");
            }
        }
        var _afterDel = function (result) {
            if (result) {
                toastr.success("删除成功");
            } else {
                /**/
                toastr.error("删除成功");
        /**/
    }
}
    </script>
}
@section footerScripts{
    <script type="text/javascript">
    </script>
}
zhengcaioa/zhengcaioa/Views/AdmBreakPrecedent/IndexRenshi.cshtml
New file
@@ -0,0 +1,80 @@
@{
    ViewBag.Title = "AdmBreakPrecedent";
    Layout = "~/Views/Shared/_Layout_Search.cshtml";
}
@section headerStyle{
    <script type="text/javascript">
        var UserId = '@Html.Raw(ViewBag.UserId)';
        loseherght = 30;
        dataCol = [
            { label: 'id', name: 'Id', labtype: 'txt', hidden: true },
            {
                label: '处罚时间', name: 'BreakTimeName', labtype: 'txt', hidden: false, width: 100
                //,
                //formatter: function (cellvalue, options, rowObject) {
                //    return "<a onclick=\"OpenWindow('" + cellvalue.replace(/'/g, '') + "','98%','100%', '/AdmBreakPrecedent/Edit?id=" + rowObject.Id + "')\"  >" + cellvalue + "</a>";
                //}
            },
            { label: '部门', name: 'DeptName', labtype: 'txt', hidden: false, width: 100  },
            { label: '员工姓名', name: 'UserName', labtype: 'txt', hidden: false, width: 100 },
            { label: '违纪事由', name: 'BreakThing', labtype: 'txt', hidden: false, width: 100 },
            { label: '违反制度', name: 'BreakPrecedent', labtype: 'txt', hidden: false, width: 100 },
            { label: '处罚金额(元)', name: 'Chufajine', labtype: 'txt', hidden: false, width: 100 },
            { label: '处罚签发', name: 'QianfaUserName', labtype: 'txt', hidden: false, width: 100 },
        ];
        dataUrl = "/AdmBreakPrecedent/GetListRenshi?UserId=" + UserId;
        searchCol = [
            { label: '工作时间', name: 'BreakTime', labtype: 'datearea', hidden: false },
            //{ label: '部门', name: 'DeptId', labtype: 'combox', hidden: false, data: JSON.parse(DeptId), cwidth: '5%', cccwidth: '8%' },
            //{ label: '员工姓名', name: 'UserName', labtype: 'txt', hidden: false },
            { label: '违纪事由', name: 'BreakThing', labtype: 'txt', hidden: false },
        ];
        var _pageAdd = function () {
            OpenWindow("新增违纪处理", "98%", "90%", "/AdmBreakPrecedent/Edit/");
        }
        var _afterSave = function (result) {
            if (result) {
                toastr.success("保存成功");
            } else {
                toastr.error("保存失败");
            }
        }
        var _afterDel = function (result) {
            if (result) {
                toastr.success("删除成功");
            } else {
                /**/
                toastr.error("删除成功");
        /**/
    }
}
    </script>
}
@section footerScripts{
    <script type="text/javascript">
    </script>
}
zhengcaioa/zhengcaioa/Views/SalaryCheck/SearchIndexRenshi.cshtml
New file
@@ -0,0 +1,125 @@
@{
    ViewBag.Title = "工资查询";
    Layout = "~/Views/Shared/_Layout_Search.cshtml";
}
<link href="~/css/jquery-confirm.css" rel="stylesheet">
<script src="~/js/jquery-confirm.js" type="text/javascript"></script>
@section headerStyle{
    <style type="text/css">
        /*
        .form-control {
            width:100px;
        }*/
    </style>
    <script type="text/javascript">
        @*var dept = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.dept))';*@
        var UserId = '@Html.Raw(ViewBag.UserId)';
        gridConfig = { multiselect: false, selectcol: "Id" };
        shrinkToFit = false;
        footerrow = false;
        dataCol = [
            { label: '序号', name: 'Id', labtype: 'txt', hidden: true },
            { label: '工号', name: 'Usernumber', labtype: 'txt', hidden: false, width: 100},
            {
                label: '姓名', name: 'UserName', labtype: 'txt', hidden: false, width: 100,
            },
            { label: '工资月份', name: 'YearMonth', labtype: 'txt', hidden: false, width: 100 },
            { label: '工作部门', name: 'DeptName', labtype: 'txt', hidden: false, width: 120 },
            { label: '基本工资', name: 'Jibengongzi', labtype: 'txt', hidden: false, width: 100 },
            { label: '保密费', name: 'Baomifei', labtype: 'txt', hidden: false, width: 100 },
            { label: '工作补贴', name: 'Gongzuobutie', labtype: 'txt', hidden: false, width: 100 },
            { label: '加班工资', name: 'Jiabangongzi', labtype: 'txt', hidden: false, width: 100 },
            { label: '社保', name: 'Shebao', labtype: 'txt', hidden: false, width: 100 },
            { label: '电话补贴', name: 'DianhuabutieChs', labtype: 'txt', hidden: false, width: 100 },
            { label: '全勤奖', name: 'Quanqinjiang', labtype: 'txt', hidden: false, width: 100 },
            { label: '交通补贴', name: 'Jiaotngbutie', labtype: 'txt', hidden: false, width: 100 },
            { label: '绩效提成', name: 'Jixiaoticheng', labtype: 'txt', hidden: false, width: 100 },
            { label: '奖金', name: 'Jiangjin', labtype: 'txt', hidden: false, width: 100 },
            { label: '补发工资', name: 'Bufagongzi', labtype: 'txt', hidden: false, width: 100 },
            { label: '合计', name: 'sum_fgz', labtype: 'txt', hidden: false, width: 100 },
            { label: '个人社保', name: 'Shebaokou', labtype: 'txt', hidden: false, width: 100 },
            { label: '个税', name: 'Geshui', labtype: 'txt', hidden: false, width: 100 },
            { label: '电话费', name: 'Dianhuafei', labtype: 'txt', hidden: false, width: 100 },
            { label: '缺勤', name: 'Queqin', labtype: 'txt', hidden: false, width: 100 },
            { label: '罚款', name: 'Fakuan', labtype: 'txt', hidden: false, width: 100 },
            { label: '赔偿', name: 'Peichang', labtype: 'txt', hidden: false, width: 100 },
            { label: '纠错', name: 'Jiucuo', labtype: 'txt', hidden: false, width: 100 },
            { label: '合计', name: 'sum_kgz', labtype: 'txt', hidden: false, width: 100 },
            { label: '到账工资', name: 'Daozhanggongzi', labtype: 'txt', hidden: false, width: 100 },
            { label: '预发工资', name: 'Yufagongzi', labtype: 'txt', hidden: false, width: 100 },
            { label: '预发工资合计', name: 'Yufagongziheji', labtype: 'txt', hidden: false, width: 100 },
            {
                label: '状态', name: 'IslockChs', labtype: 'txt', hidden: false, width: 100, formatter: function (cellvalue, options, rowObject) {
                    if (rowObject.Islock == 'S') {
                        return '<b style="color: red">' + cellvalue + '</b>';
                    } else {
                        return cellvalue;
                    }
                }
            },
        ];
        dataUrl = "/SalaryCheck/GetSearchListRenshi?UserId=" + UserId;
        searchCol = [
            { label: '时间', name: 'searchDate', labtype: 'datearea', hidden: false },
            //{ label: '部门', name: 'DeptId', labtype: 'combox', hidden: false, data: JSON.parse(dept) },
            //{ label: '姓名', name: 'UserName', labtype: 'txt', hidden: false },
            //{ label: '工号', name: 'Usernumber', labtype: 'txt', hidden: false },
        ];
        $(function () {
            $("#PBSsearchDatestart").val('@ViewBag.stime');
            $("#PBSsearchDateend").val('@ViewBag.etime');
            $("#jqGrid").closest(".ui-jqgrid-bdiv").css({ 'overflow-x': 'scroll' });
            jQuery("#jqGrid").jqGrid('setGroupHeaders', {
                useColSpanStyle: true,
                groupHeaders: [
                    { startColumnName: 'Jibengongzi', numberOfColumns: 12, titleText: '应发工资' },
                    { startColumnName: 'Shebaokou', numberOfColumns: 8, titleText: '应扣工资' }
                ]
            });
        });
        var _pageEdit = function () {
            var id = jQuery("#jqGrid").jqGrid('getGridParam', 'selrow');
            if (id) {
                OpenWindow('工资核准', '50%', '60%', '/SalaryCheck/Edit?id=' + id );
            } else {
                toastr.error("请先选中1条记录!");
            }
        };
        var _afterSave = function (result) {
            if (result) {
                toastr.success("保存成功");
            } else {
                toastr.error("保存失败");
            }
        }
        var _afterDel = function (result) {
            if (result) {
                toastr.success("删除成功");
            } else {
                /**/
                toastr.error("删除成功");
                /**/
            }
        }
    </script>
}
zhengcaioa/zhengcaioa/Views/User/Index.cshtml
@@ -95,7 +95,9 @@
            {
                label: '档案查询', name: 'Education', labtype: 'txt', hidden: false, width: 100,
                formatter: function (cellvalue, options, rowObject) {
                    return "<a onclick=\"javascript:void(0);\"  >奖惩</a>&nbsp;<a onclick=\"javascript:void(0);\"  >物品</a>&nbsp;<a onclick=\"javascript:void(0);\"  >薪资</a>&nbsp;";
                    return "<a onclick=\"OpenWindow('奖惩','98%','100%', '/AdmBreakPrecedent/IndexRenshi?UserId=" + rowObject.Id + "')\"  >奖惩</a>&nbsp;"
                        + "<a onclick=\"OpenWindow('物品','98%','100%', '/AdmBreakPrecedent/IndexGoods?UserId=" + rowObject.Id + "')\"  >物品</a>&nbsp;"
                        + "<a onclick=\"OpenWindow('薪资','98%','100%', '/SalaryCheck/SearchIndexRenshi?UserId=" + rowObject.Id + "')\"  >薪资</a>&nbsp;";
                }
            },
            {