diff --git a/warehousing-system/docs/sheji/warehouse数据库设计文档_1.0.0(1).doc b/warehousing-system/docs/sheji/warehouse数据库设计文档_1.0.0(1).doc new file mode 100644 index 00000000..996b8635 diff --git a/warehousing-system/docs/sheji/warehouse数据库设计文档_1.0.0.docx b/warehousing-system/docs/sheji/warehouse数据库设计文档_1.0.0.docx new file mode 100644 index 00000000..26759f19 --- /dev/null +++ b/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中的接口 + diff --git a/warehousing-system/docs/sheji/自营进货单.jpg b/warehousing-system/docs/sheji/自营进货单.jpg new file mode 100644 index 00000000..3af8e41c Binary files /dev/null and b/warehousing-system/docs/sheji/自营进货单.jpg differ diff --git a/warehousing-system/docs/sheji/配货出货单(明细).jpg b/warehousing-system/docs/sheji/配货出货单(明细).jpg new file mode 100644 index 00000000..f896213e Binary files /dev/null and b/warehousing-system/docs/sheji/配货出货单(明细).jpg differ diff --git a/warehousing-system/docs/sheji/配货出货单明细.xls b/warehousing-system/docs/sheji/配货出货单明细.xls new file mode 100644 index 00000000..1172c1b6 Binary files /dev/null and b/warehousing-system/docs/sheji/配货出货单明细.xls differ diff --git a/warehousing-system/warehouse数据库设计文档_1.0.0.doc b/warehousing-system/warehouse数据库设计文档_1.0.0.doc new file mode 100644 index 00000000..f98d710a diff --git a/yxt-portal-ui/src/assets/loginImg/001.jpg b/yxt-portal-ui/src/assets/loginImg/001.jpg new file mode 100644 index 00000000..44da3e60 Binary files /dev/null and b/yxt-portal-ui/src/assets/loginImg/001.jpg differ diff --git a/yxt-portal-ui/src/assets/loginImg/002.jpg b/yxt-portal-ui/src/assets/loginImg/002.jpg new file mode 100644 index 00000000..3992d79c Binary files /dev/null and b/yxt-portal-ui/src/assets/loginImg/002.jpg differ diff --git a/yxt-portal-ui/src/assets/loginImg/003.jpg b/yxt-portal-ui/src/assets/loginImg/003.jpg new file mode 100644 index 00000000..ccb597b1 Binary files /dev/null and b/yxt-portal-ui/src/assets/loginImg/003.jpg differ diff --git a/yxt-portal-ui/src/views/login/login.vue b/yxt-portal-ui/src/views/login/login.vue index 7cbb3e50..83098e7f 100644 --- a/yxt-portal-ui/src/views/login/login.vue +++ b/yxt-portal-ui/src/views/login/login.vue @@ -1,33 +1,49 @@ diff --git a/yxt-supervise-cyf/docs/databases/create_table.sql b/yxt-supervise-cyf/docs/databases/create_table.sql index db8cd25b..5f788a99 100644 --- a/yxt-supervise-cyf/docs/databases/create_table.sql +++ b/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; @@ -331,4 +333,57 @@ CREATE TABLE `supplier_information` ( 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; \ No newline at end of file diff --git a/yxt-supervise-cyf/docs/databases/data_init.sql b/yxt-supervise-cyf/docs/databases/data_init.sql new file mode 100644 index 00000000..a54a874d --- /dev/null +++ b/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'); + + + + diff --git a/yxt-supervise-cyf/docs/sheji/favicon_logosc.zip b/yxt-supervise-cyf/docs/sheji/favicon_logosc.zip new file mode 100644 index 00000000..4d052195 Binary files /dev/null and b/yxt-supervise-cyf/docs/sheji/favicon_logosc.zip differ diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/appversion/AppVersion.java b/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/appversion/AppVersion.java new file mode 100644 index 00000000..c7899d07 --- /dev/null +++ b/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; +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/appversion/AppVersionDetailsVo.java b/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/appversion/AppVersionDetailsVo.java new file mode 100644 index 00000000..a0026833 --- /dev/null +++ b/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; +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/appversion/AppVersionDto.java b/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/appversion/AppVersionDto.java new file mode 100644 index 00000000..d591fabd --- /dev/null +++ b/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; +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/appversion/AppVersionVo.java b/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/appversion/AppVersionVo.java new file mode 100644 index 00000000..68123273 --- /dev/null +++ b/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; +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilinventoryrecord/CrudeOilInventoryRecord.java b/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilinventoryrecord/CrudeOilInventoryRecord.java index feb32891..3498d80d 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilinventoryrecord/CrudeOilInventoryRecord.java +++ b/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; } diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoiloutbound/CrudeOilOutbound.java b/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoiloutbound/CrudeOilOutbound.java index fae581c6..645bd98f 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoiloutbound/CrudeOilOutbound.java +++ b/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; } diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilpricerecord/CrudeOilPriceRecord.java b/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilpricerecord/CrudeOilPriceRecord.java new file mode 100644 index 00000000..75c799f0 --- /dev/null +++ b/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; + +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilpricerecord/CrudeOilPriceRecordDetailsVo.java b/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilpricerecord/CrudeOilPriceRecordDetailsVo.java new file mode 100644 index 00000000..2719edf3 --- /dev/null +++ b/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; +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilpricerecord/CrudeOilPriceRecordDto.java b/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilpricerecord/CrudeOilPriceRecordDto.java new file mode 100644 index 00000000..1177def4 --- /dev/null +++ b/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; +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilpricerecord/CrudeOilPriceRecordQuery.java b/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilpricerecord/CrudeOilPriceRecordQuery.java new file mode 100644 index 00000000..e2bdfca0 --- /dev/null +++ b/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; +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilpricerecord/CrudeOilPriceRecordVo.java b/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilpricerecord/CrudeOilPriceRecordVo.java new file mode 100644 index 00000000..35d508e6 --- /dev/null +++ b/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; +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilstorage/CrudeOilStorage.java b/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilstorage/CrudeOilStorage.java index 3fc3191f..e6dcf379 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoilstorage/CrudeOilStorage.java +++ b/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; } diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoiltypeinformation/CrudeOilTypeInformation.java b/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoiltypeinformation/CrudeOilTypeInformation.java index bcf24585..e182e7ca 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoiltypeinformation/CrudeOilTypeInformation.java +++ b/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; } diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoiltypeinformation/CrudeOilTypeInformationDto.java b/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoiltypeinformation/CrudeOilTypeInformationDto.java index 684bd035..d74526dd 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoiltypeinformation/CrudeOilTypeInformationDto.java +++ b/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; } diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoiltypeinformation/CrudeOilTypeInformationVo.java b/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoiltypeinformation/CrudeOilTypeInformationVo.java index 56408a8f..4e4d40c6 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/crudeoiltypeinformation/CrudeOilTypeInformationVo.java +++ b/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; } diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/sysuser/SysUser.java b/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/sysuser/SysUser.java new file mode 100644 index 00000000..1c67ebaa --- /dev/null +++ b/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(门户建设)
+ * File: SysUser.java
+ * Class: SysUser
+ * Description: 用户表.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2021-08-03 00:24:30
+ * + * @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; +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/sysuser/SysUserDto.java b/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/sysuser/SysUserDto.java new file mode 100644 index 00000000..0ee6a810 --- /dev/null +++ b/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(门户建设)
+ * File: SysUserDto.java
+ * Class: SysUserDto
+ * Description: 用户表 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2021-08-03 00:24:30
+ * + * @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; + +} \ No newline at end of file diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/sysuser/SysUserQuery.java b/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/sysuser/SysUserQuery.java new file mode 100644 index 00000000..28cd58ff --- /dev/null +++ b/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(门户建设)
+ * File: SysUserQuery.java
+ * Class: SysUserQuery
+ * Description: 用户表 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2021-08-03 00:24:30
+ * + * @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; +} \ No newline at end of file diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/sysuser/SysUserVo.java b/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/sysuser/SysUserVo.java new file mode 100644 index 00000000..fc9e8b61 --- /dev/null +++ b/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(门户建设)
+ * File: SysUserVo.java
+ * Class: SysUserVo
+ * Description: 用户表 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2021-08-03 00:24:30
+ * + * @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 roleSids = new ArrayList<>(); + + private String defaultOrgPath; + private String defaultOrgPathName; + + @ApiModelProperty("是否需要更换密码") + private Boolean needResetPsd; + @ApiModelProperty("工号") + private String jobNumber; +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/tankinformation/TankInformation.java b/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/tankinformation/TankInformation.java index 2f7d4626..fa7c02de 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/tankinformation/TankInformation.java +++ b/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; } diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/tankinformation/TankInformationVo.java b/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/tankinformation/TankInformationVo.java index 55c8ade8..0c61bba4 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/tankinformation/TankInformationVo.java +++ b/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; } diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/pom.xml b/yxt-supervise-cyf/yxt-supervise-cyf-biz/pom.xml index 15599ec2..4734f52b 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-biz/pom.xml +++ b/yxt-supervise-cyf/yxt-supervise-cyf-biz/pom.xml @@ -52,6 +52,23 @@ 4.0.1 compile + + + cn.dev33 + sa-token-spring-boot-starter + 1.34.0 + + + + net.sf.json-lib + json-lib + jdk15 + 2.4 + + + org.projectlombok + lombok + diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/appversion/AppVersionMapper.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/appversion/AppVersionMapper.java new file mode 100644 index 00000000..1ad8cf9b --- /dev/null +++ b/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 getAll(); + + AppVersion selectAppVersion(); +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/appversion/AppVersionMapper.xml b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/appversion/AppVersionMapper.xml new file mode 100644 index 00000000..0610b2c6 --- /dev/null +++ b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/appversion/AppVersionMapper.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/appversion/AppVersionRest.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/appversion/AppVersionRest.java new file mode 100644 index 00000000..8a6585c3 --- /dev/null +++ b/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 map = new HashMap(); +// 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 map = new HashMap(); + 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); + } +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/appversion/AppVersionService.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/appversion/AppVersionService.java new file mode 100644 index 00000000..3fdbbf94 --- /dev/null +++ b/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 { + + 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(); + } +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/crudeoilpricerecord/CrudeOilPriceRecordAppMapper.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/crudeoilpricerecord/CrudeOilPriceRecordAppMapper.java new file mode 100644 index 00000000..1c863764 --- /dev/null +++ b/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 { + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper 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> maps); +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/crudeoilpricerecord/CrudeOilPriceRecordAppMapper.xml b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/crudeoilpricerecord/CrudeOilPriceRecordAppMapper.xml new file mode 100644 index 00000000..c238120e --- /dev/null +++ b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/crudeoilpricerecord/CrudeOilPriceRecordAppMapper.xml @@ -0,0 +1,29 @@ + + + + + + + + insert into crude_oil_storage_file (sid, url, mainSid) values + + ( + #{item.sid,jdbcType=VARCHAR}, + #{item.url,jdbcType=VARCHAR}, + #{item.mainSid,jdbcType=VARCHAR} + ) + + + \ No newline at end of file diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/crudeoilpricerecord/CrudeOilPriceRecordAppRest.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/crudeoilpricerecord/CrudeOilPriceRecordAppRest.java new file mode 100644 index 00000000..f4d243cc --- /dev/null +++ b/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> listPage(@RequestBody PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = CrudeOilPriceRecordService.listPageVo(pq); + return rb.success().setData(pv); + } + @ApiOperation("新增") + @PostMapping("/save") + public ResultBean save (@RequestBody CrudeOilPriceRecordDto dto){ + return CrudeOilPriceRecordService.save(dto); + } + + +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/crudeoilpricerecord/CrudeOilPriceRecordAppService.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/crudeoilpricerecord/CrudeOilPriceRecordAppService.java new file mode 100644 index 00000000..8bc792f8 --- /dev/null +++ b/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 { + @Autowired + TankInformationAppMapper tankInformationMapper; + + public PagerVo listPageVo(PagerQuery pq) { + CrudeOilPriceRecordQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo 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().eq("sid",sid)); + return rb.success().setMsg("删除成功"); + } +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/crudeoilstorage/CrudeOilStorageAppMapper.xml b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/crudeoilstorage/CrudeOilStorageAppMapper.xml index ec321e30..b819d398 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/crudeoilstorage/CrudeOilStorageAppMapper.xml +++ b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/crudeoilstorage/CrudeOilStorageAppMapper.xml @@ -5,11 +5,13 @@ + SELECT + * + FROM + supplier_information + + ${ew.sqlSegment} + + + + \ No newline at end of file diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/supplierinformation/SupplierInformationAppRest.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/supplierinformation/SupplierInformationAppRest.java new file mode 100644 index 00000000..b0c6983a --- /dev/null +++ b/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> listPage(@RequestBody PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = RawSupplierInformationService.listPageVo(pq); + return rb.success().setData(pv); + } + @ApiOperation("查询数据的列表") + @PostMapping("/supplierList") + public ResultBean> typeList() { + ResultBean rb = ResultBean.fireFail(); + List 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); + } +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/supplierinformation/SupplierInformationAppService.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/supplierinformation/SupplierInformationAppService.java new file mode 100644 index 00000000..4ebe32db --- /dev/null +++ b/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 { + + + public PagerVo listPageVo(PagerQuery pq) { + SupplierInformationQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + if(StringUtils.isNotBlank(query.getSupplierName())){ + qw.like("supplierName",query.getSupplierName()); + } + if(StringUtils.isNotBlank(query.getSupplierCode())){ + qw.like("supplierCode",query.getSupplierCode()); + } + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + public List 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().eq("sid",sid)); + return rb.success().setMsg("删除成功"); + } +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/sysuser/CyfSysUserAppMapper.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/sysuser/CyfSysUserAppMapper.java new file mode 100644 index 00000000..8dc0d166 --- /dev/null +++ b/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 { + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper 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); +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/sysuser/CyfSysUserAppMapper.xml b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/sysuser/CyfSysUserAppMapper.xml new file mode 100644 index 00000000..8a8e851d --- /dev/null +++ b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/sysuser/CyfSysUserAppMapper.xml @@ -0,0 +1,16 @@ + + + + + + + + \ No newline at end of file diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/sysuser/CyfSysUserAppRest.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/sysuser/CyfSysUserAppRest.java new file mode 100644 index 00000000..5054e07f --- /dev/null +++ b/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); + } + +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/sysuser/CyfSysUserAppService.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/app/sysuser/CyfSysUserAppService.java new file mode 100644 index 00000000..e2fde098 --- /dev/null +++ b/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 { + + + + 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().eq("userName",userName).eq("password",password)); + } + public SysUser getUserById(String id){ + return baseMapper.selectOne(new QueryWrapper().eq("id",id)); + } + +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/config/SaTokenConfigure.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/config/SaTokenConfigure.java new file mode 100644 index 00000000..63bf6430 --- /dev/null +++ b/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"); + } +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilinventoryrecord/CrudeOilInventoryRecordMapper.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilinventoryrecord/CrudeOilInventoryRecordMapper.java index d0000c5d..be59d9ba 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilinventoryrecord/CrudeOilInventoryRecordMapper.java +++ b/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 { IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper 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> maps); + + CrudeOilInventoryRecord selectRecordBySid(@Param("sid") String sid); } diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilinventoryrecord/CrudeOilInventoryRecordMapper.xml b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilinventoryrecord/CrudeOilInventoryRecordMapper.xml index 6bd3e96d..b1167f71 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilinventoryrecord/CrudeOilInventoryRecordMapper.xml +++ b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilinventoryrecord/CrudeOilInventoryRecordMapper.xml @@ -24,4 +24,10 @@ + \ No newline at end of file diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilinventoryrecord/CrudeOilInventoryRecordRest.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilinventoryrecord/CrudeOilInventoryRecordRest.java index 295ca2ef..5010dca8 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilinventoryrecord/CrudeOilInventoryRecordRest.java +++ b/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); + } } diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilinventoryrecord/CrudeOilInventoryRecordService.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilinventoryrecord/CrudeOilInventoryRecordService.java index 16ccf006..be6f0ca6 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilinventoryrecord/CrudeOilInventoryRecordService.java +++ b/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().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); + } } diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoiloutbound/CrudeOilOutboundMapper.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoiloutbound/CrudeOilOutboundMapper.java index e6585c19..b24ef000 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoiloutbound/CrudeOilOutboundMapper.java +++ b/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 { IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper 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> maps); } diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoiloutbound/CrudeOilOutboundRest.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoiloutbound/CrudeOilOutboundRest.java index c26ccabd..cb3a4aad 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoiloutbound/CrudeOilOutboundRest.java +++ b/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){ diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilpricerecord/CrudeOilPriceRecordMapper.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilpricerecord/CrudeOilPriceRecordMapper.java new file mode 100644 index 00000000..66c42810 --- /dev/null +++ b/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 { + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper 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> maps); +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilpricerecord/CrudeOilPriceRecordMapper.xml b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilpricerecord/CrudeOilPriceRecordMapper.xml new file mode 100644 index 00000000..42d85d61 --- /dev/null +++ b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilpricerecord/CrudeOilPriceRecordMapper.xml @@ -0,0 +1,29 @@ + + + + + + + + insert into crude_oil_storage_file (sid, url, mainSid) values + + ( + #{item.sid,jdbcType=VARCHAR}, + #{item.url,jdbcType=VARCHAR}, + #{item.mainSid,jdbcType=VARCHAR} + ) + + + \ No newline at end of file diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilpricerecord/CrudeOilPriceRecordRest.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilpricerecord/CrudeOilPriceRecordRest.java new file mode 100644 index 00000000..880c4188 --- /dev/null +++ b/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> listPage(@RequestBody PagerQuery pq) { + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = CrudeOilPriceRecordService.listPageVo(pq); + return rb.success().setData(pv); + } + @ApiOperation("新增") + @PostMapping("/save") + public ResultBean save (@RequestBody CrudeOilPriceRecordDto dto){ + return CrudeOilPriceRecordService.save(dto); + } + + +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilpricerecord/CrudeOilPriceRecordService.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilpricerecord/CrudeOilPriceRecordService.java new file mode 100644 index 00000000..af244bb6 --- /dev/null +++ b/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 { + @Autowired + TankInformationMapper tankInformationMapper; + + public PagerVo listPageVo(PagerQuery pq) { + CrudeOilPriceRecordQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo 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().eq("sid",sid)); + return rb.success().setMsg("删除成功"); + } +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilstorage/CrudeOilStorageMapper.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilstorage/CrudeOilStorageMapper.java index 00a44ca9..9dd8622b 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilstorage/CrudeOilStorageMapper.java +++ b/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 { IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + @Select("select * from crude_oil_type_information where sid=#{sid}") CrudeOilStorage getCrudeBySid(@Param("sid")String sid); + void insertCrudeOilFiles(List> 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); } diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilstorage/CrudeOilStorageRest.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilstorage/CrudeOilStorageRest.java index 8e4365bc..80e979c8 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilstorage/CrudeOilStorageRest.java +++ b/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); + } } diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilstorage/CrudeOilStorageService.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilstorage/CrudeOilStorageService.java index d69082c9..e80c43aa 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoilstorage/CrudeOilStorageService.java +++ b/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().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); + } } diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoiltypeinformation/CrudeOilTypeInformationService.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoiltypeinformation/CrudeOilTypeInformationService.java index 34b0eae1..e6a79c49 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/crudeoiltypeinformation/CrudeOilTypeInformationService.java +++ b/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 { - + @Autowired + CrudeOilPriceRecordService crudeOilPriceRecordService; + @Autowired + CrudeOilPriceRecordMapper crudeOilPriceRecordMapper; + @Autowired + TankInformationService tankInformationService; public PagerVo listPageVo(PagerQuery pq) { CrudeOilTypeInformationQuery query = pq.getParams(); @@ -55,6 +67,12 @@ public class CrudeOilTypeInformationService extends MybatisBaseService().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 tank=tankInformationService.list(new QueryWrapper().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){ diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/sysuser/CyfSysUserMapper.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/sysuser/CyfSysUserMapper.java new file mode 100644 index 00000000..1c2f6758 --- /dev/null +++ b/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 { + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper 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); +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/sysuser/CyfSysUserMapper.xml b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/sysuser/CyfSysUserMapper.xml new file mode 100644 index 00000000..20640731 --- /dev/null +++ b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/sysuser/CyfSysUserMapper.xml @@ -0,0 +1,16 @@ + + + + + + + + \ No newline at end of file diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/sysuser/CyfSysUserRest.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/sysuser/CyfSysUserRest.java new file mode 100644 index 00000000..917c0181 --- /dev/null +++ b/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); + } + +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/sysuser/CyfSysUserService.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/sysuser/CyfSysUserService.java new file mode 100644 index 00000000..5b991a7c --- /dev/null +++ b/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 { + + + + 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().eq("userName",userName).eq("password",password)); + } + public SysUser getUserById(String id){ + return baseMapper.selectOne(new QueryWrapper().eq("id",id)); + } + +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/tankinformation/TankInformationService.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/tankinformation/TankInformationService.java index 7e66c29f..286c99a6 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/tankinformation/TankInformationService.java +++ b/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 { - + @Autowired + CrudeOilTypeInformationService crudeOilTypeInformationService; + @Autowired + CrudeOilPriceRecordService crudeOilPriceRecordService; public PagerVo listPageVo(PagerQuery pq) { TankInformationQuery query = pq.getParams(); QueryWrapper qw = new QueryWrapper<>(); @@ -47,6 +56,14 @@ public class TankInformationService extends MybatisBaseService().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("新增成功"); } diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/util/JsonUtils.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/util/JsonUtils.java new file mode 100644 index 00000000..0d296e72 --- /dev/null +++ b/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. + *

