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
484b5d74
Commit
484b5d74
authored
Jul 09, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交出库
parent
3bbdec0b
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
197 additions
and
49 deletions
+197
-49
RB_WarehouseOut_Apply.cs
Property.Model/Entity/Mall/RB_WarehouseOut_Apply.cs
+2
-10
RB_WarehouseOut_Finance.cs
Property.Model/Entity/Mall/RB_WarehouseOut_Finance.cs
+1
-1
RB_WarehouseOut_Goods.cs
Property.Model/Entity/Mall/RB_WarehouseOut_Goods.cs
+1
-1
RB_WarehouseOut_GoodsDetail.cs
Property.Model/Entity/Mall/RB_WarehouseOut_GoodsDetail.cs
+141
-0
RB_WarehouseOut_Apply_Extend.cs
Property.Model/Extend/Mall/RB_WarehouseOut_Apply_Extend.cs
+13
-2
RB_WarehouseOut_Goods_Extend.cs
Property.Model/Extend/Mall/RB_WarehouseOut_Goods_Extend.cs
+1
-1
RB_WarehouseOut_ApplyRepository.cs
Property.Repository/Mall/RB_WarehouseOut_ApplyRepository.cs
+2
-8
RB_WarehouseOut_GoodsRepository.cs
Property.Repository/Mall/RB_WarehouseOut_GoodsRepository.cs
+0
-5
WarehouseOutController.cs
Property.WebApi/Controllers/Mall/WarehouseOutController.cs
+36
-21
No files found.
Property.Model/Entity/Mall/RB_WarehouseOut_Apply.cs
View file @
484b5d74
...
...
@@ -10,7 +10,7 @@ namespace Property.Model.Entity.Mall
/// 商品出库申请实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"
Default
Connection"
)]
[
DB
(
ConnectionName
=
"
Property
Connection"
)]
public
class
RB_WarehouseOut_Apply
{
...
...
@@ -62,15 +62,7 @@ namespace Property.Model.Entity.Mall
set
;
}
/// <summary>
/// 供应商id
/// </summary>
public
int
SupplierId
{
get
;
set
;
}
/// <summary>
/// 出库状态 0-未出库,1-部分出库,2-全部出库
...
...
Property.Model/Entity/Mall/RB_WarehouseOut_Finance.cs
View file @
484b5d74
...
...
@@ -10,7 +10,7 @@ namespace Property.Model.Entity.Mall
/// 商品出库申请财务实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"
Default
Connection"
)]
[
DB
(
ConnectionName
=
"
Property
Connection"
)]
public
class
RB_WarehouseOut_Finance
{
...
...
Property.Model/Entity/Mall/RB_WarehouseOut_Goods.cs
View file @
484b5d74
...
...
@@ -9,7 +9,7 @@ namespace Property.Model.Entity.Mall
/// 商品出库实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"
Default
Connection"
)]
[
DB
(
ConnectionName
=
"
Property
Connection"
)]
public
class
RB_WarehouseOut_Goods
{
...
...
Property.Model/Entity/Mall/RB_WarehouseOut_GoodsDetail.cs
0 → 100644
View file @
484b5d74
using
REBORN.Common.AOP
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Property.Model.Entity.Mall
{
/// <summary>
/// 商品出库实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"PropertyConnection"
)]
public
class
RB_WarehouseOut_GoodsDetail
{
/// <summary>
/// 物料id
/// </summary>
public
int
MaterialId
{
get
;
set
;
}
/// <summary>
/// 出库id
/// </summary>
public
int
StockOutId
{
get
;
set
;
}
/// <summary>
/// 仓库id
/// </summary>
public
int
WarehouseId
{
get
;
set
;
}
/// <summary>
/// 申请id
/// </summary>
public
int
ApplyId
{
get
;
set
;
}
/// <summary>
/// Id
/// </summary>
public
int
ID
{
get
;
set
;
}
/// <summary>
/// OrderId
/// </summary>
public
int
OrderId
{
get
;
set
;
}
/// <summary>
/// 商品id
/// </summary>
public
int
GoodsId
{
get
;
set
;
}
/// <summary>
/// 删除状态0-否,1-是
/// </summary>
public
int
Status
{
get
;
set
;
}
/// <summary>
/// 订单商品id
/// </summary>
public
int
OrderGoodsId
{
get
;
set
;
}
/// <summary>
/// 商品名称
/// </summary>
public
string
GoodsName
{
get
;
set
;
}
/// <summary>
/// 规格
/// </summary>
public
string
Specification
{
get
;
set
;
}
/// <summary>
/// 规格key
/// </summary>
public
string
SpecificationSort
{
get
;
set
;
}
/// <summary>
/// 货号
/// </summary>
public
string
ProductCode
{
get
;
set
;
}
/// <summary>
/// 商户号
/// </summary>
public
int
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序id
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
/// <summary>
/// 成本价
/// </summary>
public
decimal
?
CostMoney
{
get
;
set
;
}
}
}
Property.Model/Extend/Mall/RB_WarehouseOut_Apply_Extend.cs
View file @
484b5d74
...
...
@@ -10,7 +10,7 @@ namespace Property.Model.Extend.Mall
/// 商品出库申请实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"
Default
Connection"
)]
[
DB
(
ConnectionName
=
"
Property
Connection"
)]
public
class
RB_WarehouseOut_Apply_Extend
:
RB_WarehouseOut_Apply
{
/// <summary>
...
...
@@ -19,10 +19,21 @@ namespace Property.Model.Extend.Mall
public
List
<
RB_WarehouseOut_Goods_Extend
>
WarehouseOutGoodsList
{
get
;
set
;
}
/// <summary>
/// 出库商品详情
/// </summary>
public
List
<
RB_WarehouseOut_GoodsDetail
>
WarehouseOutGoodsDetailList
{
get
;
set
;
}
/// <summary>
/// 财务信息
/// </summary>
public
List
<
RB_WarehouseOut_Finance
>
WarehouseOutFinanceList
{
get
;
set
;
}
/// <summary>
/// 财务信息
/// </summary>
public
List
<
RB_WarehouseOut_Finance
>
WarehouseOutFinance
{
get
;
set
;
}
public
RB_WarehouseOut_Finance
WarehouseOutFinanceModel
{
get
;
set
;
}
/// <summary>
/// 已出库
...
...
Property.Model/Extend/Mall/RB_WarehouseOut_Goods_Extend.cs
View file @
484b5d74
...
...
@@ -10,7 +10,7 @@ namespace Property.Model.Extend.Mall
/// 商品出库申请扩展实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"
Default
Connection"
)]
[
DB
(
ConnectionName
=
"
Property
Connection"
)]
public
class
RB_WarehouseOut_Goods_Extend
:
RB_WarehouseOut_Goods
{
/// <summary>
...
...
Property.Repository/Mall/RB_WarehouseOut_ApplyRepository.cs
View file @
484b5d74
...
...
@@ -58,10 +58,7 @@ LEFT JOIN (SELECT ApplyId,COUNT(*) as Delivered from rb_warehouseout_goods where
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_WarehouseOut_Apply_Extend
.
OutStatus
)}
=
{
query
.
OutStatus
}
"
);
}
if
(
query
.
SupplierId
>
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_WarehouseOut_Apply_Extend
.
SupplierId
)}
=
{
query
.
SupplierId
}
"
);
}
}
return
GetPage
<
RB_WarehouseOut_Apply_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
builder
.
ToString
()).
ToList
();
}
...
...
@@ -98,10 +95,7 @@ LEFT JOIN (SELECT ApplyId,COUNT(*) as Delivered from rb_warehouseout_goods where
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_WarehouseOut_Apply_Extend
.
ApplyStatus
)}
=
{
query
.
ApplyStatus
}
"
);
}
if
(
query
.
SupplierId
>
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_WarehouseOut_Apply_Extend
.
SupplierId
)}
=
{
query
.
SupplierId
}
"
);
}
}
return
Get
<
RB_WarehouseOut_Apply_Extend
>(
builder
.
ToString
()).
ToList
();
}
...
...
Property.Repository/Mall/RB_WarehouseOut_GoodsRepository.cs
View file @
484b5d74
...
...
@@ -196,11 +196,6 @@ LEFT JOIN rb_supplies_inventory as d on d.SuppliesId=c.Id where a.`Status`=0 an
builder
.
Append
(
$" AND b.
{
nameof
(
RB_WarehouseOut_Goods_Extend
.
MallBaseId
)}
=
{
query
.
MallBaseId
}
"
);
builder
.
Append
(
$" AND c.TenantId=
{
query
.
TenantId
}
"
);
}
if
(
query
.
SupplierId
>
0
)
{
builder
.
Append
(
$" AND b.
{
nameof
(
RB_WarehouseOut_Goods_Extend
.
SupplierId
)}
=
{
query
.
SupplierId
}
"
);
}
}
return
Get
<
RB_WarehouseOut_Goods_Extend
>(
builder
.
ToString
()).
ToList
();
}
...
...
Property.WebApi/Controllers/Mall/WarehouseOutController.cs
View file @
484b5d74
...
...
@@ -49,7 +49,8 @@ namespace Property.WebApi.Controllers.Mall
x
.
OutNo
,
x
.
Delivered
,
x
.
NotOutStock
,
x
.
CreateByName
,
x
.
OutStatus
,
CreateByName
=
CacheManager
.
User
.
UserReidsCache
.
GetUserLoginInfo
(
x
.
CreateBy
.
ToString
())?.
emName
,
CreateDateStr
=
x
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
});
return
ApiResult
.
Success
(
""
,
pagelist
);
...
...
@@ -102,6 +103,10 @@ namespace Property.WebApi.Controllers.Mall
{
return
ApiResult
.
Failed
(
"申请单审核,请勿重复审核"
);
}
if
(
demodel
.
ApplyStatus
==
3
&&
String
.
IsNullOrWhiteSpace
(
demodel
.
ExamineReason
))
{
return
ApiResult
.
Failed
(
"拒绝必须填写理由"
);
}
bool
result
=
warehouseOutModule
.
UpdateWarehouseOutApply
(
demodel
);
if
(
result
)
...
...
@@ -121,24 +126,6 @@ namespace Property.WebApi.Controllers.Mall
#
region
申请单出库
/// <summary>
/// 获取出库申请列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetOutGoods
()
{
var
parms
=
GetRequestParm
();
UserInfo
userInfo
=
CacheManager
.
User
.
UserReidsCache
.
GetUserLoginInfo
(
parms
.
uid
);
RB_WarehouseOut_Apply_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_WarehouseOut_Apply_Extend
>(
parms
.
msg
.
ToString
());
demodel
.
RB_Group_Id
=
userInfo
.
RB_Group_id
;
demodel
.
RB_Branch_Id
=
-
1
;
return
ApiResult
.
Success
(
""
);
}
/// <summary>
/// 根据仓库id和申请id获取申请单中的商品
/// </summary>
...
...
@@ -167,12 +154,40 @@ namespace Property.WebApi.Controllers.Mall
{
var
requestParm
=
GetRequestParm
();
UserInfo
userInfo
=
CacheManager
.
User
.
UserReidsCache
.
GetUserLoginInfo
(
requestParm
.
uid
);
RB_Supplies_StockOut_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Supplies_StockOut_Extend
>(
requestParm
.
msg
.
ToString
());
if
(
demodel
.
WarehouseId
<=
0
)
DateTime
NowStr
=
System
.
DateTime
.
Now
;
RB_WarehouseOut_Apply_Extend
applyModel
=
JsonConvert
.
DeserializeObject
<
RB_WarehouseOut_Apply_Extend
>(
requestParm
.
msg
.
ToString
());
if
(
applyModel
.
WarehouseId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请选择仓库"
);
}
RB_Supplies_StockOut_Extend
demodel
=
new
RB_Supplies_StockOut_Extend
();
//出库申请表,等会儿组装
if
(
applyModel
.
WarehouseOutGoodsDetailList
==
null
&&
!
applyModel
.
WarehouseOutGoodsDetailList
.
Any
())
{
return
ApiResult
.
ParamIsNull
(
"请选择您要出库的商品"
);
}
applyModel
.
WarehouseOutGoodsDetailList
.
ForEach
(
x
=>
x
.
ApplyId
=
applyModel
.
ID
);
//将申请赋值给出库商品详情表
applyModel
.
WarehouseOutGoodsDetailList
.
ForEach
(
x
=>
x
.
WarehouseId
=
applyModel
.
WarehouseId
);
//将申请赋值给出库商品详情表
applyModel
.
WarehouseOutFinanceModel
=
new
Model
.
Entity
.
Mall
.
RB_WarehouseOut_Finance
();
//财务id ,后面更新出库id与财务id
applyModel
.
WarehouseOutFinanceModel
.
ApplyId
=
applyModel
.
ID
;
applyModel
.
WarehouseOutFinanceModel
.
Status
=
0
;
applyModel
.
WarehouseOutFinanceModel
.
TenantId
=
applyModel
.
TenantId
;
applyModel
.
WarehouseOutFinanceModel
.
MallBaseId
=
applyModel
.
MallBaseId
;
applyModel
.
WarehouseOutFinanceModel
.
CreateDate
=
NowStr
;
applyModel
.
WarehouseOutFinanceModel
.
CreateBy
=
userInfo
.
EmployeeId
;
applyModel
.
WarehouseOutFinanceModel
.
RB_Branch_Id
=
applyModel
.
RB_Branch_Id
;
applyModel
.
WarehouseOutFinanceModel
.
RB_Group_Id
=
applyModel
.
RB_Group_Id
;
demodel
.
WarehouseId
=
applyModel
.
WarehouseId
;
demodel
.
EmployeeId
=
applyModel
.
CreateBy
;
demodel
.
CreateBy
=
userInfo
.
EmployeeId
;
demodel
.
StockOutDate
=
NowStr
;
if
(
demodel
.
DetailList
==
null
||
!
demodel
.
DetailList
.
Any
())
{
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