username@email.com
2024-01-12 0e5c4a8e17dcefcc10b2507da61b099be12451d8
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);
        }
    }
}