+ * 如果JSON字符串为Null或"null"字符串, 返回Null. 如果JSON字符串为"[]", 返回空集合. + *

+ * 如需反序列化复杂Collection如List, 请使用fromJson(String, JavaType) + */ + public static T fromJson(String jsonString, Class 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 readJsonList(String jsondata, Object object) { + try { + List> list = objectMapper.readValue( + jsondata, List.class); + + List objects = Lists.newArrayList(); + System.out.println(list.size()); + for (int i = 0; i < list.size(); i++) { + Map map = list.get(i); + Set set = map.keySet(); + for (Iterator 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 List json2list(String jsonArrayStr, Class clazz) throws Exception { + List> list = (List) objectMapper.readValue(jsonArrayStr, new TypeReference>() { + }); + List result = new ArrayList(); + Iterator var4 = list.iterator(); + + while (var4.hasNext()) { + Map map = (Map) var4.next(); + result.add(map2pojo(map, clazz)); + } + + return result; + } + + public static T map2pojo(Map map, Class clazz) { + return objectMapper.convertValue(map, clazz); + } + + /** + * 解析json属性,放到实体里面去 + * + * @param @param jsondata + * @param @param collectionClass + * @param @return 设定文件 + * @return List 返回类型 + * @throws + * @Title: readJsonList + * @Description: TODO(这里用一句话描述这个方法的作用) + */ + @SuppressWarnings("unchecked") + public static List readJsonList(String jsondata, Class collectionClass) { + try { + ObjectMapper mapper = new ObjectMapper(); + JavaType javaType = getCollectionType(ArrayList.class, collectionClass); + List lst = (List) mapper.readValue(jsondata, javaType); + + return lst; + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + + /** + * json 转map + * + * @param @param jsondata + * @param @return 设定文件 + * @return Map> 返回类型 + * @throws + * @Title: readJsonMap + * @Description: TODO(这里用一句话描述这个方法的作用) + */ + @SuppressWarnings("unchecked") + public static Map readJsonToMap(String jsondata) { + try { + Map maps = objectMapper.readValue(jsondata, Map.class); + //System.out.println(maps); + return maps; + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + @SuppressWarnings("unchecked") + public static Map readJsonToMap1(String jsondata) { + try { + Map 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 jsonToPojo(String jsonData, Class 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 List jsonToList(String jsonData, Class beanType) { + JavaType javaType = objectMapper.getTypeFactory().constructParametricType(List.class, beanType); + try { + List list = objectMapper.readValue(jsonData, javaType); + return list; + } catch (Exception e) { + e.printStackTrace(); + } + + return null; + } + + public static void main(String[] args) { + Map userData = Maps.newHashMap(); + Map nameStruct = Maps.newHashMap(); + nameStruct.put("firstName", "张三"); + nameStruct.put("lastName", "你大爷"); + + System.out.println(JsonUtils.toJsonStr(nameStruct)); + userData.put("name", nameStruct); + userData.put("age", 20); + List 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 map = readJsonToMap(ss); + + if (map != null) { + System.out.println(map.get("address")); + } + } + + +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/util/JsonValueProcessorImpl.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/util/JsonValueProcessorImpl.java new file mode 100644 index 00000000..c27a9cb2 --- /dev/null +++ b/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; + +/** + *

Title: JsonValueProcessorImpl.java

+ *

Description: net.js.json 特殊值处理

+ *

Copyright: Copyright (c) 2014-2018

+ *

Company: leimingtech.com

+ * + * @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(); + } + +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/util/MyModule.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/util/MyModule.java new file mode 100644 index 00000000..74fd5b9e --- /dev/null +++ b/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); + } +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/util/PropertyFilterMixIn.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/util/PropertyFilterMixIn.java new file mode 100644 index 00000000..f03ef456 --- /dev/null +++ b/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 { + +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/util/TimeSecound.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/util/TimeSecound.java new file mode 100644 index 00000000..51b03d85 --- /dev/null +++ b/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; + } +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/util/ValidatorUtils.java b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/util/ValidatorUtils.java new file mode 100644 index 00000000..5dde1946 --- /dev/null +++ b/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 list = (List) str; + if (list.size() > 0) + return true; + + return false; + } + + return true; + } else { + return false; + } + } + + /** + * 判断内容是空 + * + * @param str + * @return + */ + public static boolean isEmpty(Object str) { + if (str == null || str.toString().trim().length() == 0) { + return true; + } else { + return false; + } + } + + /** + * 检查对象是否为空 + * + * @param obj 要检查的数据(数据类型: String、Number、Boolean、Collection、Map、Object[]) + * @return true: 为空; false: 不为空
  • String:值为 null、""、"0" 时返回 true
  • + * Number:值为 null、0 时返回 true
  • Boolean:值为 null、false 时返回 true
  • + * Collection:值为 null、size=0 时返回 true
  • Map:值为 null、size=0 时返回 + * true
  • Object[]:值为 null、length=0 时返回 true + */ + @SuppressWarnings("unchecked") + public static boolean empty(Object obj) { + if (obj == null) { + return true; + } else if (obj instanceof String && (obj.equals(""))) { + return true; + } else if (obj instanceof Number && ((Number) obj).doubleValue() == 0) { + return true; + } else if (obj instanceof Boolean && !((Boolean) obj)) { + return true; + } else if (obj instanceof Collection && ((Collection) obj).isEmpty()) { + return true; + } else if (obj instanceof Map && ((Map) obj).isEmpty()) { + return true; + } else if (obj instanceof Object[] && ((Object[]) obj).length == 0) { + return true; + } + return false; + } + + /** + * 判断是否是合法邮箱地址 + * + * @param email + * @return + */ + public static boolean isEmail(String email) { + Pattern p = Pattern + .compile("^\\w+([\\-+.]\\w+)*@\\w+([-.]\\w+)*\\.[a-z]{2,3}"); + Matcher m = p.matcher(email); + return m.matches(); + } + + /** + * 只包含英文字母和数字、下划线 + * + * @param str + * @return + */ + public static boolean onlyNumAndChar(String str) { + String regex = "^[a-zA-Z0-9_]+$"; + Pattern pattern = Pattern.compile(regex); + return pattern.matcher(str).matches(); + } + + /** + * 必须包含字母 + * + * @param str + * @return + */ + public static boolean hasLetterAndNum(String str) { + Pattern pattern = Pattern.compile("^(?=.*[a-zA-Z].*).{6,}$"); + return pattern.matcher(str).matches(); + } + + /** + * 是否长度符合 + * + * @param str + * @param min 最小 + * @param max 最大 + * @return + */ + public static boolean lengthBetween(String str, int min, int max) { + return str.length() >= min && str.length() <= max; + } + + /** + * 判断字符串是否是数字 + * + * @param str + * @return + */ + public static boolean isNumeric(String str) { + Pattern pattern = Pattern.compile("[0-9]*"); + Matcher isNum = pattern.matcher(str); + if (!isNum.matches()) { + return false; + } + return true; + } + + public static Double rountTwo(Double num) { + if (num != null) { + BigDecimal b = new BigDecimal(num); + Double d = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); + return d; + } else { + return null; + } + } + + public static String doubleTrans(double d) { + if (Math.round(d) - d == 0) { + return String.valueOf((long) d); + } + return String.valueOf(d); + } + + /** + * 获取结束时间与当前的时间差 + * + * @param endTime + * @return + */ + public static TimeSecound getTimeSecound(Date endTime) { + + long diff = endTime.getTime() - System.currentTimeMillis();// 这样得到的差值是微秒级别 + + long days = diff / (1000 * 60 * 60 * 24);//天 + + long hours = (diff - days * (1000 * 60 * 60 * 24)) + / (1000 * 60 * 60); //小时 + long mins = (diff - days * (1000 * 60 * 60 * 24) - hours * (1000 * 60 * 60)) / (1000 * 60); //小时 + long sc = (diff - days * (1000 * 60 * 60 * 24) - hours + * (1000 * 60 * 60) - mins * (1000 * 60)) / (1000); // 秒 + + return new TimeSecound(days, hours, mins, sc); + } +} diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/resources/application.yml b/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/resources/application.yml index d100d436..14cccaf6 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/resources/application.yml +++ b/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映射文件 diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/.env.development b/yxt-supervise-cyf/yxt-supervise-cyf-ui/.env.development index 8a48175f..9acebe8d 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/.env.development +++ b/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" diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/flowInstrument/flowInstrument.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/flowInstrument/flowInstrument.js index 20d3bde3..72a187c8 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/flowInstrument/flowInstrument.js +++ b/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 } }) }, diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilTank/oilTank.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilTank/oilTank.js index 9b87d206..0411342d 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilTank/oilTank.js +++ b/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 } }); }, diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilType/oilType.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilType/oilType.js index 09a34acd..58ab53c7 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilType/oilType.js +++ b/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 } }) }, diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilTypeInAndOutBound/oilTypeInAndOutBound.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilTypeInAndOutBound/oilTypeInAndOutBound.js index 9c82e36c..210ebceb 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilTypeInAndOutBound/oilTypeInAndOutBound.js +++ b/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 } }) }, diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialInAndOutBound/rawMaterialInAndOutBound.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialInAndOutBound/rawMaterialInAndOutBound.js index c048e6b2..feffb8ab 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialInAndOutBound/rawMaterialInAndOutBound.js +++ b/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 } }) }, diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialInfo/rawMaterialInfo.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialInfo/rawMaterialInfo.js index 18041138..ab4a0ea6 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialInfo/rawMaterialInfo.js +++ b/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 } }) }, diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialType/rawMaterialType.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialType/rawMaterialType.js index 5af15e7d..1003730f 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialType/rawMaterialType.js +++ b/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 } }) }, diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/supplier/supplier.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/supplier/supplier.js index 50fac6ce..c9ac3283 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/supplier/supplier.js +++ b/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 } }) }, diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/user.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/user.js index dba15f70..5ba06bd2 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/user.js +++ b/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({ diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/assets/home/bj.jpg b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/assets/home/bj.jpg new file mode 100644 index 00000000..209287ae Binary files /dev/null and b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/assets/home/bj.jpg differ diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/layout/components/Navbar.vue b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/layout/components/Navbar.vue index a15bb217..ce084f0d 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/layout/components/Navbar.vue +++ b/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() }, diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/layout/components/Sidebar/index.vue b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/layout/components/Sidebar/index.vue index 70bce73e..20333cab 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/layout/components/Sidebar/index.vue +++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/layout/components/Sidebar/index.vue @@ -1,369 +1,371 @@ diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/router/index.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/router/index.js index 85eee04e..a166b139 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/router/index.js +++ b/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') diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/utils/request.js b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/utils/request.js index 12093fa6..194f41dc 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/utils/request.js +++ b/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', diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/404.vue b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/404.vue index 1791f55a..3b3d95e2 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/404.vue +++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/404.vue @@ -2,18 +2,43 @@
    - 404 - 404 - 404 - 404 + 404 + 404 + 404 + 404
    OOPS!
    -
    All rights reserved - wallstreetcn +
    + All rights reserved + wallstreetcn
    {{ message }}
    -
    Please check that the URL you entered is correct, or click the button below to return to the homepage.
    +
    + Please check that the URL you entered is correct, or click the button + below to return to the homepage. +
    Back to home
    @@ -21,20 +46,19 @@ + \ No newline at end of file diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/index.vue b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/index.vue index 32f742ca..52931c87 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/index.vue +++ b/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(){ diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/oilTankList/index.vue b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/oilTankList/index.vue index 6512c468..02b2b391 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/oilTankList/index.vue +++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/oilTankList/index.vue @@ -14,7 +14,7 @@ clearable /> - @@ -28,8 +28,19 @@ - + + + +
    @@ -41,6 +52,29 @@
    + + + + {{ form.number }} + + + {{ form.recordDate }} + + + {{ form.height }} + + + + + + + + + @@ -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,7 +143,12 @@ jmdListQuery: { number: "", date: "" - } + }, + pickerOptions:{ + disabledDate(time){ + return time.getTime()> Date.now()- 8.64e7;// 如果没有后面的-8.64e7就是不可以选择今天的 + } + } } }, mounted() { @@ -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)' + purchase(row){ + this.dialogTitle = "数据"; + this.editDialog = true; + req.selectRecordBySid(row.sid).then((res)=>{ + this.form=res.data }) - - 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() - }) - }, - 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; diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/oilTypeInBoundList/index.vue b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/oilTypeInBoundList/index.vue index c836b632..95c174eb 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/oilTypeInBoundList/index.vue +++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/oilTypeInBoundList/index.vue @@ -38,6 +38,17 @@ + + +
    @@ -47,6 +58,83 @@
    + + +
    +
    原油信息
    +
    + + + + 销售合同编号 + + + + + {{form.contractNumber}} + + + + + 签订时间 + + + + + {{form.contractSigningDate}} + + + + + + + 净重 + + + + + {{form.weight}} + + + + + 价值 + + + + + {{form.value}} + + + + + + + 发货车牌号 + + + + + {{form.licensePlateNumber}} + + + + + 入库日期 + + + + + {{form.warehousingDate}} + + + +
    +
    @@ -74,6 +162,9 @@ btndisabled: false, tableLoading1: false, tableLoading2: false, + dialogTitle:'', + editDialog:false, + form:{}, btnList: [ // 右上角按钮 // { // type: 'success', @@ -179,6 +270,13 @@ this.loadLogList() this.loadIn112List() }, + purchase(row){ + this.dialogTitle = "数据"; + this.editDialog = true; + req.selectStorageBySid(row.sid).then((res)=>{ + this.form=res.data + }) + }, handleOrder(tab, event) { console.log("tab", tab) // this.listQuery.status = tab.name; diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/oilTypeOutBoundList/index.vue b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/oilTypeOutBoundList/index.vue index ebcee6dc..b79d0c7f 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/oilTypeOutBoundList/index.vue +++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/oilTypeOutBoundList/index.vue @@ -37,6 +37,17 @@ + + +
    @@ -47,6 +58,73 @@
    + + +
    +
    原油信息
    +
    + + + + 销售合同编号 + + + + + {{form.salesContractNumber}} + + + + + 签订时间 + + + + + {{form.contractSigningDate}} + + + + + + + 净重 + + + + + {{form.weight}} + + + + + 价值 + + + + + {{form.value}} + + + + + + + 出库日期 + + + + + {{form.deliveryDate}} + + + +
    +
    @@ -72,6 +150,9 @@ btndisabled: false, tableLoading1: false, tableLoading2: false, + dialogTitle:'', + editDialog:false, + form:{}, btnList: [ // 右上角按钮 // { // type: 'success', @@ -148,6 +229,13 @@ // } }, + purchase(row){ + this.dialogTitle = "数据"; + this.editDialog = true; + req.getCrudeBySid(row.sid).then((res)=>{ + this.form=res.data + }) + }, resetQuery() { this.jmdListQuery = { contractNumber: "", diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/login/login.vue b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/login/login.vue index 985a79b2..4c5749fe 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/login/login.vue +++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/login/login.vue @@ -1,8 +1,9 @@ diff --git a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/supervise/recordOilTank/index.vue b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/supervise/recordOilTank/index.vue index 476cd48c..10c8cb1c 100644 --- a/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/supervise/recordOilTank/index.vue +++ b/yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/supervise/recordOilTank/index.vue @@ -24,7 +24,7 @@
    油罐库存高度: - +
    登记材料: @@ -65,6 +65,23 @@ this.getTankList() }, methods: { + /** + * 1、必须为数字 + * 2、只能有一个小数点 + * 3、小数点后保留两位小数 + * 4、当第一位输入小数点的时候自动补全,补为 0. + * 5、除非是小数,否则数字不能以0开头 + * @param {string} value - 输入的值 + * @param {string} name - 匹配的对象属性 [mkPrice | slPrice] + */ + limitInput(value, name) { + this.formobj.height = + ("" + value) // 第一步:转成字符串 + .replace(/[^\d^\.]+/g, "") // 第二步:把不是数字,不是小数点的过滤掉 + .replace(/^0+(\d)/, "$1") // 第三步:第一位0开头,0后面为数字,则过滤掉,取后面的数字 + .replace(/^\./, "0.") // 第四步:如果输入的第一位为小数点,则替换成 0. 实现自动补全 + .match(/^\d*(\.?\d{0,2})/g)[0] || ""; // 第五步:最终匹配得到结果 以数字开头,只有一个小数点,而且小数点后面只能有0到2位小数 + }, getTankList() { req2.tankList().then((res) => { if (res.success) { diff --git a/yxt-supervise-dbcenter/docs/databases/conf_brand_proportion.sql b/yxt-supervise-dbcenter/docs/databases/conf_brand_proportion.sql index 1f0a489c..079fe66a 100644 --- a/yxt-supervise-dbcenter/docs/databases/conf_brand_proportion.sql +++ b/yxt-supervise-dbcenter/docs/databases/conf_brand_proportion.sql @@ -22,7 +22,7 @@ SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- DROP TABLE IF EXISTS `conf_brand_proportion`; CREATE TABLE `conf_brand_proportion` ( - `id` int(11) NOT NULL COMMENT 'id', +`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id', `brandSid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '品牌Sid', `brandName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '品牌名称', `typeName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '占比名称', diff --git a/yxt-supervise-dbcenter/docs/databases/table_create-data-init.sql b/yxt-supervise-dbcenter/docs/databases/table_create-data-init.sql index 4fdd92ad..cf1c8320 100644 --- a/yxt-supervise-dbcenter/docs/databases/table_create-data-init.sql +++ b/yxt-supervise-dbcenter/docs/databases/table_create-data-init.sql @@ -10,3 +10,24 @@ INSERT INTO `enp_store` (`sid`, `name`, `code`, `enpSid`, `enpCode`, `enpName`, ('10010101', '熟溢香振头店', '10010101', '1001', '1001', '中鸿记','100101', '100101', '熟溢香'), ('10010102', '馍馍卤振岗店', '10010102', '1001', '1001', '中鸿记','100102', '100102', '馍馍卤'), ('10010103', '馍馍卤雅清街店', '10010103', '1001', '1001', '中鸿记','100102', '100102', '馍馍卤'); + + + +INSERT INTO `enp_brand` (`sid`, `name`, `code`, `enpSid`, `enpCode`, `enpName`) VALUES + ('100103', '杨麻子大饼', '100103', '1001', '1001', '中鸿记'); +INSERT INTO `enp_store` (`sid`, `name`, `code`, `enpSid`, `enpCode`, `enpName`, `brandSid`, `brandCode`, `brandName`) VALUES + ('10010301', '(红旗店)桥西区红旗大街分公司', '10010301', '1001', '1001', '中鸿记','100103', '100103', '杨麻子大饼'); + +INSERT INTO `conf_brand_proportion` (`brandSid`, `brandName`, `typeName`, `proportion`) VALUES + ('100101', '熟溢香', '面', '10'), + ('100101', '熟溢香', '米', '2'), + ('100101', '熟溢香', '油', '5'), + ('100102', '馍馍卤', '面', '15'), + ('100102', '馍馍卤', '米', '10'), + ('100102', '馍馍卤', '油', '5'); + +INSERT INTO `conf_brand_proportion` (`brandSid`, `brandName`, `typeName`, `proportion`) VALUES + ('100103', '杨麻子大饼', '面类', '5.36'), + ('100103', '杨麻子大饼', '米类', '0.74'), + ('100103', '杨麻子大饼', '食用油', '4.92'); + \ No newline at end of file diff --git a/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/CrawlTask.java b/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/CrawlTask.java index 3d98a7cb..33a5e11b 100644 --- a/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/CrawlTask.java +++ b/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/CrawlTask.java @@ -27,13 +27,13 @@ public class CrawlTask { * 描述 : 每天上午10点30分抓取数据并保存到数据库.
    *

    */ - @Scheduled(cron = "0 30 10 * * ?") + @Scheduled(cron = "0 0 5 * * ?") public void pullZhjData() { String currDay = DateUtil.format(DateUtil.offsetDay(new Date(), -1), "yyyy-MM-dd"); - String purchaseDay = DateUtil.format(DateUtil.offsetDay(new Date(), -2), "yyyy-MM-dd"); +// String purchaseDay = DateUtil.format(DateUtil.offsetDay(new Date(), -2), "yyyy-MM-dd"); ThreadUtil.execute(() -> crawlSalesAmountService.pullData(currDay)); ThreadUtil.execute(() -> crawlSalesDishesService.pullData(currDay)); - ThreadUtil.execute(() -> crawlPurchaseService.pullData(purchaseDay)); + ThreadUtil.execute(() -> crawlPurchaseService.pullData(currDay)); } } diff --git a/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/ZhjSpider.java b/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/ZhjSpider.java index 2163e981..cea514d2 100644 --- a/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/ZhjSpider.java +++ b/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/ZhjSpider.java @@ -3,6 +3,7 @@ package com.yxt.supervise.dbcenter.zhj.crawl; import cn.hutool.http.HttpRequest; import cn.hutool.json.JSONUtil; import com.yxt.supervise.dbcenter.zhj.crawl.spider.*; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -18,8 +19,8 @@ public class ZhjSpider { private static String url = "https://bi.aliyuncs.com/api/v2/biPlatform/query/byQueryParam"; private static String reportId = "85c4af04-1910-4005-8e47-742af1acb713"; private static String olapQueryParam_salesAmount = "{\"componentId\":\"52dece2d-ba6d-452e-8497-f94baff096c4\",\"componentName\":\"指标看板-熟溢香支付方式_knief\",\"configs\":[{\"type\":\"field\",\"config\":{\"fields\":[{\"guid\":\"31ce439f-747c-45d0-8f35-51fe9daea91e\",\"fid\":\"5805bc15e1\",\"areaType\":\"row\"},{\"guid\":\"6e8c6afd-038a-4644-85c1-ffb813dc8614\",\"fid\":\"fa1b7a0d21\",\"areaType\":\"column\",\"aggregate\":\"sum\"}]},\"cubeId\":\"90bb4e6c-c315-465b-9c3b-74a22a0d84e6\"},{\"type\":\"paging\",\"cubeId\":\"90bb4e6c-c315-465b-9c3b-74a22a0d84e6\",\"config\":{\"limit\":1000,\"offset\":0,\"pagedByAllDim\":true}},{\"type\":\"beforeAggregateCondition\",\"cubeId\":\"90bb4e6c-c315-465b-9c3b-74a22a0d84e6\",\"config\":{\"logicalOperator\":\"AND\",\"conditions\":[{\"field\":{\"fid\":\"3fd928d207\"},\"functionalOperator\":\"in\",\"args\":[{\"valueType\":\"string\",\"value\":\"POS点餐\"},{\"valueType\":\"string\",\"value\":\"会员充值\"},{\"valueType\":\"string\",\"value\":\"扫码点餐\"},{\"valueType\":\"string\",\"value\":\"美团外卖点餐\"},{\"valueType\":\"string\",\"value\":\"饿了么外卖点餐\"}]},{\"logicalOperator\":\"AND\",\"conditions\":[{\"field\":{\"fid\":\"15784307a1\",\"dateTrunc\":\"day\"},\"functionalOperator\":\"greaterThanOrEqual\",\"args\":[{\"valueType\":\"string\",\"value\":\"VAR_DATE_STR\"}]},{\"field\":{\"fid\":\"15784307a1\",\"dateTrunc\":\"day\"},\"functionalOperator\":\"lessThanOrEqual\",\"args\":[{\"valueType\":\"string\",\"value\":\"VAR_DATE_STR\"}]}]}]}},{\"type\":\"queryConfig\",\"cubeId\":\"90bb4e6c-c315-465b-9c3b-74a22a0d84e6\",\"config\":{\"needCount\":false,\"queryCount\":false,\"queryDetail\":false}},{\"type\":\"advancedParam\",\"cubeId\":\"90bb4e6c-c315-465b-9c3b-74a22a0d84e6\",\"config\":{\"autoInsightParam\":{\"enable\":false},\"wordCloudParam\":{},\"summarizeParams\":[],\"trendLineParams\":[],\"forecastParams\":[],\"anomalyDetectionParams\":[],\"clusteringParams\":[],\"groupParam\":null}},{\"type\":\"annotationParam\",\"cubeId\":\"90bb4e6c-c315-465b-9c3b-74a22a0d84e6\",\"config\":{\"measureThresholdParams\":[],\"inflectionPointParams\":[]}}],\"dataType\":\"general\",\"reportId\":\"85c4af04-1910-4005-8e47-742af1acb713\"}"; - private static String olapQueryParam_salesDishes = "{\"componentId\":\"8d8a8363-89d8-4bec-9a58-c7c13ae63f15\",\"componentName\":\"菜品销量\",\"configs\":[{\"type\":\"field\",\"config\":{\"fields\":[{\"guid\":\"f8e0f500-ffc6-4821-9190-5cd3b3c906e9\",\"fid\":\"19a1d100cc\",\"areaType\":\"row\"},{\"guid\":\"1c13f425-828d-48ad-8549-de85dd3c259e\",\"fid\":\"2083fd4437\",\"areaType\":\"row\"},{\"guid\":\"07b482d2-b2e3-4a64-9d8d-3e30c03dfec6\",\"fid\":\"0e325d5eed\",\"areaType\":\"column\",\"granularity\":null,\"aggregate\":\"sum\"},{\"guid\":\"a4cfd195-dfd3-4947-a024-076ca806793f\",\"fid\":\"b9d5c6b646\",\"areaType\":\"column\",\"aggregate\":\"avg\"}]},\"cubeId\":\"a16139f4-8f21-4172-afb9-5de69719590e\"},{\"type\":\"paging\",\"cubeId\":\"a16139f4-8f21-4172-afb9-5de69719590e\",\"config\":{\"limit\":1000,\"offset\":0,\"pagedByAllDim\":true}},{\"type\":\"beforeAggregateCondition\",\"cubeId\":\"a16139f4-8f21-4172-afb9-5de69719590e\",\"config\":{\"logicalOperator\":\"AND\",\"conditions\":[{\"field\":{\"fid\":\"1ca1ab13fe\"},\"functionalOperator\":\"in\",\"args\":[{\"valueType\":\"string\",\"value\":\"熟溢香\"}]},{\"field\":{\"fid\":\"1ca1ab13fe\"},\"functionalOperator\":\"in\",\"args\":[{\"valueType\":\"string\",\"value\":\"熟溢香\"}]},{\"field\":{\"fid\":\"e3aec87664\"},\"functionalOperator\":\"in\",\"args\":[{\"valueType\":\"string\",\"value\":\"V_STORE_NAME\"}]},{\"logicalOperator\":\"AND\",\"conditions\":[{\"field\":{\"fid\":\"8e55928f76\",\"dateTrunc\":\"day\"},\"functionalOperator\":\"greaterThanOrEqual\",\"args\":[{\"valueType\":\"string\",\"value\":\"VAR_DATE_STR\"}]},{\"field\":{\"fid\":\"8e55928f76\",\"dateTrunc\":\"day\"},\"functionalOperator\":\"lessThanOrEqual\",\"args\":[{\"valueType\":\"string\",\"value\":\"VAR_DATE_STR\"}]}]}]}},{\"type\":\"queryConfig\",\"cubeId\":\"a16139f4-8f21-4172-afb9-5de69719590e\",\"config\":{\"needCount\":true,\"queryCount\":false,\"queryDetail\":false}},{\"type\":\"advancedParam\",\"cubeId\":\"a16139f4-8f21-4172-afb9-5de69719590e\",\"config\":{\"autoInsightParam\":{\"enable\":false},\"wordCloudParam\":{},\"summarizeParams\":[],\"trendLineParams\":[],\"forecastParams\":[],\"anomalyDetectionParams\":[],\"clusteringParams\":[],\"groupParam\":null}},{\"type\":\"annotationParam\",\"cubeId\":\"a16139f4-8f21-4172-afb9-5de69719590e\",\"config\":{\"measureThresholdParams\":[],\"inflectionPointParams\":[]}}],\"dataType\":\"pivot\",\"reportId\":\"85c4af04-1910-4005-8e47-742af1acb713\"}"; - private static String olapQueryParam_purchase = "{\"componentId\":\"1cdfd850-7d65-48ca-b71d-03c9e1b979ac\",\"componentName\":\"熟溢香馍馍卤采购明细表\",\"configs\":[{\"type\":\"field\",\"config\":{\"fields\":[{\"guid\":\"899dd166-55f9-4ada-9f32-856f86cab0ce\",\"fid\":\"5f2e64d20f\",\"areaType\":\"column\"},{\"guid\":\"bf3d46dd-3759-49a2-a035-424023202ce8\",\"fid\":\"6dd7171857\",\"areaType\":\"column\",\"dateTrunc\":\"day\"},{\"guid\":\"82f79e88-5328-40f6-9ea8-9a5a91c389cd\",\"fid\":\"22b739da7f\",\"areaType\":\"column\"},{\"guid\":\"f563a6d0-6604-4b12-915a-94421dca00d6\",\"fid\":\"c6139dca5d\",\"areaType\":\"column\"},{\"guid\":\"17c3dfb5-a9b5-4d16-965b-36ce7ab704c9\",\"fid\":\"dde06772b7\",\"areaType\":\"column\"},{\"guid\":\"26c3dcd5-3e1e-46cd-8a0a-7af9c0871efa\",\"fid\":\"118f5bd47e\",\"areaType\":\"column\"},{\"guid\":\"665a4b3d-30d0-42bd-a4c6-7096bb252e4e\",\"fid\":\"a112247f18\",\"areaType\":\"column\"}]},\"cubeId\":\"de60b1eb-37fa-4d0c-b02a-47c6f00b061b\"},{\"type\":\"paging\",\"cubeId\":\"de60b1eb-37fa-4d0c-b02a-47c6f00b061b\",\"config\":{\"limit\":1000,\"offset\":0,\"pagedByAllDim\":true}},{\"type\":\"beforeAggregateCondition\",\"cubeId\":\"de60b1eb-37fa-4d0c-b02a-47c6f00b061b\",\"config\":{\"logicalOperator\":\"AND\",\"conditions\":[{\"field\":{\"fid\":\"5f2e64d20f\"},\"functionalOperator\":\"in\",\"args\":[{\"valueType\":\"string\",\"value\":\"熟溢香振头店\"},{\"valueType\":\"string\",\"value\":\"馍馍卤振岗店\"},{\"valueType\":\"string\",\"value\":\"馍馍卤雅清街店\"}]},{\"logicalOperator\":\"AND\",\"conditions\":[{\"field\":{\"fid\":\"6dd7171857\",\"dateTrunc\":\"day\"},\"functionalOperator\":\"greaterThanOrEqual\",\"args\":[{\"valueType\":\"string\",\"value\":\"VAR_DATE_STR\"}]},{\"field\":{\"fid\":\"6dd7171857\",\"dateTrunc\":\"day\"},\"functionalOperator\":\"lessThanOrEqual\",\"args\":[{\"valueType\":\"string\",\"value\":\"VAR_DATE_STR\"}]}]},{\"field\":{\"fid\":\"e8201f16d9\"},\"functionalOperator\":\"in\",\"args\":[{\"valueType\":\"string\",\"value\":\"熟溢香\"}]}]}},{\"type\":\"queryConfig\",\"cubeId\":\"de60b1eb-37fa-4d0c-b02a-47c6f00b061b\",\"config\":{\"needCount\":true,\"queryCount\":false,\"queryDetail\":true}},{\"type\":\"advancedParam\",\"cubeId\":\"de60b1eb-37fa-4d0c-b02a-47c6f00b061b\",\"config\":{\"autoInsightParam\":{\"enable\":false},\"wordCloudParam\":{},\"summarizeParams\":[],\"trendLineParams\":[],\"forecastParams\":[],\"anomalyDetectionParams\":[],\"clusteringParams\":[],\"groupParam\":null}},{\"type\":\"annotationParam\",\"cubeId\":\"de60b1eb-37fa-4d0c-b02a-47c6f00b061b\",\"config\":{\"measureThresholdParams\":[],\"inflectionPointParams\":[]}}],\"dataType\":\"general\",\"reportId\":\"85c4af04-1910-4005-8e47-742af1acb713\"}"; + private static String olapQueryParam_salesDishes = "{\"componentId\":\"8d8a8363-89d8-4bec-9a58-c7c13ae63f15\",\"componentName\":\"菜品销量\",\"configs\":[{\"type\":\"field\",\"config\":{\"fields\":[{\"guid\":\"f8e0f500-ffc6-4821-9190-5cd3b3c906e9\",\"fid\":\"19a1d100cc\",\"areaType\":\"row\"},{\"guid\":\"1c13f425-828d-48ad-8549-de85dd3c259e\",\"fid\":\"2083fd4437\",\"areaType\":\"row\"},{\"guid\":\"07b482d2-b2e3-4a64-9d8d-3e30c03dfec6\",\"fid\":\"0e325d5eed\",\"areaType\":\"column\",\"granularity\":null,\"aggregate\":\"sum\"},{\"guid\":\"a4cfd195-dfd3-4947-a024-076ca806793f\",\"fid\":\"b9d5c6b646\",\"areaType\":\"column\",\"aggregate\":\"avg\"}]},\"cubeId\":\"a16139f4-8f21-4172-afb9-5de69719590e\"},{\"type\":\"paging\",\"cubeId\":\"a16139f4-8f21-4172-afb9-5de69719590e\",\"config\":{\"limit\":1000,\"offset\":0,\"pagedByAllDim\":true}},{\"type\":\"beforeAggregateCondition\",\"cubeId\":\"a16139f4-8f21-4172-afb9-5de69719590e\",\"config\":{\"logicalOperator\":\"AND\",\"conditions\":[{\"field\":{\"fid\":\"5e0adf962d\"},\"functionalOperator\":\"in\",\"args\":[{\"valueType\":\"string\",\"value\":\"bk\"}]},{\"field\":{\"fid\":\"5e0adf962d\"},\"functionalOperator\":\"in\",\"args\":[{\"valueType\":\"string\",\"value\":\"bk\"}]},{\"field\":{\"fid\":\"e3aec87664\"},\"functionalOperator\":\"in\",\"args\":[{\"valueType\":\"string\",\"value\":\"V_STORE_NAME\"}]},{\"logicalOperator\":\"AND\",\"conditions\":[{\"field\":{\"fid\":\"8e55928f76\",\"dateTrunc\":\"day\"},\"functionalOperator\":\"greaterThanOrEqual\",\"args\":[{\"valueType\":\"string\",\"value\":\"VAR_DATE_STR\"}]},{\"field\":{\"fid\":\"8e55928f76\",\"dateTrunc\":\"day\"},\"functionalOperator\":\"lessThanOrEqual\",\"args\":[{\"valueType\":\"string\",\"value\":\"VAR_DATE_STR\"}]}]}]}},{\"type\":\"sort\",\"cubeId\":\"a16139f4-8f21-4172-afb9-5de69719590e\",\"config\":{\"sortFields\":[{\"sortType\":\"desc\",\"guid\":\"07b482d2-b2e3-4a64-9d8d-3e30c03dfec6\",\"dimValues\":[],\"groupSort\":false}]}},{\"type\":\"queryConfig\",\"cubeId\":\"a16139f4-8f21-4172-afb9-5de69719590e\",\"config\":{\"needCount\":true,\"queryCount\":false,\"queryDetail\":false}},{\"type\":\"advancedParam\",\"cubeId\":\"a16139f4-8f21-4172-afb9-5de69719590e\",\"config\":{\"autoInsightParam\":{\"enable\":false},\"wordCloudParam\":{},\"summarizeParams\":[],\"trendLineParams\":[],\"forecastParams\":[],\"anomalyDetectionParams\":[],\"clusteringParams\":[],\"groupParam\":null}},{\"type\":\"annotationParam\",\"cubeId\":\"a16139f4-8f21-4172-afb9-5de69719590e\",\"config\":{\"measureThresholdParams\":[],\"inflectionPointParams\":[]}}],\"dataType\":\"pivot\",\"reportId\":\"85c4af04-1910-4005-8e47-742af1acb713\"}"; + private static String olapQueryParam_purchase = "{\"componentId\":\"1cdfd850-7d65-48ca-b71d-03c9e1b979ac\",\"componentName\":\"采购明细表\",\"configs\":[{\"type\":\"field\",\"config\":{\"fields\":[{\"guid\":\"899dd166-55f9-4ada-9f32-856f86cab0ce\",\"fid\":\"5f2e64d20f\",\"areaType\":\"column\"},{\"guid\":\"bf3d46dd-3759-49a2-a035-424023202ce8\",\"fid\":\"6dd7171857\",\"areaType\":\"column\",\"dateTrunc\":\"day\"},{\"guid\":\"82f79e88-5328-40f6-9ea8-9a5a91c389cd\",\"fid\":\"22b739da7f\",\"areaType\":\"column\"},{\"guid\":\"f563a6d0-6604-4b12-915a-94421dca00d6\",\"fid\":\"c6139dca5d\",\"areaType\":\"column\"},{\"guid\":\"17c3dfb5-a9b5-4d16-965b-36ce7ab704c9\",\"fid\":\"dde06772b7\",\"areaType\":\"column\"},{\"guid\":\"26c3dcd5-3e1e-46cd-8a0a-7af9c0871efa\",\"fid\":\"118f5bd47e\",\"areaType\":\"column\"},{\"guid\":\"665a4b3d-30d0-42bd-a4c6-7096bb252e4e\",\"fid\":\"a112247f18\",\"areaType\":\"column\"}]},\"cubeId\":\"de60b1eb-37fa-4d0c-b02a-47c6f00b061b\"},{\"type\":\"paging\",\"cubeId\":\"de60b1eb-37fa-4d0c-b02a-47c6f00b061b\",\"config\":{\"limit\":1000,\"offset\":0,\"pagedByAllDim\":true}},{\"type\":\"beforeAggregateCondition\",\"cubeId\":\"de60b1eb-37fa-4d0c-b02a-47c6f00b061b\",\"config\":{\"logicalOperator\":\"AND\",\"conditions\":[{\"field\":{\"fid\":\"18913ee52b\"},\"functionalOperator\":\"in\",\"args\":[{\"valueType\":\"string\",\"value\":\"bk\"}]},{\"logicalOperator\":\"AND\",\"conditions\":[{\"field\":{\"fid\":\"6dd7171857\",\"dateTrunc\":\"day\"},\"functionalOperator\":\"greaterThanOrEqual\",\"args\":[{\"valueType\":\"string\",\"value\":\"VAR_DATE_STR\"}]},{\"field\":{\"fid\":\"6dd7171857\",\"dateTrunc\":\"day\"},\"functionalOperator\":\"lessThanOrEqual\",\"args\":[{\"valueType\":\"string\",\"value\":\"VAR_DATE_STR\"}]}]}]}},{\"type\":\"queryConfig\",\"cubeId\":\"de60b1eb-37fa-4d0c-b02a-47c6f00b061b\",\"config\":{\"needCount\":true,\"queryCount\":false,\"queryDetail\":true}},{\"type\":\"advancedParam\",\"cubeId\":\"de60b1eb-37fa-4d0c-b02a-47c6f00b061b\",\"config\":{\"autoInsightParam\":{\"enable\":false},\"wordCloudParam\":{},\"summarizeParams\":[],\"trendLineParams\":[],\"forecastParams\":[],\"anomalyDetectionParams\":[],\"clusteringParams\":[],\"groupParam\":null}},{\"type\":\"annotationParam\",\"cubeId\":\"de60b1eb-37fa-4d0c-b02a-47c6f00b061b\",\"config\":{\"measureThresholdParams\":[],\"inflectionPointParams\":[]}}],\"dataType\":\"general\",\"reportId\":\"85c4af04-1910-4005-8e47-742af1acb713\"}"; public static void maintest(String[] args) { @@ -64,7 +65,7 @@ public class ZhjSpider { } public static void main(String[] args) { - List s = ZhjSpider.crawlSalesAmount("20230508"); + List s = ZhjSpider.crawlSalesAmount("20230508"); // List s = ZhjSpider.crawlSalesDishes("20230509", "熟溢香振头店"); // List s = ZhjSpider.crawlPurchase("20230508"); System.out.println(s); @@ -171,9 +172,18 @@ public class ZhjSpider { } public static ZhjResp dopost(Map paramMap) { - HttpRequest request = ZhjSpiderConfig.fillHeaders(HttpRequest.post(url)); + HttpRequest post = HttpRequest.post(url); +// post.enableDefaultCookie(); +// post.disableCookie(); + HttpRequest request = ZhjSpiderConfig.fillHeaders(post); String result = request.form(paramMap).execute().body(); - L.debug("param:{}######result:{}", paramMap.toString(), result); + L.info("param:{}", paramMap.toString()); + L.info("######result-111:{}", result); + if (StringUtils.isBlank(result)) { + ZhjSpiderConfig.switchVer(); + result = ZhjSpiderConfig.fillHeaders(post).form(paramMap).execute().body(); + L.info("######result-222:{}", result); + } ZhjResp bean = JSONUtil.toBean(result, ZhjResp.class); return bean; } diff --git a/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/ZhjSpiderConfig.java b/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/ZhjSpiderConfig.java index 67b42752..a072f49c 100644 --- a/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/ZhjSpiderConfig.java +++ b/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/ZhjSpiderConfig.java @@ -23,10 +23,26 @@ public class ZhjSpiderConfig { return request; } + private static String v_flag = "1"; + private static void initHeaders() { CACHE_HEADERS = new HashMap<>(); - CACHE_HEADERS.put("cookie", "cna=QZ74GyioHjsCAWpxs/DlZflP; qbi_locale=zh-CN; x_login_pk=19b6a50a88ee4c8cbeacee4420345262; csrf_token=be21ee6f-fb65-4978-b58f-53bc1ad0e7a6; qbi_version=2; qbi_redirected=1; xlly_s=1; isg=BPn5lzNHubARqWVPDzIOHAr9CGXTBu24S0hh_Bss2SCfoho0YlOFiBw0JKZUGoXw"); - CACHE_HEADERS.put("x-csrf-token", "be21ee6f-fb65-4978-b58f-53bc1ad0e7a6"); - CACHE_HEADERS.put("x-gw-referer", "https://bi.aliyuncs.com/token3rd/dashboard/view/pc.htm?pageId=85c4af04-1910-4005-8e47-742af1acb713&accessToken=d8c021cd40ad94b2d500d12229b57c3e&dd_orientation=auto&qbi_version_param=2"); +// CACHE_HEADERS.put("cookie", "cna=QZ74GyioHjsCAWpxs/DlZflP; qbi_locale=zh-CN; x_login_pk=19b6a50a88ee4c8cbeacee4420345262; xlly_s=1; qbi_version=1; qbi_redirected=1; csrf_token=f66e628f-d681-4be5-855e-56e77886e002; isg=BIqKYOxE2qEZjVZawN-NAZ2Y23Asew7V-iD6yBTCI11JxyuB_Q3P5fXx1zMbN4Zt"); +// CACHE_HEADERS.put("cookie", "cna=QZ74GyioHjsCAWpxs/DlZflP; qbi_locale=zh-CN; x_login_pk=19b6a50a88ee4c8cbeacee4420345262; csrf_token=f66e628f-d681-4be5-855e-56e77886e002; qbi_version=2; xlly_s=1; isg=BLe3V-4In-iHGRsxfXgo-thHRqsBfIven4934wljCQdwuN36EEhuLkRemhjmUGNW"); + CACHE_HEADERS.put("cookie", "cna=QZ74GyioHjsCAWpxs/DlZflP; qbi_locale=zh-CN; x_login_pk=19b6a50a88ee4c8cbeacee4420345262; csrf_token=f66e628f-d681-4be5-855e-56e77886e002; qbi_version=" + v_flag + "; xlly_s=1; isg=BLe3V-4In-iHGRsxfXgo-thHRqsBfIven4934wljCQdwuN36EEhuLkRemhjmUGNW"); +// CACHE_HEADERS.put("x-csrf-token", "f66e628f-d681-4be5-855e-56e77886e002"); + CACHE_HEADERS.put("x-csrf-token", "f66e628f-d681-4be5-855e-56e77886e002"); +// CACHE_HEADERS.put("x-gw-referer", "https://bi.aliyuncs.com/token3rd/dashboard/view/pc.htm?pageId=85c4af04-1910-4005-8e47-742af1acb713&accessToken=d8c021cd40ad94b2d500d12229b57c3e&dd_orientation=auto&qbi_version_param=1"); +// CACHE_HEADERS.put("x-gw-referer", "https://bi.aliyuncs.com/token3rd/dashboard/view/pc.htm?pageId=85c4af04-1910-4005-8e47-742af1acb713&accessToken=d8c021cd40ad94b2d500d12229b57c3e&dd_orientation=auto&qbi_version_param=2"); + CACHE_HEADERS.put("x-gw-referer", "https://bi.aliyuncs.com/token3rd/dashboard/view/pc.htm?pageId=85c4af04-1910-4005-8e47-742af1acb713&accessToken=d8c021cd40ad94b2d500d12229b57c3e&dd_orientation=auto&qbi_version_param=" + v_flag); +// CACHE_HEADERS.put("x-gw-referer", "https://bi.aliyuncs.com/token3rd/dashboard/view/pc.htm?pageId=85c4af04-1910-4005-8e47-742af1acb713&accessToken=d8c021cd40ad94b2d500d12229b57c3e&dd_orientation=auto"); + } + + public static void switchVer() { + if ("1".equals(v_flag)) + v_flag = "2"; + else + v_flag = "1"; + initHeaders(); } } diff --git a/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/biz/confBrandProportion/ConfBrandProportionMapper.java b/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/biz/confBrandProportion/ConfBrandProportionMapper.java index 70604900..8e4b02a5 100644 --- a/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/biz/confBrandProportion/ConfBrandProportionMapper.java +++ b/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/biz/confBrandProportion/ConfBrandProportionMapper.java @@ -13,7 +13,7 @@ import java.util.List; @Mapper public interface ConfBrandProportionMapper extends BaseMapper { - List selectConfBrandProportionList(); + List selectConfBrandProportionList(@Param("brandSid") String brandSid); List selectBrandProportionByBrandName(@Param("brandName") String brandName); } diff --git a/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/biz/confBrandProportion/ConfBrandProportionMapper.xml b/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/biz/confBrandProportion/ConfBrandProportionMapper.xml index 200ca5dc..a9b5a2c5 100644 --- a/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/biz/confBrandProportion/ConfBrandProportionMapper.xml +++ b/yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/main/java/com/yxt/supervise/dbcenter/zhj/crawl/biz/confBrandProportion/ConfBrandProportionMapper.xml @@ -2,7 +2,7 @@