Merge branch 'v1.0.1' of https://codeup.aliyun.com/62ce7bca487c500c27f70a79/OPS/WMS-Api into v1.0.1
This commit is contained in:
@@ -9,11 +9,6 @@ namespace WMS.Web.Core.Dto
|
||||
/// </summary>
|
||||
public class BoxDetailResponse
|
||||
{
|
||||
|
||||
///// <summary>
|
||||
///// 物料ID
|
||||
///// </summary>
|
||||
//public int MaterialId { get; set; }
|
||||
/// <summary>
|
||||
/// 物料名称
|
||||
/// </summary>
|
||||
|
||||
@@ -60,11 +60,6 @@ namespace WMS.Web.Core.Dto.ChangeBoxRecord
|
||||
this.Qty = qty;
|
||||
this.SerialNumbers.Add(serialNumber);
|
||||
}
|
||||
///// <summary>
|
||||
///// 物料ID
|
||||
///// </summary>
|
||||
//[Required(ErrorMessage = "物料不能为空")]
|
||||
//public int MaterialId { get; set; }
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
|
||||
@@ -33,10 +33,6 @@ namespace WMS.Web.Core.Dto.Erp.OutStock
|
||||
/// 对应金蝶单据明细id(销售出库同步金蝶下推使用)
|
||||
/// </summary>
|
||||
public int Erp_DetailId { get; set; } = 0;
|
||||
///// <summary>
|
||||
///// 物料Id
|
||||
/////</summary>
|
||||
//public int MaterialId { get; set; }
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
///</summary>
|
||||
|
||||
@@ -33,10 +33,6 @@ namespace WMS.Web.Core.Dto
|
||||
/// 序列号
|
||||
/// </summary>
|
||||
public string SerialNumber { get; set; }
|
||||
///// <summary>
|
||||
///// 物料ID
|
||||
///// </summary>
|
||||
//public int MaterialId { get; set; }
|
||||
/// <summary>
|
||||
/// 物料名称
|
||||
/// </summary>
|
||||
|
||||
@@ -41,11 +41,6 @@ namespace WMS.Web.Core.Dto.MoveBoxRecord
|
||||
/// </summary>
|
||||
public class SaveMoveBoxRecordDetailsRequest
|
||||
{
|
||||
///// <summary>
|
||||
///// 物料Id
|
||||
/////</summary>
|
||||
//[Required(ErrorMessage = "物料不能为空")]
|
||||
//public int MaterialId { get; set; }
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
|
||||
@@ -76,11 +76,6 @@ namespace WMS.Web.Core.Dto
|
||||
|
||||
}
|
||||
public class OpsBoxDetailsResponse {
|
||||
///// <summary>
|
||||
///// 物料ID
|
||||
///// </summary>
|
||||
//[JsonProperty("FMaterialId")]
|
||||
//public int MaterialId { get; set; }
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
|
||||
@@ -25,10 +25,6 @@ namespace WMS.Web.Core.Dto.OutStock
|
||||
}
|
||||
public class SaveOutStockDetailsRequest
|
||||
{
|
||||
///// <summary>
|
||||
///// 物料Id
|
||||
/////</summary>
|
||||
//public int MaterialId { get; set; }
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
|
||||
@@ -33,10 +33,6 @@ namespace WMS.Web.Core.Dto.OutStockTask
|
||||
|
||||
public class GetOutStockTaskByNoDetailsResponse
|
||||
{
|
||||
///// <summary>
|
||||
///// 物料Id
|
||||
/////</summary>
|
||||
//public int MaterialId { get; set; }
|
||||
/// <summary>
|
||||
/// 物料名称
|
||||
/// </summary>
|
||||
|
||||
@@ -15,11 +15,6 @@ namespace WMS.Web.Core.Dto.TakeStock
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "箱不能为空")]
|
||||
public int BoxId { get; set; }
|
||||
///// <summary>
|
||||
///// 物料ID
|
||||
///// </summary>
|
||||
//[Required(ErrorMessage = "物料不能为空")]
|
||||
//public int MaterialId { get; set; }
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
|
||||
@@ -23,10 +23,6 @@ namespace WMS.Web.Domain.Entitys
|
||||
/// 单据头ID
|
||||
/// </summary>
|
||||
public int Fid { get; set; }
|
||||
///// <summary>
|
||||
///// 物料ID
|
||||
///// </summary>
|
||||
//public int MaterialId { get; set; }
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
|
||||
@@ -24,11 +24,6 @@ namespace WMS.Web.Domain.Entitys
|
||||
/// </summary>
|
||||
[Column("BillNo")]
|
||||
public string BillNo { get; set; }
|
||||
///// <summary>
|
||||
///// 物料ID
|
||||
///// </summary>
|
||||
//[Column("MaterialId")]
|
||||
//public int MaterialId { get; set; }
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
|
||||
@@ -24,11 +24,6 @@ namespace WMS.Web.Domain.Entitys
|
||||
/// </summary>
|
||||
[Column("Fid")]
|
||||
public int Fid { get; set; }
|
||||
///// <summary>
|
||||
///// 物料Id
|
||||
/////</summary>
|
||||
//[Column("MaterialId")]
|
||||
//public int MaterialId { get; set; }
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
|
||||
@@ -25,11 +25,6 @@ namespace WMS.Web.Domain.Entitys
|
||||
/// </summary>
|
||||
[Column("Fid")]
|
||||
public int Fid { get; set; }
|
||||
///// <summary>
|
||||
///// 物料Id
|
||||
/////</summary>
|
||||
//[Column("MaterialId")]
|
||||
//public int MaterialId { get; set; }
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
|
||||
@@ -27,11 +27,6 @@ namespace WMS.Web.Domain.Entitys
|
||||
/// </summary>
|
||||
[Column("Fid")]
|
||||
public int Fid { get; set; }
|
||||
///// <summary>
|
||||
///// 物料Id
|
||||
/////</summary>
|
||||
//[Column("MaterialId")]
|
||||
//public int MaterialId { get; set; }
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
|
||||
@@ -41,10 +41,6 @@ namespace WMS.Web.Domain.Entitys
|
||||
/// 序列号操作类型
|
||||
/// </summary>
|
||||
public SerialNumberOperateType OperateType { get; set; } = SerialNumberOperateType.Generate;
|
||||
///// <summary>
|
||||
///// 物料ID
|
||||
///// </summary>
|
||||
//public int MaterialId { get; set; }
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
|
||||
@@ -37,11 +37,6 @@ namespace WMS.Web.Domain.Entitys
|
||||
/// </summary>
|
||||
[Column("SerialNumber")]
|
||||
public string SerialNumber { get; set; }
|
||||
///// <summary>
|
||||
///// 物料ID
|
||||
///// </summary>
|
||||
//[Column("MaterialId")]
|
||||
//public int MaterialId { get; set; }
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
|
||||
@@ -30,11 +30,6 @@ namespace WMS.Web.Domain.Entitys
|
||||
/// </summary>
|
||||
[Column("BoxId")]
|
||||
public int BoxId { get; set; }
|
||||
///// <summary>
|
||||
///// 物料ID
|
||||
///// </summary>
|
||||
//[Column("MaterialId")]
|
||||
//public int MaterialId { get; set; }
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
|
||||
@@ -319,165 +319,6 @@ namespace WMS.Web.Domain.Services
|
||||
|
||||
return Result.ReSuccess();
|
||||
}
|
||||
#region 删除代码
|
||||
///// <summary>
|
||||
///// 出入库回退改箱
|
||||
///// </summary>
|
||||
///// <param name="backRecord"></param>
|
||||
///// <param name="loginInfo"></param>
|
||||
///// <param name="isTransaction"></param>
|
||||
///// <returns></returns>
|
||||
//public async Task<Result> ChangeBox_BackRecord(BackRecord backRecord, LoginInDto loginInfo, bool isTransaction = true)
|
||||
//{
|
||||
// if (backRecord.Method == InventoryInOutMethod.Box) return Result.ReSuccess();
|
||||
// List<SaveChangeBoxRecordRequest> dtoList = new List<SaveChangeBoxRecordRequest>();
|
||||
// var boxIds = backRecord.Details.Select(s => s.BoxId).Distinct().ToList();
|
||||
// var boxs = await _boxRepositories.GetEntityList(boxIds);
|
||||
// foreach (var d in backRecord.Details)
|
||||
// {
|
||||
// var box = boxs.FirstOrDefault(f => f.Id == d.BoxId);
|
||||
// if (box == null) continue;
|
||||
// if (backRecord.Type == BackRecordType.InstockOff)
|
||||
// box.BackRecordDown(d.MaterialId, d.Qty);
|
||||
// else
|
||||
// box.BackRecordUp(d.MaterialId, d.Qty);
|
||||
// }
|
||||
// IDbContextTransaction _transaction = null;
|
||||
// if (isTransaction)
|
||||
// _transaction = _basbicsRepositories.GetTransaction();
|
||||
// Result res_Rollback = Result.ReSuccess();
|
||||
// bool isSuccess = true;
|
||||
// if (res_Rollback.IsSuccess)
|
||||
// {
|
||||
// isSuccess = await _boxRepositories.EditEntityList(boxs, false);
|
||||
// if (!isSuccess) res_Rollback = Result.ReFailure(ResultCodes.DateWriteError);
|
||||
// }
|
||||
// //提交事务
|
||||
// if (isTransaction)
|
||||
// {
|
||||
// isSuccess = _basbicsRepositories.CommitTransaction(res_Rollback.IsSuccess ? false : true, _transaction);
|
||||
// if (!res_Rollback.IsSuccess) return res_Rollback;
|
||||
// if (!isSuccess)
|
||||
// return Result.ReFailure(ResultCodes.DateWriteError);
|
||||
// }
|
||||
// return Result.ReSuccess();
|
||||
//}
|
||||
///// <summary>
|
||||
///// 非采购入库
|
||||
///// </summary>
|
||||
///// <param name="inStock"></param>
|
||||
///// <param name="loginInfo"></param>
|
||||
///// <param name="isTransaction"></param>
|
||||
///// <returns></returns>
|
||||
//public async Task<Result> ChangeBox_InStock(InStock inStock, LoginInDto loginInfo, bool isTransaction = true)
|
||||
//{
|
||||
// List<SaveChangeBoxRecordRequest> dtoList = new List<SaveChangeBoxRecordRequest>();
|
||||
// //目标箱
|
||||
// var destIds = inStock.Details.GroupBy(g => g.BoxId);
|
||||
// var serialNumbers = inStock.Details.SelectMany(s => s.SerialNumbers).ToList();
|
||||
// var serialNumberList = await _serialNumbersRepositories.GetEntityList(serialNumbers);
|
||||
// foreach (var detail in inStock.Details)
|
||||
// {
|
||||
// if (detail.Qty == 0) continue;
|
||||
// var detailClone = detail.Clone();
|
||||
// //处理序列号
|
||||
// var sList = serialNumberList.Where(w => detailClone.SerialNumbers.Contains(w.SerialNumber)).ToList();
|
||||
// foreach (var s in sList)
|
||||
// {
|
||||
// //原箱和目标箱一样不处理
|
||||
// if (s.BoxId == detailClone.BoxId)
|
||||
// {
|
||||
// detailClone.Qty = detailClone.Qty - 1;
|
||||
// detailClone.SerialNumbers.Remove(s.SerialNumber);
|
||||
// continue;
|
||||
// }
|
||||
|
||||
// var d = dtoList.FirstOrDefault(f => f.DestBoxId == detailClone.BoxId && f.SrcBoxId == s.BoxId);
|
||||
// if (d == null)
|
||||
// {
|
||||
// d = new SaveChangeBoxRecordRequest(s.BoxId, detailClone.BoxId);
|
||||
// d.Details.Add(new SaveChangeBoxRecordDetailsRequest(detailClone.MaterialId, 1, s.SerialNumber));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// var dtoDetail = d.Details.FirstOrDefault(f => f.MaterialId == detailClone.MaterialId);
|
||||
// if (dtoDetail == null)
|
||||
// d.Details.Add(new SaveChangeBoxRecordDetailsRequest(detailClone.MaterialId, 1, s.SerialNumber));
|
||||
// else
|
||||
// {
|
||||
// dtoDetail.Qty += 1;
|
||||
// dtoDetail.SerialNumbers.Add(s.SerialNumber);
|
||||
// }
|
||||
// }
|
||||
// detailClone.Qty = detailClone.Qty - 1;
|
||||
// detailClone.SerialNumbers.Remove(s.SerialNumber);
|
||||
// }
|
||||
|
||||
// //处理非序列号的数据
|
||||
// if (detailClone.Qty <= 0) continue;
|
||||
// var dto = dtoList.FirstOrDefault(f => f.DestBoxId == detailClone.BoxId && f.SrcBoxId == 0);
|
||||
// if (dto == null)
|
||||
// {
|
||||
// dto = new SaveChangeBoxRecordRequest(0, detailClone.BoxId);
|
||||
// dto.Details.Add(new SaveChangeBoxRecordDetailsRequest(detailClone.MaterialId, detailClone.Qty, detailClone.SerialNumbers));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// var dtoDetail = dto.Details.FirstOrDefault(f => f.MaterialId == detailClone.MaterialId);
|
||||
// if (dtoDetail == null)
|
||||
// dto.Details.Add(new SaveChangeBoxRecordDetailsRequest(detailClone.MaterialId, detailClone.Qty, detailClone.SerialNumbers));
|
||||
// else
|
||||
// {
|
||||
// dtoDetail.Qty += detailClone.Qty;
|
||||
// dtoDetail.SerialNumbers.AddRange(detailClone.SerialNumbers);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// return await ChangeBoxSave(dtoList, loginInfo, isTransaction, false);
|
||||
//}
|
||||
///// <summary>
|
||||
///// 出库
|
||||
///// </summary>
|
||||
///// <param name="outStock"></param>
|
||||
///// <param name="isTransaction"></param>
|
||||
///// <returns></returns>
|
||||
//public async Task<Result> ChangeBox_OutStock(OutStock outStock, bool isTransaction = true)
|
||||
//{
|
||||
// if (outStock.Method == InventoryInOutMethod.Box) return Result.ReSuccess();
|
||||
// List<SaveChangeBoxRecordRequest> dtoList = new List<SaveChangeBoxRecordRequest>();
|
||||
// var boxDetails = outStock.Details.SelectMany(s => s.BoxsDetails);
|
||||
// var boxIds = boxDetails.Select(s => s.BoxId).Distinct().ToList();
|
||||
// var boxs = await _boxRepositories.GetEntityList(boxIds);
|
||||
// foreach (var d in outStock.Details)
|
||||
// {
|
||||
// foreach (var db in d.BoxsDetails)
|
||||
// {
|
||||
// var box = boxs.FirstOrDefault(f => f.Id == db.BoxId);
|
||||
// if (box == null) continue;
|
||||
// box.OutStock(d.MaterialId, db.Qty);
|
||||
// }
|
||||
// }
|
||||
// IDbContextTransaction _transaction = null;
|
||||
// if (isTransaction)
|
||||
// _transaction = _basbicsRepositories.GetTransaction();
|
||||
// Result res_Rollback = Result.ReSuccess();
|
||||
// bool isSuccess = true;
|
||||
// if (res_Rollback.IsSuccess)
|
||||
// {
|
||||
// isSuccess = await _boxRepositories.EditEntityList(boxs, false);
|
||||
// if (!isSuccess) res_Rollback = Result.ReFailure(ResultCodes.DateWriteError);
|
||||
// }
|
||||
// //提交事务
|
||||
// if (isTransaction)
|
||||
// {
|
||||
// isSuccess = _basbicsRepositories.CommitTransaction(res_Rollback.IsSuccess ? false : true, _transaction);
|
||||
// if (!res_Rollback.IsSuccess) return res_Rollback;
|
||||
// if (!isSuccess)
|
||||
// return Result.ReFailure(ResultCodes.DateWriteError);
|
||||
// }
|
||||
// return Result.ReSuccess();
|
||||
//}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,7 +192,6 @@ namespace WMS.Web.Repositories
|
||||
var material = m.FirstOrDefault();
|
||||
if (material != null)
|
||||
{
|
||||
//response.MaterialId = material.MaterialId;
|
||||
response.MaterialName = _erpBasicDataExtendService.GetMaterialName(materials, material.MaterialNumber);
|
||||
response.MaterialNumber = material.MaterialNumber;
|
||||
response.Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, material.MaterialNumber);
|
||||
@@ -209,7 +208,6 @@ namespace WMS.Web.Repositories
|
||||
response.BoxBillNo = entity?.box?.BoxBillNo ?? "";
|
||||
response.SubStockCode = entity?.boxInventory?.SubStockCode ?? "";
|
||||
response.SerialNumber = entity.serial.SerialNumber;
|
||||
//response.MaterialId = 0;
|
||||
response.MaterialName = _erpBasicDataExtendService.GetMaterialName(materials, entity.serial.MaterialNumber);
|
||||
response.MaterialNumber = entity.serial.MaterialNumber;
|
||||
response.Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, entity.serial.MaterialNumber);
|
||||
|
||||
Reference in New Issue
Block a user