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
868d39d8
Commit
868d39d8
authored
Oct 29, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
66b2ecb6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
96 additions
and
22 deletions
+96
-22
AppletMiaiController.cs
Mall.WebApi/Controllers/Miai/AppletMiaiController.cs
+66
-5
WarehouseOutController.cs
Mall.WebApi/Controllers/Property/WarehouseOutController.cs
+30
-17
No files found.
Mall.WebApi/Controllers/Miai/AppletMiaiController.cs
View file @
868d39d8
...
...
@@ -20,6 +20,7 @@ using Mall.Model.Entity.Miai;
using
Dnc.Api.Throttle
;
using
Mall.Model.Extend.User
;
using
Mall.Model.Extend.MarketingCenter
;
using
Mall.Common.Enum.MiAi
;
namespace
Mall.WebApi.Controllers.MallBase
{
...
...
@@ -1202,7 +1203,71 @@ namespace Mall.WebApi.Controllers.MallBase
return
ApiResult
.
Failed
(
"已进入黑名单,无法访问"
);
}
RB_MiAi_BaseInfo_Extend
baseInfo
=
JsonConvert
.
DeserializeObject
<
RB_MiAi_BaseInfo_Extend
>(
req
.
msg
.
ToString
());
JObject
jobj
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
RB_MiAi_BaseInfo_Extend
baseInfo
=
new
RB_MiAi_BaseInfo_Extend
()
{
Id
=
jobj
.
GetInt
(
"Id"
),
Name
=
jobj
.
GetStringValue
(
"Name"
),
Photo
=
jobj
.
GetStringValue
(
"Photo"
),
WechatNo
=
jobj
.
GetStringValue
(
"WechatNo"
),
Moblie
=
jobj
.
GetStringValue
(
"Moblie"
),
IsFaTie
=
jobj
.
GetInt
(
"IsFaTie"
),
Birthday
=
jobj
.
GetStringValue
(
"Birthday"
),
Sex
=
jobj
.
GetInt
(
"Sex"
),
Height
=
jobj
.
GetInt
(
"Height"
),
Weight
=
jobj
.
GetInt
(
"Weight"
),
EducationType
=(
EducationTypeEnum
)
jobj
.
GetInt
(
"EducationType"
),
SchoolInfo
=
jobj
.
GetStringValue
(
"SchoolInfo"
),
Age
=
jobj
.
GetInt
(
"Age"
),
YearMoneyTypeStr
=
jobj
.
GetStringValue
(
"YearMoneyTypeStr"
),
YearMoneyType
=(
YearMoneyTypeEnum
)
jobj
.
GetInt
(
"YearMoneyType"
),
Industry
=
jobj
.
GetStringValue
(
"Industry"
),
Marriage
=(
MarriageEnum
)
jobj
.
GetInt
(
"Marriage"
),
Job
=
jobj
.
GetStringValue
(
"Job"
),
WorkUnit
=
jobj
.
GetStringValue
(
"WorkUnit"
),
YearMoney
=
jobj
.
GetDecimal
(
"YearMoney"
),
CName
=
jobj
.
GetStringValue
(
"CName"
),
DName
=
jobj
.
GetStringValue
(
"DName"
),
PName
=
jobj
.
GetStringValue
(
"PName"
),
Province
=
jobj
.
GetInt
(
"Province"
),
City
=
jobj
.
GetInt
(
"City"
),
District
=
jobj
.
GetInt
(
"District"
),
OtherInfo
=
jobj
.
GetStringValue
(
"OtherInfo"
),
HouseInfo
=(
HouseInfoEnum
)
jobj
.
GetInt
(
"HouseInfo"
),
CarInfo
=(
CarInfoEnum
)
jobj
.
GetInt
(
"CarInfo"
),
CarInfoStr
=
jobj
.
GetStringValue
(
"CarInfoStr"
),
HouseInfoStr
=
jobj
.
GetStringValue
(
"HouseInfoStr"
),
FamilyInfo
=
jobj
.
GetStringValue
(
"FamilyInfo"
),
Hobby
=
jobj
.
GetStringValue
(
"Hobby"
),
LikeFood
=
jobj
.
GetStringValue
(
"LikeFood"
),
LikeBook
=
jobj
.
GetStringValue
(
"LikeBook"
),
LikeTV
=
jobj
.
GetStringValue
(
"LikeTV"
),
LikeSong
=
jobj
.
GetStringValue
(
"LikeSong"
),
IdealLove
=
jobj
.
GetStringValue
(
"IdealLove"
),
LoveTalk
=
jobj
.
GetStringValue
(
"LoveTalk"
),
SingleReason
=
jobj
.
GetStringValue
(
"SingleReason"
),
HopeYou
=
jobj
.
GetStringValue
(
"HopeYou"
),
About
=
jobj
.
GetStringValue
(
"About"
),
Appointment
=
jobj
.
GetStringValue
(
"Appointment"
),
AppointmentAddress
=
jobj
.
GetStringValue
(
"AppointmentAddress"
),
IDCardBack
=
jobj
.
GetStringValue
(
"IDCardBack"
),
IDCard
=
jobj
.
GetStringValue
(
"IDCard"
),
IDCardNo
=
jobj
.
GetStringValue
(
"IDCardNo"
),
RealName
=
jobj
.
GetStringValue
(
"RealName"
),
ActivityRegion
=
jobj
.
GetStringValue
(
"ActivityRegion"
),
DWCName
=
jobj
.
GetStringValue
(
"DWCName"
),
DWDName
=
jobj
.
GetStringValue
(
"DWDName"
),
DWPName
=
jobj
.
GetStringValue
(
"DWPName"
),
DWProvince
=
jobj
.
GetInt
(
"DWProvince"
),
DWCity
=
jobj
.
GetInt
(
"DWCity"
),
DWDistrict
=
jobj
.
GetInt
(
"DWDistrict"
),
AlbumList
=
new
List
<
string
>
(),
};
if
(!
string
.
IsNullOrEmpty
(
jobj
.
GetStringValue
(
"AlbumList"
)))
{
baseInfo
.
AlbumList
=
JsonHelper
.
DeserializeObject
<
List
<
string
>>(
jobj
.
GetStringValue
(
"AlbumList"
));
}
baseInfo
.
Status
=
0
;
baseInfo
.
CreateDate
=
DateTime
.
Now
;
baseInfo
.
UserId
=
userInfo
.
UserId
;
...
...
@@ -1237,10 +1302,6 @@ namespace Mall.WebApi.Controllers.MallBase
return
ApiResult
.
Failed
(
"请选择定位省市区"
);
}
//if (baseInfo.YearMoney == 0)
//{
// return ApiResult.Failed("请输入年收入");
//}
if
(!
baseInfo
.
EducationType
.
HasValue
||
(
int
)
baseInfo
.
EducationType
==
0
)
{
return
ApiResult
.
Failed
(
"请选择学历"
);
...
...
Mall.WebApi/Controllers/Property/WarehouseOutController.cs
View file @
868d39d8
...
...
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using
System.Linq
;
using
System.Threading.Tasks
;
using
Mall.Common.API
;
using
Mall.Common.Plugin
;
using
Mall.Model.Extend.Product
;
using
Mall.Model.Extend.Property
;
using
Mall.Module.Product
;
...
...
@@ -11,6 +12,7 @@ using Mall.WebApi.Filter;
using
Microsoft.AspNetCore.Cors
;
using
Microsoft.AspNetCore.Mvc
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json.Linq
;
namespace
Mall.WebApi.Controllers.Property
{
...
...
@@ -68,7 +70,6 @@ namespace Mall.WebApi.Controllers.Property
public
ApiResult
GetSuppliesMaterialList
()
{
var
parms
=
RequestParm
;
// var materialList = propertyModule.GetSuppliesMaterialList(new RB_Supplies_Material_Extend { GoodsIds = goodsIds, RB_Group_Id = requestParm.ERPGroupId, TenantId = requestParm.TenantId, MallBaseId = requestParm.MallBaseId });
RB_Supplies_Material_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Supplies_Material_Extend
>(
parms
.
msg
.
ToString
());
demodel
.
TenantId
=
parms
.
TenantId
;
demodel
.
MallBaseId
=
parms
.
MallBaseId
;
...
...
@@ -86,8 +87,34 @@ namespace Mall.WebApi.Controllers.Property
public
ApiResult
SetWarehouseOutApply
()
{
var
requestParm
=
RequestParm
;
RB_WarehouseOut_Apply_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_WarehouseOut_Apply_Extend
>(
requestParm
.
msg
.
ToString
());
JObject
jobj
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
RB_WarehouseOut_Apply_Extend
demodel
=
new
RB_WarehouseOut_Apply_Extend
()
{
ID
=
jobj
.
GetInt
(
"ID"
),
IsOut
=
jobj
.
GetInt
(
"IsOut"
),
WarehouseOutGoodsList
=
new
List
<
RB_WarehouseOut_Goods_Extend
>(),
};
string
warehouseOutGoodsList
=
jobj
.
GetStringValue
(
"WarehouseOutGoodsList"
);
if
(!
string
.
IsNullOrEmpty
(
warehouseOutGoodsList
))
{
JArray
jArray
=
JArray
.
Parse
(
warehouseOutGoodsList
);
if
(
jArray
!=
null
&&
jArray
.
Count
>
0
)
{
foreach
(
var
jItem
in
jArray
)
{
JObject
sObj
=
JObject
.
Parse
(
jItem
.
ToString
());
var
wModel
=
new
RB_WarehouseOut_Goods_Extend
()
{
OrderGoodsId
=
sObj
.
GetInt
(
"OrderGoodsId"
),
NewSpecificationSort
=
sObj
.
GetStringValue
(
"NewSpecificationSort"
),
NewNumber
=
sObj
.
GetInt
(
"NewNumber"
),
NewGoodsName
=
sObj
.
GetStringValue
(
"NewGoodsName"
),
NewGoodsId
=
sObj
.
GetInt
(
"NewGoodsId"
),
};
}
}
}
if
(
requestParm
.
EmpId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递参数"
);
...
...
@@ -146,11 +173,8 @@ namespace Mall.WebApi.Controllers.Property
return
ApiResult
.
Failed
(
"订单号:"
+
msg
+
"的商品已申请出库,请勿重复申请"
);
}
}
//获取商品的出库规格物料信息
var
goodsIds
=
string
.
Join
(
","
,
demodel
.
WarehouseOutGoodsList
.
Select
(
x
=>
x
.
NewGoodsId
));
// var materialList = propertyModule.GetSuppliesMaterialList(new RB_Supplies_Material_Extend { GoodsIds = goodsIds, RB_Group_Id = requestParm.ERPGroupId, TenantId = requestParm.TenantId, MallBaseId = requestParm.MallBaseId });
var
materialList
=
propertyModule
.
GetHaveInventory
(
new
RB_Supplies_Material_Extend
{
GoodsIds
=
goodsIds
,
RB_Group_Id
=
requestParm
.
ERPGroupId
,
TenantId
=
requestParm
.
TenantId
,
MallBaseId
=
requestParm
.
MallBaseId
});
foreach
(
var
item
in
demodel
.
WarehouseOutGoodsList
)
{
...
...
@@ -162,19 +186,12 @@ namespace Mall.WebApi.Controllers.Property
if
(
item
.
NewSpecificationSort
!=
item
.
SpecificationSort
)
//修改了规格的判断新规格是否在物料中存在
{
var
oldmaterialList
=
materialList
.
Where
(
x
=>
x
.
GoodsId
==
item
.
NewGoodsId
&&
x
.
SpecificationKey
==
item
.
NewSpecificationSort
);
var
materialModel
=
oldmaterialList
.
FirstOrDefault
();
var
orderGoodsDetail
=
orderGoodsList
.
Where
(
x
=>
x
.
Id
==
item
.
OrderGoodsId
).
FirstOrDefault
();
if
(
oldmaterialList
==
null
||
!
oldmaterialList
.
Any
()
||
materialModel
==
null
)
{
return
ApiResult
.
Failed
(
"订单号:"
+
orderGoodsDetail
?.
OrderNo
+
"的商品:"
+
orderGoodsDetail
?.
GoodsName
+
"不存在物料请先同步"
);
}
//if (oldmaterialList != null && (oldmaterialList.Sum(x => x.InventoryNum ?? 0)) <= 0)
//{
// return ApiResult.Failed("订单号:" + orderGoodsDetail?.OrderNo + "的商品:" + orderGoodsDetail?.GoodsName + "库存不足");
//}
if
(
oldmaterialList
!=
null
&&
(
oldmaterialList
.
Sum
(
x
=>
x
.
InventoryNum
??
0
))
<
item
.
NewNumber
)
{
return
ApiResult
.
Failed
(
"订单号:"
+
orderGoodsDetail
?.
OrderNo
+
"的商品:"
+
orderGoodsDetail
?.
GoodsName
+
"库存不足"
);
...
...
@@ -234,8 +251,6 @@ namespace Mall.WebApi.Controllers.Property
}
}
/// <summary>
/// 获取出库申请列表
/// </summary>
...
...
@@ -258,7 +273,5 @@ namespace Mall.WebApi.Controllers.Property
pagelist
.
pageData
=
list
;
return
ApiResult
.
Success
(
""
,
pagelist
);
}
}
}
\ No newline at end of file
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