Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
jyzb_local_platform
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
赵剑炜
jyzb_local_platform
Commits
dbc01356
Commit
dbc01356
authored
Dec 14, 2023
by
Seniorious
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
e4765c6a
隐藏空白字符变更
内嵌
并排
正在显示
24 个修改的文件
包含
591 行增加
和
35 行删除
+591
-35
BaseInfoController.cs
WebApiNET6-master/APIs/Controllers/BaseInfoController.cs
+217
-3
CommonReq.cs
WebApiNET6-master/APIs/Req/CommonReq.cs
+10
-0
Startup.cs
WebApiNET6-master/APIs/Startup.cs
+4
-0
RecordsReq.cs
WebApiNET6-master/Models/ReqModel/RecordsReq.cs
+9
-1
LogSummary.cs
WebApiNET6-master/Models/Table/LogSummary.cs
+11
-11
PoliceFinger.cs
WebApiNET6-master/Models/Table/PoliceFinger.cs
+34
-0
PoliceInfo.cs
WebApiNET6-master/Models/Table/PoliceInfo.cs
+89
-0
IBaseRepository.cs
WebApiNET6-master/Repositories/IRepository/IBaseRepository.cs
+1
-0
IOrderMainRepository.cs
WebApiNET6-master/Repositories/IRepository/IBussiness/IOrderMainRepository.cs
+1
-0
IPoliceFingerRepository.cs
WebApiNET6-master/Repositories/IRepository/IBussiness/IPoliceFingerRepository.cs
+13
-0
IPoliceInfoRepository.cs
WebApiNET6-master/Repositories/IRepository/IBussiness/IPoliceInfoRepository.cs
+13
-0
BaseRepository.cs
WebApiNET6-master/Repositories/Repository/BaseRepository.cs
+14
-3
LogSummaryRepository.cs
WebApiNET6-master/Repositories/Repository/Bussiness/LogSummaryRepository.cs
+8
-8
OrderMainRepository.cs
WebApiNET6-master/Repositories/Repository/Bussiness/OrderMainRepository.cs
+38
-1
PoliceFingerRepository.cs
WebApiNET6-master/Repositories/Repository/Bussiness/PoliceFingerRepository.cs
+19
-0
PoliceInfoRepository.cs
WebApiNET6-master/Repositories/Repository/Bussiness/PoliceInfoRepository.cs
+19
-0
BaseService.cs
WebApiNET6-master/Services/BaseService.cs
+5
-1
IBaseService.cs
WebApiNET6-master/Services/Interface/IBaseService.cs
+1
-0
IOrderService.cs
WebApiNET6-master/Services/Interface/IOrderService.cs
+3
-1
IPoliceFingerService.cs
WebApiNET6-master/Services/Interface/IPoliceFingerService.cs
+13
-0
IPoliceInfoService.cs
WebApiNET6-master/Services/Interface/IPoliceInfoService.cs
+13
-0
OrderService.cs
WebApiNET6-master/Services/OrderService.cs
+12
-6
PoliceFingerService.cs
WebApiNET6-master/Services/PoliceFingerService.cs
+22
-0
PoliceInfoService.cs
WebApiNET6-master/Services/PoliceInfoService.cs
+22
-0
没有找到文件。
WebApiNET6-master/APIs/Controllers/BaseInfoController.cs
View file @
dbc01356
...
@@ -14,6 +14,7 @@ using Models.SqlModel;
...
@@ -14,6 +14,7 @@ using Models.SqlModel;
using
Models.Table
;
using
Models.Table
;
using
Models.ToolsModel
;
using
Models.ToolsModel
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json
;
using
NuGet.Protocol
;
using
Services
;
using
Services
;
using
Services.Interface
;
using
Services.Interface
;
using
SqlSugar
;
using
SqlSugar
;
...
@@ -24,7 +25,10 @@ using System.Drawing;
...
@@ -24,7 +25,10 @@ using System.Drawing;
using
System.Drawing.Imaging
;
using
System.Drawing.Imaging
;
using
System.Linq
;
using
System.Linq
;
using
System.Linq.Expressions
;
using
System.Linq.Expressions
;
using
System.Runtime.InteropServices
;
using
System.Security.Cryptography
;
using
System.Security.Cryptography.Xml
;
using
System.Security.Cryptography.Xml
;
using
static
Dm
.
net
.
buffer
.
ByteArrayBuffer
;
using
static
Microsoft
.
AspNetCore
.
Razor
.
Language
.
TagHelperMetadata
;
using
static
Microsoft
.
AspNetCore
.
Razor
.
Language
.
TagHelperMetadata
;
using
static
System
.
Net
.
Mime
.
MediaTypeNames
;
using
static
System
.
Net
.
Mime
.
MediaTypeNames
;
...
@@ -50,12 +54,14 @@ namespace APIs.Controllers
...
@@ -50,12 +54,14 @@ namespace APIs.Controllers
private
readonly
ISupplierService
_supplierService
;
private
readonly
ISupplierService
_supplierService
;
private
readonly
IThisInfoService
_thisInfoService
;
private
readonly
IThisInfoService
_thisInfoService
;
private
readonly
IPrintService
_printService
;
private
readonly
IPrintService
_printService
;
private
readonly
IPoliceFingerService
_policeFingerService
;
private
readonly
IPoliceInfoService
_policeInfoService
;
public
BaseInfoController
(
IMapper
mapper
,
IPoliceService
policeService
,
IEquipmentTypeService
equipmentTypeService
,
public
BaseInfoController
(
IMapper
mapper
,
IPoliceService
policeService
,
IEquipmentTypeService
equipmentTypeService
,
IEquipmentSizeService
equipmentSizeService
,
ICarService
carService
,
IInventoryService
inventoryService
,
IEquipmentSizeService
equipmentSizeService
,
ICarService
carService
,
IInventoryService
inventoryService
,
IInvService
invService
,
IUsersService
usersService
,
ILogService
logService
,
IDevHistoryService
devHistoryService
,
IInvService
invService
,
IUsersService
usersService
,
ILogService
logService
,
IDevHistoryService
devHistoryService
,
IDevService
devService
,
IWarehouseService
warehouseService
,
IOrderService
orderService
,
ISupplierService
supplierService
,
IDevService
devService
,
IWarehouseService
warehouseService
,
IOrderService
orderService
,
ISupplierService
supplierService
,
IThisInfoService
thisInfoService
,
IPrintService
printService
)
IThisInfoService
thisInfoService
,
IPrintService
printService
,
IPoliceFingerService
policeFingerService
,
IPoliceInfoService
policeInfoService
)
{
{
_carService
=
carService
;
_carService
=
carService
;
_equipmentSizeService
=
equipmentSizeService
;
_equipmentSizeService
=
equipmentSizeService
;
...
@@ -72,9 +78,217 @@ namespace APIs.Controllers
...
@@ -72,9 +78,217 @@ namespace APIs.Controllers
_supplierService
=
supplierService
;
_supplierService
=
supplierService
;
_thisInfoService
=
thisInfoService
;
_thisInfoService
=
thisInfoService
;
_printService
=
printService
;
_printService
=
printService
;
_policeFingerService
=
policeFingerService
;
_policeInfoService
=
policeInfoService
;
Mapper
=
mapper
;
Mapper
=
mapper
;
}
}
/// <summary>
/// 手持机上传单据操作结果
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
async
Task
<
ApiResult
>
HandUploadResult
([
FromBody
]
HandResultReq
req
)
{
try
{
var
src
=
new
ApiResult
{
code
=
ResultCode
.
OPERATE_SUCCESS
.
Code
,
msg
=
ResultCode
.
OPERATE_SUCCESS
.
Msg
,
};
return
src
;
}
catch
(
Exception
ex
)
{
var
error
=
new
ApiResult
{
code
=
ResultCode
.
OPERATE_FAILED
.
Code
,
msg
=
ex
.
Message
,
};
return
error
;
}
}
/// <summary>
/// 手持机获取单据
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[
HttpPost
]
public
async
Task
<
ApiResult
>
HandGetOrder
([
FromBody
]
HandGetOrderReq
req
)
{
try
{
if
(
string
.
IsNullOrEmpty
(
req
.
warehouseId
))
{
return
new
ApiResult
{
code
=
ResultCode
.
OPERATE_FAILED
.
Code
,
msg
=
"参数不正确"
,
};
}
var
orders
=
await
_orderService
.
QueryHandOrder
(
req
.
warehouseId
);
var
src
=
new
ApiResult
{
code
=
ResultCode
.
OPERATE_SUCCESS
.
Code
,
msg
=
ResultCode
.
OPERATE_SUCCESS
.
Msg
,
data
=
orders
,
};
return
src
;
}
catch
(
Exception
ex
)
{
var
error
=
new
ApiResult
{
code
=
ResultCode
.
OPERATE_FAILED
.
Code
,
msg
=
ex
.
Message
,
};
return
error
;
}
}
/// <summary>
/// 手持机获取装备类别号型信息
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[
HttpGet
]
public
async
Task
<
ApiResult
>
HandEquBaseInfo
()
{
try
{
var
types
=
await
_equipmentTypeService
.
Query
();
var
sizes
=
await
_equipmentSizeService
.
Query
();
var
rs
=
sizes
.
Select
(
s
=>
new
{
s
.
id
,
s
.
typeId
,
s
.
name
,
s
.
code
,
typeName
=
types
.
FirstOrDefault
(
x
=>
s
.
typeId
.
Equals
(
x
.
id
))?.
name
}).
ToList
();
var
src
=
new
ApiResult
{
code
=
ResultCode
.
OPERATE_SUCCESS
.
Code
,
msg
=
ResultCode
.
OPERATE_SUCCESS
.
Msg
,
data
=
rs
,
};
return
src
;
}
catch
(
Exception
ex
)
{
var
error
=
new
ApiResult
{
code
=
ResultCode
.
OPERATE_FAILED
.
Code
,
msg
=
ex
.
Message
,
};
return
error
;
}
}
/// <summary>
/// 通过人脸机人员标识获取警员信息
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
async
Task
<
ApiResult
>
GetPoliceInfoByHkDevice
([
FromBody
]
GetPoliceInfoByHkDeviceReq
req
)
{
try
{
if
(
req
==
null
)
{
return
new
ApiResult
{
code
=
ResultCode
.
OPERATE_SUCCESS
.
Code
,
msg
=
"无效参数"
,
};
}
var
baseinfo
=
await
_policeInfoService
.
QueryOne
(
s
=>
s
.
HkFaceDevice
==
req
.
hkDevice
);
if
(
baseinfo
!=
null
)
{
var
info
=
new
{
policeId
=
baseinfo
.
id
,
policeName
=
baseinfo
.
name
,
orgId
=
baseinfo
.
orgId
,
};
return
new
ApiResult
{
code
=
ResultCode
.
OPERATE_SUCCESS
.
Code
,
msg
=
ResultCode
.
OPERATE_SUCCESS
.
Msg
,
data
=
info
};
}
else
{
return
new
ApiResult
{
code
=
ResultCode
.
OPERATE_FAILED
.
Code
,
msg
=
"无匹配警员信息"
,
};
}
}
catch
(
Exception
ex
)
{
var
error
=
new
ApiResult
{
code
=
ResultCode
.
OPERATE_FAILED
.
Code
,
msg
=
ex
.
Message
,
};
return
error
;
}
}
/// <summary>
/// 获取警员信息
/// </summary>
/// <returns></returns>
[
HttpGet
]
public
async
Task
<
ApiResult
>
GetPoliceInfo
()
{
try
{
var
fingers
=
await
_policeFingerService
.
Query
();
var
info
=
(
await
_policeInfoService
.
Query
())?.
Select
(
s
=>
new
{
id
=
s
.
id
,
name
=
s
.
name
,
policeCode
=
s
.
HkFaceDevice
,
photo
=
s
.
photo
,
carNo
=
s
.
HkFaceDevice
,
createTime
=
s
.
createTime
,
updateTime
=
s
.
updateTime
,
fingerList
=
fingers
.
Where
(
c
=>
c
.
policeId
.
Equals
(
s
.
id
)).
ToList
(),
}).
ToList
();
var
src
=
new
ApiResult
{
code
=
ResultCode
.
OPERATE_SUCCESS
.
Code
,
msg
=
ResultCode
.
OPERATE_SUCCESS
.
Msg
,
data
=
info
};
return
src
;
}
catch
(
Exception
ex
)
{
var
error
=
new
ApiResult
{
code
=
ResultCode
.
OPERATE_FAILED
.
Code
,
msg
=
ex
.
Message
,
};
return
error
;
}
}
/// <summary>
/// <summary>
/// 通道上传出入库信息
/// 通道上传出入库信息
...
@@ -518,12 +732,12 @@ namespace APIs.Controllers
...
@@ -518,12 +732,12 @@ namespace APIs.Controllers
}
}
/// <summary>
/// <summary>
/// 手持机出入库记录上传
/// 手持机出入库记录上传
海南版
/// </summary>
/// </summary>
/// <param name=""></param>
/// <param name=""></param>
/// <returns></returns>
/// <returns></returns>
[
HttpPost
]
[
HttpPost
]
public
virtual
async
Task
<
ApiResult
>
UploadHandRecord
([
FromBody
]
HandRecordsReq
req
)
public
virtual
async
Task
<
ApiResult
>
UploadHandRecord
SP
([
FromBody
]
HandRecordsReq
req
)
{
{
try
try
{
{
...
...
WebApiNET6-master/APIs/Req/CommonReq.cs
View file @
dbc01356
...
@@ -4,4 +4,14 @@
...
@@ -4,4 +4,14 @@
{
{
public
String
updateTime
{
get
;
set
;
}
public
String
updateTime
{
get
;
set
;
}
}
}
public
class
HandGetOrderReq
{
public
string
warehouseId
{
get
;
set
;
}
}
public
class
GetPoliceInfoByHkDeviceReq
{
public
int
hkDevice
{
get
;
set
;
}
}
}
}
WebApiNET6-master/APIs/Startup.cs
View file @
dbc01356
...
@@ -73,6 +73,8 @@ namespace APIs
...
@@ -73,6 +73,8 @@ namespace APIs
services
.
AddScoped
<
IDevHistoryService
,
DevHistoryService
>();
services
.
AddScoped
<
IDevHistoryService
,
DevHistoryService
>();
services
.
AddScoped
<
IWarehouseService
,
WarehouseService
>();
services
.
AddScoped
<
IWarehouseService
,
WarehouseService
>();
services
.
AddScoped
<
ISupplierService
,
SupplierService
>();
services
.
AddScoped
<
ISupplierService
,
SupplierService
>();
services
.
AddScoped
<
IPoliceInfoService
,
PoliceInfoService
>();
services
.
AddScoped
<
IPoliceFingerService
,
PoliceFingerService
>();
#
endregion
#
endregion
#
region
Repository
#
region
Repository
...
@@ -95,6 +97,8 @@ namespace APIs
...
@@ -95,6 +97,8 @@ namespace APIs
services
.
AddScoped
<
IDevHistoryRepository
,
DevHistoryRepository
>();
services
.
AddScoped
<
IDevHistoryRepository
,
DevHistoryRepository
>();
services
.
AddScoped
<
IWarehouseRepository
,
WarehouseRepository
>();
services
.
AddScoped
<
IWarehouseRepository
,
WarehouseRepository
>();
services
.
AddScoped
<
ISupplierRepository
,
SupplierRepository
>();
services
.
AddScoped
<
ISupplierRepository
,
SupplierRepository
>();
services
.
AddScoped
<
IPoliceInfoRepository
,
PoliceInfoRepository
>();
services
.
AddScoped
<
IPoliceFingerRepository
,
PoliceFingerRepository
>();
#
endregion
#
endregion
#
region
注册
RabbitMQ
消费者
#
region
注册
RabbitMQ
消费者
...
...
WebApiNET6-master/Models/ReqModel/RecordsReq.cs
View file @
dbc01356
using
System
;
using
Models.Table
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Diagnostics.CodeAnalysis
;
using
System.Diagnostics.CodeAnalysis
;
using
System.Linq
;
using
System.Linq
;
...
@@ -64,4 +65,11 @@ namespace Common.Utility.Model
...
@@ -64,4 +65,11 @@ namespace Common.Utility.Model
public
string
warehouseId
{
get
;
set
;
}
public
string
warehouseId
{
get
;
set
;
}
public
string
picture
{
get
;
set
;
}
public
string
picture
{
get
;
set
;
}
}
}
public
class
HandResultReq
{
public
OrderDetail
order
{
get
;
set
;
}
public
List
<
LogSummary
>
logList
{
get
;
set
;
}
public
List
<
Inventory
>?
purchaseList
{
get
;
set
;
}
}
}
}
WebApiNET6-master/Models/Table/LogSummary.cs
View file @
dbc01356
...
@@ -16,43 +16,43 @@ namespace Models.Table
...
@@ -16,43 +16,43 @@ namespace Models.Table
public
int
id
{
get
;
set
;
}
public
int
id
{
get
;
set
;
}
[
SugarColumn
(
ColumnName
=
"cabinet_id"
)]
[
SugarColumn
(
ColumnName
=
"cabinet_id"
)]
public
S
tring
cabinetId
{
get
;
set
;
}
public
s
tring
cabinetId
{
get
;
set
;
}
public
int
type
{
get
;
set
;
}
public
int
type
{
get
;
set
;
}
[
SugarColumn
(
ColumnName
=
"user_name"
)]
[
SugarColumn
(
ColumnName
=
"user_name"
)]
public
String
?
userName
{
get
;
set
;
}
public
string
userName
{
get
;
set
;
}
public
String
?
equipments
{
get
;
set
;
}
public
string
equipments
{
get
;
set
;
}
[
SugarColumn
(
ColumnName
=
"use_time"
)]
[
SugarColumn
(
ColumnName
=
"use_time"
)]
public
DateTime
?
useTime
{
get
;
set
;
}
public
DateTime
?
useTime
{
get
;
set
;
}
[
SugarColumn
(
ColumnName
=
"order_id"
)]
[
SugarColumn
(
ColumnName
=
"order_id"
)]
public
String
?
orderId
{
get
;
set
;
}
public
string
orderId
{
get
;
set
;
}
[
SugarColumn
(
ColumnName
=
"order_code"
)]
[
SugarColumn
(
ColumnName
=
"order_code"
)]
public
String
?
orderCode
{
get
;
set
;
}
public
string
orderCode
{
get
;
set
;
}
[
SugarColumn
(
ColumnName
=
"bussiness_type"
)]
[
SugarColumn
(
ColumnName
=
"bussiness_type"
)]
public
String
?
bussinessType
{
get
;
set
;
}
public
string
bussinessType
{
get
;
set
;
}
[
SugarColumn
(
ColumnName
=
"device"
)]
[
SugarColumn
(
ColumnName
=
"device"
)]
public
String
?
device
{
get
;
set
;
}
public
string
device
{
get
;
set
;
}
[
SugarColumn
(
ColumnName
=
"device_type"
)]
[
SugarColumn
(
ColumnName
=
"device_type"
)]
public
int
?
deviceType
{
get
;
set
;
}
public
int
?
deviceType
{
get
;
set
;
}
[
SugarColumn
(
ColumnName
=
"location_id"
)]
[
SugarColumn
(
ColumnName
=
"location_id"
)]
public
String
?
locationId
{
get
;
set
;
}
public
string
locationId
{
get
;
set
;
}
[
SugarColumn
(
ColumnName
=
"location_name"
)]
[
SugarColumn
(
ColumnName
=
"location_name"
)]
public
String
?
locationName
{
get
;
set
;
}
public
string
locationName
{
get
;
set
;
}
[
SugarColumn
(
ColumnName
=
"out_in_state"
)]
[
SugarColumn
(
ColumnName
=
"out_in_state"
)]
public
String
?
outInState
{
get
;
set
;
}
public
string
outInState
{
get
;
set
;
}
public
String
?
picture
{
get
;
set
;
}
public
string
picture
{
get
;
set
;
}
public
int
?
number
{
get
;
set
;
}
public
int
?
number
{
get
;
set
;
}
...
...
WebApiNET6-master/Models/Table/PoliceFinger.cs
0 → 100644
View file @
dbc01356
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
SqlSugar
;
namespace
Models.Table
{
/// <summary>
///
///</summary>
[
SugarTable
(
"base_police_finger"
)]
public
class
PoliceFinger
:
BaseTable
{
/// <summary>
/// 指纹id
///</summary>
[
SugarColumn
(
ColumnName
=
"id"
,
IsPrimaryKey
=
true
,
IsIdentity
=
true
)]
public
int
id
{
get
;
set
;
}
/// <summary>
/// 警员id
///</summary>
[
SugarColumn
(
ColumnName
=
"police_id"
)]
public
string
policeId
{
get
;
set
;
}
/// <summary>
/// 指纹信息名称
///</summary>
[
SugarColumn
(
ColumnName
=
"name"
)]
public
string
name
{
get
;
set
;
}
/// <summary>
/// 指纹信息
///</summary>
[
SugarColumn
(
ColumnName
=
"finger_info"
)]
public
string
fingerInfo
{
get
;
set
;
}
}
}
WebApiNET6-master/Models/Table/PoliceInfo.cs
0 → 100644
View file @
dbc01356
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
SqlSugar
;
namespace
Models.Table
{
/// <summary>
///
///</summary>
[
SugarTable
(
"base_policeman"
)]
public
class
PoliceInfo
:
BaseTable
{
/// <summary>
/// 警员id
///</summary>
[
SugarColumn
(
ColumnName
=
"id"
,
IsPrimaryKey
=
true
)]
public
string
id
{
get
;
set
;
}
/// <summary>
/// 警员名称
///</summary>
[
SugarColumn
(
ColumnName
=
"name"
)]
public
string
name
{
get
;
set
;
}
/// <summary>
/// 新版本组织机构外键
///</summary>
[
SugarColumn
(
ColumnName
=
"org_id"
)]
public
long
?
orgId
{
get
;
set
;
}
/// <summary>
/// 警员编号
///</summary>
[
SugarColumn
(
ColumnName
=
"police_code"
)]
public
string
policeCode
{
get
;
set
;
}
/// <summary>
/// 人脸信息
///</summary>
[
SugarColumn
(
ColumnName
=
"face_info"
)]
public
string
faceInfo
{
get
;
set
;
}
/// <summary>
/// 门禁使用编码
///</summary>
[
SugarColumn
(
ColumnName
=
"door_code"
)]
public
string
doorCode
{
get
;
set
;
}
/// <summary>
/// 密码
///</summary>
[
SugarColumn
(
ColumnName
=
"password"
)]
public
string
password
{
get
;
set
;
}
/// <summary>
/// 警员照片
///</summary>
[
SugarColumn
(
ColumnName
=
"photo"
)]
public
string
photo
{
get
;
set
;
}
/// <summary>
/// 联系方式(短号)
///</summary>
[
SugarColumn
(
ColumnName
=
"phone"
)]
public
string
phone
{
get
;
set
;
}
/// <summary>
/// 联系方式(长号)
///</summary>
[
SugarColumn
(
ColumnName
=
"tel"
)]
public
string
tel
{
get
;
set
;
}
/// <summary>
/// 身份证信息
///</summary>
[
SugarColumn
(
ColumnName
=
"id_card"
)]
public
string
idCard
{
get
;
set
;
}
/// <summary>
/// 状态,1表启用,0表禁用
///</summary>
[
SugarColumn
(
ColumnName
=
"state"
)]
public
int
state
{
get
;
set
;
}
/// <summary>
/// 用户id(账号id)
///</summary>
[
SugarColumn
(
ColumnName
=
"user_id"
)]
public
long
?
userId
{
get
;
set
;
}
/// <summary>
/// 警员身份(0表示警员,1表示辅警)
///</summary>
[
SugarColumn
(
ColumnName
=
"identity"
)]
public
int
?
identity
{
get
;
set
;
}
/// <summary>
/// 海康人脸机
///</summary>
[
SugarColumn
(
ColumnName
=
"hk_face_device"
)]
public
int
HkFaceDevice
{
get
;
set
;
}
}
}
WebApiNET6-master/Repositories/IRepository/IBaseRepository.cs
View file @
dbc01356
...
@@ -23,6 +23,7 @@ namespace Repositories.IRepository
...
@@ -23,6 +23,7 @@ namespace Repositories.IRepository
Task
<
List
<
TEntity
>>
Query
();
Task
<
List
<
TEntity
>>
Query
();
Task
<
List
<
TEntity
>>
Query
(
Expression
<
Func
<
TEntity
,
bool
>>
whereExpression
);
Task
<
List
<
TEntity
>>
Query
(
Expression
<
Func
<
TEntity
,
bool
>>
whereExpression
);
Task
<
List
<
T
>>
Query
<
T
>(
Expression
<
Func
<
T
,
bool
>>
whereExpression
,
Expression
<
Func
<
T
,
object
>>
includeExpression
);
Task
<
PageModel
<
TEntity
>>
QueryPage
(
Expression
<
Func
<
TEntity
,
bool
>>
whereExpression
,
int
intPageIndex
=
1
,
int
intPageSize
=
20
,
string
strOrderByFileds
=
null
);
Task
<
PageModel
<
TEntity
>>
QueryPage
(
Expression
<
Func
<
TEntity
,
bool
>>
whereExpression
,
int
intPageIndex
=
1
,
int
intPageSize
=
20
,
string
strOrderByFileds
=
null
);
Task
<
PageModel
<
TResult
>>
QueryMuch
<
T
,
T2
,
T3
,
TResult
>(
Task
<
PageModel
<
TResult
>>
QueryMuch
<
T
,
T2
,
T3
,
TResult
>(
int
intPageIndex
,
int
intPageIndex
,
...
...
WebApiNET6-master/Repositories/IRepository/IBussiness/IOrderMainRepository.cs
View file @
dbc01356
...
@@ -9,5 +9,6 @@ namespace Repositories.IRepository.IBussiness
...
@@ -9,5 +9,6 @@ namespace Repositories.IRepository.IBussiness
{
{
public
interface
IOrderMainRepository
:
IBaseRepository
<
OrderMain
>
public
interface
IOrderMainRepository
:
IBaseRepository
<
OrderMain
>
{
{
Task
<
object
>
QueryHandOrder
(
string
warehouseId
);
}
}
}
}
WebApiNET6-master/Repositories/IRepository/IBussiness/IPoliceFingerRepository.cs
0 → 100644
View file @
dbc01356
using
Models.Table
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
Repositories.IRepository.IBussiness
{
public
interface
IPoliceFingerRepository
:
IBaseRepository
<
PoliceFinger
>
{
}
}
WebApiNET6-master/Repositories/IRepository/IBussiness/IPoliceInfoRepository.cs
0 → 100644
View file @
dbc01356
using
Models.Table
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
Repositories.IRepository.IBussiness
{
public
interface
IPoliceInfoRepository
:
IBaseRepository
<
PoliceInfo
>
{
}
}
WebApiNET6-master/Repositories/Repository/BaseRepository.cs
View file @
dbc01356
...
@@ -9,6 +9,8 @@ using System.Text;
...
@@ -9,6 +9,8 @@ using System.Text;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
Repositories.IRepository.IUnitOfWork
;
using
Repositories.IRepository.IUnitOfWork
;
using
SqlSugar
;
using
SqlSugar
;
using
System.Net.WebSockets
;
using
Models.Table
;
namespace
Repositories.Repository
namespace
Repositories.Repository
{
{
...
@@ -107,6 +109,17 @@ namespace Repositories.Repository
...
@@ -107,6 +109,17 @@ namespace Repositories.Repository
}
}
public
async
Task
<
List
<
T
>>
Query
<
T
>(
Expression
<
Func
<
T
,
bool
>>
whereExpression
,
Expression
<
Func
<
T
,
object
>>
includeExpression
)
{
using
(
var
context
=
_db
.
GetDbClient
())
{
//var c = await context.Queryable<T>().Includes(includeExpression).WhereIF(whereExpression != null, whereExpression).ToListAsync();
return
await
context
.
Queryable
<
T
>().
Includes
(
includeExpression
).
WhereIF
(
whereExpression
!=
null
,
whereExpression
).
ToListAsync
();
}
}
public
async
Task
<
PageModel
<
TEntity
>>
QueryPage
(
public
async
Task
<
PageModel
<
TEntity
>>
QueryPage
(
Expression
<
Func
<
TEntity
,
bool
>>
whereExpression
,
Expression
<
Func
<
TEntity
,
bool
>>
whereExpression
,
...
@@ -134,9 +147,7 @@ namespace Repositories.Repository
...
@@ -134,9 +147,7 @@ namespace Repositories.Repository
string
strOrderByFileds
,
string
strOrderByFileds
,
string
where
,
string
where
,
Expression
<
Func
<
T
,
T2
,
T3
,
object
[
]>
>
joinExpression
,
Expression
<
Func
<
T
,
T2
,
T3
,
object
[
]>
>
joinExpression
,
Expression
<
Func
<
T
,
T2
,
T3
,
TResult
>>
selectExpression
Expression
<
Func
<
T
,
T2
,
T3
,
TResult
>>
selectExpression
)
where
T
:
class
,
new
()
)
where
T
:
class
,
new
()
{
{
using
(
var
context
=
_db
.
GetDbClient
())
using
(
var
context
=
_db
.
GetDbClient
())
{
{
...
...
WebApiNET6-master/Repositories/Repository/Bussiness/LogSummaryRepository.cs
View file @
dbc01356
...
@@ -33,6 +33,7 @@ namespace Repositories.Repository.Bussiness
...
@@ -33,6 +33,7 @@ namespace Repositories.Repository.Bussiness
{
{
var
inv_rs
=
context
.
Insertable
(
newInvs
).
ExecuteCommand
();
var
inv_rs
=
context
.
Insertable
(
newInvs
).
ExecuteCommand
();
//采购单据的出入库记录加入库存id
summary
.
DetailList
.
ForEach
(
s
=>
summary
.
DetailList
.
ForEach
(
s
=>
{
{
s
.
inventoryId
=
context
.
Queryable
<
Inventory
>().
First
(
n
=>
n
.
epc
.
Equals
(
s
.
epc
))?.
id
;
s
.
inventoryId
=
context
.
Queryable
<
Inventory
>().
First
(
n
=>
n
.
epc
.
Equals
(
s
.
epc
))?.
id
;
...
@@ -56,16 +57,15 @@ namespace Repositories.Repository.Bussiness
...
@@ -56,16 +57,15 @@ namespace Repositories.Repository.Bussiness
if
(
myOrder
!=
null
)
if
(
myOrder
!=
null
)
{
{
//子表
//子表
List
<
LogDetail
>
details
=
new
List
<
LogDetail
>();
var
ids
=
context
.
Queryable
<
LogSummary
>()
context
.
Queryable
<
LogSummary
>()
.
Where
(
s
=>
s
.
orderId
.
Equals
(
myOrder
.
id
))
.
Where
(
s
=>
s
.
orderId
.
Equals
(
myOrder
.
id
))
.
Select
(
s
=>
s
.
DetailList
)
.
Select
(
s
=>
s
.
id
).
ToList
();
.
ForEach
(
s
=>
{
List
<
LogDetail
>
details
=
context
.
Queryable
<
LogDetail
>()
details
.
AddRange
(
s
);
.
Where
(
s
=>
ids
.
Contains
(
s
.
summaryId
)).
ToList
(
);
});
var
detailSumDic
=
details
var
detailSumDic
=
details
.
GroupBy
(
s
=>
new
{
s
.
equipmentSizeId
,
s
.
epc
})
.
GroupBy
(
s
=>
new
{
s
.
equipmentSizeId
,
s
.
epc
})
//避免1个EPC重复出入库导致单据反复计数
.
Select
(
s
=>
new
{
size
=
s
.
Key
.
equipmentSizeId
,
epc
=
s
.
Key
.
epc
})
.
Select
(
s
=>
new
{
size
=
s
.
Key
.
equipmentSizeId
,
epc
=
s
.
Key
.
epc
})
.
GroupBy
(
s
=>
s
.
size
)
.
GroupBy
(
s
=>
s
.
size
)
.
Select
(
s
=>
new
{
size
=
s
.
Key
,
count
=
s
.
Count
()
})
.
Select
(
s
=>
new
{
size
=
s
.
Key
,
count
=
s
.
Count
()
})
...
...
WebApiNET6-master/Repositories/Repository/Bussiness/OrderMainRepository.cs
View file @
dbc01356
using
Models.Table
;
using
AutoMapper
;
using
Models.Table
;
using
Repositories.IRepository.IBussiness
;
using
Repositories.IRepository.IBussiness
;
using
Repositories.IRepository.IUnitOfWork
;
using
Repositories.IRepository.IUnitOfWork
;
using
SqlSugar
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
...
@@ -11,9 +13,44 @@ namespace Repositories.Repository.Bussiness
...
@@ -11,9 +13,44 @@ namespace Repositories.Repository.Bussiness
{
{
public
class
OrderMainRepository
:
BaseRepository
<
OrderMain
>,
IOrderMainRepository
public
class
OrderMainRepository
:
BaseRepository
<
OrderMain
>,
IOrderMainRepository
{
{
protected
readonly
ILocalSugarUnitOfWork
_suger
;
public
IMapper
mapper
;
public
OrderMainRepository
(
ILocalSugarUnitOfWork
sugarUnitOfWork
)
:
base
(
sugarUnitOfWork
)
public
OrderMainRepository
(
ILocalSugarUnitOfWork
sugarUnitOfWork
)
:
base
(
sugarUnitOfWork
)
{
{
_suger
=
sugarUnitOfWork
;
}
public
async
Task
<
object
>
QueryHandOrder
(
string
warehouseId
)
{
using
(
var
context
=
_suger
.
GetDbClient
())
{
//var orders = await context.Queryable<OrderDetail>()
// .RightJoin<OrderMain>((c, j) => c.orderId == j.id)
// .Where((c, j) => c.warehouseId.Equals(warehouseId) && c.createTime.Equals(c.updateTime) && j.orderState == 0)
// //.Select<dynamic>((c, j) => new { id = c.id.SelectAll(), bussinessType = j.bussinessType, orderType = j.orderType })
// .ToListAsync();
//var mainids = orders.GroupBy(s => s.orderId).Select(s => s.Key).ToList();
object
result
=
await
context
.
Queryable
<
OrderMain
>()
.
RightJoin
<
OrderDetail
>((
c
,
j
)
=>
c
.
id
==
j
.
orderId
)
.
Where
((
c
,
j
)
=>
j
.
warehouseId
.
Equals
(
warehouseId
)
&&
j
.
createTime
.
Equals
(
j
.
updateTime
)
&&
c
.
orderState
==
0
)
.
Select
(
c
=>
new
{
orderId
=
c
.
id
,
c
.
bussinessType
,
c
.
invList
,
c
.
inventoryQuantity
,
c
.
orderType
,
c
.
orderCode
,
c
.
createTime
,
detailList
=
SqlFunc
.
Subqueryable
<
OrderDetail
>().
Where
(
s
=>
s
.
orderId
.
Equals
(
c
.
id
)).
ToList
(),
}).
ToListAsync
();
;
return
result
;
}
}
}
}
}
}
}
WebApiNET6-master/Repositories/Repository/Bussiness/PoliceFingerRepository.cs
0 → 100644
View file @
dbc01356
using
Models.Table
;
using
Repositories.IRepository.IBussiness
;
using
Repositories.IRepository.IUnitOfWork
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
Repositories.Repository.Bussiness
{
public
class
PoliceFingerRepository
:
BaseRepository
<
PoliceFinger
>,
IPoliceFingerRepository
{
public
PoliceFingerRepository
(
ILocalSugarUnitOfWork
sugarUnitOfWork
)
:
base
(
sugarUnitOfWork
)
{
}
}
}
WebApiNET6-master/Repositories/Repository/Bussiness/PoliceInfoRepository.cs
0 → 100644
View file @
dbc01356
using
Models.Table
;
using
Repositories.IRepository.IBussiness
;
using
Repositories.IRepository.IUnitOfWork
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
Repositories.Repository.Bussiness
{
public
class
PoliceInfoRepository
:
BaseRepository
<
PoliceInfo
>,
IPoliceInfoRepository
{
public
PoliceInfoRepository
(
ILocalSugarUnitOfWork
sugarUnitOfWork
)
:
base
(
sugarUnitOfWork
)
{
}
}
}
WebApiNET6-master/Services/BaseService.cs
View file @
dbc01356
...
@@ -78,6 +78,11 @@ namespace Services
...
@@ -78,6 +78,11 @@ namespace Services
return
await
BaseDal
.
Query
(
whereExpression
);
return
await
BaseDal
.
Query
(
whereExpression
);
}
}
public
async
Task
<
List
<
T
>>
Query
<
T
>(
Expression
<
Func
<
T
,
bool
>>
whereExpression
,
Expression
<
Func
<
T
,
object
>>
includeExpression
)
{
return
await
BaseDal
.
Query
(
whereExpression
,
includeExpression
);
}
public
async
Task
<
PageModel
<
TEntity
>>
QueryPage
(
Expression
<
Func
<
TEntity
,
bool
>>
whereExpression
,
public
async
Task
<
PageModel
<
TEntity
>>
QueryPage
(
Expression
<
Func
<
TEntity
,
bool
>>
whereExpression
,
int
intPageIndex
=
1
,
int
intPageSize
=
20
,
string
strOrderByFileds
=
null
)
int
intPageIndex
=
1
,
int
intPageSize
=
20
,
string
strOrderByFileds
=
null
)
{
{
...
@@ -103,6 +108,5 @@ namespace Services
...
@@ -103,6 +108,5 @@ namespace Services
selectExpression
selectExpression
);
);
}
}
}
}
}
}
WebApiNET6-master/Services/Interface/IBaseService.cs
View file @
dbc01356
...
@@ -25,6 +25,7 @@ namespace Services.Interface
...
@@ -25,6 +25,7 @@ namespace Services.Interface
Task
<
List
<
TEntity
>>
Query
();
Task
<
List
<
TEntity
>>
Query
();
Task
<
List
<
TEntity
>>
Query
(
Expression
<
Func
<
TEntity
,
bool
>>
whereExpression
);
Task
<
List
<
TEntity
>>
Query
(
Expression
<
Func
<
TEntity
,
bool
>>
whereExpression
);
Task
<
List
<
T
>>
Query
<
T
>(
Expression
<
Func
<
T
,
bool
>>
whereExpression
,
Expression
<
Func
<
T
,
object
>>
includeExpression
);
Task
<
PageModel
<
TEntity
>>
QueryPage
(
Expression
<
Func
<
TEntity
,
bool
>>
whereExpression
,
int
intPageIndex
=
1
,
int
intPageSize
=
20
,
string
strOrderByFileds
=
null
);
Task
<
PageModel
<
TEntity
>>
QueryPage
(
Expression
<
Func
<
TEntity
,
bool
>>
whereExpression
,
int
intPageIndex
=
1
,
int
intPageSize
=
20
,
string
strOrderByFileds
=
null
);
Task
<
PageModel
<
TResult
>>
QueryMuch
<
T
,
T2
,
T3
,
TResult
>(
Task
<
PageModel
<
TResult
>>
QueryMuch
<
T
,
T2
,
T3
,
TResult
>(
int
intPageIndex
,
int
intPageIndex
,
...
...
WebApiNET6-master/Services/Interface/IOrderService.cs
View file @
dbc01356
using
Models.Table
;
using
Common.Utility.Model
;
using
Models.Table
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
...
@@ -9,5 +10,6 @@ namespace Services.Interface
...
@@ -9,5 +10,6 @@ namespace Services.Interface
{
{
public
interface
IOrderService
:
IBaseServices
<
OrderMain
>
public
interface
IOrderService
:
IBaseServices
<
OrderMain
>
{
{
Task
<
object
>
QueryHandOrder
(
string
warehouseId
);
}
}
}
}
WebApiNET6-master/Services/Interface/IPoliceFingerService.cs
0 → 100644
View file @
dbc01356
using
Models.Table
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
Services.Interface
{
public
interface
IPoliceFingerService
:
IBaseServices
<
PoliceFinger
>
{
}
}
WebApiNET6-master/Services/Interface/IPoliceInfoService.cs
0 → 100644
View file @
dbc01356
using
Models.Table
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
Services.Interface
{
public
interface
IPoliceInfoService
:
IBaseServices
<
PoliceInfo
>
{
}
}
WebApiNET6-master/Services/OrderService.cs
View file @
dbc01356
using
AutoMapper
;
using
AutoMapper
;
using
Models.Table
;
using
Models.Table
;
using
Repositories.IRepository.IBussiness
;
using
Repositories.IRepository.IBussiness
;
using
Repositories.Repository.Bussiness
;
using
Services.Interface
;
using
Services.Interface
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
...
@@ -12,16 +13,21 @@ namespace Services
...
@@ -12,16 +13,21 @@ namespace Services
{
{
public
class
OrderService
:
BaseService
<
OrderMain
>,
IOrderService
public
class
OrderService
:
BaseService
<
OrderMain
>,
IOrderService
{
{
private
readonly
IOrderMainRepository
_
O
rderMainRepository
;
private
readonly
IOrderMainRepository
_
o
rderMainRepository
;
private
readonly
IOrderDetailRepository
_
O
rderDetailRepository
;
private
readonly
IOrderDetailRepository
_
o
rderDetailRepository
;
public
IMapper
mapper
;
public
IMapper
mapper
;
public
OrderService
(
IOrderMainRepository
OrderMainRepository
,
IOrderDetailRepository
O
rderDetailepository
,
IMapper
_mapper
)
public
OrderService
(
IOrderMainRepository
orderMainRepository
,
IOrderDetailRepository
o
rderDetailepository
,
IMapper
_mapper
)
{
{
base
.
BaseDal
=
O
rderMainRepository
;
base
.
BaseDal
=
o
rderMainRepository
;
_
OrderMainRepository
=
O
rderMainRepository
;
_
orderMainRepository
=
o
rderMainRepository
;
_
OrderDetailRepository
=
O
rderDetailepository
;
_
orderDetailRepository
=
o
rderDetailepository
;
mapper
=
_mapper
;
mapper
=
_mapper
;
}
}
public
Task
<
object
>
QueryHandOrder
(
string
warehouseId
)
{
return
_orderMainRepository
.
QueryHandOrder
(
warehouseId
);
}
}
}
}
}
WebApiNET6-master/Services/PoliceFingerService.cs
0 → 100644
View file @
dbc01356
using
Models.Table
;
using
Repositories.IRepository.IBussiness
;
using
Services.Interface
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
Services
{
public
class
PoliceFingerService
:
BaseService
<
PoliceFinger
>,
IPoliceFingerService
{
private
readonly
IPoliceFingerRepository
_policeFingerRepository
;
public
PoliceFingerService
(
IPoliceFingerRepository
policeFingerRepository
)
{
base
.
BaseDal
=
policeFingerRepository
;
_policeFingerRepository
=
policeFingerRepository
;
}
}
}
WebApiNET6-master/Services/PoliceInfoService.cs
0 → 100644
View file @
dbc01356
using
Models.Table
;
using
Repositories.IRepository.IBussiness
;
using
Services.Interface
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
Services
{
public
class
PoliceInfoService
:
BaseService
<
PoliceInfo
>,
IPoliceInfoService
{
private
readonly
IPoliceInfoRepository
_policeInfoRepository
;
public
PoliceInfoService
(
IPoliceInfoRepository
policeInfoRepository
)
{
base
.
BaseDal
=
policeInfoRepository
;
_policeInfoRepository
=
policeInfoRepository
;
}
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论