Browse Source

Merge remote-tracking branch 'origin/master'

master
djz8236 2 years ago
parent
commit
4eddc36a2b
  1. 0
      warehousing-system/docs/sheji/warehouse数据库设计文档_1.0.0(1).doc
  2. 980
      warehousing-system/docs/sheji/warehouse数据库设计文档_1.0.0.docx
  3. BIN
      warehousing-system/docs/sheji/自营进货单.jpg
  4. BIN
      warehousing-system/docs/sheji/配货出货单(明细).jpg
  5. BIN
      warehousing-system/docs/sheji/配货出货单明细.xls
  6. 0
      warehousing-system/warehouse数据库设计文档_1.0.0.doc
  7. BIN
      yxt-portal-ui/src/assets/loginImg/001.jpg
  8. BIN
      yxt-portal-ui/src/assets/loginImg/002.jpg
  9. BIN
      yxt-portal-ui/src/assets/loginImg/003.jpg
  10. 249
      yxt-portal-ui/src/views/login/login.vue
  11. 55
      yxt-supervise-cyf/docs/databases/create_table.sql
  12. 56
      yxt-supervise-cyf/docs/databases/data_init.sql
  13. BIN
      yxt-supervise-cyf/docs/sheji/favicon_logosc.zip
  14. 32
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/appversion/AppVersion.java
  15. 21
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/appversion/AppVersionDetailsVo.java
  16. 21
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/appversion/AppVersionDto.java
  17. 21
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/appversion/AppVersionVo.java
  18. 6
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilinventoryrecord/CrudeOilInventoryRecord.java
  19. 2
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoiloutbound/CrudeOilOutbound.java
  20. 26
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilpricerecord/CrudeOilPriceRecord.java
  21. 26
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilpricerecord/CrudeOilPriceRecordDetailsVo.java
  22. 27
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilpricerecord/CrudeOilPriceRecordDto.java
  23. 26
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilpricerecord/CrudeOilPriceRecordQuery.java
  24. 26
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilpricerecord/CrudeOilPriceRecordVo.java
  25. 3
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilstorage/CrudeOilStorage.java
  26. 1
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoiltypeinformation/CrudeOilTypeInformation.java
  27. 1
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoiltypeinformation/CrudeOilTypeInformationDto.java
  28. 1
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoiltypeinformation/CrudeOilTypeInformationVo.java
  29. 68
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/sysuser/SysUser.java
  30. 40
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/sysuser/SysUserDto.java
  31. 51
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/sysuser/SysUserQuery.java
  32. 91
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/sysuser/SysUserVo.java
  33. 2
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/tankinformation/TankInformation.java
  34. 2
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/tankinformation/TankInformationVo.java
  35. 17
      yxt-supervise-cyf/yxt-supervise-cyf-biz/pom.xml
  36. 20
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/appversion/AppVersionMapper.java
  37. 19
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/appversion/AppVersionMapper.xml
  38. 248
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/appversion/AppVersionRest.java
  39. 38
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/appversion/AppVersionService.java
  40. 26
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/crudeoilpricerecord/CrudeOilPriceRecordAppMapper.java
  41. 29
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/crudeoilpricerecord/CrudeOilPriceRecordAppMapper.xml
  42. 42
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/crudeoilpricerecord/CrudeOilPriceRecordAppRest.java
  43. 63
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/crudeoilpricerecord/CrudeOilPriceRecordAppService.java
  44. 4
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/crudeoilstorage/CrudeOilStorageAppMapper.xml
  45. 52
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/crudeoiltypeinformation/CrudeOilTypeInformationAppService.java
  46. 26
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/supplierinformation/SupplierInformationAppMapper.java
  47. 16
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/supplierinformation/SupplierInformationAppMapper.xml
  48. 61
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/supplierinformation/SupplierInformationAppRest.java
  49. 70
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/supplierinformation/SupplierInformationAppService.java
  50. 26
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/sysuser/CyfSysUserAppMapper.java
  51. 16
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/sysuser/CyfSysUserAppMapper.xml
  52. 52
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/sysuser/CyfSysUserAppRest.java
  53. 31
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/sysuser/CyfSysUserAppService.java
  54. 26
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/config/SaTokenConfigure.java
  55. 3
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilinventoryrecord/CrudeOilInventoryRecordMapper.java
  56. 6
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilinventoryrecord/CrudeOilInventoryRecordMapper.xml
  57. 6
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilinventoryrecord/CrudeOilInventoryRecordRest.java
  58. 6
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilinventoryrecord/CrudeOilInventoryRecordService.java
  59. 4
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoiloutbound/CrudeOilOutboundMapper.java
  60. 1
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoiloutbound/CrudeOilOutboundRest.java
  61. 26
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilpricerecord/CrudeOilPriceRecordMapper.java
  62. 29
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilpricerecord/CrudeOilPriceRecordMapper.xml
  63. 39
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilpricerecord/CrudeOilPriceRecordRest.java
  64. 67
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilpricerecord/CrudeOilPriceRecordService.java
  65. 5
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilstorage/CrudeOilStorageMapper.java
  66. 5
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilstorage/CrudeOilStorageRest.java
  67. 6
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilstorage/CrudeOilStorageService.java
  68. 52
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoiltypeinformation/CrudeOilTypeInformationService.java
  69. 28
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/sysuser/CyfSysUserMapper.java
  70. 16
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/sysuser/CyfSysUserMapper.xml
  71. 56
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/sysuser/CyfSysUserRest.java
  72. 32
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/sysuser/CyfSysUserService.java
  73. 19
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/tankinformation/TankInformationService.java
  74. 418
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/util/JsonUtils.java
  75. 49
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/util/JsonValueProcessorImpl.java
  76. 10
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/util/MyModule.java
  77. 8
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/util/PropertyFilterMixIn.java
  78. 23
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/util/TimeSecound.java
  79. 200
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/util/ValidatorUtils.java
  80. 23
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/resources/application.yml
  81. 5
      yxt-supervise-cyf/yxt-supervise-cyf-ui/.env.development
  82. 8
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/flowInstrument/flowInstrument.js
  83. 18
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilTank/oilTank.js
  84. 5
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilType/oilType.js
  85. 29
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilTypeInAndOutBound/oilTypeInAndOutBound.js
  86. 14
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialInAndOutBound/rawMaterialInAndOutBound.js
  87. 8
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialInfo/rawMaterialInfo.js
  88. 4
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialType/rawMaterialType.js
  89. 7
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/supplier/supplier.js
  90. 16
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/user.js
  91. BIN
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/assets/home/bj.jpg
  92. 8
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/layout/components/Navbar.vue
  93. 178
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/layout/components/Sidebar/index.vue
  94. 2
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/router/index.js
  95. 17
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/utils/request.js
  96. 50
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/404.vue
  97. 1
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/oilType/index.vue
  98. 28
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/oilType/oilTypeAdd.vue
  99. 10
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/index.vue
  100. 83
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/oilTankList/index.vue

0
warehousing-system/docs/sheji/warehouse数据库设计文档_1.0.0(1).doc

980
warehousing-system/docs/sheji/warehouse数据库设计文档_1.0.0.docx

@ -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中的接口

BIN
warehousing-system/docs/sheji/自营进货单.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 609 KiB

BIN
warehousing-system/docs/sheji/配货出货单(明细).jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 KiB

BIN
warehousing-system/docs/sheji/配货出货单明细.xls

Binary file not shown.

0
warehousing-system/warehouse数据库设计文档_1.0.0.doc

BIN
yxt-portal-ui/src/assets/loginImg/001.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
yxt-portal-ui/src/assets/loginImg/002.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

BIN
yxt-portal-ui/src/assets/loginImg/003.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

249
yxt-portal-ui/src/views/login/login.vue

