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
af745662
Commit
af745662
authored
Aug 14, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
入库增加财务单据
parent
ba692afa
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
1 deletion
+54
-1
RB_Procurement_Extend.cs
Property.Model/Extend/Supplies/RB_Procurement_Extend.cs
+4
-0
RB_Supplies_StockIn_Extend.cs
Property.Model/Extend/Supplies/RB_Supplies_StockIn_Extend.cs
+4
-0
RB_ProcurementRepository.cs
Property.Repository/Supplies/RB_ProcurementRepository.cs
+40
-0
RB_Supplies_StockInRepository.cs
...erty.Repository/Supplies/RB_Supplies_StockInRepository.cs
+5
-1
SuppliesController.cs
Property.WebApi/Controllers/Property/SuppliesController.cs
+1
-0
No files found.
Property.Model/Extend/Supplies/RB_Procurement_Extend.cs
View file @
af745662
...
...
@@ -44,5 +44,9 @@ namespace Property.Model.Extend
/// 账户类型
/// </summary>
public
int
IsPublic
{
get
;
set
;
}
/// <summary>
/// 采购单ids
/// </summary>
public
string
ProcurementIds
{
get
;
set
;
}
}
}
\ No newline at end of file
Property.Model/Extend/Supplies/RB_Supplies_StockIn_Extend.cs
View file @
af745662
...
...
@@ -56,5 +56,9 @@ namespace Property.Model.Extend
/// 类型 1入库 2出库
/// </summary>
public
int
?
Type
{
get
;
set
;
}
/// <summary>
/// 财务单据id
/// </summary>
public
int
?
FinanceId
{
get
;
set
;
}
}
}
\ No newline at end of file
Property.Repository/Supplies/RB_ProcurementRepository.cs
View file @
af745662
...
...
@@ -61,5 +61,45 @@ GROUP BY p.Id order by p.Id desc";
return
GetPage
<
RB_Procurement_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Procurement_Extend
>
GetList
(
RB_Procurement_Extend
dmodel
)
{
string
where
=
" where 1=1 "
;
where
+=
string
.
Format
(
" AND p.{0}={1}"
,
nameof
(
RB_Procurement_Extend
.
Status
),
0
);
where
+=
$@" and p.RB_Group_Id=
{
dmodel
.
RB_Group_Id
}
"
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
" and p."
+
nameof
(
RB_Procurement_Extend
.
TenantId
)
+
"="
+
dmodel
.
TenantId
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
" and p."
+
nameof
(
RB_Procurement_Extend
.
MallBaseId
)
+
"="
+
dmodel
.
MallBaseId
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
StartTime
))
{
where
+=
" and p.CreateTime >='"
+
dmodel
.
StartTime
+
"'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
EndTime
))
{
where
+=
" and p.CreateTime <='"
+
dmodel
.
EndTime
+
" 23:59:59'"
;
}
if
(
dmodel
.
StockInStatus
>
0
)
{
where
+=
" and p."
+
nameof
(
RB_Procurement_Extend
.
StockInStatus
)
+
"="
+
dmodel
.
StockInStatus
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
ProcurementIds
))
{
where
+=
" and p."
+
nameof
(
RB_Procurement_Extend
.
Id
)
+
" in("
+
dmodel
.
ProcurementIds
+
")"
;
}
string
sql
=
$@" SELECT p.* FROM rb_procurement p
{
where
}
order by p.Id desc"
;
return
Get
<
RB_Procurement_Extend
>(
sql
).
ToList
();
}
}
}
Property.Repository/Supplies/RB_Supplies_StockInRepository.cs
View file @
af745662
...
...
@@ -53,11 +53,15 @@ namespace Property.Repository
if
(
dmodel
.
WarehouseId
>
0
)
{
where
+=
" and ss."
+
nameof
(
RB_Supplies_StockIn_Extend
.
WarehouseId
)
+
"="
+
dmodel
.
WarehouseId
;
}
if
(
dmodel
.
FinanceId
>
0
)
{
where
+=
" and p.FinanceId ="
+
dmodel
.
FinanceId
;
}
string
sql
=
$@" select distinct ss.*,sw.Name as WareHouseName from RB_Supplies_StockIn ss
string
sql
=
$@" select distinct ss.*,sw.Name as WareHouseName
,p.FinanceId
from RB_Supplies_StockIn ss
left join rb_supplies_warehouse sw on ss.WarehouseId=sw.Id
left join rb_supplies_stockindetail ssd on ss.Id=ssd.StockInId
left join rb_supplies_material sm on ssd.SuppliesId=sm.Id
left join RB_Procurement p on ss.ProcurementId=p.Id
{
where
}
order by ss.Id desc"
;
return
GetPage
<
RB_Supplies_StockIn_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
...
...
Property.WebApi/Controllers/Property/SuppliesController.cs
View file @
af745662
...
...
@@ -313,6 +313,7 @@ namespace Property.WebApi.Controllers.User
x
.
Remark
,
x
.
Money
,
x
.
SupplierName
,
x
.
FinanceId
,
DetailList
=
x
.
DetailList
.
Select
(
z
=>
new
{
z
.
Id
,
...
...
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