username@email.com
2024-01-12 0e5c4a8e17dcefcc10b2507da61b099be12451d8
代理合作功能
10个文件已修改
1个文件已添加
320 ■■■■■ 已修改文件
zhengcaioa/DTO/ExpertDTO.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/OrderBanciOrderDTO.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/IServices/IExpertService.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/ExpertService.cs 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/OrderBanciOrderService.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/APIController.cs 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/BusinessOrder/OrderBanciController.cs 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/LiaotianController.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/Liaotian/Edit.cshtml 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/OrderBanci/IndexHezuo.cshtml 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/OrderBanciOrder/Indexzhuanjia.cshtml 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/ExpertDTO.cs
@@ -40,6 +40,8 @@
        public string Creater { get; set; }
        public string CreaterName { get; set; }
        public DateTime Createtime { get; set; }
        public string CreatetimeName { get; set; }
        public string Modifier { get; set; }
        public DateTime Modifytime { get; set; }
        public string TitileCerti1 { get; set; }
zhengcaioa/DTO/OrderBanciOrderDTO.cs
@@ -47,5 +47,8 @@
        public string BanciId { get; set; }
        public string Kechengleixings { get; set; }
        public string Quyu { get; set; }
    }
}
zhengcaioa/IServices/IExpertService.cs
@@ -38,5 +38,8 @@
        List<ExpertDTO> GetListsalary(string userid, DateTime datemin, DateTime datemax);
        ResultEntity savehezuo(ExpertDTO expertDTO);
    }
}
zhengcaioa/Services/ExpertService.cs
@@ -230,7 +230,7 @@
                             Creater = a.Creater,
                             CreaterName = mmm.UserName,
                             Createtime = a.Createtime,
                             CreatetimeName = a.Createtime.ToString("yyyy-MM-dd"),
                             RecStatus = a.RecStatus,
                             Modifier = a.Modifier,
                             Modifytime = a.Modifytime,
@@ -275,7 +275,7 @@
            if (!string.IsNullOrEmpty(searchEntity.Province))
            {
                query = query.Where(m => m.Province == searchEntity.Province).ToList();
                query = query.Where(m => m.Province.Contains(searchEntity.Province)).ToList();
            }
            if (!string.IsNullOrEmpty(searchEntity.City))
@@ -829,5 +829,76 @@
            var list = _mapper.Map<List<ExpertDTO>>(listPosition);
            return list;
        }
        public ResultEntity savehezuo(ExpertDTO expertDTO)
        {
            ResultEntity resultEntity = new ResultEntity();
            try
            {
                Expert expert = _mapper.Map<Expert>(expertDTO);
                if (string.IsNullOrEmpty(expert.Id))
                {
                    expert.Id = Guid.NewGuid().ToString();
                    _context.Experts.Add(expert);
                }
                else
                {
                    var updateplExpert = _context.Experts.Find(expert.Id);
                    if (updateplExpert.Creater == "1")
                    {
                        updateplExpert.Creater = expert.Modifier;
                        updateplExpert.Createtime = expert.Modifytime;
                    }
                    updateplExpert.Name = expert.Name;
                    updateplExpert.Sex = expert.Sex;
                    updateplExpert.InfoSource = expert.InfoSource;
                    updateplExpert.IdCard = expert.IdCard;
                    updateplExpert.Province = expert.Province;
                    updateplExpert.AreaId = expert.AreaId;
                    updateplExpert.City = expert.City;
                    updateplExpert.Address = expert.Address;
                    updateplExpert.Postal = expert.Postal;
                    updateplExpert.ExpertType = expert.ExpertType;
                    updateplExpert.Level = expert.Level;
                    updateplExpert.Phone1 = expert.Phone1;
                    updateplExpert.Phone2 = expert.Phone2;
                    updateplExpert.Qq = expert.Qq;
                    updateplExpert.Wechat = expert.Wechat;
                    updateplExpert.ReviewItem = expert.ReviewItem;
                    updateplExpert.CertiNumber = expert.CertiNumber;
                    updateplExpert.CertiFont = expert.CertiFont;
                    updateplExpert.CertiBack = expert.CertiBack;
                    updateplExpert.TitileCerti = expert.TitileCerti;
                    updateplExpert.Remark = expert.Remark;
                    updateplExpert.TitileCerti1 = expert.TitileCerti1;
                    updateplExpert.TitileCerti2 = expert.TitileCerti2;
                    updateplExpert.TitileCerti3 = expert.TitileCerti3;
                    updateplExpert.TitileCerti4 = expert.TitileCerti4;
                    updateplExpert.TitileCerti5 = expert.TitileCerti5;
                    updateplExpert.TitileCerti6 = expert.TitileCerti6;
                    updateplExpert.TitileCerti7 = expert.TitileCerti7;
                    updateplExpert.TitileCerti8 = expert.TitileCerti8;
                    updateplExpert.TitileCerti9 = expert.TitileCerti9;
                    updateplExpert.TitileCerti10 = expert.TitileCerti10;
                    updateplExpert.ShenheStatus = expert.ShenheStatus;
                    updateplExpert.Modifier = expert.Modifier;
                    updateplExpert.Modifytime = expert.Modifytime;
                    updateplExpert.YearJiou = expert.YearJiou;
                }
                _context.SaveChanges();
                resultEntity.ReturnID = expert.Id;
                resultEntity.Result = true;
            }
            catch (Exception ex)
            {
                resultEntity.Result = false;
                resultEntity.Message = "保存失败,请联系管理员";
                ex.Message.ToString();
            }
            return resultEntity;
        }
    }
}
zhengcaioa/Services/OrderBanciOrderService.cs
@@ -167,6 +167,8 @@
                              && (string.IsNullOrWhiteSpace(searchEntity.BanciId) || a.BanciId == searchEntity.BanciId.Trim())
                               && (string.IsNullOrWhiteSpace(searchEntity.Quyu) || a.Shenfenzheng.Contains(searchEntity.Quyu.Trim()))
                               && ((searchEntity.Kechengleixings==null|| searchEntity.Kechengleixings.Length == 0) || searchEntity.Kechengleixings.Split(new char[] { ',' }).Contains(a.KechengleixingId))
