username@email.com
2022-01-18 bd48f9e9e9176ea5d098415fab572b34166aec26
zhengcaioa/zhengcaioa/Controllers/BusinessOrder/OrderBanciOrderController.cs
@@ -29,10 +29,12 @@
        private readonly IOrderBanciDtlService _orderBanciDtlService;
        private readonly IOrderBanciOrderService _orderBanciOrderService;
        private readonly IFiOrderrecievemoneyService _fiOrderrecievemoneyService;
        private readonly ICooperOrderService _cooperOrderService;
        public OrderBanciOrderController(ILogger<OrderBanciOrderController> logger, ILiaotianService liaotianService, IOrderBanciService orderBanciService, IOrderBanciDtlService orderBanciDtlService
            ,IOrderBanciOrderService orderBanciOrderService
            , IFiOrderrecievemoneyService fiOrderrecievemoneyService)
            , IFiOrderrecievemoneyService fiOrderrecievemoneyService
            , ICooperOrderService cooperOrderService)
        {
            _logger = logger;
            _liaotianService = liaotianService;
@@ -40,6 +42,7 @@
            _orderBanciDtlService = orderBanciDtlService;
            _fiOrderrecievemoneyService = fiOrderrecievemoneyService;
            _orderBanciOrderService = orderBanciOrderService;
            _cooperOrderService = cooperOrderService;
        }
        [CheckLogin]
@@ -142,6 +145,29 @@
            return View();
        }
        [CheckLogin]
        public IActionResult Printhetong(string id = null)
        {
            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
            ViewData["curentuser"] = curentuser;
            //投诉书
            var orderBanciOrderDTO = _orderBanciOrderService.Get(id);
          var frameworkUser  =  _cooperOrderService.GetFrameworkUsers(orderBanciOrderDTO.PersonId);
            if (frameworkUser != null)
            {
                orderBanciOrderDTO.Xingming = frameworkUser.Name;
                orderBanciOrderDTO.Lianxidianhua = frameworkUser.Itcode;
            }
                ViewData.Model = orderBanciOrderDTO;
            return View();
        }
        [CheckLogin]
@@ -388,5 +414,45 @@
            return new JsonResult(returnMsg);
        }
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="data">岗位实体类对象</param>
        /// <returns></returns>
        ///
        public IActionResult Delete(string OrderId)
        {
            //var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
            //ViewData["curentuser"] = curentuser;
            ReturnMsg<OrderBanciOrderDTO> returnMsg = new ReturnMsg<OrderBanciOrderDTO>();
            returnMsg.code = 2;
            try
            {
                ResultEntity resultEntity = _orderBanciOrderService.DeleteStatus(OrderId);
                if (resultEntity.Result)
                {
                    returnMsg.code = 1;
                    returnMsg.count = 1;
                    returnMsg.returnObj = null;
                }
                else
                {
                    returnMsg.error = resultEntity.Message;
                }
            }
            catch (Exception ex)
            {
                returnMsg.code = 2;
                returnMsg.error = "没有获取到token";
                returnMsg.count = 0;
            }
            return new JsonResult(returnMsg);
        }
    }
}