@ -1,33 +1,49 @@
<template>
<div class="login">
<div class="logoTitle">
<img src="../../assets/loginImg/logo.png"><span>汇融银行</span>
<p class="title">供应链贷后监管平台</p>
<span>汇融云眼</span>
<p class="title">贷后监管系统</p>
</div>
<div class="images">
<img class="one" src="../../assets/loginImg/001.jpg" alt="" />
<img class="two" src="../../assets/loginImg/002.jpg" alt="" />
<img class="three" src="../../assets/loginImg/003.jpg" alt="" />
</div>
<div class="main">
<div class="content">
<el-form ref="loginForm" :model="loginForm" class="login-form">
<h3 class="title1">用户登录</h3>
<h3 class="title1">管理后台</h3>
<el-form-item>
<el-input v-model="loginForm.userName" autocomplete="off" placeholder="请输入账号" prefix-icon="el-icon-user" />
<el-input
v-model="loginForm.userName"
autocomplete="off"
placeholder="请输入账号"
prefix-icon="el-icon-user"
/>
</el-form-item>
<el-form-item>
<el-input v-model="loginForm.password" autocomplete="off" placeholder="请输入密码" prefix-icon="el-icon-lock" show-password />
<span class="nopsw register" @click="handleforgetPwd">忘记密码 </span>
<el-input
v-model="loginForm.password"
autocomplete="off"
placeholder="请输入密码"
prefix-icon="el-icon-lock"
show-password
/>
<span class="nopsw register" @click="handleforgetPwd"
>忘记密码 </span
>
</el-form-item>
<el-form-item v-show="showMsg" style="margin-bottom:0;">
<el-form-item v-show="showMsg" style="margin-bottom: 0">
<span class="text-danger">提示用户名或密码错误请重试</span>
</el-form-item>
<el-form-item>
<el-popover
placement="top"
width="400"
trigger="click"
<el-button
v-loading="loading"
type="primary"
class="login-btn"
@click="login"
> </el-button
>
<!-- <imgCodeRole @login="login" ref="imgCodeRole"></imgCodeRole>-->
<!-- <el-button slot="reference" type="primary" class="login-btn" v-loading="loading"> </el-button>-->
<el-button slot="reference" v-loading="loading" type="primary" class="login-btn" @click="login"> </el-button>
</el-popover>
<!--<router-link :to="{name: 'registUser'}" target="_blank" tag="a" class="register fl">个人注册</router-link>
<router-link :to="{name: 'registOrg'}" target="_blank" tag="a" class="register fr">单位注册</router-link>-->
</el-form-item>
@ -35,7 +51,11 @@
</div>
</div>
<el-dialog title="忘记密码" :visible.sync="forgetPwd" :close-on-click-modal="false">
<el-dialog
title="忘记密码"
:visible.sync="forgetPwd"
:close-on-click-modal="false"
>
<el-form :model="nopassword">
<el-form-item label="手机号">
<el-input v-model="nopassword.userPhone" autocomplete="off" />
@ -49,39 +69,35 @@
<el-button type="primary" @click="reGetPwd()"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
login,
imgCode
} from '@/api/user.js'
import user from '@/api/User/login.js'
import { setToken, getToken, setSession } from '@/utils/auth'
import imgCodeRole from '@/components/imgCodeRole/index.vue'
import { login, imgCode } from "@/api/user.js";
import user from "@/api/User/login.js";
import { setToken, getToken, setSession } from "@/utils/auth";
import imgCodeRole from "@/components/imgCodeRole/index.vue";
export default {
components: { imgCodeRole },
data() {
return {
loginForm: {
userName: '',
password: '',
verifyCode: '',
uuid: ''
userName: "",
password: "",
verifyCode: "",
uuid: "",
},
imgCode: '',
imgCode: "",
loading: false,
loginCode: false,
showMsg: false,
forgetPwd: false,
nopassword: {
userPhone: '',
userName: ''
}
}
userPhone: "",
userName: "",
},
};
},
mounted() {
// window.loginIt = this.loginIt;
@ -91,54 +107,69 @@ export default {
// alert(data);
// },
login(data) {
this.loading = true
this.loginForm.verifyCode = data.verifyCode
this.loginForm.uuid = data.uuid
this.$store.dispatch('user/login', this.loginForm).then((res) => {
this.loading = true;
this.loginForm.verifyCode = data.verifyCode;
this.loginForm.uuid = data.uuid;
this.$store
.dispatch("user/login", this.loginForm)
.then((res) => {
// this.$store.dispatch('user/getInfo')
this.$router.push({ path: '/home' })
this.loading = false
}).catch(e => {
console.log('11111', e)
this.loading = false
// this.$refs.imgCodeRole.getCodeImage()
this.$router.push({ path: "/home" });
this.loading = false;
})
.catch((e) => {
console.log("11111", e);
this.loading = false;
// this.$refs.imgCodeRole.getCodeImage()
});
},
codeShow() {
if (this.loginForm.password == '' || this.loginForm.userName == '') {
this.loginCode = false
this.showMsg = true
return
if (this.loginForm.password == "" || this.loginForm.userName == "") {
this.loginCode = false;
this.showMsg = true;
return;
}
this.$refs.imgCodeRole.getCodeImage()
this.$refs.imgCodeRole.getCodeImage();
},
handleforgetPwd() {
this.forgetPwd = true
this.forgetPwd = true;
this.nopassword = {
userPhone: '',
userName: ''
}
userPhone: "",
userName: "",
};
},
reGetPwd() {
if (this.nopassword.userPhone === '') {
this.$message({ showClose: true, type: 'error', message: '手机号不能为空' })
return
if (this.nopassword.userPhone === "") {
this.$message({
showClose: true,
type: "error",
message: "手机号不能为空",
});
return;
}
if (this.nopassword.userName === '') {
this.$message({ showClose: true, type: 'error', message: '姓名不能为空' })
return
if (this.nopassword.userName === "") {
this.$message({
showClose: true,
type: "error",
message: "姓名不能为空",
});
return;
}
user.reGetPwd(this.nopassword).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '新密码已发送至手机,请查看短信' })
this.forgetPwd = false
this.$message({
showClose: true,
type: "success",
message: "新密码已发送至手机,请查看短信",
});
this.forgetPwd = false;
} else {
this.$message({ showClose: true, type: 'error', message: res.msg })
}
})
}
}
this.$message({ showClose: true, type: "error", message: res.msg });
}
});
},
},
};
</script>
<style lang="scss">
@ -150,40 +181,58 @@ export default {
background-image: url(../../assets/loginImg/bgImg.png);
background-position: center;
overflow: hidden;
.logoTitle {
margin: 30px;
img {
padding-top: 25px;
width: 70px;
height: 60px;
.images {
position: relative;
margin-top: 290px;
margin-left: 70px;
.one {
width: 210px;
position: absolute;
}
.two {
width: 104px;
position: absolute;
top: 41px;
}
.three {
width: 280px;
position: absolute;
left: 104px;
top: 41px;
}
}
.logoTitle {
position: absolute;
top: 200px;
left: 70px;
span {
float: left;
font-size: 36px;
color: #FFFFFF;
color: #ffffff;
}
.title {
float: left;
font-size: 25px;
font-family: Source Han Sans CN;
font-weight: 500;
color: #FFFFFF;
margin: 0;
margin-left: 60px;
color: #ffffff;
margin-top: 8px;
}
}
.main {
width: 30%;
/*height: 640px;*/
background: #FFFFFF;
width: 32%;
height: 340px;
background: #ffffff;
box-shadow: 0px 13px 12px 0px rgba(0, 0, 0, 0.15);
opacity: 0.9;
border-radius: 20px;
position: absolute;
right: 10%;
right: 7%;
top: 200px;
.content {
position: relative;
/*.title-h3{
@ -202,21 +251,26 @@ export default {
.login-form {
padding: 30px 50px;
background-color: #bbd4e0;
height: 360px;
border-radius: 15px;
.title1 {
margin: 0px auto 30px auto;
text-align: center;
font-size: 20px;
color: #191919;
font-size: 23px;
font-weight: 500;
}
.el-input {
border: none;
background-color: transparent;
// border-color: transparent;
background-color: #ffffff;
height: 40px;
border-radius: 5px;
}
.el-input__icon{
font-size: 20px;
color:#1b64f7
}
.code {
position: absolute;
top: 3px;
@ -226,18 +280,17 @@ export default {
cursor: pointer;
z-index: 9;
}
.nopsw {
position: absolute;
bottom: -30px;
right: 5px;
color: #018ad2;
left: 250px;
top: 50px;
color: #000;
font-size: 15px;
line-height: 30px;
}
.register {
color: #018ad2;
color: #000;
}
.register:hover,
@ -250,14 +303,16 @@ export default {
}
.text-danger {
color: #F56C6C;
color: #f56c6c;
}
.login-btn {
margin: 10px 0 10px 0;
width: 100%;
background-color: #007fff;
border: 0;
margin-left: 30px;
width: 85%;
background-color: #0a59f7;
border-radius: 10px;
font-size: 20px;
}
.login-btn:hover {
@ -276,7 +331,7 @@ export default {
}
.el-loading-mask {
background-color: rgba(255, 255, 255, .6);
background-color: rgba(255, 255, 255, 0.6);
}
}
</style>

55
yxt-supervise-cyf/docs/databases/create_table.sql

@ -23,6 +23,7 @@ CREATE TABLE `tank_information` (
`height` double(100, 2) NULL DEFAULT NULL COMMENT '油罐高度',
`bottomArea` double(100, 3) NULL DEFAULT NULL COMMENT '油罐底面积',
`density` double(100, 2) NULL DEFAULT NULL COMMENT '油的密度',
`totalValue` double(100, 2) NULL DEFAULT NULL COMMENT '总价值',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 26 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '油罐信息' ROW_FORMAT = Dynamic;
@ -46,6 +47,7 @@ CREATE TABLE `crude_oil_type_information` (
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '原油名称',
`number` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '原油编号',
`code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '原油code',
`price` double(100, 2) NULL DEFAULT NULL COMMENT '原油价格',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '原油类型' ROW_FORMAT = Dynamic;
@ -332,3 +334,56 @@ PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '供应商信息' ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;
DROP TABLE IF EXISTS `crude_oil_price_record`;
CREATE TABLE `crude_oil_price_record` (
`id` int(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
`sid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'sid',
`lockVersion` int(0) NULL DEFAULT 0 COMMENT '版本锁',
`createTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`modifyTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '修改时间',
`isEnable` int(0) NULL DEFAULT 1 COMMENT '是否可用:1可用,0不可用',
`state` int(0) NULL DEFAULT 1 COMMENT '状态',
`isDelete` int(0) NULL DEFAULT 0 COMMENT '是否删除:0未删除,1已删除',
`remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
`createBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人sid',
`updateBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人sid',
`typeSid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '原油类型',
`price` double(100, 2) NULL DEFAULT NULL COMMENT '原油现价格',
`oldPrice` double(100, 2) NULL DEFAULT NULL COMMENT '原油旧价格',
`pSid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '原油旧价格sid',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '原油价格记录表' ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
`id` int(0) NOT NULL AUTO_INCREMENT,
`sid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'sid',
`lockVersion` int(0) NOT NULL DEFAULT 0 COMMENT '记录版本,锁',
`createTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '记录创建时间',
`modifyTime` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '记录最后修改时间',
`isEnable` int(0) NOT NULL DEFAULT 1 COMMENT '记录是否可用,1:可用,0:不可用',
`state` int(0) NULL DEFAULT 1 COMMENT '隐藏本部门:隐藏本部门开启后,本部门将不会显示在公司通讯录中',
`isDelete` int(0) NULL DEFAULT NULL COMMENT '记录是否被删除,0:未删除,1:已经删除',
`remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注信息',
`createBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建者',
`updateBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新者',
`userName` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '登录名,登录名不能相同',
`password` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '密码(加密或签名后)',
`pwdDayslimit` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '密码修改时限',
`pwdModifyTime` datetime(0) NULL DEFAULT NULL COMMENT '最后一次密码修改时间',
`onlineState` int(0) NULL DEFAULT NULL COMMENT '在线状态(0为离线、1为在线)',
`token` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户登录时随机生成身份验证字符串',
`isAdmin` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '是否是管理员:1管理员,2一般用户,0是超级管理员,3尚无单位人员',
`appId` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '手机登录唯一标识,手机与用户绑定字段',
`staffSid` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关联的人员sid',
`mobile` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '手机号',
`userType` int(0) NULL DEFAULT NULL COMMENT '用户类型:1员工、2客户、3供应商',
`headImage` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户头像',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;

56
yxt-supervise-cyf/docs/databases/data_init.sql

@ -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');

BIN
yxt-supervise-cyf/docs/sheji/favicon_logosc.zip

Binary file not shown.

32
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/appversion/AppVersion.java

@ -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;
}

21
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/appversion/AppVersionDetailsVo.java

@ -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;
}

21
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/appversion/AppVersionDto.java

@ -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;
}

21
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/appversion/AppVersionVo.java

@ -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;
}

6
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilinventoryrecord/CrudeOilInventoryRecord.java

@ -22,4 +22,10 @@ public class CrudeOilInventoryRecord extends BaseEntity {
private String recordDate;
private double height;
//图片url
private String url;
//油罐编号
private String number;
//油罐库存
private String inventory;
}

2
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoiloutbound/CrudeOilOutbound.java

@ -26,4 +26,6 @@ public class CrudeOilOutbound extends BaseEntity {
//出库时间
private String deliveryDate;
//url图片路径
private String url;
}

26
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilpricerecord/CrudeOilPriceRecord.java

@ -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;
}

26
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilpricerecord/CrudeOilPriceRecordDetailsVo.java

@ -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;
}

27
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilpricerecord/CrudeOilPriceRecordDto.java

@ -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;
}

26
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilpricerecord/CrudeOilPriceRecordQuery.java

@ -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;
}

26
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilpricerecord/CrudeOilPriceRecordVo.java

@ -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;
}

3
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilstorage/CrudeOilStorage.java

@ -30,4 +30,7 @@ public class CrudeOilStorage extends BaseEntity {
private String supplierSid;
//入库日期
private String warehousingDate;
//图片路径
private String url;
}

1
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoiltypeinformation/CrudeOilTypeInformation.java

@ -20,5 +20,6 @@ public class CrudeOilTypeInformation extends BaseEntity {
private String number;
//原油code
private String code;
private double price;
}

1
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoiltypeinformation/CrudeOilTypeInformationDto.java

@ -19,4 +19,5 @@ public class CrudeOilTypeInformationDto implements Dto {
private String number;
//原油code
private String code;
private double price;
}

1
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoiltypeinformation/CrudeOilTypeInformationVo.java

@ -20,4 +20,5 @@ public class CrudeOilTypeInformationVo implements Vo {
private String number;
//原油code
private String code;
private double price;
}

68
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/sysuser/SysUser.java

@ -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;
}

40
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/sysuser/SysUserDto.java

@ -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;
}

51
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/sysuser/SysUserQuery.java

@ -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;
}

91
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/sysuser/SysUserVo.java

@ -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;
}

2
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/tankinformation/TankInformation.java

@ -34,4 +34,6 @@ public class TankInformation extends BaseEntity {
private double bottomArea;
//高度
private double height;
//总价值
private double totalValue;
}

2
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/tankinformation/TankInformationVo.java

@ -40,4 +40,6 @@ public class TankInformationVo implements Vo {
private String height;
private String flowmeterName;
private String flowmeterNumber;
//总价值
private double totalValue;
}

17
yxt-supervise-cyf/yxt-supervise-cyf-biz/pom.xml

@ -52,6 +52,23 @@
<version>4.0.1</version>
<scope>compile</scope>
</dependency>
<!-- Sa-Token 权限认证,在线文档:https://sa-token.cc -->
<dependency>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-spring-boot-starter</artifactId>
<version>1.34.0</version>
</dependency>
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<classifier>jdk15</classifier>
<version>2.4</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
</dependencies>

20
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/appversion/AppVersionMapper.java

@ -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();
}

19
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/appversion/AppVersionMapper.xml

@ -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>

248
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/appversion/AppVersionRest.java

@ -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);
}
}

38
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/appversion/AppVersionService.java

@ -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();
}
}

26
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/crudeoilpricerecord/CrudeOilPriceRecordAppMapper.java

@ -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);
}

29
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/crudeoilpricerecord/CrudeOilPriceRecordAppMapper.xml

@ -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>

42
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/crudeoilpricerecord/CrudeOilPriceRecordAppRest.java

@ -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);
}
}

63
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/crudeoilpricerecord/CrudeOilPriceRecordAppService.java

@ -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("删除成功");
}
}

4
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/crudeoilstorage/CrudeOilStorageAppMapper.xml

@ -5,11 +5,13 @@
<!-- ${ew.customSqlSegment} -->
<select id="selectPageVo" resultType="com.yxt.supervise.cyf.api.crudeoilstorage.CrudeOilStorageVo">
SELECT
*,t.number as tankNumber,i.number as crudeNumber,i.name as crudeName,t.inventory as inventory
*,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>

52
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/crudeoiltypeinformation/CrudeOilTypeInformationAppService.java

@ -9,10 +9,17 @@ 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.crudeoilpricerecord.CrudeOilPriceRecord;
import com.yxt.supervise.cyf.api.crudeoilpricerecord.CrudeOilPriceRecordDto;
import com.yxt.supervise.cyf.api.crudeoiltypeinformation.CrudeOilTypeInformation;
import com.yxt.supervise.cyf.api.crudeoiltypeinformation.CrudeOilTypeInformationDto;
import com.yxt.supervise.cyf.api.crudeoiltypeinformation.CrudeOilTypeInformationQuery;
import com.yxt.supervise.cyf.api.crudeoiltypeinformation.CrudeOilTypeInformationVo;
import com.yxt.supervise.cyf.api.tankinformation.TankInformation;
import com.yxt.supervise.cyf.app.crudeoilpricerecord.CrudeOilPriceRecordAppMapper;
import com.yxt.supervise.cyf.app.crudeoilpricerecord.CrudeOilPriceRecordAppService;
import com.yxt.supervise.cyf.app.tankinformation.TankInformationAppService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@ -23,7 +30,12 @@ import java.util.List;
*/
@Service
public class CrudeOilTypeInformationAppService extends MybatisBaseService<CrudeOilTypeInformationAppMapper, CrudeOilTypeInformation> {
@Autowired
CrudeOilPriceRecordAppService crudeOilPriceRecordService;
@Autowired
CrudeOilPriceRecordAppMapper crudeOilPriceRecordMapper;
@Autowired
TankInformationAppService tankInformationService;
public PagerVo<CrudeOilTypeInformationVo> listPageVo(PagerQuery<CrudeOilTypeInformationQuery> pq) {
CrudeOilTypeInformationQuery query = pq.getParams();
@ -54,6 +66,12 @@ public class CrudeOilTypeInformationAppService extends MybatisBaseService<CrudeO
}
CrudeOilTypeInformation entity=new CrudeOilTypeInformation();
BeanUtil.copyProperties(dto, entity, "id", "sid");
//新增价格记录
CrudeOilPriceRecordDto dto1=new CrudeOilPriceRecordDto();
dto1.setTypeSid(entity.getSid());
dto1.setPrice(entity.getPrice());
dto1.setOldPrice(entity.getPrice());
crudeOilPriceRecordService.save(dto1);
baseMapper.insert(entity);
return rb.success().setMsg("新增成功");
}
@ -62,7 +80,39 @@ public class CrudeOilTypeInformationAppService extends MybatisBaseService<CrudeO
String dtoSid = dto.getSid();
CrudeOilTypeInformation entity=fetchBySid(dtoSid);
BeanUtil.copyProperties(dto, entity, "id", "sid");
CrudeOilTypeInformation type=baseMapper.selectOne(new QueryWrapper<CrudeOilTypeInformation>().eq("sid",dtoSid));
CrudeOilPriceRecord crude=crudeOilPriceRecordService.getCrudeByTypeSid(dto.getSid());
CrudeOilPriceRecord price=new CrudeOilPriceRecord();
//新增价格记录
if(null==crude){
CrudeOilPriceRecordDto dto1=new CrudeOilPriceRecordDto();
dto1.setTypeSid(entity.getSid());
dto1.setPrice(type.getPrice());
dto1.setOldPrice(type.getPrice());
BeanUtil.copyProperties(dto1, price, "id", "sid");
crudeOilPriceRecordMapper.insert(price);
//以防两次创建时间相同 停一毫秒
try {
Thread.sleep(100);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
if(type.getPrice()!=dto.getPrice()){
CrudeOilPriceRecordDto dto1=new CrudeOilPriceRecordDto();
dto1.setTypeSid(entity.getSid());
dto1.setPrice(entity.getPrice());
dto1.setOldPrice(type.getPrice());
dto1.setPSid(crude==null? price.getSid() : crude.getSid());
crudeOilPriceRecordService.save(dto1);
}
baseMapper.updateById(entity);
//计算库存总价值
List<TankInformation> tank=tankInformationService.list(new QueryWrapper<TankInformation>().eq("crudeSid",dto.getSid()));
for(TankInformation ta :tank){
ta.setTotalValue(dto.getPrice()*ta.getInventory());
}
tankInformationService.updateBatchById(tank);
return rb.success().setMsg("修改成功");
}
public ResultBean getCrudeBySid(String sid){

26
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/supplierinformation/SupplierInformationAppMapper.java

@ -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);
}

16
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/supplierinformation/SupplierInformationAppMapper.xml

@ -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>

61
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/supplierinformation/SupplierInformationAppRest.java

@ -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);
}
}

70
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/supplierinformation/SupplierInformationAppService.java

@ -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("删除成功");
}
}