zhengcaioa/zhengcaioa/Controllers/APIController.cs
@@ -32,7 +32,7 @@
        private readonly IIntentionCustomerService _intentionCustomerService;
        private readonly ICooperVisitService _cooperVisitService;
        private readonly IIntentionVisitService _intentionVisitService;
        private readonly IExpertService _expertService;
        public APIController(ILogger<UserController> logger, IUserService userService, IHrDeptService hrDeptService, IHrPositionService hrPositionService, ILiaotianService liaotianService, IPltJiatingchengyuanService pltJiatingchengyuanService, ISysAttachmentService sysAttachmentService
            , IPltRoleService pltRoleService
@@ -40,7 +40,8 @@
            , ICooperatecustomCustomerService cooperatecustomCustomerService
             , IIntentionCustomerService intentionCustomerService
              , ICooperVisitService cooperVisitService
              , IIntentionVisitService intentionVisitService)
              , IIntentionVisitService intentionVisitService
            , IExpertService expertService)
        {
            _logger = logger;
            _userService = userService;
@@ -55,6 +56,7 @@
            _intentionCustomerService = intentionCustomerService;
            _cooperVisitService = cooperVisitService;
            _intentionVisitService = intentionVisitService;
            _expertService = expertService;
        }
@@ -452,5 +454,57 @@
            return new JsonResult(returnMsg);
        }
        //代理合作申请
        public IActionResult SaveDlhz([FromBody] ExpertDTO dTO)
        {
            ReturnMsg<ExpertDTO> returnMsg = new ReturnMsg<ExpertDTO>();
            returnMsg.code = 2;
            try
            {
                dTO.InfoSource = "";
                dTO.ExpertType = "";
                dTO.RecStatus = "A";
                dTO.Modifier = "1";
                dTO.Modifytime = DateTime.Now;
                dTO.Creater = "1";
                dTO.Createtime = dTO.Modifytime;
                var resultDataEntity = _expertService.savehezuo(dTO);
                if (resultDataEntity.Result)
                {
                    returnMsg.code = 1;
                    returnMsg.returnObj = dTO;
                    returnMsg.count = 1;
                }
                else
                {
                    returnMsg.code = 2;
                    returnMsg.error = "保存失败";
                    returnMsg.count = 0;
                }
            }
            catch (Exception ex)
            {
                returnMsg.code = 2;
                returnMsg.error = "没有获取到token";
                returnMsg.count = 0;
            }
            return new JsonResult(returnMsg);
        }
    }
}
zhengcaioa/zhengcaioa/Controllers/BusinessOrder/OrderBanciController.cs
@@ -32,11 +32,13 @@
        private readonly IPltPageService _pltPageService;
        private readonly IConfiguration _configuration;
        private readonly IHttpClientFactory _clientFactory;
        private readonly IExpertService _expertService;
        public OrderBanciController(ILogger<OrderBanciController> logger, ILiaotianService liaotianService, IOrderBanciService orderBanciService, IOrderBanciDtlService orderBanciDtlService
             , IPltPageService pltPageService
              , IConfiguration configuration
             , IHttpClientFactory clientFactory)
             , IHttpClientFactory clientFactory
            , IExpertService expertService )
        {
            _logger = logger;
            _liaotianService = liaotianService;
@@ -45,6 +47,7 @@
            _pltPageService = pltPageService;
            _configuration = configuration;
            _clientFactory = clientFactory;
            _expertService = expertService;
        }
        [CheckLogin]
