格式化代码

This commit is contained in:
chenxudong 2025-05-26 14:38:56 +08:00
parent 407e22aabe
commit 46dc09ffe8
20 changed files with 596 additions and 511 deletions

View File

@ -1,12 +1,7 @@
package com.electromagnetic.industry.software.manage.config; package com.electromagnetic.industry.software.manage.config;
import org.springframework.ai.chat.client.advisor.MessageChatMemoryAdvisor;
import org.springframework.ai.embedding.EmbeddingModel;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.Map;
@Component @Component
public class AiAdvisor { public class AiAdvisor {

View File

@ -22,7 +22,6 @@ import com.electromagnetic.industry.software.manage.pojo.req.QueryDTO;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.ai.chat.client.ChatClient; import org.springframework.ai.chat.client.ChatClient;
import org.springframework.ai.chat.client.advisor.MessageChatMemoryAdvisor;
import org.springframework.ai.chat.messages.UserMessage; import org.springframework.ai.chat.messages.UserMessage;
import org.springframework.ai.chat.model.ChatResponse; import org.springframework.ai.chat.model.ChatResponse;
import org.springframework.ai.chat.prompt.Prompt; import org.springframework.ai.chat.prompt.Prompt;

View File

@ -1,7 +1,9 @@
package com.electromagnetic.industry.software.manage.service.serviceimpl; package com.electromagnetic.industry.software.manage.service.serviceimpl;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.electromagnetic.industry.software.common.enums.DataOwnEnum; import com.electromagnetic.industry.software.common.enums.DataOwnEnum;
import com.electromagnetic.industry.software.common.enums.EffectFlagEnum; import com.electromagnetic.industry.software.common.enums.EffectFlagEnum;
import com.electromagnetic.industry.software.common.enums.EleDataStatusEnum; import com.electromagnetic.industry.software.common.enums.EleDataStatusEnum;
@ -92,10 +94,13 @@ public class PermissionServiceImpl implements PermissionService {
.eq(RolePermission::getPermissionCode, FilePermission.VIEW.getCode()); .eq(RolePermission::getPermissionCode, FilePermission.VIEW.getCode());
List<String> ids = rolePermissionService.listObjs(queryWrapper1).stream().map(Object::toString).toList(); List<String> ids = rolePermissionService.listObjs(queryWrapper1).stream().map(Object::toString).toList();
if (CollUtil.isEmpty(ids)) {
return new ArrayList<>();
}
Set<String> result = new HashSet<>(); Set<String> result = new HashSet<>();
// 把父亲节点加上 // 把父亲节点加上
for (String id : ids) { List<EdFileInfo> edFileInfos = edFileInfoMapper.selectList(Wrappers.lambdaQuery(EdFileInfo.class).in(EdFileInfo::getId, ids));
EdFileInfo file = edFileInfoMapper.selectById(id); for (EdFileInfo file : edFileInfos) {
String[] parentIds = file.getFilePath().split("_"); String[] parentIds = file.getFilePath().split("_");
result.addAll(Arrays.asList(parentIds)); result.addAll(Arrays.asList(parentIds));
} }

View File

@ -166,7 +166,8 @@
where r.id in (select ur.role_id where r.id in (select ur.role_id
from ed_users u from ed_users u
left join ed_user_role ur on u.id = ur.user_id left join ed_user_role ur on u.id = ur.user_id
where u.id = #{userId} and ur.effect_flag = 1) where u.id = #{userId}
and ur.effect_flag = 1)
</select> </select>
</mapper> </mapper>

View File

@ -1 +1,5 @@
function r(o){throw new Error('Could not dynamically require "'+o+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}export{r as c}; function r(o) {
throw new Error('Could not dynamically require "' + o + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')
}
export {r as c};

View File

@ -1 +1,6 @@
const s=(t,r)=>{const o=t.__vccOpts||t;for(const[c,e]of r)o[c]=e;return o};export{s as _}; const s = (t, r) => {
const o = t.__vccOpts || t;
for (const [c, e] of r) o[c] = e;
return o
};
export {s as _};

View File

@ -1 +1,7 @@
.backup-setting-management[data-v-592b576d]{background-color:#fff;padding:16px 24px;display:flex;flex-direction:column;height:100%} .backup-setting-management[data-v-592b576d] {
background-color: #fff;
padding: 16px 24px;
display: flex;
flex-direction: column;
height: 100%
}

View File

@ -1 +1,7 @@
.file-type-management[data-v-4e509c99]{background-color:#fff;padding:16px 24px;display:flex;flex-direction:column;height:100%} .file-type-management[data-v-4e509c99] {
background-color: #fff;
padding: 16px 24px;
display: flex;
flex-direction: column;
height: 100%
}

View File

@ -1 +1,7 @@
.icon[data-v-0273bbfb]{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden} .icon[data-v-0273bbfb] {
width: 1em;
height: 1em;
vertical-align: -.15em;
fill: currentColor;
overflow: hidden
}

View File

@ -1 +1,3 @@
.round[data-v-52b10b31]{border-radius:18px} .round[data-v-52b10b31] {
border-radius: 18px
}

View File

@ -1 +1,2 @@
const t=""+new URL("not-data-Byd7gMOX.png",import.meta.url).href;export{t as n}; const t = "" + new URL("not-data-Byd7gMOX.png", import.meta.url).href;
export {t as n};

View File

@ -1 +1,8 @@
System.register([],(function(e,t){"use strict";return{execute:function(){e("n",""+new URL("not-data-Byd7gMOX.png",t.meta.url).href)}}})); System.register([], (function (e, t) {
"use strict";
return {
execute: function () {
e("n", "" + new URL("not-data-Byd7gMOX.png", t.meta.url).href)
}
}
}));

View File

@ -1 +1,12 @@
import{t as e,aY as a,cA as r}from"./index-CnBLdARH.js";function u(){const t=e(!0);return a(()=>{t.value=!0}),r(()=>{t.value=!1}),t}export{u}; import {aY as a, cA as r, t as e} from "./index-CnBLdARH.js";
function u() {
const t = e(!0);
return a(() => {
t.value = !0
}), r(() => {
t.value = !1
}), t
}
export {u};

View File

@ -1 +1,9 @@
import{aC as a,v as o,eH as t}from"./index-CnBLdARH.js";const l=()=>{const e=a(!1);return o(()=>{e.value=t()}),e};export{l as u}; import {aC as a, eH as t, v as o} from "./index-CnBLdARH.js";
const l = () => {
const e = a(!1);
return o(() => {
e.value = t()
}), e
};
export {l as u};

View File

@ -1,10 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Created with Vectornator (http://vectornator.io/) --> <!-- Created with Vectornator (http://vectornator.io/) -->
<svg height="100%" stroke-miterlimit="10" style="fill-rule:nonzero;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;" version="1.1" viewBox="31 31 450 450" width="100%" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <svg height="100%" stroke-miterlimit="10"
style="fill-rule:nonzero;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;" version="1.1"
viewBox="31 31 450 450" width="100%" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"
>
<defs/> <defs/>
<g id="图层-1"> <g id="图层-1">
<path d="M71.7162 480.951C245.442 476.178 386.182 360.591 424.806 237.032C433.072 210.6 428.265 188.187 407.178 174.42C397.044 167.804 393.006 171.672 385.839 175.233C380.422 177.925 373.922 182.241 379.097 187.137C382.615 190.465 380.668 194.9 379.363 197.573C375.125 206.224 355.105 205.326 334.648 195.56C314.192 185.793 301.05 170.855 305.297 162.204C308.269 156.139 318.139 154.402 332.173 157.868C339.807 159.753 341.653 156.992 343.845 153.691C347.933 147.536 345.196 145.675 341.891 144.204C333.356 140.404 321.576 138.261 309.985 137.735C145.144 133.229 267.528 285.847 51.8973 427.303C33.8726 436.816 7.71038 482.711 71.7162 480.951Z" fill="#f0322d" fill-rule="nonzero" opacity="1" stroke="none"/> <path d="M71.7162 480.951C245.442 476.178 386.182 360.591 424.806 237.032C433.072 210.6 428.265 188.187 407.178 174.42C397.044 167.804 393.006 171.672 385.839 175.233C380.422 177.925 373.922 182.241 379.097 187.137C382.615 190.465 380.668 194.9 379.363 197.573C375.125 206.224 355.105 205.326 334.648 195.56C314.192 185.793 301.05 170.855 305.297 162.204C308.269 156.139 318.139 154.402 332.173 157.868C339.807 159.753 341.653 156.992 343.845 153.691C347.933 147.536 345.196 145.675 341.891 144.204C333.356 140.404 321.576 138.261 309.985 137.735C145.144 133.229 267.528 285.847 51.8973 427.303C33.8726 436.816 7.71038 482.711 71.7162 480.951Z"
<path d="M356.231 185.86C360.69 183.864 365.088 181.629 369.434 179.183C376.947 174.899 384.181 170.153 391.092 164.973C433.422 133.468 465.071 92.5206 477.548 73.7696C481.013 68.5621 482.62 57.4866 478.761 52.105C469.108 38.6429 449.136 31.9566 431.287 31.081C423.477 30.6979 415.771 31.6629 408.83 34.2076C405.923 35.2737 400.017 38.9675 398.218 50.6922C391.564 94.0823 368.434 127.479 353.408 149.769C349.45 155.652 345.898 160.541 342.996 164.35C341.599 166.185 338.313 170.011 335.256 172.935C332.41 175.658 332.712 180.687 336.496 183.727C341.343 187.62 351.538 187.958 356.231 185.86Z" fill="#6ec83c" fill-rule="nonzero" opacity="1" stroke="none"/> fill="#f0322d" fill-rule="nonzero" opacity="1" stroke="none"/>
<path d="M356.231 185.86C360.69 183.864 365.088 181.629 369.434 179.183C376.947 174.899 384.181 170.153 391.092 164.973C433.422 133.468 465.071 92.5206 477.548 73.7696C481.013 68.5621 482.62 57.4866 478.761 52.105C469.108 38.6429 449.136 31.9566 431.287 31.081C423.477 30.6979 415.771 31.6629 408.83 34.2076C405.923 35.2737 400.017 38.9675 398.218 50.6922C391.564 94.0823 368.434 127.479 353.408 149.769C349.45 155.652 345.898 160.541 342.996 164.35C341.599 166.185 338.313 170.011 335.256 172.935C332.41 175.658 332.712 180.687 336.496 183.727C341.343 187.62 351.538 187.958 356.231 185.86Z"
fill="#6ec83c" fill-rule="nonzero" opacity="1" stroke="none"/>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -2,10 +2,10 @@
<html lang="zh-cn"> <html lang="zh-cn">
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1" /> <meta content="width=device-width,initial-scale=1" name="viewport"/>
<title>chili3d</title> <title>chili3d</title>
<link rel="icon" href="favicon.svg" /> <link href="favicon.svg" rel="icon"/>
<link rel="stylesheet" href="index.css" /> <link href="index.css" rel="stylesheet"/>
</head> </head>
<body> <body>
<noscript>You need to enable JavaScript to run this app.</noscript> <noscript>You need to enable JavaScript to run this app.</noscript>
@ -92,6 +92,7 @@
return new Blob([buffer.subarray(0, position)]) return new Blob([buffer.subarray(0, position)])
} }
function getFileFromUrl(url, fileName) { function getFileFromUrl(url, fileName) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
var blob = null var blob = null
@ -149,6 +150,7 @@
var blob = new Blob([text], {type: 'text/plain'}) var blob = new Blob([text], {type: 'text/plain'})
return URL.createObjectURL(blob) return URL.createObjectURL(blob)
} }
function createURLFromJson(json) { function createURLFromJson(json) {
var blob var blob
try { try {
@ -159,10 +161,12 @@
} }
return URL.createObjectURL(blob) return URL.createObjectURL(blob)
} }
function createURLFromArrayBuffer(arrayBuffer) { function createURLFromArrayBuffer(arrayBuffer) {
var blob = new Blob([arrayBuffer], {type: 'text/plain'}) var blob = new Blob([arrayBuffer], {type: 'text/plain'})
return URL.createObjectURL(blob) return URL.createObjectURL(blob)
} }
function lineSegments2ToLine(line) { function lineSegments2ToLine(line) {
// 创建一个常规的 LineSegments 对象 // 创建一个常规的 LineSegments 对象
var tempLine = new window.THREE.LineSegments( var tempLine = new window.THREE.LineSegments(
@ -182,6 +186,7 @@
return tempLine return tempLine
} }
Promise.all([ Promise.all([
new Promise(resolve => { new Promise(resolve => {
window.onload = function () { window.onload = function () {

View File

@ -1,5 +1,24 @@
<!doctype html><html lang="zh-cn"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="description" content="chili3d"><meta name="author" content="仙阁"><title>chili3d</title><link rel="icon" href="favicon.svg"><link rel="stylesheet" href="index.css"><script>!function(t,e,n,c,r,a,i){t[n]=t[n]||function(){(t[n].q=t[n].q||[]).push(arguments)},(a=e.createElement(c)).async=1,a.src="https://www.clarity.ms/tag/"+r,(i=e.getElementsByTagName(c)[0]).parentNode.insertBefore(a,i)}(window,document,"clarity","script","k1qrtibhcl")</script></head><body><noscript>You need to enable JavaScript to run this app.</noscript> <!doctype html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<meta content="width=device-width,initial-scale=1" name="viewport">
<meta content="chili3d" name="description">
<meta content="仙阁" name="author">
<title>chili3d</title>
<link href="favicon.svg" rel="icon">
<link href="index.css" rel="stylesheet">
<script>!function (t, e, n, c, r, a, i) {
t[n] = t[n] || function () {
(t[n].q = t[n].q || []).push(arguments)
}, (a = e.createElement(c)).async = 1, a.src = "https://www.clarity.ms/tag/" + r, (i = e.getElementsByTagName(c)[0]).parentNode.insertBefore(a, i)
}(window, document, "clarity", "script", "k1qrtibhcl")</script>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<script src="./iconfont.js"></script> <script src="./iconfont.js"></script>
<script defer src="main.js"></script></body></html> <script defer src="main.js"></script>
</body>
</html>

View File

@ -2,18 +2,41 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"/> <meta charset="UTF-8"/>
<link rel="icon" href="/favicon.ico" /> <link href="/favicon.ico" rel="icon"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<title>商飞数据库后台管理系统</title> <title>商飞数据库后台管理系统</title>
<script type="module" crossorigin src="/assets/index-CnBLdARH.js"></script> <script crossorigin src="/assets/index-CnBLdARH.js" type="module"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DVJlCBDm.css"> <link crossorigin href="/assets/index-DVJlCBDm.css" rel="stylesheet">
<script type="module">import.meta.url;import("_").catch(()=>1);(async function*(){})().next();if(location.protocol!="file:"){window.__vite_is_modern_browser=true}</script> <script type="module">import.meta.url;
<script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy chunks, syntax error above and the same error below should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script> import("_").catch(() => 1);
(async function* () {
})().next();
if (location.protocol != "file:") {
window.__vite_is_modern_browser = true
}</script>
<script type="module">!function () {
if (window.__vite_is_modern_browser) return;
console.warn("vite: loading legacy chunks, syntax error above and the same error below should be ignored");
var e = document.getElementById("vite-legacy-polyfill"), n = document.createElement("script");
n.src = e.src, n.onload = function () {
System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))
}, document.body.appendChild(n)
}();</script>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
<script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script> <script nomodule>!function () {
<script nomodule crossorigin id="vite-legacy-polyfill" src="/assets/polyfills-legacy-vTdn31Iz.js"></script> var e = document, t = e.createElement("script");
<script nomodule crossorigin id="vite-legacy-entry" data-src="/assets/index-legacy-BU4eSv88.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script> if (!("noModule" in t) && "onbeforeload" in t) {
var n = !1;
e.addEventListener("beforeload", (function (e) {
if (e.target === t) n = !0; else if (!e.target.hasAttribute("nomodule") || !n) return;
e.preventDefault()
}), !0), t.type = "module", t.src = ".", e.head.appendChild(t), t.remove()
}
}();</script>
<script crossorigin id="vite-legacy-polyfill" nomodule src="/assets/polyfills-legacy-vTdn31Iz.js"></script>
<script crossorigin data-src="/assets/index-legacy-BU4eSv88.js" id="vite-legacy-entry"
nomodule>System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
</body> </body>
</html> </html>

View File

@ -1,38 +1,15 @@
//import com.electromagnetic.industry.software.manage.Application; import com.electromagnetic.industry.software.manage.Application;
//import jakarta.annotation.Resource; import org.junit.jupiter.api.Test;
//import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest;
//import org.springframework.ai.document.Document;
//import org.springframework.ai.document.DocumentReader; import java.net.MalformedURLException;
//import org.springframework.ai.reader.TextReader;
//import org.springframework.ai.transformer.splitter.TokenTextSplitter; @SpringBootTest(classes = Application.class)
//import org.springframework.ai.vectorstore.VectorStore; public class Test1 {
//import org.springframework.boot.test.context.SpringBootTest;
// @Test
//import java.io.File; public void test() throws MalformedURLException {
//import java.net.MalformedURLException;
//import java.nio.file.Path; }
//import java.util.List;
// }
//@SpringBootTest(classes = Application.class)
//public class Test1 {
//
// @Resource
// private VectorStore vectorStore;
//
// @Test
// public void testTree() throws MalformedURLException {
// String path = "D:/明朝那些事儿.txt";
// File file = new File(path);
// Path tempFile = file.toPath();
// DocumentReader documentReader = new TextReader(String.valueOf(tempFile.toUri().toURL()));
// List<Document> documents = new TokenTextSplitter().apply(documentReader.get());
// documents = documents.subList(0, 200);
// vectorStore.write(documents);
//
/// / Path tempFile = Paths.get(file.getAbsolutePath());
/// / DocumentReader documentReader = new TextReader(String.valueOf(tempFile.toUri().toURL()));
/// / List<Document> documents = documentReader.get();
/// / vectorStore.write(documents);
// }
//
//}