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
f4676dde
Commit
f4676dde
authored
Jul 28, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资产盘点 上传盘点图片
parent
f856eef1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
84 additions
and
1 deletion
+84
-1
RB_Property_CheckDetail.cs
Property.Model/Entity/Property/RB_Property_CheckDetail.cs
+4
-0
RB_Property_CheckDetail_Extend.cs
...y.Model/Extend/Property/RB_Property_CheckDetail_Extend.cs
+4
-0
PropertyModule.cs
Property.Modele.FixedAssets/PropertyModule.cs
+36
-1
PropertyController.cs
Property.WebApi/Controllers/Property/PropertyController.cs
+40
-0
No files found.
Property.Model/Entity/Property/RB_Property_CheckDetail.cs
View file @
f4676dde
...
...
@@ -154,5 +154,9 @@ namespace Property.Model.Entity
/// 盘点盈亏处理状态 0未处理 1已处理
/// </summary>
public
int
?
DealStatus
{
get
;
set
;
}
=
0
;
/// <summary>
/// 盘点图片
/// </summary>
public
string
Images
{
get
;
set
;
}
}
}
\ No newline at end of file
Property.Model/Extend/Property/RB_Property_CheckDetail_Extend.cs
View file @
f4676dde
...
...
@@ -37,5 +37,9 @@ namespace Property.Model.Extend
/// 查询盘亏盘盈 1是
/// </summary>
public
int
?
IsSelectCheckLoss
{
get
;
set
;
}
/// <summary>
/// 图片列表
/// </summary>
public
List
<
string
>
ImageList
{
get
;
set
;
}
}
}
\ No newline at end of file
Property.Modele.FixedAssets/PropertyModule.cs
View file @
f4676dde
...
...
@@ -2910,7 +2910,16 @@ namespace Property.Module.FixedAssets
/// <returns></returns>
public
List
<
RB_Property_CheckDetail_Extend
>
GetPropertyCheckDetailPageList
(
int
pageIndex
,
int
pageSize
,
RB_Property_CheckDetail_Extend
demodel
,
out
long
count
)
{
return
property_CheckDetailRepository
.
GetPageList
(
pageIndex
,
pageSize
,
demodel
,
out
count
);
var
list
=
property_CheckDetailRepository
.
GetPageList
(
pageIndex
,
pageSize
,
demodel
,
out
count
);
if
(
list
.
Any
())
{
foreach
(
var
item
in
list
)
{
item
.
ImageList
=
new
List
<
string
>();
if
(!
string
.
IsNullOrEmpty
(
item
.
Images
)
&&
item
.
Images
!=
"[]"
)
{
item
.
ImageList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
item
.
Images
);
}
}
}
return
list
;
}
/// <summary>
/// 获取盘点详情列表
...
...
@@ -3083,6 +3092,32 @@ namespace Property.Module.FixedAssets
return
flag
;
}
/// <summary>
/// 设置盘点图片
/// </summary>
/// <param name="checkDetailId"></param>
/// <param name="imagesList"></param>
/// <param name="userInfo"></param>
/// <returns></returns>
public
bool
SetPropertyCheckImage
(
int
checkDetailId
,
List
<
string
>
imagesList
,
UserInfo
userInfo
)
{
Dictionary
<
string
,
object
>
flies
=
new
Dictionary
<
string
,
object
>
{
{
nameof
(
RB_Property_CheckDetail
.
CheckEmpId
),
userInfo
.
EmployeeId
},
{
nameof
(
RB_Property_CheckDetail
.
CheckDate
),
DateTime
.
Now
},
{
nameof
(
RB_Property_CheckDetail
.
Images
),
JsonConvert
.
SerializeObject
(
imagesList
)
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Property_CheckDetail
.
Id
),
FiledValue
=
checkDetailId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
bool
flag
=
property_CheckDetailRepository
.
Update
(
flies
,
wheres
);
return
flag
;
}
/// <summary>
/// 设置app盘点状态
/// </summary>
...
...
Property.WebApi/Controllers/Property/PropertyController.cs
View file @
f4676dde
...
...
@@ -3778,6 +3778,7 @@ namespace Property.WebApi.Controllers.User
PropertyStatusName
=
x
.
PropertyStatus
.
GetEnumName
(),
x
.
CategoryName
,
x
.
BrandName
,
x
.
ImageList
,
x
.
AuditEmpId
,
AuditEmpName
=
x
.
AuditEmpId
.
HasValue
&&
x
.
AuditEmpId
>
0
?
CacheManager
.
User
.
UserReidsCache
.
GetEmployee
(
x
.
AuditEmpId
)?.
EmName
:
""
,
AuditDate
=
x
.
AuditDate
.
HasValue
?
x
.
AuditDate
.
Value
.
ToString
(
"yyyy-MM-dd"
)
:
""
,
...
...
@@ -3825,6 +3826,45 @@ namespace Property.WebApi.Controllers.User
}
}
/// <summary>
/// 设置盘点图片
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetPropertyCheckImage
()
{
var
requestParm
=
GetRequestParm
();
UserInfo
userInfo
=
CacheManager
.
User
.
UserReidsCache
.
GetUserLoginInfo
(
requestParm
.
uid
);
JObject
parms
=
JObject
.
Parse
(
requestParm
.
msg
.
ToString
());
int
CheckDetailId
=
parms
.
GetInt
(
"CheckDetailId"
,
0
);
string
ImageList
=
parms
.
GetStringValue
(
"ImageList"
);
if
(
CheckDetailId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递参数id"
);
}
if
(
string
.
IsNullOrEmpty
(
ImageList
))
{
return
ApiResult
.
ParamIsNull
(
"请上传图片"
);
}
List
<
string
>
ImagesList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
ImageList
);
//验证盘点单是否已整单完成
if
(
propertyModule
.
ValidataPropertyCheckDetail
(
CheckDetailId
))
{
return
ApiResult
.
Failed
(
"该盘点单已整单完成,无法操作"
);
}
bool
flag
=
propertyModule
.
SetPropertyCheckImage
(
CheckDetailId
,
ImagesList
,
userInfo
);
if
(
flag
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
}
/// <summary>
/// 获取盘点方式枚举
/// </summary>
...
...
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