26
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/sysuser/CyfSysUserAppMapper.java

@ -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);
}

16
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/sysuser/CyfSysUserAppMapper.xml

@ -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>

52
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/sysuser/CyfSysUserAppRest.java

@ -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);
}
}

31
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/sysuser/CyfSysUserAppService.java

@ -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));
}
}

26
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/config/SaTokenConfigure.java

@ -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");
}
}

3
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilinventoryrecord/CrudeOilInventoryRecordMapper.java

@ -20,7 +20,10 @@ import java.util.Map;
@Mapper
public interface CrudeOilInventoryRecordMapper extends BaseMapper<CrudeOilInventoryRecord> {
IPage<CrudeOilInventoryRecordVo> selectPageVo(IPage<CrudeOilInventoryRecord> page, @Param(Constants.WRAPPER) Wrapper<CrudeOilInventoryRecord> qw);
@Select("select *,t.number as tankNumber from crude_oil_inventory_record left join tank_information t on t.sid =c.tankSid where sid=#{sid}")
CrudeOilInventoryRecord getCrudeBySid(@Param("sid")String sid);
void insertCrudeOilFiles(List<Map<String, String>> maps);
CrudeOilInventoryRecord selectRecordBySid(@Param("sid") String sid);
}

6
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilinventoryrecord/CrudeOilInventoryRecordMapper.xml

@ -24,4 +24,10 @@
</foreach>
</insert>
<select id="selectRecordBySid" resultType="com.yxt.supervise.cyf.api.crudeoilinventoryrecord.CrudeOilInventoryRecord">
select r.*,f.url,t.number,t.inventory from crude_oil_inventory_record r
inner join crude_oil_record_file f on r.sid = f.mainSid
inner join tank_information t on r.tankSid = t.sid
where r.sid = #{sid}
</select>
</mapper>

6
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilinventoryrecord/CrudeOilInventoryRecordRest.java

@ -33,4 +33,10 @@ public class CrudeOilInventoryRecordRest {
public ResultBean save (@RequestBody CrudeOilInventoryRecordDto dto){
return CrudeOilInventoryRecordService.save(dto);
}
@ApiOperation("查询油罐库存详细信息")
@GetMapping("/selectRecordBySid/{sid}")
public ResultBean selectRecordBySid(@PathVariable String sid){
return CrudeOilInventoryRecordService.selectRecordBySid(sid);
}
}

6
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilinventoryrecord/CrudeOilInventoryRecordService.java

@ -90,4 +90,10 @@ public class CrudeOilInventoryRecordService extends MybatisBaseService<CrudeOilI
baseMapper.delete(new QueryWrapper<CrudeOilInventoryRecord>().eq("sid",sid));
return rb.success().setMsg("删除成功");
}
public ResultBean selectRecordBySid(String sid){
ResultBean rb = ResultBean.fireFail();
CrudeOilInventoryRecord crudeOilInventoryRecord = baseMapper.selectRecordBySid(sid);
return rb.success().setData(crudeOilInventoryRecord);
}
}

4
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoiloutbound/CrudeOilOutboundMapper.java

@ -20,7 +20,9 @@ import java.util.Map;
@Mapper
public interface CrudeOilOutboundMapper extends BaseMapper<CrudeOilOutbound> {
IPage<CrudeOilOutboundVo> selectPageVo(IPage<CrudeOilOutbound> page, @Param(Constants.WRAPPER) Wrapper<CrudeOilOutbound> qw);
@Select("select * from crude_oil_outbound where sid=#{sid}")
@Select("select o.*,f.url from crude_oil_outbound o inner join crude_oil_outbound_file f on o.sid = f.mainSid where o.sid=#{sid}")
CrudeOilOutbound getCrudeBySid(@Param("sid")String sid);
void insertCrudeOilFiles(List<Map<String, String>> maps);
}

