Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PropertyEdu
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
PropertyEdu
Commits
958e71c6
Commit
958e71c6
authored
Jun 24, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资产调整
parent
dcde14c7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
1777 additions
and
29 deletions
+1777
-29
PropertyStatusEnum.cs
Property.Common/Enum/Property/PropertyStatusEnum.cs
+6
-1
RB_Allocate_Record.cs
Property.Model/Entity/Property/RB_Allocate_Record.cs
+81
-0
RB_Property_Info.cs
Property.Model/Entity/Property/RB_Property_Info.cs
+5
-0
RB_Supplies_StockIn.cs
Property.Model/Entity/Supplies/RB_Supplies_StockIn.cs
+15
-0
RB_Supplies_StockOut.cs
Property.Model/Entity/Supplies/RB_Supplies_StockOut.cs
+5
-0
RB_Allocate_Record_Extend.cs
Property.Model/Extend/Property/RB_Allocate_Record_Extend.cs
+39
-0
RB_Supplies_StockOut_Extend.cs
...erty.Model/Extend/Supplies/RB_Supplies_StockOut_Extend.cs
+5
-0
PropertyModule.cs
Property.Modele.FixedAssets/PropertyModule.cs
+69
-0
SuppliesModule.cs
Property.Modele.FixedAssets/SuppliesModule.cs
+854
-1
RB_Allocate_RecordRepository.cs
Property.Repository/Property/RB_Allocate_RecordRepository.cs
+77
-0
RB_Property_InfoRepository.cs
Property.Repository/Property/RB_Property_InfoRepository.cs
+9
-0
RB_Supplies_StockInRepository.cs
...erty.Repository/Supplies/RB_Supplies_StockInRepository.cs
+118
-2
RB_Supplies_StockOutApplyForRepository.cs
...sitory/Supplies/RB_Supplies_StockOutApplyForRepository.cs
+4
-0
RB_Supplies_StockOutRepository.cs
...rty.Repository/Supplies/RB_Supplies_StockOutRepository.cs
+34
-1
PropertyController.cs
Property.WebApi/Controllers/Property/PropertyController.cs
+53
-0
SuppliesController.cs
Property.WebApi/Controllers/Property/SuppliesController.cs
+403
-24
No files found.
Property.Common/Enum/Property/PropertyStatusEnum.cs
View file @
958e71c6
...
...
@@ -56,6 +56,11 @@ namespace REBORN.Common.Enum
/// 已处置
/// </summary>
[
EnumField
(
"已处置"
)]
Dispose
=
10
Dispose
=
10
,
/// <summary>
/// 耗材调拨
/// </summary>
[
EnumField
(
"耗材调拨"
)]
Supplies
=
11
}
}
Property.Model/Entity/Property/RB_Allocate_Record.cs
0 → 100644
View file @
958e71c6
using
System
;
using
REBORN.Common.AOP
;
using
REBORN.Common.Plugin
;
namespace
Property.Model.Entity
{
/// <summary>
/// 资产耗材调拨日志实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"PropertyConnection"
)]
public
class
RB_Allocate_Record
{
/// <summary>
/// Id
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 类型 1 资产转耗材 2耗材转资产
/// </summary>
public
int
Type
{
get
;
set
;
}
/// <summary>
/// 资产id
/// </summary>
public
int
PropertyId
{
get
;
set
;
}
/// <summary>
/// 资产校区id
/// </summary>
public
int
SchoolId
{
get
;
set
;
}
/// <summary>
/// 耗材id
/// </summary>
public
int
MaterialId
{
get
;
set
;
}
/// <summary>
/// 耗材所在仓库
/// </summary>
public
int
WarehouseId
{
get
;
set
;
}
/// <summary>
/// 转入资产分类
/// </summary>
public
int
CategoryId
{
get
;
set
;
}
/// <summary>
/// 相关入库出库单号
/// </summary>
public
string
StockInOutNo
{
get
;
set
;
}
/// <summary>
/// 状态 0 正常 1删除
/// </summary>
public
int
Status
{
get
;
set
;
}
/// <summary>
/// 公司
/// </summary>
public
int
RB_Branch_Id
{
get
;
set
;
}
/// <summary>
/// 集团
/// </summary>
public
int
RB_Group_Id
{
get
;
set
;
}
/// <summary>
/// CreateBy
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// CreateDate
/// </summary>
public
DateTime
CreateDate
{
get
;
set
;
}
}
}
\ No newline at end of file
Property.Model/Entity/Property/RB_Property_Info.cs
View file @
958e71c6
...
...
@@ -242,5 +242,10 @@ namespace Property.Model.Entity
/// 资产采购单id
/// </summary>
public
int
ProcurementId
{
get
;
set
;
}
/// <summary>
/// 是否折旧 1是 其他否
/// </summary>
public
int
IsDepreciation
{
get
;
set
;
}
}
}
\ No newline at end of file
Property.Model/Entity/Supplies/RB_Supplies_StockIn.cs
View file @
958e71c6
...
...
@@ -139,5 +139,20 @@ namespace Property.Model.Entity
/// 流程模板id
/// </summary>
public
int
?
TempleteId
{
get
;
set
;
}
/// <summary>
/// 是否重新入库 1是 其他否
/// </summary>
public
int
IsAgainStock
{
get
;
set
;
}
/// <summary>
/// 退库对应 - 出库单号
/// </summary>
public
int
ReturnsId
{
get
;
set
;
}
/// <summary>
/// 出库单号
/// </summary>
public
string
ReturnsNo
{
get
;
set
;
}
}
}
\ No newline at end of file
Property.Model/Entity/Supplies/RB_Supplies_StockOut.cs
View file @
958e71c6
...
...
@@ -136,5 +136,10 @@ namespace Property.Model.Entity
/// 耗材出库申请id
/// </summary>
public
int
ApplyForId
{
get
;
set
;
}
/// <summary>
/// 是否已退库 1是
/// </summary>
public
int
IsReturns
{
get
;
set
;
}
}
}
\ No newline at end of file
Property.Model/Extend/Property/RB_Allocate_Record_Extend.cs
0 → 100644
View file @
958e71c6
using
System
;
using
Property.Model.Entity
;
using
REBORN.Common.AOP
;
namespace
Property.Model.Extend
{
/// <summary>
/// 资产耗材调拨日志扩展实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"PropertyConnection"
)]
public
class
RB_Allocate_Record_Extend
:
RB_Allocate_Record
{
/// <summary>
/// 耗材数量
/// </summary>
public
int
SuppliesNumber
{
get
;
set
;
}
/// <summary>
/// 购置日期
/// </summary>
public
string
BuyDate
{
get
;
set
;
}
/// <summary>
/// 资产名称
/// </summary>
public
string
PropertyName
{
get
;
set
;
}
/// <summary>
/// 物料名称
/// </summary>
public
string
SuppliesName
{
get
;
set
;
}
/// <summary>
/// 仓库名称
/// </summary>
public
string
WarehouseName
{
get
;
set
;
}
}
}
\ No newline at end of file
Property.Model/Extend/Supplies/RB_Supplies_StockOut_Extend.cs
View file @
958e71c6
...
...
@@ -12,6 +12,11 @@ namespace Property.Model.Extend
[
DB
(
ConnectionName
=
"PropertyConnection"
)]
public
class
RB_Supplies_StockOut_Extend
:
RB_Supplies_StockOut
{
/// <summary>
/// 出库ids
/// </summary>
public
string
StockOutIds
{
get
;
set
;
}
/// <summary>
/// 出库开始时间
/// </summary>
...
...
Property.Modele.FixedAssets/PropertyModule.cs
View file @
958e71c6
...
...
@@ -13,6 +13,7 @@ using REBORN.Common.API;
using
System.Data
;
using
REBORN.IM.Service
;
using
Newtonsoft.Json.Linq
;
using
System.IO
;
namespace
Property.Module.FixedAssets
{
...
...
@@ -304,6 +305,33 @@ namespace Property.Module.FixedAssets
return
list
;
}
/// <summary>
/// 获取资产二维码列表
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public
List
<
RB_Property_Info_Extend
>
GetPropertyQRCodeList_V2
(
RB_Property_Info_Extend
demodel
)
{
var
list
=
property_InfoRepository
.
GetPropertyQRCodeList
(
demodel
);
foreach
(
var
item
in
list
)
{
string
QRCode
=
"PropertyCheck|Id="
+
item
.
Id
;
#
region
生成二维码
+
条形码
string
QRName
=
"QR-"
+
DateTime
.
Now
.
ToString
(
"yyyyMMdd"
)
+
"-PropertyCheck"
+
item
.
Id
+
".jpg"
;
string
basepath
=
AppContext
.
BaseDirectory
;
string
QRPath
=
basepath
+
"\\upfile\\code\\"
+
QRName
;
string
QRImage
=
"/upfile/code/"
+
QRName
;
//验证文件是否存在, 存在的话就不用生成了
if
(!
File
.
Exists
(
QRPath
))
{
QRCodeHelper
.
CreateQRCode
(
QRCode
,
5
,
""
,
QRPath
,
System
.
Drawing
.
Imaging
.
ImageFormat
.
Jpeg
);
}
#
endregion
item
.
QRCode
=
QRImage
;
}
return
list
;
}
/// <summary>
/// 获取资产履历分页列表
/// </summary>
...
...
@@ -670,6 +698,46 @@ namespace Property.Module.FixedAssets
return
flag
;
}
/// <summary>
/// 设置资产折旧
/// </summary>
/// <param name="propertyId"></param>
/// <param name="isDepreciation"></param>
/// <param name="userInfo"></param>
/// <returns></returns>
public
bool
SetPropertyDepreciation
(
int
propertyId
,
int
isDepreciation
,
UserInfo
userInfo
)
{
Dictionary
<
string
,
object
>
files
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Property_Info
.
IsDepreciation
),
isDepreciation
},
{
nameof
(
RB_Property_Info
.
UpdateBy
),
userInfo
.
EmployeeId
},
{
nameof
(
RB_Property_Info
.
UpdateDate
),
DateTime
.
Now
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Property_Info
.
Id
),
FiledValue
=
propertyId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
bool
flag
=
property_InfoRepository
.
Update
(
files
,
wheres
);
if
(
flag
)
{
//写入日志
property_LogRepository
.
Insert
(
new
RB_Property_Log
()
{
PropertyId
=
propertyId
,
Status
=
0
,
Content
=
"设置资产折旧为 "
+
(
isDepreciation
==
1
?
"参与折旧"
:
"不参与折旧"
),
TypeName
=
"折旧"
,
RB_Branch_Id
=
userInfo
.
RB_Branch_id
,
RB_Group_Id
=
userInfo
.
RB_Group_id
,
CreateBy
=
userInfo
.
EmployeeId
,
CreateDate
=
DateTime
.
Now
});
}
return
flag
;
}
/// <summary>
/// 资产保存
/// </summary>
...
...
@@ -4705,6 +4773,7 @@ namespace Property.Module.FixedAssets
pModel
.
BackTime
=
null
;
pModel
.
SupplierId
=
opModel
.
SupplierId
;
pModel
.
ProcurementId
=
demodel
.
ProcurementId
;
pModel
.
IsDepreciation
=
1
;
//采购入库 默认需要折旧
pModel
.
Status
=
0
;
pModel
.
BranchId
=
demodel
.
SchoolId
;
pModel
.
RB_Branch_Id
=
userInfo
.
RB_Branch_id
;
...
...
Property.Modele.FixedAssets/SuppliesModule.cs
View file @
958e71c6
This diff is collapsed.
Click to expand it.
Property.Repository/Property/RB_Allocate_RecordRepository.cs
0 → 100644
View file @
958e71c6
using
Property.Model.Entity
;
using
Property.Model.Extend
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Property.Repository
{
/// <summary>
/// 资产耗材调拨日志仓储类
/// </summary>
public
partial
class
RB_Allocate_RecordRepository
:
RepositoryBase
<
RB_Allocate_Record
>
{
/// <summary>
/// 获取岗位分页数据
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="dmodel"></param>
/// <param name="count"></param>
/// <returns></returns>
public
List
<
RB_Allocate_Record_Extend
>
GetPageList
(
int
pageIndex
,
int
pageSize
,
RB_Allocate_Record_Extend
dmodel
,
out
long
count
)
{
string
where
=
" where 1=1 "
;
where
+=
string
.
Format
(
" AND {0}={1}"
,
nameof
(
RB_Allocate_Record_Extend
.
Status
),
0
);
where
+=
$@" and RB_Group_Id=
{
dmodel
.
RB_Group_Id
}
"
;
if
(
dmodel
.
PropertyId
>
0
)
{
where
+=
" and "
+
nameof
(
RB_Allocate_Record_Extend
.
PropertyId
)
+
"="
+
dmodel
.
PropertyId
;
}
if
(
dmodel
.
Type
>
0
)
{
where
+=
" and "
+
nameof
(
RB_Allocate_Record_Extend
.
Type
)
+
"="
+
dmodel
.
Type
;
}
if
(
dmodel
.
MaterialId
>
0
)
{
where
+=
" and "
+
nameof
(
RB_Allocate_Record_Extend
.
MaterialId
)
+
"="
+
dmodel
.
MaterialId
;
}
if
(
dmodel
.
WarehouseId
>
0
)
{
where
+=
" and "
+
nameof
(
RB_Allocate_Record_Extend
.
WarehouseId
)
+
"="
+
dmodel
.
WarehouseId
;
}
string
sql
=
$@" select * from RB_Allocate_Record
{
where
}
order by Id desc"
;
return
GetPage
<
RB_Allocate_Record_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Allocate_Record_Extend
>
GetList
(
RB_Allocate_Record_Extend
dmodel
)
{
string
where
=
" where 1=1 "
;
where
+=
string
.
Format
(
" AND {0}={1}"
,
nameof
(
RB_Allocate_Record_Extend
.
Status
),
0
);
where
+=
$@" and RB_Group_Id=
{
dmodel
.
RB_Group_Id
}
"
;
if
(
dmodel
.
PropertyId
>
0
)
{
where
+=
" and "
+
nameof
(
RB_Allocate_Record_Extend
.
PropertyId
)
+
"="
+
dmodel
.
PropertyId
;
}
if
(
dmodel
.
Type
>
0
)
{
where
+=
" and "
+
nameof
(
RB_Allocate_Record_Extend
.
Type
)
+
"="
+
dmodel
.
Type
;
}
if
(
dmodel
.
MaterialId
>
0
)
{
where
+=
" and "
+
nameof
(
RB_Allocate_Record_Extend
.
MaterialId
)
+
"="
+
dmodel
.
MaterialId
;
}
if
(
dmodel
.
WarehouseId
>
0
)
{
where
+=
" and "
+
nameof
(
RB_Allocate_Record_Extend
.
WarehouseId
)
+
"="
+
dmodel
.
WarehouseId
;
}
string
sql
=
$@" select * from RB_Allocate_Record
{
where
}
order by Id desc"
;
return
Get
<
RB_Allocate_Record_Extend
>(
sql
).
ToList
();
}
}
}
Property.Repository/Property/RB_Property_InfoRepository.cs
View file @
958e71c6
...
...
@@ -87,6 +87,11 @@ namespace Property.Repository
if
(
dmodel
.
IsSelectUseProperty
==
1
)
{
where
+=
" and pi.EmployeeId > 0 "
;
}
if
(
dmodel
.
IsDepreciation
==
1
)
{
where
+=
" and pi."
+
nameof
(
RB_Property_Info_Extend
.
IsDepreciation
)
+
"="
+
dmodel
.
IsDepreciation
;
}
string
sql
=
$@" select pi.*,pc.Name as CategoryName,ps.Name as SupplierName from RB_Property_Info pi
left join RB_Property_Category pc on pc.Id=pi.CategoryId
left join rb_property_supplier ps on pi.SupplierId=ps.Id
...
...
@@ -164,6 +169,10 @@ left join rb_property_supplier ps on pi.SupplierId=ps.Id
{
where
+=
" and pi."
+
nameof
(
RB_Property_Info_Extend
.
PropertyStatus
)
+
"!="
+
(
int
)
REBORN
.
Common
.
Enum
.
PropertyStatusEnum
.
Dispose
;
}
if
(
dmodel
.
IsDepreciation
==
1
)
{
where
+=
" and pi."
+
nameof
(
RB_Property_Info_Extend
.
IsDepreciation
)
+
"="
+
dmodel
.
IsDepreciation
;
}
string
sql
=
$@" select pi.*,pc.Name as CategoryName,ps.Name as SupplierName from RB_Property_Info pi
left join RB_Property_Category pc on pc.Id=pi.CategoryId
...
...
Property.Repository/Supplies/RB_Supplies_StockInRepository.cs
View file @
958e71c6
...
...
@@ -25,7 +25,7 @@ namespace Property.Repository
{
string
where
=
" where 1=1 "
;
where
+=
string
.
Format
(
" AND ss.{0}={1}"
,
nameof
(
RB_Supplies_StockIn_Extend
.
Status
),
0
);
where
+=
$@" and ss.RB_Group_Id=
{
dmodel
.
RB_Group_Id
}
"
;
where
+=
$@" and ss.RB_Group_Id=
{
dmodel
.
RB_Group_Id
}
and ss.IsAgainStock =0
"
;
if
(!
string
.
IsNullOrWhiteSpace
(
dmodel
.
StartTime
))
{
where
+=
$@" and ss.
{
nameof
(
RB_Supplies_StockIn_Extend
.
StockInDate
)}
>='
{
dmodel
.
StartTime
}
'"
;
...
...
@@ -83,7 +83,7 @@ left join rb_supplies_procurement p on ss.ProcurementId=p.Id
{
string
where
=
" where 1=1 "
;
where
+=
string
.
Format
(
" AND ss.{0}={1}"
,
nameof
(
RB_Supplies_StockIn_Extend
.
Status
),
0
);
where
+=
$@" and ss.RB_Group_Id=
{
dmodel
.
RB_Group_Id
}
"
;
where
+=
$@" and ss.RB_Group_Id=
{
dmodel
.
RB_Group_Id
}
and ss.IsAgainStock =0
"
;
if
(!
string
.
IsNullOrWhiteSpace
(
dmodel
.
StartTime
))
{
where
+=
$@" and ss.
{
nameof
(
RB_Supplies_StockIn_Extend
.
StockInDate
)}
>='
{
dmodel
.
StartTime
}
'"
;
...
...
@@ -249,5 +249,121 @@ LEFT JOIN rb_workflow_auditrelevance war on wa.AuditId=war.Id
{
where
}
group by ss.Id order by ss.Id desc"
;
return
GetPage
<
RB_Supplies_StockIn_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
/// <summary>
/// 获取耗材分页数据
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="dmodel"></param>
/// <param name="count"></param>
/// <returns></returns>
public
List
<
RB_Supplies_StockIn_Extend
>
GetReturnsPageList
(
int
pageIndex
,
int
pageSize
,
RB_Supplies_StockIn_Extend
dmodel
,
out
long
count
)
{
string
where
=
" where 1=1 "
;
where
+=
string
.
Format
(
" AND ss.{0}={1}"
,
nameof
(
RB_Supplies_StockIn_Extend
.
Status
),
0
);
where
+=
$@" and ss.RB_Group_Id=
{
dmodel
.
RB_Group_Id
}
and ss.IsAgainStock =1"
;
if
(!
string
.
IsNullOrWhiteSpace
(
dmodel
.
StartTime
))
{
where
+=
$@" and ss.
{
nameof
(
RB_Supplies_StockIn_Extend
.
StockInDate
)}
>='
{
dmodel
.
StartTime
}
'"
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
dmodel
.
EndTime
))
{
where
+=
$@" and ss.
{
nameof
(
RB_Supplies_StockIn_Extend
.
StockInDate
)}
<='
{
dmodel
.
EndTime
+
" 23:59:59"
}
'"
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
dmodel
.
StockInNum
))
{
where
+=
" and ss."
+
nameof
(
RB_Supplies_StockIn_Extend
.
StockInNum
)
+
" like '%"
+
dmodel
.
StockInNum
+
"%'"
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
dmodel
.
ReturnsNo
))
{
where
+=
" and ss."
+
nameof
(
RB_Supplies_StockIn_Extend
.
ReturnsNo
)
+
" like '%"
+
dmodel
.
ReturnsNo
+
"%'"
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
dmodel
.
SuppliesNum
))
{
where
+=
" and sm."
+
nameof
(
RB_Supplies_StockIn_Extend
.
SuppliesNum
)
+
" like '%"
+
dmodel
.
SuppliesNum
.
Trim
()
+
"%'"
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
dmodel
.
SuppliesName
))
{
where
+=
" and sm."
+
nameof
(
RB_Supplies_Material
.
Name
)
+
" like '%"
+
dmodel
.
SuppliesName
.
Trim
()
+
"%'"
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
dmodel
.
SupplierName
))
{
where
+=
" and ss."
+
nameof
(
RB_Supplies_StockIn_Extend
.
SupplierName
)
+
" like '%"
+
dmodel
.
SupplierName
.
Trim
()
+
"%'"
;
}
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
;
}
if
(
dmodel
.
ProcurementId
>
0
)
{
where
+=
" and ss.ProcurementId ="
+
dmodel
.
ProcurementId
;
}
if
(
dmodel
.
StockInState
>
0
)
{
where
+=
" and ss."
+
nameof
(
RB_Supplies_StockIn_Extend
.
StockInState
)
+
"="
+
(
int
)
dmodel
.
StockInState
;
}
string
sql
=
$@" select 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_supplies_procurement p on ss.ProcurementId=p.Id
{
where
}
group by ss.Id order by ss.Id desc"
;
return
GetPage
<
RB_Supplies_StockIn_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
/// <summary>
/// 获取耗材分页数据
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Supplies_StockIn_Extend
>
GetReturnsList
(
RB_Supplies_StockIn_Extend
dmodel
)
{
string
where
=
" where 1=1 "
;
where
+=
string
.
Format
(
" AND ss.{0}={1}"
,
nameof
(
RB_Supplies_StockIn_Extend
.
Status
),
0
);
where
+=
$@" and ss.RB_Group_Id=
{
dmodel
.
RB_Group_Id
}
and ss.IsAgainStock =1"
;
if
(!
string
.
IsNullOrWhiteSpace
(
dmodel
.
StartTime
))
{
where
+=
$@" and ss.
{
nameof
(
RB_Supplies_StockIn_Extend
.
StockInDate
)}
>='
{
dmodel
.
StartTime
}
'"
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
dmodel
.
EndTime
))
{
where
+=
$@" and ss.
{
nameof
(
RB_Supplies_StockIn_Extend
.
StockInDate
)}
<='
{
dmodel
.
EndTime
+
" 23:59:59"
}
'"
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
dmodel
.
StockInNum
))
{
where
+=
" and ss."
+
nameof
(
RB_Supplies_StockIn_Extend
.
StockInNum
)
+
" like '%"
+
dmodel
.
StockInNum
+
"%'"
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
dmodel
.
SupplierName
))
{
where
+=
" and ss."
+
nameof
(
RB_Supplies_StockIn_Extend
.
SupplierName
)
+
" like '%"
+
dmodel
.
SupplierName
.
Trim
()
+
"%'"
;
}
if
(
dmodel
.
Id
>
0
)
{
where
+=
" and ss."
+
nameof
(
RB_Supplies_StockIn_Extend
.
Id
)
+
"="
+
dmodel
.
Id
;
}
if
(
dmodel
.
WarehouseId
>
0
)
{
where
+=
" and ss."
+
nameof
(
RB_Supplies_StockIn_Extend
.
WarehouseId
)
+
"="
+
dmodel
.
WarehouseId
;
}
if
(
dmodel
.
ProcurementId
>
0
)
{
where
+=
" and ss."
+
nameof
(
RB_Supplies_StockIn_Extend
.
ProcurementId
)
+
"="
+
dmodel
.
ProcurementId
;
}
string
sql
=
$@" select ss.*,sw.Name as WareHouseName from RB_Supplies_StockIn ss
left join rb_supplies_warehouse sw on ss.WarehouseId=sw.Id
{
where
}
order by ss.Id desc"
;
return
Get
<
RB_Supplies_StockIn_Extend
>(
sql
).
ToList
();
}
}
}
Property.Repository/Supplies/RB_Supplies_StockOutApplyForRepository.cs
View file @
958e71c6
...
...
@@ -26,6 +26,10 @@ namespace Property.Repository
string
where
=
" where 1=1 "
;
where
+=
string
.
Format
(
" AND pc.{0}={1}"
,
nameof
(
RB_Supplies_StockOutApplyFor_Extend
.
Status
),
0
);
where
+=
$@" and pc.RB_Group_Id=
{
dmodel
.
RB_Group_Id
}
"
;
if
(
dmodel
.
Id
>
0
)
{
where
+=
" and pc."
+
nameof
(
RB_Supplies_StockOutApplyFor_Extend
.
Id
)
+
"="
+
dmodel
.
Id
;
}
if
(
dmodel
.
AuditStatus
>
0
)
{
where
+=
" and pc."
+
nameof
(
RB_Supplies_StockOutApplyFor_Extend
.
AuditStatus
)
+
"="
+
dmodel
.
AuditStatus
;
...
...
Property.Repository/Supplies/RB_Supplies_StockOutRepository.cs
View file @
958e71c6
...
...
@@ -61,6 +61,39 @@ left join rb_supplies_stockoutdetail ssd on ss.Id=ssd.StockOutId
left join rb_supplies_material sm on ssd.SuppliesId=sm.Id
{
where
}
order by ss.Id desc"
;
return
GetPage
<
RB_Supplies_StockOut_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Supplies_StockOut_Extend
>
GetList
(
RB_Supplies_StockOut_Extend
dmodel
)
{
string
where
=
" where 1=1 "
;
where
+=
string
.
Format
(
" AND ss.{0}={1}"
,
nameof
(
RB_Supplies_StockOut_Extend
.
Status
),
0
);
where
+=
$@" and ss.RB_Group_Id=
{
dmodel
.
RB_Group_Id
}
"
;
if
(
dmodel
.
Id
>
0
)
{
where
+=
" and ss."
+
nameof
(
RB_Supplies_StockOut_Extend
.
Id
)
+
"="
+
dmodel
.
Id
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
StockOutIds
))
{
where
+=
" and ss."
+
nameof
(
RB_Supplies_StockOut_Extend
.
Id
)
+
" in("
+
dmodel
.
StockOutIds
+
")"
;
}
if
(
dmodel
.
WarehouseId
>
0
)
{
where
+=
" and ss."
+
nameof
(
RB_Supplies_StockOut_Extend
.
WarehouseId
)
+
"="
+
dmodel
.
WarehouseId
;
}
if
(
dmodel
.
EmployeeId
>
0
)
{
where
+=
" and ss."
+
nameof
(
RB_Supplies_StockOut_Extend
.
EmployeeId
)
+
"="
+
dmodel
.
EmployeeId
;
}
string
sql
=
$@" select distinct ss.*,sw.Name as WareHouseName from RB_Supplies_StockOut ss
{
where
}
order by ss.Id desc"
;
return
Get
<
RB_Supplies_StockOut_Extend
>(
sql
).
ToList
();
}
}
}
Property.WebApi/Controllers/Property/PropertyController.cs
View file @
958e71c6
...
...
@@ -262,6 +262,7 @@ namespace Property.WebApi.Controllers.User
x
.
BranchId
,
x
.
UseMonths
,
x
.
QRCode
,
x
.
IsDepreciation
,
UseReceiveId
=
x
.
UseReceiveId
??
0
,
BranchName
=
CacheManager
.
User
.
BranchReidsCache
.
GetBranch
(
x
.
BranchId
)?.
BName
??
""
,
UpdateBy
=
CacheManager
.
User
.
UserReidsCache
.
GetEmployee
(
x
.
UpdateBy
)?.
EmName
??
""
,
...
...
@@ -744,6 +745,33 @@ namespace Property.WebApi.Controllers.User
}
}
/// <summary>
/// 设置资产折旧
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetPropertyDepreciation
()
{
RequestParm
requestParm
=
GetRequestParm
();
UserInfo
userInfo
=
CacheManager
.
User
.
UserReidsCache
.
GetUserLoginInfo
(
requestParm
.
uid
);
JObject
parms
=
JObject
.
Parse
(
requestParm
.
msg
.
ToString
());
int
PropertyId
=
parms
.
GetInt
(
"PropertyId"
,
0
);
int
IsDepreciation
=
parms
.
GetInt
(
"IsDepreciation"
,
1
);
// 1折旧 2不参与折旧
if
(
PropertyId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递参数id"
);
}
bool
flag
=
propertyModule
.
SetPropertyDepreciation
(
PropertyId
,
IsDepreciation
,
userInfo
);
if
(
flag
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
}
/// <summary>
/// 获取供应商分页列表
/// </summary>
...
...
@@ -4030,6 +4058,29 @@ namespace Property.WebApi.Controllers.User
x
.
QRCode
}));
}
/// <summary>
/// 获取资产二维码打印列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetPropertyQRCodeList_V2
()
{
var
requestParm
=
GetRequestParm
();
UserInfo
userInfo
=
CacheManager
.
User
.
UserReidsCache
.
GetUserLoginInfo
(
requestParm
.
uid
);
RB_Property_Info_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Property_Info_Extend
>(
requestParm
.
msg
.
ToString
());
demodel
.
RB_Group_Id
=
userInfo
.
RB_Group_id
;
var
list
=
propertyModule
.
GetPropertyQRCodeList_V2
(
demodel
);
return
ApiResult
.
Success
(
""
,
list
.
Select
(
x
=>
new
{
x
.
Id
,
x
.
Name
,
x
.
PropertyNum
,
x
.
QRCode
}));
}
#
endregion
#
region
统计报表
...
...
@@ -4051,6 +4102,7 @@ namespace Property.WebApi.Controllers.User
}
demodel
.
EndTime
=
Convert
.
ToDateTime
(
demodel
.
EndTime
+
"-01"
).
AddMonths
(
1
).
AddDays
(-
1
).
ToString
(
"yyyy-MM-dd"
);
demodel
.
IsSelectDepreciation
=
1
;
demodel
.
IsDepreciation
=
1
;
demodel
.
RB_Group_Id
=
userInfo
.
RB_Group_id
;
var
list
=
propertyModule
.
GetDepreciationStatisticsPageList
(
pagelist
.
pageIndex
,
pagelist
.
pageSize
,
demodel
,
out
long
count
);
pagelist
.
count
=
Convert
.
ToInt32
(
count
);
...
...
@@ -4132,6 +4184,7 @@ namespace Property.WebApi.Controllers.User
demodel
.
EndTime
=
Convert
.
ToDateTime
(
demodel
.
EndTime
+
"-01"
).
AddMonths
(
1
).
AddDays
(-
1
).
ToString
(
"yyyy-MM-dd"
);
demodel
.
IsSelectDepreciation
=
1
;
demodel
.
IsDepreciation
=
1
;
demodel
.
RB_Group_Id
=
userInfo
.
RB_Group_id
;
var
list
=
propertyModule
.
GetDepreciationStatisticsList
(
demodel
);
...
...
Property.WebApi/Controllers/Property/SuppliesController.cs
View file @
958e71c6
This diff is collapsed.
Click to expand it.
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