@@ -754,5 +757,60 @@
            }
            return new JsonResult(returnMsg);
        }
        [CheckLogin]
        public IActionResult IndexHezuo()
        {
            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);
            //ActionEntity actionEntity1 = new ActionEntity();
            //actionEntity1.OpenType = 0;
            //actionEntity1.ActionUrl = "";
            //actionEntity1.ActionFun = "Add";
            //actionEntity1.PageIco = "fa fa-plus";
            //actionEntity1.ActionName = "新增";
            //actionlist.Add(actionEntity1);
            //var pageEntities = _pltPageService.GetUserPage(curentuser.Id, "/OrderBanci/Index/");
            //var pageEntities1 = pageEntities.Where(x => x.PageMethod == "01").ToList();
            //var pageEntities2 = pageEntities.Where(x => x.PageMethod == "02").ToList();
            //foreach (var pageEntity in pageEntities1)
            //{
            //    ActionEntity actionEntity1 = new ActionEntity();
            //    actionEntity1.OpenType = pageEntity.OpenType;
            //    actionEntity1.ActionUrl = "";
            //    actionEntity1.ActionFun = pageEntity.PageShortcut;
            //    actionEntity1.PageIco = pageEntity.PageIco;
            //    actionEntity1.ActionName = pageEntity.PageName;
            //    actionlist.Add(actionEntity1);
            //}
            ViewData["ActionInfo"] = actionlist;
            //ViewData["ActionInfo2"] = pageEntities2;
            return View();
        }
        public IActionResult GetListHezuo(ExpertDTOSearch search)
        {
            //JsonResult jsonResult =   new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver());
            return new JsonResult(_expertService.SearchByPaging(search));
        }
    }
}
zhengcaioa/zhengcaioa/Controllers/LiaotianController.cs
@@ -283,7 +283,7 @@
        #region 编辑
        [CheckLogin]
        public ActionResult Edit(string id = null)
        public ActionResult Edit(string id = null, string Questiontype = null, string Problemtype = null)
        {
            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
            ViewData["curentuser"] = curentuser;
@@ -305,6 +305,18 @@
                }
            }
            else
            {
                if (!string.IsNullOrEmpty(Questiontype))
                {
                    liaotianDTO.Questiontype = Questiontype;
                }
                if (!string.IsNullOrEmpty(Problemtype))
                {
                    liaotianDTO.Problemtype = Problemtype;
                }
            }
            ViewData.Model = liaotianDTO;
@@ -315,6 +327,12 @@
            ViewData["problemtype"] = _liaotianService.GetSYScode("Liaotian", "problemtype").Where(x=>x.Contents == liaotianDTO.Questiontype).ToList();
            //ViewData["Questiontypesel"] = Questiontype;
            //ViewData["Problemtypesel"] = Problemtype;
            return View();
        }
zhengcaioa/zhengcaioa/Views/Liaotian/Edit.cshtml
@@ -20,6 +20,9 @@
    }
    List<PageEntity> ActionInfo2 = ViewData["ActionInfo2"] as List<PageEntity>;
}
<!DOCTYPE html>
<html>
@@ -261,6 +264,7 @@
        $("#div_content").height(hh);
        var id = '@Model.Id';
        var Questiontypeseeee = '@Model.Questiontype';
        var shenhe = '@shenhe';
        var tijiaobingshenhe = '@tijiaobingshenhe';
        var Clientid = '@Model.Clientid';
