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
497a1a28
Commit
497a1a28
authored
Feb 17, 2023
by
zxw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
装备表新增UpdateTime字段 新增or修改currentstate时更新
三方接口中增加本仓库出入库业务
parent
5c072baa
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
208 行增加
和
32 行删除
+208
-32
CommonJpEquipmentInventory.cs
JmpModel/Model/CommonJpEquipmentInventory.cs
+5
-0
JunmppolicesqlContext.cs
JmpModel/Model/DataContext/JunmppolicesqlContext.cs
+17
-17
efpt.config.json
JmpModel/efpt.config.json
+3
-3
CabinetController.cs
JunmpPoliceStation/Controllers/CabinetController.cs
+55
-0
FixReceiveApplyController.cs
JunmpPoliceStation/Controllers/FixReceiveApplyController.cs
+2
-0
InventoryController.cs
JunmpPoliceStation/Controllers/InventoryController.cs
+111
-7
PoliceShiftJobsController.cs
JunmpPoliceStation/Controllers/PoliceShiftJobsController.cs
+1
-0
PrintController.cs
JunmpPoliceStation/Controllers/PrintController.cs
+14
-5
没有找到文件。
JmpModel/Model/CommonJpEquipmentInventory.cs
View file @
497a1a28
...
...
@@ -174,6 +174,11 @@ namespace JmpModel.Model
[
Column
(
"tid"
)]
[
StringLength
(
255
)]
public
string
Tid
{
get
;
set
;
}
/// <summary>
/// 更新时间
/// </summary>
[
Column
(
"update_time"
,
TypeName
=
"datetime"
)]
public
DateTime
?
UpdateTime
{
get
;
set
;
}
[
ForeignKey
(
nameof
(
BagInventoryId
))]
[
InverseProperty
(
nameof
(
CommonJpBagInventory
.
CommonJpEquipmentInventories
))]
...
...
JmpModel/Model/DataContext/JunmppolicesqlContext.cs
View file @
497a1a28
...
...
@@ -11,15 +11,11 @@ namespace JmpModel.Model.DataContext
{
public
JunmppolicesqlContext
()
{
//60秒超时
this
.
Database
.
SetCommandTimeout
(
60
);
}
public
JunmppolicesqlContext
(
DbContextOptions
<
JunmppolicesqlContext
>
options
)
:
base
(
options
)
{
//60秒超时
this
.
Database
.
SetCommandTimeout
(
60
);
}
public
virtual
DbSet
<
AlipayConfig
>
AlipayConfigs
{
get
;
set
;
}
...
...
@@ -333,19 +329,6 @@ namespace JmpModel.Model.DataContext
.
HasConstraintName
(
"base_jp_cabinet_policeman_ibfk_2"
);
});
modelBuilder
.
Entity
<
BaseJpCabinetPolicemanMultiple
>(
entity
=>
{
entity
.
Property
(
e
=>
e
.
Id
).
IsFixedLength
();
entity
.
Property
(
e
=>
e
.
BoxNo
).
IsFixedLength
();
entity
.
Property
(
e
=>
e
.
CabinetRealId
).
IsFixedLength
();
entity
.
Property
(
e
=>
e
.
UserId
).
IsFixedLength
();
entity
.
Property
(
e
=>
e
.
UserName
).
IsFixedLength
();
});
modelBuilder
.
Entity
<
BaseJpCabinetWorklog
>(
entity
=>
{
entity
.
Property
(
e
=>
e
.
Id
).
IsUnicode
(
false
);
...
...
@@ -1165,6 +1148,12 @@ Smart:智能货架
entity
.
HasIndex
(
e
=>
e
.
CurrentState
)
.
HasName
(
"IX_common_jp_borrow_return"
);
entity
.
HasIndex
(
e
=>
new
{
e
.
WarehouseId
,
e
.
OrderCode
,
e
.
OrgId
,
e
.
CreateTime
,
e
.
IsWork
,
e
.
CurrentState
,
e
.
ActionType
,
e
.
ApplyId
,
e
.
Id
})
.
HasName
(
"_dta_index_common_jp_borrow_return_9_1013578649__K4_K5_K12_K1_6_8_9_11_14"
);
entity
.
HasIndex
(
e
=>
new
{
e
.
Sort
,
e
.
PolicemanId
,
e
.
CurrentState
,
e
.
ActionType
,
e
.
WarehouseId
,
e
.
OutTime
,
e
.
OrderCode
,
e
.
OrgId
,
e
.
CreateUser
,
e
.
CreateTime
,
e
.
IsAfter
,
e
.
IsWork
,
e
.
UpdateUser
,
e
.
ApplyId
,
e
.
Id
})
.
HasName
(
"_dta_index_common_jp_borrow_return_5_1013578649__K12_K1_2_3_4_5_6_7_8_9_10_11_13_14_15"
);
entity
.
Property
(
e
=>
e
.
Id
).
IsUnicode
(
false
);
entity
.
Property
(
e
=>
e
.
ApplyId
).
IsUnicode
(
false
);
...
...
@@ -1205,6 +1194,9 @@ Smart:智能货架
modelBuilder
.
Entity
<
CommonJpBorrowReturnApply
>(
entity
=>
{
entity
.
HasIndex
(
e
=>
new
{
e
.
ProcessCurrentId
,
e
.
ActionType
})
.
HasName
(
"_dta_index_common_jp_borrow_return_apply_5_1029578706__K22_K4"
);
entity
.
Property
(
e
=>
e
.
Id
).
IsUnicode
(
false
);
entity
.
Property
(
e
=>
e
.
ApplyId
).
IsUnicode
(
false
);
...
...
@@ -1317,6 +1309,9 @@ Smart:智能货架
modelBuilder
.
Entity
<
CommonJpBorrowReturnDetailReality
>(
entity
=>
{
entity
.
HasIndex
(
e
=>
new
{
e
.
RealityId
,
e
.
EquipmentDetailId
})
.
HasName
(
"_dta_index_common_jp_borrow_return_detail_r_9_1061578820__K2_K7"
);
entity
.
Property
(
e
=>
e
.
Id
).
IsUnicode
(
false
);
entity
.
Property
(
e
=>
e
.
EquipmentDetailId
).
IsUnicode
(
false
);
...
...
@@ -1778,6 +1773,9 @@ Smart:智能货架
entity
.
HasIndex
(
e
=>
new
{
e
.
Id
,
e
.
SupplierCode
,
e
.
WarrantyCycle
,
e
.
UseTime
,
e
.
EquipmentCode
,
e
.
WarehouseCode
,
e
.
CabinetId
,
e
.
EquipmentSizecode
,
e
.
CurrentState
})
.
HasName
(
"_dta_index_common_jp_equipment_inventory_8_1109578991__K6_K8_K9_K10_K12_1_3_20_23"
);
entity
.
HasIndex
(
e
=>
new
{
e
.
CurrentState
,
e
.
CreateTime
,
e
.
Price
,
e
.
SafeLevel
,
e
.
IsFixed
,
e
.
OrgId
,
e
.
InventoryState
,
e
.
EquipmentSizecode
,
e
.
EquipmentCode
,
e
.
WarehouseCode
})
.
HasName
(
"_dta_index_common_jp_equipment_inventory_9_1109578991__K41_K31_K10_K6_K8_12_15_24_36_42"
);
entity
.
HasIndex
(
e
=>
new
{
e
.
Sort
,
e
.
SupplierCode
,
e
.
Epc
,
e
.
PoliceCode
,
e
.
EquipmentCode
,
e
.
Wzdm
,
e
.
CabinetId
,
e
.
EquipmentSizecode
,
e
.
EquipmentLocation
,
e
.
OutTime
,
e
.
ReturnTime
,
e
.
CreateTime
,
e
.
FirstUseTime
,
e
.
FixCount
,
e
.
CreateUser
,
e
.
UpdateUser
,
e
.
WarrantyCycle
,
e
.
RepairCycle
,
e
.
ProductTime
,
e
.
UseTime
,
e
.
Price
,
e
.
UseDirection
,
e
.
CurrentState
,
e
.
Id
,
e
.
WarehouseCode
})
.
HasName
(
"_dta_index_common_jp_equipment_inventory_8_1109578991__K12_K1_K8_2_3_4_5_6_7_9_10_11_13_14_15_16_17_18_19_20_21_22_23_24_25"
);
...
...
@@ -1854,6 +1852,8 @@ Smart:智能货架
.
IsUnicode
(
false
)
.
HasComment
(
"标签TID"
);
entity
.
Property
(
e
=>
e
.
UpdateTime
).
HasComment
(
"更新时间"
);
entity
.
Property
(
e
=>
e
.
UpdateUser
).
IsUnicode
(
false
);
entity
.
Property
(
e
=>
e
.
WarehouseCode
).
IsUnicode
(
false
);
...
...
JmpModel/efpt.config.json
View file @
497a1a28
...
...
@@ -435,9 +435,11 @@
"ObjectType"
:
3
}
],
"UiHint"
:
"PC.junmppolicesqldev"
,
"UiHint"
:
"pc.junmppolicesqldev.dbo"
,
"UncountableWords"
:
null
,
"UseBoolPropertiesWithoutDefaultSql"
:
false
,
"UseDatabaseNames"
:
false
,
"UseDateOnlyTimeOnly"
:
false
,
"UseDbContextSplitting"
:
false
,
"UseFluentApiOnly"
:
false
,
"UseHandleBars"
:
false
,
...
...
@@ -445,9 +447,7 @@
"UseInflector"
:
true
,
"UseLegacyPluralizer"
:
false
,
"UseManyToManyEntity"
:
false
,
"UseNoConstructor"
:
false
,
"UseNoDefaultConstructor"
:
false
,
"UseNoNavigations"
:
false
,
"UseNoObjectFilter"
:
false
,
"UseNodaTime"
:
false
,
"UseNullableReferences"
:
false
,
...
...
JunmpPoliceStation/Controllers/CabinetController.cs
View file @
497a1a28
...
...
@@ -323,6 +323,8 @@ namespace JunmpPoliceStation.Controllers
{
inventory
.
CabinetId
=
null
;
inventory
.
CurrentState
=
8
;
//更新时间
inventory
.
UpdateTime
=
DateTime
.
Now
;
updateInvs
.
Add
(
inventory
);
}
}
...
...
@@ -331,6 +333,8 @@ namespace JunmpPoliceStation.Controllers
{
Inv
.
CabinetId
=
null
;
Inv
.
CurrentState
=
8
;
//更新时间
Inv
.
UpdateTime
=
DateTime
.
Now
;
updateInvs
.
Add
(
Inv
);
}
}
...
...
@@ -1267,6 +1271,16 @@ namespace JunmpPoliceStation.Controllers
}
}
var
newInvList
=
_unitOfWork
.
DbContext
.
ChangeTracker
.
Entries
()
.
Where
(
x
=>
x
.
Entity
is
CommonJpEquipmentInventory
)
.
Select
(
x
=>
x
.
Entity
as
CommonJpEquipmentInventory
)
.
ToList
();
foreach
(
var
inventory
in
newInvList
)
{
inventory
.
UpdateTime
=
DateTime
.
Now
;
}
bool
result
=
true
;
if
(
OutEpc
.
Count
>
0
)
{
...
...
@@ -1563,6 +1577,16 @@ namespace JunmpPoliceStation.Controllers
}
}
var
newInvList
=
_unitOfWork
.
DbContext
.
ChangeTracker
.
Entries
()
.
Where
(
x
=>
x
.
Entity
is
CommonJpEquipmentInventory
)
.
Select
(
x
=>
x
.
Entity
as
CommonJpEquipmentInventory
)
.
ToList
();
foreach
(
var
inventory
in
newInvList
)
{
inventory
.
UpdateTime
=
DateTime
.
Now
;
}
bool
result
=
true
;
if
(
OutEpc
.
Count
>
0
)
{
...
...
@@ -2225,6 +2249,16 @@ namespace JunmpPoliceStation.Controllers
}
}
}
var
newInvList
=
_unitOfWork
.
DbContext
.
ChangeTracker
.
Entries
()
.
Where
(
x
=>
x
.
Entity
is
CommonJpEquipmentInventory
)
.
Select
(
x
=>
x
.
Entity
as
CommonJpEquipmentInventory
)
.
ToList
();
foreach
(
var
inventory
in
newInvList
)
{
inventory
.
UpdateTime
=
DateTime
.
Now
;
}
bool
result
=
true
;
if
(
OutEpc
.
Count
>
0
)
{
...
...
@@ -2560,6 +2594,16 @@ namespace JunmpPoliceStation.Controllers
}
}
}
var
newInvList
=
_unitOfWork
.
DbContext
.
ChangeTracker
.
Entries
()
.
Where
(
x
=>
x
.
Entity
is
CommonJpEquipmentInventory
)
.
Select
(
x
=>
x
.
Entity
as
CommonJpEquipmentInventory
)
.
ToList
();
foreach
(
var
inventory
in
newInvList
)
{
inventory
.
UpdateTime
=
DateTime
.
Now
;
}
bool
result
=
true
;
if
(
OutEpc
.
Count
>
0
)
{
...
...
@@ -2958,6 +3002,15 @@ namespace JunmpPoliceStation.Controllers
}
var
newInvList
=
_unitOfWork
.
DbContext
.
ChangeTracker
.
Entries
()
.
Where
(
x
=>
x
.
Entity
is
CommonJpEquipmentInventory
)
.
Select
(
x
=>
x
.
Entity
as
CommonJpEquipmentInventory
)
.
ToList
();
foreach
(
var
inventory
in
newInvList
)
{
inventory
.
UpdateTime
=
DateTime
.
Now
;
}
bool
result
=
true
;
if
(
InsertState
.
Count
>
0
)
...
...
@@ -3751,6 +3804,7 @@ namespace JunmpPoliceStation.Controllers
item
.
CurrentState
=
7
;
item
.
PoliceCode
=
null
;
item
.
CabinetId
=
null
;
item
.
UpdateTime
=
DateTime
.
Now
;
EqInv
.
Add
(
item
);
}
_unitOfWork
.
EquipmentInventoryRepository
.
Update
(
EqInv
,
false
);
...
...
@@ -3999,6 +4053,7 @@ namespace JunmpPoliceStation.Controllers
item
.
CurrentState
=
7
;
item
.
PoliceCode
=
null
;
item
.
CabinetId
=
null
;
item
.
UpdateTime
=
DateTime
.
Now
;
EqInv
.
Add
(
item
);
}
_unitOfWork
.
EquipmentInventoryRepository
.
Update
(
EqInv
,
false
);
...
...
JunmpPoliceStation/Controllers/FixReceiveApplyController.cs
View file @
497a1a28
...
...
@@ -1292,6 +1292,7 @@ namespace JunmpPoliceStation.Controllers
//单警柜解绑
x
.
CabinetId
=
null
;
x
.
PoliceCode
=
null
;
x
.
UpdateTime
=
DateTime
.
Now
;
_unitOfWork
.
EquipmentInventoryRepository
.
Update
(
x
,
false
);
});
...
...
@@ -1370,6 +1371,7 @@ namespace JunmpPoliceStation.Controllers
x
.
EquipmentLocation
=
0
;
x
.
IsFixed
=
true
;
x
.
UpdateTime
=
DateTime
.
Now
;
_unitOfWork
.
EquipmentInventoryRepository
.
Update
(
x
,
false
);
});
...
...
JunmpPoliceStation/Controllers/InventoryController.cs
View file @
497a1a28
差异被折叠。
点击展开。
JunmpPoliceStation/Controllers/PoliceShiftJobsController.cs
View file @
497a1a28
...
...
@@ -1032,6 +1032,7 @@ namespace JunmpPoliceStation.Controllers
x
.
WarehouseCode
=
null
;
x
.
OrgId
=
orgId
;
x
.
PoliceCode
=
policeId
;
x
.
UpdateTime
=
DateTime
.
Now
;
_unitOfWork
.
EquipmentInventoryRepository
.
Update
(
x
,
false
);
});
...
...
JunmpPoliceStation/Controllers/PrintController.cs
View file @
497a1a28
...
...
@@ -1541,7 +1541,8 @@ namespace JunmpPoliceStation.Controllers
RepairCycle
=
repairCycle
,
IsBorrowed
=
false
,
InstantiationState
=
2
,
OrgId
=
warehouse
?.
OrgizationId
OrgId
=
warehouse
?.
OrgizationId
,
UpdateTime
=
DateTime
.
Now
};
res
=
_unitOfWork
.
EquipmentInventoryRepository
.
Insert
(
ent
);
}
...
...
@@ -1713,7 +1714,8 @@ namespace JunmpPoliceStation.Controllers
RepairCycle
=
repairCycle
,
IsBorrowed
=
false
,
InstantiationState
=
2
,
OrgId
=
warehouse
?.
OrgizationId
OrgId
=
warehouse
?.
OrgizationId
,
UpdateTime
=
DateTime
.
Now
};
if
(!
string
.
IsNullOrEmpty
(
shelfId
))
...
...
@@ -1951,7 +1953,8 @@ namespace JunmpPoliceStation.Controllers
RepairCycle
=
repairCycle
,
IsBorrowed
=
false
,
InstantiationState
=
2
,
OrgId
=
warehouse
?.
OrgizationId
OrgId
=
warehouse
?.
OrgizationId
,
UpdateTime
=
DateTime
.
Now
};
_unitOfWork
.
EquipmentInventoryRepository
.
Insert
(
ent
,
false
);
}
...
...
@@ -2170,7 +2173,8 @@ namespace JunmpPoliceStation.Controllers
IsInBox
=
true
,
BoxMarkId
=
boxMark
.
Id
,
InstantiationState
=
1
,
OrgId
=
warehouse
?.
OrgizationId
OrgId
=
warehouse
?.
OrgizationId
,
UpdateTime
=
DateTime
.
Now
};
if
(!
string
.
IsNullOrEmpty
(
shelfId
))
{
...
...
@@ -2389,7 +2393,8 @@ namespace JunmpPoliceStation.Controllers
InstantiationState
=
1
,
BoxMarkId
=
boxMark
.
Id
,
IsInBox
=
true
,
OrgId
=
warehouse
?.
OrgizationId
OrgId
=
warehouse
?.
OrgizationId
,
UpdateTime
=
DateTime
.
Now
};
if
(!
string
.
IsNullOrEmpty
(
shelfId
))
{
...
...
@@ -2613,6 +2618,7 @@ namespace JunmpPoliceStation.Controllers
ShelfRow
=
epcObj
.
ShelfRow
,
ShelfColumn
=
epcObj
.
ShelfColumn
,
OrgId
=
epcObj
.
Detail
?.
Order
?.
OrgId
,
UpdateTime
=
DateTime
.
Now
},
false
);
epcObj
.
CurrentState
=
2
;
purchaseCount
++;
...
...
@@ -3054,6 +3060,7 @@ namespace JunmpPoliceStation.Controllers
invNew
.
UseTime
=
DateTime
.
Now
;
invNew
.
ProductTime
=
DateTime
.
Parse
(
item
.
生产日期
);
invNew
.
OrgId
=
warehouseName
?.
OrgizationId
;
invNew
.
UpdateTime
=
DateTime
.
Now
;
//var ent = new CommonJpEquipmentInventory
//{
// Id = Guid.NewGuid().ToString(),
...
...
@@ -3933,6 +3940,7 @@ namespace JunmpPoliceStation.Controllers
old
.
BoxMarkId
=
boxMarkId
;
old
.
InstantiationState
=
instantiationState
;
old
.
OrgId
=
warehouse
?.
OrgizationId
;
old
.
UpdateTime
=
DateTime
.
Now
;
updateList
.
Add
(
old
);
}
if
(
editType
==
"ADD"
)
...
...
@@ -3968,6 +3976,7 @@ namespace JunmpPoliceStation.Controllers
IsInBox
=
isInBox
,
BoxMarkId
=
boxMarkId
,
InstantiationState
=
instantiationState
,
UpdateTime
=
DateTime
.
Now
});
}
if
(
editType
==
"DELETE"
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论