public void CommodityInventoryChangeTestMethod() { /* //创建商品库存变更记录 * var temp = CommodityInventoryChangeBll.GetInstance().CreateCommodityInventoryChange(new List<CommodityInventoryChange>() * { * new CommodityInventoryChange() * { * CommodityCodeId = "AQACQqweDg8BAAAAq09Zts9esxXkLwQA",//商品码【扫描】 * SourceBill = new SourceBill()//来源单据 * { * object_name = "ConsumingOrder", * object_id = "AQACQqweDg8BAAAAv0_s8_fnsxXXagQA" * }, * ChangeStatus = CommodityInventoryChangeStatus.已消耗.ToString() * } * }); * * LogUtils.Debug(temp); */ //根据商品码变更列表和来源单据创建库存变更记录资料 BaseData <CommodityCode> baseDataCommodityCode = GetBaseData(); //货物领用 SourceBill sourceBill = new SourceBill() { object_name = "ConsumingOrder", object_id = "" }; var changes = CommodityInventoryChangeBll.GetInstance().CreateCommodityInventoryChange(baseDataCommodityCode, sourceBill); LogUtils.Debug(changes); }
/// <summary> /// 结束操作,包括主动提交和长时间未操作界面被动提交 /// </summary> /// <param name="bExit">退出登陆还是回到首页</param> /// <param name="bAutoSubmit">是否是主动提交</param> private void EndOperation(bool bExit, bool bAutoSubmit = true) { if (isSuccess) { LoadingDataEvent(this, true); BasePostData <CommodityInventoryChange> bdCommodityInventoryChange = CommodityInventoryChangeBll.GetInstance().CreateCommodityInventoryChange(bdCommodityCode); LoadingDataEvent(this, false); //校验是否含有数据 HttpHelper.GetInstance().ResultCheck(bdCommodityInventoryChange, out bool isSuccess1); if (!isSuccess1 && bAutoSubmit) { MessageBox.Show("提交结果失败!" + bdCommodityInventoryChange.message, "温馨提示", MessageBoxButton.OK); } ConsumingBll.GetInstance().InsertLocalCommodityCodeInfo(bdCommodityCode, "ConsumingReturnOrder"); } ApplicationState.SetGoodsInfo(after); //主动提交,需要发送退出事件 if (bAutoSubmit) { EnterPopCloseEvent(this, bExit); } }
public void RollbackTestMethod() { //var name = "L00000010"; //var temp = RollbackBll.GetInstance().GetGoodsLocation(name); //LogUtils.Debug(temp); //var commodityCode = "C00000053"; //var temp2 = RollbackBll.GetInstance().GetCommodity(commodityCode); //LogUtils.Debug(temp2); var baseDetail = GetBaseData(); var change = CommodityInventoryChangeBll.GetInstance().CreateCommodityInventoryChange(baseDetail); LogUtils.Debug(change); }
/// <summary> /// 结束操作,包括主动提交和长时间未操作界面被动提交 /// </summary> /// <param name="bExit">退出登陆还是回到首页</param> /// <param name="bAutoSubmit">是否是主动提交</param> private void EndOperation(bool bExit, bool bAutoSubmit = true) { if (isSuccess) { if (commodityRecovery == null) { LoadingDataEvent(this, true); BasePostData <CommodityInventoryChange> bdCommodityInventoryChange = CommodityInventoryChangeBll.GetInstance().CreateCommodityInventoryChangeInStockChange(bdCommodityCode); LoadingDataEvent(this, false); if (bdCommodityInventoryChange.code != 0) { MessageBox.Show("创建库存调整商品变更明细失败!" + bdCommodityInventoryChange.message, "温馨提示", MessageBoxButton.OK); } ConsumingBll.GetInstance().InsertLocalCommodityCodeInfo(bdCommodityCode, "IntentoryAdjust"); } else { LoadingDataEvent(this, true); BasePostData <CommodityInventoryChange> bdCommodityInventoryChange = CommodityInventoryChangeBll.GetInstance().CreateCommodityInventoryChange(bdCommodityCode, commodityRecovery, bAutoSubmit); LoadingDataEvent(this, false); if (bdCommodityInventoryChange.code != 0) { MessageBox.Show("创建库存调整商品变更明细失败!" + bdCommodityInventoryChange.message, "温馨提示", MessageBoxButton.OK); } ConsumingBll.GetInstance().InsertLocalCommodityCodeInfo(bdCommodityCode, "CommodityRecovery"); } } ApplicationState.SetGoodsInfo(after); EnterPopCloseEvent(this, bExit); }