Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
JPSMysql
概览
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
zxw
JPSMysql
Commits
f565d820
Commit
f565d820
authored
Nov 22, 2022
by
zxw
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
fd3d9732
f36b2dd1
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
21 行增加
和
49 行删除
+21
-49
AuthLoginAttribute.cs
JunmpPoliceStation/App_Start/AuthLoginAttribute.cs
+2
-14
BorrowController.cs
JunmpPoliceStation/Controllers/BorrowController.cs
+1
-4
ChannelCfgController.cs
JunmpPoliceStation/Controllers/ChannelCfgController.cs
+2
-8
InventoryTableController.cs
JunmpPoliceStation/Controllers/InventoryTableController.cs
+0
-7
MissionController.cs
JunmpPoliceStation/Controllers/MissionController.cs
+1
-4
NoticeController.cs
JunmpPoliceStation/Controllers/NoticeController.cs
+2
-1
PrintController.cs
JunmpPoliceStation/Controllers/PrintController.cs
+8
-0
PuchaseOrderController.cs
JunmpPoliceStation/Controllers/PuchaseOrderController.cs
+0
-7
JunmpPoliceStation.csproj
JunmpPoliceStation/JunmpPoliceStation.csproj
+1
-0
Startup.cs
JunmpPoliceStation/Startup.cs
+4
-4
没有找到文件。
JunmpPoliceStation/App_Start/AuthLoginAttribute.cs
View file @
f565d820
...
...
@@ -9,8 +9,6 @@ using Microsoft.AspNetCore.Mvc.Filters;
using
Microsoft.Extensions.Configuration
;
using
Microsoft.Extensions.DependencyInjection
;
using
Microsoft.Extensions.Logging
;
using
Nacos
;
using
Nacos.AspNetCore
;
using
Nancy.Json
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json.Linq
;
...
...
@@ -30,8 +28,6 @@ namespace JunmpPoliceStation.App_Start
public
class
AuthLoginAttribute
:
ActionFilterAttribute
{
private
readonly
INacosServerManager
_serverManager
;
private
readonly
INacosNamingClient
_serverNamingClient
;
private
readonly
IHttpClientFactory
_clientFactory
;
public
IConfiguration
Configuration
{
get
;
}
private
ILogger
<
PrintController
>
_logger
;
...
...
@@ -40,22 +36,14 @@ namespace JunmpPoliceStation.App_Start
string
urlGetSecretKey
=
string
.
Empty
;
//获取seckey的路由
string
urlCheckApp
=
string
.
Empty
;
//获取审核的路由
public
AuthLoginAttribute
(
IConfiguration
configuration
,
ApiConfig
apicfg
,
I
NacosServerManager
_serverManager
,
INacosNamingClient
_serverNamingClient
,
I
HttpClientFactory
_clientFactory
,
Boolean
AuthFlg
=
true
)
public
AuthLoginAttribute
(
IConfiguration
configuration
,
ApiConfig
apicfg
,
IHttpClientFactory
_clientFactory
,
Boolean
AuthFlg
=
true
)
{
flg
=
AuthFlg
;
this
.
apicfg
=
apicfg
;
this
.
_serverManager
=
_serverManager
;
this
.
_serverNamingClient
=
_serverNamingClient
;
this
.
_clientFactory
=
_clientFactory
;
this
.
Configuration
=
configuration
;
_serverNamingClient
.
RegisterInstanceAsync
(
new
RegisterInstanceRequest
{
ServiceName
=
apicfg
.
serviceName
,
Ip
=
apicfg
.
serviceIp
,
Port
=
Convert
.
ToInt32
(
apicfg
.
servicePort
)
});
var
url
=
"http://"
+
apicfg
.
serviceIp
+
":"
+
apicfg
.
servicePort
;
var
baseUrl
=
_serverManager
.
GetServerAsync
(
apicfg
.
serviceName
);
urlGetSecretKey
=
$"
{
url
}
/api/yewu/Auth/GetSecretKey"
;
urlCheckApp
=
$"
{
url
}
/api/yewu/Auth/JpVerification"
;
}
...
...
JunmpPoliceStation/Controllers/BorrowController.cs
View file @
f565d820
...
...
@@ -14,7 +14,6 @@ using Microsoft.AspNetCore.Http;
using
Microsoft.AspNetCore.Mvc
;
using
Microsoft.EntityFrameworkCore
;
using
Microsoft.Extensions.Logging
;
using
Nacos
;
using
Newtonsoft.Json.Linq
;
using
static
JmpModel
.
Model
.
Enumerates
.
BorrowEnum
;
using
static
JmpModel
.
Model
.
Enumerates
.
EquipmentHistroyEnum
;
...
...
@@ -26,12 +25,10 @@ namespace JunmpPoliceStation.Controllers
///借用领用模块
public
class
BorrowController
:
ControllerBase
{
private
readonly
INacosConfigClient
_configClient
;
private
ILogger
<
BorrowController
>
_logger
;
UnitOfWork
_unitOfWork
;
public
BorrowController
(
ILogger
<
BorrowController
>
logger
,
UnitOfWork
unitOfWork
,
INacosConfigClient
configClient
)
public
BorrowController
(
ILogger
<
BorrowController
>
logger
,
UnitOfWork
unitOfWork
)
{
_configClient
=
configClient
;
_logger
=
logger
;
//_CabinetRepository = CabinetRepository;
_unitOfWork
=
unitOfWork
;
...
...
JunmpPoliceStation/Controllers/ChannelCfgController.cs
View file @
f565d820
...
...
@@ -12,8 +12,6 @@ using Microsoft.AspNetCore.Http.Features;
using
Microsoft.AspNetCore.Mvc
;
using
Microsoft.EntityFrameworkCore
;
using
Microsoft.Extensions.Logging
;
using
Nacos
;
using
Nacos.AspNetCore
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json.Linq
;
using
System
;
...
...
@@ -41,21 +39,17 @@ namespace JunmpPoliceStation.Controllers
[
Route
(
"api/[controller]"
)]
public
class
ChannelCfgController
:
ControllerBase
{
private
HttpHelper
_httpHelper
;
private
IWebHostEnvironment
_hostingEnvironment
;
private
readonly
INacosServerManager
_serverManager
;
private
readonly
INacosNamingClient
_serverManager2
;
private
readonly
IHttpClientFactory
_clientFactory
;
private
ILogger
<
ChannelCfgController
>
_logger
;
private
UnitOfWork
_unitOfWork
;
protected
MQTTServer
mqttServer
;
private
HttpHelper
_httpHelper
;
public
ChannelCfgController
(
ILogger
<
ChannelCfgController
>
logger
,
I
NacosNamingClient
serverManager2
,
INacosServerManager
serverManager
,
I
HttpClientFactory
clientFactory
,
UnitOfWork
unitOfWork
,
IWebHostEnvironment
_hostingEnvironment
,
MQTTServer
mqttServer
,
HttpHelper
httpHelper
)
public
ChannelCfgController
(
ILogger
<
ChannelCfgController
>
logger
,
IHttpClientFactory
clientFactory
,
UnitOfWork
unitOfWork
,
IWebHostEnvironment
_hostingEnvironment
,
MQTTServer
mqttServer
,
HttpHelper
httpHelper
)
{
_httpHelper
=
httpHelper
;
_clientFactory
=
clientFactory
;
_serverManager2
=
serverManager2
;
_serverManager
=
serverManager
;
this
.
_logger
=
logger
;
this
.
_hostingEnvironment
=
_hostingEnvironment
;
this
.
_unitOfWork
=
unitOfWork
;
...
...
JunmpPoliceStation/Controllers/InventoryTableController.cs
View file @
f565d820
...
...
@@ -9,8 +9,6 @@ using JunmpPoliceStation.Models.Repository;
using
Microsoft.AspNetCore.Mvc
;
using
Microsoft.EntityFrameworkCore
;
using
Microsoft.Extensions.Logging
;
using
Nacos
;
using
Nacos.AspNetCore
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json.Linq
;
using
System
;
...
...
@@ -29,15 +27,10 @@ namespace JunmpPoliceStation.Controllers
{
//private ICabinetRepository _CabinetRepository;
private
ILogger
<
PuchaseOrderController
>
_logger
;
//private readonly INacosServerManager _serverManager;
//private readonly INacosNamingClient _serverManager;
//private readonly IHttpClientFactory _clientFactory;
UnitOfWork
_unitOfWork
;
public
InventoryTableController
(
ILogger
<
PuchaseOrderController
>
logger
,
UnitOfWork
unitOfWork
)
{
//, INacosServerManager serverManager, IHttpClientFactory clientFactory
//_serverManager = serverManager;
//_clientFactory = clientFactory;
_logger
=
logger
;
//_CabinetRepository = CabinetRepository;
_unitOfWork
=
unitOfWork
;
...
...
JunmpPoliceStation/Controllers/MissionController.cs
View file @
f565d820
...
...
@@ -5,7 +5,6 @@ using JmpModel.Model.Repository;
using
JunmpPoliceStation.Models.Repository
;
using
Microsoft.AspNetCore.Mvc
;
using
Microsoft.Extensions.Logging
;
using
Nacos
;
using
Newtonsoft.Json.Linq
;
using
System
;
using
System.Collections.Generic
;
...
...
@@ -22,13 +21,11 @@ namespace JunmpPoliceStation.Controllers
[
ApiController
]
public
class
MissionController
:
Controller
{
private
readonly
INacosConfigClient
_configClient
;
private
ILogger
<
BorrowController
>
_logger
;
private
readonly
object
_createEpcLockObj
=
new
object
();
UnitOfWork
_unitOfWork
;
public
MissionController
(
ILogger
<
BorrowController
>
logger
,
UnitOfWork
unitOfWork
,
INacosConfigClient
configClient
)
public
MissionController
(
ILogger
<
BorrowController
>
logger
,
UnitOfWork
unitOfWork
)
{
_configClient
=
configClient
;
_logger
=
logger
;
//_CabinetRepository = CabinetRepository;
_unitOfWork
=
unitOfWork
;
...
...
JunmpPoliceStation/Controllers/NoticeController.cs
View file @
f565d820
...
...
@@ -285,10 +285,11 @@ namespace JunmpPoliceStation.Controllers
var
scrapList
=
_unitOfWork
.
ScrapViewRepository
.
GetPage
(
expression
,
"WarrantyTime"
,
0
,
999999
);
var
data
=
scrapList
.
content
.
GroupBy
(
x
=>
new
{
x
.
WarehouseName
,
x
.
EquName
,
x
.
SizeName
})
.
GroupBy
(
x
=>
new
{
x
.
WarehouseName
,
x
.
WarehouseId
,
x
.
EquName
,
x
.
SizeName
})
.
Select
(
s
=>
new
{
warehouseName
=
s
.
Key
.
WarehouseName
,
warehouseId
=
s
.
Key
.
WarehouseId
,
equName
=
s
.
Key
.
EquName
,
sizeName
=
s
.
Key
.
SizeName
,
count
=
s
.
Count
(),
...
...
JunmpPoliceStation/Controllers/PrintController.cs
View file @
f565d820
...
...
@@ -3820,6 +3820,10 @@ namespace JunmpPoliceStation.Controllers
if
(!(!
bRepair
||
repairCycle
<=
0
))
{
if
(
repairCycle
>
999
)
{
return
JsonManager
.
SimpleCustResponse
(
$"维保周期不能大于999"
);
}
updateObject
.
RepairCycle
=
repairCycle
;
//装维保周期
}
if
(!(!
bPrice
||
price
<=
0
))
...
...
@@ -3828,6 +3832,10 @@ namespace JunmpPoliceStation.Controllers
}
if
(!(!
bWarranty
||
warrantyCycle
<
0
))
{
if
(
warrantyCycle
>
999
)
{
return
JsonManager
.
SimpleCustResponse
(
$"质保周期不能大于999"
);
}
updateObject
.
WarrantyCycle
=
warrantyCycle
;
//质保周期
}
if
(!(!
bUse
||
useTime
==
default
))
...
...
JunmpPoliceStation/Controllers/PuchaseOrderController.cs
View file @
f565d820
...
...
@@ -9,8 +9,6 @@ using JunmpPoliceStation.Models.Repository;
using
Microsoft.AspNetCore.Mvc
;
using
Microsoft.EntityFrameworkCore
;
using
Microsoft.Extensions.Logging
;
using
Nacos
;
using
Nacos.AspNetCore
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json.Linq
;
using
System
;
...
...
@@ -29,15 +27,10 @@ namespace JunmpPoliceStation.Controllers
{
//private ICabinetRepository _CabinetRepository;
private
ILogger
<
PuchaseOrderController
>
_logger
;
//private readonly INacosServerManager _serverManager;
//private readonly INacosNamingClient _serverManager;
//private readonly IHttpClientFactory _clientFactory;
UnitOfWork
_unitOfWork
;
public
PuchaseOrderController
(
ILogger
<
PuchaseOrderController
>
logger
,
UnitOfWork
unitOfWork
)
{
//, INacosServerManager serverManager, IHttpClientFactory clientFactory
//_serverManager = serverManager;
//_clientFactory = clientFactory;
_logger
=
logger
;
//_CabinetRepository = CabinetRepository;
_unitOfWork
=
unitOfWork
;
...
...
JunmpPoliceStation/JunmpPoliceStation.csproj
View file @
f565d820
...
...
@@ -49,6 +49,7 @@
<ItemGroup>
<Compile Remove="Controllers\WebSocketController.cs" />
<Compile Remove="ListenConfigurationBgTask.cs" />
</ItemGroup>
<ItemGroup>
...
...
JunmpPoliceStation/Startup.cs
View file @
f565d820
...
...
@@ -111,9 +111,9 @@ namespace JunmpPoliceStation
});
services
.
AddControllers
();
services
.
AddNacosNaming
(
Configuration
)
.
AddNacosConfig
(
Configuration
)
.
AddNacosAspNetCore
(
Configuration
);
//
services.AddNacosNaming(Configuration)
//
.AddNacosConfig(Configuration)
//
.AddNacosAspNetCore(Configuration);
//启动MQTT
services
.
AddSingleton
<
MQTTServer
>();
...
...
@@ -132,7 +132,7 @@ namespace JunmpPoliceStation
public
static
IServiceProvider
Instance
{
get
;
set
;
}
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public
void
Configure
(
IApplicationBuilder
app
,
IWebHostEnvironment
env
,
ILoggerFactory
loggerFactory
,
INacosNamingClient
_namingClient
,
MQTTServer
mqttServer
)
public
void
Configure
(
IApplicationBuilder
app
,
IWebHostEnvironment
env
,
ILoggerFactory
loggerFactory
,
MQTTServer
mqttServer
)
{
ServiceLocator
.
Instance
=
app
.
ApplicationServices
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论