username@email.com
2021-10-09 f33ece65bdfd7b8354bd5046d4b9d2d600643b0f
zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs
@@ -30,6 +30,7 @@
        private readonly ICooperatecustomCustomerService _cooperatecustomCustomerService;
        private readonly IIntentionCustomerService _intentionCustomerService;
        private readonly IHrPositionService _hrPositionService;
        private readonly IAdmGoodsRecordService _admGoodsRecordService;
        public AdmAskController(ILogger<AdmAskController> logger, IAskService askService, IHrDeptService hrDeptService, IWfRunProcessService wfRunProcessService
            , IWfHistoryService wfHistoryService, IWfNeeddeelService wfNeeddeelService
@@ -39,7 +40,8 @@
            , IAdmBreakPrecedentService aAdmBreakPrecedentService
            , ICooperatecustomCustomerService cooperatecustomCustomerService
            , IIntentionCustomerService intentionCustomerService
            , IHrPositionService hrPositionService)
            , IHrPositionService hrPositionService
            , IAdmGoodsRecordService admGoodsRecordService)
        {
            _logger = logger;
            _hrDeptService = hrDeptService;
@@ -54,6 +56,7 @@
            _cooperatecustomCustomerService = cooperatecustomCustomerService;
            _intentionCustomerService = intentionCustomerService;
            _hrPositionService = hrPositionService;
            _admGoodsRecordService = admGoodsRecordService;
        }
        public IActionResult Askcost(string id = "")
@@ -277,6 +280,19 @@
                        resultEntity.Message = "物品剩余数量不足";
                        return new JsonResult(resultEntity);
                    }
                    AdmGoodsRecordDTO dto = new AdmGoodsRecordDTO();
                    dto.GoodsId = admGoodsManageDTO.Id;
                    dto.GoodsNum = admAskGoodDTO.Shuliang.Value;
                    dto.GoodsLeft = admGoodsManageDTO.GoodsLeft;
                    dto.RecordTypeId = "02";
                    dto.RecStatus = "A";
                    dto.Creater = curentuser.Id;
                    dto.Createtime = DateTime.Now;
                    dto.Modifier = curentuser.Id;
                    dto.Modifytime = DateTime.Now;
                    dto.OperationalMatters = admAskGoodDTO.Tittle;
                    resultEntity = _admGoodsRecordService.save(dto);
                }