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
9675ffb0
Commit
9675ffb0
authored
Jan 11, 2024
by
Seniorious
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
65b783c8
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
143 行增加
和
57 行删除
+143
-57
BaseInfoController.cs
WebApiNET6-master/APIs/Controllers/BaseInfoController.cs
+131
-57
CommonReq.cs
WebApiNET6-master/APIs/Req/CommonReq.cs
+5
-0
EpcConvert.cs
WebApiNET6-master/Common/EpcConvert.cs
+2
-0
Inventory.cs
WebApiNET6-master/Models/Table/Inventory.cs
+1
-0
LogDetail.cs
WebApiNET6-master/Models/Table/LogDetail.cs
+1
-0
PrintDetail.cs
WebApiNET6-master/Models/Table/PrintDetail.cs
+3
-0
没有找到文件。
WebApiNET6-master/APIs/Controllers/BaseInfoController.cs
View file @
9675ffb0
...
@@ -74,7 +74,7 @@ namespace APIs.Controllers
...
@@ -74,7 +74,7 @@ namespace APIs.Controllers
private
readonly
DehumidifierHelper
_dehumidifierHelper
;
private
readonly
DehumidifierHelper
_dehumidifierHelper
;
public
BaseInfoController
(
IMapper
mapper
,
DehumidifierHelper
dehumidifierHelper
,
IPoliceService
policeService
,
IEquipmentTypeService
equipmentTypeService
,
public
BaseInfoController
(
IMapper
mapper
,
DehumidifierHelper
dehumidifierHelper
,
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
,
IPoliceFingerService
policeFingerService
,
IPoliceInfoService
policeInfoService
,
IThisInfoService
thisInfoService
,
IPrintService
printService
,
IPoliceFingerService
policeFingerService
,
IPoliceInfoService
policeInfoService
,
...
@@ -178,7 +178,6 @@ namespace APIs.Controllers
...
@@ -178,7 +178,6 @@ namespace APIs.Controllers
{
{
try
try
{
{
#
region
if
(
string
.
IsNullOrEmpty
(
req
.
warehouseId
))
if
(
string
.
IsNullOrEmpty
(
req
.
warehouseId
))
{
{
return
new
ApiResult
return
new
ApiResult
...
@@ -187,7 +186,68 @@ namespace APIs.Controllers
...
@@ -187,7 +186,68 @@ namespace APIs.Controllers
msg
=
"参数不正确"
,
msg
=
"参数不正确"
,
};
};
}
}
if
(
await
_orderService
.
QueryOne
(
s
=>
s
.
orderState
!=
1
&&
s
.
bussinessType
.
Equals
(
"purchase"
))
!=
null
)
var
orders
=
await
_bussinessInventoryService
.
Query
(
s
=>
s
.
warehouseId
.
Equals
(
req
.
warehouseId
)
&&
s
.
inventoryState
.
Equals
(
"waitting"
));
if
(!
orders
.
Any
())
return
new
ApiResult
{
code
=
ResultCode
.
OPERATE_SUCCESS
.
Code
,
msg
=
"无可用单据"
,
};
var
rs
=
orders
.
Select
(
s
=>
new
{
id
=
s
.
id
,
orderNum
=
s
.
orderNum
,
year
=
s
.
year
,
month
=
s
.
month
,
applyTime
=
s
.
applyTime
,
createTime
=
s
.
createTime
,
warehouseId
=
s
.
warehouseId
,
warehouseName
=
s
.
warehouseName
,
}).
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>
/// <param name="req"></param>
/// <returns></returns>
[
HttpPost
]
public
async
Task
<
ApiResult
>
StartInventoryOrder
([
FromBody
]
StartInventoryOrderReq
req
)
{
try
{
#
region
if
(
string
.
IsNullOrEmpty
(
req
.
orderId
))
{
return
new
ApiResult
{
code
=
ResultCode
.
OPERATE_FAILED
.
Code
,
msg
=
"参数不正确"
,
};
}
if
(
await
_orderService
.
QueryOne
(
s
=>
s
.
orderState
!=
1
&&
s
.
bussinessType
.
Equals
(
"purchase"
))
!=
null
)
{
{
return
new
ApiResult
return
new
ApiResult
{
{
...
@@ -206,10 +266,17 @@ namespace APIs.Controllers
...
@@ -206,10 +266,17 @@ namespace APIs.Controllers
}
}
#
endregion
#
endregion
var
BIOrderMain
=
await
_bussinessInventoryService
.
QueryOneOrderDesc
(
s
=>
s
.
warehouseId
.
Equals
(
req
.
warehouseId
)
&&
s
.
inventoryState
.
Equals
(
"waitting"
),
c
=>
c
.
createTime
);
var
BIOrderMain
=
await
_bussinessInventoryService
.
QueryOne
(
s
=>
s
.
id
==
Convert
.
ToInt64
(
req
.
orderId
));
if
(
BIOrderMain
==
null
)
return
new
ApiResult
{
code
=
ResultCode
.
OPERATE_FAILED
.
Code
,
msg
=
"不存在此单据"
,
};
BussinessInventory
?
rs
=
await
_bussinessInventoryService
.
GenerateInventoryOrder
(
BIOrderMain
);
BussinessInventory
?
rs
=
await
_bussinessInventoryService
.
GenerateInventoryOrder
(
BIOrderMain
);
if
(
rs
==
null
)
if
(
rs
==
null
)
{
{
return
new
ApiResult
return
new
ApiResult
{
{
...
@@ -219,13 +286,13 @@ namespace APIs.Controllers
...
@@ -219,13 +286,13 @@ namespace APIs.Controllers
}
}
#
region
上报平台单据已开始
#
region
上报平台单据已开始
string
param
=
JsonConvert
.
SerializeObject
(
new
string
param
=
JsonConvert
.
SerializeObject
(
new
{
{
orderId
=
rs
.
id
,
orderId
=
rs
.
id
,
detailList
=
rs
.
DetailList
detailList
=
rs
.
DetailList
});
});
var
json
=
HttpHelper
.
HttpPost
(
AdminGlobalContext
.
jyzbConfig
.
Url
+
"/BussinessInventory/Start"
,
param
);
var
json
=
HttpHelper
.
HttpPost
(
AdminGlobalContext
.
jyzbConfig
.
Url
+
"/BussinessInventory/Start"
,
param
);
if
(
string
.
IsNullOrEmpty
(
json
))
if
(
string
.
IsNullOrEmpty
(
json
))
{
{
await
_bussinessInventoryService
.
OrderRollBack
(
rs
);
await
_bussinessInventoryService
.
OrderRollBack
(
rs
);
...
@@ -253,7 +320,7 @@ namespace APIs.Controllers
...
@@ -253,7 +320,7 @@ namespace APIs.Controllers
{
{
code
=
ResultCode
.
OPERATE_SUCCESS
.
Code
,
code
=
ResultCode
.
OPERATE_SUCCESS
.
Code
,
msg
=
ResultCode
.
OPERATE_SUCCESS
.
Msg
,
msg
=
ResultCode
.
OPERATE_SUCCESS
.
Msg
,
data
=
JsonConvert
.
SerializeObject
(
rs
)
,
data
=
rs
,
};
};
return
src
;
return
src
;
...
@@ -271,7 +338,7 @@ namespace APIs.Controllers
...
@@ -271,7 +338,7 @@ namespace APIs.Controllers
}
}
/// <summary>
/// <summary>
/// 手持机上传单据操作结果
/// 手持机上传单据操作结果
(弃用)
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
[
HttpPost
]
[
HttpPost
]
...
@@ -304,7 +371,7 @@ namespace APIs.Controllers
...
@@ -304,7 +371,7 @@ namespace APIs.Controllers
{
{
code
=
ResultCode
.
OPERATE_SUCCESS
.
Code
,
code
=
ResultCode
.
OPERATE_SUCCESS
.
Code
,
msg
=
ResultCode
.
OPERATE_SUCCESS
.
Msg
,
msg
=
ResultCode
.
OPERATE_SUCCESS
.
Msg
,
}:
new
ApiResult
}
:
new
ApiResult
{
{
code
=
ResultCode
.
OPERATE_FAILED
.
Code
,
code
=
ResultCode
.
OPERATE_FAILED
.
Code
,
msg
=
"数据更新失败"
,
msg
=
"数据更新失败"
,
...
@@ -322,7 +389,7 @@ namespace APIs.Controllers
...
@@ -322,7 +389,7 @@ namespace APIs.Controllers
}
}
/// <summary>
/// <summary>
/// 手持机获取单据
/// 手持机获取单据
(弃用)
/// </summary>
/// </summary>
/// <param name="req"></param>
/// <param name="req"></param>
/// <returns></returns>
/// <returns></returns>
...
@@ -376,7 +443,7 @@ namespace APIs.Controllers
...
@@ -376,7 +443,7 @@ namespace APIs.Controllers
var
types
=
await
_equipmentTypeService
.
Query
();
var
types
=
await
_equipmentTypeService
.
Query
();
var
sizes
=
await
_equipmentSizeService
.
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
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
var
src
=
new
ApiResult
{
{
...
@@ -415,7 +482,8 @@ namespace APIs.Controllers
...
@@ -415,7 +482,8 @@ namespace APIs.Controllers
code
=
ResultCode
.
OPERATE_SUCCESS
.
Code
,
code
=
ResultCode
.
OPERATE_SUCCESS
.
Code
,
msg
=
"无效参数"
,
msg
=
"无效参数"
,
};
};
}
else
if
(
string
.
IsNullOrEmpty
(
req
.
policeId
))
}
else
if
(
string
.
IsNullOrEmpty
(
req
.
policeId
))
{
{
return
new
ApiResult
return
new
ApiResult
{
{
...
@@ -553,7 +621,7 @@ namespace APIs.Controllers
...
@@ -553,7 +621,7 @@ namespace APIs.Controllers
{
{
try
try
{
{
if
(
req
==
null
)
if
(
req
==
null
)
{
{
return
new
ApiResult
return
new
ApiResult
{
{
...
@@ -672,7 +740,7 @@ namespace APIs.Controllers
...
@@ -672,7 +740,7 @@ namespace APIs.Controllers
};
};
}
}
if
(
req
.
warehouseId
==
null
)
if
(
req
.
warehouseId
==
null
)
{
{
return
new
ApiResult
return
new
ApiResult
{
{
...
@@ -682,7 +750,7 @@ namespace APIs.Controllers
...
@@ -682,7 +750,7 @@ namespace APIs.Controllers
}
}
#
endregion
#
endregion
if
(
await
_bussinessInventoryService
.
QueryOne
(
s
=>
s
.
inventoryState
.
Equals
(
"running"
))
!=
null
)
if
(
await
_bussinessInventoryService
.
QueryOne
(
s
=>
s
.
inventoryState
.
Equals
(
"running"
))
!=
null
)
{
{
return
new
ApiResult
return
new
ApiResult
{
{
...
@@ -718,7 +786,7 @@ namespace APIs.Controllers
...
@@ -718,7 +786,7 @@ namespace APIs.Controllers
{
{
warehouseInvtory
=
warehouseInvtory
.
Where
(
s
=>
!(
s
.
bussinessState
.
Equals
(
"repair"
)
&&
s
.
state
.
Equals
(
"1"
))).
ToList
();
warehouseInvtory
=
warehouseInvtory
.
Where
(
s
=>
!(
s
.
bussinessState
.
Equals
(
"repair"
)
&&
s
.
state
.
Equals
(
"1"
))).
ToList
();
}
}
else
if
(!(
myOrder
.
bussinessType
.
Equals
(
"repair"
)
&&
myOrder
.
orderType
.
Equals
(
"in"
)))
else
if
(!(
myOrder
.
bussinessType
.
Equals
(
"repair"
)
&&
myOrder
.
orderType
.
Equals
(
"in"
)))
{
{
warehouseInvtory
=
warehouseInvtory
.
Where
(
s
=>
!(
s
.
bussinessState
.
Equals
(
"repair"
)
&&
s
.
state
.
Equals
(
"1"
))).
ToList
();
warehouseInvtory
=
warehouseInvtory
.
Where
(
s
=>
!(
s
.
bussinessState
.
Equals
(
"repair"
)
&&
s
.
state
.
Equals
(
"1"
))).
ToList
();
}
}
...
@@ -758,7 +826,7 @@ namespace APIs.Controllers
...
@@ -758,7 +826,7 @@ namespace APIs.Controllers
}
}
var
deatilDic
=
myOrder
?.
DetailList
.
Where
(
s
=>
s
.
warehouseId
.
Equals
(
req
.
warehouseId
))
var
deatilDic
=
myOrder
?.
DetailList
.
Where
(
s
=>
s
.
warehouseId
.
Equals
(
req
.
warehouseId
))
.
Select
(
s
=>
s
.
equipmentSize
)
.
Select
(
s
=>
s
.
equipmentSize
)
.
ToList
();
//通道所在仓库子单
.
ToList
();
//通道所在仓库子单
//创建出入库记录
//创建出入库记录
...
@@ -785,16 +853,16 @@ namespace APIs.Controllers
...
@@ -785,16 +853,16 @@ namespace APIs.Controllers
if
(
mytype
!=
null
&&
mysize
!=
null
)
if
(
mytype
!=
null
&&
mysize
!=
null
)
{
{
if
(
myOrder
!=
null
&&
deatilDic
!=
null
)
//单据出入库则过滤非单据装备
if
(
myOrder
!=
null
&&
deatilDic
!=
null
)
//单据出入库则过滤非单据装备
{
{
if
(!
deatilDic
.
Contains
(
mysize
.
id
))
if
(!
deatilDic
.
Contains
(
mysize
.
id
))
{
{
continue
;
continue
;
}
}
else
if
(
newEquOrderType
.
Contains
(
myOrder
.
bussinessType
)
&&
myOrder
.
orderType
.
Equals
(
"in"
))
//有新装备单据生成库存记录
else
if
(
newEquOrderType
.
Contains
(
myOrder
.
bussinessType
)
&&
myOrder
.
orderType
.
Equals
(
"in"
))
//有新装备单据生成库存记录
{
{
var
periodInfo
=
(
await
_printService
.
QueryOne
(
s
=>
s
.
id
.
Equals
(
myOrder
.
id
)))?.
DetailList
.
FirstOrDefault
(
s
=>
s
.
sizeId
.
Equals
(
mysize
.
id
));
var
periodInfo
=
(
await
_printService
.
QueryOne
(
s
=>
s
.
id
.
Equals
(
myOrder
.
id
)))?.
DetailList
.
FirstOrDefault
(
s
=>
s
.
sizeId
.
Equals
(
mysize
.
id
));
newEquList
.
Add
(
new
Inventory
newEquList
.
Add
(
new
Inventory
{
{
id
=
Guid
.
NewGuid
().
ToString
(),
id
=
Guid
.
NewGuid
().
ToString
(),
state
=
"2"
,
state
=
"2"
,
...
@@ -819,6 +887,7 @@ namespace APIs.Controllers
...
@@ -819,6 +887,7 @@ namespace APIs.Controllers
createTime
=
DateTime
.
Now
,
createTime
=
DateTime
.
Now
,
updateTime
=
DateTime
.
Now
,
updateTime
=
DateTime
.
Now
,
price
=
myOrder
.
DetailList
?.
FirstOrDefault
(
s
=>
s
.
equipmentSize
.
Equals
(
mysize
.
id
))?.
price
??
0
,
price
=
myOrder
.
DetailList
?.
FirstOrDefault
(
s
=>
s
.
equipmentSize
.
Equals
(
mysize
.
id
))?.
price
??
0
,
property
=
Convert
.
ToInt32
(
epc_info
.
EProperty
),
});
});
}
}
}
}
...
@@ -826,7 +895,7 @@ namespace APIs.Controllers
...
@@ -826,7 +895,7 @@ namespace APIs.Controllers
//出入库子单
//出入库子单
var
inv
=
await
_inventoryService
.
QueryOne
(
s
=>
s
.
epc
.
Equals
(
epc
));
var
inv
=
await
_inventoryService
.
QueryOne
(
s
=>
s
.
epc
.
Equals
(
epc
));
logDetailList
.
Add
(
new
LogDetail
()
logDetailList
.
Add
(
new
LogDetail
()
{
{
inventoryId
=
inv
?.
id
,
inventoryId
=
inv
?.
id
,
epc
=
epc
,
epc
=
epc
,
...
@@ -842,9 +911,10 @@ namespace APIs.Controllers
...
@@ -842,9 +911,10 @@ namespace APIs.Controllers
price
=
inv
==
null
?
(
myOrder
.
DetailList
?.
FirstOrDefault
(
s
=>
s
.
equipmentSize
.
Equals
(
mysize
.
id
))?.
price
??
0
)
:
(
inv
?.
price
??
0
),
price
=
inv
==
null
?
(
myOrder
.
DetailList
?.
FirstOrDefault
(
s
=>
s
.
equipmentSize
.
Equals
(
mysize
.
id
))?.
price
??
0
)
:
(
inv
?.
price
??
0
),
createTime
=
DateTime
.
Now
,
createTime
=
DateTime
.
Now
,
updateTime
=
DateTime
.
Now
,
updateTime
=
DateTime
.
Now
,
property
=
Convert
.
ToInt32
(
epc_info
.
EProperty
),
});
});
if
(
warrantyList
!=
null
&&
warrantyList
.
Contains
(
epc
))
if
(
warrantyList
!=
null
&&
warrantyList
.
Contains
(
epc
))
{
{
string
thisKey
=
$"
{
mysize
.
id
}
||
{
mytype
?.
name
}
(
{
mysize
.
name
}
)"
;
string
thisKey
=
$"
{
mysize
.
id
}
||
{
mytype
?.
name
}
(
{
mysize
.
name
}
)"
;
if
(
warrantyDic
.
TryGetValue
(
thisKey
,
out
int
va
))
if
(
warrantyDic
.
TryGetValue
(
thisKey
,
out
int
va
))
...
@@ -908,7 +978,7 @@ namespace APIs.Controllers
...
@@ -908,7 +978,7 @@ namespace APIs.Controllers
foreach
(
var
item
in
warrantyDic
)
foreach
(
var
item
in
warrantyDic
)
{
{
var
name
=
item
.
Key
.
Split
(
new
string
[]
{
"||"
},
StringSplitOptions
.
None
).
Skip
(
1
).
FirstOrDefault
();
var
name
=
item
.
Key
.
Split
(
new
string
[]
{
"||"
},
StringSplitOptions
.
None
).
Skip
(
1
).
FirstOrDefault
();
msg
+=
$"
{
name
}{
item
.
Value
}
件,"
;
msg
+=
$"
{
name
}
{
item
.
Value
}
件,"
;
};
};
msg
=
msg
.
Substring
(
0
,
msg
.
Length
-
1
);
msg
=
msg
.
Substring
(
0
,
msg
.
Length
-
1
);
}
}
...
@@ -949,21 +1019,23 @@ namespace APIs.Controllers
...
@@ -949,21 +1019,23 @@ namespace APIs.Controllers
{
{
try
try
{
{
if
(
req
==
null
)
if
(
req
==
null
)
{
{
return
new
ApiResult
return
new
ApiResult
{
{
code
=
ResultCode
.
OPERATE_FAILED
.
Code
,
code
=
ResultCode
.
OPERATE_FAILED
.
Code
,
msg
=
"参数错误"
,
msg
=
"参数错误"
,
};
};
}
else
if
(
string
.
IsNullOrEmpty
(
req
.
policeId
))
}
else
if
(
string
.
IsNullOrEmpty
(
req
.
policeId
))
{
{
return
new
ApiResult
return
new
ApiResult
{
{
code
=
ResultCode
.
OPERATE_FAILED
.
Code
,
code
=
ResultCode
.
OPERATE_FAILED
.
Code
,
msg
=
"警员编号为空"
,
msg
=
"警员编号为空"
,
};
};
}
else
if
(
req
.
fingerList
==
null
||
req
.
fingerList
.
Count
()
==
0
)
}
else
if
(
req
.
fingerList
==
null
||
req
.
fingerList
.
Count
()
==
0
)
{
{
return
new
ApiResult
return
new
ApiResult
{
{
...
@@ -973,14 +1045,15 @@ namespace APIs.Controllers
...
@@ -973,14 +1045,15 @@ namespace APIs.Controllers
}
}
var
police
=
await
_policeInfoService
.
QueryOne
(
s
=>
s
.
id
.
Equals
(
req
.
policeId
));
var
police
=
await
_policeInfoService
.
QueryOne
(
s
=>
s
.
id
.
Equals
(
req
.
policeId
));
if
(
police
==
null
)
if
(
police
==
null
)
{
{
return
new
ApiResult
return
new
ApiResult
{
{
code
=
ResultCode
.
OPERATE_FAILED
.
Code
,
code
=
ResultCode
.
OPERATE_FAILED
.
Code
,
msg
=
"无警员信息"
,
msg
=
"无警员信息"
,
};
};
}
else
}
else
{
{
var
send
=
new
var
send
=
new
{
{
...
@@ -990,7 +1063,7 @@ namespace APIs.Controllers
...
@@ -990,7 +1063,7 @@ namespace APIs.Controllers
var
json
=
HttpHelper
.
HttpPost
(
/*AdminGlobalContext.jyzbConfig.Url*/
"http://192.168.2.14:10030"
+
"/PolicemanFinger/insertOrUpdateFingerInfo"
,
JsonConvert
.
SerializeObject
(
send
));
var
json
=
HttpHelper
.
HttpPost
(
/*AdminGlobalContext.jyzbConfig.Url*/
"http://192.168.2.14:10030"
+
"/PolicemanFinger/insertOrUpdateFingerInfo"
,
JsonConvert
.
SerializeObject
(
send
));
var
httprs
=
JsonConvert
.
DeserializeObject
<
HttpHelper
.
res
<
string
>>(
json
);
var
httprs
=
JsonConvert
.
DeserializeObject
<
HttpHelper
.
res
<
string
>>(
json
);
if
(
httprs
!=
null
&&
httprs
.
code
==
"99200"
)
if
(
httprs
!=
null
&&
httprs
.
code
==
"99200"
)
{
{
var
rs
=
await
_policeFingerService
.
UpdateFinger
(
req
.
policeId
,
req
.
fingerList
);
var
rs
=
await
_policeFingerService
.
UpdateFinger
(
req
.
policeId
,
req
.
fingerList
);
...
@@ -1008,7 +1081,7 @@ namespace APIs.Controllers
...
@@ -1008,7 +1081,7 @@ namespace APIs.Controllers
msg
=
"上传平台失败"
,
msg
=
"上传平台失败"
,
};
};
}
}
}
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
...
@@ -1069,8 +1142,8 @@ namespace APIs.Controllers
...
@@ -1069,8 +1142,8 @@ namespace APIs.Controllers
{
{
try
try
{
{
var
warehouses
=
(
await
_warehouseService
.
Query
())?.
Select
(
s
=>
new
var
warehouses
=
(
await
_warehouseService
.
Query
())?.
Select
(
s
=>
new
{
{
id
=
s
.
id
,
id
=
s
.
id
,
name
=
s
.
name
,
name
=
s
.
name
,
}).
ToList
();
}).
ToList
();
...
@@ -1106,7 +1179,7 @@ namespace APIs.Controllers
...
@@ -1106,7 +1179,7 @@ namespace APIs.Controllers
{
{
try
try
{
{
if
(
req
.
picture
==
null
)
if
(
req
.
picture
==
null
)
{
{
return
new
ApiResult
return
new
ApiResult
{
{
...
@@ -1405,7 +1478,7 @@ namespace APIs.Controllers
...
@@ -1405,7 +1478,7 @@ namespace APIs.Controllers
{
{
var
police
=
await
_policeService
.
QueryOne
(
p
=>
p
.
id
.
Equals
(
req
.
id
));
var
police
=
await
_policeService
.
QueryOne
(
p
=>
p
.
id
.
Equals
(
req
.
id
));
if
(
police
==
null
)
if
(
police
==
null
)
{
{
var
error
=
new
ApiResult
var
error
=
new
ApiResult
{
{
...
@@ -1568,7 +1641,7 @@ namespace APIs.Controllers
...
@@ -1568,7 +1641,7 @@ namespace APIs.Controllers
police
.
picUpdateTime
=
police
.
updateTime
;
police
.
picUpdateTime
=
police
.
updateTime
;
bool
rs
=
await
_policeService
.
Update
(
police
);
bool
rs
=
await
_policeService
.
Update
(
police
);
var
reply
=
new
UploadPictureReply
()
{
picUrl
=
filePath
,
updateTime
=
(
DateTime
)
police
.
picUpdateTime
};
var
reply
=
new
UploadPictureReply
()
{
picUrl
=
filePath
,
updateTime
=
(
DateTime
)
police
.
picUpdateTime
};
var
src
=
rs
?
new
ApiResult
var
src
=
rs
?
new
ApiResult
{
{
...
@@ -1595,9 +1668,9 @@ namespace APIs.Controllers
...
@@ -1595,9 +1668,9 @@ namespace APIs.Controllers
return
error
;
return
error
;
}
}
}
}
class
UploadPictureReply
class
UploadPictureReply
{
{
public
string
picUrl
{
get
;
set
;
}
public
string
picUrl
{
get
;
set
;
}
public
DateTime
updateTime
{
get
;
set
;
}
public
DateTime
updateTime
{
get
;
set
;
}
}
}
...
@@ -1626,10 +1699,10 @@ namespace APIs.Controllers
...
@@ -1626,10 +1699,10 @@ namespace APIs.Controllers
item
.
fingerInfo
=
itemnew
.
fingerInfo
;
item
.
fingerInfo
=
itemnew
.
fingerInfo
;
item
.
faceInfo
=
itemnew
.
faceInfo
;
item
.
faceInfo
=
itemnew
.
faceInfo
;
}
}
}
}
int
result
=
_policeService
.
UpdateObjs
(
police
);
int
result
=
_policeService
.
UpdateObjs
(
police
);
if
(
result
>
0
)
if
(
result
>
0
)
{
{
var
src
=
new
ApiResult
var
src
=
new
ApiResult
...
@@ -1640,7 +1713,8 @@ namespace APIs.Controllers
...
@@ -1640,7 +1713,8 @@ namespace APIs.Controllers
};
};
return
src
;
return
src
;
}
}
else
{
else
{
var
src
=
new
ApiResult
var
src
=
new
ApiResult
{
{
code
=
ResultCode
.
POLICE_ERROR
.
Code
,
code
=
ResultCode
.
POLICE_ERROR
.
Code
,
...
@@ -1649,7 +1723,7 @@ namespace APIs.Controllers
...
@@ -1649,7 +1723,7 @@ namespace APIs.Controllers
};
};
return
src
;
return
src
;
}
}
}
}
else
else
{
{
...
@@ -1661,7 +1735,7 @@ namespace APIs.Controllers
...
@@ -1661,7 +1735,7 @@ namespace APIs.Controllers
};
};
return
src
;
return
src
;
}
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
...
@@ -1692,7 +1766,7 @@ namespace APIs.Controllers
...
@@ -1692,7 +1766,7 @@ namespace APIs.Controllers
{
{
reqTime
=
DateTime
.
Parse
(
req
.
updateTime
);
reqTime
=
DateTime
.
Parse
(
req
.
updateTime
);
}
}
var
police
=
await
_policeService
.
Query
(
p
=>
p
.
updateTime
>=
reqTime
);
var
police
=
await
_policeService
.
Query
(
p
=>
p
.
updateTime
>=
reqTime
);
var
src
=
new
ApiResult
var
src
=
new
ApiResult
{
{
code
=
ResultCode
.
OPERATE_SUCCESS
.
Code
,
code
=
ResultCode
.
OPERATE_SUCCESS
.
Code
,
...
@@ -1720,7 +1794,7 @@ namespace APIs.Controllers
...
@@ -1720,7 +1794,7 @@ namespace APIs.Controllers
/// <returns></returns>
/// <returns></returns>
[
HttpPost
]
[
HttpPost
]
public
async
Task
<
string
>
GetEquipmentType
([
FromBody
]
CommonReq
req
)
public
async
Task
<
string
>
GetEquipmentType
([
FromBody
]
CommonReq
req
)
{
{
try
try
...
@@ -1731,13 +1805,13 @@ namespace APIs.Controllers
...
@@ -1731,13 +1805,13 @@ namespace APIs.Controllers
reqTime
=
DateTime
.
Parse
(
req
.
updateTime
);
reqTime
=
DateTime
.
Parse
(
req
.
updateTime
);
}
}
var
typeQuery
=
await
_equipmentTypeService
.
Query
(
p
=>
p
.
updateTime
>=
reqTime
);
var
typeQuery
=
await
_equipmentTypeService
.
Query
(
p
=>
p
.
updateTime
>=
reqTime
);
List
<
EquipmentTypeDto
>
typeDto
=
new
List
<
EquipmentTypeDto
>()
;
List
<
EquipmentTypeDto
>
typeDto
=
new
List
<
EquipmentTypeDto
>();
Mapper
.
Map
(
typeQuery
,
typeDto
);
Mapper
.
Map
(
typeQuery
,
typeDto
);
var
src
=
new
ApiResult
var
src
=
new
ApiResult
{
{
code
=
ResultCode
.
OPERATE_SUCCESS
.
Code
,
code
=
ResultCode
.
OPERATE_SUCCESS
.
Code
,
msg
=
ResultCode
.
OPERATE_SUCCESS
.
Msg
,
msg
=
ResultCode
.
OPERATE_SUCCESS
.
Msg
,
data
=
typeDto
data
=
typeDto
};
};
return
JsonConvert
.
SerializeObject
(
src
);
return
JsonConvert
.
SerializeObject
(
src
);
}
}
...
@@ -1747,7 +1821,7 @@ namespace APIs.Controllers
...
@@ -1747,7 +1821,7 @@ namespace APIs.Controllers
{
{
code
=
ResultCode
.
OPERATE_FAILED
.
Code
,
code
=
ResultCode
.
OPERATE_FAILED
.
Code
,
msg
=
ex
.
Message
,
msg
=
ex
.
Message
,
};
};
return
JsonConvert
.
SerializeObject
(
error
);
return
JsonConvert
.
SerializeObject
(
error
);
}
}
...
@@ -1765,7 +1839,7 @@ namespace APIs.Controllers
...
@@ -1765,7 +1839,7 @@ namespace APIs.Controllers
try
try
{
{
DateTime
reqTime
=
DateTime
.
MinValue
;
DateTime
reqTime
=
DateTime
.
MinValue
;
if
(!
string
.
IsNullOrEmpty
(
req
.
updateTime
))
if
(!
string
.
IsNullOrEmpty
(
req
.
updateTime
))
{
{
reqTime
=
DateTime
.
Parse
(
req
.
updateTime
);
reqTime
=
DateTime
.
Parse
(
req
.
updateTime
);
...
@@ -1779,7 +1853,7 @@ namespace APIs.Controllers
...
@@ -1779,7 +1853,7 @@ namespace APIs.Controllers
msg
=
ResultCode
.
OPERATE_SUCCESS
.
Msg
,
msg
=
ResultCode
.
OPERATE_SUCCESS
.
Msg
,
data
=
sizeDto
data
=
sizeDto
};
};
return
JsonConvert
.
SerializeObject
(
src
);
return
JsonConvert
.
SerializeObject
(
src
);
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
...
@@ -1790,7 +1864,7 @@ namespace APIs.Controllers
...
@@ -1790,7 +1864,7 @@ namespace APIs.Controllers
msg
=
ex
.
Message
,
msg
=
ex
.
Message
,
};
};
return
JsonConvert
.
SerializeObject
(
error
);
return
JsonConvert
.
SerializeObject
(
error
);
}
}
}
}
...
@@ -1849,7 +1923,7 @@ namespace APIs.Controllers
...
@@ -1849,7 +1923,7 @@ namespace APIs.Controllers
code
=
ResultCode
.
OPERATE_SUCCESS
.
Code
,
code
=
ResultCode
.
OPERATE_SUCCESS
.
Code
,
msg
=
ResultCode
.
OPERATE_SUCCESS
.
Msg
,
msg
=
ResultCode
.
OPERATE_SUCCESS
.
Msg
,
data
=
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
data
=
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
};
};
return
JsonConvert
.
SerializeObject
(
src
);
return
JsonConvert
.
SerializeObject
(
src
);
}
}
...
@@ -1863,7 +1937,7 @@ namespace APIs.Controllers
...
@@ -1863,7 +1937,7 @@ namespace APIs.Controllers
};
};
return
JsonConvert
.
SerializeObject
(
error
);
return
JsonConvert
.
SerializeObject
(
error
);
}
}
}
}
/// <summary>
/// <summary>
/// 发送消息队列测试
/// 发送消息队列测试
...
@@ -1873,13 +1947,13 @@ namespace APIs.Controllers
...
@@ -1873,13 +1947,13 @@ namespace APIs.Controllers
public
async
Task
<
string
>
SendMQ
([
FromBody
]
RecordsReq
req
)
public
async
Task
<
string
>
SendMQ
([
FromBody
]
RecordsReq
req
)
{
{
await
RabbitMQContext
.
SendMessageAsynce
(
JsonConvert
.
SerializeObject
(
req
));
await
RabbitMQContext
.
SendMessageAsynce
(
JsonConvert
.
SerializeObject
(
req
));
var
src
=
new
ApiResult
var
src
=
new
ApiResult
{
{
code
=
ResultCode
.
OPERATE_SUCCESS
.
Code
,
code
=
ResultCode
.
OPERATE_SUCCESS
.
Code
,
msg
=
ResultCode
.
OPERATE_SUCCESS
.
Msg
msg
=
ResultCode
.
OPERATE_SUCCESS
.
Msg
};
};
return
JsonConvert
.
SerializeObject
(
src
);
return
JsonConvert
.
SerializeObject
(
src
);
}
}
...
...
WebApiNET6-master/APIs/Req/CommonReq.cs
View file @
9675ffb0
...
@@ -28,6 +28,11 @@ namespace APIs.Req
...
@@ -28,6 +28,11 @@ namespace APIs.Req
public
string
warehouseId
{
get
;
set
;
}
public
string
warehouseId
{
get
;
set
;
}
}
}
public
class
StartInventoryOrderReq
{
public
string
orderId
{
get
;
set
;
}
}
public
class
GetWarehouseConfigReq
public
class
GetWarehouseConfigReq
{
{
public
string
deviceId
{
get
;
set
;
}
public
string
deviceId
{
get
;
set
;
}
...
...
WebApiNET6-master/Common/EpcConvert.cs
View file @
9675ffb0
...
@@ -333,6 +333,8 @@ namespace Common
...
@@ -333,6 +333,8 @@ namespace Common
pos
+=
4
;
pos
+=
4
;
rtn
.
EType
=
(
byte
)
GetData
(
epc
,
pos
,
4
);
rtn
.
EType
=
(
byte
)
GetData
(
epc
,
pos
,
4
);
pos
+=
4
;
pos
+=
4
;
rtn
.
EProperty
=
0
;
}
}
else
if
(
rtn
.
Ver
==
0x03
)
else
if
(
rtn
.
Ver
==
0x03
)
{
{
...
...
WebApiNET6-master/Models/Table/Inventory.cs
View file @
9675ffb0
...
@@ -82,5 +82,6 @@ namespace Models.Table
...
@@ -82,5 +82,6 @@ namespace Models.Table
[
SugarColumn
(
ColumnName
=
"package_id"
)]
[
SugarColumn
(
ColumnName
=
"package_id"
)]
public
string
packageId
{
get
;
set
;
}
public
string
packageId
{
get
;
set
;
}
public
int
?
property
{
get
;
set
;
}
}
}
}
}
WebApiNET6-master/Models/Table/LogDetail.cs
View file @
9675ffb0
...
@@ -59,5 +59,6 @@ namespace Models.Table
...
@@ -59,5 +59,6 @@ namespace Models.Table
[
SugarColumn
(
ColumnName
=
"price"
)]
[
SugarColumn
(
ColumnName
=
"price"
)]
public
decimal
?
price
{
get
;
set
;
}
public
decimal
?
price
{
get
;
set
;
}
public
int
?
property
{
get
;
set
;
}
}
}
}
}
WebApiNET6-master/Models/Table/PrintDetail.cs
View file @
9675ffb0
...
@@ -53,5 +53,8 @@ namespace Models.Table
...
@@ -53,5 +53,8 @@ namespace Models.Table
[
SugarColumn
(
ColumnName
=
"maintenance_period"
)]
[
SugarColumn
(
ColumnName
=
"maintenance_period"
)]
public
int
?
maintenancePeriod
{
get
;
set
;
}
public
int
?
maintenancePeriod
{
get
;
set
;
}
[
SugarColumn
(
ColumnName
=
"property"
)]
public
int
?
property
{
get
;
set
;
}
}
}
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论