Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
JunmpPoliceStation
概览
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
JunmpPoliceStation
Commits
f4fbd11d
Commit
f4fbd11d
authored
Dec 02, 2022
by
zxw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消息提醒
parent
162e7717
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
19 个修改的文件
包含
606 行增加
和
3 行删除
+606
-3
BaseJpEquipmentDetail.cs
JmpModel/Model/BaseJpEquipmentDetail.cs
+6
-0
BaseJpEquipmentSize.cs
JmpModel/Model/BaseJpEquipmentSize.cs
+6
-0
BaseJpMessageReminderConfig.cs
JmpModel/Model/BaseJpMessageReminderConfig.cs
+77
-0
BaseJpMessageReminderLog.cs
JmpModel/Model/BaseJpMessageReminderLog.cs
+71
-0
BaseJpMessageReminderLogDetail.cs
JmpModel/Model/BaseJpMessageReminderLogDetail.cs
+121
-0
BaseJpOrganization.cs
JmpModel/Model/BaseJpOrganization.cs
+9
-0
BaseJpPoliceman.cs
JmpModel/Model/BaseJpPoliceman.cs
+6
-0
BaseJpWarehouse.cs
JmpModel/Model/BaseJpWarehouse.cs
+12
-0
CommonJpEquipmentFailWarehouseState.cs
JmpModel/Model/CommonJpEquipmentFailWarehouseState.cs
+166
-0
CommonJpEquipmentInventory.cs
JmpModel/Model/CommonJpEquipmentInventory.cs
+6
-0
CommonJpUser.cs
JmpModel/Model/CommonJpUser.cs
+3
-0
JunmppolicesqlContext.cs
JmpModel/Model/DataContext/JunmppolicesqlContext.cs
+0
-0
ViewEquipment.cs
JmpModel/Model/ViewEquipment.cs
+6
-0
efpt.config.json
JmpModel/efpt.config.json
+21
-2
InventoryController.cs
JunmpPoliceStation/Controllers/InventoryController.cs
+78
-1
MessageReminderController.cs
JunmpPoliceStation/Controllers/MessageReminderController.cs
+0
-0
CronJob.cs
JunmpPoliceStation/Extensions/CronJob.cs
+0
-0
JunmpPoliceStation.csproj
JunmpPoliceStation/JunmpPoliceStation.csproj
+2
-0
Startup.cs
JunmpPoliceStation/Startup.cs
+16
-0
没有找到文件。
JmpModel/Model/BaseJpEquipmentDetail.cs
View file @
f4fbd11d
...
...
@@ -14,11 +14,13 @@ namespace JmpModel.Model
{
BaseJpBagMaps
=
new
HashSet
<
BaseJpBagMap
>();
BaseJpEquipmentSizes
=
new
HashSet
<
BaseJpEquipmentSize
>();
BaseJpMessageReminderLogDetails
=
new
HashSet
<
BaseJpMessageReminderLogDetail
>();
BaseJpSupplierEquipments
=
new
HashSet
<
BaseJpSupplierEquipment
>();
CommonJpBorrowReturnDetailEstimates
=
new
HashSet
<
CommonJpBorrowReturnDetailEstimate
>();
CommonJpBorrowReturnDetailRealities
=
new
HashSet
<
CommonJpBorrowReturnDetailReality
>();
CommonJpChannelMonitorRecordInventories
=
new
HashSet
<
CommonJpChannelMonitorRecordInventory
>();
CommonJpEquipmentBoxMarks
=
new
HashSet
<
CommonJpEquipmentBoxMark
>();
CommonJpEquipmentFailWarehouseStates
=
new
HashSet
<
CommonJpEquipmentFailWarehouseState
>();
CommonJpEquipmentInventories
=
new
HashSet
<
CommonJpEquipmentInventory
>();
CommonJpEquipmentThresholds
=
new
HashSet
<
CommonJpEquipmentThreshold
>();
CommonJpFixReceiveApplyDetails
=
new
HashSet
<
CommonJpFixReceiveApplyDetail
>();
...
...
@@ -82,6 +84,8 @@ namespace JmpModel.Model
public
virtual
ICollection
<
BaseJpBagMap
>
BaseJpBagMaps
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
BaseJpEquipmentSize
.
Detail
))]
public
virtual
ICollection
<
BaseJpEquipmentSize
>
BaseJpEquipmentSizes
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
BaseJpMessageReminderLogDetail
.
EquipmentDetail
))]
public
virtual
ICollection
<
BaseJpMessageReminderLogDetail
>
BaseJpMessageReminderLogDetails
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
BaseJpSupplierEquipment
.
Equipment
))]
public
virtual
ICollection
<
BaseJpSupplierEquipment
>
BaseJpSupplierEquipments
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpBorrowReturnDetailEstimate
.
Equipment
))]
...
...
@@ -92,6 +96,8 @@ namespace JmpModel.Model
public
virtual
ICollection
<
CommonJpChannelMonitorRecordInventory
>
CommonJpChannelMonitorRecordInventories
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpEquipmentBoxMark
.
EquipmentDetail
))]
public
virtual
ICollection
<
CommonJpEquipmentBoxMark
>
CommonJpEquipmentBoxMarks
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpEquipmentFailWarehouseState
.
EquipmentDetail
))]
public
virtual
ICollection
<
CommonJpEquipmentFailWarehouseState
>
CommonJpEquipmentFailWarehouseStates
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpEquipmentInventory
.
EquipmentCodeNavigation
))]
public
virtual
ICollection
<
CommonJpEquipmentInventory
>
CommonJpEquipmentInventories
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpEquipmentThreshold
.
EquipmentDetail
))]
...
...
JmpModel/Model/BaseJpEquipmentSize.cs
View file @
f4fbd11d
...
...
@@ -12,10 +12,12 @@ namespace JmpModel.Model
{
public
BaseJpEquipmentSize
()
{
BaseJpMessageReminderLogDetails
=
new
HashSet
<
BaseJpMessageReminderLogDetail
>();
CommonJpBorrowReturnDetailEstimates
=
new
HashSet
<
CommonJpBorrowReturnDetailEstimate
>();
CommonJpBorrowReturnDetailRealities
=
new
HashSet
<
CommonJpBorrowReturnDetailReality
>();
CommonJpChannelMonitorRecordInventories
=
new
HashSet
<
CommonJpChannelMonitorRecordInventory
>();
CommonJpEquipmentBoxMarks
=
new
HashSet
<
CommonJpEquipmentBoxMark
>();
CommonJpEquipmentFailWarehouseStates
=
new
HashSet
<
CommonJpEquipmentFailWarehouseState
>();
CommonJpEquipmentInventories
=
new
HashSet
<
CommonJpEquipmentInventory
>();
CommonJpEquipmentThresholds
=
new
HashSet
<
CommonJpEquipmentThreshold
>();
CommonJpFixReceiveApplyDetails
=
new
HashSet
<
CommonJpFixReceiveApplyDetail
>();
...
...
@@ -61,6 +63,8 @@ namespace JmpModel.Model
[
ForeignKey
(
nameof
(
DetailId
))]
[
InverseProperty
(
nameof
(
BaseJpEquipmentDetail
.
BaseJpEquipmentSizes
))]
public
virtual
BaseJpEquipmentDetail
Detail
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
BaseJpMessageReminderLogDetail
.
EquipmentSize
))]
public
virtual
ICollection
<
BaseJpMessageReminderLogDetail
>
BaseJpMessageReminderLogDetails
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpBorrowReturnDetailEstimate
.
Size
))]
public
virtual
ICollection
<
CommonJpBorrowReturnDetailEstimate
>
CommonJpBorrowReturnDetailEstimates
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpBorrowReturnDetailReality
.
Size
))]
...
...
@@ -69,6 +73,8 @@ namespace JmpModel.Model
public
virtual
ICollection
<
CommonJpChannelMonitorRecordInventory
>
CommonJpChannelMonitorRecordInventories
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpEquipmentBoxMark
.
Size
))]
public
virtual
ICollection
<
CommonJpEquipmentBoxMark
>
CommonJpEquipmentBoxMarks
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpEquipmentFailWarehouseState
.
EquipmentSize
))]
public
virtual
ICollection
<
CommonJpEquipmentFailWarehouseState
>
CommonJpEquipmentFailWarehouseStates
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpEquipmentInventory
.
EquipmentSizecodeNavigation
))]
public
virtual
ICollection
<
CommonJpEquipmentInventory
>
CommonJpEquipmentInventories
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpEquipmentThreshold
.
EquipmentSize
))]
...
...
JmpModel/Model/BaseJpMessageReminderConfig.cs
0 → 100644
View file @
f4fbd11d
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#
nullable
disable
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
JmpModel.Model
{
[
Table
(
"base_jp_message_reminder_config"
)]
public
partial
class
BaseJpMessageReminderConfig
{
[
Key
]
[
Column
(
"id"
)]
[
StringLength
(
36
)]
public
string
Id
{
get
;
set
;
}
[
Column
(
"createTime"
,
TypeName
=
"datetime"
)]
public
DateTime
?
CreateTime
{
get
;
set
;
}
/// <summary>
/// 组织机构id
/// </summary>
[
Required
]
[
Column
(
"orgId"
)]
[
StringLength
(
36
)]
public
string
OrgId
{
get
;
set
;
}
/// <summary>
/// 更新时间
/// </summary>
[
Column
(
"updateTime"
,
TypeName
=
"datetime"
)]
public
DateTime
?
UpdateTime
{
get
;
set
;
}
/// <summary>
/// 更新用户id
/// </summary>
[
Column
(
"updateUserId"
)]
[
StringLength
(
36
)]
public
string
UpdateUserId
{
get
;
set
;
}
/// <summary>
/// 更新用户名称
/// </summary>
[
Column
(
"updateUserName"
)]
[
StringLength
(
255
)]
public
string
UpdateUserName
{
get
;
set
;
}
/// <summary>
/// 是否推送上级:超期未报废
/// </summary>
[
Column
(
"isPushParentWithFixed"
)]
public
bool
IsPushParentWithFixed
{
get
;
set
;
}
/// <summary>
/// 是否推送上级:超期未还
/// </summary>
[
Column
(
"isPushParentWithBorrow"
)]
public
bool
IsPushParentWithBorrow
{
get
;
set
;
}
/// <summary>
/// 是否推送上级:非本仓库装备
/// </summary>
[
Column
(
"isPushParentWithFailWarehouse"
)]
public
bool
IsPushParentWithFailWarehouse
{
get
;
set
;
}
/// <summary>
/// 装备配置json
/// </summary>
[
Column
(
"equipmentJson"
,
TypeName
=
"text"
)]
public
string
EquipmentJson
{
get
;
set
;
}
/// <summary>
/// 是否启用
/// </summary>
[
Column
(
"enable"
)]
public
bool
Enable
{
get
;
set
;
}
[
ForeignKey
(
nameof
(
OrgId
))]
[
InverseProperty
(
nameof
(
BaseJpOrganization
.
BaseJpMessageReminderConfigs
))]
public
virtual
BaseJpOrganization
Org
{
get
;
set
;
}
[
ForeignKey
(
nameof
(
UpdateUserId
))]
[
InverseProperty
(
nameof
(
CommonJpUser
.
BaseJpMessageReminderConfigs
))]
public
virtual
CommonJpUser
UpdateUser
{
get
;
set
;
}
}
}
\ No newline at end of file
JmpModel/Model/BaseJpMessageReminderLog.cs
0 → 100644
View file @
f4fbd11d
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#
nullable
disable
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
JmpModel.Model
{
[
Table
(
"base_jp_message_reminder_log"
)]
public
partial
class
BaseJpMessageReminderLog
{
public
BaseJpMessageReminderLog
()
{
BaseJpMessageReminderLogDetails
=
new
HashSet
<
BaseJpMessageReminderLogDetail
>();
}
[
Key
]
[
Column
(
"id"
)]
[
StringLength
(
36
)]
public
string
Id
{
get
;
set
;
}
[
Column
(
"createTime"
,
TypeName
=
"datetime"
)]
public
DateTime
?
CreateTime
{
get
;
set
;
}
/// <summary>
/// 消息提醒类型:
/// 已超期未报废 0
/// 超期未归还 1
/// 非本仓库装备 2
/// </summary>
[
Column
(
"type"
)]
public
int
Type
{
get
;
set
;
}
/// <summary>
/// 组织机构id
/// </summary>
[
Column
(
"orgId"
)]
[
StringLength
(
36
)]
public
string
OrgId
{
get
;
set
;
}
/// <summary>
/// 组织机构名称
/// </summary>
[
Column
(
"orgName"
)]
[
StringLength
(
255
)]
public
string
OrgName
{
get
;
set
;
}
/// <summary>
/// 装备数量
/// </summary>
[
Column
(
"equCount"
)]
public
int
EquCount
{
get
;
set
;
}
/// <summary>
/// 配置id
/// </summary>
[
Column
(
"configId"
)]
[
StringLength
(
36
)]
public
string
ConfigId
{
get
;
set
;
}
/// <summary>
/// 是否推送上级
/// </summary>
[
Column
(
"isNeedPushParent"
)]
public
bool
IsNeedPushParent
{
get
;
set
;
}
/// <summary>
/// 上级组织机构id
/// </summary>
[
Column
(
"parentOrgId"
)]
[
StringLength
(
36
)]
public
string
ParentOrgId
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
BaseJpMessageReminderLogDetail
.
Log
))]
public
virtual
ICollection
<
BaseJpMessageReminderLogDetail
>
BaseJpMessageReminderLogDetails
{
get
;
set
;
}
}
}
\ No newline at end of file
JmpModel/Model/BaseJpMessageReminderLogDetail.cs
0 → 100644
View file @
f4fbd11d
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#
nullable
disable
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
JmpModel.Model
{
[
Table
(
"base_jp_message_reminder_log_detail"
)]
public
partial
class
BaseJpMessageReminderLogDetail
{
[
Key
]
[
Column
(
"id"
)]
[
StringLength
(
36
)]
public
string
Id
{
get
;
set
;
}
[
Column
(
"createTime"
,
TypeName
=
"datetime"
)]
public
DateTime
?
CreateTime
{
get
;
set
;
}
/// <summary>
/// 提醒记录id
/// </summary>
[
Column
(
"logId"
)]
[
StringLength
(
36
)]
public
string
LogId
{
get
;
set
;
}
/// <summary>
/// 装备id
/// </summary>
[
Column
(
"inventoryId"
)]
[
StringLength
(
36
)]
public
string
InventoryId
{
get
;
set
;
}
/// <summary>
/// epc
/// </summary>
[
Column
(
"epc"
)]
[
StringLength
(
255
)]
public
string
Epc
{
get
;
set
;
}
/// <summary>
/// 装备类型id
/// </summary>
[
Column
(
"equipmentDetailId"
)]
[
StringLength
(
36
)]
public
string
EquipmentDetailId
{
get
;
set
;
}
/// <summary>
/// 装备类型名称
/// </summary>
[
Column
(
"equipmentDetailName"
)]
[
StringLength
(
255
)]
public
string
EquipmentDetailName
{
get
;
set
;
}
/// <summary>
/// 装备号型id
/// </summary>
[
Column
(
"equipmentSizeId"
)]
[
StringLength
(
36
)]
public
string
EquipmentSizeId
{
get
;
set
;
}
/// <summary>
/// 装备号型名称
/// </summary>
[
Column
(
"equipmentSizeName"
)]
[
StringLength
(
255
)]
public
string
EquipmentSizeName
{
get
;
set
;
}
/// <summary>
/// 仓库id
/// </summary>
[
Column
(
"warehouseId"
)]
[
StringLength
(
36
)]
public
string
WarehouseId
{
get
;
set
;
}
/// <summary>
/// 仓库名称
/// </summary>
[
Column
(
"warehouseName"
)]
[
StringLength
(
255
)]
public
string
WarehouseName
{
get
;
set
;
}
/// <summary>
/// 借用警员id(超期未还)
/// </summary>
[
Column
(
"borrowPoliceId"
)]
[
StringLength
(
36
)]
public
string
BorrowPoliceId
{
get
;
set
;
}
/// <summary>
/// 借用警员姓名(超期未还)
/// </summary>
[
Column
(
"borrowPoliceName"
)]
[
StringLength
(
255
)]
public
string
BorrowPoliceName
{
get
;
set
;
}
/// <summary>
/// 错误入库仓库id(非本仓库装备)
/// </summary>
[
Column
(
"failWarehouseId"
)]
[
StringLength
(
36
)]
public
string
FailWarehouseId
{
get
;
set
;
}
/// <summary>
/// 错误入库仓库名称(非本仓库装备)
/// </summary>
[
Column
(
"failWarehouseName"
)]
[
StringLength
(
255
)]
public
string
FailWarehouseName
{
get
;
set
;
}
[
ForeignKey
(
nameof
(
BorrowPoliceId
))]
[
InverseProperty
(
nameof
(
BaseJpPoliceman
.
BaseJpMessageReminderLogDetails
))]
public
virtual
BaseJpPoliceman
BorrowPolice
{
get
;
set
;
}
[
ForeignKey
(
nameof
(
EquipmentDetailId
))]
[
InverseProperty
(
nameof
(
BaseJpEquipmentDetail
.
BaseJpMessageReminderLogDetails
))]
public
virtual
BaseJpEquipmentDetail
EquipmentDetail
{
get
;
set
;
}
[
ForeignKey
(
nameof
(
EquipmentSizeId
))]
[
InverseProperty
(
nameof
(
BaseJpEquipmentSize
.
BaseJpMessageReminderLogDetails
))]
public
virtual
BaseJpEquipmentSize
EquipmentSize
{
get
;
set
;
}
[
ForeignKey
(
nameof
(
FailWarehouseId
))]
[
InverseProperty
(
nameof
(
BaseJpWarehouse
.
BaseJpMessageReminderLogDetailFailWarehouses
))]
public
virtual
BaseJpWarehouse
FailWarehouse
{
get
;
set
;
}
[
ForeignKey
(
nameof
(
InventoryId
))]
[
InverseProperty
(
nameof
(
CommonJpEquipmentInventory
.
BaseJpMessageReminderLogDetails
))]
public
virtual
CommonJpEquipmentInventory
Inventory
{
get
;
set
;
}
[
ForeignKey
(
nameof
(
LogId
))]
[
InverseProperty
(
nameof
(
BaseJpMessageReminderLog
.
BaseJpMessageReminderLogDetails
))]
public
virtual
BaseJpMessageReminderLog
Log
{
get
;
set
;
}
[
ForeignKey
(
nameof
(
WarehouseId
))]
[
InverseProperty
(
nameof
(
BaseJpWarehouse
.
BaseJpMessageReminderLogDetailWarehouses
))]
public
virtual
BaseJpWarehouse
Warehouse
{
get
;
set
;
}
}
}
\ No newline at end of file
JmpModel/Model/BaseJpOrganization.cs
View file @
f4fbd11d
...
...
@@ -15,6 +15,7 @@ namespace JmpModel.Model
BaseJpBags
=
new
HashSet
<
BaseJpBag
>();
BaseJpCabinetOutinlogs
=
new
HashSet
<
BaseJpCabinetOutinlog
>();
BaseJpCabinets
=
new
HashSet
<
BaseJpCabinet
>();
BaseJpMessageReminderConfigs
=
new
HashSet
<
BaseJpMessageReminderConfig
>();
BaseJpModels
=
new
HashSet
<
BaseJpModel
>();
BaseJpOrganizationOrderCounts
=
new
HashSet
<
BaseJpOrganizationOrderCount
>();
BaseJpPolicemen
=
new
HashSet
<
BaseJpPoliceman
>();
...
...
@@ -22,6 +23,8 @@ namespace JmpModel.Model
CommonJpBorrowReturnApplies
=
new
HashSet
<
CommonJpBorrowReturnApply
>();
CommonJpBorrowReturns
=
new
HashSet
<
CommonJpBorrowReturn
>();
CommonJpChannelMonitorRecords
=
new
HashSet
<
CommonJpChannelMonitorRecord
>();
CommonJpEquipmentFailWarehouseStateFailOrgs
=
new
HashSet
<
CommonJpEquipmentFailWarehouseState
>();
CommonJpEquipmentFailWarehouseStateTrueOrgs
=
new
HashSet
<
CommonJpEquipmentFailWarehouseState
>();
CommonJpEquipmentInventories
=
new
HashSet
<
CommonJpEquipmentInventory
>();
CommonJpEquipmentStates
=
new
HashSet
<
CommonJpEquipmentState
>();
CommonJpEquipmentThresholds
=
new
HashSet
<
CommonJpEquipmentThreshold
>();
...
...
@@ -109,6 +112,8 @@ namespace JmpModel.Model
public
virtual
ICollection
<
BaseJpCabinetOutinlog
>
BaseJpCabinetOutinlogs
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
BaseJpCabinet
.
Organization
))]
public
virtual
ICollection
<
BaseJpCabinet
>
BaseJpCabinets
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
BaseJpMessageReminderConfig
.
Org
))]
public
virtual
ICollection
<
BaseJpMessageReminderConfig
>
BaseJpMessageReminderConfigs
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
BaseJpModel
.
Org
))]
public
virtual
ICollection
<
BaseJpModel
>
BaseJpModels
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
BaseJpOrganizationOrderCount
.
Org
))]
...
...
@@ -123,6 +128,10 @@ namespace JmpModel.Model
public
virtual
ICollection
<
CommonJpBorrowReturn
>
CommonJpBorrowReturns
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpChannelMonitorRecord
.
Org
))]
public
virtual
ICollection
<
CommonJpChannelMonitorRecord
>
CommonJpChannelMonitorRecords
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpEquipmentFailWarehouseState
.
FailOrg
))]
public
virtual
ICollection
<
CommonJpEquipmentFailWarehouseState
>
CommonJpEquipmentFailWarehouseStateFailOrgs
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpEquipmentFailWarehouseState
.
TrueOrg
))]
public
virtual
ICollection
<
CommonJpEquipmentFailWarehouseState
>
CommonJpEquipmentFailWarehouseStateTrueOrgs
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpEquipmentInventory
.
Org
))]
public
virtual
ICollection
<
CommonJpEquipmentInventory
>
CommonJpEquipmentInventories
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpEquipmentState
.
Org
))]
...
...
JmpModel/Model/BaseJpPoliceman.cs
View file @
f4fbd11d
...
...
@@ -13,12 +13,14 @@ namespace JmpModel.Model
public
BaseJpPoliceman
()
{
BaseJpCabinetPolicemen
=
new
HashSet
<
BaseJpCabinetPoliceman
>();
BaseJpMessageReminderLogDetails
=
new
HashSet
<
BaseJpMessageReminderLogDetail
>();
BaseJpPolicefingers
=
new
HashSet
<
BaseJpPolicefinger
>();
CommonJpBorrowReturnApplyApplies
=
new
HashSet
<
CommonJpBorrowReturnApply
>();
CommonJpBorrowReturnApplyApprovalPersonNavigations
=
new
HashSet
<
CommonJpBorrowReturnApply
>();
CommonJpBorrowReturnApplyPolices
=
new
HashSet
<
CommonJpBorrowReturnApply
>();
CommonJpBorrowReturns
=
new
HashSet
<
CommonJpBorrowReturn
>();
CommonJpChannelMonitorRecords
=
new
HashSet
<
CommonJpChannelMonitorRecord
>();
CommonJpEquipmentFailWarehouseStates
=
new
HashSet
<
CommonJpEquipmentFailWarehouseState
>();
CommonJpEquipmentHistories
=
new
HashSet
<
CommonJpEquipmentHistory
>();
CommonJpEquipmentInventories
=
new
HashSet
<
CommonJpEquipmentInventory
>();
CommonJpEquipmentStates
=
new
HashSet
<
CommonJpEquipmentState
>();
...
...
@@ -99,6 +101,8 @@ namespace JmpModel.Model
public
virtual
BaseJpOrganization
OrgizationCodeNavigation
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
BaseJpCabinetPoliceman
.
Policeman
))]
public
virtual
ICollection
<
BaseJpCabinetPoliceman
>
BaseJpCabinetPolicemen
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
BaseJpMessageReminderLogDetail
.
BorrowPolice
))]
public
virtual
ICollection
<
BaseJpMessageReminderLogDetail
>
BaseJpMessageReminderLogDetails
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
BaseJpPolicefinger
.
Police
))]
public
virtual
ICollection
<
BaseJpPolicefinger
>
BaseJpPolicefingers
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpBorrowReturnApply
.
Apply
))]
...
...
@@ -111,6 +115,8 @@ namespace JmpModel.Model
public
virtual
ICollection
<
CommonJpBorrowReturn
>
CommonJpBorrowReturns
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpChannelMonitorRecord
.
Police
))]
public
virtual
ICollection
<
CommonJpChannelMonitorRecord
>
CommonJpChannelMonitorRecords
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpEquipmentFailWarehouseState
.
Police
))]
public
virtual
ICollection
<
CommonJpEquipmentFailWarehouseState
>
CommonJpEquipmentFailWarehouseStates
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpEquipmentHistory
.
OperatorNavigation
))]
public
virtual
ICollection
<
CommonJpEquipmentHistory
>
CommonJpEquipmentHistories
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpEquipmentInventory
.
PoliceCodeNavigation
))]
...
...
JmpModel/Model/BaseJpWarehouse.cs
View file @
f4fbd11d
...
...
@@ -12,6 +12,8 @@ namespace JmpModel.Model
{
public
BaseJpWarehouse
()
{
BaseJpMessageReminderLogDetailFailWarehouses
=
new
HashSet
<
BaseJpMessageReminderLogDetail
>();
BaseJpMessageReminderLogDetailWarehouses
=
new
HashSet
<
BaseJpMessageReminderLogDetail
>();
BaseJpShelfInfos
=
new
HashSet
<
BaseJpShelfInfo
>();
BaseJpWarehouseDevHistories
=
new
HashSet
<
BaseJpWarehouseDevHistory
>();
BaseJpWarehouseDevs
=
new
HashSet
<
BaseJpWarehouseDev
>();
...
...
@@ -22,6 +24,8 @@ namespace JmpModel.Model
CommonJpChannelCfgs
=
new
HashSet
<
CommonJpChannelCfg
>();
CommonJpChannelMonitorRecords
=
new
HashSet
<
CommonJpChannelMonitorRecord
>();
CommonJpEquipmentBoxMarks
=
new
HashSet
<
CommonJpEquipmentBoxMark
>();
CommonJpEquipmentFailWarehouseStateFailWarehouses
=
new
HashSet
<
CommonJpEquipmentFailWarehouseState
>();
CommonJpEquipmentFailWarehouseStateTrueWarehouses
=
new
HashSet
<
CommonJpEquipmentFailWarehouseState
>();
CommonJpEquipmentHistories
=
new
HashSet
<
CommonJpEquipmentHistory
>();
CommonJpEquipmentInventories
=
new
HashSet
<
CommonJpEquipmentInventory
>();
CommonJpEquipmentStates
=
new
HashSet
<
CommonJpEquipmentState
>();
...
...
@@ -101,6 +105,10 @@ namespace JmpModel.Model
[
ForeignKey
(
nameof
(
OrgizationId
))]
[
InverseProperty
(
nameof
(
BaseJpOrganization
.
BaseJpWarehouses
))]
public
virtual
BaseJpOrganization
Orgization
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
BaseJpMessageReminderLogDetail
.
FailWarehouse
))]
public
virtual
ICollection
<
BaseJpMessageReminderLogDetail
>
BaseJpMessageReminderLogDetailFailWarehouses
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
BaseJpMessageReminderLogDetail
.
Warehouse
))]
public
virtual
ICollection
<
BaseJpMessageReminderLogDetail
>
BaseJpMessageReminderLogDetailWarehouses
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
BaseJpShelfInfo
.
Warehouse
))]
public
virtual
ICollection
<
BaseJpShelfInfo
>
BaseJpShelfInfos
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
BaseJpWarehouseDevHistory
.
Warehouse
))]
...
...
@@ -121,6 +129,10 @@ namespace JmpModel.Model
public
virtual
ICollection
<
CommonJpChannelMonitorRecord
>
CommonJpChannelMonitorRecords
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpEquipmentBoxMark
.
Warehouse
))]
public
virtual
ICollection
<
CommonJpEquipmentBoxMark
>
CommonJpEquipmentBoxMarks
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpEquipmentFailWarehouseState
.
FailWarehouse
))]
public
virtual
ICollection
<
CommonJpEquipmentFailWarehouseState
>
CommonJpEquipmentFailWarehouseStateFailWarehouses
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpEquipmentFailWarehouseState
.
TrueWarehouse
))]
public
virtual
ICollection
<
CommonJpEquipmentFailWarehouseState
>
CommonJpEquipmentFailWarehouseStateTrueWarehouses
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpEquipmentHistory
.
WarehouseNavigation
))]
public
virtual
ICollection
<
CommonJpEquipmentHistory
>
CommonJpEquipmentHistories
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpEquipmentInventory
.
WarehouseCodeNavigation
))]
...
...
JmpModel/Model/CommonJpEquipmentFailWarehouseState.cs
0 → 100644
View file @
f4fbd11d
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#
nullable
disable
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
JmpModel.Model
{
[
Table
(
"common_jp_equipment_fail_warehouse_state"
)]
public
partial
class
CommonJpEquipmentFailWarehouseState
{
[
Key
]
[
Column
(
"id"
)]
[
StringLength
(
36
)]
public
string
Id
{
get
;
set
;
}
[
Column
(
"createTime"
,
TypeName
=
"datetime"
)]
public
DateTime
?
CreateTime
{
get
;
set
;
}
/// <summary>
/// 装备id
/// </summary>
[
Column
(
"inventoryId"
)]
[
StringLength
(
36
)]
public
string
InventoryId
{
get
;
set
;
}
/// <summary>
/// epc
/// </summary>
[
Column
(
"epc"
)]
[
StringLength
(
255
)]
public
string
Epc
{
get
;
set
;
}
/// <summary>
/// 装备类型id
/// </summary>
[
Column
(
"equipmentDetailId"
)]
[
StringLength
(
36
)]
public
string
EquipmentDetailId
{
get
;
set
;
}
/// <summary>
/// 装备类型名称
/// </summary>
[
Column
(
"equipmentDetailName"
)]
[
StringLength
(
255
)]
public
string
EquipmentDetailName
{
get
;
set
;
}
/// <summary>
/// 装备号型id
/// </summary>
[
Column
(
"equipmentSizeId"
)]
[
StringLength
(
36
)]
public
string
EquipmentSizeId
{
get
;
set
;
}
/// <summary>
/// 装备号型名称
/// </summary>
[
Column
(
"equipmentSizeName"
)]
[
StringLength
(
255
)]
public
string
EquipmentSizeName
{
get
;
set
;
}
/// <summary>
/// 警员id
/// </summary>
[
Column
(
"policeId"
)]
[
StringLength
(
36
)]
public
string
PoliceId
{
get
;
set
;
}
/// <summary>
/// 警员姓名
/// </summary>
[
Column
(
"policeName"
)]
[
StringLength
(
255
)]
public
string
PoliceName
{
get
;
set
;
}
/// <summary>
/// 出入库类型:
/// 出库 0
/// 入库 1
///
/// </summary>
[
Column
(
"outInState"
)]
public
int
?
OutInState
{
get
;
set
;
}
/// <summary>
/// 错误仓库id
/// </summary>
[
Column
(
"failWarehouseId"
)]
[
StringLength
(
36
)]
public
string
FailWarehouseId
{
get
;
set
;
}
/// <summary>
/// 错误仓库名称
/// </summary>
[
Column
(
"failWarehouseName"
)]
[
StringLength
(
255
)]
public
string
FailWarehouseName
{
get
;
set
;
}
/// <summary>
/// 错误组织机构id
/// </summary>
[
Column
(
"failOrgId"
)]
[
StringLength
(
36
)]
public
string
FailOrgId
{
get
;
set
;
}
/// <summary>
/// 错误组织机构名称
/// </summary>
[
Column
(
"failOrgName"
)]
[
StringLength
(
255
)]
public
string
FailOrgName
{
get
;
set
;
}
/// <summary>
/// 正确仓库id
/// </summary>
[
Column
(
"trueWarehouseId"
)]
[
StringLength
(
36
)]
public
string
TrueWarehouseId
{
get
;
set
;
}
/// <summary>
/// 正确仓库名称
/// </summary>
[
Column
(
"trueWarehouseName"
)]
[
StringLength
(
255
)]
public
string
TrueWarehouseName
{
get
;
set
;
}
/// <summary>
/// 正确组织机构id
/// </summary>
[
Column
(
"trueOrgId"
)]
[
StringLength
(
36
)]
public
string
TrueOrgId
{
get
;
set
;
}
/// <summary>
/// 正确组织机构名称
/// </summary>
[
Column
(
"trueOrgName"
)]
[
StringLength
(
255
)]
public
string
TrueOrgName
{
get
;
set
;
}
/// <summary>
/// 抓拍照片
/// </summary>
[
Column
(
"picUrl"
)]
[
StringLength
(
255
)]
public
string
PicUrl
{
get
;
set
;
}
/// <summary>
/// 是否已完成(完成一次完整出入库)
/// </summary>
[
Column
(
"isCompleted"
)]
public
bool
IsCompleted
{
get
;
set
;
}
/// <summary>
/// 更新时间
/// </summary>
[
Column
(
"updateTime"
,
TypeName
=
"datetime"
)]
public
DateTime
?
UpdateTime
{
get
;
set
;
}
[
ForeignKey
(
nameof
(
EquipmentDetailId
))]
[
InverseProperty
(
nameof
(
BaseJpEquipmentDetail
.
CommonJpEquipmentFailWarehouseStates
))]
public
virtual
BaseJpEquipmentDetail
EquipmentDetail
{
get
;
set
;
}
[
ForeignKey
(
nameof
(
EquipmentSizeId
))]
[
InverseProperty
(
nameof
(
BaseJpEquipmentSize
.
CommonJpEquipmentFailWarehouseStates
))]
public
virtual
BaseJpEquipmentSize
EquipmentSize
{
get
;
set
;
}
[
ForeignKey
(
nameof
(
FailOrgId
))]
[
InverseProperty
(
nameof
(
BaseJpOrganization
.
CommonJpEquipmentFailWarehouseStateFailOrgs
))]
public
virtual
BaseJpOrganization
FailOrg
{
get
;
set
;
}
[
ForeignKey
(
nameof
(
FailWarehouseId
))]
[
InverseProperty
(
nameof
(
BaseJpWarehouse
.
CommonJpEquipmentFailWarehouseStateFailWarehouses
))]
public
virtual
BaseJpWarehouse
FailWarehouse
{
get
;
set
;
}
[
ForeignKey
(
nameof
(
InventoryId
))]
[
InverseProperty
(
nameof
(
CommonJpEquipmentInventory
.
CommonJpEquipmentFailWarehouseStates
))]
public
virtual
CommonJpEquipmentInventory
Inventory
{
get
;
set
;
}
[
ForeignKey
(
nameof
(
PoliceId
))]
[
InverseProperty
(
nameof
(
BaseJpPoliceman
.
CommonJpEquipmentFailWarehouseStates
))]
public
virtual
BaseJpPoliceman
Police
{
get
;
set
;
}
[
ForeignKey
(
nameof
(
TrueOrgId
))]
[
InverseProperty
(
nameof
(
BaseJpOrganization
.
CommonJpEquipmentFailWarehouseStateTrueOrgs
))]
public
virtual
BaseJpOrganization
TrueOrg
{
get
;
set
;
}
[
ForeignKey
(
nameof
(
TrueWarehouseId
))]
[
InverseProperty
(
nameof
(
BaseJpWarehouse
.
CommonJpEquipmentFailWarehouseStateTrueWarehouses
))]
public
virtual
BaseJpWarehouse
TrueWarehouse
{
get
;
set
;
}
}
}
\ No newline at end of file
JmpModel/Model/CommonJpEquipmentInventory.cs
View file @
f4fbd11d
...
...
@@ -12,7 +12,9 @@ namespace JmpModel.Model
{
public
CommonJpEquipmentInventory
()
{
BaseJpMessageReminderLogDetails
=
new
HashSet
<
BaseJpMessageReminderLogDetail
>();
CommonJpChannelMonitorRecordInventories
=
new
HashSet
<
CommonJpChannelMonitorRecordInventory
>();
CommonJpEquipmentFailWarehouseStates
=
new
HashSet
<
CommonJpEquipmentFailWarehouseState
>();
CommonJpEquipmentStates
=
new
HashSet
<
CommonJpEquipmentState
>();
CommonJpInventoryDetails
=
new
HashSet
<
CommonJpInventoryDetail
>();
}
...
...
@@ -203,8 +205,12 @@ namespace JmpModel.Model
[
ForeignKey
(
nameof
(
WarehouseCode
))]
[
InverseProperty
(
nameof
(
BaseJpWarehouse
.
CommonJpEquipmentInventories
))]
public
virtual
BaseJpWarehouse
WarehouseCodeNavigation
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
BaseJpMessageReminderLogDetail
.
Inventory
))]
public
virtual
ICollection
<
BaseJpMessageReminderLogDetail
>
BaseJpMessageReminderLogDetails
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpChannelMonitorRecordInventory
.
Inventory
))]
public
virtual
ICollection
<
CommonJpChannelMonitorRecordInventory
>
CommonJpChannelMonitorRecordInventories
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpEquipmentFailWarehouseState
.
Inventory
))]
public
virtual
ICollection
<
CommonJpEquipmentFailWarehouseState
>
CommonJpEquipmentFailWarehouseStates
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpEquipmentState
.
Eqiupment
))]
public
virtual
ICollection
<
CommonJpEquipmentState
>
CommonJpEquipmentStates
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpInventoryDetail
.
Inv
))]
...
...
JmpModel/Model/CommonJpUser.cs
View file @
f4fbd11d
...
...
@@ -12,6 +12,7 @@ namespace JmpModel.Model
{
public
CommonJpUser
()
{
BaseJpMessageReminderConfigs
=
new
HashSet
<
BaseJpMessageReminderConfig
>();
BaseJpTempFiles
=
new
HashSet
<
BaseJpTempFile
>();
CommonJpInventoryTables
=
new
HashSet
<
CommonJpInventoryTable
>();
CommonJpPoliceShiftJobsApplies
=
new
HashSet
<
CommonJpPoliceShiftJobsApply
>();
...
...
@@ -77,6 +78,8 @@ namespace JmpModel.Model
[
ForeignKey
(
nameof
(
PoliceId
))]
[
InverseProperty
(
nameof
(
BaseJpPoliceman
.
CommonJpUsers
))]
public
virtual
BaseJpPoliceman
Police
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
BaseJpMessageReminderConfig
.
UpdateUser
))]
public
virtual
ICollection
<
BaseJpMessageReminderConfig
>
BaseJpMessageReminderConfigs
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
BaseJpTempFile
.
UploadUser
))]
public
virtual
ICollection
<
BaseJpTempFile
>
BaseJpTempFiles
{
get
;
set
;
}
[
InverseProperty
(
nameof
(
CommonJpInventoryTable
.
User
))]
...
...
JmpModel/Model/DataContext/JunmppolicesqlContext.cs
View file @
f4fbd11d
差异被折叠。
点击展开。
JmpModel/Model/ViewEquipment.cs
View file @
f4fbd11d
...
...
@@ -9,10 +9,16 @@ namespace JmpModel.Model
{
public
partial
class
ViewEquipment
{
[
Column
(
"nameJc"
)]
[
StringLength
(
64
)]
public
string
NameJc
{
get
;
set
;
}
[
Required
]
[
Column
(
"org_id"
)]
[
StringLength
(
36
)]
public
string
OrgId
{
get
;
set
;
}
[
Column
(
"sortCode"
)]
[
StringLength
(
36
)]
public
string
SortCode
{
get
;
set
;
}
[
Required
]
[
Column
(
"org_name"
)]
[
StringLength
(
255
)]
...
...
JmpModel/efpt.config.json
View file @
f4fbd11d
...
...
@@ -8,6 +8,7 @@
"ModelNamespace"
:
null
,
"OutputContextPath"
:
"Model
\/
DataContext"
,
"OutputPath"
:
"Model"
,
"PreserveCasingWithRegex"
:
true
,
"ProjectRootNamespace"
:
"JmpModel"
,
"Schemas"
:
null
,
"SelectedHandlebarsLanguage"
:
0
,
...
...
@@ -78,6 +79,18 @@
"ObjectType"
:
0
},
{
"Name"
:
"[dbo].[base_jp_message_reminder_config]"
,
"ObjectType"
:
0
},
{
"Name"
:
"[dbo].[base_jp_message_reminder_log]"
,
"ObjectType"
:
0
},
{
"Name"
:
"[dbo].[base_jp_message_reminder_log_detail]"
,
"ObjectType"
:
0
},
{
"Name"
:
"[dbo].[base_jp_model]"
,
"ObjectType"
:
0
},
...
...
@@ -194,6 +207,10 @@
"ObjectType"
:
0
},
{
"Name"
:
"[dbo].[common_jp_equipment_fail_warehouse_state]"
,
"ObjectType"
:
0
},
{
"Name"
:
"[dbo].[common_jp_equipment_history]"
,
"ObjectType"
:
0
},
...
...
@@ -418,7 +435,7 @@
"ObjectType"
:
3
}
],
"UiHint"
:
"
PC.junmppolicesql1115_3
"
,
"UiHint"
:
"
pc.junmppolicesqldev.dbo
"
,
"UseBoolPropertiesWithoutDefaultSql"
:
false
,
"UseDatabaseNames"
:
false
,
"UseDbContextSplitting"
:
false
,
...
...
@@ -435,5 +452,6 @@
"UseNodaTime"
:
false
,
"UseNullableReferences"
:
false
,
"UseSchemaFolders"
:
false
,
"UseSpatial"
:
false
"UseSpatial"
:
false
,
"UseT4"
:
false
}
\ No newline at end of file
JunmpPoliceStation/Controllers/InventoryController.cs
View file @
f4fbd11d
...
...
@@ -19,6 +19,7 @@ using System.Net.Http;
using
System.Text
;
using
System.Threading.Tasks
;
using
JunmpPoliceStation.App_Start
;
using
Microsoft.CodeAnalysis.CSharp.Syntax
;
using
Rextec.SOA.Infrastructure
;
using
static
JmpModel
.
Model
.
Enumerates
.
BorrowEnum
;
...
...
@@ -6534,7 +6535,9 @@ namespace JunmpPoliceStation.Controllers
string
policeId
=
entity
.
policeId
;
string
warehouseId
=
entity
.
warehouseId
;
string
currentState
=
entity
.
currentState
;
var
warehouseInfo
=
_unitOfWork
.
WarehouseRepository
.
Get
(
p
=>
p
.
Id
==
warehouseId
);
var
warehouseInfo
=
_unitOfWork
.
DbContext
.
BaseJpWarehouses
.
Include
(
p
=>
p
.
Orgization
)
.
FirstOrDefault
(
p
=>
p
.
Id
==
warehouseId
);
if
(
warehouseInfo
.
IsLocked
==
true
)
//检查仓库是否被锁
{
return
JsonManager
.
SimpleStatusResponse
(
ResultCode
.
WAREHOUSE_LOCK
);
...
...
@@ -7216,9 +7219,83 @@ namespace JunmpPoliceStation.Controllers
WarehouseName
=
warehouseInfo
.
Name
,
});
}
}
#
endregion
//处理非本仓库物资
var
failWarehouseInvList
=
_unitOfWork
.
EquipmentInventoryRepository
.
GetList
(
x
=>
Rfids
.
Contains
(
x
.
Epc
)
&&
x
.
InventoryState
!=
"loss"
&&
x
.
CurrentState
!=
1
&&
x
.
CurrentState
!=
6
&&
x
.
WarehouseCode
!=
warehouseId
,
includes
:
new
[]
{
"EquipmentCodeNavigation"
,
"EquipmentSizecodeNavigation"
,
"WarehouseCodeNavigation"
,
"Org"
,
});
BaseJpPoliceman
police
=
null
;
if
(!
string
.
IsNullOrEmpty
(
policeId
))
{
police
=
_unitOfWork
.
PolicemanRepository
.
Get
(
policeId
);
}
foreach
(
var
inventory
in
failWarehouseInvList
)
{
if
(
currentState
.
Equals
(
"1"
))
{
//入库,无脑存
_unitOfWork
.
DbContext
.
CommonJpEquipmentFailWarehouseStates
.
Add
(
new
CommonJpEquipmentFailWarehouseState
{
Id
=
Guid
.
NewGuid
().
ToString
(),
CreateTime
=
DateTime
.
Now
,
Epc
=
inventory
.
Epc
,
EquipmentDetailId
=
inventory
.
EquipmentCode
,
EquipmentDetailName
=
inventory
.
EquipmentCodeNavigation
?.
Name
,
EquipmentSizeId
=
inventory
.
EquipmentSizecode
,
EquipmentSizeName
=
inventory
.
EquipmentSizecodeNavigation
?.
SizeName
,
PoliceId
=
police
?.
Id
,
PoliceName
=
police
?.
Name
,
OutInState
=
1
,
FailWarehouseId
=
warehouseId
,
FailWarehouseName
=
warehouseInfo
.
Name
,
FailOrgId
=
warehouseInfo
.
OrgizationId
,
FailOrgName
=
warehouseInfo
.
Orgization
?.
Name
,
TrueWarehouseId
=
inventory
.
WarehouseCode
,
TrueWarehouseName
=
inventory
.
WarehouseCodeNavigation
?.
Name
,
TrueOrgId
=
inventory
.
OrgId
,
TrueOrgName
=
inventory
.
Org
?.
Name
,
PicUrl
=
picUrl
});
}
if
(
currentState
.
Equals
(
"0"
))
{
//出库 判断之前是否有记录
var
oldstate
=
_unitOfWork
.
DbContext
.
CommonJpEquipmentFailWarehouseStates
.
Where
(
x
=>
x
.
Epc
==
inventory
.
Epc
&&
x
.
FailWarehouseId
==
warehouseId
)
.
OrderByDescending
(
x
=>
x
.
CreateTime
)
.
FirstOrDefault
();
if
(
oldstate
==
null
)
{
//无之前入库记录,认为误读,过滤
continue
;
}
if
(
oldstate
.
OutInState
==
0
)
{
//出库 重复出库 过滤
continue
;
}
else
{
//入库 出库物资,正常出库并记录
oldstate
.
IsCompleted
=
true
;
}
}
}
bool
errorResult
=
false
;
if
(
ErrorState
.
Count
>
0
)
{
...
...
JunmpPoliceStation/Controllers/MessageReminderController.cs
0 → 100644
View file @
f4fbd11d
差异被折叠。
点击展开。
JunmpPoliceStation/Extensions/CronJob.cs
0 → 100644
View file @
f4fbd11d
差异被折叠。
点击展开。
JunmpPoliceStation/JunmpPoliceStation.csproj
View file @
f4fbd11d
...
...
@@ -58,6 +58,8 @@
<ItemGroup>
<PackageReference Include="AspNetCoreRateLimit" Version="3.2.2" />
<PackageReference Include="EntityFrameworkProfiler.Appender" Version="6.0.6031" />
<PackageReference Include="Hangfire.AspNetCore" Version="1.7.32" />
<PackageReference Include="Hangfire.MemoryStorage" Version="1.7.0" />
<PackageReference Include="LiteDB" Version="5.0.9" />
<PackageReference Include="LitJson" Version="0.18.0" />
<PackageReference Include="Microsoft.AspNetCore.Hosting.WindowsServices" Version="3.1.10" />
...
...
JunmpPoliceStation/Startup.cs
View file @
f4fbd11d
...
...
@@ -6,6 +6,9 @@ using System.Net.WebSockets;
using
System.Reflection
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
Hangfire.MemoryStorage.Entities
;
using
Hangfire
;
using
Hangfire.MemoryStorage
;
using
JmpModel.Model
;
using
JmpModel.Model.DataContext
;
using
JmpModel.Model.Repository
;
...
...
@@ -139,6 +142,11 @@ namespace JunmpPoliceStation
//});
services
.
AddSingleton
<
MQTTServer
>();
services
.
AddHangfire
(
configuration
=>
configuration
.
UseMemoryStorage
());
//使用内存
services
.
AddHangfireServer
();
//添加hangfire服务
services
.
AddScoped
<
CronJob
>();
//注册执行类
}
}
...
...
@@ -188,6 +196,14 @@ namespace JunmpPoliceStation
});
//hangfire
app
.
UseHangfireDashboard
();
using
(
var
scope
=
app
.
ApplicationServices
.
CreateScope
())
{
var
cronJob
=
scope
.
ServiceProvider
.
GetRequiredService
<
CronJob
>();
RecurringJob
.
AddOrUpdate
(()
=>
cronJob
.
UpdateMessageReminderData
(),
"0 0 2 1/1 * *"
,
TimeZoneInfo
.
Local
);
}
//app.UseMvc(routes =>
//{
// routes.MapRoute(
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论