1
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoiloutbound/CrudeOilOutboundRest.java

@ -34,6 +34,7 @@ public class CrudeOilOutboundRest {
public ResultBean save (@RequestBody CrudeOilOutboundDto dto){
return CrudeOilOutboundService.save(dto);
}
@ApiOperation("根据sid查询")
@GetMapping("/getCrudeBySid/{sid}")
public ResultBean getTankBySid(@PathVariable String sid){

26
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilpricerecord/CrudeOilPriceRecordMapper.java

@ -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);
}

29
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilpricerecord/CrudeOilPriceRecordMapper.xml

@ -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>

39
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilpricerecord/CrudeOilPriceRecordRest.java

@ -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);
}
}

67
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilpricerecord/CrudeOilPriceRecordService.java

@ -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("删除成功");
}
}

5
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilstorage/CrudeOilStorageMapper.java

@ -20,7 +20,12 @@ import java.util.Map;
@Mapper
public interface CrudeOilStorageMapper extends BaseMapper<CrudeOilStorage> {
IPage<CrudeOilStorageVo> selectPageVo(IPage<CrudeOilStorage> page, @Param(Constants.WRAPPER) Wrapper<CrudeOilStorage> qw);
@Select("select * from crude_oil_type_information where sid=#{sid}")
CrudeOilStorage getCrudeBySid(@Param("sid")String sid);
void insertCrudeOilFiles(List<Map<String, String>> maps);
@Select("select s.*,f.url from crude_oil_storage s inner join crude_oil_storage_file f on s.sid = f.mainSid where s.sid = #{sid}")
CrudeOilStorage selectStorageBySid(@Param("sid") String sid);
}

5
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilstorage/CrudeOilStorageRest.java

@ -41,4 +41,9 @@ public class CrudeOilStorageRest {
return CrudeOilStorageService.getCrudeBySid(sid);
}
@ApiOperation("查询原油入库详细信息")
@GetMapping("/selectStorageBySid/{sid}")
public ResultBean selectStorageBySid(@PathVariable String sid){
return CrudeOilStorageService.selectStorageBySid(sid);
}
}

6
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilstorage/CrudeOilStorageService.java

@ -96,4 +96,10 @@ public class CrudeOilStorageService extends MybatisBaseService<CrudeOilStorageMa
baseMapper.delete(new QueryWrapper<CrudeOilStorage>().eq("sid",sid));
return rb.success().setMsg("删除成功");
}
public ResultBean selectStorageBySid(String sid){
ResultBean rb = new ResultBean();
CrudeOilStorage crudeOilStorage = baseMapper.selectStorageBySid(sid);
return rb.success().setData(crudeOilStorage);
}
}

52
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoiltypeinformation/CrudeOilTypeInformationService.java

@ -9,11 +9,18 @@ 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.crudeoilpricerecord.CrudeOilPriceRecord;
import com.yxt.supervise.cyf.api.crudeoilpricerecord.CrudeOilPriceRecordDto;
import com.yxt.supervise.cyf.api.crudeoiltypeinformation.CrudeOilTypeInformation;
import com.yxt.supervise.cyf.api.crudeoiltypeinformation.CrudeOilTypeInformationDto;
import com.yxt.supervise.cyf.api.crudeoiltypeinformation.CrudeOilTypeInformationQuery;
import com.yxt.supervise.cyf.api.crudeoiltypeinformation.CrudeOilTypeInformationVo;
import com.yxt.supervise.cyf.api.tankinformation.TankInformation;
import com.yxt.supervise.cyf.api.tankinformation.TankInformationVo;
import com.yxt.supervise.cyf.biz.crudeoilpricerecord.CrudeOilPriceRecordMapper;
import com.yxt.supervise.cyf.biz.crudeoilpricerecord.CrudeOilPriceRecordService;
import com.yxt.supervise.cyf.biz.tankinformation.TankInformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@ -25,7 +32,12 @@ import java.util.List;
@Service
public class CrudeOilTypeInformationService extends MybatisBaseService<CrudeOilTypeInformationMapper, CrudeOilTypeInformation> {
@Autowired
CrudeOilPriceRecordService crudeOilPriceRecordService;
@Autowired
CrudeOilPriceRecordMapper crudeOilPriceRecordMapper;
@Autowired
TankInformationService tankInformationService;
public PagerVo<CrudeOilTypeInformationVo> listPageVo(PagerQuery<CrudeOilTypeInformationQuery> pq) {
CrudeOilTypeInformationQuery query = pq.getParams();
@ -55,6 +67,12 @@ public class CrudeOilTypeInformationService extends MybatisBaseService<CrudeOilT
}
CrudeOilTypeInformation entity=new CrudeOilTypeInformation();
BeanUtil.copyProperties(dto, entity, "id", "sid");
//新增价格记录
CrudeOilPriceRecordDto dto1=new CrudeOilPriceRecordDto();
dto1.setTypeSid(entity.getSid());
dto1.setPrice(entity.getPrice());
dto1.setOldPrice(entity.getPrice());
crudeOilPriceRecordService.save(dto1);
baseMapper.insert(entity);
return rb.success().setMsg("新增成功");
}
@ -63,7 +81,39 @@ public class CrudeOilTypeInformationService extends MybatisBaseService<CrudeOilT
String dtoSid = dto.getSid();
CrudeOilTypeInformation entity=fetchBySid(dtoSid);
BeanUtil.copyProperties(dto, entity, "id", "sid");
CrudeOilTypeInformation type=baseMapper.selectOne(new QueryWrapper<CrudeOilTypeInformation>().eq("sid",dtoSid));
CrudeOilPriceRecord crude=crudeOilPriceRecordService.getCrudeByTypeSid(dto.getSid());
CrudeOilPriceRecord price=new CrudeOilPriceRecord();
//新增价格记录
if(null==crude){
CrudeOilPriceRecordDto dto1=new CrudeOilPriceRecordDto();
dto1.setTypeSid(entity.getSid());
dto1.setPrice(type.getPrice());
dto1.setOldPrice(type.getPrice());
BeanUtil.copyProperties(dto1, price, "id", "sid");
crudeOilPriceRecordMapper.insert(price);
//以防两次创建时间相同 停一毫秒
try {
Thread.sleep(100);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
if(type.getPrice()!=dto.getPrice()){
CrudeOilPriceRecordDto dto1=new CrudeOilPriceRecordDto();
dto1.setTypeSid(entity.getSid());
dto1.setPrice(entity.getPrice());
dto1.setOldPrice(type.getPrice());
dto1.setPSid(crude==null? price.getSid() : crude.getSid());
crudeOilPriceRecordService.save(dto1);
}
baseMapper.updateById(entity);
//计算库存总价值
List<TankInformation> tank=tankInformationService.list(new QueryWrapper<TankInformation>().eq("crudeSid",dto.getSid()));
for(TankInformation ta :tank){
ta.setTotalValue(dto.getPrice()*ta.getInventory());
}
tankInformationService.updateBatchById(tank);
return rb.success().setMsg("修改成功");
}
public ResultBean getCrudeBySid(String sid){

28
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/sysuser/CyfSysUserMapper.java

@ -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);
}

16
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/sysuser/CyfSysUserMapper.xml

@ -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>

56
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/sysuser/CyfSysUserRest.java

@ -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);
}
}

32
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/sysuser/CyfSysUserService.java

@ -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));
}
}

19
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/tankinformation/TankInformationService.java

