Commit 7057f432 authored by 吴春's avatar 吴春

提交代码

parent 8a738039
...@@ -2656,7 +2656,7 @@ namespace Property.Module.FixedAssets ...@@ -2656,7 +2656,7 @@ namespace Property.Module.FixedAssets
{ {
CostTypeId = applyModel.CheckStatus == PropertyCheckStatusEnum.InventoryLosses ? 225 : 226, CostTypeId = applyModel.CheckStatus == PropertyCheckStatusEnum.InventoryLosses ? 225 : 226,
Number = x.ReportLossNum, Number = x.ReportLossNum,
OriginalMoney = (x.ReportLossPrice ?? 0) * (x.ReportLossNum ?? 0), OriginalMoney = (x.ReportLossPrice ?? 0) ,
UnitPrice = Math.Round((x.ReportLossPrice ?? 0) / (x.ReportLossNum ?? 1), 2, MidpointRounding.AwayFromZero), UnitPrice = Math.Round((x.ReportLossPrice ?? 0) / (x.ReportLossNum ?? 1), 2, MidpointRounding.AwayFromZero),
Remark = x.GoodsName + x.SpecificationName Remark = x.GoodsName + x.SpecificationName
}); });
...@@ -2724,6 +2724,12 @@ namespace Property.Module.FixedAssets ...@@ -2724,6 +2724,12 @@ namespace Property.Module.FixedAssets
applyModel.DetailList.ForEach(x => x.ReportLossRecordId = Id); applyModel.DetailList.ForEach(x => x.ReportLossRecordId = Id);
applyModel.DetailList.ForEach(x => x.CheckId = applyModel.CheckId); applyModel.DetailList.ForEach(x => x.CheckId = applyModel.CheckId);
applyModel.DetailList.ForEach(x => x.CheckStatus = applyModel.CheckStatus); applyModel.DetailList.ForEach(x => x.CheckStatus = applyModel.CheckStatus);
applyModel.DetailList.ForEach(x => x.Status = 0);
applyModel.DetailList.ForEach(x => x.CreateBy = applyModel.CreateBy);
applyModel.DetailList.ForEach(x => x.CreateDate = applyModel.CreateDate);
applyModel.DetailList.ForEach(x => x.RB_Branch_Id = applyModel.RB_Branch_Id);
applyModel.DetailList.ForEach(x => x.RB_Group_Id = applyModel.RB_Group_Id);
applyModel.DetailList.ForEach(x => x.Remark = applyModel.Remark);
//更新已出库的商品信息 //更新已出库的商品信息
foreach (var item in applyModel.DetailList)//更新盘点商品的盘点状态 foreach (var item in applyModel.DetailList)//更新盘点商品的盘点状态
{ {
...@@ -2800,7 +2806,7 @@ namespace Property.Module.FixedAssets ...@@ -2800,7 +2806,7 @@ namespace Property.Module.FixedAssets
RB_Group_Id = demodel.RB_Group_Id, RB_Group_Id = demodel.RB_Group_Id,
Remark = item.Remark, Remark = item.Remark,
Status = 0, Status = 0,
StockOutId = Id, StockOutId = outOrInId,
SuppliesId = item.SuppliesId, SuppliesId = item.SuppliesId,
UpdateBy = demodel.UpdateBy, UpdateBy = demodel.UpdateBy,
UpdateDate = demodel.UpdateDate UpdateDate = demodel.UpdateDate
...@@ -2877,24 +2883,24 @@ namespace Property.Module.FixedAssets ...@@ -2877,24 +2883,24 @@ namespace Property.Module.FixedAssets
{ {
supplies_StockInDetailRepository.Insert(new RB_Supplies_StockInDetail() supplies_StockInDetailRepository.Insert(new RB_Supplies_StockInDetail()
{ {
CreateBy = demodel.CreateBy, CreateBy = inDemodel.CreateBy,
CreateDate = demodel.CreateDate, CreateDate = inDemodel.CreateDate,
Money = item.Money, Money = item.Money,
Number = item.Number, Number = item.Number,
RB_Branch_Id = demodel.RB_Branch_Id, RB_Branch_Id = inDemodel.RB_Branch_Id,
Id = 0, Id = 0,
RB_Group_Id = demodel.RB_Group_Id, RB_Group_Id = inDemodel.RB_Group_Id,
Remark = item.Remark, Remark = item.Remark,
Status = 0, Status = 0,
StockInId = Id, StockInId = outOrInId,
SuppliesId = item.SuppliesId, SuppliesId = item.SuppliesId,
UnitPrice = item.UnitPrice, UnitPrice = item.UnitPrice,
UpdateBy = demodel.UpdateBy, UpdateBy = inDemodel.UpdateBy,
UpdateDate = demodel.UpdateDate UpdateDate = inDemodel.UpdateDate
}, trans); }, trans);
//新增库存表数据 //新增库存表数据
var ilist = supplies_InventoryRepository.GetList(new RB_Supplies_Inventory_Extend() { RB_Group_Id = demodel.RB_Group_Id, WarehouseId = demodel.WarehouseId, SuppliesId = item.SuppliesId }); var ilist = supplies_InventoryRepository.GetList(new RB_Supplies_Inventory_Extend() { RB_Group_Id = inDemodel.RB_Group_Id, WarehouseId = inDemodel.WarehouseId, SuppliesId = item.SuppliesId });
if (ilist.Any()) if (ilist.Any())
{ {
var iModel = ilist.FirstOrDefault(); var iModel = ilist.FirstOrDefault();
...@@ -2906,13 +2912,13 @@ namespace Property.Module.FixedAssets ...@@ -2906,13 +2912,13 @@ namespace Property.Module.FixedAssets
//增加库存明细 //增加库存明细
supplies_InventoryDetailRepository.Insert(new RB_Supplies_InventoryDetail() supplies_InventoryDetailRepository.Insert(new RB_Supplies_InventoryDetail()
{ {
CreateBy = demodel.CreateBy, CreateBy = inDemodel.CreateBy,
CreateDate = DateTime.Now, CreateDate = DateTime.Now,
InventoryId = iModel.Id, InventoryId = iModel.Id,
Number = item.Number, Number = item.Number,
Money = item.Money, Money = item.Money,
RB_Branch_Id = demodel.RB_Branch_Id, RB_Branch_Id = inDemodel.RB_Branch_Id,
RB_Group_Id = demodel.RB_Group_Id, RB_Group_Id = inDemodel.RB_Group_Id,
Status = 0, Status = 0,
Type = 1, Type = 1,
Id = 0, Id = 0,
...@@ -2925,31 +2931,31 @@ namespace Property.Module.FixedAssets ...@@ -2925,31 +2931,31 @@ namespace Property.Module.FixedAssets
//新增库存表 //新增库存表
int iId = supplies_InventoryRepository.Insert(new RB_Supplies_Inventory() int iId = supplies_InventoryRepository.Insert(new RB_Supplies_Inventory()
{ {
CreateBy = demodel.CreateBy, CreateBy = inDemodel.CreateBy,
CreateDate = DateTime.Now, CreateDate = DateTime.Now,
Id = 0, Id = 0,
Number = item.Number, Number = item.Number,
Money = item.Money, Money = item.Money,
RB_Branch_Id = demodel.RB_Branch_Id, RB_Branch_Id = inDemodel.RB_Branch_Id,
RB_Group_Id = demodel.RB_Group_Id, RB_Group_Id = inDemodel.RB_Group_Id,
Status = 0, Status = 0,
SuppliesId = item.SuppliesId, SuppliesId = item.SuppliesId,
UpdateBy = demodel.UpdateBy, UpdateBy = inDemodel.UpdateBy,
UpdateDate = demodel.UpdateDate, UpdateDate = inDemodel.UpdateDate,
WarehouseId = demodel.WarehouseId WarehouseId = inDemodel.WarehouseId
}, trans); }, trans);
if (iId > 0) if (iId > 0)
{ {
//增加库存明细 //增加库存明细
supplies_InventoryDetailRepository.Insert(new RB_Supplies_InventoryDetail() supplies_InventoryDetailRepository.Insert(new RB_Supplies_InventoryDetail()
{ {
CreateBy = demodel.CreateBy, CreateBy = inDemodel.CreateBy,
CreateDate = DateTime.Now, CreateDate = DateTime.Now,
InventoryId = iId, InventoryId = iId,
Number = item.Number, Number = item.Number,
Money = item.Money, Money = item.Money,
RB_Branch_Id = demodel.RB_Branch_Id, RB_Branch_Id = inDemodel.RB_Branch_Id,
RB_Group_Id = demodel.RB_Group_Id, RB_Group_Id = inDemodel.RB_Group_Id,
Status = 0, Status = 0,
Type = 1, Type = 1,
Id = 0, Id = 0,
...@@ -2963,7 +2969,8 @@ namespace Property.Module.FixedAssets ...@@ -2963,7 +2969,8 @@ namespace Property.Module.FixedAssets
//更新申请单的出库状态 //更新申请单的出库状态
Dictionary<string, object> filesApply = new Dictionary<string, object>() { Dictionary<string, object> filesApply = new Dictionary<string, object>() {
{ nameof(RB_Supplies_ReportLossRecord.OutOrInId),outOrInId} { nameof(RB_Supplies_ReportLossRecord.OutOrInId),outOrInId},
{ nameof(RB_Supplies_ReportLossRecord.FinanceId),frid}
}; };
List<WhereHelper> wheresApply = new List<WhereHelper>() { List<WhereHelper> wheresApply = new List<WhereHelper>() {
new WhereHelper(){ new WhereHelper(){
......
...@@ -161,7 +161,7 @@ namespace Property.Repository.Mall ...@@ -161,7 +161,7 @@ namespace Property.Repository.Mall
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
builder.Append(@$"SELECT b.*,d.WarehouseId,d.Number as SuppliesNum,d.SuppliesId from rb_warehouseout_goods as b builder.Append(@$"SELECT b.*,d.WarehouseId,d.Number as SuppliesNum,d.SuppliesId from rb_warehouseout_goods as b
LEFT JOIN rb_warehouseout_apply as a on b.ApplyId=a.ID LEFT JOIN rb_warehouseout_apply as a on b.ApplyId=a.ID
LEFT JOIN rb_supplies_material as c on c.GoodsId=b.GoodsId and c.SpecificationKey=b.NewSpecificationSort LEFT JOIN rb_supplies_material as c on c.GoodsId=b.NewGoodsId and c.SpecificationKey=b.NewSpecificationSort
LEFT JOIN rb_supplies_inventory as d on d.SuppliesId=c.Id where a.`Status`=0 and b.`Status`=0 and c.`Status`=0 and d.`Status`=0 and b.IsOut=0 "); LEFT JOIN rb_supplies_inventory as d on d.SuppliesId=c.Id where a.`Status`=0 and b.`Status`=0 and c.`Status`=0 and d.`Status`=0 and b.IsOut=0 ");
if (query != null) if (query != null)
{ {
......
...@@ -12,6 +12,7 @@ using Property.Module.FixedAssets; ...@@ -12,6 +12,7 @@ using Property.Module.FixedAssets;
using Property.Module.Mall; using Property.Module.Mall;
using REBORN.Common; using REBORN.Common;
using REBORN.Common.API; using REBORN.Common.API;
using REBORN.Common.Enum;
using REBORN.Common.Plugin; using REBORN.Common.Plugin;
namespace Property.WebApi.Controllers.Mall namespace Property.WebApi.Controllers.Mall
...@@ -518,6 +519,17 @@ namespace Property.WebApi.Controllers.Mall ...@@ -518,6 +519,17 @@ namespace Property.WebApi.Controllers.Mall
#region 获取盘点中的仓库
public ApiResult GetSuppliesCheckList()
{
var requestParm = GetRequestParm();
UserInfo userInfo = CacheManager.User.UserReidsCache.GetUserLoginInfo(requestParm.uid);
//判断当前仓库是否在盘点中2020-07-28 Add By:W
var suppliesCheckList = suppliesModule.GetSuppliesCheckList(new RB_Supplies_Check_Extend { RB_Group_Id = userInfo.RB_Group_id, StartDate = System.DateTime.Now, EndDate = System.DateTime.Now, CheckState = SuppliesCheckStatusEnum.InTheInventory });
return ApiResult.Success("", suppliesCheckList);
}
#endregion
} }
} }
\ No newline at end of file
...@@ -2121,6 +2121,7 @@ namespace Property.WebApi.Controllers.User ...@@ -2121,6 +2121,7 @@ namespace Property.WebApi.Controllers.User
{ {
return ApiResult.ParamIsNull("盘点期数不存在"); return ApiResult.ParamIsNull("盘点期数不存在");
} }
applyModel.WarehouseId = suppliesCheckModel.WarehouseId;
if (suppliesCheckModel.CheckState != REBORN.Common.Enum.SuppliesCheckStatusEnum.Completed) if (suppliesCheckModel.CheckState != REBORN.Common.Enum.SuppliesCheckStatusEnum.Completed)
{ {
return ApiResult.ParamIsNull("盘点未完成不能报损"); return ApiResult.ParamIsNull("盘点未完成不能报损");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment