From 0e5c4a8e17dcefcc10b2507da61b099be12451d8 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期五, 12 一月 2024 12:52:52 +0800
Subject: [PATCH] 代理合作功能
---
zhengcaioa/DTO/OrderBanciOrderDTO.cs | 3
zhengcaioa/Services/ExpertService.cs | 75 ++++++++++++
zhengcaioa/Services/OrderBanciOrderService.cs | 2
zhengcaioa/zhengcaioa/Views/OrderBanciOrder/Indexzhuanjia.cshtml | 10
zhengcaioa/DTO/ExpertDTO.cs | 2
zhengcaioa/zhengcaioa/Controllers/BusinessOrder/OrderBanciController.cs | 60 +++++++++
zhengcaioa/zhengcaioa/Controllers/APIController.cs | 58 +++++++++
zhengcaioa/zhengcaioa/Views/OrderBanci/IndexHezuo.cshtml | 73 ++++++++++++
zhengcaioa/IServices/IExpertService.cs | 3
zhengcaioa/zhengcaioa/Controllers/LiaotianController.cs | 20 +++
zhengcaioa/zhengcaioa/Views/Liaotian/Edit.cshtml | 14 ++
11 files changed, 307 insertions(+), 13 deletions(-)
diff --git a/zhengcaioa/DTO/ExpertDTO.cs b/zhengcaioa/DTO/ExpertDTO.cs
index 5b70a30..b17920f 100644
--- a/zhengcaioa/DTO/ExpertDTO.cs
+++ b/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; }
diff --git a/zhengcaioa/DTO/OrderBanciOrderDTO.cs b/zhengcaioa/DTO/OrderBanciOrderDTO.cs
index e0d72ea..c9fadd0 100644
--- a/zhengcaioa/DTO/OrderBanciOrderDTO.cs
+++ b/zhengcaioa/DTO/OrderBanciOrderDTO.cs
@@ -47,5 +47,8 @@
public string BanciId { get; set; }
public string Kechengleixings { get; set; }
+
+ public string Quyu { get; set; }
+
}
}
diff --git a/zhengcaioa/IServices/IExpertService.cs b/zhengcaioa/IServices/IExpertService.cs
index ea0bd84..615f270 100644
--- a/zhengcaioa/IServices/IExpertService.cs
+++ b/zhengcaioa/IServices/IExpertService.cs
@@ -38,5 +38,8 @@
List<ExpertDTO> GetListsalary(string userid, DateTime datemin, DateTime datemax);
+
+ ResultEntity savehezuo(ExpertDTO expertDTO);
+
}
}
diff --git a/zhengcaioa/Services/ExpertService.cs b/zhengcaioa/Services/ExpertService.cs
index 9ac0256..440a386 100644
--- a/zhengcaioa/Services/ExpertService.cs
+++ b/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;
+ }
}
}
diff --git a/zhengcaioa/Services/OrderBanciOrderService.cs b/zhengcaioa/Services/OrderBanciOrderService.cs
index 4c9970d..72073fe 100644
--- a/zhengcaioa/Services/OrderBanciOrderService.cs
+++ b/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))
diff --git a/zhengcaioa/zhengcaioa/Controllers/APIController.cs b/zhengcaioa/zhengcaioa/Controllers/APIController.cs
index 906e412..15ad074 100644
--- a/zhengcaioa/zhengcaioa/Controllers/APIController.cs
+++ b/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);
}
+
+
+
+
+ //浠g悊鍚堜綔鐢宠
+ 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 = "娌℃湁鑾峰彇鍒皌oken";
+ returnMsg.count = 0;
+
+ }
+ return new JsonResult(returnMsg);
+ }
}
}
diff --git a/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/OrderBanciController.cs b/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/OrderBanciController.cs
index 1041000..e9bff1a 100644
--- a/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/OrderBanciController.cs
+++ b/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));
+ }
}
}
diff --git a/zhengcaioa/zhengcaioa/Controllers/LiaotianController.cs b/zhengcaioa/zhengcaioa/Controllers/LiaotianController.cs
index 2ca906d..258a5ae 100644
--- a/zhengcaioa/zhengcaioa/Controllers/LiaotianController.cs
+++ b/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();
}
diff --git a/zhengcaioa/zhengcaioa/Views/Liaotian/Edit.cshtml b/zhengcaioa/zhengcaioa/Views/Liaotian/Edit.cshtml
index 136207f..c2dae5a 100644
--- a/zhengcaioa/zhengcaioa/Views/Liaotian/Edit.cshtml
+++ b/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');
}
diff --git a/zhengcaioa/zhengcaioa/Views/OrderBanci/IndexHezuo.cshtml b/zhengcaioa/zhengcaioa/Views/OrderBanci/IndexHezuo.cshtml
new file mode 100644
index 0000000..f06dc3f
--- /dev/null
+++ b/zhengcaioa/zhengcaioa/Views/OrderBanci/IndexHezuo.cshtml
@@ -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>
+}
diff --git a/zhengcaioa/zhengcaioa/Views/OrderBanciOrder/Indexzhuanjia.cshtml b/zhengcaioa/zhengcaioa/Views/OrderBanciOrder/Indexzhuanjia.cshtml
index ea618e0..f255cdf 100644
--- a/zhengcaioa/zhengcaioa/Views/OrderBanciOrder/Indexzhuanjia.cshtml
+++ b/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, "鎵撳嵃"); //鎵撳紑鏂扮獥鍙�
--
Gitblit v1.9.1