Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
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
黄奎
mall.oytour.com
Commits
4554fa9d
Commit
4554fa9d
authored
Jul 02, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
cfb7aaee
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
177 additions
and
39 deletions
+177
-39
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+86
-36
LiveHouseController.cs
Mall.WebApi/Controllers/AppletWeChat/LiveHouseController.cs
+89
-1
FinanceModule.cs
Mall.WindowsService/Module/FinanceModule.cs
+2
-2
No files found.
Mall.Module.Product/ProductModule.cs
View file @
4554fa9d
...
@@ -3229,11 +3229,13 @@ namespace Mall.Module.Product
...
@@ -3229,11 +3229,13 @@ namespace Mall.Module.Product
{
{
AllClist
.
Add
(
item
.
Id
);
AllClist
.
Add
(
item
.
Id
);
var
TwoList
=
clist
.
Where
(
x
=>
x
.
ParentId
==
item
.
Id
).
ToList
();
var
TwoList
=
clist
.
Where
(
x
=>
x
.
ParentId
==
item
.
Id
).
ToList
();
if
(
TwoList
.
Any
())
{
if
(
TwoList
.
Any
())
{
AllClist
.
AddRange
(
TwoList
.
Select
(
x
=>
x
.
Id
).
Distinct
().
ToList
());
AllClist
.
AddRange
(
TwoList
.
Select
(
x
=>
x
.
Id
).
Distinct
().
ToList
());
}
}
}
}
if
(
AllClist
.
Any
())
{
if
(
AllClist
.
Any
())
{
demodel
.
CategoryIds
=
string
.
Join
(
","
,
AllClist
);
demodel
.
CategoryIds
=
string
.
Join
(
","
,
AllClist
);
}
}
}
}
...
@@ -3298,7 +3300,8 @@ namespace Mall.Module.Product
...
@@ -3298,7 +3300,8 @@ namespace Mall.Module.Product
item
.
GoodsBuyNum
=
olist
.
Where
(
x
=>
x
.
GoodsId
==
item
.
Id
).
FirstOrDefault
()?.
OrderNum
??
0
;
item
.
GoodsBuyNum
=
olist
.
Where
(
x
=>
x
.
GoodsId
==
item
.
Id
).
FirstOrDefault
()?.
OrderNum
??
0
;
item
.
IsProcurement
=
2
;
item
.
IsProcurement
=
2
;
item
.
ProcurementGoodsId
=
0
;
item
.
ProcurementGoodsId
=
0
;
if
(
ProxyList
.
Where
(
x
=>
x
.
GoodsId
==
item
.
Id
).
Any
())
{
if
(
ProxyList
.
Where
(
x
=>
x
.
GoodsId
==
item
.
Id
).
Any
())
{
item
.
IsProcurement
=
1
;
item
.
IsProcurement
=
1
;
item
.
ProcurementGoodsId
=
ProxyList
.
Where
(
x
=>
x
.
GoodsId
==
item
.
Id
).
FirstOrDefault
()?.
GoodsId
??
0
;
item
.
ProcurementGoodsId
=
ProxyList
.
Where
(
x
=>
x
.
GoodsId
==
item
.
Id
).
FirstOrDefault
()?.
GoodsId
??
0
;
}
}
...
@@ -3411,7 +3414,8 @@ namespace Mall.Module.Product
...
@@ -3411,7 +3414,8 @@ namespace Mall.Module.Product
{
{
//bool IsSyncProxy = false;
//bool IsSyncProxy = false;
var
goodsModel
=
new
RB_Goods
();
var
goodsModel
=
new
RB_Goods
();
if
(
demodel
.
Id
>
0
)
{
if
(
demodel
.
Id
>
0
)
{
goodsModel
=
goodsRepository
.
GetEntity
(
demodel
.
Id
);
goodsModel
=
goodsRepository
.
GetEntity
(
demodel
.
Id
);
if
(
goodsModel
==
null
)
if
(
goodsModel
==
null
)
{
{
...
@@ -3429,9 +3433,11 @@ namespace Mall.Module.Product
...
@@ -3429,9 +3433,11 @@ namespace Mall.Module.Product
{
{
return
false
;
return
false
;
}
}
if
(
goodsModel
.
IsCustomSpecification
==
1
)
{
if
(
goodsModel
.
IsCustomSpecification
==
1
)
{
var
splist
=
goods_SpecificationPriceRepository
.
GetList
(
new
RB_Goods_SpecificationPrice_Extend
()
{
GoodsId
=
demodel
.
Id
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
var
splist
=
goods_SpecificationPriceRepository
.
GetList
(
new
RB_Goods_SpecificationPrice_Extend
()
{
GoodsId
=
demodel
.
Id
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
if
(
splist
.
Count
()
!=
demodel
.
SpecificationPriceList
.
Count
()
||
splist
.
Count
()
!=
demodel
.
SpecificationPriceList
.
Where
(
x
=>
splist
.
Select
(
y
=>
y
.
SpecificationSort
).
Contains
(
x
.
SpecificationSort
)).
Count
())
{
if
(
splist
.
Count
()
!=
demodel
.
SpecificationPriceList
.
Count
()
||
splist
.
Count
()
!=
demodel
.
SpecificationPriceList
.
Where
(
x
=>
splist
.
Select
(
y
=>
y
.
SpecificationSort
).
Contains
(
x
.
SpecificationSort
)).
Count
())
{
return
false
;
return
false
;
}
}
}
}
...
@@ -3491,7 +3497,8 @@ namespace Mall.Module.Product
...
@@ -3491,7 +3497,8 @@ namespace Mall.Module.Product
{
nameof
(
RB_Goods
.
ProxyRises
),
demodel
.
ProxyRises
},
{
nameof
(
RB_Goods
.
ProxyRises
),
demodel
.
ProxyRises
},
{
nameof
(
RB_Goods
.
ProxyMoney
),
demodel
.
ProxyMoney
},
{
nameof
(
RB_Goods
.
ProxyMoney
),
demodel
.
ProxyMoney
},
};
};
if
(
goodsModel
.
IsProcurement
==
1
)
{
if
(
goodsModel
.
IsProcurement
==
1
)
{
//采购商品可修改
//采购商品可修改
keyValues
=
new
Dictionary
<
string
,
object
>()
{
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Goods
.
Name
),
demodel
.
Name
},
{
nameof
(
RB_Goods
.
Name
),
demodel
.
Name
},
...
@@ -3754,7 +3761,8 @@ namespace Mall.Module.Product
...
@@ -3754,7 +3761,8 @@ namespace Mall.Module.Product
}
}
}
}
}
}
else
{
else
{
//只更新规格价格
//只更新规格价格
var
splist
=
goods_SpecificationPriceRepository
.
GetList
(
new
RB_Goods_SpecificationPrice_Extend
()
{
GoodsId
=
demodel
.
Id
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
var
splist
=
goods_SpecificationPriceRepository
.
GetList
(
new
RB_Goods_SpecificationPrice_Extend
()
{
GoodsId
=
demodel
.
Id
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
//价格新增/更新
//价格新增/更新
...
@@ -3994,13 +4002,15 @@ namespace Mall.Module.Product
...
@@ -3994,13 +4002,15 @@ namespace Mall.Module.Product
}
}
};
};
bool
flag2
=
goodsRepository
.
Update
(
keyValues2
,
wheres2
);
bool
flag2
=
goodsRepository
.
Update
(
keyValues2
,
wheres2
);
if
(
flag2
)
{
if
(
flag2
)
{
//检测规格更新
//检测规格更新
if
(
demodel
.
IsCustomSpecification
==
1
)
if
(
demodel
.
IsCustomSpecification
==
1
)
{
{
}
}
else
{
else
{
//删除规格
//删除规格
var
slist
=
goods_SpecificationRepository
.
GetList
(
new
RB_Goods_Specification_Extend
()
{
GoodsId
=
item
.
Id
,
TenantId
=
item
.
TenantId
,
MallBaseId
=
item
.
MallBaseId
});
var
slist
=
goods_SpecificationRepository
.
GetList
(
new
RB_Goods_Specification_Extend
()
{
GoodsId
=
item
.
Id
,
TenantId
=
item
.
TenantId
,
MallBaseId
=
item
.
MallBaseId
});
var
svlist
=
goods_SpecificationValueRepository
.
GetList
(
new
RB_Goods_SpecificationValue_Extend
()
{
GoodsId
=
item
.
Id
,
TenantId
=
item
.
TenantId
,
MallBaseId
=
item
.
MallBaseId
});
var
svlist
=
goods_SpecificationValueRepository
.
GetList
(
new
RB_Goods_SpecificationValue_Extend
()
{
GoodsId
=
item
.
Id
,
TenantId
=
item
.
TenantId
,
MallBaseId
=
item
.
MallBaseId
});
...
@@ -4745,7 +4755,15 @@ namespace Mall.Module.Product
...
@@ -4745,7 +4755,15 @@ namespace Mall.Module.Product
/// <summary>
/// 获取列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Goods_Extend
>
GetGoodsList
(
RB_Goods_Extend
dmodel
)
{
return
goodsRepository
.
GetList
(
dmodel
);
}
#
endregion
#
endregion
#
region
商品代理
#
region
商品代理
...
@@ -4761,26 +4779,33 @@ namespace Mall.Module.Product
...
@@ -4761,26 +4779,33 @@ namespace Mall.Module.Product
public
ApiResult
SetProductGoodsProxy
(
int
goodsId
,
List
<
int
>
categoryList
,
int
tenantId
,
int
mallBaseId
)
public
ApiResult
SetProductGoodsProxy
(
int
goodsId
,
List
<
int
>
categoryList
,
int
tenantId
,
int
mallBaseId
)
{
{
var
plist
=
goods_ProxyRepository
.
GetList
(
new
RB_Goods_Proxy_Extend
()
{
GoodsId
=
goodsId
,
ProxyMallBaseId
=
mallBaseId
,
ProxyTenantId
=
tenantId
});
var
plist
=
goods_ProxyRepository
.
GetList
(
new
RB_Goods_Proxy_Extend
()
{
GoodsId
=
goodsId
,
ProxyMallBaseId
=
mallBaseId
,
ProxyTenantId
=
tenantId
});
if
(
plist
.
Any
())
{
if
(
plist
.
Any
())
{
return
ApiResult
.
Failed
(
"该商品已存在采购"
);
return
ApiResult
.
Failed
(
"该商品已存在采购"
);
}
}
var
goodsModel
=
goodsRepository
.
GetEntity
(
goodsId
);
var
goodsModel
=
goodsRepository
.
GetEntity
(
goodsId
);
if
(
goodsModel
==
null
)
{
if
(
goodsModel
==
null
)
{
return
ApiResult
.
Failed
(
"采购商品不存在"
);
return
ApiResult
.
Failed
(
"采购商品不存在"
);
}
}
if
(
goodsModel
.
GoodsStatus
!=
1
)
{
if
(
goodsModel
.
GoodsStatus
!=
1
)
{
return
ApiResult
.
Failed
(
"该商品未上架,无法采购"
);
return
ApiResult
.
Failed
(
"该商品未上架,无法采购"
);
}
}
if
(
goodsModel
.
IsProxy
!=
1
)
{
if
(
goodsModel
.
IsProxy
!=
1
)
{
return
ApiResult
.
Failed
(
"采购商品不可代理"
);
return
ApiResult
.
Failed
(
"采购商品不可代理"
);
}
}
if
(
goodsModel
.
IsProcurement
==
1
)
{
if
(
goodsModel
.
IsProcurement
==
1
)
{
return
ApiResult
.
Failed
(
"采购商品不可代理"
);
return
ApiResult
.
Failed
(
"采购商品不可代理"
);
}
}
if
(
goodsModel
.
TenantId
==
tenantId
)
{
if
(
goodsModel
.
TenantId
==
tenantId
)
{
return
ApiResult
.
Failed
(
"不可采购同商户商品"
);
return
ApiResult
.
Failed
(
"不可采购同商户商品"
);
}
}
if
((
goodsModel
.
ProxyMoney
??
0
)
<=
0
)
{
if
((
goodsModel
.
ProxyMoney
??
0
)
<=
0
)
{
return
ApiResult
.
Failed
(
"采购商品有误"
);
return
ApiResult
.
Failed
(
"采购商品有误"
);
}
}
...
@@ -4860,7 +4885,8 @@ namespace Mall.Module.Product
...
@@ -4860,7 +4885,8 @@ namespace Mall.Module.Product
Status
=
0
Status
=
0
},
trans
);
},
trans
);
//商品分类
//商品分类
foreach
(
var
item
in
categoryList
)
{
foreach
(
var
item
in
categoryList
)
{
goods_CategoryRepository
.
Insert
(
new
RB_Goods_Category
()
goods_CategoryRepository
.
Insert
(
new
RB_Goods_Category
()
{
{
CategoryId
=
item
,
CategoryId
=
item
,
...
@@ -4875,7 +4901,8 @@ namespace Mall.Module.Product
...
@@ -4875,7 +4901,8 @@ namespace Mall.Module.Product
//复制规格
//复制规格
var
slist
=
goods_SpecificationRepository
.
GetList
(
new
RB_Goods_Specification_Extend
()
{
GoodsId
=
goodsId
});
var
slist
=
goods_SpecificationRepository
.
GetList
(
new
RB_Goods_Specification_Extend
()
{
GoodsId
=
goodsId
});
var
svlist
=
goods_SpecificationValueRepository
.
GetList
(
new
RB_Goods_SpecificationValue_Extend
()
{
GoodsId
=
goodsId
});
var
svlist
=
goods_SpecificationValueRepository
.
GetList
(
new
RB_Goods_SpecificationValue_Extend
()
{
GoodsId
=
goodsId
});
foreach
(
var
item
in
slist
)
{
foreach
(
var
item
in
slist
)
{
goods_SpecificationRepository
.
Insert
(
new
RB_Goods_Specification
()
goods_SpecificationRepository
.
Insert
(
new
RB_Goods_Specification
()
{
{
EnabledImage
=
item
.
EnabledImage
,
EnabledImage
=
item
.
EnabledImage
,
...
@@ -4889,7 +4916,8 @@ namespace Mall.Module.Product
...
@@ -4889,7 +4916,8 @@ namespace Mall.Module.Product
TenantId
=
tenantId
TenantId
=
tenantId
},
trans
);
},
trans
);
}
}
foreach
(
var
item
in
svlist
)
{
foreach
(
var
item
in
svlist
)
{
goods_SpecificationValueRepository
.
Insert
(
new
RB_Goods_SpecificationValue
()
goods_SpecificationValueRepository
.
Insert
(
new
RB_Goods_SpecificationValue
()
{
{
TenantId
=
tenantId
,
TenantId
=
tenantId
,
...
@@ -4934,10 +4962,12 @@ namespace Mall.Module.Product
...
@@ -4934,10 +4962,12 @@ namespace Mall.Module.Product
{
{
plist
=
goods_ProxyRepository
.
GetList
(
new
RB_Goods_Proxy_Extend
()
{
GoodsId
=
goodsId
,
ProxyMallBaseId
=
mallBaseId
,
ProxyTenantId
=
tenantId
});
plist
=
goods_ProxyRepository
.
GetList
(
new
RB_Goods_Proxy_Extend
()
{
GoodsId
=
goodsId
,
ProxyMallBaseId
=
mallBaseId
,
ProxyTenantId
=
tenantId
});
}
}
else
{
else
{
plist
=
goods_ProxyRepository
.
GetList
(
new
RB_Goods_Proxy_Extend
()
{
ProxyGoodsId
=
goodsId
,
ProxyMallBaseId
=
mallBaseId
,
ProxyTenantId
=
tenantId
});
plist
=
goods_ProxyRepository
.
GetList
(
new
RB_Goods_Proxy_Extend
()
{
ProxyGoodsId
=
goodsId
,
ProxyMallBaseId
=
mallBaseId
,
ProxyTenantId
=
tenantId
});
}
}
if
(!
plist
.
Any
())
{
if
(!
plist
.
Any
())
{
return
false
;
return
false
;
}
}
var
pModel
=
plist
.
FirstOrDefault
();
var
pModel
=
plist
.
FirstOrDefault
();
...
@@ -4953,7 +4983,8 @@ namespace Mall.Module.Product
...
@@ -4953,7 +4983,8 @@ namespace Mall.Module.Product
}
}
};
};
bool
flag
=
goods_ProxyRepository
.
Update
(
keyValues
,
wheres
);
bool
flag
=
goods_ProxyRepository
.
Update
(
keyValues
,
wheres
);
if
(
flag
)
{
if
(
flag
)
{
//删除商品
//删除商品
Dictionary
<
string
,
object
>
keyValues1
=
new
Dictionary
<
string
,
object
>()
{
Dictionary
<
string
,
object
>
keyValues1
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Goods
.
Status
),
1
},
{
nameof
(
RB_Goods
.
Status
),
1
},
...
@@ -4986,10 +5017,12 @@ namespace Mall.Module.Product
...
@@ -4986,10 +5017,12 @@ namespace Mall.Module.Product
{
{
return
false
;
return
false
;
}
}
if
(
goodsModel
.
IsProcurement
!=
1
)
{
if
(
goodsModel
.
IsProcurement
!=
1
)
{
return
false
;
return
false
;
}
}
if
(
goodsModel
.
ProcurementStatus
!=
1
)
{
if
(
goodsModel
.
ProcurementStatus
!=
1
)
{
return
false
;
return
false
;
}
}
int
GoodsStatus
=
1
;
int
GoodsStatus
=
1
;
...
@@ -5000,7 +5033,8 @@ namespace Mall.Module.Product
...
@@ -5000,7 +5033,8 @@ namespace Mall.Module.Product
return
false
;
return
false
;
}
}
}
}
else
{
else
{
if
(
goodsModel
.
GoodsStatus
!=
1
)
if
(
goodsModel
.
GoodsStatus
!=
1
)
{
{
return
false
;
return
false
;
...
@@ -5573,5 +5607,21 @@ namespace Mall.Module.Product
...
@@ -5573,5 +5607,21 @@ namespace Mall.Module.Product
}
}
#
endregion
#
endregion
#
region
分销商
/// <summary>
/// 获取列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Distributor_Info_Extend
>
GetDistributorInfoList
(
RB_Distributor_Info_Extend
dmodel
)
{
return
distributor_InfoRepository
.
GetList
(
dmodel
);
}
#
endregion
}
}
}
}
Mall.WebApi/Controllers/AppletWeChat/LiveHouseController.cs
View file @
4554fa9d
...
@@ -2,9 +2,11 @@
...
@@ -2,9 +2,11 @@
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
Google.Protobuf.WellKnownTypes
;
using
Mall.Common
;
using
Mall.Common
;
using
Mall.Common.API
;
using
Mall.Common.API
;
using
Mall.Common.Plugin
;
using
Mall.Common.Plugin
;
using
Mall.Model.Extend.Product
;
using
Mall.Model.Extend.User
;
using
Mall.Model.Extend.User
;
using
Mall.Model.Query
;
using
Mall.Model.Query
;
using
Mall.Module.MarketingCenter
;
using
Mall.Module.MarketingCenter
;
...
@@ -253,6 +255,92 @@ namespace Mall.WebApi.Controllers.AppletWeChat
...
@@ -253,6 +255,92 @@ namespace Mall.WebApi.Controllers.AppletWeChat
}
}
}
}
/// <summary>
/// 获取商品
/// </summary>
/// <param name="requestMsg"></param>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
public
ApiResult
GetGoodsList
(
object
requestMsg
)
{
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Goods_Extend
>(
requestParm
.
msg
.
ToString
());
query
.
TenantId
=
requestParm
.
TenantId
;
query
.
MallBaseId
=
requestParm
.
MallBaseId
;
var
oldLogisticsList
=
productModule
.
GetGoodsList
(
query
).
Take
(
15
);
return
ApiResult
.
Success
(
""
,
oldLogisticsList
);
}
/// <summary>
/// 获取分销商
/// </summary>
/// <param name="requestMsg"></param>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
public
ApiResult
GetDistributorInfoList
(
object
requestMsg
)
{
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Distributor_Info_Extend
>(
requestParm
.
msg
.
ToString
());
query
.
TenantId
=
requestParm
.
TenantId
;
query
.
MallBaseId
=
requestParm
.
MallBaseId
;
var
oldLogisticsList
=
productModule
.
GetDistributorInfoList
(
query
).
Take
(
15
);
return
ApiResult
.
Success
(
""
,
oldLogisticsList
);
}
/// <summary>
/// 获取分销商
/// </summary>
/// <param name="requestMsg"></param>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
public
ApiResult
GetTotalOrderProfitLoss
(
object
requestMsg
)
{
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
OrderStatistics_Query
demodel
=
JsonConvert
.
DeserializeObject
<
OrderStatistics_Query
>(
requestParm
.
msg
.
ToString
());
demodel
.
TenantId
=
requestParm
.
TenantId
;
demodel
.
MallBaseId
=
requestParm
.
MallBaseId
;
var
list
=
statisticsModule
.
GetAllOrderProfitLossList
(
demodel
);
foreach
(
var
item
in
list
)
{
item
.
ALLCommission
=
item
.
CostFreight
+
item
.
CostMoney
+
item
.
PackingMoney
+
item
.
GoodsFreight
+
item
.
OneCommission
+
item
.
TwoCommission
+
item
.
OtherPrice
;
item
.
NoPaid
=
item
.
ALLCommission
-
item
.
Paid
;
item
.
GrossProfit
=
item
.
AllPrice
-
item
.
ALLCommission
;
item
.
GrossProfitRate
=
item
.
AllPrice
==
0
?
0
:
Math
.
Round
((
item
.
GrossProfit
/
item
.
AllPrice
),
2
,
MidpointRounding
.
AwayFromZero
);
}
var
retult
=
new
{
TotalFinal_Price
=
list
.
Sum
(
x
=>
x
.
Final_Price
),
//结算款小计
TotalFreightMoney
=
list
.
Sum
(
x
=>
string
.
IsNullOrWhiteSpace
(
x
.
FreightMoney
)
?
0
:
Convert
.
ToDecimal
(
x
.
FreightMoney
)),
//运费小计
TotalAllPrice
=
list
.
Sum
(
x
=>
x
.
AllPrice
),
//已收小计
TotalNoAllPrice
=
list
.
Sum
(
x
=>
0
),
//未收小计
TotalPay
=
list
.
Sum
(
x
=>
x
.
AllPrice
),
//合计小计
TotalCostMoney
=
list
.
Sum
(
x
=>
x
.
CostMoney
),
//采购成本小计
TotalPackingMoney
=
list
.
Sum
(
x
=>
x
.
PackingMoney
),
//包装费摊销小计
TotalCostFreight
=
list
.
Sum
(
x
=>
x
.
CostFreight
),
//快递成本小计
TotalGoodsFreight
=
list
.
Sum
(
x
=>
x
.
GoodsFreight
),
//商品运费小计
TotalBranchCommission
=
list
.
Sum
(
x
=>
x
.
BranchCommission
),
//分公司小计
TotalGeneralAgentCommission
=
list
.
Sum
(
x
=>
x
.
GeneralAgentCommission
),
//总代理小计
TotalSpecialCommission
=
list
.
Sum
(
x
=>
x
.
SpecialCommission
),
//特一级小计
TotalOneCommission
=
list
.
Sum
(
x
=>
x
.
OneCommission
),
//一级返佣小计
TotalOneTwoCommission
=
list
.
Sum
(
x
=>
x
.
TwoCommission
),
//二级返佣小计
TotalOneOtherPrice
=
list
.
Sum
(
x
=>
x
.
OtherPrice
),
//其他费用小计
TotalALLCommission
=
list
.
Sum
(
x
=>
x
.
ALLCommission
),
//营业合计小计
TotalPaid
=
list
.
Sum
(
x
=>
x
.
Paid
),
//已付小计
TotalNoPaid
=
list
.
Sum
(
x
=>
x
.
NoPaid
),
//未付小计
TotalGrossProfit
=
list
.
Sum
(
x
=>
x
.
GrossProfit
),
//毛利小计
};
return
ApiResult
.
Success
(
""
,
retult
);
}
#
endregion
#
endregion
}
}
}
}
\ No newline at end of file
Mall.WindowsService/Module/FinanceModule.cs
View file @
4554fa9d
...
@@ -256,8 +256,8 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
...
@@ -256,8 +256,8 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
WBMoney
=
(
result
.
Sum
(
x
=>
x
.
FinanceType
==
1
?
(
x
.
Final_Price
??
0
)
:
(
x
.
FreightMoney
??
0
)))
-
OriginalFee
,
WBMoney
=
(
result
.
Sum
(
x
=>
x
.
FinanceType
==
1
?
(
x
.
Final_Price
??
0
)
:
(
x
.
FreightMoney
??
0
)))
-
OriginalFee
,
RB_Branch_Id
=
Config
.
IncomeBranchId
,
RB_Branch_Id
=
Config
.
IncomeBranchId
,
RemitterName
=
item
.
RemitterName
,
RemitterName
=
item
.
RemitterName
,
TradeDate
=
System
.
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
),
TradeDate
=
System
.
DateTime
.
Now
.
AddDays
(-
1
).
ToString
(
"yyyy-MM-dd"
),
AccountNumber
=
System
.
DateTime
.
Now
.
ToString
(
"yyyyMMdd"
),
AccountNumber
=
System
.
DateTime
.
Now
.
AddDays
(-
1
).
ToString
(
"yyyyMMdd"
),
TemplateId
=
item
.
WorkFlowId
,
TemplateId
=
item
.
WorkFlowId
,
OrderSource
=
16
,
OrderSource
=
16
,
Remark
=
System
.
DateTime
.
Now
.
ToString
(
"yyyy年MM月dd日"
)
+
"自动生成财务单据"
,
Remark
=
System
.
DateTime
.
Now
.
ToString
(
"yyyy年MM月dd日"
)
+
"自动生成财务单据"
,
...
...
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