
130 changed files with 5370 additions and 826 deletions
@ -0,0 +1,980 @@ |
|||
数据库表结构文档 |
|||
数据库名:warehouse |
|||
文档版本:1.0.0 |
|||
文档描述:数据库设计文档 |
|||
公共字段 |
|||
编号 |
|||
名称 |
|||
数据类型 |
|||
长度 |
|||
小数位 |
|||
允许空值 |
|||
主键 |
|||
默认值 |
|||
说明 |
|||
1 |
|||
id |
|||
int |
|||
19 |
|||
0 |
|||
N |
|||
Y |
|||
|
|||
id |
|||
2 |
|||
sid |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Sid |
|||
3 |
|||
lockVersion |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
版本锁 |
|||
4 |
|||
createTime |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
创建时间 |
|||
5 |
|||
modifyTime |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
修改时间 |
|||
6 |
|||
isEnable |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
是否可用:1可用,0不可用 |
|||
7 |
|||
state |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
状态 |
|||
8 |
|||
isDelete |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
是否删除:0未删除,1已删除 |
|||
9 |
|||
remarks |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
备注 |
|||
10 |
|||
createBySid |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
创建人sid |
|||
11 |
|||
updateBySid |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
修改人sid |
|||
表in_storehouse 货物入库质押申请/批准单 |
|||
|
|||
编号 |
|||
名称 |
|||
数据类型 |
|||
长度 |
|||
小数位 |
|||
允许空值 |
|||
主键 |
|||
默认值 |
|||
说明 |
|||
1 |
|||
no |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
编号 |
|||
2 |
|||
applicationDate |
|||
date |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
制单日期 |
|||
3 |
|||
creatorSid |
|||
varchar |
|||
64 |
|||
|
|||
|
|||
|
|||
|
|||
制单人Sid |
|||
4 |
|||
creatorName |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
制单人姓名 |
|||
5 |
|||
custerSid |
|||
varchar |
|||
64 |
|||
|
|||
|
|||
|
|||
|
|||
客户Sid(企业) |
|||
6 |
|||
custerName |
|||
varchar |
|||
100 |
|||
|
|||
|
|||
|
|||
|
|||
客户名称(企业) |
|||
7 |
|||
storeHouseSid |
|||
varchar |
|||
64 |
|||
|
|||
|
|||
|
|||
|
|||
仓库Sid |
|||
8 |
|||
storeHouseName |
|||
varchar |
|||
100 |
|||
|
|||
|
|||
|
|||
|
|||
仓库名称 |
|||
9 |
|||
auditorSid |
|||
varchar |
|||
64 |
|||
|
|||
|
|||
|
|||
|
|||
审核人Sid |
|||
10 |
|||
auditorName |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
审核人姓名 |
|||
11 |
|||
state |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
审核状态 |
|||
12 |
|||
approvedDate |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
审核日期 |
|||
13 |
|||
approvedRemark |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
审核备注 |
|||
表in_storehouse_listing 货物入库质押申请/批准单明细表 |
|||
编号 |
|||
名称 |
|||
数据类型 |
|||
长度 |
|||
小数位 |
|||
允许空值 |
|||
主键 |
|||
默认值 |
|||
说明 |
|||
1 |
|||
custerSid |
|||
varchar |
|||
64 |
|||
|
|||
|
|||
|
|||
|
|||
客户Sid(企业) |
|||
2 |
|||
custerName |
|||
varchar |
|||
100 |
|||
|
|||
|
|||
|
|||
|
|||
客户名称(企业) |
|||
3 |
|||
storeHouseSid |
|||
varchar |
|||
64 |
|||
|
|||
|
|||
|
|||
|
|||
仓库Sid |
|||
4 |
|||
storeHouseName |
|||
varchar |
|||
100 |
|||
|
|||
|
|||
|
|||
|
|||
仓库名称 |
|||
5 |
|||
proName |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
质物名称 |
|||
6 |
|||
proModel |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
规格(型号) |
|||
|
|||
proUnit |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
规格单位 |
|||
7 |
|||
manufacturer |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
生成厂家(产地) |
|||
8 |
|||
num |
|||
varchar |
|||
10 |
|||
|
|||
|
|||
|
|||
|
|||
数量 |
|||
9 |
|||
weight |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
重量 |
|||
10 |
|||
confirmedPrice |
|||
decime |
|||
50 |
|||
2 |
|||
|
|||
|
|||
|
|||
质权人确认的单价 |
|||
11 |
|||
calculatedValue |
|||
decime |
|||
50 |
|||
2 |
|||
|
|||
|
|||
|
|||
核算的价值 |
|||
12 |
|||
locationNumber |
|||
varchar |
|||
10 |
|||
|
|||
|
|||
|
|||
|
|||
货位号 |
|||
13 |
|||
mainSid |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
申请单的sid |
|||
表out_storehouse 质物解除质押出库申请/批准单 |
|||
编号 |
|||
名称 |
|||
数据类型 |
|||
长度 |
|||
小数位 |
|||
允许空值 |
|||
主键 |
|||
默认值 |
|||
说明 |
|||
1 |
|||
creatorSid |
|||
varchar |
|||
64 |
|||
|
|||
|
|||
|
|||
|
|||
制单人Sid |
|||
2 |
|||
creatorName |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
制单人姓名 |
|||
3 |
|||
custerSid |
|||
varchar |
|||
64 |
|||
|
|||
|
|||
|
|||
|
|||
客户Sid(企业) |
|||
4 |
|||
custerName |
|||
varchar |
|||
100 |
|||
|
|||
|
|||
|
|||
|
|||
客户名称(企业) |
|||
5 |
|||
storeHouseSid |
|||
varchar |
|||
64 |
|||
|
|||
|
|||
|
|||
|
|||
仓库Sid |
|||
6 |
|||
storeHouseName |
|||
varchar |
|||
100 |
|||
|
|||
|
|||
|
|||
|
|||
仓库名称 |
|||
7 |
|||
auditorSid |
|||
varchar |
|||
64 |
|||
|
|||
|
|||
|
|||
|
|||
审核人Sid |
|||
8 |
|||
auditorName |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
审核人姓名 |
|||
9 |
|||
no |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
编号 |
|||
10 |
|||
applicationDate |
|||
date |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
制单日期 |
|||
11 |
|||
custerName |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
客户名称(企业) |
|||
12 |
|||
state |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
审核状态 |
|||
13 |
|||
auditor |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
审核人 |
|||
14 |
|||
approvedDate |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
审核日期 |
|||
15 |
|||
approvedRemark |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
审核备注 |
|||
表out_storehouse_listing 质物解除质押出库申请/批准单明细表 |
|||
编号 |
|||
名称 |
|||
数据类型 |
|||
长度 |
|||
小数位 |
|||
允许空值 |
|||
主键 |
|||
默认值 |
|||
说明 |
|||
1 |
|||
custerSid |
|||
varchar |
|||
64 |
|||
|
|||
|
|||
|
|||
|
|||
客户Sid(企业) |
|||
2 |
|||
custerName |
|||
varchar |
|||
100 |
|||
|
|||
|
|||
|
|||
|
|||
客户名称(企业) |
|||
3 |
|||
storeHouseSid |
|||
varchar |
|||
64 |
|||
|
|||
|
|||
|
|||
|
|||
仓库Sid |
|||
4 |
|||
storeHouseName |
|||
varchar |
|||
100 |
|||
|
|||
|
|||
|
|||
|
|||
仓库名称 |
|||
5 |
|||
proName |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
质物名称 |
|||
6 |
|||
proModel |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
规格(型号) |
|||
|
|||
proUnit |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
规格单位 |
|||
7 |
|||
manufacturer |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
生成厂家(产地) |
|||
8 |
|||
estimateNum |
|||
varchar |
|||
10 |
|||
|
|||
|
|||
|
|||
|
|||
预计数量 |
|||
9 |
|||
estimateWeight |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
预计重量 |
|||
10 |
|||
estimateConfirmedPrice |
|||
decime |
|||
50 |
|||
2 |
|||
|
|||
|
|||
|
|||
预计质权人确认的单价 |
|||
11 |
|||
estimateCalculatedValue |
|||
decime |
|||
50 |
|||
2 |
|||
|
|||
|
|||
|
|||
预计核算的价值 |
|||
12 |
|||
realityNum |
|||
varchar |
|||
10 |
|||
|
|||
|
|||
|
|||
|
|||
实际数量 |
|||
13 |
|||
realityWeight |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
实际重量 |
|||
14 |
|||
realityConfirmedPrice |
|||
decime |
|||
50 |
|||
2 |
|||
|
|||
|
|||
|
|||
实际质权人确认的单价 |
|||
15 |
|||
realityCalculatedValue |
|||
decime |
|||
50 |
|||
2 |
|||
|
|||
|
|||
|
|||
实际核算的价值 |
|||
16 |
|||
locationNumber |
|||
varchar |
|||
10 |
|||
|
|||
|
|||
|
|||
|
|||
货位号 |
|||
17 |
|||
mainSid |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
申请单的sid |
|||
表stock 质物库存表 |
|||
编号 |
|||
名称 |
|||
数据类型 |
|||
长度 |
|||
小数位 |
|||
允许空值 |
|||
主键 |
|||
默认值 |
|||
说明 |
|||
1 |
|||
proName |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
质物名称 |
|||
2 |
|||
proModel |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
规格(型号) |
|||
3 |
|||
manufacturer |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
生成厂家(产地) |
|||
4 |
|||
num |
|||
varchar |
|||
10 |
|||
|
|||
|
|||
|
|||
|
|||
数量 |
|||
5 |
|||
weight |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
重量 |
|||
6 |
|||
confirmedPrice |
|||
decime |
|||
50 |
|||
2 |
|||
|
|||
|
|||
|
|||
质权人确认的单价 |
|||
7 |
|||
calculatedValue |
|||
decime |
|||
50 |
|||
2 |
|||
|
|||
|
|||
|
|||
核算的价值 |
|||
8 |
|||
locationNumber |
|||
varchar |
|||
10 |
|||
|
|||
|
|||
|
|||
|
|||
货位号 |
|||
9 |
|||
custerName |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
客户名称(企业) |
|||
|
|||
proUnit |
|||
varchar |
|||
50 |
|||
|
|||
|
|||
|
|||
|
|||
规格单位 |
|||
|
|||
custerSid |
|||
varchar |
|||
64 |
|||
|
|||
|
|||
|
|||
|
|||
客户Sid(企业) |
|||
|
|||
custerName |
|||
varchar |
|||
100 |
|||
|
|||
|
|||
|
|||
|
|||
客户名称(企业) |
|||
|
|||
storeHouseSid |
|||
varchar |
|||
64 |
|||
|
|||
|
|||
|
|||
|
|||
仓库Sid |
|||
|
|||
storeHouseName |
|||
varchar |
|||
100 |
|||
|
|||
|
|||
|
|||
|
|||
仓库名称 |
|||
|
|||
locationNumber |
|||
varchar |
|||
10 |
|||
|
|||
|
|||
|
|||
|
|||
货位号 |
|||
备注:台账的数据是实时最新的。 |
|||
|
|||
问题: |
|||
同一个出质人两次入库单的同一种商品的单价、核算的价值不一致如何处理。(台账中同一个商品出现的单价不一致的情况) |
|||
|
|||
同一个出质人两次出库单的同一种商品的预计质权人确认的单价、预计核算的价值、实际质权人确认的单价、实际核算的价值不一致如何处理。(台账中同一个商品出现的价值不一致的情况) |
|||
|
|||
出库的商品与入库的商品是不是只按照同一个客户下的同一商品名称做对应。 |
|||
|
|||
4、出现下述情况如何处理: |
|||
康师傅矿泉水1000瓶。500瓶在A货位,500瓶在B货位。 |
|||
|
|||
|
|||
填写的单子需要按照如下方式填写。 |
|||
质物名称 |
|||
规格 |
|||
生产厂家 |
|||
数量 |
|||
重量 |
|||
质权人确认的单价 |
|||
核算的价值 |
|||
货位号 |
|||
备注 |
|||
康师傅矿泉水 |
|||
500ML |
|||
康师傅 |
|||
1000 |
|||
500 |
|||
1000 |
|||
1000 |
|||
A、B |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
质物名称 |
|||
规格 |
|||
生产厂家 |
|||
数量 |
|||
重量 |
|||
质权人确认的单价 |
|||
核算的价值 |
|||
货位号 |
|||
备注 |
|||
康师傅矿泉水 |
|||
500ML |
|||
康师傅 |
|||
500 |
|||
250 |
|||
500 |
|||
500 |
|||
A |
|||
|
|||
康师傅矿泉水 |
|||
500ML |
|||
康师傅 |
|||
500 |
|||
250 |
|||
500 |
|||
500 |
|||
B |
|||
|
|||
入库接口格式 |
|||
{ |
|||
"no": "202305160001", |
|||
"custerName": "国大36524", |
|||
"applicationDate": "20230516", |
|||
"listing": [ |
|||
{ |
|||
"proName": "康师傅矿泉水", |
|||
"proModel": "500ml", |
|||
"manufacturer": "康师傅", |
|||
"num": "1000", |
|||
"weight": "250公斤", |
|||
"locationNumber": "A货位", |
|||
"calculatedValue": "1000", |
|||
"confirmedPrice": "1000" |
|||
}, |
|||
{ |
|||
"proName": "康师傅矿泉水", |
|||
"proModel": "500ml", |
|||
"manufacturer": "康师傅", |
|||
"num": "1000", |
|||
"weight": "250公斤", |
|||
"locationNumber": "B货位", |
|||
"calculatedValue": "1000", |
|||
"confirmedPrice": "1000" |
|||
} |
|||
] |
|||
} |
|||
|
|||
|
|||
5、关于包装、标记字段如何处理。 |
|||
关于质押物的有效期、质押期限字段。 |
|||
重量的单位。 |
|||
出库接口格式 |
|||
|
|||
{ |
|||
"no": "202305160001", |
|||
"custerName": "国大36524", |
|||
"applicationDate": "20230516", |
|||
"listing": [ |
|||
{ |
|||
"proName": "康师傅矿泉水", |
|||
"proModel": "500ml", |
|||
"manufacturer": "康师傅", |
|||
"estimateNum": "1000", |
|||
"estimateweight": "250公斤", |
|||
"locationNumber": "A货位", |
|||
"estimatecalculatedValue": "1000", |
|||
"estimateconfirmedPrice": "1000", |
|||
"realityCalculatedValue": "1000", |
|||
"realityConfirmedPrice": "1000", |
|||
"realityWeight": "250公斤", |
|||
"realityNum": "1000" |
|||
}, |
|||
{ |
|||
"proName": "康师傅矿泉水", |
|||
"proModel": "500ml", |
|||
"manufacturer": "康师傅", |
|||
"estimateNum": "1000", |
|||
"estimateweight": "250公斤", |
|||
"locationNumber": "A货位", |
|||
"estimatecalculatedValue": "1000", |
|||
"estimateconfirmedPrice": "1000", |
|||
"realityCalculatedValue": "1000", |
|||
"realityConfirmedPrice": "1000", |
|||
"realityWeight": "250公斤", |
|||
"realityNum": "1000" |
|||
} |
|||
] |
|||
} |
|||
8、Apifox中的接口 |
|||
|
After Width: | Height: | Size: 609 KiB |
After Width: | Height: | Size: 291 KiB |
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 142 KiB |
@ -0,0 +1,56 @@ |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (10, '8868f61a-9966-40fa-a5e8-9280966f5d3a', 0, '2023-05-09 13:45:55', '2023-05-09 13:45:55', 1, 1, 0, NULL, NULL, NULL, '1#', '200T', '50959b0e-8dcf-490c-b45b-dd0ba65a6039', 54.00, 54.00, 25.72, NULL, 0.00, 28.260, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (11, 'c464a850-0877-4254-81e5-06b0f186ff5a', 0, '2023-05-09 13:46:07', '2023-05-09 13:46:07', 1, 1, 0, NULL, NULL, NULL, '2#', '200T', '7dc418b1-4c1c-496e-9767-db2a6880f6e2', 32.92, 32.92, 23.92, NULL, 0.00, 28.260, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (12, '48ee8701-3364-4354-b214-d1b67ee3f081', 0, '2023-05-09 13:46:19', '2023-05-09 13:46:19', 1, 1, 0, NULL, NULL, NULL, '3#', '200T', '102c7a43-c338-4055-8ec1-df6ce774bc86', 93.35, 93.35, 18.00, NULL, 0.00, 28.260, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (13, '2d925f8b-0538-4e7d-ba75-32c1be826d11', 0, '2023-05-09 13:46:25', '2023-05-09 13:46:25', 1, 1, 0, NULL, NULL, NULL, '4#', '200T', '7dc418b1-4c1c-496e-9767-db2a6880f6e2', 36.00, 36.00, 36.00, NULL, 0.00, 28.260, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (14, '946f1730-093b-4a27-878b-76c509da7bff', 0, '2023-05-09 13:46:32', '2023-05-09 13:46:32', 1, 1, 0, NULL, NULL, NULL, '5#', '200T', 'f67ab75e-71bc-4fb9-b47f-1a71e78cd4cf', 20.57, 20.57, 23.14, NULL, 0.00, 28.260, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (15, '49a57db2-95e9-4255-9259-4e9c762c08d3', 0, '2023-05-09 13:46:38', '2023-05-09 13:46:38', 1, 1, 0, NULL, NULL, NULL, '6#', '200T', 'f67ab75e-71bc-4fb9-b47f-1a71e78cd4cf', 35.49, 35.49, 35.49, NULL, 0.00, 28.260, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (16, 'c4204f4f-8923-40c5-a2f3-9deec491d1c6', 0, '2023-05-09 13:46:47', '2023-05-09 13:46:47', 1, 1, 0, NULL, NULL, NULL, '7#', '100T', '56fcac4e-2c37-499d-80ca-043eacbe877c', 64.22, 30.36, 3.57, NULL, 0.00, 19.625, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (17, '39538efb-3862-4d24-9c3c-d4bb110a6cf6', 0, '2023-05-09 13:46:54', '2023-05-09 13:46:54', 1, 1, 0, NULL, NULL, NULL, '8#', '100T', '56fcac4e-2c37-499d-80ca-043eacbe877c', 0.00, 0.00, 0.00, NULL, 0.00, 19.625, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (18, 'c35e6a05-8032-4ceb-ab53-88e913cdeb76', 0, '2023-05-09 13:47:05', '2023-05-09 13:47:05', 1, 1, 0, NULL, NULL, NULL, '9#', '60T', '25d6f585-887a-425d-96d6-37f66dabae5b', 30.43, 30.43, 22.69, NULL, 0.00, 11.335, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (19, '4393ac9e-2394-4a99-9fed-a7d86ea60b3b', 0, '2023-05-09 13:47:11', '2023-05-09 13:47:11', 1, 1, 0, NULL, NULL, NULL, '10#', '60T', '25d6f585-887a-425d-96d6-37f66dabae5b', 0.00, 0.00, 3.82, NULL, 0.00, 11.335, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (20, '05d0e942-020b-45c8-a6ea-82e5c63e673b', 0, '2023-05-09 13:47:18', '2023-05-09 13:47:18', 1, 1, 0, NULL, NULL, NULL, '11#', '60T', '25d6f585-887a-425d-96d6-37f66dabae5b', 0.00, 0.00, 0.00, NULL, 0.00, 11.335, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (21, '1dbd4602-48e0-42a6-9841-2e075697f4c6', 0, '2023-05-09 13:47:52', '2023-05-09 13:47:52', 1, 1, 0, NULL, NULL, NULL, 'A01', '500T', '', 0.00, 0.00, 0.00, NULL, NULL, NULL, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (22, '8c2eeadb-fb61-4633-afaa-fc3a7a0a4584', 0, '2023-05-09 13:47:59', '2023-05-09 13:47:59', 1, 1, 0, NULL, NULL, NULL, 'A02', '500T', '', 0.00, 0.00, 0.00, NULL, NULL, NULL, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (23, '72883c96-030d-499f-9a64-e9187f4bbc29', 0, '2023-05-09 13:48:05', '2023-05-09 13:48:05', 1, 1, 0, NULL, NULL, NULL, 'A03', '500T', '', 0.00, 0.00, 0.00, NULL, NULL, NULL, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (24, '9cc49489-98d8-4354-b9ce-813ec9af70b7', 0, '2023-05-09 13:48:10', '2023-05-09 13:48:10', 1, 1, 0, NULL, NULL, NULL, 'A04', '500T', '', 0.00, 0.00, 0.00, NULL, NULL, NULL, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (25, '45860dc9-7c76-4683-9703-dfcf8a699bef', 0, '2023-05-09 13:48:16', '2023-05-09 13:48:16', 1, 1, 0, NULL, NULL, NULL, 'A05', '500T', '', 0.00, 0.00, 0.00, NULL, NULL, NULL, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (26, '62796ed0-3a99-4449-9632-c6d70b3b4894', 0, '2023-05-09 13:48:21', '2023-05-09 13:48:21', 1, 1, 0, NULL, NULL, NULL, 'A06', '500T', '', 0.00, 0.00, 0.00, NULL, NULL, NULL, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (27, '7283702d-5192-4800-a153-7f332f52601f', 0, '2023-05-09 13:48:26', '2023-05-09 13:48:26', 1, 1, 0, NULL, NULL, NULL, 'A07', '500T', '', 0.00, 0.00, 0.00, NULL, NULL, NULL, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (28, '157dd49e-fff6-4e78-9887-6fc827f423e2', 0, '2023-05-09 13:48:31', '2023-05-09 13:48:31', 1, 1, 0, NULL, NULL, NULL, 'A08', '500T', '', 0.00, 0.00, 0.00, NULL, NULL, NULL, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (29, 'dfec6aa6-40d7-4f11-93b0-f6be77e83b33', 0, '2023-05-09 13:48:36', '2023-05-09 13:48:36', 1, 1, 0, NULL, NULL, NULL, 'A09', '500T', '', 0.00, 0.00, 0.00, NULL, NULL, NULL, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (30, '5a51f78b-3701-4db8-ba45-2ace629c92e0', 0, '2023-05-09 13:48:42', '2023-05-09 13:48:42', 1, 1, 0, NULL, NULL, NULL, 'A10', '500T', '', 0.00, 0.00, 0.00, NULL, NULL, NULL, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (31, '93b7e388-80bf-4a4c-9057-d98e8f019d00', 0, '2023-05-09 13:48:46', '2023-05-09 13:48:46', 1, 1, 0, NULL, NULL, NULL, 'A11', '500T', '', 0.00, 0.00, 0.00, NULL, NULL, NULL, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (32, 'c3ac81ac-8963-4f52-807d-b6d5e92eaebf', 0, '2023-05-09 13:48:52', '2023-05-09 13:48:52', 1, 1, 0, NULL, NULL, NULL, 'A12', '500T', '', 0.00, 0.00, 0.00, NULL, NULL, NULL, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (33, '20eab847-d95f-4048-a657-fe81040e9978', 0, '2023-05-09 13:48:57', '2023-05-09 13:48:57', 1, 1, 0, NULL, NULL, NULL, 'A13', '500T', '', 0.00, 0.00, 0.00, NULL, NULL, NULL, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (34, '469e7ab6-0ca6-4099-afd5-3757c02cb25f', 0, '2023-05-09 13:49:02', '2023-05-09 13:49:02', 1, 1, 0, NULL, NULL, NULL, 'A14', '500T', '', 0.00, 0.00, 0.00, NULL, NULL, NULL, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (35, 'c593ae9b-8493-4073-becd-91c0d9cf09bc', 0, '2023-05-09 13:49:09', '2023-05-09 13:49:09', 1, 1, 0, NULL, NULL, NULL, 'A15', '500T', '', 0.00, 0.00, 0.00, NULL, NULL, NULL, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (38, '34daabb4-21a4-472a-bf44-b49a207323f3', 0, '2023-05-12 11:02:15', '2023-05-12 11:02:15', 1, 1, 0, NULL, NULL, NULL, '室内亚麻油1', '100', 'ae71e0dd-f7e5-415c-9eaa-2b327571bb59', 7.71, 7.71, 27.00, '', 5.00, 7.065, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (39, 'fb1f8246-4861-49d8-b193-0cc29ec70f8d', 0, '2023-05-12 11:02:55', '2023-05-12 11:02:55', 1, 1, 0, NULL, NULL, NULL, '室内芝麻油', '100', 'b38bb339-3717-4eb0-bc93-fe0d19856e03', 12.73, 12.73, 12.73, '', 5.00, 7.065, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (40, '2f1f4ef1-fade-43df-b5b4-0412d4959508', 0, '2023-05-12 11:03:38', '2023-05-12 11:03:38', 1, 1, 0, NULL, NULL, NULL, '室内花生油', '100', '56fcac4e-2c37-499d-80ca-043eacbe877c', 0.45, 0.45, 0.45, '', 5.00, 7.065, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (41, 'b6245520-51ff-4918-92a2-bf0a8043ec21', 0, '2023-05-12 11:04:23', '2023-05-12 11:04:23', 1, 1, 0, NULL, NULL, NULL, '室内亚麻油2', '100', 'ae71e0dd-f7e5-415c-9eaa-2b327571bb59', 1.54, 1.54, 0.96, '', 5.00, 7.065, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (42, '3b2be451-082e-4f4a-8313-8c6475a700e1', 0, '2023-05-12 11:04:59', '2023-05-12 11:04:59', 1, 1, 0, NULL, NULL, NULL, '室内葵花油', '100', '7af3aeec-54e2-4127-90b3-8cbfc2f62674', 18.64, 18.64, 22.63, '', 5.00, 7.065, 0.91, NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`tank_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `number`, `capacity`, `crudeSid`, `inventory`, `initialInventory`, `existingInventory`, `flowmeterSid`, `height`, `bottomArea`, `density`, `totalValue`) VALUES (45, '6c9124fc-85c8-43a9-a054-e589f923bfed', 0, '2023-05-16 17:56:33', '2023-05-16 17:56:33', 1, 1, 0, NULL, NULL, NULL, '散装', '', '', 0.00, 0.00, 0.00, '', 0.00, 0.000, 0.00, NULL); |
|||
|
|||
|
|||
INSERT INTO `yxt_supervise_cyf`.`crude_oil_type_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `name`, `number`, `code`, `price`) VALUES (11, '7211de74-6a88-4ee5-8843-c1427f549a98', 0, '2023-05-09 13:41:50', '2023-05-09 13:41:50', 1, 1, 0, NULL, NULL, NULL, '一级豆油', '3号', '001', NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`crude_oil_type_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `name`, `number`, `code`, `price`) VALUES (12, '7dc418b1-4c1c-496e-9767-db2a6880f6e2', 0, '2023-05-09 13:42:08', '2023-05-09 13:42:08', 1, 1, 0, NULL, NULL, NULL, '三级豆油', '4号', '002', NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`crude_oil_type_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `name`, `number`, `code`, `price`) VALUES (13, '25d6f585-887a-425d-96d6-37f66dabae5b', 0, '2023-05-09 13:42:21', '2023-05-09 13:42:21', 1, 1, 0, NULL, NULL, NULL, '菜籽油', '9号', '003', NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`crude_oil_type_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `name`, `number`, `code`, `price`) VALUES (14, 'f67ab75e-71bc-4fb9-b47f-1a71e78cd4cf', 0, '2023-05-09 13:42:36', '2023-05-09 13:42:36', 1, 1, 0, NULL, NULL, NULL, '玉米油', '5号', '004', NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`crude_oil_type_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `name`, `number`, `code`, `price`) VALUES (15, '7af3aeec-54e2-4127-90b3-8cbfc2f62674', 0, '2023-05-09 13:42:49', '2023-05-09 13:42:49', 1, 1, 0, NULL, NULL, NULL, '葵花油', '6号', '005', NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`crude_oil_type_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `name`, `number`, `code`, `price`) VALUES (16, '56fcac4e-2c37-499d-80ca-043eacbe877c', 0, '2023-05-09 13:43:00', '2023-05-09 13:43:00', 1, 1, 0, NULL, NULL, NULL, '花生油', '7号', '006', NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`crude_oil_type_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `name`, `number`, `code`, `price`) VALUES (17, '102c7a43-c338-4055-8ec1-df6ce774bc86', 0, '2023-05-11 11:59:15', '2023-05-11 11:59:15', 1, 1, 0, NULL, NULL, NULL, '转基因大豆油', '2', '007', NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`crude_oil_type_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `name`, `number`, `code`, `price`) VALUES (18, '50959b0e-8dcf-490c-b45b-dd0ba65a6039', 0, '2023-05-11 12:00:16', '2023-05-11 12:00:16', 1, 1, 0, NULL, NULL, NULL, '非转基因大豆油', '1', '008', NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`crude_oil_type_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `name`, `number`, `code`, `price`) VALUES (19, 'ae71e0dd-f7e5-415c-9eaa-2b327571bb59', 0, '2023-05-12 10:55:51', '2023-05-12 10:55:51', 1, 1, 0, NULL, NULL, NULL, '亚麻油', '3', '009', NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`crude_oil_type_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `name`, `number`, `code`, `price`) VALUES (20, 'b38bb339-3717-4eb0-bc93-fe0d19856e03', 0, '2023-05-12 10:56:40', '2023-05-12 10:56:40', 1, 1, 0, NULL, NULL, NULL, '芝麻油', '4', '010', NULL); |
|||
INSERT INTO `yxt_supervise_cyf`.`crude_oil_type_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `name`, `number`, `code`, `price`) VALUES (21, 'a6ffa75a-9325-409b-a159-462f6f925167', 0, '2023-05-12 10:57:29', '2023-05-12 10:57:29', 1, 1, 0, NULL, NULL, NULL, '橄榄油', '5', '011', NULL); |
|||
|
|||
|
|||
INSERT INTO `yxt_supervise_cyf`.`flowmeter_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `name`, `number`, `code`, `tankSid`) VALUES (1, '48637760-6e93-4cf2-8b02-cfa44d7ef8be', 0, '2023-05-11 10:24:37', '2023-05-11 10:24:37', 1, 1, 0, NULL, NULL, NULL, '1', '1', '1', 'c464a850-0877-4254-81e5-06b0f186ff5a'); |
|||
INSERT INTO `yxt_supervise_cyf`.`flowmeter_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `name`, `number`, `code`, `tankSid`) VALUES (2, '6073a38b-d559-4e5d-8497-111f51681a89', 0, '2023-05-11 10:25:26', '2023-05-11 10:25:26', 1, 1, 0, NULL, NULL, NULL, '2', '2', '2', 'c464a850-0877-4254-81e5-06b0f186ff5a'); |
|||
INSERT INTO `yxt_supervise_cyf`.`flowmeter_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `name`, `number`, `code`, `tankSid`) VALUES (3, '127fcce0-3afd-4d6f-b275-a3adff52110f', 0, '2023-05-11 10:25:37', '2023-05-11 10:25:37', 1, 1, 0, NULL, NULL, NULL, '3', '3', '3', 'c464a850-0877-4254-81e5-06b0f186ff5a'); |
|||
INSERT INTO `yxt_supervise_cyf`.`flowmeter_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `name`, `number`, `code`, `tankSid`) VALUES (4, '13708c58-ffec-418b-ae15-e6fe55b59efd', 0, '2023-05-11 10:25:47', '2023-05-11 10:25:47', 1, 1, 0, NULL, NULL, NULL, '4', '4', '4', 'c464a850-0877-4254-81e5-06b0f186ff5a'); |
|||
INSERT INTO `yxt_supervise_cyf`.`flowmeter_information`(`id`, `sid`, `lockVersion`, `createTime`, `modifyTime`, `isEnable`, `state`, `isDelete`, `remarks`, `createBySid`, `updateBySid`, `name`, `number`, `code`, `tankSid`) VALUES (5, '5f2072a5-803e-4cf3-913b-4c066cd83532', 0, '2023-05-11 10:25:58', '2023-05-11 10:25:58', 1, 1, 0, NULL, NULL, NULL, '5', '5', '5', 'c464a850-0877-4254-81e5-06b0f186ff5a'); |
|||
|
|||
|
|||
|
|||
|
Binary file not shown.
@ -0,0 +1,32 @@ |
|||
package com.yxt.supervise.cyf.api.appversion; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.IdType; |
|||
import com.baomidou.mybatisplus.annotation.TableId; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* Created with IntelliJ IDEA. |
|||
* |
|||
* @Auther: dimengzhe |
|||
* @Date: 2020/06/15/11:08 |
|||
* @Description: |
|||
*/ |
|||
@Data |
|||
@TableName("app_version") |
|||
public class AppVersion extends BaseEntity { |
|||
private static final long serialVersionUID = -1024009882612883351L; |
|||
|
|||
|
|||
private String appName;//应用名称
|
|||
private Integer versionCode;//版本编码
|
|||
private String versionName;//版本号
|
|||
private String downloadUrl;//下载地址
|
|||
private String versionInfo;//版本描述
|
|||
private Integer isAlpha;//是否内测:0否,1是
|
|||
private String fileName; |
|||
private boolean forceUpdate; |
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.yxt.supervise.cyf.api.appversion; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/19 9:55 |
|||
*/ |
|||
@Data |
|||
public class AppVersionDetailsVo implements Vo { |
|||
private String id; |
|||
private String appName;//应用名称
|
|||
private Integer versionCode;//版本编码
|
|||
private String versionName;//版本号
|
|||
private String downloadUrl;//下载地址
|
|||
private String versionInfo;//版本描述
|
|||
private Integer isAlpha;//是否内测:0否,1是
|
|||
private String fileName; |
|||
private boolean forceUpdate; |
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.yxt.supervise.cyf.api.appversion; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/19 9:55 |
|||
*/ |
|||
@Data |
|||
public class AppVersionDto implements Dto { |
|||
private String id; |
|||
private String appName;//应用名称
|
|||
private Integer versionCode;//版本编码
|
|||
private String versionName;//版本号
|
|||
private String downloadUrl;//下载地址
|
|||
private String versionInfo;//版本描述
|
|||
private Integer isAlpha;//是否内测:0否,1是
|
|||
private String fileName; |
|||
private boolean forceUpdate; |
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.yxt.supervise.cyf.api.appversion; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/19 9:55 |
|||
*/ |
|||
@Data |
|||
public class AppVersionVo implements Vo { |
|||
private String id; |
|||
private String appName;//应用名称
|
|||
private Integer versionCode;//版本编码
|
|||
private String versionName;//版本号
|
|||
private String downloadUrl;//下载地址
|
|||
private String versionInfo;//版本描述
|
|||
private Integer isAlpha;//是否内测:0否,1是
|
|||
private String fileName; |
|||
private boolean forceUpdate; |
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.yxt.supervise.cyf.api.crudeoilpricerecord; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:26 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "原油价格信息", description = "原油价格信息") |
|||
@TableName("crude_oil_price_record") |
|||
public class CrudeOilPriceRecord extends BaseEntity { |
|||
|
|||
//原油类型sid
|
|||
private String typeSid; |
|||
//现价格
|
|||
private double price; |
|||
//旧价格
|
|||
private double oldPrice; |
|||
//上次价格记录sid
|
|||
private String pSid; |
|||
|
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.yxt.supervise.cyf.api.crudeoilpricerecord; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:28 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "原油价格信息 视图数据详情", description = "原油价格信息 视图数据详情") |
|||
public class CrudeOilPriceRecordDetailsVo implements Vo { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
|
|||
//原油类型sid
|
|||
private String typeSid; |
|||
//现价格
|
|||
private double price; |
|||
//旧价格
|
|||
private double oldPrice; |
|||
//上次价格记录sid
|
|||
private String pSid; |
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.yxt.supervise.cyf.api.crudeoilpricerecord; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:28 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "原油价格信息 数据传输对象", description = "原油价格信息 数据传输对象") |
|||
public class CrudeOilPriceRecordDto implements Dto { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
|
|||
//原油类型sid
|
|||
private String typeSid; |
|||
//现价格
|
|||
private double price; |
|||
//旧价格
|
|||
private double oldPrice; |
|||
//上次价格记录sid
|
|||
private String pSid; |
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.yxt.supervise.cyf.api.crudeoilpricerecord; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:29 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "原油价格信息 查询条件", description = "原油价格信息 查询条件") |
|||
public class CrudeOilPriceRecordQuery implements Query { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
|
|||
//原油类型sid
|
|||
private String typeSid; |
|||
//现价格
|
|||
private double price; |
|||
//旧价格
|
|||
private double oldPrice; |
|||
//上次价格记录sid
|
|||
private String pSid; |
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.yxt.supervise.cyf.api.crudeoilpricerecord; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:29 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "原油价格信息 视图数据对象", description = "原油价格信息 视图数据对象") |
|||
public class CrudeOilPriceRecordVo implements Vo { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
|
|||
//原油类型sid
|
|||
private String typeSid; |
|||
//现价格
|
|||
private double price; |
|||
//旧价格
|
|||
private double oldPrice; |
|||
//上次价格记录sid
|
|||
private String pSid; |
|||
} |
@ -0,0 +1,68 @@ |
|||
package com.yxt.supervise.cyf.api.sysuser; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysUser.java <br/> |
|||
* Class: SysUser <br/> |
|||
* Description: 用户表. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:30 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "用户表", description = "用户表") |
|||
@TableName("sys_user") |
|||
@Data |
|||
public class SysUser extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
|
|||
@ApiModelProperty("登录名,登录名不能相同") |
|||
private String userName; |
|||
|
|||
@ApiModelProperty("密码(加密或签名后)") |
|||
private String password; |
|||
|
|||
@ApiModelProperty("密码修改时限") |
|||
private String pwdDayslimit; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
|||
@ApiModelProperty("最后一次密码修改时间") |
|||
private Date pwdModifyTime; |
|||
|
|||
@ApiModelProperty("在线状态(0为离线、1为在线)") |
|||
private Integer onlineState; |
|||
|
|||
@ApiModelProperty("用户登录时随机生成身份验证字符串") |
|||
private String token; |
|||
|
|||
@ApiModelProperty("是否是管理员:1管理员,2一般用户,0是超级管理员,3尚无单位人员") |
|||
private String isAdmin; |
|||
|
|||
@ApiModelProperty("手机登录唯一标识,手机与用户绑定字段") |
|||
private String appId; |
|||
|
|||
@ApiModelProperty("关联的人员sid") |
|||
private String staffSid; |
|||
|
|||
@ApiModelProperty("手机号") |
|||
private String mobile; |
|||
|
|||
@ApiModelProperty("用户类型:1员工、2客户、3供应商") |
|||
private Integer userType; |
|||
|
|||
@ApiModelProperty("用户头像") |
|||
private String headImage; |
|||
} |
@ -0,0 +1,40 @@ |
|||
package com.yxt.supervise.cyf.api.sysuser; |
|||
|
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysUserDto.java <br/> |
|||
* Class: SysUserDto <br/> |
|||
* Description: 用户表 数据传输对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:30 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "用户表 数据传输对象", description = "用户表 数据传输对象") |
|||
@Data |
|||
public class SysUserDto implements Dto { |
|||
@ApiModelProperty("手机号") |
|||
private String mobile; |
|||
@ApiModelProperty("用户类型:1员工、2客户、3供应商") |
|||
private Integer userType; |
|||
@ApiModelProperty(value = "姓名", required = true) |
|||
//@NotBlank(message = "姓名不能为空")
|
|||
private String name; |
|||
@ApiModelProperty(value = "验证码", required = true) |
|||
//@NotBlank(message = "验证码不能为空")
|
|||
private String verificationCode; |
|||
@ApiModelProperty(value = "部门sid") |
|||
private String deptSid; |
|||
@ApiModelProperty(value = "岗位sid") |
|||
private String postSid; |
|||
|
|||
} |
@ -0,0 +1,51 @@ |
|||
package com.yxt.supervise.cyf.api.sysuser; |
|||
|
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysUserQuery.java <br/> |
|||
* Class: SysUserQuery <br/> |
|||
* Description: 用户表 查询条件. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:30 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "用户表 查询条件", description = "用户表 查询条件") |
|||
@Data |
|||
public class SysUserQuery implements Query { |
|||
|
|||
|
|||
@ApiModelProperty("角色sid") |
|||
private String roleSid; |
|||
@ApiModelProperty("用户名称") |
|||
private String userName; |
|||
@ApiModelProperty("姓名") |
|||
private String name; |
|||
@ApiModelProperty("部门名称") |
|||
private String orgName; |
|||
|
|||
@ApiModelProperty("密码(加密或签名后)") |
|||
private String password; |
|||
|
|||
@ApiModelProperty("用户登录时随机生成身份验证字符串") |
|||
private String token; |
|||
@ApiModelProperty("用户登录时随机生成的验证码字符串") |
|||
private String verifyCode; |
|||
private String uuid; |
|||
|
|||
@ApiModelProperty("手机登录唯一标识,手机与用户绑定字段") |
|||
private String appId; |
|||
@ApiModelProperty("手机登录类型:1、密码登录2、验证码登录") |
|||
private String type; |
|||
@ApiModelProperty(value = "是否是测试",example = "false") |
|||
private Boolean isTest; |
|||
} |
@ -0,0 +1,91 @@ |
|||
package com.yxt.supervise.cyf.api.sysuser; |
|||
|
|||
|
|||
import com.fasterxml.jackson.annotation.JsonProperty; |
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysUserVo.java <br/> |
|||
* Class: SysUserVo <br/> |
|||
* Description: 用户表 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:30 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "用户表 视图数据对象", description = "用户表 视图数据对象") |
|||
@Data |
|||
@NoArgsConstructor |
|||
public class SysUserVo implements Vo { |
|||
private static final long serialVersionUID = 2415131854581950721L; |
|||
@ApiModelProperty("部门sid") |
|||
private String departmentSid; |
|||
@ApiModelProperty("部门名称") |
|||
private String departmentName; |
|||
@ApiModelProperty("上级部门名称-本级部门名称 岗位名称") |
|||
@JsonProperty("pNameAndDepartmentNameAndPostName") |
|||
private String pNameAndDepartmentNameAndPostName; |
|||
@ApiModelProperty("岗位名称") |
|||
private String postName; |
|||
@ApiModelProperty("岗位Sid") |
|||
private String postSid; |
|||
@ApiModelProperty("单位sid") |
|||
private String organizationSid; |
|||
@ApiModelProperty("单位名称") |
|||
private String organizationName; |
|||
@ApiModelProperty("用户姓名") |
|||
private String name; |
|||
@ApiModelProperty("登录名,登录名不能相同") |
|||
private String userName; |
|||
|
|||
@ApiModelProperty("id") |
|||
private Integer id; |
|||
@ApiModelProperty("用户sid") |
|||
private String sid; |
|||
@ApiModelProperty("是否是管理员:1管理员,2一般用户,0是超级管理员,3尚无单位人员") |
|||
private String isAdmin; |
|||
@ApiModelProperty("角色名称") |
|||
private String roleName; |
|||
|
|||
@ApiModelProperty("关联的人员sid") |
|||
private String staffSid; |
|||
|
|||
@ApiModelProperty("手机号") |
|||
private String mobile; |
|||
@ApiModelProperty(value = "禁用状态") |
|||
private String isEnable; |
|||
|
|||
@ApiModelProperty("用户类型:1员工、2客户、3供应商") |
|||
private String userType; |
|||
@ApiModelProperty("用户类型:1、2、3") |
|||
private String userTypeKey; |
|||
@ApiModelProperty("用户头像") |
|||
private String headImage; |
|||
@ApiModelProperty("组织名称") |
|||
private String orgNamePath; |
|||
@ApiModelProperty("组织sid") |
|||
private String orgSidPath; |
|||
@ApiModelProperty(value = "token") |
|||
private String token; |
|||
@ApiModelProperty(value = "角色sids") |
|||
private List<String> roleSids = new ArrayList<>(); |
|||
|
|||
private String defaultOrgPath; |
|||
private String defaultOrgPathName; |
|||
|
|||
@ApiModelProperty("是否需要更换密码") |
|||
private Boolean needResetPsd; |
|||
@ApiModelProperty("工号") |
|||
private String jobNumber; |
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.yxt.supervise.cyf.app.appversion; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.yxt.supervise.cyf.api.appversion.AppVersion; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* Created with IntelliJ IDEA. |
|||
* |
|||
* @Auther: dimengzhe |
|||
* @Date: 2020/06/15/11:24 |
|||
* @Description: |
|||
*/ |
|||
@Mapper |
|||
public interface AppVersionMapper extends BaseMapper<AppVersion> { |
|||
|
|||
AppVersion getAll(); |
|||
|
|||
AppVersion selectAppVersion(); |
|||
} |
@ -0,0 +1,19 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.supervise.cyf.app.appversion.AppVersionMapper"> |
|||
|
|||
|
|||
<select id="getAll" resultType="com.yxt.supervise.cyf.api.appversion.AppVersionVo"> |
|||
select * from app_version where isAlpha=0 order by versionCode desc limit 1 |
|||
</select> |
|||
|
|||
|
|||
<select id="selectAppVersion" resultType="com.yxt.supervise.cyf.api.appversion.AppVersionVo"> |
|||
select * from app_version where isAlpha=1 order by versionCode desc limit 1 |
|||
|
|||
</select> |
|||
|
|||
|
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,248 @@ |
|||
package com.yxt.supervise.cyf.app.appversion; |
|||
|
|||
|
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.supervise.cyf.api.appversion.AppVersion; |
|||
import com.yxt.supervise.cyf.api.appversion.AppVersionDto; |
|||
import com.yxt.supervise.cyf.util.JsonUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.ResponseBody; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
import javax.servlet.http.HttpServletResponse; |
|||
import javax.servlet.http.HttpSession; |
|||
import java.io.*; |
|||
import java.util.HashMap; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* Created with IntelliJ IDEA. |
|||
* |
|||
* @Auther: dimengzhe |
|||
* @Date: 2020/06/15/10:43 |
|||
* @Description: 更新apk |
|||
*/ |
|||
@Controller |
|||
@RequestMapping("cyf/appVersion") |
|||
public class AppVersionRest { |
|||
|
|||
private String uploadUrl = "http://www.yyundong.com:8083/api/appVersion/download"; |
|||
// private String uploadUrl = "http://26077a35f5.wicp.vip:43609/api/appVersion/download";
|
|||
|
|||
@Autowired |
|||
private AppVersionService appVersionService; |
|||
|
|||
public ResultBean save(AppVersionDto dto){ |
|||
//dto.setDownloadUrl();
|
|||
return appVersionService.save(dto); |
|||
} |
|||
|
|||
// 文件下载相关代码
|
|||
@RequestMapping("/download") |
|||
public Object downloadFile(HttpServletRequest request, HttpServletResponse response) |
|||
throws UnsupportedEncodingException { |
|||
String fileName = request.getParameter("fileName"); |
|||
if (fileName != null) { |
|||
// 设置文件路径
|
|||
String realPath = "D:/mallplus_project/upload/apks"; |
|||
File file = new File(realPath, fileName); |
|||
if (file.exists()) { |
|||
response.setContentType("application/octet-stream"); |
|||
response.addHeader("Content-Disposition", |
|||
"attachment;fileName=" + java.net.URLEncoder.encode(fileName, "UTF-8"));// 设置文件名
|
|||
byte[] buffer = new byte[1024];// 创建数据缓冲区
|
|||
FileInputStream fis = null;// 文件输入流
|
|||
BufferedInputStream bis = null; |
|||
OutputStream os = null; // 输出流
|
|||
byte[] bytes = null; |
|||
ByteArrayOutputStream baos = null; |
|||
try { |
|||
os = response.getOutputStream(); |
|||
fis = new FileInputStream(file); |
|||
bis = new BufferedInputStream(fis); |
|||
baos = new ByteArrayOutputStream(); |
|||
int len; |
|||
while ((len = fis.read(buffer)) != -1) { |
|||
baos.write(buffer, 0, len); |
|||
} |
|||
bytes = baos.toByteArray(); |
|||
response.setContentLength(bytes.length); |
|||
os.write(bytes, 0, bytes.length); |
|||
os.flush(); |
|||
System.out.println("success"); |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
} finally { |
|||
if (bis != null) { |
|||
try { |
|||
bis.close(); |
|||
} catch (IOException e) { |
|||
e.printStackTrace(); |
|||
} |
|||
} |
|||
if (fis != null) { |
|||
try { |
|||
fis.close(); |
|||
} catch (IOException e) { |
|||
e.printStackTrace(); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
// @RequestMapping(value = "/versioninfo1")
|
|||
// @ResponseBody
|
|||
// public Object appVersion1(HttpServletRequest request) {
|
|||
// Map<String, Object> map = new HashMap<String, Object>();
|
|||
// int versionCode = 1;// 版本编码
|
|||
// String defUrl = "";
|
|||
// String downloadUrl = "";// apk下载地址
|
|||
// String versionName = "";// 版本号
|
|||
// String versionInfo = "";// 版本的更新描述
|
|||
// String fileName = "";// apk名称
|
|||
// int isAlpha = 0;//是否内测,0否,1是
|
|||
// String userName = request.getParameter("userName");//会员账号
|
|||
// // 根据会员账号查询账号信息
|
|||
// UmsMember umsMember = iUmsMemberService.getByUsername(userName);
|
|||
// HttpSession session = request.getSession();
|
|||
// if (umsMember == null) {
|
|||
// // 查询版本记录未删除及为正式版的版本记录
|
|||
// AppVersion av = appVersionService.getAll();
|
|||
// if (null == av) {// 如果没有正式版的版本记录
|
|||
// defUrl = uploadUrl;
|
|||
// av = new AppVersion();
|
|||
// av.setVersionCode(1);
|
|||
// av.setDownloadUrl(defUrl);
|
|||
// versionCode = av.getVersionCode();
|
|||
// downloadUrl = defUrl;
|
|||
// isAlpha = 0;
|
|||
// } else {
|
|||
// versionCode = av.getVersionCode();// 版本编码
|
|||
// versionName = av.getVersionName();// 版本名称即版本号
|
|||
// fileName = av.getFileName();
|
|||
// session.setAttribute("fileName", fileName);
|
|||
// versionInfo = av.getVersionInfo();// 版本的更新描述
|
|||
// defUrl = av.getDownloadUrl();// apk下载地址
|
|||
// downloadUrl = uploadUrl+"?fileName=" + fileName;
|
|||
// isAlpha = av.getIsAlpha();// 是否为内测版本
|
|||
// }
|
|||
// } else {// 若member不为null,则版本可以分为内测人员和非内测人员
|
|||
// int isAlphaUser = umsMember.getIsAlphaUser();
|
|||
// if (isAlphaUser != 0) {//若人员是内测人员,则查询是否有内测版本
|
|||
// AppVersion av = appVersionService.selectAppVersion();// 内测版本
|
|||
// AppVersion av2 = appVersionService.getAll();// 正式版本
|
|||
// if (null == av) {// 若内测版本为null
|
|||
// defUrl = uploadUrl;
|
|||
// // defUrl默认地址需要改config配置文件
|
|||
// av = new AppVersion();
|
|||
// av.setVersionCode(2);
|
|||
// av.setDownloadUrl(defUrl);
|
|||
// versionCode = av.getVersionCode();
|
|||
// downloadUrl = defUrl;
|
|||
// isAlpha = 0;
|
|||
// } else {// 若有内测版本
|
|||
// if (av2 != null) {// 若有正式版本
|
|||
// if (av2.getVersionCode() > av.getVersionCode()) {// 若正式版本编码>内测版本的版本编码
|
|||
// versionCode = av2.getVersionCode();// 正式版本的编码
|
|||
// versionName = av2.getVersionName();
|
|||
// versionInfo = av2.getVersionInfo();
|
|||
// defUrl = av2.getDownloadUrl();
|
|||
// fileName = av.getFileName();
|
|||
// session.setAttribute("fileName", fileName);
|
|||
// downloadUrl = uploadUrl+"?fileName=" + fileName;
|
|||
// isAlpha = av2.getIsAlpha();
|
|||
// } else {
|
|||
// versionCode = av.getVersionCode();// 内测版本编码
|
|||
// versionName = av.getVersionName();// 版本号
|
|||
// versionInfo = av.getVersionInfo();// 版本的更新描述
|
|||
// defUrl = av.getDownloadUrl();// apk下载地址
|
|||
// fileName = av.getFileName();
|
|||
// session.setAttribute("fileName", fileName);
|
|||
// downloadUrl = uploadUrl+"?fileName=" + fileName;
|
|||
// isAlpha = av.getIsAlpha();
|
|||
// }
|
|||
// } else {
|
|||
// versionCode = av.getVersionCode();// 内测版本编码
|
|||
// versionName = av.getVersionName();// 版本号
|
|||
// versionInfo = av.getVersionInfo();// 版本的更新描述
|
|||
// defUrl = av.getDownloadUrl();// apk下载地址
|
|||
// fileName = av.getFileName();
|
|||
// session.setAttribute("fileName", fileName);
|
|||
// downloadUrl = uploadUrl+"?fileName=" + fileName;
|
|||
// isAlpha = av.getIsAlpha();
|
|||
// }
|
|||
// }
|
|||
// } else {// 如果不是内测人员
|
|||
// AppVersion av = appVersionService.getAll();// 正式版本倒序第一个
|
|||
// if (null == av) {//正式版本为null
|
|||
// defUrl = uploadUrl;
|
|||
// av = new AppVersion();
|
|||
// av.setVersionCode(1);// 将版本编码设置为2
|
|||
// av.setDownloadUrl(defUrl);// 将下载地址设置为默认地址
|
|||
// versionCode = av.getVersionCode();
|
|||
// downloadUrl = defUrl;
|
|||
// isAlpha = 0;
|
|||
// } else {
|
|||
// versionCode = av.getVersionCode();
|
|||
// versionName = av.getVersionName();
|
|||
// versionInfo = av.getVersionInfo();
|
|||
// defUrl = av.getDownloadUrl();
|
|||
// fileName = av.getFileName();
|
|||
// session.setAttribute("fileName", fileName);
|
|||
// downloadUrl = uploadUrl+"?fileName=" + fileName;
|
|||
// isAlpha = av.getIsAlpha();
|
|||
// }
|
|||
//
|
|||
// }
|
|||
// }
|
|||
//
|
|||
// AppVersion appVersion = new AppVersion();
|
|||
// appVersion.setDownloadUrl(downloadUrl); //apk下载地址新
|
|||
// appVersion.setVersionCode(versionCode);//版本编码
|
|||
// appVersion.setVersionInfo(versionInfo);//版本的更新的描述
|
|||
// appVersion.setVersionName(versionName);//版本号
|
|||
// appVersion.setFileName(fileName);//应用名称
|
|||
// appVersion.setForceUpdate(false);
|
|||
// String appVersionNew = JsonUtils.objectToJson(appVersion);
|
|||
// return new ResultBean().success().setData(appVersionNew);
|
|||
// }
|
|||
|
|||
@RequestMapping(value = "/versioninfo") |
|||
@ResponseBody |
|||
public Object appVersion(HttpServletRequest request) { |
|||
Map<String, Object> map = new HashMap<String, Object>(); |
|||
int versionCode = 101;// 版本编码
|
|||
String versionName = "101";// 版本号
|
|||
String downloadUrl = "";// apk下载地址
|
|||
String versionInfo = "";// 版本的更新描述
|
|||
String fileName = "";// apk名称
|
|||
int isAlpha = 0;//是否内测,0否,1是
|
|||
|
|||
AppVersion appVersion = new AppVersion(); |
|||
appVersion.setVersionCode(versionCode);//版本编码
|
|||
appVersion.setVersionName(versionName);//版本号
|
|||
appVersion.setDownloadUrl(downloadUrl); //apk下载地址新
|
|||
appVersion.setVersionInfo(versionInfo);//版本的更新的描述
|
|||
appVersion.setFileName(fileName);//应用名称
|
|||
appVersion.setForceUpdate(false); |
|||
|
|||
// 查询版本记录未删除及为正式版的版本记录
|
|||
AppVersion av = appVersionService.getAll(); |
|||
if (null != av) {// 如果有正式版的版本记录
|
|||
appVersion.setVersionCode(av.getVersionCode());//版本编码
|
|||
appVersion.setVersionName(av.getVersionName());//版本号
|
|||
appVersion.setDownloadUrl(av.getDownloadUrl()); //apk下载地址新
|
|||
appVersion.setVersionInfo(av.getVersionInfo());//版本的更新的描述
|
|||
appVersion.setFileName(av.getFileName());//应用名称
|
|||
} |
|||
|
|||
String appVersionNew = JsonUtils.objectToJson(appVersion); |
|||
|
|||
return new ResultBean().success().setData(appVersionNew); |
|||
} |
|||
} |
@ -0,0 +1,38 @@ |
|||
package com.yxt.supervise.cyf.app.appversion; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.supervise.cyf.api.appversion.AppVersion; |
|||
import com.yxt.supervise.cyf.api.appversion.AppVersionDto; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* Created with IntelliJ IDEA. |
|||
* |
|||
* @Auther: dimengzhe |
|||
* @Date: 2020/06/15/11:17 |
|||
* @Description: 版本更新 |
|||
*/ |
|||
@Service |
|||
public class AppVersionService extends MybatisBaseService<AppVersionMapper,AppVersion> { |
|||
|
|||
public ResultBean save(AppVersionDto dto){ |
|||
AppVersion entity=new AppVersion(); |
|||
BeanUtil.copyProperties(dto, entity); |
|||
return new ResultBean().success().setMsg("新增成功"); |
|||
}; |
|||
/** |
|||
* 查询apk版本中正式版本按版本编码倒叙排序 |
|||
* @return |
|||
*/ |
|||
public AppVersion getAll(){ |
|||
return baseMapper.getAll(); |
|||
}; |
|||
|
|||
public AppVersion selectAppVersion(){ |
|||
return baseMapper.selectAppVersion(); |
|||
} |
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.yxt.supervise.cyf.app.crudeoilpricerecord; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import com.yxt.supervise.cyf.api.crudeoilpricerecord.CrudeOilPriceRecord; |
|||
import com.yxt.supervise.cyf.api.crudeoilpricerecord.CrudeOilPriceRecordVo; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.apache.ibatis.annotations.Select; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:37 |
|||
*/ |
|||
@Mapper |
|||
public interface CrudeOilPriceRecordAppMapper extends BaseMapper<CrudeOilPriceRecord> { |
|||
IPage<CrudeOilPriceRecordVo> selectPageVo(IPage<CrudeOilPriceRecord> page, @Param(Constants.WRAPPER) Wrapper<CrudeOilPriceRecord> qw); |
|||
@Select("select * from crude_oil_price_record where typeSid=#{typeSid} order by createTime desc limit 1") |
|||
CrudeOilPriceRecord getCrudeByTypeSid(@Param("typeSid")String typeSid); |
|||
void insertCrudeOilFiles(List<Map<String, String>> maps); |
|||
} |
@ -0,0 +1,29 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.supervise.cyf.app.crudeoilpricerecord.CrudeOilPriceRecordAppMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.supervise.cyf.api.crudeoilpricerecord.CrudeOilPriceRecordVo"> |
|||
SELECT |
|||
*,t.number as tankNumber,i.number as crudeNumber,i.name as crudeName,t.inventory as inventory, |
|||
s.supplierName as supplierName |
|||
FROM |
|||
crude_oil_storage c |
|||
left join tank_information t on t.sid=c.tankSid |
|||
left join crude_oil_type_information i on i.sid =t.crudeSid |
|||
left join supplier_information s on s.sid =c.supplierSid |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
<insert id="insertCrudeOilFiles"> |
|||
insert into crude_oil_storage_file (sid, url, mainSid) values |
|||
<foreach collection="list" item="item" index="index" separator=","> |
|||
( |
|||
#{item.sid,jdbcType=VARCHAR}, |
|||
#{item.url,jdbcType=VARCHAR}, |
|||
#{item.mainSid,jdbcType=VARCHAR} |
|||
) |
|||
</foreach> |
|||
</insert> |
|||
</mapper> |
@ -0,0 +1,42 @@ |
|||
package com.yxt.supervise.cyf.app.crudeoilpricerecord; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.supervise.cyf.api.crudeoilpricerecord.CrudeOilPriceRecordDto; |
|||
import com.yxt.supervise.cyf.api.crudeoilpricerecord.CrudeOilPriceRecordQuery; |
|||
import com.yxt.supervise.cyf.api.crudeoilpricerecord.CrudeOilPriceRecordVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:38 |
|||
*/ |
|||
@Api(tags = "原油价格记录") |
|||
@RestController |
|||
@RequestMapping("cyf/app/crudeprice") |
|||
public class CrudeOilPriceRecordAppRest { |
|||
@Autowired |
|||
CrudeOilPriceRecordAppService CrudeOilPriceRecordService; |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<CrudeOilPriceRecordVo>> listPage(@RequestBody PagerQuery<CrudeOilPriceRecordQuery> pq) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerVo<CrudeOilPriceRecordVo> pv = CrudeOilPriceRecordService.listPageVo(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
@ApiOperation("新增") |
|||
@PostMapping("/save") |
|||
public ResultBean save (@RequestBody CrudeOilPriceRecordDto dto){ |
|||
return CrudeOilPriceRecordService.save(dto); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,63 @@ |
|||
package com.yxt.supervise.cyf.app.crudeoilpricerecord; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.supervise.cyf.api.crudeoilpricerecord.CrudeOilPriceRecord; |
|||
import com.yxt.supervise.cyf.api.crudeoilpricerecord.CrudeOilPriceRecordDto; |
|||
import com.yxt.supervise.cyf.api.crudeoilpricerecord.CrudeOilPriceRecordQuery; |
|||
import com.yxt.supervise.cyf.api.crudeoilpricerecord.CrudeOilPriceRecordVo; |
|||
import com.yxt.supervise.cyf.app.tankinformation.TankInformationAppMapper; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:37 |
|||
*/ |
|||
@Service |
|||
public class CrudeOilPriceRecordAppService extends MybatisBaseService<CrudeOilPriceRecordAppMapper, CrudeOilPriceRecord> { |
|||
@Autowired |
|||
TankInformationAppMapper tankInformationMapper; |
|||
|
|||
public PagerVo<CrudeOilPriceRecordVo> listPageVo(PagerQuery<CrudeOilPriceRecordQuery> pq) { |
|||
CrudeOilPriceRecordQuery query = pq.getParams(); |
|||
QueryWrapper<CrudeOilPriceRecord> qw = new QueryWrapper<>(); |
|||
IPage<CrudeOilPriceRecord> page = PagerUtil.queryToPage(pq); |
|||
IPage<CrudeOilPriceRecordVo> pagging = baseMapper.selectPageVo(page, qw); |
|||
PagerVo<CrudeOilPriceRecordVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
@Transactional |
|||
public ResultBean save(CrudeOilPriceRecordDto dto){ |
|||
|
|||
ResultBean rb=new ResultBean(); |
|||
CrudeOilPriceRecord entity=new CrudeOilPriceRecord(); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.insert(entity); |
|||
return rb.success().setMsg("新增成功"); |
|||
} |
|||
public ResultBean update (CrudeOilPriceRecordDto dto){ |
|||
ResultBean rb=new ResultBean(); |
|||
String dtoSid = dto.getSid(); |
|||
CrudeOilPriceRecord entity=fetchBySid(dtoSid); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.updateById(entity); |
|||
return rb.success().setMsg("修改成功"); |
|||
} |
|||
public CrudeOilPriceRecord getCrudeByTypeSid(String sid){ |
|||
CrudeOilPriceRecord CrudeOilPriceRecord=baseMapper.getCrudeByTypeSid(sid); |
|||
return CrudeOilPriceRecord; |
|||
} |
|||
public ResultBean del(String sid){ |
|||
ResultBean rb=new ResultBean(); |
|||
baseMapper.delete(new QueryWrapper<CrudeOilPriceRecord>().eq("sid",sid)); |
|||
return rb.success().setMsg("删除成功"); |
|||
} |
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.yxt.supervise.cyf.app.supplierinformation; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import com.yxt.supervise.cyf.api.supplierinformation.SupplierInformation; |
|||
import com.yxt.supervise.cyf.api.supplierinformation.SupplierInformationVo; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.apache.ibatis.annotations.Select; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:37 |
|||
*/ |
|||
@Mapper |
|||
public interface SupplierInformationAppMapper extends BaseMapper<SupplierInformation> { |
|||
IPage<SupplierInformationVo> selectPageVo(IPage<SupplierInformation> page, @Param(Constants.WRAPPER) Wrapper<SupplierInformation> qw); |
|||
@Select("select * from supplier_information") |
|||
List<SupplierInformationVo> supplierList(); |
|||
@Select("select * from supplier_information where sid=#{sid}") |
|||
SupplierInformation getSupplierBySid(@Param("sid")String sid); |
|||
} |
@ -0,0 +1,16 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.supervise.cyf.app.supplierinformation.SupplierInformationAppMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.supervise.cyf.api.supplierinformation.SupplierInformationVo"> |
|||
SELECT |
|||
* |
|||
FROM |
|||
supplier_information |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
|
|||
</mapper> |
@ -0,0 +1,61 @@ |
|||
package com.yxt.supervise.cyf.app.supplierinformation; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.supervise.cyf.api.supplierinformation.SupplierInformationDto; |
|||
import com.yxt.supervise.cyf.api.supplierinformation.SupplierInformationQuery; |
|||
import com.yxt.supervise.cyf.api.supplierinformation.SupplierInformationVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:38 |
|||
*/ |
|||
@Api(tags = "供应商信息") |
|||
@RestController |
|||
@RequestMapping("cyf/app/supplier") |
|||
public class SupplierInformationAppRest { |
|||
@Autowired |
|||
SupplierInformationAppService RawSupplierInformationService; |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<SupplierInformationVo>> listPage(@RequestBody PagerQuery<SupplierInformationQuery> pq) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerVo<SupplierInformationVo> pv = RawSupplierInformationService.listPageVo(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
@ApiOperation("查询数据的列表") |
|||
@PostMapping("/supplierList") |
|||
public ResultBean<PagerVo<SupplierInformationVo>> typeList() { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
List<SupplierInformationVo> pv = RawSupplierInformationService.supplierList(); |
|||
return rb.success().setData(pv); |
|||
} |
|||
@ApiOperation("新增") |
|||
@PostMapping("/save") |
|||
public ResultBean save (@RequestBody SupplierInformationDto dto){ |
|||
return RawSupplierInformationService.save(dto); |
|||
} |
|||
@ApiOperation("修改") |
|||
@PostMapping("/update") |
|||
public ResultBean update (@RequestBody SupplierInformationDto dto){ |
|||
return RawSupplierInformationService.update(dto); |
|||
} |
|||
@ApiOperation("根据sid查询") |
|||
@GetMapping("/getSupplierBySid/{sid}") |
|||
public ResultBean getSupplierBySid(@PathVariable String sid){ |
|||
return RawSupplierInformationService.getSupplierBySid(sid); |
|||
} |
|||
@ApiOperation("删除") |
|||
@DeleteMapping("/delete/{sid}") |
|||
public ResultBean delete(@PathVariable String sid ){ |
|||
return RawSupplierInformationService.del(sid); |
|||
} |
|||
} |
@ -0,0 +1,70 @@ |
|||
package com.yxt.supervise.cyf.app.supplierinformation; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.base.utils.StringUtils; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.supervise.cyf.api.supplierinformation.SupplierInformation; |
|||
import com.yxt.supervise.cyf.api.supplierinformation.SupplierInformationDto; |
|||
import com.yxt.supervise.cyf.api.supplierinformation.SupplierInformationQuery; |
|||
import com.yxt.supervise.cyf.api.supplierinformation.SupplierInformationVo; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:37 |
|||
*/ |
|||
@Service |
|||
public class SupplierInformationAppService extends MybatisBaseService<SupplierInformationAppMapper, SupplierInformation> { |
|||
|
|||
|
|||
public PagerVo<SupplierInformationVo> listPageVo(PagerQuery<SupplierInformationQuery> pq) { |
|||
SupplierInformationQuery query = pq.getParams(); |
|||
QueryWrapper<SupplierInformation> qw = new QueryWrapper<>(); |
|||
if(StringUtils.isNotBlank(query.getSupplierName())){ |
|||
qw.like("supplierName",query.getSupplierName()); |
|||
} |
|||
if(StringUtils.isNotBlank(query.getSupplierCode())){ |
|||
qw.like("supplierCode",query.getSupplierCode()); |
|||
} |
|||
IPage<SupplierInformation> page = PagerUtil.queryToPage(pq); |
|||
IPage<SupplierInformationVo> pagging = baseMapper.selectPageVo(page, qw); |
|||
PagerVo<SupplierInformationVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
public List<SupplierInformationVo> supplierList() { |
|||
return baseMapper.supplierList(); |
|||
} |
|||
public ResultBean save(SupplierInformationDto dto){ |
|||
ResultBean rb=new ResultBean(); |
|||
SupplierInformation entity=new SupplierInformation(); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.insert(entity); |
|||
return rb.success().setMsg("新增成功"); |
|||
} |
|||
public ResultBean update (SupplierInformationDto dto){ |
|||
ResultBean rb=new ResultBean(); |
|||
String dtoSid = dto.getSid(); |
|||
SupplierInformation entity=fetchBySid(dtoSid); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.updateById(entity); |
|||
return rb.success().setMsg("修改成功"); |
|||
} |
|||
public ResultBean getSupplierBySid(String sid){ |
|||
ResultBean rb=new ResultBean(); |
|||
SupplierInformation RawSupplierInformation=baseMapper.getSupplierBySid(sid); |
|||
return rb.success().setData(RawSupplierInformation); |
|||
} |
|||
public ResultBean del(String sid){ |
|||
ResultBean rb=new ResultBean(); |
|||
baseMapper.delete(new QueryWrapper<SupplierInformation>().eq("sid",sid)); |
|||
return rb.success().setMsg("删除成功"); |
|||
} |
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.yxt.supervise.cyf.app.sysuser; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import com.yxt.supervise.cyf.api.supplierinformation.SupplierInformation; |
|||
import com.yxt.supervise.cyf.api.supplierinformation.SupplierInformationVo; |
|||
import com.yxt.supervise.cyf.api.sysuser.SysUser; |
|||
import com.yxt.supervise.cyf.api.sysuser.SysUserVo; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.apache.ibatis.annotations.Select; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:37 |
|||
*/ |
|||
@Mapper |
|||
public interface CyfSysUserAppMapper extends BaseMapper<SysUser> { |
|||
IPage<SupplierInformationVo> selectPageVo(IPage<SupplierInformation> page, @Param(Constants.WRAPPER) Wrapper<SupplierInformation> qw); |
|||
@Select("select count(userName) as userName from sys_user where userName=#{userName} and password=#{password}") |
|||
SysUserVo getUser(@Param("userName")String userName, @Param("password")String password); |
|||
@Select("select * from supplier_information where sid=#{sid}") |
|||
SupplierInformation getSupplierBySid(@Param("sid")String sid); |
|||
} |
@ -0,0 +1,16 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.supervise.cyf.app.sysuser.CyfSysUserAppMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.supervise.cyf.api.supplierinformation.SupplierInformationVo"> |
|||
SELECT |
|||
* |
|||
FROM |
|||
supplier_information |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
|
|||
</mapper> |
@ -0,0 +1,52 @@ |
|||
package com.yxt.supervise.cyf.app.sysuser; |
|||
|
|||
import cn.dev33.satoken.stp.SaTokenInfo; |
|||
import cn.dev33.satoken.stp.StpUtil; |
|||
import cn.dev33.satoken.util.SaResult; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.supervise.cyf.api.sysuser.SysUser; |
|||
import com.yxt.supervise.cyf.api.sysuser.SysUserVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:38 |
|||
*/ |
|||
@Api(tags = "用户") |
|||
@RestController |
|||
@RequestMapping("cyf/app/sys") |
|||
public class CyfSysUserAppRest { |
|||
|
|||
@Autowired |
|||
CyfSysUserAppService sysUserService; |
|||
|
|||
@ApiOperation("登录") |
|||
@PostMapping("/doLogin") |
|||
public ResultBean doLogin(@RequestBody SysUser user) { |
|||
ResultBean rb=new ResultBean(); |
|||
SysUserVo sysUserVo=sysUserService.getUser(user.getUserName(), user.getPassword()); |
|||
if(sysUserVo.getUserName().equals("1")){ |
|||
SysUser sysUser=sysUserService.getSysUser(user.getUserName(), user.getPassword()); |
|||
StpUtil.login(sysUser.getId()); |
|||
SaTokenInfo tokenInfo = StpUtil.getTokenInfo(); |
|||
System.out.println(StpUtil.getTokenName()); |
|||
System.out.println(StpUtil.getTokenValue()); |
|||
return rb.success().setData(tokenInfo); |
|||
//return SaResult.ok("登录成功");
|
|||
} else if (sysUserVo.getUserName().equals("0")) { |
|||
return rb.setMsg("账户不存在或者密码不正确"); |
|||
} |
|||
return rb.setMsg("登录失败"); |
|||
} |
|||
@ApiOperation("根据id查询用户信息") |
|||
@GetMapping("/getUserById/{id}") |
|||
public ResultBean getUserById(@PathVariable String id) { |
|||
ResultBean rb=new ResultBean(); |
|||
SysUser sysUser=sysUserService.getUserById(id); |
|||
return rb.success().setData(sysUser); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.yxt.supervise.cyf.app.sysuser; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.supervise.cyf.api.sysuser.SysUser; |
|||
import com.yxt.supervise.cyf.api.sysuser.SysUserVo; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:37 |
|||
*/ |
|||
@Service |
|||
public class CyfSysUserAppService extends MybatisBaseService<CyfSysUserAppMapper, SysUser> { |
|||
|
|||
|
|||
|
|||
public SysUserVo getUser(String userName,String password){ |
|||
ResultBean rb=new ResultBean(); |
|||
SysUserVo sysUserVo=baseMapper.getUser(userName,password); |
|||
return sysUserVo; |
|||
} |
|||
public SysUser getSysUser(String userName,String password){ |
|||
return baseMapper.selectOne(new QueryWrapper<SysUser>().eq("userName",userName).eq("password",password)); |
|||
} |
|||
public SysUser getUserById(String id){ |
|||
return baseMapper.selectOne(new QueryWrapper<SysUser>().eq("id",id)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.yxt.supervise.cyf.biz.config; |
|||
|
|||
import cn.dev33.satoken.interceptor.SaInterceptor; |
|||
import cn.dev33.satoken.stp.StpUtil; |
|||
import org.springframework.context.annotation.Configuration; |
|||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry; |
|||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/16 14:43 |
|||
*/ |
|||
@Configuration |
|||
public class SaTokenConfigure implements WebMvcConfigurer { |
|||
|
|||
// 注册 Sa-Token 拦截器
|
|||
@Override |
|||
public void addInterceptors(InterceptorRegistry registry) { |
|||
// 注册 Sa-Token 拦截器,校验规则为 StpUtil.checkLogin() 登录校验。
|
|||
registry.addInterceptor(new SaInterceptor(handle -> StpUtil.checkLogin())) |
|||
.addPathPatterns("/**") |
|||
.excludePathPatterns("/cyf/sys/doLogin") |
|||
.excludePathPatterns("/cyf/app/sys/doLogin") |
|||
.excludePathPatterns("/cyf/appVersion/versioninfo"); |
|||
} |
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.yxt.supervise.cyf.biz.crudeoilpricerecord; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import com.yxt.supervise.cyf.api.crudeoilpricerecord.CrudeOilPriceRecord; |
|||
import com.yxt.supervise.cyf.api.crudeoilpricerecord.CrudeOilPriceRecordVo; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.apache.ibatis.annotations.Select; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:37 |
|||
*/ |
|||
@Mapper |
|||
public interface CrudeOilPriceRecordMapper extends BaseMapper<CrudeOilPriceRecord> { |
|||
IPage<CrudeOilPriceRecordVo> selectPageVo(IPage<CrudeOilPriceRecord> page, @Param(Constants.WRAPPER) Wrapper<CrudeOilPriceRecord> qw); |
|||
@Select("select * from crude_oil_price_record where typeSid=#{typeSid} order by createTime desc limit 1") |
|||
CrudeOilPriceRecord getCrudeByTypeSid(@Param("typeSid")String typeSid); |
|||
void insertCrudeOilFiles(List<Map<String, String>> maps); |
|||
} |
@ -0,0 +1,29 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.supervise.cyf.biz.crudeoilpricerecord.CrudeOilPriceRecordMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.supervise.cyf.api.crudeoilpricerecord.CrudeOilPriceRecordVo"> |
|||
SELECT |
|||
*,t.number as tankNumber,i.number as crudeNumber,i.name as crudeName,t.inventory as inventory, |
|||
s.supplierName as supplierName |
|||
FROM |
|||
crude_oil_storage c |
|||
left join tank_information t on t.sid=c.tankSid |
|||
left join crude_oil_type_information i on i.sid =t.crudeSid |
|||
left join supplier_information s on s.sid =c.supplierSid |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
<insert id="insertCrudeOilFiles"> |
|||
insert into crude_oil_storage_file (sid, url, mainSid) values |
|||
<foreach collection="list" item="item" index="index" separator=","> |
|||
( |
|||
#{item.sid,jdbcType=VARCHAR}, |
|||
#{item.url,jdbcType=VARCHAR}, |
|||
#{item.mainSid,jdbcType=VARCHAR} |
|||
) |
|||
</foreach> |
|||
</insert> |
|||
</mapper> |
@ -0,0 +1,39 @@ |
|||
package com.yxt.supervise.cyf.biz.crudeoilpricerecord; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.supervise.cyf.api.crudeoilpricerecord.CrudeOilPriceRecordDto; |
|||
import com.yxt.supervise.cyf.api.crudeoilpricerecord.CrudeOilPriceRecordQuery; |
|||
import com.yxt.supervise.cyf.api.crudeoilpricerecord.CrudeOilPriceRecordVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:38 |
|||
*/ |
|||
@Api(tags = "入库信息") |
|||
@RestController |
|||
@RequestMapping("cyf/crudeprice") |
|||
public class CrudeOilPriceRecordRest { |
|||
@Autowired |
|||
CrudeOilPriceRecordService CrudeOilPriceRecordService; |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<CrudeOilPriceRecordVo>> listPage(@RequestBody PagerQuery<CrudeOilPriceRecordQuery> pq) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerVo<CrudeOilPriceRecordVo> pv = CrudeOilPriceRecordService.listPageVo(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
@ApiOperation("新增") |
|||
@PostMapping("/save") |
|||
public ResultBean save (@RequestBody CrudeOilPriceRecordDto dto){ |
|||
return CrudeOilPriceRecordService.save(dto); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,67 @@ |
|||
package com.yxt.supervise.cyf.biz.crudeoilpricerecord; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.supervise.cyf.api.crudeoilpricerecord.CrudeOilPriceRecord; |
|||
import com.yxt.supervise.cyf.api.crudeoilpricerecord.CrudeOilPriceRecordDto; |
|||
import com.yxt.supervise.cyf.api.crudeoilpricerecord.CrudeOilPriceRecordQuery; |
|||
import com.yxt.supervise.cyf.api.crudeoilpricerecord.CrudeOilPriceRecordVo; |
|||
import com.yxt.supervise.cyf.api.tankinformation.TankInformation; |
|||
import com.yxt.supervise.cyf.biz.tankinformation.TankInformationMapper; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.*; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:37 |
|||
*/ |
|||
@Service |
|||
public class CrudeOilPriceRecordService extends MybatisBaseService<CrudeOilPriceRecordMapper, CrudeOilPriceRecord> { |
|||
@Autowired |
|||
TankInformationMapper tankInformationMapper; |
|||
|
|||
public PagerVo<CrudeOilPriceRecordVo> listPageVo(PagerQuery<CrudeOilPriceRecordQuery> pq) { |
|||
CrudeOilPriceRecordQuery query = pq.getParams(); |
|||
QueryWrapper<CrudeOilPriceRecord> qw = new QueryWrapper<>(); |
|||
IPage<CrudeOilPriceRecord> page = PagerUtil.queryToPage(pq); |
|||
IPage<CrudeOilPriceRecordVo> pagging = baseMapper.selectPageVo(page, qw); |
|||
PagerVo<CrudeOilPriceRecordVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
@Transactional |
|||
public ResultBean save(CrudeOilPriceRecordDto dto){ |
|||
|
|||
ResultBean rb=new ResultBean(); |
|||
CrudeOilPriceRecord entity=new CrudeOilPriceRecord(); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.insert(entity); |
|||
return rb.success().setMsg("新增成功"); |
|||
} |
|||
public ResultBean update (CrudeOilPriceRecordDto dto){ |
|||
ResultBean rb=new ResultBean(); |
|||
String dtoSid = dto.getSid(); |
|||
CrudeOilPriceRecord entity=fetchBySid(dtoSid); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.updateById(entity); |
|||
return rb.success().setMsg("修改成功"); |
|||
} |
|||
public CrudeOilPriceRecord getCrudeByTypeSid(String sid){ |
|||
CrudeOilPriceRecord CrudeOilPriceRecord=baseMapper.getCrudeByTypeSid(sid); |
|||
return CrudeOilPriceRecord; |
|||
} |
|||
public ResultBean del(String sid){ |
|||
ResultBean rb=new ResultBean(); |
|||
baseMapper.delete(new QueryWrapper<CrudeOilPriceRecord>().eq("sid",sid)); |
|||
return rb.success().setMsg("删除成功"); |
|||
} |
|||
} |
@ -0,0 +1,28 @@ |
|||
package com.yxt.supervise.cyf.biz.sysuser; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import com.yxt.supervise.cyf.api.supplierinformation.SupplierInformation; |
|||
import com.yxt.supervise.cyf.api.supplierinformation.SupplierInformationVo; |
|||
import com.yxt.supervise.cyf.api.sysuser.SysUser; |
|||
import com.yxt.supervise.cyf.api.sysuser.SysUserVo; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.apache.ibatis.annotations.Select; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:37 |
|||
*/ |
|||
@Mapper |
|||
public interface CyfSysUserMapper extends BaseMapper<SysUser> { |
|||
IPage<SupplierInformationVo> selectPageVo(IPage<SupplierInformation> page, @Param(Constants.WRAPPER) Wrapper<SupplierInformation> qw); |
|||
@Select("select count(userName) as userName from sys_user where userName=#{userName} and password=#{password}") |
|||
SysUserVo getUser(@Param("userName")String userName, @Param("password")String password); |
|||
@Select("select * from supplier_information where sid=#{sid}") |
|||
SupplierInformation getSupplierBySid(@Param("sid")String sid); |
|||
} |
@ -0,0 +1,16 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.supervise.cyf.biz.sysuser.CyfSysUserMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.supervise.cyf.api.supplierinformation.SupplierInformationVo"> |
|||
SELECT |
|||
* |
|||
FROM |
|||
supplier_information |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
|
|||
</mapper> |
@ -0,0 +1,56 @@ |
|||
package com.yxt.supervise.cyf.biz.sysuser; |
|||
|
|||
import cn.dev33.satoken.stp.SaTokenInfo; |
|||
import cn.dev33.satoken.stp.StpUtil; |
|||
import cn.dev33.satoken.util.SaResult; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.supervise.cyf.api.sysuser.SysUser; |
|||
import com.yxt.supervise.cyf.api.sysuser.SysUserVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:38 |
|||
*/ |
|||
@Api(tags = "用户") |
|||
@RestController |
|||
@RequestMapping("cyf/sys") |
|||
public class CyfSysUserRest { |
|||
|
|||
@Autowired |
|||
CyfSysUserService sysUserService; |
|||
|
|||
@ApiOperation("登录") |
|||
@PostMapping("/doLogin") |
|||
public ResultBean doLogin(@RequestBody SysUser user) { |
|||
ResultBean rb =new ResultBean(); |
|||
SysUserVo sysUserVo=sysUserService.getUser(user.getUserName(), user.getPassword()); |
|||
if(sysUserVo.getUserName().equals("1")){ |
|||
SysUser sysUser=sysUserService.getSysUser(user.getUserName(), user.getPassword()); |
|||
StpUtil.login(sysUser.getId()); |
|||
SaTokenInfo tokenInfo = StpUtil.getTokenInfo(); |
|||
System.out.println(StpUtil.getTokenName()); |
|||
System.out.println(StpUtil.getTokenValue()); |
|||
return rb.success().setData(tokenInfo); |
|||
//return SaResult.ok("登录成功");
|
|||
} else if (sysUserVo.getUserName().equals("0")) { |
|||
return rb.setMsg("账户不存在或者密码不正确"); |
|||
} |
|||
return rb.setMsg("登录失败"); |
|||
} |
|||
@ApiOperation("根据id查询用户信息") |
|||
@GetMapping("/getUserById/{id}") |
|||
public ResultBean getUserById(@PathVariable String id) { |
|||
ResultBean rb=new ResultBean(); |
|||
SysUser sysUser=sysUserService.getUserById(id); |
|||
return rb.success().setData(sysUser); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,32 @@ |
|||
package com.yxt.supervise.cyf.biz.sysuser; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.supervise.cyf.api.supplierinformation.SupplierInformation; |
|||
import com.yxt.supervise.cyf.api.sysuser.SysUser; |
|||
import com.yxt.supervise.cyf.api.sysuser.SysUserVo; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/5/4 14:37 |
|||
*/ |
|||
@Service |
|||
public class CyfSysUserService extends MybatisBaseService<CyfSysUserMapper, SysUser> { |
|||
|
|||
|
|||
|
|||
public SysUserVo getUser(String userName,String password){ |
|||
ResultBean rb=new ResultBean(); |
|||
SysUserVo sysUserVo=baseMapper.getUser(userName,password); |
|||
return sysUserVo; |
|||
} |
|||
public SysUser getSysUser(String userName,String password){ |
|||
return baseMapper.selectOne(new QueryWrapper<SysUser>().eq("userName",userName).eq("password",password)); |
|||
} |
|||
public SysUser getUserById(String id){ |
|||
return baseMapper.selectOne(new QueryWrapper<SysUser>().eq("id",id)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,418 @@ |
|||
package com.yxt.supervise.cyf.util; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFilter; |
|||
import com.fasterxml.jackson.core.JsonParseException; |
|||
import com.fasterxml.jackson.core.JsonProcessingException; |
|||
import com.fasterxml.jackson.core.type.TypeReference; |
|||
import com.fasterxml.jackson.databind.*; |
|||
import com.fasterxml.jackson.databind.ser.FilterProvider; |
|||
import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter; |
|||
import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider; |
|||
import com.google.common.collect.Lists; |
|||
import com.google.common.collect.Maps; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import net.sf.json.JsonConfig; |
|||
import net.sf.json.util.PropertyFilter; |
|||
import org.springframework.core.annotation.AnnotationUtils; |
|||
import org.springframework.util.StringUtils; |
|||
|
|||
import java.io.IOException; |
|||
import java.io.OutputStream; |
|||
import java.text.SimpleDateFormat; |
|||
import java.util.*; |
|||
|
|||
/** |
|||
* json对象映射工具类之jackson封装 |
|||
*/ |
|||
@Slf4j |
|||
public class JsonUtils { |
|||
|
|||
private static ObjectMapper objectMapper = null; |
|||
|
|||
static { |
|||
objectMapper = new ObjectMapper(); |
|||
// 设置默认日期格式
|
|||
objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")); |
|||
// 提供其它默认设置
|
|||
objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); |
|||
objectMapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); |
|||
objectMapper.setFilters(new SimpleFilterProvider() |
|||
.setFailOnUnknownId(false)); |
|||
objectMapper.registerModule(new MyModule()); |
|||
} |
|||
|
|||
/** |
|||
* 将对象转换成json字符串格式(默认将转换所有的属性) |
|||
* |
|||
* @param value |
|||
* @return |
|||
*/ |
|||
public static String toJsonStr(Object value) { |
|||
try { |
|||
return objectMapper.writeValueAsString(value); |
|||
} catch (JsonProcessingException e) { |
|||
log.error("Json转换失败", e); |
|||
throw new RuntimeException(e); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 将对象转换成json字符串格式 |
|||
* |
|||
* @param value 需要转换的对象 |
|||
* @param properties 需要转换的属性 |
|||
*/ |
|||
public static String toJsonStr(Object value, String[] properties) { |
|||
try { |
|||
SimpleBeanPropertyFilter sbp = SimpleBeanPropertyFilter |
|||
.filterOutAllExcept(properties); |
|||
FilterProvider filterProvider = new SimpleFilterProvider() |
|||
.addFilter("propertyFilterMixIn", sbp); |
|||
return objectMapper.writer(filterProvider) |
|||
.writeValueAsString(value); |
|||
} catch (Exception e) { |
|||
log.error("Json转换失败", e); |
|||
throw new RuntimeException(e); |
|||
} |
|||
|
|||
} |
|||
|
|||
/** |
|||
* 将对象转换成json字符串格式 |
|||
* |
|||
* @param value 需要转换的对象 |
|||
* @param properties2Exclude 需要排除的属性 |
|||
*/ |
|||
public static String toJsonStrWithExcludeProperties(Object value, |
|||
String[] properties2Exclude) { |
|||
try { |
|||
SimpleBeanPropertyFilter sbp = SimpleBeanPropertyFilter |
|||
.serializeAllExcept(properties2Exclude); |
|||
FilterProvider filterProvider = new SimpleFilterProvider() |
|||
.addFilter("propertyFilterMixIn", sbp); |
|||
return objectMapper.writer(filterProvider) |
|||
.writeValueAsString(value); |
|||
} catch (Exception e) { |
|||
log.error("Json转换失败", e); |
|||
throw new RuntimeException(e); |
|||
} |
|||
|
|||
} |
|||
|
|||
/** |
|||
* 将对象json格式直接写出到流对象中(默认将转换所有的属性) |
|||
* |
|||
* @param out |
|||
* @return |
|||
*/ |
|||
public static void writeJsonStr(OutputStream out, Object value) { |
|||
try { |
|||
objectMapper.writeValue(out, value); |
|||
} catch (Exception e) { |
|||
log.error("Json转换失败", e); |
|||
throw new RuntimeException(e); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 将对象json格式直接写出到流对象中 |
|||
* |
|||
* @param value 需要转换的对象(注意,需要在要转换的对象中定义JsonFilter注解) |
|||
* @param properties 需要转换的属性 |
|||
*/ |
|||
public static void writeJsonStr(OutputStream out, Object value, |
|||
String[] properties) { |
|||
|
|||
try { |
|||
objectMapper.writer( |
|||
new SimpleFilterProvider().addFilter( |
|||
AnnotationUtils |
|||
.getValue( |
|||
AnnotationUtils.findAnnotation( |
|||
value.getClass(), |
|||
JsonFilter.class)) |
|||
.toString(), SimpleBeanPropertyFilter |
|||
.filterOutAllExcept(properties))) |
|||
.writeValue(out, value); |
|||
} catch (Exception e) { |
|||
log.error("Json转换失败", e); |
|||
throw new RuntimeException(e); |
|||
} |
|||
|
|||
} |
|||
|
|||
/** |
|||
* 将对象转换成json字符串格式 |
|||
* |
|||
* @param value 需要转换的对象 |
|||
* @param properties2Exclude 需要排除的属性(注意,需要在要转换的对象中定义JsonFilter注解) |
|||
*/ |
|||
public static void writeJsonStrWithExcludeProperties(OutputStream out, |
|||
Object value, String[] properties2Exclude) { |
|||
try { |
|||
objectMapper.writer( |
|||
new SimpleFilterProvider().addFilter( |
|||
AnnotationUtils |
|||
.getValue( |
|||
AnnotationUtils.findAnnotation( |
|||
value.getClass(), |
|||
JsonFilter.class)) |
|||
.toString(), SimpleBeanPropertyFilter |
|||
.serializeAllExcept(properties2Exclude))) |
|||
.writeValue(out, value); |
|||
} catch (Exception e) { |
|||
log.error("Json转换失败", e); |
|||
throw new RuntimeException(e); |
|||
} |
|||
|
|||
} |
|||
|
|||
/** |
|||
* 反序列化POJO或简单Collection如List<String>. |
|||
* <p> |
|||
* 如果JSON字符串为Null或"null"字符串, 返回Null. 如果JSON字符串为"[]", 返回空集合. |
|||
* <p> |
|||
* 如需反序列化复杂Collection如List<MyBean>, 请使用fromJson(String, JavaType) |
|||
*/ |
|||
public static <T> T fromJson(String jsonString, Class<T> clazz) { |
|||
if (StringUtils.isEmpty(jsonString)) { |
|||
return null; |
|||
} |
|||
|
|||
try { |
|||
return objectMapper.readValue(jsonString, clazz); |
|||
} catch (IOException e) { |
|||
log.warn("parse json string error:" + jsonString, e); |
|||
return null; |
|||
} |
|||
} |
|||
|
|||
@SuppressWarnings({"unchecked", "unused"}) |
|||
public static List<Object> readJsonList(String jsondata, Object object) { |
|||
try { |
|||
List<LinkedHashMap<String, Object>> list = objectMapper.readValue( |
|||
jsondata, List.class); |
|||
|
|||
List<Object> objects = Lists.newArrayList(); |
|||
System.out.println(list.size()); |
|||
for (int i = 0; i < list.size(); i++) { |
|||
Map<String, Object> map = list.get(i); |
|||
Set<String> set = map.keySet(); |
|||
for (Iterator<String> it = set.iterator(); it.hasNext(); ) { |
|||
String key = it.next(); |
|||
System.out.println(key + ":" + map.get(key)); |
|||
} |
|||
} |
|||
} catch (JsonParseException e) { |
|||
e.printStackTrace(); |
|||
} catch (JsonMappingException e) { |
|||
e.printStackTrace(); |
|||
} catch (IOException e) { |
|||
e.printStackTrace(); |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 单独解析某一个json的key值 |
|||
* |
|||
* @param @param jsonText |
|||
* @param @param key |
|||
* @param @return 设定文件 |
|||
* @return JsonNode 返回类型 |
|||
* @throws |
|||
* @Title: getjsonvalue |
|||
* @Description: TODO(这里用一句话描述这个方法的作用) |
|||
*/ |
|||
public static JsonNode getjsonvalue(String jsonText, String key) { |
|||
|
|||
try { |
|||
ObjectMapper mapper = new ObjectMapper(); |
|||
JsonNode rootNode = mapper.readTree(jsonText); // 读取Json
|
|||
|
|||
return rootNode.path(key); |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
|
|||
public static JavaType getCollectionType(Class<?> collectionClass, Class<?>... elementClasses) { |
|||
ObjectMapper mapper = new ObjectMapper(); |
|||
return mapper.getTypeFactory().constructParametricType(collectionClass, elementClasses); |
|||
} |
|||
|
|||
public static <T> List<T> json2list(String jsonArrayStr, Class<T> clazz) throws Exception { |
|||
List<Map<String, Object>> list = (List) objectMapper.readValue(jsonArrayStr, new TypeReference<List<T>>() { |
|||
}); |
|||
List<T> result = new ArrayList(); |
|||
Iterator var4 = list.iterator(); |
|||
|
|||
while (var4.hasNext()) { |
|||
Map<String, Object> map = (Map) var4.next(); |
|||
result.add(map2pojo(map, clazz)); |
|||
} |
|||
|
|||
return result; |
|||
} |
|||
|
|||
public static <T> T map2pojo(Map map, Class<T> clazz) { |
|||
return objectMapper.convertValue(map, clazz); |
|||
} |
|||
|
|||
/** |
|||
* 解析json属性,放到实体里面去 |
|||
* |
|||
* @param @param jsondata |
|||
* @param @param collectionClass |
|||
* @param @return 设定文件 |
|||
* @return List<SpecVO> 返回类型 |
|||
* @throws |
|||
* @Title: readJsonList |
|||
* @Description: TODO(这里用一句话描述这个方法的作用) |
|||
*/ |
|||
@SuppressWarnings("unchecked") |
|||
public static List<Object> readJsonList(String jsondata, Class<?> collectionClass) { |
|||
try { |
|||
ObjectMapper mapper = new ObjectMapper(); |
|||
JavaType javaType = getCollectionType(ArrayList.class, collectionClass); |
|||
List<Object> lst = (List<Object>) mapper.readValue(jsondata, javaType); |
|||
|
|||
return lst; |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
|
|||
/** |
|||
* json 转map |
|||
* |
|||
* @param @param jsondata |
|||
* @param @return 设定文件 |
|||
* @return Map<String, Map < String, Object>> 返回类型 |
|||
* @throws |
|||
* @Title: readJsonMap |
|||
* @Description: TODO(这里用一句话描述这个方法的作用) |
|||
*/ |
|||
@SuppressWarnings("unchecked") |
|||
public static Map<String, Object> readJsonToMap(String jsondata) { |
|||
try { |
|||
Map<String, Object> maps = objectMapper.readValue(jsondata, Map.class); |
|||
//System.out.println(maps);
|
|||
return maps; |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
@SuppressWarnings("unchecked") |
|||
public static Map<String, Object> readJsonToMap1(String jsondata) { |
|||
try { |
|||
Map<String, Object> maps = objectMapper.readValue(jsondata, Map.class); |
|||
//System.out.println(maps);
|
|||
return maps; |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 设置过滤值为空的属性,使得生成的 json 字符串只包含非空的值 |
|||
* |
|||
* @return |
|||
*/ |
|||
public static JsonConfig getJsonConfig() { |
|||
JsonConfig jsonConfig = new JsonConfig(); |
|||
jsonConfig.registerJsonValueProcessor(java.sql.Timestamp.class, new JsonValueProcessorImpl()); |
|||
jsonConfig.setJsonPropertyFilter(new PropertyFilter() { |
|||
@Override |
|||
public boolean apply(Object source, String name, Object value) { |
|||
return value == null; |
|||
} |
|||
}); |
|||
|
|||
jsonConfig.setIgnoreDefaultExcludes(false); // 设置默认忽略
|
|||
jsonConfig.setExcludes(new String[]{"dbName", "isDel"}); // 此处是亮点,只要将所需忽略字段加到数组中即可,在实际测试中,我发现在所返回数组中,存在大量无用属性,
|
|||
|
|||
return jsonConfig; |
|||
} |
|||
|
|||
/** |
|||
* 将对象转换成json字符串。 |
|||
*/ |
|||
public static String objectToJson(Object data) { |
|||
try { |
|||
String string = objectMapper.writeValueAsString(data); |
|||
return string; |
|||
} catch (JsonProcessingException e) { |
|||
e.printStackTrace(); |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
/** |
|||
* 将json结果集转化为对象 |
|||
* |
|||
* @param jsonData json数据 |
|||
* @param beanType 对象中的object类型 |
|||
*/ |
|||
public static <T> T jsonToPojo(String jsonData, Class<T> beanType) { |
|||
try { |
|||
if (ValidatorUtils.notEmpty(jsonData)) { |
|||
T t = objectMapper.readValue(jsonData, beanType); |
|||
return t; |
|||
} |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
/** |
|||
* 将json数据转换成pojo对象list |
|||
*/ |
|||
public static <T> List<T> jsonToList(String jsonData, Class<T> beanType) { |
|||
JavaType javaType = objectMapper.getTypeFactory().constructParametricType(List.class, beanType); |
|||
try { |
|||
List<T> list = objectMapper.readValue(jsonData, javaType); |
|||
return list; |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
} |
|||
|
|||
return null; |
|||
} |
|||
|
|||
public static void main(String[] args) { |
|||
Map<String, Object> userData = Maps.newHashMap(); |
|||
Map<String, Object> nameStruct = Maps.newHashMap(); |
|||
nameStruct.put("firstName", "张三"); |
|||
nameStruct.put("lastName", "你大爷"); |
|||
|
|||
System.out.println(JsonUtils.toJsonStr(nameStruct)); |
|||
userData.put("name", nameStruct); |
|||
userData.put("age", 20); |
|||
List<String> stringList = Lists.newArrayList("A", "B", "C"); |
|||
System.out.println(JsonUtils.toJsonStr(userData)); |
|||
System.out.println(JsonUtils.toJsonStr(stringList)); |
|||
// String[] arr = {"37","38","41","42","43","44","45","1693","1694","1695","1696"};
|
|||
// System.out.println(toJsonStr(arr));
|
|||
|
|||
String ss = "{\"address\": \"address2\",\"name\":\"haha2\"}"; |
|||
|
|||
Map<String, Object> map = readJsonToMap(ss); |
|||
|
|||
if (map != null) { |
|||
System.out.println(map.get("address")); |
|||
} |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,49 @@ |
|||
/** |
|||
* |
|||
*/ |
|||
package com.yxt.supervise.cyf.util; |
|||
|
|||
|
|||
import net.sf.json.JsonConfig; |
|||
import net.sf.json.processors.JsonValueProcessor; |
|||
|
|||
import java.text.SimpleDateFormat; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* <p>Title: JsonValueProcessorImpl.java</p> |
|||
* <p>Description: net.js.json 特殊值处理</p> |
|||
* <p>Copyright: Copyright (c) 2014-2018</p> |
|||
* <p>Company: leimingtech.com</p> |
|||
* |
|||
* @author linjm |
|||
* @version 1.0 |
|||
* @date 2015年7月17日 |
|||
*/ |
|||
public class JsonValueProcessorImpl implements JsonValueProcessor { |
|||
|
|||
private String format = "yyyy-MM-dd HH:mm:ss"; |
|||
|
|||
@Override |
|||
public Object processArrayValue(Object value, JsonConfig jsonConfig) { |
|||
String[] obj = {}; |
|||
if (value instanceof Date[]) { |
|||
SimpleDateFormat sdf = new SimpleDateFormat(format); |
|||
Date[] date = (Date[]) value; |
|||
for (int i = 0; i < date.length; i++) { |
|||
obj[i] = sdf.format(date[i]); |
|||
} |
|||
} |
|||
return obj; |
|||
} |
|||
|
|||
@Override |
|||
public Object processObjectValue(String key, Object value, JsonConfig jsonConfig) { |
|||
if (value instanceof Date) { |
|||
String str = new SimpleDateFormat(format).format(value); |
|||
return str; |
|||
} |
|||
return value.toString(); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,10 @@ |
|||
package com.yxt.supervise.cyf.util; |
|||
|
|||
import com.fasterxml.jackson.databind.module.SimpleModule; |
|||
|
|||
public class MyModule extends SimpleModule { |
|||
@Override |
|||
public void setupModule(SetupContext context) { |
|||
context.setMixInAnnotations(Object.class, PropertyFilterMixIn.class); |
|||
} |
|||
} |
@ -0,0 +1,8 @@ |
|||
package com.yxt.supervise.cyf.util; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFilter; |
|||
|
|||
@JsonFilter("propertyFilterMixIn") |
|||
public class PropertyFilterMixIn { |
|||
|
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.yxt.supervise.cyf.util; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
public class TimeSecound implements Serializable { |
|||
long days;//天
|
|||
long hours; //小时
|
|||
long mins; //分钟
|
|||
long sc; //秒
|
|||
|
|||
public TimeSecound() { |
|||
} |
|||
|
|||
public TimeSecound(long days, long hours, long mins, long sc) { |
|||
this.days = days; |
|||
this.hours = hours; |
|||
this.mins = mins; |
|||
this.sc = sc; |
|||
} |
|||
} |
@ -0,0 +1,200 @@ |
|||
package com.yxt.supervise.cyf.util; |
|||
|
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Collection; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.regex.Matcher; |
|||
import java.util.regex.Pattern; |
|||
|
|||
public class ValidatorUtils { |
|||
|
|||
/** |
|||
* 判断内容不为空 |
|||
* |
|||
* @param str |
|||
* @return |
|||
*/ |
|||
public static boolean notEmpty(Object str) { |
|||
if (str != null && str.toString().trim().length() > 0) { |
|||
return true; |
|||
} else { |
|||
return false; |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 判断内容不为空(包含数组) |
|||
* |
|||
* @param str |
|||
* @return |
|||
*/ |
|||
@SuppressWarnings("unchecked") |
|||
public static boolean notEmptyIncludeArray(Object str) { |
|||
if (str != null && String.valueOf(str).trim().length() > 0) { |
|||
if (str instanceof Object[]) {// 增加了数组长度判断
|
|||
Object[] array = (Object[]) str; |
|||
if (array.length > 0) |
|||
return true; |
|||
|
|||
return false; |
|||
} else if (str instanceof List<?>) {// 增加了数组长度判断
|
|||
List<Object> list = (List<Object>) str; |
|||
if (list.size() > 0) |
|||
return true; |
|||
|
|||
return false; |
|||
} |
|||
|
|||
return true; |
|||
} else { |
|||
return false; |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 判断内容是空 |
|||
* |
|||
* @param str |
|||
* @return |
|||
*/ |
|||
public static boolean isEmpty(Object str) { |
|||
if (str == null || str.toString().trim().length() == 0) { |
|||
return true; |
|||
} else { |
|||
return false; |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 检查对象是否为空 |
|||
* |
|||
* @param obj 要检查的数据(数据类型: String、Number、Boolean、Collection、Map、Object[]) |
|||
* @return true: 为空; false: 不为空 <li>String:值为 null、""、"0" 时返回 true <li> |
|||
* Number:值为 null、0 时返回 true <li>Boolean:值为 null、false 时返回 true <li> |
|||
* Collection:值为 null、size=0 时返回 true <li>Map:值为 null、size=0 时返回 |
|||
* true <li>Object[]:值为 null、length=0 时返回 true |
|||
*/ |
|||
@SuppressWarnings("unchecked") |
|||
public static boolean empty(Object obj) { |
|||
if (obj == null) { |
|||
return true; |
|||
} else if (obj instanceof String && (obj.equals(""))) { |
|||
return true; |
|||
} else if (obj instanceof Number && ((Number) obj).doubleValue() == 0) { |
|||
return true; |
|||
} else if (obj instanceof Boolean && !((Boolean) obj)) { |
|||
return true; |
|||
} else if (obj instanceof Collection && ((Collection) obj).isEmpty()) { |
|||
return true; |
|||
} else if (obj instanceof Map && ((Map) obj).isEmpty()) { |
|||
return true; |
|||
} else if (obj instanceof Object[] && ((Object[]) obj).length == 0) { |
|||
return true; |
|||
} |
|||
return false; |
|||
} |
|||
|
|||
/** |
|||
* 判断是否是合法邮箱地址 |
|||
* |
|||
* @param email |
|||
* @return |
|||
*/ |
|||
public static boolean isEmail(String email) { |
|||
Pattern p = Pattern |
|||
.compile("^\\w+([\\-+.]\\w+)*@\\w+([-.]\\w+)*\\.[a-z]{2,3}"); |
|||
Matcher m = p.matcher(email); |
|||
return m.matches(); |
|||
} |
|||
|
|||
/** |
|||
* 只包含英文字母和数字、下划线 |
|||
* |
|||
* @param str |
|||
* @return |
|||
*/ |
|||
public static boolean onlyNumAndChar(String str) { |
|||
String regex = "^[a-zA-Z0-9_]+$"; |
|||
Pattern pattern = Pattern.compile(regex); |
|||
return pattern.matcher(str).matches(); |
|||
} |
|||
|
|||
/** |
|||
* 必须包含字母 |
|||
* |
|||
* @param str |
|||
* @return |
|||
*/ |
|||
public static boolean hasLetterAndNum(String str) { |
|||
Pattern pattern = Pattern.compile("^(?=.*[a-zA-Z].*).{6,}$"); |
|||
return pattern.matcher(str).matches(); |
|||
} |
|||
|
|||
/** |
|||
* 是否长度符合 |
|||
* |
|||
* @param str |
|||
* @param min 最小 |
|||
* @param max 最大 |
|||
* @return |
|||
*/ |
|||
public static boolean lengthBetween(String str, int min, int max) { |
|||
return str.length() >= min && str.length() <= max; |
|||
} |
|||
|
|||
/** |
|||
* 判断字符串是否是数字 |
|||
* |
|||
* @param str |
|||
* @return |
|||
*/ |
|||
public static boolean isNumeric(String str) { |
|||
Pattern pattern = Pattern.compile("[0-9]*"); |
|||
Matcher isNum = pattern.matcher(str); |
|||
if (!isNum.matches()) { |
|||
return false; |
|||
} |
|||
return true; |
|||
} |
|||
|
|||
public static Double rountTwo(Double num) { |
|||
if (num != null) { |
|||
BigDecimal b = new BigDecimal(num); |
|||
Double d = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); |
|||
return d; |
|||
} else { |
|||
return null; |
|||
} |
|||
} |
|||
|
|||
public static String doubleTrans(double d) { |
|||
if (Math.round(d) - d == 0) { |
|||
return String.valueOf((long) d); |
|||
} |
|||
return String.valueOf(d); |
|||
} |
|||
|
|||
/** |
|||
* 获取结束时间与当前的时间差 |
|||
* |
|||
* @param endTime |
|||
* @return |
|||
*/ |
|||
public static TimeSecound getTimeSecound(Date endTime) { |
|||
|
|||
long diff = endTime.getTime() - System.currentTimeMillis();// 这样得到的差值是微秒级别
|
|||
|
|||
long days = diff / (1000 * 60 * 60 * 24);//天
|
|||
|
|||
long hours = (diff - days * (1000 * 60 * 60 * 24)) |
|||
/ (1000 * 60 * 60); //小时
|
|||
long mins = (diff - days * (1000 * 60 * 60 * 24) - hours * (1000 * 60 * 60)) / (1000 * 60); //小时
|
|||
long sc = (diff - days * (1000 * 60 * 60 * 24) - hours |
|||
* (1000 * 60 * 60) - mins * (1000 * 60)) / (1000); // 秒
|
|||
|
|||
return new TimeSecound(days, hours, mins, sc); |
|||
} |
|||
} |
After Width: | Height: | Size: 130 KiB |
@ -1,369 +1,371 @@ |
|||
<template> |
|||
<div :class="{'has-logo':showLogo}"> |
|||
<div :class="{ 'has-logo': showLogo }"> |
|||
<logo v-if="showLogo" :collapse="isCollapse" /> |
|||
<el-scrollbar wrap-class="scrollbar-wrapper"> |
|||
<el-menu :default-active="activeMenu" :background-color="variables.menuBg" :text-color="variables.menuText" |
|||
:unique-opened="false" :active-text-color="variables.menuActiveText" :collapse-transition="false" |
|||
mode="vertical"> |
|||
<sidebar-item v-for="route in routes" :key="route.path" :item="route" :base-path="route.path" /> |
|||
<el-menu |
|||
:default-active="$route.path" |
|||
:background-color="variables.menuBg" |
|||
:text-color="variables.menuText" |
|||
:unique-opened="false" |
|||
:active-text-color="variables.menuActiveText" |
|||
:collapse-transition="false" |
|||
mode="vertical" |
|||
> |
|||
<sidebar-item |
|||
v-for="route in routes" |
|||
:key="route.path" |
|||
:item="route" |
|||
:base-path="route.path" |
|||
/> |
|||
</el-menu> |
|||
</el-scrollbar> |
|||
</div> |
|||
|
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
mapGetters |
|||
} from 'vuex' |
|||
import Logo from './Logo' |
|||
import SidebarItem from './SidebarItem' |
|||
import variables from '@/styles/variables.scss' |
|||
import { |
|||
getrolemenus, |
|||
loginDetails |
|||
} from '@/api/system/Role/role.js' |
|||
import { |
|||
getStorage |
|||
} from '@/utils/auth' |
|||
export default { |
|||
components: { |
|||
SidebarItem, |
|||
Logo |
|||
}, |
|||
data() { |
|||
return { |
|||
YongHuid: [], |
|||
// routes: [], |
|||
params: { |
|||
sourceSid: '9d048c07-7677-4774-9177-aa02b049ff06', |
|||
userSid: '', |
|||
}, |
|||
routes: [ |
|||
{ |
|||
alwaysShow: true, |
|||
component: 'supervise', |
|||
meta: { |
|||
icon: "el-icon-menu", |
|||
title: "库房登记" |
|||
}, |
|||
name: "", |
|||
path: "/supervise", |
|||
children: [{ |
|||
alwaysShow: true, |
|||
component: 'index', |
|||
meta: { |
|||
icon: "el-icon-help", |
|||
title: "油罐库存登记" |
|||
}, |
|||
name: "/supervise/recordOilTank", |
|||
path: "/supervise/recordOilTank", |
|||
import { mapGetters } from "vuex"; |
|||
import Logo from "./Logo"; |
|||
import SidebarItem from "./SidebarItem"; |
|||
import variables from "@/styles/variables.scss"; |
|||
import { getrolemenus, loginDetails } from "@/api/system/Role/role.js"; |
|||
import { getStorage } from "@/utils/auth"; |
|||
export default { |
|||
components: { |
|||
SidebarItem, |
|||
Logo, |
|||
}, |
|||
data() { |
|||
return { |
|||
YongHuid: [], |
|||
// routes: [], |
|||
params: { |
|||
sourceSid: "9d048c07-7677-4774-9177-aa02b049ff06", |
|||
userSid: "", |
|||
}, |
|||
routes: [ |
|||
{ |
|||
alwaysShow: true, |
|||
component: "supervise", |
|||
meta: { |
|||
icon: "el-icon-menu", |
|||
title: "库房登记", |
|||
}, |
|||
name: "", |
|||
path: "/supervise", |
|||
children: [ |
|||
{ |
|||
alwaysShow: true, |
|||
component: "index", |
|||
meta: { |
|||
icon: "el-icon-help", |
|||
title: "油罐库存登记", |
|||
}, |
|||
{ |
|||
alwaysShow: true, |
|||
component: 'index', |
|||
meta: { |
|||
icon: "el-icon-help", |
|||
title: "原油入库登记" |
|||
}, |
|||
name: "/supervise/oilTypeInBound", |
|||
path: "/supervise/oilTypeInBound", |
|||
name: "/supervise/recordOilTank", |
|||
path: "/supervise/recordOilTank", |
|||
}, |
|||
{ |
|||
alwaysShow: true, |
|||
component: "index", |
|||
meta: { |
|||
icon: "el-icon-help", |
|||
title: "原油入库登记", |
|||
}, |
|||
{ |
|||
alwaysShow: true, |
|||
component: 'index', |
|||
meta: { |
|||
icon: "el-icon-help", |
|||
title: "原油出库登记" |
|||
}, |
|||
name: "/supervise/oilTypeOutBound", |
|||
path: "/supervise/oilTypeOutBound", |
|||
name: "/supervise/oilTypeInBound", |
|||
path: "/supervise/oilTypeInBound", |
|||
}, |
|||
{ |
|||
alwaysShow: true, |
|||
component: "index", |
|||
meta: { |
|||
icon: "el-icon-help", |
|||
title: "原油出库登记", |
|||
}, |
|||
] |
|||
name: "/supervise/oilTypeOutBound", |
|||
path: "/supervise/oilTypeOutBound", |
|||
}, |
|||
], |
|||
}, |
|||
{ |
|||
alwaysShow: true, |
|||
component: "inventory", |
|||
meta: { |
|||
icon: "el-icon-menu", |
|||
title: "库存管理", |
|||
}, |
|||
{ |
|||
alwaysShow: true, |
|||
component: 'inventory', |
|||
meta: { |
|||
icon: "el-icon-menu", |
|||
title: "库存管理" |
|||
name: "", |
|||
path: "/inventory", |
|||
children: [ |
|||
{ |
|||
alwaysShow: true, |
|||
component: "index", |
|||
meta: { |
|||
icon: "el-icon-help", |
|||
title: "油罐库存记录", |
|||
}, |
|||
name: "/inventory/oilTankList", |
|||
path: "/inventory/oilTankList", |
|||
}, |
|||
name: "", |
|||
path: "/inventory", |
|||
children: [ |
|||
{ |
|||
alwaysShow: true, |
|||
component: 'index', |
|||
meta: { |
|||
icon: "el-icon-help", |
|||
title: "油罐库存记录" |
|||
}, |
|||
name: "/inventory/oilTankList", |
|||
path: "/inventory/oilTankList", |
|||
},{ |
|||
alwaysShow: true, |
|||
component: 'index', |
|||
meta: { |
|||
icon: "el-icon-help", |
|||
title: "原油入库记录" |
|||
}, |
|||
name: "/inventory/oilTypeInBoundList", |
|||
path: "/inventory/oilTypeInBoundList", |
|||
{ |
|||
alwaysShow: true, |
|||
component: "index", |
|||
meta: { |
|||
icon: "el-icon-help", |
|||
title: "原油入库记录", |
|||
}, |
|||
{ |
|||
alwaysShow: true, |
|||
component: 'index', |
|||
meta: { |
|||
icon: "el-icon-help", |
|||
title: "原油出库记录" |
|||
}, |
|||
name: "/inventory/oilTypeOutBoundList", |
|||
path: "/inventory/oilTypeOutBoundList", |
|||
name: "/inventory/oilTypeInBoundList", |
|||
path: "/inventory/oilTypeInBoundList", |
|||
}, |
|||
{ |
|||
alwaysShow: true, |
|||
component: "index", |
|||
meta: { |
|||
icon: "el-icon-help", |
|||
title: "原油出库记录", |
|||
}, |
|||
] |
|||
|
|||
name: "/inventory/oilTypeOutBoundList", |
|||
path: "/inventory/oilTypeOutBoundList", |
|||
}, |
|||
], |
|||
}, |
|||
{ |
|||
alwaysShow: true, |
|||
component: "baseInfo", |
|||
meta: { |
|||
icon: "el-icon-menu", |
|||
title: "基础信息", |
|||
}, |
|||
{ |
|||
name: "", |
|||
path: "/baseInfo", |
|||
children: [ |
|||
{ |
|||
alwaysShow: true, |
|||
component: 'baseInfo', |
|||
component: "index", |
|||
meta: { |
|||
icon: "el-icon-menu", |
|||
title: "基础信息" |
|||
icon: "el-icon-help", |
|||
title: "物料类型", |
|||
}, |
|||
name: "", |
|||
path: "/baseInfo", |
|||
children: [{ |
|||
alwaysShow: true, |
|||
component: 'index', |
|||
meta: { |
|||
icon: "el-icon-help", |
|||
title: "物料类型" |
|||
}, |
|||
name: "/baseInfo/materialType", |
|||
path: "/baseInfo/materialType", |
|||
}, |
|||
{ |
|||
alwaysShow: true, |
|||
component: 'index', |
|||
meta: { |
|||
icon: "el-icon-help", |
|||
title: "物料信息" |
|||
}, |
|||
name: "/baseInfo/materialInfo", |
|||
path: "/baseInfo/materialInfo", |
|||
}, |
|||
{ |
|||
alwaysShow: true, |
|||
component: 'index', |
|||
meta: { |
|||
icon: "el-icon-help", |
|||
title: "原油类型" |
|||
}, |
|||
name: "/baseInfo/oilType", |
|||
path: "/baseInfo/oilType", |
|||
}, |
|||
{ |
|||
alwaysShow: true, |
|||
component: 'index', |
|||
meta: { |
|||
icon: "el-icon-help", |
|||
title: "油罐信息" |
|||
}, |
|||
name: "/baseInfo/oilTank", |
|||
path: "/baseInfo/oilTank", |
|||
}, |
|||
{ |
|||
alwaysShow: true, |
|||
component: 'index', |
|||
meta: { |
|||
icon: "el-icon-help", |
|||
title: "流量仪器" |
|||
}, |
|||
name: "/baseInfo/flowInstrument", |
|||
path: "/baseInfo/flowInstrument", |
|||
}, |
|||
{ |
|||
alwaysShow: true, |
|||
component: 'index', |
|||
meta: { |
|||
icon: "el-icon-help", |
|||
title: "供应商信息" |
|||
}, |
|||
name: "/baseInfo/supplier", |
|||
path: "/baseInfo/supplier", |
|||
} |
|||
] |
|||
name: "/baseInfo/materialType", |
|||
path: "/baseInfo/materialType", |
|||
}, |
|||
// { |
|||
// alwaysShow: true, |
|||
// component: 'index', |
|||
// meta: { |
|||
// icon: "el-icon-menu", |
|||
// title: "原料类型" |
|||
// }, |
|||
// name: "/rawMaterialType/index", |
|||
// path: "/rawMaterialType/index" |
|||
// }, { |
|||
// alwaysShow: true, |
|||
// component: 'index', |
|||
// meta: { |
|||
// icon: "el-icon-menu", |
|||
// title: "原料信息" |
|||
// }, |
|||
// name: "/rawMaterialInfo/index", |
|||
// path: "/rawMaterialInfo/index" |
|||
// }, { |
|||
// alwaysShow: true, |
|||
// component: 'index', |
|||
// meta: { |
|||
// icon: "el-icon-menu", |
|||
// title: "原油类型" |
|||
// }, |
|||
// name: "/oilType/index", |
|||
// path: "/oilType/index" |
|||
// }, |
|||
// { |
|||
// alwaysShow: true, |
|||
// component: 'index', |
|||
// meta: { |
|||
// icon: "el-icon-menu", |
|||
// title: "油罐信息" |
|||
// }, |
|||
// name: "/oilTank/index", |
|||
// path: "/oilTank/index" |
|||
// }, |
|||
// { |
|||
// alwaysShow: true, |
|||
// component: 'index', |
|||
// meta: { |
|||
// icon: "el-icon-menu", |
|||
// title: "流量仪器" |
|||
// }, |
|||
// name: "/flowInstrument/index", |
|||
// path: "/flowInstrument/index" |
|||
// }, |
|||
// { |
|||
// alwaysShow: true, |
|||
// component: 'index', |
|||
// meta: { |
|||
// icon: "el-icon-menu", |
|||
// title: "原油出入库记录" |
|||
// }, |
|||
// name: "/oilTypeInAndOutBound/index", |
|||
// path: "/oilTypeInAndOutBound/index" |
|||
// }, |
|||
// { |
|||
// alwaysShow: true, |
|||
// component: 'index', |
|||
// meta: { |
|||
// icon: "el-icon-menu", |
|||
// title: "原料出入库记录" |
|||
// }, |
|||
// name: "/rawMaterialInAndOutBound/index", |
|||
// path: "/rawMaterialInAndOutBound/index" |
|||
// }, |
|||
|
|||
{ |
|||
alwaysShow: true, |
|||
component: "index", |
|||
meta: { |
|||
icon: "el-icon-help", |
|||
title: "物料信息", |
|||
}, |
|||
name: "/baseInfo/materialInfo", |
|||
path: "/baseInfo/materialInfo", |
|||
}, |
|||
{ |
|||
alwaysShow: true, |
|||
component: "index", |
|||
meta: { |
|||
icon: "el-icon-help", |
|||
title: "原油类型", |
|||
}, |
|||
name: "/baseInfo/oilType", |
|||
path: "/baseInfo/oilType", |
|||
}, |
|||
{ |
|||
alwaysShow: true, |
|||
component: "index", |
|||
meta: { |
|||
icon: "el-icon-help", |
|||
title: "油罐信息", |
|||
}, |
|||
name: "/baseInfo/oilTank", |
|||
path: "/baseInfo/oilTank", |
|||
}, |
|||
{ |
|||
alwaysShow: true, |
|||
component: "index", |
|||
meta: { |
|||
icon: "el-icon-help", |
|||
title: "流量仪器", |
|||
}, |
|||
name: "/baseInfo/flowInstrument", |
|||
path: "/baseInfo/flowInstrument", |
|||
}, |
|||
{ |
|||
alwaysShow: true, |
|||
component: "index", |
|||
meta: { |
|||
icon: "el-icon-help", |
|||
title: "供应商信息", |
|||
}, |
|||
name: "/baseInfo/supplier", |
|||
path: "/baseInfo/supplier", |
|||
}, |
|||
], |
|||
}, |
|||
// { |
|||
// alwaysShow: true, |
|||
// component: 'index', |
|||
// meta: { |
|||
// icon: "el-icon-menu", |
|||
// title: "原料类型" |
|||
// }, |
|||
// name: "/rawMaterialType/index", |
|||
// path: "/rawMaterialType/index" |
|||
// }, { |
|||
// alwaysShow: true, |
|||
// component: 'index', |
|||
// meta: { |
|||
// icon: "el-icon-menu", |
|||
// title: "原料信息" |
|||
// }, |
|||
// name: "/rawMaterialInfo/index", |
|||
// path: "/rawMaterialInfo/index" |
|||
// }, { |
|||
// alwaysShow: true, |
|||
// component: 'index', |
|||
// meta: { |
|||
// icon: "el-icon-menu", |
|||
// title: "原油类型" |
|||
// }, |
|||
// name: "/oilType/index", |
|||
// path: "/oilType/index" |
|||
// }, |
|||
// { |
|||
// alwaysShow: true, |
|||
// component: 'index', |
|||
// meta: { |
|||
// icon: "el-icon-menu", |
|||
// title: "油罐信息" |
|||
// }, |
|||
// name: "/oilTank/index", |
|||
// path: "/oilTank/index" |
|||
// }, |
|||
// { |
|||
// alwaysShow: true, |
|||
// component: 'index', |
|||
// meta: { |
|||
// icon: "el-icon-menu", |
|||
// title: "流量仪器" |
|||
// }, |
|||
// name: "/flowInstrument/index", |
|||
// path: "/flowInstrument/index" |
|||
// }, |
|||
// { |
|||
// alwaysShow: true, |
|||
// component: 'index', |
|||
// meta: { |
|||
// icon: "el-icon-menu", |
|||
// title: "原油出入库记录" |
|||
// }, |
|||
// name: "/oilTypeInAndOutBound/index", |
|||
// path: "/oilTypeInAndOutBound/index" |
|||
// }, |
|||
// { |
|||
// alwaysShow: true, |
|||
// component: 'index', |
|||
// meta: { |
|||
// icon: "el-icon-menu", |
|||
// title: "原料出入库记录" |
|||
// }, |
|||
// name: "/rawMaterialInAndOutBound/index", |
|||
// path: "/rawMaterialInAndOutBound/index" |
|||
// }, |
|||
|
|||
// { |
|||
// alwaysShow: true, |
|||
// component: 'index', |
|||
// meta: { |
|||
// icon: "el-icon-menu", |
|||
// title: "项目列表" |
|||
// }, |
|||
// name: "/project/index", |
|||
// path: "/project/index" |
|||
// }, |
|||
] |
|||
} |
|||
// { |
|||
// alwaysShow: true, |
|||
// component: 'index', |
|||
// meta: { |
|||
// icon: "el-icon-menu", |
|||
// title: "项目列表" |
|||
// }, |
|||
// name: "/project/index", |
|||
// path: "/project/index" |
|||
// }, |
|||
], |
|||
}; |
|||
}, |
|||
computed: { |
|||
...mapGetters(["sidebar"]), |
|||
// routes() { |
|||
// f4d2e507-c4ed-451c-b364-04c08f962045 |
|||
// console.log('78979789', this.$router.options.routes) |
|||
// return this.$router.options.routes |
|||
// }, |
|||
activeMenu() { |
|||
// const route = this.$route |
|||
// const { |
|||
// meta, |
|||
// path |
|||
// } = route |
|||
// // if set path, the sidebar will highlight the path you set |
|||
// if (meta.activeMenu) { |
|||
// return meta.activeMenu |
|||
// } |
|||
return "/index"; |
|||
}, |
|||
computed: { |
|||
...mapGetters([ |
|||
'sidebar' |
|||
]), |
|||
// routes() { |
|||
// f4d2e507-c4ed-451c-b364-04c08f962045 |
|||
// console.log('78979789', this.$router.options.routes) |
|||
// return this.$router.options.routes |
|||
// }, |
|||
activeMenu() { |
|||
// const route = this.$route |
|||
// const { |
|||
// meta, |
|||
// path |
|||
// } = route |
|||
// // if set path, the sidebar will highlight the path you set |
|||
// if (meta.activeMenu) { |
|||
// return meta.activeMenu |
|||
// } |
|||
return "/index" |
|||
}, |
|||
showLogo() { |
|||
return this.$store.state.settings.sidebarLogo |
|||
}, |
|||
variables() { |
|||
return variables |
|||
}, |
|||
isCollapse() { |
|||
return !this.sidebar.opened |
|||
} |
|||
showLogo() { |
|||
return this.$store.state.settings.sidebarLogo; |
|||
}, |
|||
created() { |
|||
this.postHuoquyonghu() |
|||
variables() { |
|||
return variables; |
|||
}, |
|||
methods: { |
|||
// 获取用户信息 |
|||
postHuoquyonghu() { |
|||
// var token = getStorage() |
|||
// loginDetails(token).then((response) => { |
|||
// console.log('resss', response) |
|||
// if (response.code === '200') { |
|||
// this.YongHuid = response.data |
|||
// this.params.userSid = this.YongHuid.sid |
|||
// getrolemenus(this.params).then((res) => { |
|||
// const userRoles = this.resRouter(res.data) |
|||
this.routes.push({ |
|||
path: '*', |
|||
redirect: '/404', |
|||
hidden: true |
|||
}) |
|||
console.log('左侧菜单', this.routes) |
|||
return this.routes |
|||
// }) |
|||
// } |
|||
// }) |
|||
}, |
|||
resRouter(menus) { |
|||
// 递归,将后台传来数组 |
|||
for (var i = 0; i < menus.length; i++) { |
|||
if (menus[i].children && menus[i].children.length != 0) { |
|||
this.resRouter(menus[i].children) |
|||
} |
|||
if (menus[i].children.length == 0) { |
|||
delete menus[i].children |
|||
delete menus[i].redirect |
|||
} |
|||
if (menus[i].component == '') { |
|||
console.log('55555', menus[i]) |
|||
menus[i] = { |
|||
path: menus[i].path, |
|||
component: '', |
|||
redirect: menus[i].path, |
|||
children: [menus[i]], |
|||
} |
|||
} else { |
|||
// menus[i] = { |
|||
// path: menus[i].path, |
|||
// component: '', |
|||
// redirect: menus[i].path, |
|||
// children: [menus[i]], |
|||
// } |
|||
} |
|||
isCollapse() { |
|||
return !this.sidebar.opened; |
|||
}, |
|||
}, |
|||
created() { |
|||
this.postHuoquyonghu(); |
|||
}, |
|||
methods: { |
|||
// 获取用户信息 |
|||
postHuoquyonghu() { |
|||
// var token = getStorage() |
|||
// loginDetails(token).then((response) => { |
|||
// console.log('resss', response) |
|||
// if (response.code === '200') { |
|||
// this.YongHuid = response.data |
|||
// this.params.userSid = this.YongHuid.sid |
|||
// getrolemenus(this.params).then((res) => { |
|||
// const userRoles = this.resRouter(res.data) |
|||
this.routes.push({ |
|||
path: "*", |
|||
redirect: "/404", |
|||
hidden: true, |
|||
}); |
|||
console.log("左侧菜单", this.routes); |
|||
return this.routes; |
|||
// }) |
|||
// } |
|||
// }) |
|||
}, |
|||
resRouter(menus) { |
|||
// 递归,将后台传来数组 |
|||
for (var i = 0; i < menus.length; i++) { |
|||
if (menus[i].children && menus[i].children.length != 0) { |
|||
this.resRouter(menus[i].children); |
|||
} |
|||
this.routes = menus |
|||
console.log('左侧菜单', this.routes) |
|||
return menus |
|||
}, |
|||
if (menus[i].children.length == 0) { |
|||
delete menus[i].children; |
|||
delete menus[i].redirect; |
|||
} |
|||
if (menus[i].component == "") { |
|||
console.log("55555", menus[i]); |
|||
menus[i] = { |
|||
path: menus[i].path, |
|||
component: "", |
|||
redirect: menus[i].path, |
|||
children: [menus[i]], |
|||
}; |
|||
} else { |
|||
// menus[i] = { |
|||
// path: menus[i].path, |
|||
// component: '', |
|||
// redirect: menus[i].path, |
|||
// children: [menus[i]], |
|||
// } |
|||
} |
|||
} |
|||
this.routes = menus; |
|||
console.log("左侧菜单", this.routes); |
|||
return menus; |
|||
}, |
|||
} |
|||
}, |
|||
}; |
|||
</script> |
|||
|
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue