123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527 |
- using DapperORMCore.Context.DataContext;
- using DapperORMCore.Dapper.BaseModel;
- using DapperORMCore.Model.CoreModel;
- using DapperORMCore.Repository.IRepositorys;
- using Microsoft.Extensions.Configuration;
- using NXWMS.DataAccess.Entity;
- using NXWMS.IService.NXPDA.InStock;
- using NXWMS.IService.NXWMS.Instock;
- using NXWMS.Model.AppModels.Condition.Balance;
- using NXWMS.Model.AppModels.Condition.Base;
- using NXWMS.Model.AppModels.Condition.NXPDA.InStock;
- using NXWMS.Model.AppModels.Result.Balance;
- using NXWMS.Model.AppModels.Result.Base;
- using NXWMS.Model.Common;
- using NXWMS.Service;
- using NXWMS.String.Enums;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using WestDistance.DapperORM.Repository.Repositorys;
- namespace NXWMS.Service.NXPDA.InStock
- {
- /// <summary>
- /// 库存操作接口
- /// </summary>
- [AutoInject(typeof(IInStockOperateService), InjectType.Scope)]
- public class InStockOperateService : ServiceBase, IInStockOperateService
- {
- /// <summary>
- /// 系统操作仓储中转
- /// </summary>
- private IDataRepositoryContext _dataContext;
- /// <summary>
- /// SQL节点仓储
- /// </summary>
- private ISQLNodeRepository _iSQLNodeRepository;
- private IWmsInReceiptService _inReceiptService;
- private IWmsInPutawayService _wmsInPutaway;
- /// <summary>
- /// 配置
- /// </summary>
- private IConfiguration _configuration;
- public InStockOperateService(IDataRepositoryContext dataRepositoryContext, IWmsInReceiptService inReceiptService, IWmsInPutawayService wmsInPutaway, IConfiguration configuration, ISQLNodeRepository iSQLNodeRepository)
- {
- this._dataContext = dataRepositoryContext;
- this._configuration = configuration;
- this._iSQLNodeRepository = iSQLNodeRepository;
- this._inReceiptService = inReceiptService;
- this._wmsInPutaway = wmsInPutaway;
- }
- public OperateResultInfo CommitReceiptDetail(CommitReceiptDetailCondition info)
- {
- if (string.IsNullOrWhiteSpace(info.MaterielBarCode))
- {
- return FailStatus("参数错误!");
- }
- try
- {
- _dataContext.BeginTran();
- var receiptDTLResult = new DataRepository<WMS_IN_RECEIPT_DTL>(_dataContext).Query("MATERIEL_BARCODE", info.MaterielBarCode.ToString()).FirstOrDefault();
- if (receiptDTLResult == null)
- {
- throw new Exception("物品条码不存在,请检查!");
- }
- var binResult = new DataRepository<BAS_BIN>(_dataContext).Query("BIN_CODE", info.BinCode.ToString()).FirstOrDefault();
- if (binResult == null)
- {
- throw new Exception("库位编码不存在,请检查!");
- }
- var userResult = new DataRepository<SYS_USER>(_dataContext).Query("USER_ID", info.OperationUserId.ToString()).FirstOrDefault();
- if (userResult == null)
- {
- throw new Exception("用户编码不存在,请检查!");
- }
- var materielResult = new DataRepository<BAS_MATERIEL>(_dataContext).Query("MATERIEL_CODE", receiptDTLResult.MATERIEL_CODE.ToString()).FirstOrDefault();
- if (materielResult == null)
- {
- throw new Exception("物料编码不存在,请检查!");
- }
- var now = DateTime.Now;
- receiptDTLResult.ARRIVAL_QTY = info.ActualQTY;
- receiptDTLResult.RECEIPT_DTL_STATUS = 55;
- receiptDTLResult.UPDATE_TIME = now;
- receiptDTLResult.UPDATE_BY = info.OperationUserId;
- new DataRepository<WMS_IN_RECEIPT_RECORD>(_dataContext).Update(receiptDTLResult, "RECEIPT_DTL_ID", "NEWID");
- var result = new DataRepository<WMS_IN_RECEIPT>(_dataContext).Query("RECEIPT_NO", info.ReceiptCode.ToString()).FirstOrDefault();
- if (result == null)
- {
- throw new Exception("收货单号不存在,请检查!");
- }
- result.RECEIPT_STATUS = 55;
- result.UPDATE_BY = info.OperationUserId;
- result.UPDATE_TIME = now;
- new DataRepository<WMS_IN_RECEIPT>(_dataContext).Update(result, "RECEIPT_ID", "NEWID");
- _dataContext.Commit();
- return SuccessStatus();
- }
- catch (Exception ex)
- {
- _dataContext.Rollback();
- return FailStatus("提交失败!" + ex.Message);
- }
- //var sql = $@"SELECT TrayCode=WMS_STK_TRAY.TRAY_CODE,PalletCode=WMS_STK_TRAY.PALLET_CODE,TraysType=WMS_STK_TRAY.TRAYS_TYPE,
- // TrayLoadedType = WMS_STK_TRAY.TRAY_LOADED_TYPE,TrayStatus=WMS_STK_TRAY.TRAY_STATUS,
- // MaterielCode=WMS_STK_TRAY_DTL.MATERIEL_CODE,QTY = WMS_STK_TRAY_DTL.QTY,TrayDtlStatus=WMS_STK_TRAY_DTL.TRAY_DTL_STATUS,
- // MaterielSpec=WMS_STK_TRAY_DTL_EXT.MATERIEL_SPEC,PackageCode=WMS_STK_TRAY_DTL_EXT.PACKAGE_CODE,UnitCode=WMS_STK_TRAY_DTL_EXT.UNIT_CODE,
- // BatchNo=WMS_STK_TRAY_DTL_EXT.BATCH_NO,SupplierCode=WMS_STK_TRAY_DTL_EXT.SUPPLIER_CODE,SupplierName=WMS_STK_TRAY_DTL_EXT.SUPPLIER_NAME,
- // ProductDate=WMS_STK_TRAY_DTL_EXT.PRODUCT_DATE,ExpDate=WMS_STK_TRAY_DTL_EXT.EXP_DATE,QualityStatus=WMS_STK_TRAY_DTL_EXT.QUALITY_STATUS,
- // ItemStatus=WMS_STK_TRAY_DTL_EXT.ITEM_STATUS,EctendTimeLen=WMS_STK_TRAY_DTL_EXT.ECTEND_TIME_LEN,
- // LockFlag=WMS_STK_TRAY_DTL_EXT.LOCK_FLAG,InspectionResult=WMS_STK_TRAY_DTL_EXT.INSPECTION_RESULT FROM WMS_STK_TRAY
- // JOIN WMS_STK_TRAY_DTL ON WMS_STK_TRAY.TRAY_ID=WMS_STK_TRAY_DTL.TRAY_ID
- // LEFT JOIN WMS_STK_TRAY_DTL_EXT ON WMS_STK_TRAY_DTL_EXT.TRAY_DTL_ID=WMS_STK_TRAY_DTL.TRAY_DTL_ID
- // WHERE WMS_STK_TRAY.TRAY_CODE='{receiptDTLResult.TrayCode}' ";
- //var receiptRecordResult = new WMS_IN_RECEIPT_RECORD
- //{
- // BIN_CODE = binResult.BIN_CODE,
- // BIN_NAME = binResult.BIN_NAME,
- // RECEIPT_ID = receiptDTLResult.RECEIPT_ID,
- // EXP_DATE= receiptDTLResult.EXP_DATE,
- // MATERIEL_CODE= receiptDTLResult.MATERIEL_CODE,
- // PACKAGE_CODE= receiptDTLResult.PACKAGE_CODE,
- // PALLET_CODE= receiptDTLResult.PACKAGE_CODE,
- // PRODUCT_DATE= receiptDTLResult.PRODUCT_DATE,
- // RECEIPT_DTL_ID= receiptDTLResult.RECEIPT_DTL_ID,
- // RECEIPT_RECORD_STATUS = 0,
- // REGION_CODE= binResult.REGION_CODE,
- // RECEIPTER= userResult.USER_NAME,
- // //TRAY_CODE
- //};
- }
- public OperateResultInfo SaveReceipt(SaveReceiptDetailCondition info)
- {
- var stkTrayResult = new WmsStkTrayResult();
- stkTrayResult.CREATE_BY = info.OperationUserId;
- stkTrayResult.PALLET_CODE = info.PallteCode;
- stkTrayResult.TRAYS_TYPE = 3;
- stkTrayResult.TRAY_LOADED_TYPE = 1;
- stkTrayResult.TRAY_STATUS = 0;
- stkTrayResult.UPDATE_BY = info.OperationUserId;
- stkTrayResult.WmsStkTrayDtlList = new List<WmsStkTrayDtlResult>();
- foreach (var item in info.details)
- {
- var strSQL = $@"SELECT * FROM [dbo].[WMS_IN_RECEIPT_DTL] as a left join [dbo].[WMS_IN_RECEIPT] as b on a.RECEIPT_ID=b.RECEIPT_ID where a.RECEIPT_DTL_ID='{item.ReceiptDtlId}' and a.MATERIEL_CODE='{item.MaterielCode}'";
- var inReceiptDtl = new DataRepository<WMS_IN_RECEIPT_DTL>(_dataContext).Query(strSQL).FirstOrDefault();
- stkTrayResult.WmsStkTrayDtlList.Add(new WmsStkTrayDtlResult()
- {
- CREATE_BY = info.OperationUserId,
- UPDATE_BY = info.OperationUserId,
- DATA_VERSION = 0,
- MATERIEL_BARCODE = item.Barcode,
- MATERIEL_CODE=item.MaterielCode,
- MATERIEL_ID = item.MaterieId,
- QTY = item.Qty,
- WmsInReceiptRecord = new Model.AppModels.Result.Instock.WmsInReceiptRecordResult()
- {
- PALLET_CODE = info.PallteCode,
- RECEIPT_NO = item.ReceiptNo,
- RECEIPT_TIME = DateTime.Now,
- MATERIEL_CODE=item.MaterielCode,
- PRODUCT_DATE = inReceiptDtl.PRODUCT_DATE.Value,
- EXP_DATE = inReceiptDtl.EXP_DATE.Value,
- RECEIPT_DTL_ID = inReceiptDtl.RECEIPT_DTL_ID,
- RECEIPT_ID = inReceiptDtl.RECEIPT_ID,
- RECEIPT_QTY=item.Qty
- },
- WmsStkTrayDtlExtMd = new WmsStkTrayDtlExtResult()
- {
- PRODUCT_DATE = inReceiptDtl.PRODUCT_DATE.Value,
-
- EXP_DATE = inReceiptDtl.EXP_DATE.Value,
- UNIT_CODE = inReceiptDtl.UNIT_CODE,
- SUPPLIER_CODE = inReceiptDtl.SUPPLIER_CODE,
- SUPPLIER_NAME = inReceiptDtl.SUPPLIER_NAME,
- }
- }); ;
- //var now = DateTime.Now;
- //var ids = info.MaterielBarCodes.Split(',');
- //var affterCount = 0;
- //foreach (var item in ids)
- //{
- // var resultTemp = new DataRepository<WMS_IN_RECEIPT_DTL>(_dataContext).Query("MATERIEL_BARCODE", item.ToString()).FirstOrDefault();
- // if (resultTemp == null)
- // {
- // throw new Exception("收货明细单状态出现变更,当前操作失效 " + item.ToString());
- // }
- // resultTemp.RECEIPT_DTL_STATUS = 99;
- // resultTemp.UPDATE_BY = info.OperationUserId;
- // resultTemp.UPDATE_TIME = now;
- // affterCount = affterCount + new DataRepository<WMS_IN_RECEIPT_DTL>(_dataContext).Update(resultTemp, "RECEIPT_DTL_ID", "NEWID");
- //}
- //if (affterCount != ids.Length)
- //{
- // _dataContext.Rollback();
- // return FailMessageStatus("数据操作失败!");
- //}
- //_dataContext.Commit();
- //if (!new DataRepository<WMS_IN_RECEIPT_DTL>(_dataContext).Query("RECEIPT_ID", result.RECEIPT_ID.ToString()).
- // Where(s => s.RECEIPT_DTL_STATUS != 99).Any())
- //{
- // result.RECEIPT_STATUS = 99;
- // result.UPDATE_BY = info.OperationUserId;
- // result.UPDATE_TIME = now;
- // new DataRepository<WMS_IN_RECEIPT>(_dataContext).Update(result, "RECEIPT_ID", "NEWID");
- //}
- //return SuccessStatus();
- }
- return _inReceiptService.AddWmsInReceiptTrayData(stkTrayResult);
- }
- public OperateResultInfo CommitPutAwayDetail(CommitPutAwayDetailCondition info)
- {
- if (string.IsNullOrWhiteSpace(info.MaterielBarCode))
- {
- return FailMessageStatus("参数错误!");
- }
- try
- {
- _dataContext.BeginTran();
- var receiptDTLResult = new DataRepository<WMS_IN_PUTAWAY_DTL>(_dataContext).Query("MATERIEL_BARCODE", info.MaterielBarCode.ToString()).FirstOrDefault();
- if (receiptDTLResult == null)
- {
- throw new Exception("物品条码不存在,请检查!");
- }
- var binResult = new DataRepository<BAS_BIN>(_dataContext).Query("BIN_CODE", info.BinCode.ToString()).FirstOrDefault();
- if (binResult == null)
- {
- throw new Exception("库位编码不存在,请检查!");
- }
- var userResult = new DataRepository<SYS_USER>(_dataContext).Query("USER_ID", info.OperationUserId.ToString()).FirstOrDefault();
- if (userResult == null)
- {
- throw new Exception("用户编码不存在,请检查!");
- }
- var materielResult = new DataRepository<BAS_MATERIEL>(_dataContext).Query("MATERIEL_CODE", receiptDTLResult.MATERIEL_CODE.ToString()).FirstOrDefault();
- if (materielResult == null)
- {
- throw new Exception("物料编码不存在,请检查!");
- }
- var now = DateTime.Now;
- receiptDTLResult.PUTAWAY_QTY = info.ActualQTY;
- receiptDTLResult.PUTAWAY_DTL_STATUS = 11;
- receiptDTLResult.UPDATE_TIME = now;
- receiptDTLResult.UPDATE_BY = info.OperationUserId;
- new DataRepository<WMS_IN_RECEIPT_RECORD>(_dataContext).Update(receiptDTLResult, "RECEIPT_DTL_ID", "NEWID");
- var result = new DataRepository<WMS_IN_PUTAWAY>(_dataContext).Query("RECEIPT_NO", info.PutAwayNo.ToString()).FirstOrDefault();
- if (result == null)
- {
- throw new Exception("收货单号不存在,请检查!");
- }
- result.PUTAWAY_STATUS = 55;
- result.UPDATE_BY = info.OperationUserId;
- result.UPDATE_TIME = now;
- new DataRepository<WMS_IN_PUTAWAY>(_dataContext).Update(result, "PUTAWAY_ID", "NEWID");
- _dataContext.Commit();
- return SuccessStatus();
- }
- catch (Exception ex)
- {
- _dataContext.Rollback();
- return FailMessageStatus("提交失败!" + ex.Message);
- }
- }
- public OperateResultInfo SavePutAway(SavePutAwayDetailCondition info)
- {
- return this._wmsInPutaway.ManualPutAwayPallet(new Model.AppModels.Result.Instock.WmsInPutAwayResult()
- {
- PalletCode = info.PalletCode,
- TrayCode = info.TrayCode,
- EbinCode = info.BinCode,
- PutawayType =1
- }, PutAwayMethodsEnum.PDA手动上架);
- //if (string.IsNullOrWhiteSpace(info.PutAwayNo))
- //{
- // return FailMessageStatus("参数错误!");
- //}
- //var result = new DataRepository<WMS_IN_PUTAWAY>(_dataContext).Query("PUTAWAY_NO", info.PutAwayNo.ToString()).FirstOrDefault();
- //if (result.PUTAWAY_STATUS >= 99)
- //{
- // return FailMessageStatus("单据状态已经变更,当前所有操作失效!");
- //}
- //try
- //{
- // _dataContext.BeginTran();
- // var now = DateTime.Now;
- // var ids = info.MaterielBarCodes.Split(',');
- // var affterCount = 0;
- // foreach (var item in ids)
- // {
- // var resultTemp = new DataRepository<WMS_IN_PUTAWAY_DTL>(_dataContext).Query("MATERIEL_BARCODE", item.ToString()).FirstOrDefault();
- // if (resultTemp == null)
- // {
- // throw new Exception("收货明细单状态出现变更,当前操作失效 " + item.ToString());
- // }
- // resultTemp.PUTAWAY_DTL_STATUS = 99;
- // resultTemp.UPDATE_BY = info.OperationUserId;
- // resultTemp.UPDATE_TIME = now;
- // affterCount = affterCount + new DataRepository<WMS_IN_PUTAWAY_DTL>(_dataContext).Update(resultTemp, "RECEIPT_DTL_ID", "NEWID");
- // }
- // if (affterCount != ids.Length)
- // {
- // _dataContext.Rollback();
- // return FailMessageStatus("数据操作失败!");
- // }
- // _dataContext.Commit();
- // if (!new DataRepository<WMS_IN_PUTAWAY_DTL>(_dataContext).Query("RECEIPT_ID", result.PUTAWAY_ID.ToString()).
- // Where(s => s.PUTAWAY_DTL_STATUS != 99).Any())
- // {
- // result.PUTAWAY_STATUS = 99;
- // result.UPDATE_BY = info.OperationUserId;
- // result.UPDATE_TIME = now;
- // new DataRepository<WMS_IN_RECEIPT>(_dataContext).Update(result, "RECEIPT_ID", "NEWID");
- // }
- // return SuccessStatus();
- //}
- //catch (Exception ex)
- //{
- // _dataContext.Rollback();
- // return FailMessageStatus("提交失败!" + ex.Message);
- //}
- }
- public OperateResultInfo CommitInspectionDetail(CommitInspectionDetailCondition info)
- {
- if (string.IsNullOrWhiteSpace(info.MaterielBarCode))
- {
- return FailMessageStatus("参数错误!");
- }
- try
- {
- _dataContext.BeginTran();
- var result = new DataRepository<WMS_QA_INSPECTION_DTL>(_dataContext).Query("MATERIEL_BARCODE", info.MaterielBarCode.ToString()).FirstOrDefault();
- if (result == null)
- {
- throw new Exception("物品条码不存在,请检查!");
- }
- var binResult = new DataRepository<BAS_BIN>(_dataContext).Query("BIN_CODE", info.BinCode.ToString()).FirstOrDefault();
- if (binResult == null)
- {
- throw new Exception("库位编码不存在,请检查!");
- }
- var userResult = new DataRepository<SYS_USER>(_dataContext).Query("USER_ID", info.OperationUserId.ToString()).FirstOrDefault();
- if (userResult == null)
- {
- throw new Exception("用户编码不存在,请检查!");
- }
- var materielResult = new DataRepository<BAS_MATERIEL>(_dataContext).Query("MATERIEL_CODE", result.MATERIEL_CODE.ToString()).FirstOrDefault();
- if (materielResult == null)
- {
- throw new Exception("物料编码不存在,请检查!");
- }
- var now = DateTime.Now;
- result.INSPECTION_DTL_STATUS = 55;
- result.UPDATE_TIME = now;
- result.UPDATE_BY = info.OperationUserId;
- new DataRepository<WMS_QA_INSPECTION_DTL>(_dataContext).Update(result, "RECEIPT_DTL_ID", "NEWID");
- //确认托盘号
- var receiptResult = new DataRepository<WMS_IN_RECEIPT_RECORD>(_dataContext).
- Query("MATERIEL_BARCODE", info.MaterielBarCode.ToString()).FirstOrDefault();
- var inspectionResult = new DataRepository<WMS_QA_INSPECTION>(_dataContext).Query("RECEIPT_ID",
- receiptResult.RECEIPT_ID.ToString()).FirstOrDefault();
- if (inspectionResult == null)
- {
- throw new Exception("收货单号不存在,请检查!");
- }
- inspectionResult.INSPECTION_STATUS = 55;
- inspectionResult.UPDATE_BY = info.OperationUserId;
- inspectionResult.UPDATE_TIME = now;
- new DataRepository<WMS_QA_INSPECTION>(_dataContext).Update(result, "PUTAWAY_ID", "NEWID");
- _dataContext.Commit();
- return SuccessStatus();
- }
- catch (Exception ex)
- {
- _dataContext.Rollback();
- return FailStatus("提交失败!" + ex.Message);
- }
- }
- /// <summary>
- /// 保存检查结果
- /// </summary>
- /// <param name="info"></param>
- /// <returns></returns>
- public OperateResultInfo SaveInspection(SaveInspectionDetailCondition info)
- {
- try
- {
- var repository = new DataRepository<object>(_dataContext);
- _dataContext.BeginTran();
- string strSqlInspection = $@" update WMS_QA_INSPECTION set INVENTORY_STATUS=77 where INSPECTION_NO='{info.InspectionCode}'";
- repository.Execute(strSqlInspection);
- foreach (var item in info.Detail)
- {
- var strSqlInspectionDetail = $@"updtae WMS_QA_INSPECTION_DTL_ID set INSPECTION_RESULT={item.InspectionResult} ,INSPECTION_DTL_STATUS=77 where ";
- repository.Execute(strSqlInspectionDetail);
- var strSQLReceipt = $@"update WMS_IN_RECEIPT_DTL set INSPECTION_RESULT={item.InspectionResult} where RECEIPT_DTL_ID =(select BILL_DTL_ID from VW_WMS_QA_INSPECTION_DTL where INSPECTION_DTL_ID={item.InspectionDtlId})";
- repository.Execute(strSQLReceipt);
- }
- _dataContext.Commit();
- }
- catch (Exception ex)
- {
- _dataContext.Rollback();
- return FailStatus("提交失败!" + ex.Message);
- }
- finally
- {
- }
- //主表
- //if (string.IsNullOrWhiteSpace(info.PalletCode))
- //{
- // return FailMessageStatus("参数错误!");
- //}
- ////确认托盘号
- //var receiptResult = new DataRepository<WMS_IN_RECEIPT_RECORD>(_dataContext).
- // Query("PALLET_CODE", info.PalletCode.ToString()).
- // Where(s => s.RECEIPT_RECORD_STATUS == 0 && s.INSPECTION_RESULT == "Wait").
- // FirstOrDefault();
- //var inspectionResult = new DataRepository<WMS_QA_INSPECTION>(_dataContext).Query("RECEIPT_ID",
- // receiptResult.RECEIPT_ID.ToString()).FirstOrDefault();
- //if (inspectionResult.INSPECTION_STATUS >= 99)
- //{
- // return FailMessageStatus("单据状态已经变更,当前所有操作失效!");
- //}
- //try
- //{
- // _dataContext.BeginTran();
- // var now = DateTime.Now;
- // var ids = info.MaterielBarCodes.Split(',');
- // var affterCount = 0;
- // foreach (var item in ids)
- // {
- // var resultTemp = new DataRepository<WMS_QA_INSPECTION_DTL>(_dataContext).Query("MATERIEL_BARCODE", item.ToString()).FirstOrDefault();
- // if (resultTemp == null)
- // {
- // throw new Exception("收货明细单状态出现变更,当前操作失效 " + item.ToString());
- // }
- // resultTemp.INSPECTION_DTL_STATUS = 99;
- // resultTemp.UPDATE_BY = info.OperationUserId;
- // resultTemp.UPDATE_TIME = now;
- // affterCount = affterCount + new DataRepository<WMS_QA_INSPECTION_DTL>(_dataContext).Update(resultTemp, "RECEIPT_DTL_ID", "NEWID");
- // }
- // if (affterCount != ids.Length)
- // {
- // _dataContext.Rollback();
- // return FailMessageStatus("数据操作失败!");
- // }
- // _dataContext.Commit();
- // if (!new DataRepository<WMS_QA_INSPECTION_DTL>(_dataContext).Query("INSPECTION_ID", inspectionResult.INSPECTION_ID.ToString()).
- // Where(s => s.INSPECTION_DTL_STATUS != 99).Any())
- // {
- // inspectionResult.INSPECTION_STATUS = 99;
- // inspectionResult.UPDATE_BY = info.OperationUserId;
- // inspectionResult.UPDATE_TIME = now;
- // new DataRepository<WMS_QA_INSPECTION>(_dataContext).Update(inspectionResult, "INSPECTION_ID", "NEWID");
- // }
- // return SuccessStatus();
- //}
- //catch (Exception ex)
- //{
- // _dataContext.Rollback();
- // return FailStatus("提交失败!" + ex.Message);
- //}
- return SuccessStatus();
- }
- }
- }
|