@ -8,11 +8,17 @@ 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.crudeoiltypeinformation.CrudeOilTypeInformation;
import com.yxt.supervise.cyf.api.tankinformation.TankInformation;
import com.yxt.supervise.cyf.api.tankinformation.TankInformationDto;
import com.yxt.supervise.cyf.api.tankinformation.TankInformationQuery;
import com.yxt.supervise.cyf.api.tankinformation.TankInformationVo;
import com.yxt.supervise.cyf.biz.crudeoilpricerecord.CrudeOilPriceRecordService;
import com.yxt.supervise.cyf.biz.crudeoiltypeinformation.CrudeOilTypeInformationService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@ -24,7 +30,10 @@ import java.util.List;
@Service
public class TankInformationService extends MybatisBaseService<TankInformationMapper, TankInformation> {
@Autowired
CrudeOilTypeInformationService crudeOilTypeInformationService;
@Autowired
CrudeOilPriceRecordService crudeOilPriceRecordService;
public PagerVo<TankInformationVo> listPageVo(PagerQuery<TankInformationQuery> pq) {
TankInformationQuery query = pq.getParams();
QueryWrapper<TankInformation> qw = new QueryWrapper<>();
@ -47,6 +56,14 @@ public class TankInformationService extends MybatisBaseService<TankInformationMa
TankInformation entity=new TankInformation();
BeanUtil.copyProperties(dto, entity, "id", "sid");
entity.setInventory(dto.getInitialInventory());
CrudeOilTypeInformation crude=crudeOilTypeInformationService.getOne(new QueryWrapper<CrudeOilTypeInformation>().eq("sid",dto.getCrudeSid()));
//新增价格记录
CrudeOilPriceRecordDto dto1=new CrudeOilPriceRecordDto();
dto1.setTypeSid(entity.getSid());
dto1.setPrice(crude.getPrice());
dto1.setOldPrice(crude.getPrice());
crudeOilPriceRecordService.save(dto1);
entity.setTotalValue(crude.getPrice()*entity.getInventory());
baseMapper.insert(entity);
return rb.success().setMsg("新增成功");
}

418
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/util/JsonUtils.java

@ -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"));
}
}
}

49
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/util/JsonValueProcessorImpl.java

@ -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();
}
}

10
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/util/MyModule.java

@ -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);
}
}

8
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/util/PropertyFilterMixIn.java

@ -0,0 +1,8 @@
package com.yxt.supervise.cyf.util;
import com.fasterxml.jackson.annotation.JsonFilter;
@JsonFilter("propertyFilterMixIn")
public class PropertyFilterMixIn {
}

23
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/util/TimeSecound.java

@ -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;
}
}

200
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/util/ValidatorUtils.java

@ -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 要检查的数据(数据类型: StringNumberBooleanCollectionMapObject[])
* @return true: 为空; false: 不为空 <li>String值为 null"""0" 时返回 true <li>
* Number值为 null0 时返回 true <li>Boolean值为 nullfalse 时返回 true <li>
* Collection值为 nullsize=0 时返回 true <li>Map值为 nullsize=0 时返回
* true <li>Object[]值为 nulllength=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);
}
}

23
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/resources/application.yml

@ -1,9 +1,9 @@
spring:
application:
name: supervise-crm
name: yxt-supervise-cyf
profiles:
# active: devv
active: test
active: devv
# active: test
messages:
# 国际化资源文件路径
basename: i18n/messages
@ -25,6 +25,23 @@ server:
undertow:
max-http-post-size: -1
############## Sa-Token 配置 (文档: https://sa-token.cc) ##############
sa-token:
# token名称 (同时也是cookie名称)
token-name: satoken
# token有效期,单位s 默认30天, -1代表永不过期
timeout: 2592000
# token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
activity-timeout: -1
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
is-concurrent: true
# 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
is-share: true
# token风格
token-style: uuid
# 是否输出操作日志
is-log: false
#mybatis
mybatis-plus:
# 配置mapper的扫描,找到所有的mapper.xml映射文件

5
yxt-supervise-cyf/yxt-supervise-cyf-ui/.env.development

@ -5,5 +5,8 @@ ENV = 'development'
VUE_APP_BASE_API = '/api'
## 配置测试和本地开发时的 接口地址
VUE_APP_URL = "http://192.168.1.193:7101"
VUE_APP_URL = "http://192.168.1.177:7101"
# VUE_APP_URL = "http://192.168.1.193:7101"
##VUE_APP_URL = "http://8.130.39.13:8112"

8
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/flowInstrument/flowInstrument.js

@ -1,5 +1,5 @@
import request from '@/utils/request'
let tokens = window.sessionStorage.getItem('tokenValue')
export default {
// 查询分页列表
@ -9,7 +9,8 @@ export default {
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
'Content-Type': 'application/json',
'token': tokens
}
})
},
@ -49,7 +50,8 @@ export default {
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
'Content-Type': 'application/json',
'token': tokens
}
})
},

18
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilTank/oilTank.js

@ -1,5 +1,5 @@
import request from '@/utils/request'
let tokens = window.sessionStorage.getItem('tokenValue')
export default {
// 查询分页列表
@ -9,7 +9,8 @@ export default {
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
'Content-Type': 'application/json',
'token': tokens
}
})
},
@ -28,11 +29,19 @@ export default {
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
'Content-Type': 'application/json',
'token': tokens
}
})
},
selectRecordBySid: function(sid) {
return request({
url: '/cyf/crudeinventory/selectRecordBySid/' + sid,
method: 'get'
})
},
fetchBySid: function(sid) {
return request({
@ -71,7 +80,8 @@ export default {
method: 'post',
data: data,
headers: {
'Content-Type': 'application/json'
'Content-Type': 'application/json',
'token': tokens
}
});
},

5
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilType/oilType.js

@ -1,5 +1,5 @@
import request from '@/utils/request'
let tokens = window.sessionStorage.getItem('tokenValue')
export default {
// 查询分页列表
@ -9,7 +9,8 @@ export default {
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
'Content-Type': 'application/json',
'token': tokens
}
})
},

29
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilTypeInAndOutBound/oilTypeInAndOutBound.js

@ -1,5 +1,5 @@
import request from '@/utils/request'
let tokens = window.sessionStorage.getItem('tokenValue')
export default {
// 获取油罐
tankList: function(params) {
@ -8,17 +8,31 @@ export default {
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
'Content-Type': 'application/json',
'token': tokens
}
})
},
// 获取油罐by Sid
tankLisBySid: function(sid) {
return request({
url: '/cyf/tankinfo/listByType/' + sid
})
},
// 获取入库信息 Sid
selectStorageBySid: function(sid) {
return request({
url: 'cyf/crudestorage/selectStorageBySid/' + sid,
method: 'get',
})
},
// 获取出库信息 Sid
getCrudeBySid: function(sid) {
return request({
url: 'cyf/crudeoutbound/getCrudeBySid/' + sid,
method: 'get',
})
},
// 入库
@ -29,7 +43,8 @@ export default {
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
'Content-Type': 'application/json',
'token': tokens
}
})
},
@ -51,7 +66,8 @@ export default {
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
'Content-Type': 'application/json',
'token': tokens
}
})
},
@ -70,7 +86,8 @@ export default {
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
'Content-Type': 'application/json',
'token': tokens
}
})
},

14
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialInAndOutBound/rawMaterialInAndOutBound.js

@ -1,5 +1,5 @@
import request from '@/utils/request'
let tokens = window.sessionStorage.getItem('tokenValue')
export default {
// 获取原料
inventoryList: function(params) {
@ -8,7 +8,8 @@ export default {
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
'Content-Type': 'application/json',
'token': tokens
}
})
},
@ -21,7 +22,8 @@ export default {
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
'Content-Type': 'application/json',
'token': tokens
}
})
},
@ -44,7 +46,8 @@ export default {
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
'Content-Type': 'application/json',
'token': tokens
}
})
},
@ -63,7 +66,8 @@ export default {
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
'Content-Type': 'application/json',
'token': tokens
}
})
},

8
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialInfo/rawMaterialInfo.js

@ -1,5 +1,5 @@
import request from '@/utils/request'
let tokens = window.sessionStorage.getItem('tokenValue')
export default {
// 查询分页列表
@ -9,7 +9,8 @@ export default {
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
'Content-Type': 'application/json',
'token': tokens
}
})
},
@ -28,7 +29,8 @@ export default {
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
'Content-Type': 'application/json',
'token': tokens
}
})
},

4
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialType/rawMaterialType.js

@ -1,5 +1,6 @@
import request from '@/utils/request'
let tokens = window.sessionStorage.getItem('tokenValue')
export default {
// 查询分页列表
@ -9,7 +10,8 @@ export default {
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
'Content-Type': 'application/json',
'token': tokens
}
})
},

7
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/supplier/supplier.js

@ -1,5 +1,6 @@
import request from '@/utils/request'
let tokens = window.sessionStorage.getItem('tokenValue')
export default {
// 查询分页列表
@ -9,7 +10,8 @@ export default {
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
'Content-Type': 'application/json',
'token': tokens
}
})
},
@ -51,7 +53,8 @@ export default {
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
'Content-Type': 'application/json',
'token': tokens
}
})
},

16
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/user.js

@ -2,6 +2,22 @@ import request from '@/utils/request'
// eslint-disable-next-line no-unused-vars
import qs from 'qs'
// 登录
export function doLogin(data) {
return request({
url: '/cyf/sys/doLogin',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
}
// 获取登录人员信息
export function getUserById(sid) {
return request({
url: '/cyf/sys/getUserById/' + sid
})
}
// 登录
export function login(data) {
return request({

BIN
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/assets/home/bj.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

8
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/layout/components/Navbar.vue

@ -19,18 +19,12 @@
export default {
data() {
return {
Orgname: '',
departmentName: '',
name: '',
year:'',
pNameAndDepartmentNameAndPostName:''
}
},
mounted() {
this.Orgname = window.sessionStorage.getItem('Orgname')
this.departmentName = window.sessionStorage.getItem('departmentName')
this.pNameAndDepartmentNameAndPostName = window.sessionStorage.getItem('defaultOrgPathName')
this.name = window.sessionStorage.getItem('name')
this.name = window.sessionStorage.getItem('userName')
var nowDate = new Date()
this.year = nowDate.getFullYear()
},

178
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/layout/components/Sidebar/index.vue

@ -2,197 +2,202 @@
<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'
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
Logo,
},
data() {
return {
YongHuid: [],
// routes: [],
params: {
sourceSid: '9d048c07-7677-4774-9177-aa02b049ff06',
userSid: '',
sourceSid: "9d048c07-7677-4774-9177-aa02b049ff06",
userSid: "",
},
routes: [
{
alwaysShow: true,
component: 'supervise',
component: "supervise",
meta: {
icon: "el-icon-menu",
title: "库房登记"
title: "库房登记",
},
name: "",
path: "/supervise",
children: [{
children: [
{
alwaysShow: true,
component: 'index',
component: "index",
meta: {
icon: "el-icon-help",
title: "油罐库存登记"
title: "油罐库存登记",
},
name: "/supervise/recordOilTank",
path: "/supervise/recordOilTank",
},
{
alwaysShow: true,
component: 'index',
component: "index",
meta: {
icon: "el-icon-help",
title: "原油入库登记"
title: "原油入库登记",
},
name: "/supervise/oilTypeInBound",
path: "/supervise/oilTypeInBound",
},
{
alwaysShow: true,
component: 'index',
component: "index",
meta: {
icon: "el-icon-help",
title: "原油出库登记"
title: "原油出库登记",
},
name: "/supervise/oilTypeOutBound",
path: "/supervise/oilTypeOutBound",
},
]
],
},
{
alwaysShow: true,
component: 'inventory',
component: "inventory",
meta: {
icon: "el-icon-menu",
title: "库存管理"
title: "库存管理",
},
name: "",
path: "/inventory",
children: [
{
alwaysShow: true,
component: 'index',
component: "index",
meta: {
icon: "el-icon-help",
title: "油罐库存记录"
title: "油罐库存记录",
},
name: "/inventory/oilTankList",
path: "/inventory/oilTankList",
},{
},
{
alwaysShow: true,
component: 'index',
component: "index",
meta: {
icon: "el-icon-help",
title: "原油入库记录"
title: "原油入库记录",
},
name: "/inventory/oilTypeInBoundList",
path: "/inventory/oilTypeInBoundList",
},
{
alwaysShow: true,
component: 'index',
component: "index",
meta: {
icon: "el-icon-help",
title: "原油出库记录"
title: "原油出库记录",
},
name: "/inventory/oilTypeOutBoundList",
path: "/inventory/oilTypeOutBoundList",
},
]
],
},
{
alwaysShow: true,
component: 'baseInfo',
component: "baseInfo",
meta: {
icon: "el-icon-menu",
title: "基础信息"
title: "基础信息",
},
name: "",
path: "/baseInfo",
children: [{
children: [
{
alwaysShow: true,
component: 'index',
component: "index",
meta: {
icon: "el-icon-help",
title: "物料类型"
title: "物料类型",
},
name: "/baseInfo/materialType",
path: "/baseInfo/materialType",
},
{
alwaysShow: true,
component: 'index',
component: "index",
meta: {
icon: "el-icon-help",
title: "物料信息"
title: "物料信息",
},
name: "/baseInfo/materialInfo",
path: "/baseInfo/materialInfo",
},
{
alwaysShow: true,
component: 'index',
component: "index",
meta: {
icon: "el-icon-help",
title: "原油类型"
title: "原油类型",
},
name: "/baseInfo/oilType",
path: "/baseInfo/oilType",
},
{
alwaysShow: true,
component: 'index',
component: "index",
meta: {
icon: "el-icon-help",
title: "油罐信息"
title: "油罐信息",
},
name: "/baseInfo/oilTank",
path: "/baseInfo/oilTank",
},
{
alwaysShow: true,
component: 'index',
component: "index",
meta: {
icon: "el-icon-help",
title: "流量仪器"
title: "流量仪器",
},
name: "/baseInfo/flowInstrument",
path: "/baseInfo/flowInstrument",
},
{
alwaysShow: true,
component: 'index',
component: "index",
meta: {
icon: "el-icon-help",
title: "供应商信息"
title: "供应商信息",
},
name: "/baseInfo/supplier",
path: "/baseInfo/supplier",
}
]
},
],
},
// {
// alwaysShow: true,
@ -263,7 +268,6 @@
// path: "/rawMaterialInAndOutBound/index"
// },
// {
// alwaysShow: true,
// component: 'index',
@ -274,13 +278,11 @@
// name: "/project/index",
// path: "/project/index"
// },
]
}
],
};
},
computed: {
...mapGetters([
'sidebar'
]),
...mapGetters(["sidebar"]),
// routes() {
// f4d2e507-c4ed-451c-b364-04c08f962045
// console.log('78979789', this.$router.options.routes)
@ -296,20 +298,20 @@
// if (meta.activeMenu) {
// return meta.activeMenu
// }
return "/index"
return "/index";
},
showLogo() {
return this.$store.state.settings.sidebarLogo
return this.$store.state.settings.sidebarLogo;
},
variables() {
return variables
return variables;
},
isCollapse() {
return !this.sidebar.opened
}
return !this.sidebar.opened;
},
},
created() {
this.postHuoquyonghu()
this.postHuoquyonghu();
},
methods: {
//
@ -323,12 +325,12 @@
// 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
path: "*",
redirect: "/404",
hidden: true,
});
console.log("左侧菜单", this.routes);
return this.routes;
// })
// }
// })
@ -337,20 +339,20 @@
//
for (var i = 0; i < menus.length; i++) {
if (menus[i].children && menus[i].children.length != 0) {
this.resRouter(menus[i].children)
this.resRouter(menus[i].children);
}
if (menus[i].children.length == 0) {
delete menus[i].children
delete menus[i].redirect
delete menus[i].children;
delete menus[i].redirect;
}
if (menus[i].component == '') {
console.log('55555', menus[i])
if (menus[i].component == "") {
console.log("55555", menus[i]);
menus[i] = {
path: menus[i].path,
component: '',
component: "",
redirect: menus[i].path,
children: [menus[i]],
}
};
} else {
// menus[i] = {
// path: menus[i].path,
@ -360,10 +362,10 @@
// }
}
}
this.routes = menus
console.log('左侧菜单', this.routes)
return menus
this.routes = menus;
console.log("左侧菜单", this.routes);
return menus;
},
},
}
};
</script>

2
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/router/index.js

@ -20,7 +20,7 @@ export const constantRoutes = [{
},
{
path: '/',
redirect: 'index'
redirect: 'login'
}, {
path: '/login',
component: () => import('@/views/login/login.vue')

17
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/utils/request.js

@ -1,7 +1,13 @@
import axios from 'axios'
import { MessageBox, Message } from 'element-ui'
import {
MessageBox,
Message
} from 'element-ui'
import store from '@/store'
import { getToken, getStorage } from '@/utils/auth'
import {
getToken,
getStorage
} from '@/utils/auth'
// create an axios instance
const service = axios.create({
@ -51,7 +57,7 @@ service.interceptors.response.use(
response => {
const res = response.data
const statusCode = response.status
console.log('statusCode>>>' + statusCode)
// if the custom code is not 20000, it is judged as an error.
if (statusCode !== 200) {
Message({
@ -62,7 +68,8 @@ service.interceptors.response.use(
})
// 50008: Illegal token; 50012: Other clients logged in; 50014: Token expired;
if (statusCode === 401 || res.code === '5000' || res.code === 5000 || res.code === 50012 || res.code === 50014) {
if (statusCode === 401 || res.code === '5000' || res.code === 5000 || res.code === 50012 || res.code ===
50014) {
// to re-login
MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', {
confirmButtonText: '重新登录',
@ -77,7 +84,7 @@ service.interceptors.response.use(
}
return Promise.reject(new Error(res.message || 'Error'))
} else {
if (!res.success) {
if (!res.success && res.success !== null && res.success !== undefined) {
Message({
message: res.msg || 'Error',
type: 'error',

50
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/404.vue

@ -2,18 +2,43 @@
<div class="wscn-http404-container">
<div class="wscn-http404">
<div class="pic-404">
<img class="pic-404__parent" src="@/assets/404_images/404.png" alt="404">
<img class="pic-404__child left" src="@/assets/404_images/404_cloud.png" alt="404">
<img class="pic-404__child mid" src="@/assets/404_images/404_cloud.png" alt="404">
<img class="pic-404__child right" src="@/assets/404_images/404_cloud.png" alt="404">
<img
class="pic-404__parent"
src="@/assets/404_images/404.png"
alt="404"
/>
<img
class="pic-404__child left"
src="@/assets/404_images/404_cloud.png"
alt="404"
/>
<img
class="pic-404__child mid"
src="@/assets/404_images/404_cloud.png"
alt="404"
/>
<img
class="pic-404__child right"
src="@/assets/404_images/404_cloud.png"
alt="404"
/>
</div>
<div class="bullshit">
<div class="bullshit__oops">OOPS!</div>
<div class="bullshit__info">All rights reserved
<a style="color:#20a0ff" href="https://wallstreetcn.com" target="_blank">wallstreetcn</a>
<div class="bullshit__info">
All rights reserved
<a
style="color: #20a0ff"
href="https://wallstreetcn.com"
target="_blank"
>wallstreetcn</a
>
</div>
<div class="bullshit__headline">{{ message }}</div>
<div class="bullshit__info">Please check that the URL you entered is correct, or click the button below to return to the homepage.</div>
<div class="bullshit__info">
Please check that the URL you entered is correct, or click the button
below to return to the homepage.
</div>
<a href="" class="bullshit__return-home">Back to home</a>
</div>
</div>
@ -21,15 +46,14 @@
</template>
<script>
export default {
name: 'Page404',
name: "Page404",
computed: {
message() {
return 'The webmaster said that you can not enter this page...'
}
}
}
return "The webmaster said that you can not enter this page...";
},
},
};
</script>
<style lang="scss" scoped>

1
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/oilType/index.vue

@ -37,6 +37,7 @@
<el-table-column label="原油名称" prop="name" align="center" />
<el-table-column label="原油编码" prop="number" align="center" />
<el-table-column label="原油Code" prop="code" align="center" />
<el-table-column label="原油单价" prop="price" align="center" />
</el-table>
</div>
<div class="pages">

28
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/oilType/oilTypeAdd.vue

@ -28,6 +28,11 @@
<span class="item_text">原油Code</span>
<el-input v-model="formobj.code" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">原油单价</span>
<el-input v-model="formobj.price" @input="limitInput($event,'slPrice')" placeholder="" class="item_input"
clearable />
</div>
</el-card>
</div>
@ -45,11 +50,29 @@
sid: "",
name: "",
number: "",
code: ""
code: "",
price: "",
}
}
},
methods: {
/**
* 1必须为数字
* 2只能有一个小数点
* 3小数点后保留两位小数
* 4当第一位输入小数点的时候自动补全补为 0.
* 5除非是小数否则数字不能以0开头
* @param {string} value - 输入的值
* @param {string} name - 匹配的对象属性 [mkPrice | slPrice]
*/
limitInput(value, name) {
this.formobj.price =
("" + value) //
.replace(/[^\d^\.]+/g, "") //
.replace(/^0+(\d)/, "$1") // 00
.replace(/^\./, "0.") // 0.
.match(/^\d*(\.?\d{0,2})/g)[0] || ""; // 02
},
saveOrUpdate() {
if (this.formobj.sid) {
req.updateData(this.formobj)
@ -90,7 +113,8 @@
sid: "",
name: "",
number: "",
code: ""
code: "",
price: "",
}
this.$emit('doback')
},

10
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/index.vue

@ -11,8 +11,16 @@
name: '',
data() {
return {
token:''
token1:'',
token2:''
}
},
created() {
this.token1 = window.sessionStorage.getItem('tokenName');
this.token2 = window.sessionStorage.getItem('tokenValue');
console.log("tokenName2222", this.token1)
console.log("tokenValue222222", this.token2)
},
methods:{
// getToken(){

83
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/oilTankList/index.vue

@ -14,7 +14,7 @@
clearable />
</el-form-item>
<el-form-item label="日期">
<el-date-picker v-model="jmdListQuery.date" type="date" clearable value-format="yyyy-MM-dd"
<el-date-picker v-model="jmdListQuery.date" :picker-options="pickerOptions" type="date" clearable value-format="yyyy-MM-dd"
placeholder="选择日期" />
</el-form-item>
</el-form>
@ -30,6 +30,17 @@
<el-table-column prop="tankNumber" label="油罐编号" align="center" />
<el-table-column prop="existingInventory" label="油罐登记库存" align="center" />
<el-table-column prop="recordDate" label="登记日期" align="center" />
<el-table-column label="操作" width='150px' align="center">
<template slot-scope="scope">
<el-button
type="primary"
size="mini"
@click="purchase(scope.row)"
>
查看详情
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="pages">
@ -41,6 +52,29 @@
</div>
</div>
<el-dialog
:title="dialogTitle + '详细信息'"
:visible.sync="editDialog"
width="37%"
>
<el-form ref="form" :model="form" label-width="80px">
<el-form-item label="油罐编号:">
<span>{{ form.number }}</span>
</el-form-item>
<el-form-item label="登记日期:">
<span>{{ form.recordDate }}</span>
</el-form-item>
<el-form-item label="库存高度:">
<span>{{ form.height }}</span>
</el-form-item>
<el-form-item label="描述:" prop="url">
<el-popover placement="left" trigger="hover">
<img :src="form.url" style="width: 500px;height: 400px">
<img slot="reference" :src="form.url" style="width: 200px;height: 150px">
</el-popover>
</el-form-item>
</el-form>
</el-dialog>
</div>
</template>
@ -62,6 +96,8 @@
tabActiveName: 'uplog',
index: "0",
isSearchShow: false,
dialogTitle:'',
editDialog:false,
searchxianshitit: '显示查询条件',
btndisabled: false,
tableLoading1: false,
@ -97,6 +133,7 @@
}
],
logList: [],
form:{},
logListQuery: {
current: 1,
size: 10
@ -106,6 +143,11 @@
jmdListQuery: {
number: "",
date: ""
},
pickerOptions:{
disabledDate(time){
return time.getTime()> Date.now()- 8.64e7;// -8.64e7
}
}
}
},
@ -137,6 +179,7 @@
contractNumber: "",
date: ""
}
this.loadLogList()
},
//
btnHandle(btnKey) {
@ -189,37 +232,13 @@
doAdd2() {
this.viewState = 3
},
//
doBuild() {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
exportExcel(this.jmdListQuery).then((resp) => {
loading.close()
const blob = new Blob([resp], {
type: 'application/vnd.ms-excel;charset=UTF-8'
})
const fileName = '库存明细列表' + '.xls'
const elink = document.createElement('a')
elink.download = fileName
elink.style.display = 'nonde'
elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
elink.click()
URL.revokeObjectURL(elink.href)
document.body.removeChild(elink)
}).catch(() => {
loading.close()
purchase(row){
this.dialogTitle = "数据";
this.editDialog = true;
req.selectRecordBySid(row.sid).then((res)=>{
this.form=res.data
})
},
resetState() {
this.viewState = 1
},
@ -236,7 +255,9 @@
font-weight: bold;
margin: 25px 0 10px 0;
}
span{
margin-left: 20px;
}
.forminfo {
margin: 0;
padding: 0;

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save