| | |
| | | private readonly IFiMemberService _fiMemberService; |
| | | private readonly IConfiguration _configuration; |
| | | private readonly IHttpClientFactory _clientFactory; |
| | | private readonly IAskService _askService; |
| | | |
| | | |
| | | public CooperOrderController(ILogger<CooperOrderController> logger, ILiaotianService liaotianService, IUserService userService, ICooperOrderService cooperOrderService |
| | | , ICooperatecustomCustomerService cooperatecustomCustomerService, IProjectService projectService, IPltPageService pltPageService, IFiBookService fiBookService |
| | | , IFiServiceService fiServiceService, IFiMemberService fiMemberService |
| | | , IConfiguration configuration |
| | | , IHttpClientFactory clientFactory) |
| | | , IHttpClientFactory clientFactory |
| | | , IAskService askService) |
| | | { |
| | | _logger = logger; |
| | | _liaotianService = liaotianService; |
| | |
| | | _fiMemberService = fiMemberService; |
| | | _configuration = configuration; |
| | | _clientFactory = clientFactory; |
| | | _askService = askService; |
| | | } |
| | | |
| | | [CheckLogin] |
| | |
| | | { |
| | | dto = _cooperOrderService.Get(id); |
| | | ViewBag.ShouliStatus = ShouliStatus; |
| | | //ViewBag.YouHuiList = _askService.GetAskYouHuiList(dto.Khdw, dto.OrderType); |
| | | } |
| | | else |
| | | { |
| | | dto.XdTime = DateTime.Now; |
| | | dto.OrderNum = 1; |
| | | ViewBag.ShouliStatus = "1"; |
| | | //ViewBag.YouHuiList = new List<AdmAskYouHuiDTO>(); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | |
| | | } |
| | | data.ShouliStatus = "1"; |
| | | data.Modifier = curentuser.Id; |
| | | data.Modifytime = DateTime.Now; |
| | | |
| | | resultEntity = _cooperOrderService.save(data); |
| | | var youHuiDTOs = _askService.GetAskYouHuiList(data.Khdw, data.OrderType).FirstOrDefault(); |
| | | if (youHuiDTOs != null) |
| | | { |
| | | data.Youhuier = youHuiDTOs.Id; |
| | | if(youHuiDTOs.Youhuistandard == "01") |
| | | { |
| | | data.Youhui = youHuiDTOs.YouHui.Value; |
| | | if(data.Money.Value < data.Youhui.Value) |
| | | { |
| | | data.Money = 0; |
| | | } |
| | | else |
| | | { |
| | | data.Money = data.Money.Value - data.Youhui.Value; |
| | | } |
| | | |
| | | } |
| | | else if (youHuiDTOs.Youhuistandard == "02") |
| | | { |
| | | if (youHuiDTOs.YouHui.Value >= 100) |
| | | { |
| | | data.Youhui = data.Money.Value; |
| | | data.Money = 0; |
| | | } |
| | | else |
| | | { |
| | | data.Youhui =Math.Round(data.Money.Value * youHuiDTOs.YouHui.Value * new decimal(0.01),2); |
| | | data.Money = data.Money.Value - data.Youhui.Value; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | data.ShouliStatus = "1"; |
| | | data.Modifier = curentuser.Id; |
| | | data.Modifytime = DateTime.Now; |
| | | |
| | | resultEntity = _cooperOrderService.save(data); |
| | | // scope.Complete(); |
| | | //} |
| | | |
| | | |
| | | |
| | | return new JsonResult(resultEntity); |
| | | } |
| | |
| | | result = JsonConvert.SerializeObject(shi); |
| | | } |
| | | |
| | | if (OrderType == "08" || OrderType == "10") |
| | | if (OrderType == "08" || OrderType == "10" || OrderType == "11") |
| | | { |
| | | |
| | | result = "[]"; |