@@ -483,7 +487,13 @@
                    if (data.Result) {
                        //  parent._afterSave(true);
                        parent.layer.msg('保存成功', { icon: 6 });
                        _pageAutoClose();//自动关闭页面方法
                        window.location = "/Liaotian/Edit?Questiontype=" + $("#Questiontype").val() + "&Problemtype=" + $("#Problemtype").val();
                        parent.layer.closeAll('loading');
                    }
                    else {
                        if ($.isNumber(imgLoad)) {
@@ -578,7 +588,7 @@
        });
        if (id == null || id == '') {
        if ((id == null || id == '') && (Questiontypeseeee == null || Questiontypeseeee == '' )  ) {
            $('#Questiontype option:eq(1)').attr('selected', 'selected');
            $('#Questiontype').trigger('change');
        }
zhengcaioa/zhengcaioa/Views/OrderBanci/IndexHezuo.cshtml
New file
@@ -0,0 +1,73 @@
@using DTO;
@{
    ViewBag.Title = "OrderBanci";
    Layout = "~/Views/Shared/_Layout_Search.cshtml";
}
@section headerStyle{
    <script type="text/javascript">
        dataCol = [
            { label: 'id', name: 'Id', labtype: 'txt', hidden: true },
            { label: '名字', name: 'Name', labtype: 'txt', hidden: false, width: 100 },
            { label: '申请时间', name: 'CreatetimeName', labtype: 'txt', hidden: false, width: 100 },
            { label: '联系方式', name: 'Phone1', labtype: 'txt', hidden: false, width: 100 },
            { label: '区域', name: 'Province', labtype: 'txt', hidden: false, width: 100 },
            { label: '合作内容', name: 'Remark', labtype: 'txt', hidden: false, width: 400 },
        ];
        dataUrl = "/OrderBanci/GetListHezuo";
        searchCol = [
            { label: '申请时间', name: 'Createtime', labtype: 'datearea', hidden: false },
            { label: '名字', name: 'Name', labtype: 'txt', hidden: false },
            { label: '区域', name: 'Province', labtype: 'txt', hidden: false },
        ];
        var _pageAdd = function () {
            OpenWindow("新增班次", "98%", "90%", "/OrderBanci/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/OrderBanciOrder/Indexzhuanjia.cshtml
@@ -26,7 +26,7 @@
            { label: '课程类型', name: 'Kechengleixing', labtype: 'txt', hidden: false, width: 70 },
            { label: '姓名', name: 'Xingming', labtype: 'txt', hidden: false, width: 70 },
            { label: '联系电话', name: 'Lianxidianhua', labtype: 'txt', hidden: false, width: 70 },
            { label: '身份证', name: 'Shenfenzheng', labtype: 'txt', hidden: false, width: 70 },
            { label: '区域', name: 'Shenfenzheng', labtype: 'txt', hidden: false, width: 70 },
            { label: '学费', name: 'Xuefei', labtype: 'txt', hidden: false, width: 70 },
            { label: '报名人数', name: 'Baomingrenshu', labtype: 'txt', hidden: false, width: 50 },
            { label: '积分', name: 'Jifen', labtype: 'txt', hidden: false, width: 50 },
@@ -46,14 +46,14 @@
            },
        ];
        dataUrl = "/OrderBanciOrder/GetList?Kechengleixings=0,1,2,4,5,6,8,9,10,11&Baomingtime=" + Baomingtimebegin + "|" + Baomingtimeend;
        dataUrl = "/OrderBanciOrder/GetList?Kechengleixings=0,1,2,4,5,6,8,9,10,11,12,13&Baomingtime=" + Baomingtimebegin + "|" + Baomingtimeend;
        searchCol = [
            { label: '报名时间', name: 'Baomingtime', labtype: 'datearea', hidden: false },
            { label: '培训班次', name: 'Peixunbanci', labtype: 'txt', hidden: false },
            { label: '课程类型', name: 'Kechengleixing', labtype: 'combox', hidden: false, data: JSON.parse(kechengleixing)/*, cwidth: '5%', cccwidth: '8%' */ },
            { label: '姓名', name: 'Xingming', labtype: 'txt', hidden: false },
            { label: '联系电话', name: 'Lianxidianhua', labtype: 'txt', hidden: false },
            { label: '区域', name: 'Quyu', labtype: 'txt', hidden: false },
@@ -65,7 +65,7 @@
        //}
        var _pageSearch = function () {
            $("#jqGrid").jqGrid('setGridParam', {
                url: '/OrderBanciOrder/GetList?Kechengleixings=0,1,2,4,5,6,8,9,10,11', postData: jsons, page: 1
                url: '/OrderBanciOrder/GetList?Kechengleixings=0,1,2,4,5,6,8,9,10,11,12,13', postData: jsons, page: 1
            }); //重新载入
            var jsons = GetSearchEnd();
            if (jsons == false) {
@@ -158,7 +158,7 @@
            }
            var url = "/OrderBanciOrder/print?Kechengleixings=0,1,2,4,5,6,8,9,10,11&Baomingtime=" + Baomingtime + "&Peixunbanci=" + Peixunbanci + "&Kechengleixing=" + Kechengleixing + "&Xingming=" + Xingming + "&Lianxidianhua=" + Lianxidianhua;
            var url = "/OrderBanciOrder/print?Kechengleixings=0,1,2,4,5,6,8,9,10,11,12,13&Baomingtime=" + Baomingtime + "&Peixunbanci=" + Peixunbanci + "&Kechengleixing=" + Kechengleixing + "&Xingming=" + Xingming + "&Lianxidianhua=" + Lianxidianhua;
            var me = window.open(url, "打印");  //打开新窗口