Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Property
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liudong1993
Property
Commits
7057f432
Commit
7057f432
authored
Jul 31, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
8a738039
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
24 deletions
+44
-24
SuppliesModule.cs
Property.Modele.FixedAssets/SuppliesModule.cs
+30
-23
RB_WarehouseOut_GoodsRepository.cs
Property.Repository/Mall/RB_WarehouseOut_GoodsRepository.cs
+1
-1
WarehouseOutController.cs
Property.WebApi/Controllers/Mall/WarehouseOutController.cs
+12
-0
SuppliesController.cs
Property.WebApi/Controllers/Property/SuppliesController.cs
+1
-0
No files found.
Property.Modele.FixedAssets/SuppliesModule.cs
View file @
7057f432
...
@@ -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
=
outOrIn
Id
,
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
=
d
emodel
.
CreateBy
,
CreateBy
=
inD
emodel
.
CreateBy
,
CreateDate
=
d
emodel
.
CreateDate
,
CreateDate
=
inD
emodel
.
CreateDate
,
Money
=
item
.
Money
,
Money
=
item
.
Money
,
Number
=
item
.
Number
,
Number
=
item
.
Number
,
RB_Branch_Id
=
d
emodel
.
RB_Branch_Id
,
RB_Branch_Id
=
inD
emodel
.
RB_Branch_Id
,
Id
=
0
,
Id
=
0
,
RB_Group_Id
=
d
emodel
.
RB_Group_Id
,
RB_Group_Id
=
inD
emodel
.
RB_Group_Id
,
Remark
=
item
.
Remark
,
Remark
=
item
.
Remark
,
Status
=
0
,
Status
=
0
,
StockInId
=
Id
,
StockInId
=
outOrIn
Id
,
SuppliesId
=
item
.
SuppliesId
,
SuppliesId
=
item
.
SuppliesId
,
UnitPrice
=
item
.
UnitPrice
,
UnitPrice
=
item
.
UnitPrice
,
UpdateBy
=
d
emodel
.
UpdateBy
,
UpdateBy
=
inD
emodel
.
UpdateBy
,
UpdateDate
=
d
emodel
.
UpdateDate
UpdateDate
=
inD
emodel
.
UpdateDate
},
trans
);
},
trans
);
//新增库存表数据
//新增库存表数据
var
ilist
=
supplies_InventoryRepository
.
GetList
(
new
RB_Supplies_Inventory_Extend
()
{
RB_Group_Id
=
demodel
.
RB_Group_Id
,
WarehouseId
=
d
emodel
.
WarehouseId
,
SuppliesId
=
item
.
SuppliesId
});
var
ilist
=
supplies_InventoryRepository
.
GetList
(
new
RB_Supplies_Inventory_Extend
()
{
RB_Group_Id
=
inDemodel
.
RB_Group_Id
,
WarehouseId
=
inD
emodel
.
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
=
d
emodel
.
CreateBy
,
CreateBy
=
inD
emodel
.
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
=
d
emodel
.
RB_Branch_Id
,
RB_Branch_Id
=
inD
emodel
.
RB_Branch_Id
,
RB_Group_Id
=
d
emodel
.
RB_Group_Id
,
RB_Group_Id
=
inD
emodel
.
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
=
d
emodel
.
CreateBy
,
CreateBy
=
inD
emodel
.
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
=
d
emodel
.
RB_Branch_Id
,
RB_Branch_Id
=
inD
emodel
.
RB_Branch_Id
,
RB_Group_Id
=
d
emodel
.
RB_Group_Id
,
RB_Group_Id
=
inD
emodel
.
RB_Group_Id
,
Status
=
0
,
Status
=
0
,
SuppliesId
=
item
.
SuppliesId
,
SuppliesId
=
item
.
SuppliesId
,
UpdateBy
=
d
emodel
.
UpdateBy
,
UpdateBy
=
inD
emodel
.
UpdateBy
,
UpdateDate
=
d
emodel
.
UpdateDate
,
UpdateDate
=
inD
emodel
.
UpdateDate
,
WarehouseId
=
d
emodel
.
WarehouseId
WarehouseId
=
inD
emodel
.
WarehouseId
},
trans
);
},
trans
);
if
(
iId
>
0
)
if
(
iId
>
0
)
{
{
//增加库存明细
//增加库存明细
supplies_InventoryDetailRepository
.
Insert
(
new
RB_Supplies_InventoryDetail
()
supplies_InventoryDetailRepository
.
Insert
(
new
RB_Supplies_InventoryDetail
()
{
{
CreateBy
=
d
emodel
.
CreateBy
,
CreateBy
=
inD
emodel
.
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
=
d
emodel
.
RB_Branch_Id
,
RB_Branch_Id
=
inD
emodel
.
RB_Branch_Id
,
RB_Group_Id
=
d
emodel
.
RB_Group_Id
,
RB_Group_Id
=
inD
emodel
.
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
(){
...
...
Property.Repository/Mall/RB_WarehouseOut_GoodsRepository.cs
View file @
7057f432
...
@@ -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
.
New
GoodsId
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
)
{
{
...
...
Property.WebApi/Controllers/Mall/WarehouseOutController.cs
View file @
7057f432
...
@@ -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
Property.WebApi/Controllers/Property/SuppliesController.cs
View file @
7057f432
...
@@ -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
(
"盘点未完成不能报损"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment