From 4d4394311a96e15ea204e2cae03dda00750d0fdd Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期五, 11 四月 2025 17:37:39 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
server/src/main/java/com/doumee/api/system/SystemTraceLogController.java | 3
server/src/main/java/com/doumee/core/annotation/excel/ExcelDataHandlerAdapter.java | 10
server/src/main/java/com/doumee/api/business/CompanyMemberController.java | 5
admin/package-lock.json | 31
admin/public/icon.jpg | 0
admin/src/components/business/OperaWorkorderDetailDcaWindow.vue | 27
server/src/main/java/com/doumee/dao/business/vo/WorkorderDbhDto.java | 57 +
admin/src/assets/style/variables.scss | 10
server/src/main/java/com/doumee/core/annotation/excel/ExcelImporter.java | 504 ++++++--
server/src/main/java/com/doumee/dao/system/model/SystemLoginLog.java | 14
admin/src/utils/config.js | 1
server/src/main/java/com/doumee/service/business/impl/WorkorderServiceImpl.java | 19
server/src/main/java/com/doumee/api/business/CategoryController.java | 4
server/src/main/java/com/doumee/api/business/WorkorderLogController.java | 5
admin/package.json | 1
admin/src/views/business/workorderDca.vue | 37
server/src/main/java/com/doumee/dao/business/model/Managers.java | 15
admin/src/assets/images/default_homeimg.png | 0
admin/src/components/business/OperaWorkorderDetailDcaInfoWindow.vue | 26
admin/src/views/index.vue | 1056 +++++++++++++++++-
server/src/main/java/com/doumee/dao/business/model/CompanyMember.java | 15
server/src/main/java/com/doumee/dao/business/model/WorkorderLog.java | 21
admin/src/components/common/Header.vue | 9
server/src/main/java/com/doumee/core/annotation/excel/Reflections.java | 294 +++++
server/src/main/java/com/doumee/dao/system/model/SystemTraceLog.java | 21
admin/src/views/business/workorderDbh.vue | 24
server/src/main/java/com/doumee/api/business/MultifileController.java | 10
server/src/main/java/com/doumee/dao/business/model/Workorder.java | 45
server/src/main/java/com/doumee/core/annotation/excel/ExcelColumn.java | 115 ++
admin/public/index.html | 5
server/src/main/java/com/doumee/dao/business/model/Multifile.java | 19
admin/src/components/common/Menu.vue | 2
admin/src/views/business/workorderShe.vue | 25
server/src/main/java/com/doumee/dao/business/vo/WorkorderAllDto.java | 97 +
server/src/main/java/com/doumee/dao/business/vo/WorkorderDcaChildDto.java | 65 +
server/src/main/java/com/doumee/dao/business/vo/WorkorderSheDto.java | 77 +
admin/src/assets/images/default_nodata.png | 0
admin/src/assets/logo.jpg | 0
server/src/main/java/com/doumee/api/business/NoticesController.java | 5
server/src/main/java/com/doumee/api/business/MemberController.java | 4
admin/src/views/business/workorderDcaChild.vue | 174 +++
server/src/main/java/com/doumee/dao/business/model/Notices.java | 28
admin/public/icon.png | 0
admin/src/components/business/OperaWorkorderDetailDbhWindow.vue | 2
server/src/main/java/com/doumee/dao/business/vo/WorkorderDcaDto.java | 56
server/src/main/java/com/doumee/core/annotation/excel/ExcelExporter.java | 266 +++
admin/src/views/login.vue | 6
server/src/main/java/com/doumee/api/business/CompanyController.java | 5
server/src/main/java/com/doumee/api/system/SystemLoginLogController.java | 2
server/src/main/java/com/doumee/api/business/WorkorderController.java | 86 +
server/src/main/java/com/doumee/dao/business/model/Company.java | 21
admin/src/assets/images/login.png | 0
admin/src/components/business/OperaWorkorderDetailSheWindow.vue | 4
/dev/null | 29
server/src/main/java/com/doumee/dao/business/model/Member.java | 24
server/src/main/java/com/doumee/dao/business/model/Category.java | 18
server/src/main/java/com/doumee/api/business/ManagersController.java | 5
admin/src/assets/logo.png | 0
58 files changed, 2,729 insertions(+), 675 deletions(-)
diff --git a/admin/package-lock.json b/admin/package-lock.json
index 6368095..1105abb 100644
--- a/admin/package-lock.json
+++ b/admin/package-lock.json
@@ -5030,6 +5030,22 @@
"safer-buffer": "^2.1.0"
}
},
+ "echarts": {
+ "version": "5.6.0",
+ "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.6.0.tgz",
+ "integrity": "sha512-oTbVTsXfKuEhxftHqL5xprgLoc0k7uScAwtryCgWF6hPYFLRwOUHiFmHGCBKP5NPFNkDVopOieyUqYGH8Fa3kA==",
+ "requires": {
+ "tslib": "2.3.0",
+ "zrender": "5.6.1"
+ },
+ "dependencies": {
+ "tslib": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
+ "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
+ }
+ }
+ },
"ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npm.taobao.org/ee-first/download/ee-first-1.1.1.tgz",
@@ -14664,6 +14680,21 @@
"dev": true
}
}
+ },
+ "zrender": {
+ "version": "5.6.1",
+ "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.6.1.tgz",
+ "integrity": "sha512-OFXkDJKcrlx5su2XbzJvj/34Q3m6PvyCZkVPHGYpcCJ52ek4U/ymZyfuV1nKE23AyBJ51E/6Yr0mhZ7xGTO4ag==",
+ "requires": {
+ "tslib": "2.3.0"
+ },
+ "dependencies": {
+ "tslib": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
+ "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
+ }
+ }
}
}
}
diff --git a/admin/package.json b/admin/package.json
index 7733085..b037683 100644
--- a/admin/package.json
+++ b/admin/package.json
@@ -17,6 +17,7 @@
"core-js": "^3.6.5",
"crypto-js": "^4.1.1",
"dayjs": "^1.11.0",
+ "echarts": "^5.6.0",
"element-ui": "^2.3.6",
"js-cookie": "^2.2.1",
"js-file-download": "^0.4.12",
diff --git a/admin/public/icon.jpg b/admin/public/icon.jpg
new file mode 100644
index 0000000..3caab7a
--- /dev/null
+++ b/admin/public/icon.jpg
Binary files differ
diff --git a/admin/public/icon.png b/admin/public/icon.png
new file mode 100644
index 0000000..33f6435
--- /dev/null
+++ b/admin/public/icon.png
Binary files differ
diff --git a/admin/public/index.html b/admin/public/index.html
index 31231cf..96a25e2 100644
--- a/admin/public/index.html
+++ b/admin/public/index.html
@@ -4,13 +4,10 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
- <link rel="icon" href="<%= BASE_URL %>favicon.ico">
+ <link rel="icon" href="<%= BASE_URL %>icon.png">
<title>鑱斿悎鍒╁崕浜嬩欢涓婃姤绯荤粺</title>
</head>
<body>
- <noscript>
- <strong>We're sorry but 姹熻悕鐨勯」鐩� doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
- </noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
diff --git a/admin/src/assets/images/default_homeimg.png b/admin/src/assets/images/default_homeimg.png
new file mode 100644
index 0000000..623dce4
--- /dev/null
+++ b/admin/src/assets/images/default_homeimg.png
Binary files differ
diff --git a/admin/src/assets/images/default_nodata.png b/admin/src/assets/images/default_nodata.png
new file mode 100644
index 0000000..0b58506
--- /dev/null
+++ b/admin/src/assets/images/default_nodata.png
Binary files differ
diff --git a/admin/src/assets/images/login.png b/admin/src/assets/images/login.png
new file mode 100644
index 0000000..6424c2e
--- /dev/null
+++ b/admin/src/assets/images/login.png
Binary files differ
diff --git a/admin/src/assets/logo.jpg b/admin/src/assets/logo.jpg
new file mode 100644
index 0000000..3caab7a
--- /dev/null
+++ b/admin/src/assets/logo.jpg
Binary files differ
diff --git a/admin/src/assets/logo.png b/admin/src/assets/logo.png
index 3c0b233..33f6435 100644
--- a/admin/src/assets/logo.png
+++ b/admin/src/assets/logo.png
Binary files differ
diff --git a/admin/src/assets/style/variables.scss b/admin/src/assets/style/variables.scss
index fbeddb0..5216a95 100644
--- a/admin/src/assets/style/variables.scss
+++ b/admin/src/assets/style/variables.scss
@@ -26,3 +26,13 @@
.el-image-viewer__wrapper{
z-index: 3000 !important;
}
+.statusInfo0{color: #186acf}
+.statusInfo1{color: #cf3a18
+}
+.statusInfo2{color: #cf3a18}
+.statusInfo3{color: #157713
+}
+.statusInfo4{color: #157713}
+.statusInfo5{color: #157713}
+.statusInfo6{color: #cf3a18
+}
diff --git a/admin/src/components/business/OperaWorkorderDetailDbhWindow.vue b/admin/src/components/business/OperaWorkorderDetailDbhWindow.vue
index e67eef5..de4e643 100644
--- a/admin/src/components/business/OperaWorkorderDetailDbhWindow.vue
+++ b/admin/src/components/business/OperaWorkorderDetailDbhWindow.vue
@@ -91,7 +91,7 @@
<div class="company">
鍛樺伐锛�<span> {{ item.userName }} / {{item.companyName}}</span>
<div style="display: block" >鏃堕棿锛�<span>{{item.createDate}}</span></div>
- <div class="dealinfo">
+ <div class="dealinfo" v-if="item.param2||item.remark||(item.multifileList !=null && item.multifileList.length)">
<div style="display: block" v-if="item.param2" >澶勭悊浜猴細<span>{{item.param2}}</span></div>
<div style="display: block" v-if="item.remark" >璇存槑锛�<span>{{item.remark}}</span></div>
<div style="display: block;margin-top:10px" v-if="item.multifileList !=null && item.multifileList.length">
diff --git a/admin/src/components/business/OperaWorkorderDetailDcaInfoWindow.vue b/admin/src/components/business/OperaWorkorderDetailDcaInfoWindow.vue
index e5f1d30..86e0ed2 100644
--- a/admin/src/components/business/OperaWorkorderDetailDcaInfoWindow.vue
+++ b/admin/src/components/business/OperaWorkorderDetailDcaInfoWindow.vue
@@ -14,7 +14,7 @@
src="@/assets/task/bg_shenhe_pass@2x.png" alt="">
<img v-else class="head_bg" src="@/assets/task/bg_shenhe@2x.png" alt="">
<div class="left">
- <div class="h1">{{ cateList[type] }}</div>
+ <div class="h1">涓嶇鍚堥」锛歿{ info.problemTitle }}</div>
<div class="time">鎻愪氦鏃堕棿锛歿{ info.createDate }}</div>
</div>
<div class="right" :class="{ scs: info.status == '3' || info.status == '4' || info.status == '5', msg: info.status == '6' }">{{statusMap[info.status] }}</div>
@@ -23,12 +23,20 @@
<div class="title">宸ュ崟淇℃伅</div>
<div class="list">
<div class="item">
+ <div class="label">瑙傚療涓婚</div>
+ <div class="value">{{ info.typeName }} / {{info.categoryName}}</div>
+ </div>
+ <div class="item">
<div class="label">鍛樺伐濮撳悕</div>
<div class="value">{{ info.memberName }} - {{ info.memberPhone || '[鏃犳墜鏈哄彿]' }}</div>
</div>
<div class="item">
<div class="label">鎵�灞為儴闂�</div>
<div class="value">{{ info.companyName }} </div>
+ </div>
+ <div class="item">
+ <div class="label">浣嶇疆</div>
+ <div class="value">{{ info.locationName }}</div>
</div>
<div class="item">
<div class="label">涓婃姤鏃堕棿</div>
@@ -39,16 +47,12 @@
<div class="value">{{ info.happenTime}}</div>
</div>
<div class="item">
- <div class="label">椋庨櫓绫诲瀷</div>
- <div class="value">{{ info.typeName }}</div>
+ <div class="label">閫氱煡浜�</div>
+ <div class="value">{{ info.memberNames }}</div>
</div>
- <div class="item">
- <div class="label">鍙戠敓鍦扮偣</div>
- <div class="value">{{ info.locationName }}</div>
- </div>
- <div class="item">
- <div class="label">椋庨櫓鎻忚堪</div>
- <div class="value">{{ info.riskInfo }}</div>
+ <div class="item" style="width: 100%">
+ <div class="label">涓嶇鍚堝師鍥�</div>
+ <div class="value" style="color: red">{{ info.eventInfo }}</div>
</div>
<div class="item" style="width: 100%">
<div class="label">鍥剧墖</div>
@@ -91,7 +95,7 @@
<div class="company">
鍛樺伐锛�<span> {{ item.userName }} / {{item.companyName}}</span>
<div style="display: block" >鏃堕棿锛�<span>{{item.createDate}}</span></div>
- <div class="dealinfo">
+ <div class="dealinfo" v-if="item.param2||item.remark||(item.multifileList !=null && item.multifileList.length)">
<div style="display: block" v-if="item.param2" >澶勭悊浜猴細<span>{{item.param2}}</span></div>
<div style="display: block" v-if="item.remark" >璇存槑锛�<span>{{item.remark}}</span></div>
<div style="display: block;margin-top:10px" v-if="item.multifileList !=null && item.multifileList.length">
diff --git a/admin/src/components/business/OperaWorkorderDetailDcaWindow.vue b/admin/src/components/business/OperaWorkorderDetailDcaWindow.vue
index 3d61b8b..13a9326 100644
--- a/admin/src/components/business/OperaWorkorderDetailDcaWindow.vue
+++ b/admin/src/components/business/OperaWorkorderDetailDcaWindow.vue
@@ -29,6 +29,10 @@
<div class="value">{{ info.companyName }} </div>
</div>
<div class="item">
+ <div class="label">瑙傚療涓婚</div>
+ <div class="value">{{ info.typeName }}</div>
+ </div>
+ <div class="item">
<div class="label">涓婃姤鏃堕棿</div>
<div class="value">{{ info.submitDate }}</div>
</div>
@@ -37,11 +41,7 @@
<div class="value">{{ info.happenTime}}</div>
</div>
<div class="item">
- <div class="label">瑙傚療涓婚</div>
- <div class="value">{{ info.typeName }}</div>
- </div>
- <div class="item">
- <div class="label">鍙戠敓鍦扮偣</div>
+ <div class="label">浣嶇疆</div>
<div class="value">{{ info.locationName }}</div>
</div>
<div class="item">
@@ -79,15 +79,20 @@
<div class="table_info">
<div class="title">涓嶇鍚堥」宸ュ崟鍒楄〃</div>
<el-table :data="info.dcaChildList" border fit>
- <el-table-column label="涓�绾т富棰�" prop="typeName" min-width="150"> </el-table-column>
- <el-table-column label="浜岀骇涓婚" prop="categoryName" min-width="150"> </el-table-column>
- <el-table-column label="瑙傚療椤�" prop="problemTitle" min-width="150"> </el-table-column>
+ <el-table-column label="宸ュ崟鍙�" prop="code" min-width="100">
+ <template slot-scope="{row}">
+ <span style="color: #2E68EC;cursor: pointer" @click="$refs.OperaWorkorderDetailDcaInfoWindow.open('DCA涓嶇鍚堥」宸ュ崟璇︽儏', row)" >{{ row.code || '-'}}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="涓�绾т富棰�" prop="typeName" min-width="60"> </el-table-column>
+ <el-table-column label="浜岀骇涓婚" prop="categoryName" min-width="60"> </el-table-column>
+ <el-table-column label="瑙傚療椤�" prop="problemTitle" min-width="100"> </el-table-column>
<el-table-column label="涓嶇鍚堝師鍥�" prop="eventInfo" min-width="120" />
<el-table-column label="澶勭悊鐘舵��" prop="status" min-width="80">
<template slot-scope="{row}">
- <span v-if="row.status ==0">寰呭鐞�</span>
- <span v-else-if="row.status ==3 ||row.status ==4||row.status ==5">宸插鐞�</span>
- <span v-else>澶勭悊涓�</span>
+ <span :class="'statusInfo'+row.status" v-if="row.status ==0">寰呭鐞�</span>
+ <span :class="'statusInfo'+row.status" v-else-if="row.status ==3 ||row.status ==4||row.status ==5">宸插鐞�</span>
+ <span :class="'statusInfo'+row.status" v-else>澶勭悊涓�</span>
</template>
</el-table-column>
<el-table-column label="鎿嶄綔" prop="status" min-width="80">
diff --git a/admin/src/components/business/OperaWorkorderDetailSheWindow.vue b/admin/src/components/business/OperaWorkorderDetailSheWindow.vue
index 6838092..20d48c9 100644
--- a/admin/src/components/business/OperaWorkorderDetailSheWindow.vue
+++ b/admin/src/components/business/OperaWorkorderDetailSheWindow.vue
@@ -45,6 +45,10 @@
<div class="value">{{ info.locationName }}</div>
</div>
<div class="item">
+ <div class="label">鍏蜂綋浣嶇疆</div>
+ <div class="value">{{ info.remark }}</div>
+ </div>
+ <div class="item">
<div class="label">澶栭儴灏卞尰</div>
<div class="value">{{ info.outJiuyi == "0" ? "鍚�" : "鏄�" }}</div>
</div>
diff --git a/admin/src/components/common/Header.vue b/admin/src/components/common/Header.vue
index ae146eb..a041e98 100644
--- a/admin/src/components/common/Header.vue
+++ b/admin/src/components/common/Header.vue
@@ -7,8 +7,8 @@
{{title}}
</h2>
<div class="user">
- <el-dropdown trigger="click">
- <span class="el-dropdown-link">
+ <el-dropdown trigger="click">
+ <span class="el-dropdown-link" style="color: white">
<img v-if="userInfo != null" :src="userInfo.avatar == null ? '@/assets/images/avatar/man.png' : userInfo.avatar" alt="">{{userInfo | displayName}}<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
@@ -171,7 +171,7 @@
.header {
overflow: hidden;
padding: 0 25px;
- background: #fff;
+ background: #0c6ce3;
height: 100%;
display: flex;
h2 {
@@ -180,7 +180,7 @@
line-height: $header-height;
font-size: 19px;
font-weight: 600;
- color: #606263;
+ color: white;
display: inline;
& > i {
font-size: 20px;
@@ -190,6 +190,7 @@
.user {
width: 50%;
flex-shrink: 0;
+ color: white;
text-align: right;
.el-dropdown {
top: 2px;
diff --git a/admin/src/components/common/Menu.vue b/admin/src/components/common/Menu.vue
index 04c3ed2..e4414db 100644
--- a/admin/src/components/common/Menu.vue
+++ b/admin/src/components/common/Menu.vue
@@ -1,7 +1,7 @@
<template>
<div class="menu" :class="{collapse: menuData.collapse}">
<div class="logo">
-<!-- <div><img src="@/assets/logo.png"></div>-->
+ <div><img src="@/assets/logo.png"></div>
<h1 :class="{hidden: menuData.collapse}">鑱斿悎鍒╁崕浜嬩欢涓婃姤绯荤粺</h1>
</div>
<scrollbar>
diff --git a/admin/src/utils/config.js b/admin/src/utils/config.js
new file mode 100644
index 0000000..67d3878
--- /dev/null
+++ b/admin/src/utils/config.js
@@ -0,0 +1 @@
+export const weeks = ['鏄熸湡鏃�', '鏄熸湡涓�', '鏄熸湡浜�', '鏄熸湡涓�', '鏄熸湡鍥�', '鏄熸湡浜�', '鏄熸湡鍏�']
diff --git a/admin/src/views/business/workorderDbh.vue b/admin/src/views/business/workorderDbh.vue
index d1045e8..00d192b 100644
--- a/admin/src/views/business/workorderDbh.vue
+++ b/admin/src/views/business/workorderDbh.vue
@@ -40,24 +40,24 @@
<span style="color: #2E68EC;cursor: pointer" @click="$refs.operaWorkorderWindow.open('SHE浜嬩欢宸ュ崟璇︽儏', row)" >{{ row.code || '-'}}</span>
</template>
</el-table-column>
- <el-table-column prop="typeName" label="浼ゅ绫诲瀷" min-width="100px"></el-table-column>
+ <el-table-column prop="typeName" label="椋庨櫓绫诲瀷" min-width="100px"></el-table-column>
+ <el-table-column prop="status" label="鐘舵��" min-width="100px">
+ <template slot-scope="{row}">
+ <span :class="'statusInfo'+row.status" v-if="row.status ==0">寰呭鐞�</span>
+ <span :class="'statusInfo'+row.status" v-else-if="row.status ==3 ||row.status ==4||row.status ==5">宸插鐞�</span>
+ <span :class="'statusInfo'+row.status" v-else>澶勭悊涓�</span>
+ </template>
+ </el-table-column>
+ <el-table-column prop="submitDate" label="涓婃姤鏃堕棿" min-width="150px"></el-table-column>
+ <el-table-column prop="happenTime" label="鍙戠幇鏃堕棿" min-width="150px"></el-table-column>
+ <el-table-column prop="riskInfo" label="椋庨櫓鎻忚堪" min-width="100px"></el-table-column>
<el-table-column prop="memberName" label="涓婃姤浜哄憳" min-width="100px">
<template slot-scope="{row}">
<span v-if="row.memberPhone" >{{row.memberName}} - {{row.memberPhone }}</span>
<span v-else >{{row.memberName}} </span>
</template>
</el-table-column>
- <el-table-column prop="companyName" label="鎵�鍦ㄩ儴闂�" min-width="100px"></el-table-column>
- <el-table-column prop="status" label="鐘舵��" min-width="100px">
- <template slot-scope="{row}">
- <span v-if="row.status ==0">寰呭鐞�</span>
- <span v-else-if="row.status ==3 ||row.status ==4||row.status ==5">宸插鐞�</span>
- <span v-else>澶勭悊涓�</span>
- </template>
- </el-table-column>
- <el-table-column prop="submitDate" label="涓婃姤鏃堕棿" min-width="150px"></el-table-column>
- <el-table-column prop="happenTime" label="鍙戠幇鏃堕棿" min-width="150px"></el-table-column>
- <el-table-column prop="riskInfo" label="椋庨櫓鎻忚堪" min-width="100px"></el-table-column>
+ <el-table-column prop="companyName" label="鎵�灞為儴闂�" min-width="100px"></el-table-column>
<el-table-column prop="createDate" label="鍒涘缓鏃堕棿" min-width="150px"></el-table-column>
<el-table-column
v-if="containPermissions(['business:workorder:update', 'business:workorder:delete'])"
diff --git a/admin/src/views/business/workorderDca.vue b/admin/src/views/business/workorderDca.vue
index 84848d3..9a99868 100644
--- a/admin/src/views/business/workorderDca.vue
+++ b/admin/src/views/business/workorderDca.vue
@@ -3,8 +3,8 @@
<!-- 鎼滅储琛ㄥ崟 -->
<div slot="search-form">
<el-form ref="searchForm" :model="searchForm" label-width="100px" inline>
- <el-form-item label="椋庨櫓绫诲瀷" prop="typeId">
- <el-select v-model="searchForm.typeId">
+ <el-form-item label="瑙傚療涓婚" prop="typeId">
+ <el-select v-model="searchForm.typeId" @change="search">
<el-option clearable filterable
v-for="item in categorys"
:key="item.id"
@@ -41,34 +41,25 @@
>
<el-table-column prop="code" label="宸ュ崟鍙�" min-width="150px" fixed>
<template slot-scope="{row}">
- <span style="color: #2E68EC;cursor: pointer" @click="$refs.operaWorkorderWindow.open('SHE浜嬩欢宸ュ崟璇︽儏', row)" >{{ row.code || '-'}}</span>
+ <span style="color: #2E68EC;cursor: pointer" @click="$refs.operaWorkorderWindow.open('DCA浜嬩欢宸ュ崟璁板綍璇︽儏', row)" >{{ row.code || '-'}}</span>
</template>
</el-table-column>
+ <el-table-column prop="typeName" label="瑙傚療涓婚" min-width="150px"></el-table-column>
+ <el-table-column prop="dcaYesNum" label="瑙傚療椤圭粺璁�" min-width="150px">
+ <template slot-scope="{row}">
+ <span style="color: #1562e2" >绗﹀悎锛歿{row.dcaYesNum}} 锛屼笉绗﹀悎锛�<span style="color:red;">{{row.dcaNoNum}}</span> </span>
+ </template>
+ </el-table-column>
+ <el-table-column prop="locationName" label="浣嶇疆" min-width="150px"></el-table-column>
+ <el-table-column prop="submitDate" label="涓婃姤鏃堕棿" min-width="150px"></el-table-column>
+ <el-table-column prop="happenTime" label="鍙戠幇鏃堕棿" min-width="150px"></el-table-column>
<el-table-column prop="memberName" label="涓婃姤浜哄憳" min-width="100px">
<template slot-scope="{row}">
<span v-if="row.memberPhone" >{{row.memberName}} - {{row.memberPhone }}</span>
<span v-else >{{row.memberName}} </span>
</template>
</el-table-column>
- <el-table-column prop="companyName" label="鎵�鍦ㄩ儴闂�" min-width="100px"></el-table-column>
- <el-table-column prop="status" label="鐘舵��" min-width="100px">
- <template slot-scope="{row}">
- <span v-if="row.status ==0">寰呭鐞�</span>
- <span v-else-if="row.status ==3 ||row.status ==4||row.status ==5">宸插鐞�</span>
- <span v-else>澶勭悊涓�</span>
- </template>
- </el-table-column>
-<!--
- <el-table-column prop="typeName" label="DCA绫诲瀷" min-width="100px"></el-table-column>
--->
- <el-table-column prop="typeName" label="瑙傚療涓婚" min-width="150px"></el-table-column>
- <el-table-column prop="dcaYesNum" label="瑙傚療椤圭粺璁�" min-width="150px">
- <template slot-scope="{row}">
- <span style="color: #1562e2" >绗﹀悎锛歿{row.dcaYesNum}} 涓嶇鍚堬細{{row.dcaNoNum}}</span>
- </template>
- </el-table-column>
- <el-table-column prop="submitDate" label="涓婃姤鏃堕棿" min-width="150px"></el-table-column>
- <el-table-column prop="happenTime" label="鍙戠幇鏃堕棿" min-width="150px"></el-table-column>
+ <el-table-column prop="companyName" label="鎵�灞為儴闂�" min-width="100px"></el-table-column>
<el-table-column prop="createDate" label="鍒涘缓鏃堕棿" min-width="150px"></el-table-column>
<el-table-column
v-if="containPermissions(['business:workorder:update', 'business:workorder:delete'])"
@@ -77,7 +68,7 @@
fixed="right"
>
<template slot-scope="{row}">
- <el-button type="text" @click="$refs.operaWorkorderWindow.open('DCA浜嬩欢宸ュ崟璇︽儏', row)" icon="el-icon-zoom-out" >鏌ョ湅璇︽儏</el-button>
+ <el-button type="text" @click="$refs.operaWorkorderWindow.open('DCA浜嬩欢宸ュ崟璁板綍璇︽儏', row)" icon="el-icon-zoom-out" >鏌ョ湅璇︽儏</el-button>
<!--<el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:workorder:delete']">鍒犻櫎</el-button>-->
</template>
</el-table-column>
diff --git a/admin/src/views/business/workorderDcaChild.vue b/admin/src/views/business/workorderDcaChild.vue
new file mode 100644
index 0000000..5ee9752
--- /dev/null
+++ b/admin/src/views/business/workorderDcaChild.vue
@@ -0,0 +1,174 @@
+<template>
+ <TableLayout :permissions="['business:workorder:query']">
+ <!-- 鎼滅储琛ㄥ崟 -->
+ <div slot="search-form">
+ <el-form ref="searchForm" :model="searchForm" label-width="100px" inline>
+ <el-form-item label="瑙傚療涓婚" prop="typeId">
+ <el-select v-model="searchForm.typeId" @change="changeType" style="width: 120px">
+ <el-option clearable filterable
+ v-for="item in categorys"
+ :key="item.id"
+ :label="item.name"
+ :value="item.id">
+ </el-option>
+ </el-select>-
+ <el-select v-model="searchForm.categoryId" @change="search" style="width: 120px">
+ <el-option clearable filterable
+ v-for="item in categorys1"
+ :key="item.id"
+ :label="item.name"
+ :value="item.id">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="涓婃姤浜哄憳" prop="memberName">
+ <el-input v-model="searchForm.memberName" clearable placeholder="浜哄憳濮撳悕鎴栨墜鏈哄彿" @keypress.enter.native="search"></el-input>
+ </el-form-item>
+ <el-form-item label="宸ュ崟鍙�" prop="code">
+ <el-input v-model="searchForm.code" clearable placeholder="璇疯緭鍏ュ伐鍗曞彿" @keypress.enter.native="search"></el-input>
+ </el-form-item>
+ <section>
+ <el-button type="primary" @click="search">鎼滅储</el-button>
+ <el-button @click="reset">閲嶇疆</el-button>
+ </section>
+ </el-form>
+ </div>
+ <!-- 琛ㄦ牸鍜屽垎椤� -->
+ <template v-slot:table-wrap>
+ <ul class="toolbar" v-permissions="['business:workorder:exportExcel']">
+ <li> <el-button type="primary" :loading="isWorking.export" @click="exportExcel">瀵煎嚭</el-button></li>
+ </ul>
+ <el-table
+ :height="tableHeightNew"
+ v-loading="isWorking.search"
+ :data="tableData.list"
+ stripe
+ @selection-change="handleSelectionChange"
+ >
+ <el-table-column prop="code" label="宸ュ崟鍙�" min-width="150px" fixed>
+ <template slot-scope="{row}">
+ <span style="color: #2E68EC;cursor: pointer" @click="$refs.operaWorkorderWindow.open('DCA浜嬩欢宸ュ崟璇︽儏', row)" >{{ row.code || '-'}}</span>
+ </template>
+ </el-table-column>
+ <el-table-column prop="typeName" label="瑙傚療涓婚" min-width="150px"></el-table-column>
+ <el-table-column prop="categoryName" label="浜岀骇瑙傚療涓婚" min-width="150px"></el-table-column>
+ <el-table-column prop="problemTitle" label="涓嶇鍚堥」" min-width="150px"></el-table-column>
+ <el-table-column prop="status" label="鐘舵��" min-width="100px">
+ <template slot-scope="{row}">
+ <span :class="'statusInfo'+row.status" v-if="row.status ==0">寰呭鐞�</span>
+ <span :class="'statusInfo'+row.status" v-else-if="row.status ==3 ||row.status ==4||row.status ==5">宸插鐞�</span>
+ <span :class="'statusInfo'+row.status" v-else>澶勭悊涓�</span>
+ </template>
+ </el-table-column>
+ <el-table-column prop="locationName" label="浣嶇疆" min-width="150px"></el-table-column>
+ <el-table-column prop="submitDate" label="涓婃姤鏃堕棿" min-width="150px"></el-table-column>
+ <el-table-column prop="happenTime" label="鍙戠幇鏃堕棿" min-width="150px"></el-table-column>
+ <el-table-column prop="memberName" label="涓婃姤浜哄憳" min-width="100px">
+ <template slot-scope="{row}">
+ <span v-if="row.memberPhone" >{{row.memberName}} - {{row.memberPhone }}</span>
+ <span v-else >{{row.memberName}} </span>
+ </template>
+ </el-table-column>
+ <el-table-column prop="companyName" label="鎵�灞為儴闂�" min-width="100px"></el-table-column>
+ <el-table-column prop="createDate" label="鍒涘缓鏃堕棿" min-width="150px"></el-table-column>
+ <el-table-column
+ v-if="containPermissions(['business:workorder:update', 'business:workorder:delete'])"
+ label="鎿嶄綔"
+ min-width="120"
+ fixed="right"
+ >
+ <template slot-scope="{row}">
+ <el-button type="text" @click="$refs.operaWorkorderWindow.open('DCA浜嬩欢宸ュ崟璇︽儏', row)" icon="el-icon-zoom-out" >鏌ョ湅璇︽儏</el-button>
+ <!--<el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:workorder:delete']">鍒犻櫎</el-button>-->
+ </template>
+ </el-table-column>
+ </el-table>
+ <pagination
+ @size-change="handleSizeChange"
+ @current-change="handlePageChange"
+ :pagination="tableData.pagination"
+ >
+ </pagination>
+ </template>
+ <!-- 鏂板缓/淇敼 -->
+ <OperaWorkorderDetailDcaInfoWindow ref="operaWorkorderWindow" @success="handlePageChange"/>
+ </TableLayout>
+</template>
+
+<script>
+import BaseTable from '@/components/base/BaseTable'
+import TableLayout from '@/layouts/TableLayout'
+import Pagination from '@/components/common/Pagination'
+import OperaWorkorderDetailDcaInfoWindow from '@/components/business/OperaWorkorderDetailDcaInfoWindow'
+import { allList } from '@/api/business/category'
+export default {
+ name: 'Workorder',
+ extends: BaseTable,
+ components: {TableLayout, Pagination, OperaWorkorderDetailDcaInfoWindow },
+ data () {
+ return {
+ // 鎼滅储
+ searchForm: {
+ type: '2',
+ memberName: '',
+ memberCompanyId: '',
+ localtionId: '',
+ categoryId: '',
+ typeId: '',
+ code: '',
+ categoryList: []
+ },
+ categoryprops: {
+ label: 'name',
+ value: 'id',
+ checkStrictly: true,
+ lazyLoad: this.lazyLoad
+ },
+ categorys: [],
+ categorys1: []
+ }
+ },
+ created () {
+ this.config({
+ module: '宸ュ崟淇℃伅琛�',
+ api: '/business/workorder',
+ 'field.id': 'id',
+ 'field.main': 'id'
+ })
+ this.loadCategorys()
+ this.search()
+ },
+ methods: {
+ changeType(){
+ this.search()
+ this.categorys1 = []
+ this.searchForm.categoryId = null
+ this.loadCategorys1()
+ },
+ handleChangeCategory (value) {
+ if (this.searchForm.categoryList && this.searchForm.categoryList.length >= 1) {
+ this.searchForm.typeId = this.searchForm.categoryList[this.searchForm.categoryList.length - 1]
+ }
+ },
+ loadCategorys () {
+ allList({ type: 4, isRoot:1})
+ .then(res => {
+ if (res && res.length > 0) {
+ this.categorys = res
+ }
+ })
+ },
+ loadCategorys1 ( ) {
+ if (!this.searchForm.typeId) {
+ return
+ }
+ allList({ type: 4, parentId: this.searchForm.typeId })
+ .then(res => {
+ if (res && res.length > 0) {
+ this.categorys1 = res
+ }
+ })
+ },
+ }
+}
+</script>
diff --git a/admin/src/views/business/workorderShe.vue b/admin/src/views/business/workorderShe.vue
index deb3f7e..dc3fe97 100644
--- a/admin/src/views/business/workorderShe.vue
+++ b/admin/src/views/business/workorderShe.vue
@@ -13,8 +13,6 @@
</el-form-item>
<el-form-item label="涓婃姤浜哄憳" prop="memberName">
<el-input v-model="searchForm.memberName" clearable placeholder="浜哄憳濮撳悕鎴栨墜鏈哄彿" @keypress.enter.native="search"></el-input>
-
-
</el-form-item>
<el-form-item label="宸ュ崟鍙�" prop="code">
<el-input v-model="searchForm.code" clearable placeholder="璇疯緭鍏ュ伐鍗曞彿" @keypress.enter.native="search"></el-input>
@@ -46,18 +44,11 @@
<el-table-column prop="submitDate" label="涓婃姤鏃堕棿" min-width="150px"></el-table-column>
<el-table-column prop="status" label="鐘舵��" min-width="100px">
<template slot-scope="{row}">
- <span v-if="row.status ==0">寰呭鐞�</span>
- <span v-else-if="row.status ==3 ||row.status ==4||row.status ==5">宸插鐞�</span>
- <span v-else>澶勭悊涓�</span>
+ <span :class="'statusInfo'+row.status" v-if="row.status ==0">寰呭鐞�</span>
+ <span :class="'statusInfo'+row.status" v-else-if="row.status ==3 ||row.status ==4||row.status ==5">宸插鐞�</span>
+ <span :class="'statusInfo'+row.status" v-else>澶勭悊涓�</span>
</template>
</el-table-column>
- <el-table-column prop="memberName" label="涓婃姤浜哄憳" min-width="100px">
- <template slot-scope="{row}">
- <span v-if="row.memberPhone" >{{row.memberName}} - {{row.memberPhone }}</span>
- <span v-else >{{row.memberName}} </span>
- </template>
- </el-table-column>
- <el-table-column prop="companyName" label="鎵�鍦ㄩ儴闂�" min-width="100px"></el-table-column>
<el-table-column prop="memberType" label="娑夊強浜哄憳" min-width="100px">
<template slot-scope="{row}">
<span v-if="row.memberType == 2">渚涘簲鍟�-{{row.memberNames}}</span>
@@ -66,6 +57,7 @@
</template>
</el-table-column>
<el-table-column prop="locationName" label="鍙戠敓鍦扮偣" min-width="100px"></el-table-column>
+ <el-table-column prop="remark" label="鍏蜂綋浣嶇疆" min-width="100px"></el-table-column>
<el-table-column prop="outJiuyi" label="灏卞尰鎯呭喌" min-width="100px">
<template slot-scope="{row}">
<span v-if="row.outJiuyi == 0">闈炲閮ㄥ氨鍖�-
@@ -85,7 +77,14 @@
</template>
</el-table-column>
<el-table-column prop="eventInfo" label="浜嬩欢璇存槑" min-width="100px"></el-table-column>
- <el-table-column prop="createDate" label="鍒涘缓鏃堕棿" min-width="150px"></el-table-column>
+ <el-table-column prop="memberName" label="涓婃姤浜哄憳" min-width="100px">
+ <template slot-scope="{row}">
+ <span v-if="row.memberPhone" >{{row.memberName}} - {{row.memberPhone }}</span>
+ <span v-else >{{row.memberName}} </span>
+ </template>
+ </el-table-column>
+ <el-table-column prop="companyName" label="鎵�灞為儴闂�" min-width="100px"></el-table-column>
+ <el-table-column prop="createDate" label="鎻愪氦鏃堕棿" min-width="150px"></el-table-column>
<el-table-column
v-if="containPermissions(['business:workorder:update', 'business:workorder:delete'])"
label="鎿嶄綔"
diff --git a/admin/src/views/index.vue b/admin/src/views/index.vue
index 9053e37..200e440 100644
--- a/admin/src/views/index.vue
+++ b/admin/src/views/index.vue
@@ -1,80 +1,1016 @@
<template>
- <div class="home">
- <div class="wrap">
+ <div class="main_home">
+ <!-- <div style="position: fixed;z-index: 99999"><video style="height: 100px;width: 500px" src="rtsp://10.50.250.253:554/openUrl/K2y2vE4" controls></video></div> -->
+ <div class="home_header" style="text-align: center">
+ <div class="mb10 fs17">涓嬪崍濂斤紝{{ userInfo.realname }}</div>
+ <div class="fs13">
+ 浠婂ぉ鏄� {{ nowDate }} {{ nowWeek }}锛屾杩庤闂仈鍚堝埄鍗庝簨浠朵笂鎶ョ郴缁熺鐞嗗钩鍙�
+ </div>
</div>
+<!-- <div class="main">
+ <div class="app_content">
+ <div class="static_card">
+ <div class="card">
+ <div class="header">
+ <div class="left">
+ <div class="fs15">浠婃棩鍦ㄥ洯浜烘暟(浜�)</div>
+ <div class="num">{{ headerData.todayInParkUserNum }}</div>
+ </div>
+ <img src="@/assets/icons/home_icon1.png" alt="" />
+ </div>
+ <div class="content">
+ <div>鍏ュ洯浜烘(浜�)锛歿{ headerData.todayInUserNum }}</div>
+ <div>鍑哄洯浜烘(浜�)锛歿{ headerData.todayOutUserNum }}</div>
+ </div>
+ </div>
+ <div class="card">
+ <div class="header">
+ <div class="left">
+ <div class="fs15">鍦ㄥ洯璁垮鏁�(浜�)</div>
+ <div class="num">{{ headerData.inParkVisitUserNum }}</div>
+ </div>
+ <img src="@/assets/icons/home_icon2.png" alt="" />
+ </div>
+ <div class="content">
+ <div>璁垮浜烘(浜�)锛歿{ headerData.visitUserNum }}</div>
+ <div>绛剧浜烘(浜�)锛歿{ headerData.signLevelNum }}</div>
+ </div>
+ </div>
+ <div class="card">
+ <div class="header">
+ <div class="left">
+ <div class="fs15">鍦ㄥ洯闀挎湡鐩稿叧鏂规暟(浜�)</div>
+ <div class="num">{{ headerData.inParkLwUserNum }}</div>
+ </div>
+ <img src="@/assets/icons/home_icon3.png" alt="" />
+ </div>
+ <div class="content">
+ <div>鍏ュ洯浜烘(浜�)锛歿{ headerData.lwUserInNum }}</div>
+ <div>鍑哄洯浜烘(浜�)锛歿{ headerData.lwUserOutNum }}</div>
+ </div>
+ </div>
+ <div class="card">
+ <div class="header">
+ <div class="left">
+ <div class="fs15">浠婃棩鍦ㄥ洯杞﹁締(杈�)</div>
+ <div class="num">{{ headerData.todayInParkCarNum }}</div>
+ </div>
+ <img src="@/assets/icons/home_icon4.png" alt="" />
+ </div>
+ <div class="content">
+ <div>鍏ュ洯杞︽(杈�)锛歿{ headerData.todayInCarNum }}</div>
+ <div>鍑哄洯杞︽(杈�)锛歿{ headerData.todayOutCarNum }}</div>
+ </div>
+ </div>
+ </div>
+ <div class="funcs">
+ <div class="home_title">甯哥敤鍔熻兘</div>
+ <div class="list">
+ <div v-for="item in funcList" @click="funcClick(item)" :key="item.name" class="item">
+ <img class="mb10" :src="item.url" alt="" />
+ <div>{{ item.name }}</div>
+ </div>
+ </div>
+ </div>
+ <div class="static_wrap">
+ <div class="df mb10">
+ <div class="wrap static1">
+ <div class="header">
+ <div class="home_title">鍦ㄥ満浜哄憳鍗犳瘮</div>
+ <!– <div class="df_ac more">
+ 鏇村<i class="el-icon-arrow-right"></i>
+ </div> –>
+ </div>
+ <div class="content">
+ <div class="echart_wrap">
+ <div class="pie_text">
+ <div class="fs13">鎬绘暟</div>
+ <div class="fs15"><strong>{{ headerData.todayInParkUserNum }}</strong></div>
+ </div>
+ <div class="echart" id="echart1"></div>
+ </div>
+ <div class="list">
+ <div class="item" v-for="item, i in manningRatio" :key="i">
+ <div :style="{ background: colors[i] }" class="icon"></div>
+ <div class="text">{{ item.name }}</div>
+ <div class="num">{{ item.value }}</div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="wrap static2">
+ <div class="header">
+ <div class="home_title">闀挎湡鐩稿叧鏂瑰垎甯�</div>
+ <!– <div class="df_ac more">
+ 鏇村<i class="el-icon-arrow-right"></i>
+ </div> –>
+ </div>
+ <div class="echart" id="echart2"></div>
+ </div>
+ </div>
+ <div class="df">
+ <div class="wrap static3">
+ <div class="header">
+ <div class="home_title">7鏃ヨ瀹㈢粺璁�</div>
+ <!– <div class="df_ac more">
+ 鏇村<i class="el-icon-arrow-right"></i>
+ </div> –>
+ </div>
+ <div class="echart" id="echart3"></div>
+ </div>
+ <div class="wrap static4">
+ <div class="header">
+ <div class="home_title">7鏃ヨ溅杈嗙粺璁�</div>
+ <!– <div class="df_ac more">
+ 鏇村<i class="el-icon-arrow-right"></i>
+ </div> –>
+ </div>
+ <div class="echart" id="echart4"></div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="app_side">
+ <div class="task">
+ <div class="header df_sb">
+ <div class="home_title df">
+ <span >寰呭姙浜嬮」</span>
+ <span class="num" v-if="taskTotal">{{ taskTotal }}</span>
+ </div>
+ <div class="df_ac more" @click="jumpPage('/task/index')">
+ 鏇村<i class="el-icon-arrow-right"></i>
+ </div>
+ </div>
+ <div class="list">
+ <div class="item" v-for="item in taskList" :key="item.id">
+ <div class="content">
+ <div class="title">{{ item.title }}</div>
+ <div class="time">{{ item.createDate }}</div>
+ </div>
+ <div class="btn" v-permissions="['business:staging:query']" @click="handleDetail(item)">澶勭悊</div>
+ </div>
+ <div v-if="taskList.length == 0" class="empty">
+ <img src="@/assets/images/default_homeimg.png" alt="">
+ </div>
+ </div>
+ </div>
+ <div class="warnning">
+ <div class="header df_sb">
+ <div class="home_title df">
+ <span>瓒呮椂棰勮</span>
+ <span class="num" v-if="warningTotal">{{ warningTotal }}</span>
+ </div>
+ <div class="df_ac more" @click="jumpPage('/business/strandedPersonnel')">
+ 鏇村<i class="el-icon-arrow-right"></i>
+ </div>
+ </div>
+ <div class="list">
+ <div class="item" v-for="item in warningList" :key="item.id">
+ <div class="name_wrap df_sb">
+ <div class="name">{{ item.name }}</div>
+ <div class="identity">璁垮</div>
+ </div>
+ <div class="line">鑱旂郴鐢佃瘽锛歿{ item.phone }}</div>
+ <div class="line">璁垮鍏徃锛歿{ item.companyName }}</div>
+ <div class="auth df_sb">
+ <div class="time">鎺堟潈鏈熼檺锛歿{ item.endtime }}</div>
+ <div class="btn" @click="departure(item.id)">绂诲満</div>
+ </div>
+ </div>
+ </div>
+ <div v-if="warningList.length == 0" class="empty">
+ <img src="@/assets/images/default_homeimg.png" alt="">
+ </div>
+ </div>
+ </div>
+ </div>-->
</div>
</template>
<script>
+import dayjs from 'dayjs'
+import * as echarts from 'echarts'
+import { weeks } from '@/utils/config'
+const colors = ['#52a4f7', '#7678f7', '#5fc6d5']
export default {
- name: 'Index',
+ components: {
+ },
data () {
- return {}
+ return {
+ colors,
+ nowDate: '',
+ nowWeek: '',
+ headerData: {},
+ staticData: {},
+ manningRatio: [],
+ taskList: [],
+ taskTotal: 0,
+ warningList: [],
+ warningTotal: 0,
+ funcList: [
+ { name: '璁垮鎶ュ', path: '', url: require('@/assets/icons/home_func1.png'), path: '/business/reportRecord' },
+ { name: '闅愭偅闅忔墜鎷�', path: '', url: require('@/assets/icons/home_func2.png'), path: '/operation/danger/record' },
+ { name: '棰勭害浼氳瀹�', path: '', url: require('@/assets/icons/home_func3.png'), path: '/meeting/bookings' },
+ { name: '鑰冨嫟宸ヤ綔鍙�', path: '', url: require('@/assets/icons/home_func4.png') }
+ ],
+ isShowDetail: false,
+ isShowReport: false,
+ isShowDanger: false,
+ isShowDriver: false
+ }
+ },
+ computed: {
+ userInfo () {
+ return this.$store.state.userInfo
+ }
+ },
+ created () {
+ },
+ mounted () {
+ // this.initData()
+ },
+ methods: {
+ SubSuccess (str) {
+ this[str] = false
+ this.getTaskList()
+ },
+ funcClick (item) {
+ if (item.name == '鑰冨嫟宸ヤ綔鍙�') {
+ getAppHeaderNav(4).then(res => {
+ window.open(res, '_blank')
+ })
+ }
+ this.$router.push(item.path)
+ },
+ updateDate () {
+ this.nowDate = dayjs().format('YYYY骞碝鏈圖鏃�')
+ this.nowWeek = weeks[new Date().getDay()]
+ },
+ initData () {
+ this.getWorkHead()
+ this.getWorkBody()
+ this.getTaskList()
+ this.getWarningList()
+ },
+ getWarningList () {
+ getWorkbenchData({ queryType: 4 }).then(res => {
+ this.warningList = res.timeOutVisitList || []
+ this.warningTotal = res.timeOutVisitNum || 0
+ })
+ },
+ getTaskList () {
+ getWorkbenchData({ queryType: 3 }).then(res => {
+ this.taskList = res.noticesList || []
+ this.taskTotal = res.noticesNum || 0
+ })
+ },
+ getWorkBody () {
+ getWorkbenchData({ queryType: 2 }).then(res => {
+ this.staticData = res || {}
+ this.initEchart2()
+ this.initEchart3()
+ this.initEchart4()
+ })
+ },
+ getWorkHead () {
+ getWorkbenchData({ queryType: 1 }).then(res => {
+ this.headerData = res || {}
+ const arr = []
+ arr.push({ name: '璁垮', value: this.headerData.inParkVisitUserNum })
+ arr.push({ name: '鍐呴儴鍛樺伐', value: this.headerData.todayInParkUserNum - this.headerData.inParkLwUserNum - this.headerData.inParkVisitUserNum })
+ arr.push({ name: '闀挎湡鐩稿叧鏂�', value: this.headerData.inParkLwUserNum })
+ arr.sort((a, b) => b.value - a.value)
+ this.manningRatio = arr
+ this.initEchart1()
+ })
+ },
+ jumpPage (page) {
+ this.$router.push(page)
+ },
+ departure (id) {
+ this.$confirm('纭畾绂诲巶鍚�, 鏄惁缁х画?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ level(id)
+ .then(res => {
+ this.getWarningList()
+ })
+ }).catch(() => {
+
+ })
+ },
+ handleDetail (row) {
+ if (row.type === 7) {
+ this.handleTest(row);
+ return
+ }
+ if (row.objType === 2) {
+ this.$refs.OperaDetailsWindow.open('鍏姟杞︾敵璇疯鎯�', { ...row, id: row.objId })
+ return
+ }
+ if (row.objType === 1) {
+ this.isShowReport = true
+ this.$nextTick(() => {
+ this.$refs.VisReportDetailRef.id = row.objId
+ this.$refs.VisReportDetailRef.type = row.objType
+ this.$refs.VisReportDetailRef.getDetail()
+ this.$refs.VisReportDetailRef.isShowModal = true
+ })
+ return
+ }
+ if (row.objType === 3) {
+ const obj = { ...row, id: row.objId }
+ this.$refs.OperaHiddenDangerWindow.open('闅愭偅闅忔墜鎷嶈鎯�', obj)
+ return
+ }
+ if (row.objType === 6) {
+ const obj = { ...row, id: row.objId }
+ this.isShowDriver = true
+ this.$nextTick(() => {
+ this.$refs.DriverDetailRef.id = row.objId
+ this.$refs.DriverDetailRef.type = row.objType
+ this.$refs.DriverDetailRef.getDetail()
+ this.$refs.DriverDetailRef.isShowModal = true
+ })
+ return
+ }
+ if (row.objType === 0) {
+ this.isShowDetail = true
+ this.$nextTick(() => {
+ this.$refs.DetailRef.id = row.objId
+ this.$refs.DetailRef.type = row.objType
+ this.$refs.DetailRef.getDetail()
+ this.$refs.DetailRef.isShowModal = true
+ })
+ }
+ },
+ initEchart1 () {
+ const myChart = echarts.init(document.getElementById('echart1'))
+ const that = this
+
+ const option = {
+ tooltip: {
+ trigger: 'item'
+ },
+ series: [
+ {
+ type: 'pie',
+ radius: ['42%', '90%'],
+ label: {
+ show: false,
+ position: 'center'
+ },
+ color: colors,
+ labelLine: {
+ show: false
+ },
+ data: that.manningRatio
+ // data: [
+ // { value: that.headerData.inParkVisitUserNum, name: '璁垮' },
+ // { value: that.headerData.todayInParkUserNum - that.headerData.inParkVisitUserNum - that.headerData.inParkLwUserNum, name: '鍐呴儴鍛樺伐' },
+ // { value: that.headerData.inParkLwUserNum, name: '闀挎湡鐩稿叧鏂�' }
+ // ]
+ }
+ ]
+ }
+ myChart.setOption(option)
+ window.addEventListener('resize', function () { // 鎵ц
+ myChart.resize()
+ })
+ },
+ initEchart2 () {
+ const myChart = echarts.init(document.getElementById('echart2'))
+ const that = this
+ myChart.setOption({
+ grid: {
+ top: '4%',
+ left: '2%',
+ right: '6%',
+ bottom: '2%',
+ containLabel: true
+ },
+ tooltip: {
+ trigger: 'axis',
+ axisPointer: {
+ type: 'line'
+ }
+ },
+ xAxis: {
+ type: 'value',
+ position: 'bottom',
+ splitLine: {
+ show: true,
+ lineStyle: {
+ // 杩欓噷杈撳叆绾挎潯鐨勬牱寮�
+ color: 'rgba(255,255,255,0.14)'
+ }
+ }
+ },
+ yAxis: {
+ type: 'category',
+ data: that.staticData.lwList.map(i => i.name)
+ },
+ series: [
+ {
+ data: that.staticData.lwList.map(i => i.num),
+ type: 'bar',
+ barWidth: 10,
+ itemStyle: {
+ normal: {
+ color: new echarts.graphic.LinearGradient(
+ 1, 0, 0, 0,
+ [
+ { offset: 0, color: '#56abf8' },
+ { offset: 1, color: '#407ff0' }
+ ]
+ )
+ // barBorderRadius: [0, 10, 10, 0]
+ }
+ }
+ }
+ ]
+ })
+ window.addEventListener('resize', function () { // 鎵ц
+ myChart.resize()
+ })
+ },
+ initEchart3 () {
+ const myChart = echarts.init(document.getElementById('echart3'))
+ const that = this
+ myChart.setOption({
+ tooltip: {
+ trigger: 'axis',
+ axisPointer: {
+ type: 'line'
+ },
+ formatter: function (params) {
+ return `
+ <div style="background-color: #15323f;margin: -12px;padding: 14px;border: 2px solid rgba(1,217,254,0.5);color: #fff;">
+ <div>${params[0].name}</div>
+ <div style="display: flex;align-items: center;">
+ <div style="width: 10px;height: 10px;border-radius: 50%;background-color: #6feef0;"></div>
+ <span style="margin-left: 6px;">${params[0].value}</span>
+ <div>浜�</div>
+ </div>
+ </div>
+ `
+ }
+ },
+ xAxis: {
+ type: 'category',
+ boundaryGap: false,
+ data: that.staticData.weekVisitList.map(i => i.name)
+ },
+ yAxis: {
+ type: 'value',
+ name: '浜烘暟',
+ nameTextStyle: {
+ padding: [0, 0, 4, -30] // 鍥涗釜鏁板瓧鍒嗗埆涓轰笂鍙充笅宸︿笌鍘熶綅缃窛绂�
+ },
+ splitLine: {
+ show: true,
+ lineStyle: {
+ // 杩欓噷杈撳叆绾挎潯鐨勬牱寮�
+ color: 'rgba(255,255,255,0.14)'
+ }
+ }
+ },
+ grid: {
+ top: '16%',
+ left: '2%',
+ right: '8%',
+ bottom: '2%',
+ containLabel: true
+ },
+ series: [
+ {
+ data: that.staticData.weekVisitList.map(i => i.num),
+ type: 'line',
+ areaStyle: {
+ normal: {
+ color: {
+ x: 0,
+ y: 0,
+ x2: 0,
+ y2: 1,
+ colorStops: [{
+ offset: 0,
+ color: '#207FF7' // 0% 澶勭殑棰滆壊
+ }, {
+ offset: 1,
+ color: 'rgba(255,255,255,.2)' // 100% 澶勭殑棰滆壊
+ }],
+ globalCoord: false // 缂虹渷涓� false
+ }
+ }
+ },
+ lineStyle: { // 绾挎潯鏍峰紡
+ color: {
+ type: 'linear',
+ x: 0,
+ y: 0,
+ x2: 0,
+ y2: 1,
+ colorStops: [{
+ offset: 0, color: '#207FF7' // 0% 澶勭殑棰滆壊
+ }, {
+ offset: 1, color: '#207FF7' // 100% 澶勭殑棰滆壊
+ }]
+ },
+ width: 2 // 绾挎潯绮楃粏
+ },
+ symbol: 'circle',
+ symbolSize: 10,
+ itemStyle: {
+ borderWidth: 1,
+ borderColor: '#fff',
+ color: '#207FF7'
+ },
+ smooth: false
+ }
+ ]
+ })
+ window.addEventListener('resize', function () { // 鎵ц
+ myChart.resize()
+ })
+ },
+ initEchart4 () {
+ const myChart = echarts.init(document.getElementById('echart4'))
+ const that = this
+ myChart.setOption({
+ tooltip: {
+ trigger: 'axis',
+ axisPointer: {
+ type: 'line'
+ },
+ formatter: function (params) {
+ return `
+ <div style="background-color: #15323f;margin: -12px;padding: 14px;border: 2px solid rgba(1,217,254,0.5);color: #fff;">
+ <div>${params[0].name}</div>
+ <div style="display: flex;align-items: center;">
+ <div style="width: 10px;height: 10px;border-radius: 50%;background-color: #6feef0;"></div>
+ <span style="margin-left: 6px;">${params[0].value}</span>
+ <div>杈�</div>
+ </div>
+ </div>
+ `
+ }
+ },
+ xAxis: {
+ type: 'category',
+ boundaryGap: false,
+ data: that.staticData.weekCarList.map(i => i.name)
+ },
+ yAxis: {
+ type: 'value',
+ name: '杞﹁締鏁�',
+ nameTextStyle: {
+ padding: [0, 0, 4, -30] // 鍥涗釜鏁板瓧鍒嗗埆涓轰笂鍙充笅宸︿笌鍘熶綅缃窛绂�
+ },
+ splitLine: {
+ show: true,
+ lineStyle: {
+ // 杩欓噷杈撳叆绾挎潯鐨勬牱寮�
+ color: 'rgba(255,255,255,0.14)'
+ }
+ }
+ },
+ grid: {
+ top: '16%',
+ left: '2%',
+ right: '8%',
+ bottom: '4%',
+ containLabel: true
+ },
+ series: [
+ {
+ data: that.staticData.weekCarList.map(i => i.num),
+ type: 'line',
+ areaStyle: {
+ normal: {
+ color: {
+ x: 0,
+ y: 0,
+ x2: 0,
+ y2: 1,
+ colorStops: [{
+ offset: 0,
+ color: '#42D49D' // 0% 澶勭殑棰滆壊
+ }, {
+ offset: 1,
+ color: 'rgba(255,255,255,.5)' // 100% 澶勭殑棰滆壊
+ }],
+ globalCoord: false // 缂虹渷涓� false
+ }
+ }
+ },
+ lineStyle: { // 绾挎潯鏍峰紡
+ color: {
+ type: 'linear',
+ x: 0,
+ y: 0,
+ x2: 0,
+ y2: 1,
+ colorStops: [{
+ offset: 0, color: '#42D49D' // 0% 澶勭殑棰滆壊
+ }, {
+ offset: 1, color: '#42D49D' // 100% 澶勭殑棰滆壊
+ }]
+ },
+ width: 2 // 绾挎潯绮楃粏
+ },
+ symbol: 'circle',
+ symbolSize: 10,
+ itemStyle: {
+ borderWidth: 1,
+ borderColor: '#fff',
+ color: '#42D49D' // 鎶樼嚎鐐圭殑棰滆壊
+ },
+ smooth: false
+ }
+ ]
+ })
+ window.addEventListener('resize', function () { // 鎵ц
+ myChart.resize()
+ })
+ }
}
}
</script>
-<style scoped lang="scss">
-@import "@/assets/style/variables.scss";
-.home {
- text-align: center;
- color: #777;
- .wrap {
- margin-top: 80px;
- img {
- width: 240px;
- }
- }
- h2 {
- font-size: 32px;
- color: #555;
- margin-bottom: 20px;
- }
- p {
- line-height: 24px;
- margin: 0;
- }
- .start-up {
- margin-top: 8px;
- }
- .guide {
- margin: 30px 0 40px 0;
- display: flex;
- justify-content: center;
- a {
- margin-right: 12px;
- padding: 12px 40px;
- border-radius: 30px;
- background: $primary-color;
+<style lang="scss" scoped>
+div {
+ box-sizing: border-box;
+}
+
+.home_title {
+ font-weight: 600;
+ font-size: 16px;
+ color: #222222;
+ line-height: 22px;
+}
+
+.main {
+ display: flex;
+ position: relative;
+ z-index: 99;
+
+ .app_content {
+ flex: 1;
+
+ .static_card {
+ height: 187px;
color: #fff;
- text-decoration: none;
+ display: flex;
+ justify-content: space-between;
+
+ .card {
+ flex: 1;
+ height: 187px;
+ background: linear-gradient(270deg, #29aeff 0%, #207ff7 100%);
+ box-shadow: 0px 2px 10px 0px rgba(32, 127, 247, 0.4);
+ border-radius: 8px;
+ margin-right: 14px;
+
+ &:nth-of-type(2) {
+ background: linear-gradient(270deg, #8383ff 0%, #6b6eff 100%);
+ }
+
+ &:nth-of-type(3) {
+ background: linear-gradient(270deg, #42d49d 0%, #12bb8b 100%);
+ }
+
+ &:nth-of-type(4) {
+ margin-right: 0;
+ background: linear-gradient(270deg, #30d3de 0%, #04b7cd 100%);
+ }
+
+ .header {
+ height: 103px;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 20px 20px 12px;
+ border-bottom: 1px solid rgba(255, 255, 255, 0.2);
+
+ img {
+ width: 40px;
+ height: 40px;
+ }
+
+ .num {
+ font-weight: 600;
+ font-size: 30px;
+ margin-top: 12px;
+ }
+ }
+
+ .content {
+ height: 82px;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ font-size: 13px;
+ padding: 15px 20px 20px;
+ }
+ }
+ }
+
+ .funcs {
+ height: 149px;
+ padding: 20px;
+ background: #fff;
+ margin: 10px 0;
+
+ .list {
+ display: flex;
+ padding-top: 20px;
+
+ .item {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ margin-right: 24px;
+ cursor: pointer;
+
+ img {
+ width: 44px;
+ height: 44px;
+ }
+ }
+ }
}
}
- em,a {
- font-style: normal;
- font-weight: bold;
- margin: 0 3px;
- color: $primary-color;
+
+ .app_side {
+ width: 408px;
+ margin-left: 10px;
+
+ .task {
+ background: #fff;
+ border-radius: 2px;
+ border: 1px solid #eeeeee;
+ padding: 20px;
+ height: 346px;
+ margin-bottom: 10px;
+
+ .header {
+ .num {
+ position: relative;
+ top: 3px;
+ height: 16px;
+ line-height: 16px;
+ font-size: 12px;
+ color: #ffffff;
+ padding: 0 6px;
+ font-weight: 400;
+ background: red;
+ border-radius: 8px;
+ margin-left: 13px;
+ }
+
+ .more {
+ font-size: 13px;
+ color: #999999;
+ }
+ }
+
+ .list {
+ .item {
+ display: flex;
+ align-items: center;
+ margin-top: 15px;
+
+ .content {
+ flex: 1;
+
+ .title {
+ color: #222222;
+ margin-bottom: 5px;
+ }
+
+ .time {
+ color: #999999;
+ font-size: 12px;
+ }
+ }
+
+ .btn {
+ margin-left: 10px;
+ width: 58px;
+ text-align: center;
+ height: 30px;
+ line-height: 30px;
+ background: #ffffff;
+ border-radius: 2px;
+ border: 1px solid #207ff7;
+ font-size: 13px;
+ color: #207ff7;
+ cursor: pointer;
+ }
+ }
+ }
+ }
+
+ .warnning {
+ background: #fff;
+ border-radius: 2px;
+ border: 1px solid #eeeeee;
+ padding: 20px;
+ height: 508px;
+
+ .header {
+ .num {
+ position: relative;
+ top: 3px;
+ height: 16px;
+ line-height: 16px;
+ font-size: 12px;
+ color: #ffffff;
+ padding: 0 6px;
+ font-weight: 400;
+ background: red;
+ border-radius: 8px;
+ margin-left: 13px;
+ }
+
+ .more {
+ font-size: 13px;
+ color: #999999;
+ }
+ }
+
+ .list {
+ padding-top: 6px;
+
+ .item {
+ margin-top: 10px;
+ padding: 15px;
+ width: 100%;
+ height: 140px;
+ background: rgba(32, 127, 247, 0.05);
+ border-radius: 4px;
+
+ .name_wrap {
+ margin-bottom: 10px;
+
+ .name {
+ font-weight: 600;
+ color: #222222;
+ }
+
+ .identity {
+ font-size: 13px;
+ color: #207ff7;
+ }
+ }
+
+ .line {
+ color: #666666;
+ margin-bottom: 8px;
+ font-size: 13px;
+ }
+
+ .auth {
+ .time {
+ font-weight: 600;
+ font-size: 13px;
+ color: #ee3821;
+ }
+
+ .btn {
+ margin-left: 10px;
+ width: 58px;
+ text-align: center;
+ height: 30px;
+ cursor: pointer;
+ line-height: 30px;
+ background: #ffffff;
+ border-radius: 2px;
+ border: 1px solid #207ff7;
+ font-size: 13px;
+ color: #207ff7;
+ }
+ }
+ }
+ }
+ }
+
+ .more {
+ cursor: pointer;
+ }
+
+ .empty {
+ height: 300px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ img {
+ width: 140px;
+ }
+ }
}
- .award {
+
+ .static_wrap {
+ .wrap {
+ background: #fff;
+ padding: 20px 20px 10px;
+ border-radius: 2px;
+ border: 1px solid #eeeeee;
+ height: 250px;
+ flex: 1;
+
+ &:nth-of-type(2n) {
+ margin-left: 10px;
+ }
+
+ .echart {
+ width: 100%;
+ height: 190px;
+ }
+
+ .header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+
+ .more {
+ font-size: 13px;
+ color: #999999;
+ }
+ }
+ }
+
+ .static1 {
+ .content {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100%;
+
+ .echart_wrap {
+ position: relative;
+
+ .pie_text {
+ position: absolute;
+ left: 50%;
+ top: 50%;
+ transform: translate(-50%, -50%);
+ z-index: 999;
+ }
+ }
+
+ .echart {
+ width: 150px;
+ height: 150px;
+ }
+
+ .list {
+ margin-left: 36px;
+
+ .item {
+ display: flex;
+ align-items: center;
+ margin: 8px 0;
+
+ .icon {
+ width: 16px;
+ height: 16px;
+ border-radius: 50%;
+ margin-right: 6px;
+ background: linear-gradient(270deg, #29aeff 0%, #207ff7 100%);
+ }
+
+ .text {
+ margin-right: 6px;
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+.main_home {
+ background: #f4f7fc;
+ position: relative;
+ width: 100%;
+ height: 100%;
+ overflow: auto;
+ padding: 92px 20px 20px;
+ .home_header {
position: absolute;
- right: 20px;
- bottom: 60px;
- display: flex;
- flex-direction: column;
- text-align: left;
- padding: 12px;
- border: 1px solid #eee;
- box-shadow: -1px 1px 10px #ccc;
- h4 {
- font-weight: bold;
- margin-bottom: 8px;
- }
- img {
- width: 160px;
- margin-bottom: 20px;
- transition: opacity ease .3s;
- }
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 200px;
+ padding: 20px;
+ color: #fff;
+ background: linear-gradient(180deg, #0c6ce3 0%, rgba(32, 127, 247, 0) 100%);
}
}
</style>
diff --git a/admin/src/views/login.vue b/admin/src/views/login.vue
index 8b3704c..9401aed 100644
--- a/admin/src/views/login.vue
+++ b/admin/src/views/login.vue
@@ -124,7 +124,7 @@
display: flex;
width: 100%;
height: 100vh;
- background-image: url("../assets/images/login.jpg");
+ background-image: url("../assets/images/login.png");
background-repeat: no-repeat;
background-size: auto 180%;
background-clip: content-box;
@@ -141,10 +141,10 @@
flex-direction: column;
justify-content: center;
h2 {
- font-size:34px;
+ font-size:44px;
font-style: italic;
font-weight: 900;
- margin-top: 50px;
+ margin-top: 0px;
}
h3 {
font-size: 49px;
diff --git a/server/src/main/java/com/doumee/api/business/CategoryController.java b/server/src/main/java/com/doumee/api/business/CategoryController.java
index 1296aa0..b69a568 100644
--- a/server/src/main/java/com/doumee/api/business/CategoryController.java
+++ b/server/src/main/java/com/doumee/api/business/CategoryController.java
@@ -7,7 +7,6 @@
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
import com.doumee.dao.business.model.Category;
-import com.doumee.dao.business.model.Company;
import com.doumee.service.business.CategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -16,7 +15,6 @@
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
-import java.util.ArrayList;
import java.util.List;
/**
@@ -80,7 +78,7 @@
@PostMapping("/exportExcel")
@RequiresPermissions("business:category:exportExcel")
public void exportExcel (@RequestBody PageWrap<Category> pageWrap, HttpServletResponse response) {
- ExcelExporter.build(Category.class).exportData(categoryService.findPage(pageWrap).getRecords(), "鍒嗙被淇℃伅琛�", response);
+ ExcelExporter.build(Category.class).export(categoryService.findPage(pageWrap).getRecords(), "鍒嗙被淇℃伅琛�", response);
}
@ApiOperation("鏍规嵁ID鏌ヨ")
diff --git a/server/src/main/java/com/doumee/api/business/CompanyController.java b/server/src/main/java/com/doumee/api/business/CompanyController.java
index 06d07ad..3d9eb96 100644
--- a/server/src/main/java/com/doumee/api/business/CompanyController.java
+++ b/server/src/main/java/com/doumee/api/business/CompanyController.java
@@ -9,15 +9,12 @@
import com.doumee.dao.business.model.Company;
import com.doumee.service.business.CompanyService;
import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
-import java.util.ArrayList;
import java.util.List;
/**
@@ -90,7 +87,7 @@
@PostMapping("/exportExcel")
@RequiresPermissions("business:company:exportExcel")
public void exportExcel (@RequestBody PageWrap<Company> pageWrap, HttpServletResponse response) {
- ExcelExporter.build(Company.class).exportData(companyService.findPage(pageWrap).getRecords(), "缁勭粐淇℃伅琛�", response);
+ ExcelExporter.build(Company.class).export(companyService.findPage(pageWrap).getRecords(), "缁勭粐淇℃伅琛�", response);
}
@ApiOperation("鏍规嵁ID鏌ヨ")
diff --git a/server/src/main/java/com/doumee/api/business/CompanyMemberController.java b/server/src/main/java/com/doumee/api/business/CompanyMemberController.java
index 4bd5e0b..6777284 100644
--- a/server/src/main/java/com/doumee/api/business/CompanyMemberController.java
+++ b/server/src/main/java/com/doumee/api/business/CompanyMemberController.java
@@ -15,9 +15,6 @@
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
-import java.util.ArrayList;
-import java.util.List;
-
/**
* @author 姹熻箘韫�
* @since 2025/04/03 16:30
@@ -73,7 +70,7 @@
@PostMapping("/exportExcel")
@RequiresPermissions("business:companymember:exportExcel")
public void exportExcel (@RequestBody PageWrap<CompanyMember> pageWrap, HttpServletResponse response) {
- ExcelExporter.build(CompanyMember.class).exportData(companyMemberService.findPage(pageWrap).getRecords(), "浜哄憳淇℃伅琛�", response);
+ ExcelExporter.build(CompanyMember.class).export(companyMemberService.findPage(pageWrap).getRecords(), "浜哄憳淇℃伅琛�", response);
}
@ApiOperation("鏍规嵁ID鏌ヨ")
diff --git a/server/src/main/java/com/doumee/api/business/ManagersController.java b/server/src/main/java/com/doumee/api/business/ManagersController.java
index 0e3170f..cb962e0 100644
--- a/server/src/main/java/com/doumee/api/business/ManagersController.java
+++ b/server/src/main/java/com/doumee/api/business/ManagersController.java
@@ -15,9 +15,6 @@
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
-import java.util.ArrayList;
-import java.util.List;
-
/**
* @author 姹熻箘韫�
* @since 2025/04/02 17:49
@@ -73,7 +70,7 @@
@PostMapping("/exportExcel")
@RequiresPermissions("business:managers:exportExcel")
public void exportExcel (@RequestBody PageWrap<Managers> pageWrap, HttpServletResponse response) {
- ExcelExporter.build(Managers.class).exportData(managersService.findPage(pageWrap).getRecords(), "璐d换浜轰俊鎭〃", response);
+ ExcelExporter.build(Managers.class).export(managersService.findPage(pageWrap).getRecords(), "璐d换浜轰俊鎭〃", response);
}
@ApiOperation("鏍规嵁ID鏌ヨ")
diff --git a/server/src/main/java/com/doumee/api/business/MemberController.java b/server/src/main/java/com/doumee/api/business/MemberController.java
index 7770e56..8781748 100644
--- a/server/src/main/java/com/doumee/api/business/MemberController.java
+++ b/server/src/main/java/com/doumee/api/business/MemberController.java
@@ -3,7 +3,6 @@
import com.doumee.api.BaseController;
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
-import com.doumee.core.constants.Constants;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
@@ -16,7 +15,6 @@
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
-import java.util.ArrayList;
import java.util.List;
/**
@@ -86,7 +84,7 @@
@PostMapping("/exportExcel")
@RequiresPermissions("business:member:exportExcel")
public void exportExcel (@RequestBody PageWrap<Member> pageWrap, HttpServletResponse response) {
- ExcelExporter.build(Member.class).exportData(memberService.findPage(pageWrap).getRecords(), "浜哄憳淇℃伅琛�", response);
+ ExcelExporter.build(Member.class).export(memberService.findPage(pageWrap).getRecords(), "浜哄憳淇℃伅琛�", response);
}
@ApiOperation("鏍规嵁ID鏌ヨ")
diff --git a/server/src/main/java/com/doumee/api/business/MultifileController.java b/server/src/main/java/com/doumee/api/business/MultifileController.java
index 0fc4546..cceeb16 100644
--- a/server/src/main/java/com/doumee/api/business/MultifileController.java
+++ b/server/src/main/java/com/doumee/api/business/MultifileController.java
@@ -1,7 +1,6 @@
package com.doumee.api.business;
import com.doumee.api.BaseController;
-import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
@@ -14,9 +13,6 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
-
-import java.util.ArrayList;
-import java.util.List;
/**
* @author 姹熻箘韫�
@@ -69,12 +65,6 @@
return ApiResponse.success(multifileService.findPage(pageWrap));
}
- @ApiOperation("瀵煎嚭Excel")
- @PostMapping("/exportExcel")
- @RequiresPermissions("business:multifile:exportExcel")
- public void exportExcel (@RequestBody PageWrap<Multifile> pageWrap, HttpServletResponse response) {
- ExcelExporter.build(Multifile.class).exportData(multifileService.findPage(pageWrap).getRecords(), "闄勪欢涓婁紶淇℃伅琛�", response);
- }
@ApiOperation("鏍规嵁ID鏌ヨ")
@GetMapping("/{id}")
diff --git a/server/src/main/java/com/doumee/api/business/NoticesController.java b/server/src/main/java/com/doumee/api/business/NoticesController.java
index c494e2f..b5a081d 100644
--- a/server/src/main/java/com/doumee/api/business/NoticesController.java
+++ b/server/src/main/java/com/doumee/api/business/NoticesController.java
@@ -15,9 +15,6 @@
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
-import java.util.ArrayList;
-import java.util.List;
-
/**
* @author 姹熻箘韫�
* @since 2025/04/02 17:49
@@ -73,7 +70,7 @@
@PostMapping("/exportExcel")
@RequiresPermissions("business:notices:exportExcel")
public void exportExcel (@RequestBody PageWrap<Notices> pageWrap, HttpServletResponse response) {
- ExcelExporter.build(Notices.class).exportData(noticesService.findPage(pageWrap).getRecords(), "绯荤粺娑堟伅淇℃伅琛�", response);
+ ExcelExporter.build(Notices.class).export(noticesService.findPage(pageWrap).getRecords(), "绯荤粺娑堟伅淇℃伅琛�", response);
}
@ApiOperation("鏍规嵁ID鏌ヨ")
diff --git a/server/src/main/java/com/doumee/api/business/WorkorderController.java b/server/src/main/java/com/doumee/api/business/WorkorderController.java
index a3c17a1..bd3dd0d 100644
--- a/server/src/main/java/com/doumee/api/business/WorkorderController.java
+++ b/server/src/main/java/com/doumee/api/business/WorkorderController.java
@@ -3,19 +3,30 @@
import com.doumee.api.BaseController;
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
+import com.doumee.core.constants.Constants;
+import com.doumee.core.constants.ResponseStatus;
+import com.doumee.core.exception.BusinessException;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
+import com.doumee.core.utils.DateUtil;
import com.doumee.dao.business.model.Workorder;
+import com.doumee.dao.business.vo.WorkorderDbhDto;
+import com.doumee.dao.business.vo.WorkorderDcaChildDto;
+import com.doumee.dao.business.vo.WorkorderDcaDto;
+import com.doumee.dao.business.vo.WorkorderSheDto;
import com.doumee.service.business.WorkorderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
-import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
-
import java.util.ArrayList;
+import java.util.Date;
import java.util.List;
/**
@@ -73,7 +84,76 @@
@PostMapping("/exportExcel")
@RequiresPermissions("business:workorder:exportExcel")
public void exportExcel (@RequestBody PageWrap<Workorder> pageWrap, HttpServletResponse response) {
- ExcelExporter.build(Workorder.class).exportData(workorderService.findPage(pageWrap).getRecords(), "宸ュ崟淇℃伅琛�", response);
+ //0SHE浜嬩欢 1DCA浜嬩欢鎻愪氦璁板綍 2DCA宸ュ崟 3璺岀粖婊戜簨浠�
+ long index = 1;
+ if(Constants.equalsInteger(pageWrap.getModel().getType(),Constants.ZERO)){
+ List<Workorder> records = workorderService.findPage(pageWrap).getRecords();
+ List<WorkorderSheDto> list = new ArrayList<>();
+ if(records!=null){
+ for(Workorder model : records){
+ WorkorderSheDto t = new WorkorderSheDto();
+ t.setIndex(index++);
+ BeanUtils.copyProperties(model,t);
+ if(Constants.equalsInteger(model.getOutJiuyi(),Constants.ONE)){
+ t.setJiuyiInfo("澶栭儴灏卞尰");
+ }else{
+ t.setJiuyiInfo("闈炲閮ㄥ氨鍖�");
+ if(Constants.equalsInteger(model.getIsYiwushi(),Constants.ONE)){
+ t.setJiuyiInfo(t.getJiuyiInfo() + "-鍖诲姟瀹�");
+ }else{
+ t.setJiuyiInfo(t.getJiuyiInfo() + "-闈炲尰鍔″");
+ if(Constants.equalsInteger(model.getIsHurted(),Constants.ONE)){
+ t.setJiuyiInfo(t.getJiuyiInfo() + "-鍙椾激");
+ }else{
+ t.setJiuyiInfo(t.getJiuyiInfo() + "-鏈彈浼�");
+ }
+ }
+ }
+ t.setMemberNames("鏈汉");
+ t.setMemberNames(t.getMemberNames()+"-"+StringUtils.defaultString(model.getMemberNames(),""));
+ list.add(t);
+ }
+ }
+ ExcelExporter.build(WorkorderSheDto.class).export(list, "SHE浜嬩欢宸ュ崟鎶ヨ〃_"+ DateUtil.formatDate(new Date(),"yyyyMMddHHmmss"), response);
+ }else if(Constants.equalsInteger(pageWrap.getModel().getType(),Constants.ONE)){
+ List<Workorder> records = workorderService.findPage(pageWrap).getRecords();
+ List<WorkorderDcaDto> list = new ArrayList<>();
+ if(records!=null){
+ for(Workorder model : records){
+ WorkorderDcaDto t = new WorkorderDcaDto();
+ t.setIndex(index++);
+ BeanUtils.copyProperties(model,t);
+ list.add(t);
+ }
+ }
+ ExcelExporter.build(WorkorderDcaDto.class).export(list, "DCA浜嬩欢宸ュ崟鎻愪氦璁板綍鎶ヨ〃_"+ DateUtil.formatDate(new Date(),"yyyyMMddHHmmss"), response);
+ }else if(Constants.equalsInteger(pageWrap.getModel().getType(),Constants.TWO)){
+ List<Workorder> records = workorderService.findPage(pageWrap).getRecords();
+ List<WorkorderDcaChildDto> list = new ArrayList<>();
+ if(records!=null){
+ for(Workorder model : records){
+ WorkorderDcaChildDto t = new WorkorderDcaChildDto();
+ t.setIndex(index++);
+ BeanUtils.copyProperties(model,t);
+ list.add(t);
+ }
+ }
+ ExcelExporter.build(WorkorderDcaChildDto.class).export(list, "DCA浜嬩欢宸ュ崟鎶ヨ〃_"+ DateUtil.formatDate(new Date(),"yyyyMMddHHmmss"), response);
+ }else if(Constants.equalsInteger(pageWrap.getModel().getType(),Constants.THREE)){
+ List<Workorder> records = workorderService.findPage(pageWrap).getRecords();
+ List<WorkorderDbhDto> list = new ArrayList<>();
+ if(records!=null){
+ for(Workorder model : records){
+ WorkorderDbhDto t = new WorkorderDbhDto();
+ t.setIndex(index++);
+ BeanUtils.copyProperties(model,t);
+ list.add(t);
+ }
+ }
+ ExcelExporter.build(WorkorderDbhDto.class).export(list, "璺岀粖婊戜簨浠跺伐鍗曟姤琛╛"+ DateUtil.formatDate(new Date(),"yyyyMMddHHmmss"), response);
+ }else{
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
+ }
}
@ApiOperation("鏍规嵁ID鏌ヨ")
diff --git a/server/src/main/java/com/doumee/api/business/WorkorderLogController.java b/server/src/main/java/com/doumee/api/business/WorkorderLogController.java
index ea3c688..c50ed6d 100644
--- a/server/src/main/java/com/doumee/api/business/WorkorderLogController.java
+++ b/server/src/main/java/com/doumee/api/business/WorkorderLogController.java
@@ -15,9 +15,6 @@
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
-import java.util.ArrayList;
-import java.util.List;
-
/**
* @author 姹熻箘韫�
* @since 2025/04/02 17:49
@@ -73,7 +70,7 @@
@PostMapping("/exportExcel")
@RequiresPermissions("business:workorderlog:exportExcel")
public void exportExcel (@RequestBody PageWrap<WorkorderLog> pageWrap, HttpServletResponse response) {
- ExcelExporter.build(WorkorderLog.class).exportData(workorderLogService.findPage(pageWrap).getRecords(), "宸ュ崟鎿嶄綔鍘嗗彶琛�", response);
+ ExcelExporter.build(WorkorderLog.class).export(workorderLogService.findPage(pageWrap).getRecords(), "宸ュ崟鎿嶄綔鍘嗗彶琛�", response);
}
@ApiOperation("鏍规嵁ID鏌ヨ")
diff --git a/server/src/main/java/com/doumee/api/system/SystemLoginLogController.java b/server/src/main/java/com/doumee/api/system/SystemLoginLogController.java
index f9034f5..bb09a75 100644
--- a/server/src/main/java/com/doumee/api/system/SystemLoginLogController.java
+++ b/server/src/main/java/com/doumee/api/system/SystemLoginLogController.java
@@ -39,6 +39,6 @@
@ApiOperation("瀵煎嚭Excel")
@RequiresPermissions("system:loginLog:query")
public void export (@RequestBody PageWrap<QuerySystemLoginLogDTO> pageWrap, HttpServletResponse response) {
- ExcelExporter.build(SystemLoginLog.class).exportData(systemLoginLogService.findPage(pageWrap).getRecords(), "鐧诲綍鏃ュ織", response);
+ ExcelExporter.build(SystemLoginLog.class).export(systemLoginLogService.findPage(pageWrap).getRecords(), "鐧诲綍鏃ュ織", response);
}
}
diff --git a/server/src/main/java/com/doumee/api/system/SystemTraceLogController.java b/server/src/main/java/com/doumee/api/system/SystemTraceLogController.java
index 79ac2d9..5998295 100644
--- a/server/src/main/java/com/doumee/api/system/SystemTraceLogController.java
+++ b/server/src/main/java/com/doumee/api/system/SystemTraceLogController.java
@@ -3,7 +3,6 @@
import com.doumee.api.BaseController;
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.model.ApiResponse;
-import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.system.dto.QuerySystemTraceLogDTO;
import com.doumee.dao.system.model.SystemTraceLog;
@@ -39,6 +38,6 @@
@PostMapping("/exportExcel")
@RequiresPermissions("system:traceLog:query")
public void exportExcel (@RequestBody PageWrap<QuerySystemTraceLogDTO> pageWrap, HttpServletResponse response) {
- ExcelExporter.build(SystemTraceLog.class).exportData(systemTraceLogService.findPage(pageWrap).getRecords(), "鎿嶄綔鏃ュ織", response);
+ ExcelExporter.build(SystemTraceLog.class).export(systemTraceLogService.findPage(pageWrap).getRecords(), "鎿嶄綔鏃ュ織", response);
}
}
diff --git a/server/src/main/java/com/doumee/core/annotation/excel/ExcelColumn.java b/server/src/main/java/com/doumee/core/annotation/excel/ExcelColumn.java
new file mode 100644
index 0000000..c0de11a
--- /dev/null
+++ b/server/src/main/java/com/doumee/core/annotation/excel/ExcelColumn.java
@@ -0,0 +1,115 @@
+package com.doumee.core.annotation.excel;
+
+import org.apache.poi.ss.usermodel.HorizontalAlignment;
+import org.apache.poi.ss.usermodel.IndexedColors;
+
+import java.lang.annotation.*;
+
+/**
+ * 鏍囪涓篍xcel鍒�
+ * @author Eva.Caesar Liu
+ * @date 2023/02/14 11:14
+ */
+@Inherited
+//@Target(ElementType.FIELD)
+@Target({ElementType.METHOD, ElementType.FIELD, ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ExcelColumn {
+ /**
+ * 瀵煎嚭瀛楁鍚嶏紙榛樿璋冪敤褰撳墠瀛楁鐨勨�済et鈥濇柟娉曪紝濡傛寚瀹氬鍑哄瓧娈典负瀵硅薄锛岃濉啓鈥滃璞″悕.瀵硅薄灞炴�р�濓紝渚嬶細鈥渁rea.name鈥濄�佲�渙ffice.name鈥濓級
+ */
+ String value() default "";
+ /**
+ * 瀛楁绫诲瀷锛�0锛氬鍑哄鍏ワ紱1锛氫粎瀵煎嚭锛�2锛氫粎瀵煎叆锛�
+ */
+ int type() default 0;
+ /**
+ * 鍒楀悕
+ */
+ String name();
+
+ /**
+ * 鍒楀锛堝崟浣嶄负瀛楃锛夛紝-1鑷姩璁$畻
+ */
+ int width() default -1;
+
+ /**
+ * 鎺掑簭锛屽�艰秺灏忚秺闈犲墠锛�-1鎸夊瓧娈靛弽灏勯『搴忔帓搴�
+ */
+ int index() default -1;
+
+ /**
+ * 瀵归綈鏂瑰紡
+ */
+ HorizontalAlignment align() default HorizontalAlignment.LEFT;
+
+ /**
+ * 鍒楄儗鏅壊
+ */
+ IndexedColors backgroundColor() default IndexedColors.GREY_25_PERCENT;
+
+ /**
+ * 鍒楁暟鎹崟鍏冩牸鑳屾櫙鑹�
+ */
+ IndexedColors dataBackgroundColor() default IndexedColors.WHITE;
+
+ /**
+ * 瀛椾綋棰滆壊
+ */
+ IndexedColors color() default IndexedColors.BLACK;
+
+ /**
+ * 瀛椾綋澶у皬锛堝儚绱狅級
+ */
+ short fontSize() default 12;
+
+ /**
+ * 绮椾綋
+ */
+ boolean bold() default false;
+
+ /**
+ * 鏂滀綋
+ */
+ boolean italic() default false;
+
+ /**
+ * 鍊兼槧灏勶紝濡�0=濂�;1=鐢�
+ */
+ String valueMapping() default "";
+
+ /**
+ * 鏁版嵁鍓嶇紑
+ */
+ String prefix() default "";
+
+ /**
+ * 鏁版嵁鍚庣紑
+ */
+ String suffix() default "";
+
+ /**
+ * 鏃ユ湡鏍煎紡
+ */
+ String dateFormat() default "yyyy-MM-dd";
+
+ /**
+ * 鑷畾涔夋暟鎹鐞嗗櫒
+ */
+ Class handler() default ExcelDataHandlerAdapter.class;
+
+ /**
+ * 鑷畾涔夋暟鎹鐞嗗櫒鍙傛暟
+ */
+ String[] args() default {};
+
+ /**
+ * 鍙嶅皠绫诲瀷
+ */
+ Class<?> fieldType() default Class.class;
+
+ /**
+ * 瀛楁褰掑睘缁勶紙鏍规嵁鍒嗙粍瀵煎嚭瀵煎叆锛�
+ */
+ int[] groups() default {};
+}
diff --git a/server/src/main/java/com/doumee/core/annotation/excel/ExcelDataConverterAdapter.java b/server/src/main/java/com/doumee/core/annotation/excel/ExcelDataHandlerAdapter.java
similarity index 62%
rename from server/src/main/java/com/doumee/core/annotation/excel/ExcelDataConverterAdapter.java
rename to server/src/main/java/com/doumee/core/annotation/excel/ExcelDataHandlerAdapter.java
index 8d666a4..33a153b 100644
--- a/server/src/main/java/com/doumee/core/annotation/excel/ExcelDataConverterAdapter.java
+++ b/server/src/main/java/com/doumee/core/annotation/excel/ExcelDataHandlerAdapter.java
@@ -2,16 +2,16 @@
/**
* Excel鏁版嵁鏍煎紡澶勭悊閫傞厤鍣�
- * @author dm
- * @since 2025/03/31 16:44
+ * @author Eva.Caesar Liu
+ * @date 2023/02/14 11:14
*/
-public interface ExcelDataConverterAdapter {
+public interface ExcelDataHandlerAdapter {
/**
* 鏍煎紡鍖�
- *
* @param args 鍙傛暟闆嗗悎锛岀涓�涓弬鏁颁负鍗曞厓鏍兼暟鎹�
+ *
* @return String
*/
- Object convert(Object... args);
+ Object format (Object... args);
}
diff --git a/server/src/main/java/com/doumee/core/annotation/excel/ExcelExportColumn.java b/server/src/main/java/com/doumee/core/annotation/excel/ExcelExportColumn.java
deleted file mode 100644
index 1a6ac31..0000000
--- a/server/src/main/java/com/doumee/core/annotation/excel/ExcelExportColumn.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package com.doumee.core.annotation.excel;
-
-import org.apache.poi.ss.usermodel.HorizontalAlignment;
-import org.apache.poi.ss.usermodel.IndexedColors;
-
-import java.lang.annotation.*;
-
-/**
- * 鏍囪涓篍xcel瀵煎嚭鍒�
- * @author dm
- * @since 2025/03/31 16:44
- */
-@Inherited
-@Target(ElementType.FIELD)
-@Retention(RetentionPolicy.RUNTIME)
-public @interface ExcelExportColumn {
-
- /**
- * 鍒楀悕
- */
- String name();
-
- /**
- * 鍒楀锛堝崟浣嶄负瀛楃锛夛紝-1鎸夊瓧娈靛弽灏勯『搴忔帓搴�
- */
- int width() default -1;
-
- /**
- * 鎺掑簭锛屽�艰秺灏忚秺闈犲墠锛�-1鎸夊瓧娈靛弽灏勯『搴忔帓搴�
- */
- int index() default -1;
-
- /**
- * 瀵归綈鏂瑰紡
- */
- HorizontalAlignment align() default HorizontalAlignment.LEFT;
-
- /**
- * 鍒楀ご鑳屾櫙鑹�
- */
- IndexedColors backgroundColor() default IndexedColors.GREY_25_PERCENT;
-
- /**
- * 鏁版嵁鍗曞厓鏍肩殑鑳屾櫙鑹�
- */
- IndexedColors dataBackgroundColor() default IndexedColors.WHITE;
-
- /**
- * 瀛椾綋棰滆壊
- */
- IndexedColors color () default IndexedColors.BLACK;
-
- /**
- * 瀛椾綋澶у皬锛堝儚绱狅級
- */
- short fontSize () default 12;
-
- /**
- * 鏄惁鍔犵矖
- */
- boolean bold () default false;
-
- /**
- * 鏄惁鍊炬枩
- */
- boolean italic () default false;
-
- /**
- * 鍊兼槧灏勶紝濡�0=濂�;1=鐢�
- */
- String valueMapping() default "";
-
- /**
- * 鏁版嵁鍓嶇紑
- */
- String prefix() default "";
-
- /**
- * 鏁版嵁鍚庣紑
- */
- String suffix() default "";
-
- /**
- * 鏃ユ湡鏍煎紡锛屽彧鏈夋暟鎹负java.util.Date鏃舵墠鐢熸晥
- */
- String dateFormat() default "yyyy-MM-dd";
-
- /**
- * 鏁版嵁杞崲鍣�
- */
- Class<? extends ExcelDataConverterAdapter> converter() default ExcelDataConverterAdapter.class;
-
- /**
- * 鏁版嵁杞崲鍣ㄥ弬鏁�
- */
- String[] args() default {};
-
-}
diff --git a/server/src/main/java/com/doumee/core/annotation/excel/ExcelExporter.java b/server/src/main/java/com/doumee/core/annotation/excel/ExcelExporter.java
index dd72cdc..477d2fd 100644
--- a/server/src/main/java/com/doumee/core/annotation/excel/ExcelExporter.java
+++ b/server/src/main/java/com/doumee/core/annotation/excel/ExcelExporter.java
@@ -5,6 +5,7 @@
import lombok.AllArgsConstructor;
import lombok.Data;
import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.springframework.core.annotation.AnnotationConfigurationException;
@@ -14,14 +15,14 @@
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.net.URLEncoder;
-import java.nio.charset.StandardCharsets;
+import java.nio.charset.Charset;
import java.text.SimpleDateFormat;
import java.util.*;
/**
* Excel瀵煎嚭瀹炵幇
- * @author dm
- * @since 2025/03/31 16:44
+ * @author Eva.Caesar Liu
+ * @date 2023/02/14 11:14
*/
@Data
public class ExcelExporter<T> {
@@ -29,12 +30,12 @@
private static final String DEFAULT_SHEET_NAME = "Sheet1";
private Class<T> modelClass;
+ private static int maxrows = 50000;
private ExcelExporter(){}
/**
* 鏋勯�犲櫒
- *
* @param modelClass 瀹炰綋Class瀵硅薄
*/
public static <T> ExcelExporter<T> build(Class<T> modelClass) {
@@ -42,22 +43,26 @@
excelExporter.setModelClass(modelClass);
return excelExporter;
}
-
/**
* 瀵煎嚭鍒版寚瀹氳緭鍑烘祦
- *
* @param data 鏁版嵁
* @param sheetName Sheet鍚嶇О
- * @param os 杈撳嚭娴�
*/
- public void exportData(List<T> data, String sheetName, OutputStream os) {
+ public void exportWithFirstAndEnd (List<T> data, String sheetName,String first,String end, OutputStream os) {
SXSSFWorkbook sxssfWorkbook;
try {
sxssfWorkbook = new SXSSFWorkbook();
Sheet sheet = sxssfWorkbook.createSheet(sheetName);
// 鍒涘缓鍒楀ご
- sheet.createFreezePane(0, 1);
- Row header = sheet.createRow(0);
+ sheet.createFreezePane(0, 2);
+ sheet.addMergedRegion(new CellRangeAddress(0 ,0,0,this.getColumns().size()-1));
+ Row title = sheet.createRow(0);
+ title.setHeight((short) 1000);
+ Cell c = title.createCell(0);
+ c.setCellValue(first);
+ configFirstCell(sxssfWorkbook,c);
+
+ Row header = sheet.createRow(1);
List<ColumnInfo> columns = this.getColumns();
for (int columnIndex = 0; columnIndex < columns.size(); columnIndex++) {
ColumnInfo column = columns.get(columnIndex);
@@ -72,17 +77,27 @@
// 璁剧疆鍒楀ご鍗曞厓鏍�
configHeaderCell(sxssfWorkbook, cell, column.columnConfig);
}
+ List<CellStyle> styleList = new ArrayList<>();
+ for (int columnIndex = 0; columnIndex < columns.size(); columnIndex++) {
+ ColumnInfo column = columns.get(columnIndex);
+ styleList.add( configDataCell(sxssfWorkbook, column.columnConfig));
+ }
// 鍒涘缓鏁版嵁璁板綍
for (int rowIndex = 0; rowIndex < data.size(); rowIndex++) {
- Row row = sheet.createRow(rowIndex + 1);
+ Row row = sheet.createRow(rowIndex + 2);
for (int columnIndex = 0; columnIndex < columns.size(); columnIndex++) {
ColumnInfo column = columns.get(columnIndex);
Cell cell = row.createCell(columnIndex);
cell.setCellValue(getCellData(column, data.get(rowIndex)));
- // 璁剧疆鏁版嵁鍗曞厓鏍�
- configDataCell(sxssfWorkbook, cell, column.columnConfig);
+ cell.setCellStyle(styleList.get(columnIndex));
}
}
+ sheet.addMergedRegion(new CellRangeAddress(data.size()+2 ,data.size()+2,0,this.getColumns().size()-1));
+ Row endRow = sheet.createRow(data.size()+2);
+// endRow.setHeight((short) 600);
+ Cell c1 = endRow.createCell(0);
+ c1.setCellValue(end);
+ c1.setCellStyle( configEndCell(sxssfWorkbook));
sxssfWorkbook.write(os);
os.close();
} catch (Exception e) {
@@ -99,21 +114,117 @@
}
/**
+ * 瀵煎嚭鍒版寚瀹氳緭鍑烘祦
+ * @param data 鏁版嵁
+ * @param sheetName Sheet鍚嶇О
+ * @param os 杈撳嚭娴�
+ */
+ public void export (List<T> data, String sheetName, OutputStream os) {
+ SXSSFWorkbook sxssfWorkbook;
+ try {
+ sxssfWorkbook = new SXSSFWorkbook();
+ int totalSheet =1;
+ if( data!=null && data.size()>0){
+ totalSheet = data.size()/maxrows;
+ if(data.size()%maxrows !=0){
+ totalSheet += 1;
+ }
+ }
+ for (int i = 0; i < totalSheet; i++) {
+ List<T> list = null;
+ if(data.size() < maxrows * (i+1)) {
+ list = data.subList(maxrows*i,data.size());
+ }else{
+ list = data.subList(maxrows*i,maxrows*(i+1));
+ }
+ createSheetDataBiz(list,"銆�"+(i+1)+"銆�"+sheetName,sxssfWorkbook);
+ }
+ sxssfWorkbook.write(os);
+ os.close();
+ } catch (Exception e) {
+ throw new BusinessException(ResponseStatus.EXPORT_EXCEL_ERROR, e);
+ } finally {
+ if (os != null) {
+ try {
+ os.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+
+ private void createSheetDataBiz(List<T> data, String sheetName, SXSSFWorkbook sxssfWorkbook) throws Exception{
+ Sheet sheet = sxssfWorkbook.createSheet(sheetName);
+ // 鍒涘缓鍒楀ご
+ sheet.createFreezePane(0, 1);
+ Row header = sheet.createRow(0);
+ List<ColumnInfo> columns = this.getColumns();
+ for (int columnIndex = 0; columnIndex < columns.size(); columnIndex++) {
+ ColumnInfo column = columns.get(columnIndex);
+ Cell cell = header.createCell(columnIndex);
+ cell.setCellValue(column.columnConfig.name());
+ // 鍒楀璁剧疆
+ if (column.columnConfig.width() == -1) {
+ sheet.setColumnWidth(columnIndex, column.columnConfig.name().length() * 2 * 256);
+ } else {
+ sheet.setColumnWidth(columnIndex, column.columnConfig.width() * 2 * 256);
+ }
+ // 璁剧疆鍒楀ご鍗曞厓鏍�
+ configHeaderCell(sxssfWorkbook, cell, column.columnConfig);
+ }
+ List<CellStyle> styleList = new ArrayList<>();
+ for (int columnIndex = 0; columnIndex < columns.size(); columnIndex++) {
+ ColumnInfo column = columns.get(columnIndex);
+ styleList.add( configDataCell(sxssfWorkbook, column.columnConfig));
+ }
+ // 鍒涘缓鏁版嵁璁板綍
+ for (int rowIndex = 0; rowIndex < data.size(); rowIndex++) {
+ Row row = sheet.createRow(rowIndex + 1);
+ for (int columnIndex = 0; columnIndex < columns.size(); columnIndex++) {
+ ColumnInfo column = columns.get(columnIndex);
+ Cell cell = row.createCell(columnIndex);
+ cell.setCellValue(getCellData(column, data.get(rowIndex)));
+ // 璁剧疆鏁版嵁鍗曞厓鏍兼牱寮�
+ cell.setCellStyle(styleList.get(columnIndex));
+ }
+ }
+ }
+
+ /**
* 瀵煎嚭鑷冲搷搴旀祦
- *
* @param data 鏁版嵁
* @param fileName Excel鏂囦欢鍚�
* @param sheetName Sheet鍚嶇О
* @param response HttpServletResponse瀵硅薄
*/
- public void exportData(List<T> data, String fileName, String sheetName, HttpServletResponse response) {
+ public void export (List<T> data, String fileName, String sheetName, HttpServletResponse response) {
try {
- String encodeFileName = URLEncoder.encode(fileName, StandardCharsets.UTF_8.toString()) + ".xlsx";
+ String encodeFileName = URLEncoder.encode(fileName, Charset.forName("UTF-8").toString()) + ".xlsx";
response.setHeader("Content-Disposition","attachment;filename=" + encodeFileName);
response.setContentType("application/octet-stream");
response.setHeader("doumee-opera-type", "download");
response.setHeader("doumee-download-filename", encodeFileName);
- this.exportData(data, sheetName, response.getOutputStream());
+ this.export(data, sheetName, response.getOutputStream());
+ } catch (IOException e) {
+ throw new BusinessException(ResponseStatus.EXPORT_EXCEL_ERROR, e);
+ }
+ }
+ /**
+ * 瀵煎嚭鑷冲搷搴旀祦
+ * @param data 鏁版嵁
+ * @param fileName Excel鏂囦欢鍚�
+ * @param sheetName Sheet鍚嶇О
+ * @param response HttpServletResponse瀵硅薄
+ */
+ public void exportWithFirstAndEnd (List<T> data, String fileName, String sheetName, String first,String end ,HttpServletResponse response) {
+ try {
+ String encodeFileName = URLEncoder.encode(fileName, Charset.forName("UTF-8").toString()) + ".xlsx";
+ response.setHeader("Content-Disposition","attachment;filename=" + encodeFileName);
+ response.setContentType("application/octet-stream");
+ response.setHeader("doumee-opera-type", "download");
+ response.setHeader("doumee-download-filename", encodeFileName);
+ this.exportWithFirstAndEnd(data, sheetName,first,end, response.getOutputStream());
} catch (IOException e) {
throw new BusinessException(ResponseStatus.EXPORT_EXCEL_ERROR, e);
}
@@ -121,16 +232,25 @@
/**
* 瀵煎嚭鑷冲搷搴旀祦
- *
* @param data 鏁版嵁
* @param fileName Excel鏂囦欢鍚�
* @param response HttpServletResponse瀵硅薄
*/
- public void exportData(List<T> data, String fileName, HttpServletResponse response) {
- this.exportData(data, fileName, DEFAULT_SHEET_NAME, response);
+ public void export (List<T> data, String fileName, HttpServletResponse response) {
+
+ this.export(data, fileName, DEFAULT_SHEET_NAME, response);
+ }
+ /**
+ * 瀵煎嚭鑷冲搷搴旀祦
+ * @param data 鏁版嵁
+ * @param fileName Excel鏂囦欢鍚�
+ * @param response HttpServletResponse瀵硅薄
+ */
+ public void exportWithFirstAndEnd (List<T> data, String fileName,String first,String end, HttpServletResponse response) {
+ this.exportWithFirstAndEnd(data, fileName, DEFAULT_SHEET_NAME, first,end,response);
}
- /**
+ /**O
* 鑾峰彇鍒楅泦鍚�
*/
private List<ColumnInfo> getColumns () {
@@ -138,12 +258,12 @@
Field[] fields = modelClass.getDeclaredFields();
int index = 0;
for (Field field : fields) {
- ExcelExportColumn excelColumn = field.getAnnotation(ExcelExportColumn.class);
+ ExcelColumn excelColumn = field.getAnnotation(ExcelColumn.class);
if (excelColumn == null) {
continue;
}
if (sortedFields.get(excelColumn.index()) != null) {
- throw new AnnotationConfigurationException("EVA: excel column contains the same index.");
+ throw new AnnotationConfigurationException("Excel column contains the same index.");
}
sortedFields.put(excelColumn.index() == -1 ? index : excelColumn.index(), new ColumnInfo(excelColumn, field));
index++;
@@ -154,32 +274,35 @@
/**
* 閰嶇疆鏁版嵁鍗曞厓鏍�
*/
- private void configDataCell (SXSSFWorkbook workbook, Cell cell, ExcelExportColumn columnConfig) {
- CellStyle style = workbook.createCellStyle();
- style.setAlignment(columnConfig.align());
- style.setVerticalAlignment(VerticalAlignment.CENTER);
- // 璁剧疆鑳屾櫙
- style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
- style.setFillForegroundColor(columnConfig.dataBackgroundColor().getIndex());
- // 瀛椾綋
- Font font = workbook.createFont();
- font.setFontHeightInPoints(columnConfig.fontSize());
- // 瀛椾綋棰滆壊
- font.setColor(columnConfig.color().getIndex());
- // 绮椾綋
- font.setBold(columnConfig.bold());
- // 鏂滀綋
- font.setItalic(columnConfig.italic());
- style.setFont(font);
- // 杈规
- configCellBorder(style);
- cell.setCellStyle(style);
+ private CellStyle configDataCell (SXSSFWorkbook workbook, ExcelColumn columnConfig) {
+ CellStyle configDataCellStyle = workbook.createCellStyle();
+ configDataCellStyle.setAlignment(columnConfig.align());
+ configDataCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
+ // 璁剧疆鑳屾櫙
+ configDataCellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
+ configDataCellStyle.setFillForegroundColor(columnConfig.dataBackgroundColor().getIndex());
+ // 瀛椾綋
+ Font font = workbook.createFont();
+ font.setFontHeightInPoints(columnConfig.fontSize());
+ // 瀛椾綋棰滆壊
+ font.setColor(columnConfig.color().getIndex());
+ // 绮椾綋
+ font.setBold(columnConfig.bold());
+ // 鏂滀綋
+ font.setItalic(columnConfig.italic());
+ configDataCellStyle.setFont(font);
+ // 杈规
+ configCellBorder(configDataCellStyle);
+ configDataCellStyle.setWrapText(true);
+
+ return configDataCellStyle;
+// cell.setCellStyle(configDataCellStyle);
}
/**
* 閰嶇疆鍒楀ご鍗曞厓鏍�
*/
- private void configHeaderCell (SXSSFWorkbook workbook, Cell cell, ExcelExportColumn columnConfig) {
+ private void configHeaderCell (SXSSFWorkbook workbook, Cell cell, ExcelColumn columnConfig) {
CellStyle style = workbook.createCellStyle();
style.setAlignment(columnConfig.align());
style.setVerticalAlignment(VerticalAlignment.CENTER);
@@ -193,6 +316,44 @@
// 璁剧疆杈规
configCellBorder(style);
cell.setCellStyle(style);
+ }
+ /**
+ * 閰嶇疆鍒楀ご鍗曞厓鏍�
+ */
+ private void configFirstCell (SXSSFWorkbook workbook, Cell cell ) {
+ CellStyle style = workbook.createCellStyle();
+ style.setAlignment(HorizontalAlignment.CENTER);
+ style.setVerticalAlignment(VerticalAlignment.CENTER);
+ // 璁剧疆鑳屾櫙
+ style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
+ style.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
+ // 瀛椾綋
+ Font font = workbook.createFont();
+ font.setFontHeightInPoints((short)18);
+ style.setFont(font);
+ // 璁剧疆杈规
+ configCellBorder(style);
+ cell.setCellStyle(style);
+ }
+// public static CellStyle configEndCellStyle =null;
+ /**
+ * 閰嶇疆鍒楀ご鍗曞厓鏍�
+ */
+ private CellStyle configEndCell (SXSSFWorkbook workbook ) {
+ CellStyle style = workbook.createCellStyle();
+ style.setAlignment(HorizontalAlignment.RIGHT);
+ style.setVerticalAlignment(VerticalAlignment.CENTER);
+ // 璁剧疆鑳屾櫙
+ style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
+ style.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
+ // 瀛椾綋
+ Font font = workbook.createFont();
+ font.setFontHeightInPoints((short)14);
+ style.setFont(font);
+ // 璁剧疆杈规
+ configCellBorder(style);
+ return style;
+
}
/**
@@ -221,19 +382,19 @@
}
String stringValue = value.toString();
// 瀛樺湪鑷畾涔夋暟鎹鐞嗗櫒
- if (!columnInfo.columnConfig.converter().equals(ExcelDataConverterAdapter.class)) {
+ if (!columnInfo.columnConfig.handler().equals(ExcelDataHandlerAdapter.class)) {
try {
- Object instance = columnInfo.columnConfig.converter().newInstance();
- Method convertMethod = columnInfo.columnConfig.converter().getMethod("convert", Object[].class);
+ Object instance = columnInfo.columnConfig.handler().newInstance();
+ Method formatMethod = columnInfo.columnConfig.handler().getMethod("format", Object[].class);
List<Object> args = new ArrayList<>();
args.add(value);
for (String arg : columnInfo.columnConfig.args()) {
args.add(arg);
}
- value = convertMethod.invoke(instance, new Object[]{args.toArray()});
+ value = formatMethod.invoke(instance, new Object[]{args.toArray()});
stringValue = value.toString();
} catch (Exception e) {
- throw new IllegalStateException("EVA: can not convert data by " + columnInfo.columnConfig.converter(), e);
+ throw new IllegalStateException("Can not format data by " + columnInfo.columnConfig.handler(), e);
}
}
// 鏃ユ湡澶勭悊
@@ -258,17 +419,12 @@
return stringValue;
}
- /**
- * 鍒椾俊鎭�
- */
@Data
@AllArgsConstructor
private static class ColumnInfo {
- // 鍒楅厤缃�
- private ExcelExportColumn columnConfig;
+ private ExcelColumn columnConfig;
- // 瀛楁淇℃伅
private Field field;
}
diff --git a/server/src/main/java/com/doumee/core/annotation/excel/ExcelImportCallback.java b/server/src/main/java/com/doumee/core/annotation/excel/ExcelImportCallback.java
deleted file mode 100644
index 75ee333..0000000
--- a/server/src/main/java/com/doumee/core/annotation/excel/ExcelImportCallback.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.doumee.core.annotation.excel;
-
-import java.util.List;
-
-/**
- * 鏁版嵁瀵煎叆鍥炶皟
- * @author dm
- * @since 2025/03/31 16:44
- */
-public interface ExcelImportCallback<T> {
-
- /**
- * 瀵煎叆鍥炶皟鏂规硶
- *
- * @param rows 鏁版嵁琛�
- * @param sync 鏄惁鍚屾宸插瓨鍦ㄦ暟鎹�
- * @return 鍚屾鎴愬姛鏁�
- */
- int callback(List<T> rows, boolean sync);
-}
diff --git a/server/src/main/java/com/doumee/core/annotation/excel/ExcelImportColumn.java b/server/src/main/java/com/doumee/core/annotation/excel/ExcelImportColumn.java
deleted file mode 100644
index 2f4777c..0000000
--- a/server/src/main/java/com/doumee/core/annotation/excel/ExcelImportColumn.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.doumee.core.annotation.excel;
-
-import java.lang.annotation.*;
-
-/**
- * 鏍囪涓篍xcel瀵煎叆鍒�
- * @author dm
- * @since 2025/03/31 16:44
- */
-@Inherited
-@Target(ElementType.FIELD)
-@Retention(RetentionPolicy.RUNTIME)
-public @interface ExcelImportColumn {
-
- /**
- * 鎺掑簭锛屽�艰秺灏忚秺闈犲墠锛�-1鎸夊瓧娈靛弽灏勯『搴忔帓搴�
- */
- int index() default -1;
-
- /**
- * 鏁版嵁杞崲鍣�
- */
- Class<? extends ExcelDataConverterAdapter> converter() default ExcelDataConverterAdapter.class;
-
- /**
- * 鑷畾涔夋暟鎹鐞嗗櫒鍙傛暟
- */
- String[] args() default {};
-
-}
diff --git a/server/src/main/java/com/doumee/core/annotation/excel/ExcelImporter.java b/server/src/main/java/com/doumee/core/annotation/excel/ExcelImporter.java
index ea4ee4d..f8f067c 100644
--- a/server/src/main/java/com/doumee/core/annotation/excel/ExcelImporter.java
+++ b/server/src/main/java/com/doumee/core/annotation/excel/ExcelImporter.java
@@ -1,212 +1,394 @@
package com.doumee.core.annotation.excel;
-import com.doumee.core.constants.ResponseStatus;
-import com.doumee.core.exception.BusinessException;
-import lombok.AllArgsConstructor;
-import lombok.Data;
import org.apache.commons.lang3.StringUtils;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
-import org.springframework.core.annotation.AnnotationConfigurationException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.web.multipart.MultipartFile;
+import java.io.File;
+import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
+import java.util.*;
/**
- * Excel瀵煎叆瀹炵幇
- * @author dm
- * @since 2025/03/31 16:44
+ * 瀵煎叆Excel鏂囦欢锛堟敮鎸佲�淴LS鈥濆拰鈥淴LSX鈥濇牸寮忥級
*/
-public class ExcelImporter<T> {
+public class ExcelImporter {
- private Class<T> modelClass;
-
- private ExcelImporter () {}
+ private static Logger log = LoggerFactory.getLogger(ExcelImporter.class);
/**
- * 鏋勯�燛xcelImporter瀵硅薄
- *
- * @param modelClass 瀹炰綋Class瀵硅薄
- * @return ExcelImporter瀹炰緥
+ * 宸ヤ綔钖勫璞�
*/
- public static <T> ExcelImporter<T> build(Class<T> modelClass) {
- ExcelImporter<T> excelImporter = new ExcelImporter<>();
- excelImporter.modelClass = modelClass;
- return excelImporter;
+ private Workbook wb;
+
+ /**
+ * 宸ヤ綔琛ㄥ璞�
+ */
+ private Sheet sheet;
+
+ /**
+ * 鏍囬琛屽彿
+ */
+ private int headerNum;
+ /**
+ * 鏍囬琛屽彿
+ */
+ private CellType changeType;
+
+ /**
+ * 鏋勯�犲嚱鏁�
+ * @param--path 瀵煎叆鏂囦欢锛岃鍙栫涓�涓伐浣滆〃
+ * @param headerNum 鏍囬琛屽彿锛屾暟鎹鍙�=鏍囬琛屽彿+1
+ * @throws InvalidFormatException
+ * @throws IOException
+ */
+ public ExcelImporter(String fileName, int headerNum)
+ throws InvalidFormatException, IOException {
+ this(new File(fileName), headerNum);
}
/**
- * 瀵煎叆鏁版嵁
- *
- * @param is 杈撳叆娴�
- * @param callback 鍥炶皟
- * @param sync 鏄惁鍚屾宸插瓨鍦ㄦ暟鎹�
- * @return 瀵煎叆鎴愬姛鏁�
+ * 鏋勯�犲嚱鏁�
+ * @param--path 瀵煎叆鏂囦欢瀵硅薄锛岃鍙栫涓�涓伐浣滆〃
+ * @param headerNum 鏍囬琛屽彿锛屾暟鎹鍙�=鏍囬琛屽彿+1 (eg: 1)
+ * @throws InvalidFormatException
+ * @throws IOException
*/
- public int importData (InputStream is, ExcelImportCallback<T> callback, boolean sync) {
- return this.importData(is, 0, callback, sync);
+ public ExcelImporter(File file, int headerNum)
+ throws InvalidFormatException, IOException {
+ this(file, headerNum, 0);
}
/**
- * 瀵煎叆鏁版嵁
- *
- * @param is 杈撳叆娴�
- * @param sheetIndex sheet鍧愭爣
- * @param callback 鍥炶皟
- * @param sync 鏄惁鍚屾宸插瓨鍦ㄦ暟鎹�
- * @return 瀵煎叆鎴愬姛鏁�
+ * 鏋勯�犲嚱鏁�
+ * @param--path 瀵煎叆鏂囦欢
+ * @param headerNum 鏍囬琛屽彿锛屾暟鎹鍙�=鏍囬琛屽彿+1
+ * @param sheetIndex 宸ヤ綔琛ㄧ紪鍙�
+ * @throws InvalidFormatException
+ * @throws IOException
*/
- public int importData (InputStream is, int sheetIndex, ExcelImportCallback<T> callback, boolean sync) {
- try {
- Workbook workbook = new XSSFWorkbook(is);
- Sheet sheet = workbook.getSheetAt(sheetIndex);
- // 鑾峰彇鍒椾俊鎭�
- List<ColumnInfo> columns = this.getColumns();
- List<T> data = new ArrayList<>();
- // 寰幆鑾峰彇excel琛岃褰�
- for (int i = 1; i <= sheet.getLastRowNum(); i++) {
- // 鏋勯�犳暟鎹疄渚嬪璞�
- T instance = modelClass.newInstance();
- Row row = sheet.getRow(i);
- // 寰幆鑾峰彇鍗曞厓鏍间俊鎭�
- for (int columnIndex = 0; columnIndex < columns.size(); columnIndex++) {
- Cell cell = row.getCell(columnIndex);
- if (cell == null) {
- continue;
- }
- if (StringUtils.isBlank(cell.toString())) {
- continue;
- }
- ColumnInfo columnInfo = columns.get(columnIndex);
- if (columnInfo == null) {
- break;
- }
- // 鍐欏叆瀵硅薄灞炴��
- columnInfo.getField().setAccessible(Boolean.TRUE);
- columnInfo.getField().set(instance, this.getCellValue(cell, columnInfo));
- columnInfo.getField().setAccessible(Boolean.FALSE);
- }
- // 濡傛灉鏄┖琛屽垯缁撴潫琛岃鍙�
- if (this.isEmptyRow(instance)) {
- break;
- }
- data.add(instance);
- }
- // 鎵ц鍥炶皟鍑芥暟
- return callback.callback(data, sync);
- } catch (Exception e) {
- throw new BusinessException(ResponseStatus.IMPORT_EXCEL_ERROR, e);
- } finally {
- if (is != null) {
- try {
- is.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
+ public ExcelImporter(String fileName, int headerNum, int sheetIndex)
+ throws InvalidFormatException, IOException {
+ this(new File(fileName), headerNum, sheetIndex);
+ }
+
+ /**
+ * 鏋勯�犲嚱鏁�
+ * @param--path 瀵煎叆鏂囦欢瀵硅薄
+ * @param headerNum 鏍囬琛屽彿锛屾暟鎹鍙�=鏍囬琛屽彿+1
+ * @param sheetIndex 宸ヤ綔琛ㄧ紪鍙�
+ * @throws InvalidFormatException
+ * @throws IOException
+ */
+ public ExcelImporter(File file, int headerNum, int sheetIndex)
+ throws InvalidFormatException, IOException {
+ this(file.getName(), new FileInputStream(file), headerNum, sheetIndex);
+ }
+
+ /**
+ * 鏋勯�犲嚱鏁� (閲嶈)
+ * @param--file 瀵煎叆鏂囦欢瀵硅薄
+ * @param headerNum 鏍囬琛屽彿锛屾暟鎹鍙�=鏍囬琛屽彿+1
+ * @param sheetIndex 宸ヤ綔琛ㄧ紪鍙�
+ * @throws InvalidFormatException
+ * @throws IOException
+ */
+ public ExcelImporter(MultipartFile multipartFile, int headerNum, int sheetIndex)
+ throws InvalidFormatException, IOException {
+ this(multipartFile.getOriginalFilename(), multipartFile.getInputStream(), headerNum, sheetIndex);
+ }
+ /**
+ * 鏋勯�犲嚱鏁� (閲嶈)
+ * @param--file 瀵煎叆鏂囦欢瀵硅薄
+ * @param headerNum 鏍囬琛屽彿锛屾暟鎹鍙�=鏍囬琛屽彿+1
+ * @param sheetIndex 宸ヤ綔琛ㄧ紪鍙�
+ * @throws InvalidFormatException
+ * @throws IOException
+ */
+ public ExcelImporter(MultipartFile multipartFile, int headerNum, int sheetIndex, CellType cellType)
+ throws InvalidFormatException, IOException {
+ this(multipartFile.getOriginalFilename(), multipartFile.getInputStream(), headerNum, sheetIndex,cellType);
+ }
+
+ /**
+ * 鏋勯�犲嚱鏁� 锛堬級
+ * @param--path 瀵煎叆鏂囦欢瀵硅薄
+ * @param headerNum 鏍囬琛屽彿锛屾暟鎹鍙�=鏍囬琛屽彿+1
+ * @param sheetIndex 宸ヤ綔琛ㄧ紪鍙� (eg: 0)
+ * @throws InvalidFormatException
+ * @throws IOException
+ */
+ public ExcelImporter(String fileName, InputStream in, int headerNum, int sheetIndex)
+ throws InvalidFormatException, IOException {
+ if (StringUtils.isBlank(fileName)){
+ throw new RuntimeException("瀵煎叆鏂囨。涓虹┖!");
+ }else if(fileName.toLowerCase().endsWith("xls")){
+ this.wb = new HSSFWorkbook(in);
+ }else if(fileName.toLowerCase().endsWith("xlsx")){
+ this.wb = new XSSFWorkbook(in);
+ }else{
+ throw new RuntimeException("鏂囨。鏍煎紡涓嶆纭�!");
}
+ if (this.wb.getNumberOfSheets()<sheetIndex){
+ throw new RuntimeException("鏂囨。涓病鏈夊伐浣滆〃!");
+ }
+ this.sheet = this.wb.getSheetAt(sheetIndex);
+ this.headerNum = headerNum;
+ log.debug("Initialize success.");
+ }
+ public ExcelImporter(String fileName, InputStream in, int headerNum, int sheetIndex,CellType cellType)
+ throws InvalidFormatException, IOException {
+ if (StringUtils.isBlank(fileName)){
+ throw new RuntimeException("瀵煎叆鏂囨。涓虹┖!");
+ }else if(fileName.toLowerCase().endsWith("xls")){
+ this.wb = new HSSFWorkbook(in);
+ }else if(fileName.toLowerCase().endsWith("xlsx")){
+ this.wb = new XSSFWorkbook(in);
+ }else{
+ throw new RuntimeException("鏂囨。鏍煎紡涓嶆纭�!");
+ }
+ if (this.wb.getNumberOfSheets()<sheetIndex){
+ throw new RuntimeException("鏂囨。涓病鏈夊伐浣滆〃!");
+ }
+ this.sheet = this.wb.getSheetAt(sheetIndex);
+ this.headerNum = headerNum;
+ this.changeType = cellType;
+ log.debug("Initialize success.");
+ }
+
+
+
+ /**
+ * 鑾峰彇琛屽璞�
+ * @param rownum
+ * @return
+ */
+ public Row getRow(int rownum){
+ return this.sheet.getRow(rownum);
}
/**
- * 鑾峰彇Cell鍊�
- *
- * @param cell 鍗曞厓鏍煎璞�
- * @param columnInfo 鍒楅厤缃�
+ * 鑾峰彇鏁版嵁琛屽彿
+ * @return
+ */
+ public int getDataRowNum(){
+ return headerNum+1;
+ }
+
+ /**
+ * 鑾峰彇鏈�鍚庝竴涓暟鎹鍙�
+ * @return
+ */
+ public int getLastDataRowNum(){
+ return this.sheet.getLastRowNum()+headerNum;
+ }
+
+ /**
+ * 鑾峰彇鏈�鍚庝竴涓垪鍙�
+ * @return
+ */
+ public int getLastCellNum(){
+ return this.getRow(headerNum).getLastCellNum();
+ }
+
+ /**
+ * 鑾峰彇鍗曞厓鏍煎��
+ * @param row 鑾峰彇鐨勮
+ * @param column 鑾峰彇鍗曞厓鏍煎垪鍙�
* @return 鍗曞厓鏍煎��
*/
- private Object getCellValue (Cell cell, ColumnInfo columnInfo) {
- CellType cellType = cell.getCellType();
- Type fieldType = columnInfo.getField().getGenericType();
- Object value = null;
- if (fieldType.getTypeName().equals("java.util.Date")) {
- value = cell.getDateCellValue();
- } else if (cellType.equals(CellType.NUMERIC)) {
- value = cell.getNumericCellValue();
- } else if (cellType.equals(CellType.STRING)) {
- value = cell.getStringCellValue();
- } else if (cellType.equals(CellType.BOOLEAN)) {
- value = cell.getBooleanCellValue();
- } else if (cellType.equals(CellType.BLANK)) {
- value = "";
- } else if (cellType.equals(CellType.ERROR)) {
- value = cell.getErrorCellValue();
- }
- // 璋冪敤杞崲鍣�
- if (!columnInfo.columnConfig.converter().equals(ExcelDataConverterAdapter.class)) {
- try {
- Object instance = columnInfo.columnConfig.converter().newInstance();
- Method convertMethod = columnInfo.columnConfig.converter().getMethod("convert", Object[].class);
- List<Object> args = new ArrayList<>();
- args.add(value);
- for (String arg : columnInfo.columnConfig.args()) {
- args.add(arg);
+ public Object getCellValue(Row row, int column){
+ Object val = "";
+ try{
+ Cell cell = row.getCell(column);
+ if (cell != null){
+ if (cell.getCellType() == CellType.NUMERIC){
+ cell.setCellType(CellType.STRING); // 纭繚鍗曞厓鏍肩被鍨嬩负瀛楃涓�
+ val = cell.getStringCellValue();
+ }else if (cell.getCellType() == CellType.STRING){
+ val = cell.getStringCellValue();
+ }else if (cell.getCellType() == CellType.FORMULA){
+ val = cell.getCellFormula();
+ }else if (cell.getCellType() == CellType.BOOLEAN){
+ val = cell.getBooleanCellValue();
+ }else if (cell.getCellType() == CellType.ERROR){
+ val = cell.getErrorCellValue();
}
- value = convertMethod.invoke(instance, new Object[]{args.toArray()});
- } catch (Exception e) {
- throw new IllegalStateException("EVA: can not convert data by " + columnInfo.columnConfig.converter(), e);
}
+ }catch (Exception e) {
+ return val;
}
- return value;
+ return val;
}
/**
- * 鑾峰彇鍒楅泦鍚�
+ * 鑾峰彇瀵煎叆鏁版嵁鍒楄〃
+ * @param cls 瀵煎叆瀵硅薄绫诲瀷
+ * @param groups 瀵煎叆鍒嗙粍 鍙负绌�
*/
- private List<ColumnInfo> getColumns () {
- Map<Integer, ColumnInfo> sortedFields = new TreeMap<>();
- Field[] fields = modelClass.getDeclaredFields();
- int index = 0;
- for (Field field : fields) {
- ExcelImportColumn excelColumn = field.getAnnotation(ExcelImportColumn.class);
- if (excelColumn == null) {
+ public <E> List<E> getDataList(Class<E> cls, int... groups) throws InstantiationException, IllegalAccessException{
+ List<Object[]> annotationList = new ArrayList<>();
+ // Get annotation field
+ Field[] fs = cls.getDeclaredFields();
+ for (Field f : fs){
+ ExcelColumn ef = f.getAnnotation(ExcelColumn.class);
+ if (ef != null && (ef.type()==0 || ef.type()==2)){
+ if (groups!=null && groups.length>0){
+ boolean inGroup = false;
+ for (int g : groups){
+ if (inGroup){
+ break;
+ }
+ for (int efg : ef.groups()){
+ if (g == efg){
+ inGroup = true;
+ annotationList.add(new Object[]{ef, f});
+ break;
+ }
+ }
+ }
+ }else{
+ annotationList.add(new Object[]{ef, f});
+ }
+ }
+ }
+ // Get annotation method
+ Method[] ms = cls.getDeclaredMethods();
+ for (Method m : ms){
+ ExcelColumn ef = m.getAnnotation(ExcelColumn.class);
+ if (ef != null && (ef.type()==0 || ef.type()==2)){
+ if (groups!=null && groups.length>0){
+ boolean inGroup = false;
+ for (int g : groups){
+ if (inGroup){
+ break;
+ }
+ for (int efg : ef.groups()){
+ if (g == efg){
+ inGroup = true;
+ annotationList.add(new Object[]{ef, m});
+ break;
+ }
+ }
+ }
+ }else{
+ annotationList.add(new Object[]{ef, m});
+ }
+ }
+ }
+ // Field sorting
+ Collections.sort(annotationList, (o1, o2) -> {
+ int index1 =((ExcelColumn)o1[0]).index(), index2=((ExcelColumn)o2[0]).index();
+ if(index1 == -1){
+ index1 = annotationList.size()+99999;
+ }
+ if(index2 == -1){
+ index2 = annotationList.size()+99999;
+ }
+ return new Integer(index1).compareTo(new Integer(index2));
+ });
+ //log.debug("Import column count:"+annotationList.size());
+ // Get excel data
+ List<E> dataList = new ArrayList<>();
+ System.out.println("璧峰鏁版嵁琛�:"+getDataRowNum());
+ System.out.println("缁撴潫鏁版嵁琛�:"+getLastDataRowNum());
+ for (int i = this.getDataRowNum(); i <= this.getLastDataRowNum(); i++) {
+ E e = (E)cls.newInstance();
+ int column = 0;
+ Row row = this.getRow(i);
+ if (Objects.isNull(row)){
continue;
}
- if (sortedFields.get(excelColumn.index()) != null) {
- throw new AnnotationConfigurationException("EVA: Excel column contains the same index.");
+ StringBuilder sb = new StringBuilder();
+ for (Object[] os : annotationList){
+ Object val = this.getCellValue(row, column++);
+ if (val != null){
+ ExcelColumn ef = (ExcelColumn)os[0];
+ // Get param type and type cast
+ Class<?> valType = Class.class;
+ if (os[1] instanceof Field){
+ valType = ((Field)os[1]).getType();
+ }else if(os[1] instanceof Method){
+ Method method = ((Method)os[1]);
+ if ("get".equals(method.getName().substring(0, 3))){
+ valType = method.getReturnType();
+ }else if("set".equals(method.getName().substring(0, 3))){
+ valType = ((Method)os[1]).getParameterTypes()[0];
+ }
+ }
+ //log.debug("Import value type: ["+i+","+column+"] " + valType);
+ try {
+ if (valType == String.class){
+ String s = String.valueOf(val.toString());
+ if(StringUtils.endsWith(s, ".0")){
+ val = StringUtils.substringBefore(s, ".0");
+ }else{
+ val = String.valueOf(val.toString()).trim();
+ }
+ }
+ else if (valType == Integer.class){
+ val = Double.valueOf(val.toString()).intValue();
+ }else if (valType == Long.class){
+ val = Double.valueOf(val.toString()).longValue();
+ }else if (valType == Double.class){
+ val = Double.valueOf(val.toString());
+ }else if (valType == Float.class){
+ val = Float.valueOf(val.toString());
+ }else if (valType == Date.class){
+ val = DateUtil.getJavaDate((Double)val);
+ }else{
+ if (ef.fieldType() != Class.class){
+ val = ef.fieldType().getMethod("getValue", String.class).invoke(null, val.toString());
+ }else{
+ val = Class.forName(this.getClass().getName().replaceAll(this.getClass().getSimpleName(),
+ "fieldtype."+valType.getSimpleName()+"Type")).getMethod("getValue", String.class).invoke(null, val.toString());
+ }
+ }
+ } catch (Exception ex) {
+ log.info("Get cell value ["+i+","+column+"] error: " + ex.toString());
+ val = null;
+ }
+ // set entity value
+ if (os[1] instanceof Field){
+ Reflections.invokeSetter(e, ((Field)os[1]).getName(), val);
+ }else if (os[1] instanceof Method){
+ String mthodName = ((Method)os[1]).getName();
+ if ("get".equals(mthodName.substring(0, 3))){
+ mthodName = "set"+StringUtils.substringAfter(mthodName, "get");
+ }
+ Reflections.invokeMethod(e, mthodName, new Class[] {valType}, new Object[] {val});
+ }
+ }
+ sb.append(val+", ");
}
- sortedFields.put(excelColumn.index() == -1 ? index : excelColumn.index(), new ColumnInfo(excelColumn, field));
- index++;
+ dataList.add(e);
+ log.debug("Read success: ["+i+"] "+sb.toString());
}
- return new ArrayList<>(sortedFields.values());
+ return dataList;
}
/**
- * 鍒ゆ柇鏄惁涓虹┖琛�
- *
- * @param row 琛屽璞�
- * @return Boolean
+ * 鍏抽棴娴� 娓呯悊涓存椂鏂囦欢
*/
- private boolean isEmptyRow(Object row) throws IllegalAccessException{
- Field[] fields = row.getClass().getDeclaredFields();
- for (Field field : fields) {
- field.setAccessible(Boolean.TRUE);
- if (field.get(row) != null) {
- field.setAccessible(Boolean.FALSE);
- return Boolean.FALSE;
+ public void dispose(){
+ try {
+ if(wb!=null){
+ wb.close();
}
- field.setAccessible(Boolean.FALSE);
+ } catch (IOException e) {
+ e.printStackTrace();
+ throw new RuntimeException(e);
}
- return Boolean.TRUE;
+
}
- /**
- * 鍒椾俊鎭�
- */
- @Data
- @AllArgsConstructor
- private static class ColumnInfo {
- // 鍒楅厤缃�
- private ExcelImportColumn columnConfig;
-
- // 瀛楁淇℃伅
- private Field field;
- }
-}
+}
\ No newline at end of file
diff --git a/server/src/main/java/com/doumee/core/annotation/excel/Reflections.java b/server/src/main/java/com/doumee/core/annotation/excel/Reflections.java
new file mode 100644
index 0000000..044dc97
--- /dev/null
+++ b/server/src/main/java/com/doumee/core/annotation/excel/Reflections.java
@@ -0,0 +1,294 @@
+package com.doumee.core.annotation.excel;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.Validate;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.util.Assert;
+
+import java.lang.reflect.*;
+
+/**
+ * 鍙嶅皠宸ュ叿绫�.
+ * 鎻愪緵璋冪敤getter/setter鏂规硶, 璁块棶绉佹湁鍙橀噺, 璋冪敤绉佹湁鏂规硶, 鑾峰彇娉涘瀷绫诲瀷Class, 琚獳OP杩囩殑鐪熷疄绫荤瓑宸ュ叿鍑芥暟.
+ */
+@SuppressWarnings("rawtypes")
+public class Reflections {
+
+ private static final String SETTER_PREFIX = "set";
+
+ private static final String GETTER_PREFIX = "get";
+
+ private static final String CGLIB_CLASS_SEPARATOR = "$$";
+
+ private static Logger logger = LoggerFactory.getLogger(Reflections.class);
+
+ /**
+ * 璋冪敤Getter鏂规硶.
+ * 鏀寔澶氱骇锛屽锛氬璞″悕.瀵硅薄鍚�.鏂规硶
+ */
+ public static Object invokeGetter(Object obj, String propertyName) {
+ Object object = obj;
+ for (String name : StringUtils.split(propertyName, ".")){
+ String getterMethodName = GETTER_PREFIX + StringUtils.capitalize(name);
+ object = invokeMethod(object, getterMethodName, new Class[] {}, new Object[] {});
+ }
+ return object;
+ }
+
+ /**
+ * 璋冪敤Setter鏂规硶, 浠呭尮閰嶆柟娉曞悕銆�
+ * 鏀寔澶氱骇锛屽锛氬璞″悕.瀵硅薄鍚�.鏂规硶
+ */
+ public static void invokeSetter(Object obj, String propertyName, Object value) {
+ Object object = obj;
+ String[] names = StringUtils.split(propertyName, ".");
+ for (int i=0; i<names.length; i++){
+ if(i<names.length-1){
+ String getterMethodName = GETTER_PREFIX + StringUtils.capitalize(names[i]);
+ object = invokeMethod(object, getterMethodName, new Class[] {}, new Object[] {});
+ }else{
+ String setterMethodName = SETTER_PREFIX + StringUtils.capitalize(names[i]);
+ invokeMethodByName(object, setterMethodName, new Object[] { value });
+ }
+ }
+ }
+
+ /**
+ * 鐩存帴璇诲彇瀵硅薄灞炴�у��, 鏃犺private/protected淇グ绗�, 涓嶇粡杩噂etter鍑芥暟.
+ */
+ public static Object getFieldValue(final Object obj, final String fieldName) {
+ Field field = getAccessibleField(obj, fieldName);
+
+ if (field == null) {
+ throw new IllegalArgumentException("Could not find field [" + fieldName + "] on target [" + obj + "]");
+ }
+
+ Object result = null;
+ try {
+ result = field.get(obj);
+ } catch (IllegalAccessException e) {
+ logger.error("闈炴硶璁块棶鐨勫紓甯竰}", e.getMessage());
+ }
+ return result;
+ }
+
+ /**
+ * 鐩存帴璁剧疆瀵硅薄灞炴�у��, 鏃犺private/protected淇グ绗�, 涓嶇粡杩噑etter鍑芥暟.
+ */
+ public static void setFieldValue(final Object obj, final String fieldName, final Object value) {
+ Field field = getAccessibleField(obj, fieldName);
+
+ if (field == null) {
+ throw new IllegalArgumentException("Could not find field [" + fieldName + "] on target [" + obj + "]");
+ }
+
+ try {
+ field.set(obj, value);
+ } catch (IllegalAccessException e) {
+ logger.error("闈炴硶璁块棶鐨勫紓甯�:{}", e.getMessage());
+ }
+ }
+
+ /**
+ * 鐩存帴璋冪敤瀵硅薄鏂规硶, 鏃犺private/protected淇グ绗�.
+ * 鐢ㄤ簬涓�娆℃�ц皟鐢ㄧ殑鎯呭喌锛屽惁鍒欏簲浣跨敤getAccessibleMethod()鍑芥暟鑾峰緱Method鍚庡弽澶嶈皟鐢�.
+ * 鍚屾椂鍖归厤鏂规硶鍚�+鍙傛暟绫诲瀷锛�
+ */
+ public static Object invokeMethod(final Object obj, final String methodName, final Class<?>[] parameterTypes,
+ final Object[] args) {
+ Method method = getAccessibleMethod(obj, methodName, parameterTypes);
+ if (method == null) {
+ throw new IllegalArgumentException("Could not find method [" + methodName + "] on target [" + obj + "]");
+ }
+
+ try {
+ return method.invoke(obj, args);
+ } catch (Exception e) {
+ throw convertReflectionExceptionToUnchecked(e);
+ }
+ }
+
+ /**
+ * 鐩存帴璋冪敤瀵硅薄鏂规硶, 鏃犺private/protected淇グ绗︼紝
+ * 鐢ㄤ簬涓�娆℃�ц皟鐢ㄧ殑鎯呭喌锛屽惁鍒欏簲浣跨敤getAccessibleMethodByName()鍑芥暟鑾峰緱Method鍚庡弽澶嶈皟鐢�.
+ * 鍙尮閰嶅嚱鏁板悕锛屽鏋滄湁澶氫釜鍚屽悕鍑芥暟璋冪敤绗竴涓��
+ */
+ public static Object invokeMethodByName(final Object obj, final String methodName, final Object[] args) {
+ Method method = getAccessibleMethodByName(obj, methodName);
+ if (method == null) {
+ throw new IllegalArgumentException("Could not find method [" + methodName + "] on target [" + obj + "]");
+ }
+
+ try {
+ return method.invoke(obj, args);
+ } catch (Exception e) {
+ throw convertReflectionExceptionToUnchecked(e);
+ }
+ }
+
+ /**
+ * 寰幆鍚戜笂杞瀷, 鑾峰彇瀵硅薄鐨凞eclaredField, 骞跺己鍒惰缃负鍙闂�.
+ *
+ * 濡傚悜涓婅浆鍨嬪埌Object浠嶆棤娉曟壘鍒�, 杩斿洖null.
+ */
+ public static Field getAccessibleField(final Object obj, final String fieldName) {
+ Validate.notNull(obj, "object can't be null");
+ Validate.notBlank(fieldName, "fieldName can't be blank");
+ for (Class<?> superClass = obj.getClass(); superClass != Object.class; superClass = superClass.getSuperclass()) {
+ try {
+ Field field = superClass.getDeclaredField(fieldName);
+ makeAccessible(field);
+ return field;
+ } catch (NoSuchFieldException e) {//NOSONAR
+ // Field涓嶅湪褰撳墠绫诲畾涔�,缁х画鍚戜笂杞瀷
+ continue;// new add
+ }
+ }
+ return null;
+ }
+
+ /**
+ * 寰幆鍚戜笂杞瀷, 鑾峰彇瀵硅薄鐨凞eclaredMethod,骞跺己鍒惰缃负鍙闂�.
+ * 濡傚悜涓婅浆鍨嬪埌Object浠嶆棤娉曟壘鍒�, 杩斿洖null.
+ * 鍖归厤鍑芥暟鍚�+鍙傛暟绫诲瀷銆�
+ *
+ * 鐢ㄤ簬鏂规硶闇�瑕佽澶氭璋冪敤鐨勬儏鍐�. 鍏堜娇鐢ㄦ湰鍑芥暟鍏堝彇寰桵ethod,鐒跺悗璋冪敤Method.invoke(Object obj, Object... args)
+ */
+ public static Method getAccessibleMethod(final Object obj, final String methodName,
+ final Class<?>... parameterTypes) {
+ Validate.notNull(obj, "object can't be null");
+ Validate.notBlank(methodName, "methodName can't be blank");
+
+ for (Class<?> searchType = obj.getClass(); searchType != Object.class; searchType = searchType.getSuperclass()) {
+ try {
+ Method method = searchType.getDeclaredMethod(methodName, parameterTypes);
+ makeAccessible(method);
+ return method;
+ } catch (NoSuchMethodException e) {
+ // Method涓嶅湪褰撳墠绫诲畾涔�,缁х画鍚戜笂杞瀷
+ continue;// new add
+ }
+ }
+ return null;
+ }
+
+ /**
+ * 寰幆鍚戜笂杞瀷, 鑾峰彇瀵硅薄鐨凞eclaredMethod,骞跺己鍒惰缃负鍙闂�.
+ * 濡傚悜涓婅浆鍨嬪埌Object浠嶆棤娉曟壘鍒�, 杩斿洖null.
+ * 鍙尮閰嶅嚱鏁板悕銆�
+ *
+ * 鐢ㄤ簬鏂规硶闇�瑕佽澶氭璋冪敤鐨勬儏鍐�. 鍏堜娇鐢ㄦ湰鍑芥暟鍏堝彇寰桵ethod,鐒跺悗璋冪敤Method.invoke(Object obj, Object... args)
+ */
+ public static Method getAccessibleMethodByName(final Object obj, final String methodName) {
+ Validate.notNull(obj, "object can't be null");
+ Validate.notBlank(methodName, "methodName can't be blank");
+
+ for (Class<?> searchType = obj.getClass(); searchType != Object.class; searchType = searchType.getSuperclass()) {
+ Method[] methods = searchType.getDeclaredMethods();
+ for (Method method : methods) {
+ if (method.getName().equals(methodName)) {
+ makeAccessible(method);
+ return method;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * 鏀瑰彉private/protected鐨勬柟娉曚负public锛屽敖閲忎笉璋冪敤瀹為檯鏀瑰姩鐨勮鍙ワ紝閬垮厤JDK鐨凷ecurityManager鎶辨�ㄣ��
+ */
+ public static void makeAccessible(Method method) {
+ if ((!Modifier.isPublic(method.getModifiers()) || !Modifier.isPublic(method.getDeclaringClass().getModifiers()))
+ && !method.isAccessible()) {
+ method.setAccessible(true);
+ }
+ }
+
+ /**
+ * 鏀瑰彉private/protected鐨勬垚鍛樺彉閲忎负public锛屽敖閲忎笉璋冪敤瀹為檯鏀瑰姩鐨勮鍙ワ紝閬垮厤JDK鐨凷ecurityManager鎶辨�ㄣ��
+ */
+ public static void makeAccessible(Field field) {
+ if ((!Modifier.isPublic(field.getModifiers()) || !Modifier.isPublic(field.getDeclaringClass().getModifiers()) || Modifier
+ .isFinal(field.getModifiers())) && !field.isAccessible()) {
+ field.setAccessible(true);
+ }
+ }
+
+ /**
+ * 閫氳繃鍙嶅皠, 鑾峰緱Class瀹氫箟涓0鏄庣殑娉涘瀷鍙傛暟鐨勭被鍨�, 娉ㄦ剰娉涘瀷蹇呴』瀹氫箟鍦ㄧ埗绫诲
+ * 濡傛棤娉曟壘鍒�, 杩斿洖Object.class.
+ * eg.
+ * public UserDao extends HibernateDao<User>
+ *
+ * @param clazz The class to introspect
+ * @return the first generic declaration, or Object.class if cannot be determined
+ */
+ @SuppressWarnings("unchecked")
+ public static <T> Class<T> getClassGenricType(final Class clazz) {
+ return getClassGenricType(clazz, 0);
+ }
+
+ /**
+ * 閫氳繃鍙嶅皠, 鑾峰緱Class瀹氫箟涓0鏄庣殑鐖剁被鐨勬硾鍨嬪弬鏁扮殑绫诲瀷.
+ * 濡傛棤娉曟壘鍒�, 杩斿洖Object.class.
+ *
+ * 濡俻ublic UserDao extends HibernateDao<User,Long>
+ *
+ * @param clazz clazz The class to introspect
+ * @param index the Index of the generic ddeclaration,start from 0.
+ * @return the index generic declaration, or Object.class if cannot be determined
+ */
+ public static Class getClassGenricType(final Class clazz, final int index) {
+
+ Type genType = clazz.getGenericSuperclass();
+
+ if (!(genType instanceof ParameterizedType)) {
+ logger.warn(clazz.getSimpleName() + "'s superclass not ParameterizedType");
+ return Object.class;
+ }
+
+ Type[] params = ((ParameterizedType) genType).getActualTypeArguments();
+
+ if (index >= params.length || index < 0) {
+ logger.warn("Index: " + index + ", Size of " + clazz.getSimpleName() + "'s Parameterized Type: "
+ + params.length);
+ return Object.class;
+ }
+ if (!(params[index] instanceof Class)) {
+ logger.warn(clazz.getSimpleName() + " not set the actual class on superclass generic parameter");
+ return Object.class;
+ }
+
+ return (Class) params[index];
+ }
+
+ public static Class<?> getUserClass(Object instance) {
+ Assert.notNull(instance, "Instance must not be null");
+ Class clazz = instance.getClass();
+ if (clazz != null && clazz.getName().contains(CGLIB_CLASS_SEPARATOR)) {
+ Class<?> superClass = clazz.getSuperclass();
+ if (superClass != null && !Object.class.equals(superClass)) {
+ return superClass;
+ }
+ }
+ return clazz;
+
+ }
+
+ /**
+ * 灏嗗弽灏勬椂鐨刢hecked exception杞崲涓簎nchecked exception.
+ */
+ public static RuntimeException convertReflectionExceptionToUnchecked(Exception e) {
+ if (e instanceof IllegalAccessException || e instanceof IllegalArgumentException
+ || e instanceof NoSuchMethodException) {
+ return new IllegalArgumentException(e);
+ } else if (e instanceof InvocationTargetException) {
+ return new RuntimeException(((InvocationTargetException) e).getTargetException());
+ } else if (e instanceof RuntimeException) {
+ return (RuntimeException) e;
+ }
+ return new RuntimeException("Unexpected Checked Exception.", e);
+ }
+}
\ No newline at end of file
diff --git a/server/src/main/java/com/doumee/core/annotation/excel/converter/DoubleToStringConverter.java b/server/src/main/java/com/doumee/core/annotation/excel/converter/DoubleToStringConverter.java
deleted file mode 100644
index 107a9d0..0000000
--- a/server/src/main/java/com/doumee/core/annotation/excel/converter/DoubleToStringConverter.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.doumee.core.annotation.excel.converter;
-
-import com.doumee.core.annotation.excel.ExcelDataConverterAdapter;
-
-import java.math.BigDecimal;
-
-/**
- * 灏忔暟杞瓧绗︿覆
- * @author dm
- * @since 2025/03/31 16:44
- */
-public class DoubleToStringConverter implements ExcelDataConverterAdapter {
-
- /**
- * 杞崲
- *
- * @param args 鍙傛暟闆嗗悎
- * - args[0] 鍗曞厓鏍兼暟鎹�
- * - args[1] 淇濈暀绮惧害浣嶆暟
- */
- @Override
- public Object convert(Object... args) {
- Object value = args[0];
- if (value == null) {
- return null;
- }
- BigDecimal decimalValue = new BigDecimal(String.valueOf((value)));
- // 绮惧害澶勭悊
- if (args.length > 1) {
- decimalValue = decimalValue.setScale(Integer.valueOf(args[1].toString()), BigDecimal.ROUND_HALF_UP);
- }
- decimalValue.toString();
- return decimalValue.toPlainString();
- }
-}
diff --git a/server/src/main/java/com/doumee/core/annotation/excel/converter/IntegerToStringConverter.java b/server/src/main/java/com/doumee/core/annotation/excel/converter/IntegerToStringConverter.java
deleted file mode 100644
index ef0e27b..0000000
--- a/server/src/main/java/com/doumee/core/annotation/excel/converter/IntegerToStringConverter.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.doumee.core.annotation.excel.converter;
-
-import com.doumee.core.annotation.excel.ExcelDataConverterAdapter;
-
-/**
- * 鏁存暟杞瓧绗︿覆
- * @author dm
- * @since 2025/03/31 16:44
- */
-public class IntegerToStringConverter implements ExcelDataConverterAdapter {
-
- /**
- * 杞崲
- *
- * @param args 鍙傛暟闆嗗悎
- * - args[0] 鍗曞厓鏍兼暟鎹�
- */
- @Override
- public Object convert(Object... args) {
- Object value = args[0];
- if (value == null) {
- return null;
- }
- if (value instanceof String) {
- return value;
- }
- return "" + ((Double)value).longValue();
- }
-}
diff --git a/server/src/main/java/com/doumee/dao/business/model/Category.java b/server/src/main/java/com/doumee/dao/business/model/Category.java
index 363598c..9f9f611 100644
--- a/server/src/main/java/com/doumee/dao/business/model/Category.java
+++ b/server/src/main/java/com/doumee/dao/business/model/Category.java
@@ -1,14 +1,13 @@
package com.doumee.dao.business.model;
import com.baomidou.mybatisplus.annotation.TableField;
-import com.doumee.core.annotation.excel.ExcelExportColumn;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
-import com.fasterxml.jackson.annotation.JsonFormat;
+
import java.util.Date;
import java.util.List;
@@ -24,65 +23,50 @@
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "涓婚敭", example = "1")
- @ExcelExportColumn(name="涓婚敭")
private Integer id;
@ApiModelProperty(value = "鍒涘缓浜虹紪鐮�", example = "1")
- @ExcelExportColumn(name="鍒涘缓浜虹紪鐮�")
private Integer creator;
@ApiModelProperty(value = "鍒涘缓鏃堕棿")
- @ExcelExportColumn(name="鍒涘缓鏃堕棿")
private Date createDate;
@ApiModelProperty(value = "鏇存柊浜虹紪鐮�", example = "1")
- @ExcelExportColumn(name="鏇存柊浜虹紪鐮�")
private Integer editor;
@ApiModelProperty(value = "鏇存柊鏃堕棿")
- @ExcelExportColumn(name="鏇存柊鏃堕棿")
private Date editDate;
@ApiModelProperty(value = "鏄惁鍒犻櫎0鍚� 1鏄�", example = "1")
- @ExcelExportColumn(name="鏄惁鍒犻櫎0鍚� 1鏄�")
private Integer isdeleted;
@ApiModelProperty(value = "鍚嶇О")
- @ExcelExportColumn(name="鍚嶇О")
private String name;
@ApiModelProperty(value = "澶囨敞")
- @ExcelExportColumn(name="澶囨敞")
private String remark;
@ApiModelProperty(value = "鐘舵�� 0鍚敤 1绂佺敤", example = "1")
- @ExcelExportColumn(name="鐘舵�� 0鍚敤 1绂佺敤")
private Integer status;
@ApiModelProperty(value = "鎺掑簭鐮�", example = "1")
- @ExcelExportColumn(name="鎺掑簭鐮�")
private Integer sortnum;
@ApiModelProperty(value = "鍥炬爣")
- @ExcelExportColumn(name="鍥炬爣")
private String imgurl;
@ApiModelProperty(value = "绫诲瀷 0SHE浼ゅ绫诲瀷 1璺岀粖婊戜激瀹崇被鍨� 2璺岀粖婊戝彂鐢熷湴鐐� 3DCA浣嶇疆 4DCA涓婚 5SHE椋庨櫓鍦扮偣 6DCA瑙傚療椤�", example = "1")
- @ExcelExportColumn(name="绫诲瀷 0SHE浼ゅ绫诲瀷 1璺岀粖婊戜激瀹崇被鍨� 2璺岀粖婊戝彂鐢熷湴鐐� 3DCA浣嶇疆 4DCA涓婚 5SHE椋庨櫓鍦扮偣 6DCA瑙傚療椤�")
private Integer type;
@ApiModelProperty(value = "鐖剁骇缂栫爜锛堣嚜鍏宠仈锛�", example = "1")
- @ExcelExportColumn(name="鐖剁骇缂栫爜锛堣嚜鍏宠仈锛�")
private Integer parentId;
@ApiModelProperty(value = "鍚嶇О璺緞")
- @ExcelExportColumn(name="鍚嶇О璺緞")
private String namePath;
@ApiModelProperty(value = "缂栫爜璺緞")
- @ExcelExportColumn(name="缂栫爜璺緞")
private String idPath;
@ApiModelProperty(value = "涓婄骇鍚嶇О")
@TableField(exist = false)
diff --git a/server/src/main/java/com/doumee/dao/business/model/Company.java b/server/src/main/java/com/doumee/dao/business/model/Company.java
index 0eb4d26..f5be827 100644
--- a/server/src/main/java/com/doumee/dao/business/model/Company.java
+++ b/server/src/main/java/com/doumee/dao/business/model/Company.java
@@ -1,14 +1,13 @@
package com.doumee.dao.business.model;
import com.baomidou.mybatisplus.annotation.TableField;
-import com.doumee.core.annotation.excel.ExcelExportColumn;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
-import com.fasterxml.jackson.annotation.JsonFormat;
+
import java.util.Date;
import java.util.List;
@@ -24,76 +23,58 @@
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "涓婚敭", example = "1")
- @ExcelExportColumn(name="涓婚敭")
private Integer id;
@ApiModelProperty(value = "鍒涘缓浜虹紪鐮�", example = "1")
- @ExcelExportColumn(name="鍒涘缓浜虹紪鐮�")
private Integer creator;
@ApiModelProperty(value = "鍒涘缓鏃堕棿")
- @ExcelExportColumn(name="鍒涘缓鏃堕棿")
private Date createDate;
@ApiModelProperty(value = "鏇存柊浜虹紪鐮�", example = "1")
- @ExcelExportColumn(name="鏇存柊浜虹紪鐮�")
private Integer editor;
@ApiModelProperty(value = "鏇存柊鏃堕棿")
- @ExcelExportColumn(name="鏇存柊鏃堕棿")
private Date editDate;
@ApiModelProperty(value = "鏄惁鍒犻櫎0鍚� 1鏄�", example = "1")
- @ExcelExportColumn(name="鏄惁鍒犻櫎0鍚� 1鏄�")
private Integer isdeleted;
@ApiModelProperty(value = "鍚嶇О")
- @ExcelExportColumn(name="鍚嶇О")
private String name;
@ApiModelProperty(value = "澶囨敞")
- @ExcelExportColumn(name="澶囨敞")
private String remark;
@ApiModelProperty(value = "鐘舵�� 0姝e父 1绂佺敤", example = "1")
- @ExcelExportColumn(name="鐘舵�� 0姝e父 1绂佺敤")
private Integer status;
@ApiModelProperty(value = "鎺掑簭鐮�", example = "1")
- @ExcelExportColumn(name="鎺掑簭鐮�")
private Integer sortnum;
@ApiModelProperty(value = "澶村儚")
- @ExcelExportColumn(name="澶村儚")
private String imgurl;
@ApiModelProperty(value = "绫诲瀷", example = "1")
- @ExcelExportColumn(name="绫诲瀷")
private Integer type;
@ApiModelProperty(value = "鎵�灞炵埗绾х紪鐮侊紙鍏宠仈company)", example = "1")
- @ExcelExportColumn(name="鎵�灞炵埗绾х紪鐮侊紙鍏宠仈company)")
private Integer parentId;
@ApiModelProperty(value = "缂栫爜")
- @ExcelExportColumn(name="缂栫爜")
private String code;
@ApiModelProperty(value = "浼佸井鏍囪瘑")
- @ExcelExportColumn(name="浼佸井鏍囪瘑")
private String qwId;
@ApiModelProperty(value = "鍚嶇О璺緞")
- @ExcelExportColumn(name="鍚嶇О璺緞")
private String namePath;
@ApiModelProperty(value = "缂栫爜璺緞")
- @ExcelExportColumn(name="缂栫爜璺緞")
private String idPath;
@ApiModelProperty(value = "浼佷笟寰俊鎵�灞炵埗绾х紪鐮侊紙鍏宠仈company)", example = "1")
- @ExcelExportColumn(name="浼佷笟寰俊鎵�灞炵埗绾х紪鐮侊紙鍏宠仈company)")
private String qwParentId;
diff --git a/server/src/main/java/com/doumee/dao/business/model/CompanyMember.java b/server/src/main/java/com/doumee/dao/business/model/CompanyMember.java
index dae2886..8df1158 100644
--- a/server/src/main/java/com/doumee/dao/business/model/CompanyMember.java
+++ b/server/src/main/java/com/doumee/dao/business/model/CompanyMember.java
@@ -1,13 +1,12 @@
package com.doumee.dao.business.model;
-import com.doumee.core.annotation.excel.ExcelExportColumn;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
-import com.fasterxml.jackson.annotation.JsonFormat;
+
import java.util.Date;
/**
@@ -22,52 +21,40 @@
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "涓婚敭", example = "1")
- @ExcelExportColumn(name="涓婚敭")
private Integer id;
@ApiModelProperty(value = "鍒涘缓浜虹紪鐮�", example = "1")
- @ExcelExportColumn(name="鍒涘缓浜虹紪鐮�")
private Integer creator;
@ApiModelProperty(value = "鍒涘缓鏃堕棿")
- @ExcelExportColumn(name="鍒涘缓鏃堕棿")
private Date createDate;
@ApiModelProperty(value = "鏇存柊浜虹紪鐮�", example = "1")
- @ExcelExportColumn(name="鏇存柊浜虹紪鐮�")
private Integer editor;
@ApiModelProperty(value = "鏇存柊鏃堕棿")
- @ExcelExportColumn(name="鏇存柊鏃堕棿")
private Date editDate;
@ApiModelProperty(value = "鏄惁鍒犻櫎0鍚� 1鏄�", example = "1")
- @ExcelExportColumn(name="鏄惁鍒犻櫎0鍚� 1鏄�")
private Integer isdeleted;
@ApiModelProperty(value = "澶囨敞")
- @ExcelExportColumn(name="澶囨敞")
private String remark;
@ApiModelProperty(value = "鎺掑簭鐮�", example = "1")
- @ExcelExportColumn(name="鎺掑簭鐮�")
private Integer sortnum;
@ApiModelProperty(value = "鎵�灞炵粍缁囩紪鐮侊紙鍏宠仈company)", example = "1")
- @ExcelExportColumn(name="鎵�灞炵粍缁囩紪鐮侊紙鍏宠仈company)")
private Integer companyId;
@ApiModelProperty(value = "鎵�灞炵粍缁囩紪鐮佽矾寰� ", example = "1")
- @ExcelExportColumn(name="鎵�灞炵粍缁囩紪鐮佽矾寰� ")
private String companyIdPath;
@ApiModelProperty(value = "浜哄憳缂栫爜锛堝叧鑱攎ember", example = "1")
- @ExcelExportColumn(name="浜哄憳缂栫爜锛堝叧鑱攎ember")
private Integer memberId;
@ApiModelProperty(value = "鏄惁涓洪儴闂ㄨ礋璐d汉0-鍚︼紱1-鏄�", example = "1")
- @ExcelExportColumn(name="鏄惁涓洪儴闂ㄨ礋璐d汉0-鍚︼紱1-鏄�")
private Integer isLeader;
}
diff --git a/server/src/main/java/com/doumee/dao/business/model/Managers.java b/server/src/main/java/com/doumee/dao/business/model/Managers.java
index 7c643bc..679154a 100644
--- a/server/src/main/java/com/doumee/dao/business/model/Managers.java
+++ b/server/src/main/java/com/doumee/dao/business/model/Managers.java
@@ -1,14 +1,13 @@
package com.doumee.dao.business.model;
import com.baomidou.mybatisplus.annotation.TableField;
-import com.doumee.core.annotation.excel.ExcelExportColumn;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
-import com.fasterxml.jackson.annotation.JsonFormat;
+
import java.util.Date;
/**
@@ -23,53 +22,41 @@
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "涓婚敭", example = "1")
- @ExcelExportColumn(name="涓婚敭")
private Integer id;
@ApiModelProperty(value = "鍒涘缓浜虹紪鐮�", example = "1")
- @ExcelExportColumn(name="鍒涘缓浜虹紪鐮�")
private Integer creator;
@ApiModelProperty(value = "鍒涘缓鏃堕棿")
- @ExcelExportColumn(name="鍒涘缓鏃堕棿")
private Date createDate;
@ApiModelProperty(value = "鏇存柊浜虹紪鐮�", example = "1")
- @ExcelExportColumn(name="鏇存柊浜虹紪鐮�")
private Integer editor;
@ApiModelProperty(value = "鏇存柊鏃堕棿")
- @ExcelExportColumn(name="鏇存柊鏃堕棿")
private Date editDate;
@ApiModelProperty(value = "鏄惁鍒犻櫎0鍚� 1鏄�", example = "1")
- @ExcelExportColumn(name="鏄惁鍒犻櫎0鍚� 1鏄�")
private Integer isdeleted;
@ApiModelProperty(value = "鎵�灞炲垎绫荤紪锛堝叧鑱攃ategory)")
- @ExcelExportColumn(name="鎵�灞炲垎绫荤紪锛堝叧鑱攃ategory)")
private String categoryId;
@ApiModelProperty(value = "澶囨敞")
- @ExcelExportColumn(name="澶囨敞")
private String remark;
@ApiModelProperty(value = "鐘舵�� 0鍚敤 1绂佺敤", example = "1")
- @ExcelExportColumn(name="鐘舵�� 0鍚敤 1绂佺敤")
private Integer status;
@ApiModelProperty(value = "鎺掑簭鐮�", example = "1")
- @ExcelExportColumn(name="鎺掑簭鐮�")
private Integer sortnum;
@ApiModelProperty(value = "绫诲瀷 0SHE璐熻矗浜� 1DCA鎵嬪姩鎶勯�佷汉鍛� 2DCA鏉冮檺浜哄憳", example = "1")
- @ExcelExportColumn(name="绫诲瀷 0SHE璐熻矗浜� 1DCA鎵嬪姩鎶勯�佷汉鍛� 2DCA鏉冮檺浜哄憳")
private Integer type;
@ApiModelProperty(value = "浜哄憳缂栫爜锛堝叧鑱攎ember)", example = "1")
- @ExcelExportColumn(name="浜哄憳缂栫爜锛堝叧鑱攎ember)")
private Integer memberId;
@ApiModelProperty(value = "缁勭粐鍚嶇О")
@TableField(exist = false)
diff --git a/server/src/main/java/com/doumee/dao/business/model/Member.java b/server/src/main/java/com/doumee/dao/business/model/Member.java
index 0be966e..25026fc 100644
--- a/server/src/main/java/com/doumee/dao/business/model/Member.java
+++ b/server/src/main/java/com/doumee/dao/business/model/Member.java
@@ -1,14 +1,13 @@
package com.doumee.dao.business.model;
import com.baomidou.mybatisplus.annotation.TableField;
-import com.doumee.core.annotation.excel.ExcelExportColumn;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
-import com.fasterxml.jackson.annotation.JsonFormat;
+
import java.util.Date;
import java.util.List;
@@ -24,89 +23,68 @@
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "涓婚敭", example = "1")
- @ExcelExportColumn(name="涓婚敭")
private Integer id;
@ApiModelProperty(value = "鍒涘缓浜虹紪鐮�", example = "1")
- @ExcelExportColumn(name="鍒涘缓浜虹紪鐮�")
private Integer creator;
@ApiModelProperty(value = "鍒涘缓鏃堕棿")
- @ExcelExportColumn(name="鍒涘缓鏃堕棿")
private Date createDate;
@ApiModelProperty(value = "鏇存柊浜虹紪鐮�", example = "1")
- @ExcelExportColumn(name="鏇存柊浜虹紪鐮�")
private Integer editor;
@ApiModelProperty(value = "鏇存柊鏃堕棿")
- @ExcelExportColumn(name="鏇存柊鏃堕棿")
private Date editDate;
@ApiModelProperty(value = "鏄惁鍒犻櫎0鍚� 1鏄�", example = "1")
- @ExcelExportColumn(name="鏄惁鍒犻櫎0鍚� 1鏄�")
private Integer isdeleted;
@ApiModelProperty(value = "濮撳悕")
- @ExcelExportColumn(name="濮撳悕")
private String name;
@ApiModelProperty(value = "澶囨敞")
- @ExcelExportColumn(name="澶囨敞")
private String remark;
@ApiModelProperty(value = "鐘舵�� 0姝e父 1绂佺敤", example = "1")
- @ExcelExportColumn(name="鐘舵�� 0姝e父 1绂佺敤")
private Integer status;
@ApiModelProperty(value = "鎺掑簭鐮�", example = "1")
- @ExcelExportColumn(name="鎺掑簭鐮�")
private Integer sortnum;
@ApiModelProperty(value = "澶村儚")
- @ExcelExportColumn(name="澶村儚")
private String imgurl;
@ApiModelProperty(value = "绫诲瀷", example = "1")
- @ExcelExportColumn(name="绫诲瀷")
private Integer type;
@ApiModelProperty(value = "鎵�灞炵粍缁囩紪鐮侊紙鍏宠仈company)", example = "1")
- @ExcelExportColumn(name="鎵�灞炵粍缁囩紪鐮侊紙鍏宠仈company)")
private String companyId;
@ApiModelProperty(value = "鎵嬫満鍙�")
- @ExcelExportColumn(name="鎵嬫満鍙�")
private String phone;
@ApiModelProperty(value = "閭")
- @ExcelExportColumn(name="閭")
private String email;
@ApiModelProperty(value = "鎬у埆 0鐢� 1濂� 2浣嶇疆", example = "1")
- @ExcelExportColumn(name="鎬у埆 0鐢� 1濂� 2浣嶇疆")
private Integer sex;
@ApiModelProperty(value = "宸ュ彿")
- @ExcelExportColumn(name="宸ュ彿")
private String code;
@ApiModelProperty(value = "浼佸井鏍囪瘑")
- @ExcelExportColumn(name="浼佸井鏍囪瘑")
private String qwId;
@ApiModelProperty(value = "璇佷欢鍙�")
- @ExcelExportColumn(name="璇佷欢鍙�")
private String idcard;
@ApiModelProperty(value = "鏈�杩戜笂绾挎椂闂�")
- @ExcelExportColumn(name="鏈�杩戜笂绾挎椂闂�")
private Date lastLoginDate;
@ApiModelProperty(value = "鐧诲綍娆℃暟", example = "1")
- @ExcelExportColumn(name="鐧诲綍娆℃暟")
private Integer loginCount;
@ApiModelProperty(value = "鏄惁鍖呭惈涓嬬骇缁勭粐鐢ㄦ埛")
diff --git a/server/src/main/java/com/doumee/dao/business/model/Multifile.java b/server/src/main/java/com/doumee/dao/business/model/Multifile.java
index 5408a5c..c5e23a1 100644
--- a/server/src/main/java/com/doumee/dao/business/model/Multifile.java
+++ b/server/src/main/java/com/doumee/dao/business/model/Multifile.java
@@ -1,14 +1,11 @@
package com.doumee.dao.business.model;
import com.baomidou.mybatisplus.annotation.TableField;
-import com.doumee.core.annotation.excel.ExcelExportColumn;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
-import com.fasterxml.jackson.annotation.JsonFormat;
+
import java.util.Date;
/**
@@ -22,63 +19,49 @@
public class Multifile {
@ApiModelProperty(value = "涓婚敭", example = "1")
- @ExcelExportColumn(name="涓婚敭")
private Integer id;
@ApiModelProperty(value = "鍒涘缓浜虹紪鐮�", example = "1")
- @ExcelExportColumn(name="鍒涘缓浜虹紪鐮�")
private Integer creator;
@ApiModelProperty(value = "鍒涘缓鏃堕棿")
- @ExcelExportColumn(name="鍒涘缓鏃堕棿")
private Date createDate;
@ApiModelProperty(value = "鏇存柊浜虹紪鐮�", example = "1")
- @ExcelExportColumn(name="鏇存柊浜虹紪鐮�")
private Integer editor;
@ApiModelProperty(value = "鏇存柊鏃堕棿")
- @ExcelExportColumn(name="鏇存柊鏃堕棿")
private Date editDate;
@ApiModelProperty(value = "鏄惁鍒犻櫎0鍚� 1鏄�", example = "1")
- @ExcelExportColumn(name="鏄惁鍒犻櫎0鍚� 1鏄�")
private Integer isdeleted;
@ApiModelProperty(value = "鏂囦欢鍚�")
- @ExcelExportColumn(name="鏂囦欢鍚�")
private String name;
@ApiModelProperty(value = "澶囨敞")
- @ExcelExportColumn(name="澶囨敞")
private String info;
@ApiModelProperty(value = "鍏宠仈瀵硅薄缂栫爜", example = "1")
- @ExcelExportColumn(name="鍏宠仈瀵硅薄缂栫爜")
private Integer objId;
@ApiModelProperty(value = "绫诲瀷0鍥剧墖 1瑙嗛 2鍏朵粬", example = "1")
- @ExcelExportColumn(name="绫诲瀷0鍥剧墖 1瑙嗛 2鍏朵粬")
private Integer type;
// @ApiModelProperty(value = "鍏宠仈瀵硅薄绫诲瀷 0SHE涓婃姤 1璺岀粖婊戜笂鎶� 2璺岀粖婊戝鐞� 3璺岀粖婊戝垎閰嶇墿涓氫富绠� 4璺岀粖婊戝垎閰嶅鐞嗕汉 5DCA椋庨櫓涓婃姤 6DCA椋庨櫓澶勭悊 7DCA宸ュ崟鍥剧墖", example = "1")
// @ExcelExportColumn(name="鍏宠仈瀵硅薄绫诲瀷 0SHE涓婃姤 1璺岀粖婊戜笂鎶� 2璺岀粖婊戝鐞� 3璺岀粖婊戝垎閰嶇墿涓氫富绠� 4璺岀粖婊戝垎閰嶅鐞嗕汉 5DCA椋庨櫓涓婃姤 6DCA椋庨櫓澶勭悊 7DCA宸ュ崟鍥剧墖")
@ApiModelProperty(value = "鍏宠仈瀵硅薄绫诲瀷 0宸ュ崟涓婃姤 1宸ュ崟澶勭悊 2宸ュ崟杞氦", example = "1")
- @ExcelExportColumn(name="鍏宠仈瀵硅薄绫诲瀷 0宸ュ崟涓婃姤 1宸ュ崟澶勭悊 2宸ュ崟杞氦")
private Integer objType;
@ApiModelProperty(value = "鏂囦欢鍦板潃")
- @ExcelExportColumn(name="鏂囦欢鍦板潃")
private String fileurl;
@ApiModelProperty(value = "鎺掑簭鐮�", example = "1")
- @ExcelExportColumn(name="鎺掑簭鐮�")
private Integer sortnum;
@ApiModelProperty(value = "浼佷笟缂栫爜(鍏宠仈company琛級", example = "1")
- @ExcelExportColumn(name="浼佷笟缂栫爜(鍏宠仈company琛級")
private Integer companyId;
@ApiModelProperty(value = "鏂囦欢鍦板潃")
diff --git a/server/src/main/java/com/doumee/dao/business/model/Notices.java b/server/src/main/java/com/doumee/dao/business/model/Notices.java
index 53e03b7..0eb7c3d 100644
--- a/server/src/main/java/com/doumee/dao/business/model/Notices.java
+++ b/server/src/main/java/com/doumee/dao/business/model/Notices.java
@@ -1,13 +1,12 @@
package com.doumee.dao.business.model;
-import com.doumee.core.annotation.excel.ExcelExportColumn;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
-import com.fasterxml.jackson.annotation.JsonFormat;
+
import java.util.Date;
/**
@@ -22,108 +21,83 @@
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "涓婚敭", example = "1")
- @ExcelExportColumn(name="涓婚敭")
private Integer id;
@ApiModelProperty(value = "鍒涘缓浜虹紪鐮�", example = "1")
- @ExcelExportColumn(name="鍒涘缓浜虹紪鐮�")
private Integer creator;
@ApiModelProperty(value = "鍒涘缓鏃堕棿")
- @ExcelExportColumn(name="鍒涘缓鏃堕棿")
private Date createDate;
@ApiModelProperty(value = "鏇存柊浜虹紪鐮�", example = "1")
- @ExcelExportColumn(name="鏇存柊浜虹紪鐮�")
private Integer editor;
@ApiModelProperty(value = "鏇存柊鏃堕棿")
- @ExcelExportColumn(name="鏇存柊鏃堕棿")
private Date editDate;
@ApiModelProperty(value = "鏄惁鍒犻櫎0鍚� 1鏄�", example = "1")
- @ExcelExportColumn(name="鏄惁鍒犻櫎0鍚� 1鏄�")
private Integer isdeleted;
@ApiModelProperty(value = "澶囨敞")
- @ExcelExportColumn(name="澶囨敞")
private String remark;
@ApiModelProperty(value = "鏍囬")
- @ExcelExportColumn(name="鏍囬")
private String title;
@ApiModelProperty(value = "绠�浠�")
- @ExcelExportColumn(name="绠�浠�")
private String info;
@ApiModelProperty(value = "鍐呭")
- @ExcelExportColumn(name="鍐呭")
private String content;
@ApiModelProperty(value = "鍏宠仈瀵硅薄缂栫爜", example = "1")
- @ExcelExportColumn(name="鍏宠仈瀵硅薄缂栫爜")
private Integer objId;
@ApiModelProperty(value = "鍏宠仈瀵硅薄绫诲瀷 0宸ュ崟")
- @ExcelExportColumn(name="鍏宠仈瀵硅薄绫诲瀷 0宸ュ崟")
private String objType;
@ApiModelProperty(value = "鍏宠仈瀵硅薄鍚嶇О")
- @ExcelExportColumn(name="鍏宠仈瀵硅薄鍚嶇О")
private String objName;
@ApiModelProperty(value = "绫诲瀷 0宸ュ崟涓婃姤 1鎶勯�� 2杞氦")
private String type;
@ApiModelProperty(value = "鐢ㄦ埛浼佸井涓婚敭")
- @ExcelExportColumn(name="鍏宠仈鍙傛暟1")
private String param1;
@ApiModelProperty(value = "鍏宠仈鍙傛暟2")
- @ExcelExportColumn(name="鍏宠仈鍙傛暟2")
private String param2;
@ApiModelProperty(value = "鍏宠仈鍙傛暟3")
- @ExcelExportColumn(name="鍏宠仈鍙傛暟3")
private String param3;
@ApiModelProperty(value = "鍏宠仈鍙傛暟4")
- @ExcelExportColumn(name="鍏宠仈鍙傛暟4")
private String param4;
@ApiModelProperty(value = "鍏宠仈鍙傛暟5")
- @ExcelExportColumn(name="鍏宠仈鍙傛暟5")
private String param5;
@ApiModelProperty(value = "鍏宠仈鐢ㄦ埛濮撳悕")
- @ExcelExportColumn(name="鍏宠仈鐢ㄦ埛濮撳悕")
private String memberName;
@ApiModelProperty(value = "鍏宠仈鐢ㄦ埛浼佸井缂栫爜")
- @ExcelExportColumn(name="鍏宠仈鐢ㄦ埛浼佸井缂栫爜")
private String qwId;
@ApiModelProperty(value = "鍏宠仈鐢ㄦ埛缂栫爜锛堝叧鑱攎ember)", example = "1")
- @ExcelExportColumn(name="鍏宠仈鐢ㄦ埛缂栫爜锛堝叧鑱攎ember)")
private Integer memberId;
@ApiModelProperty(value = "鍏宠仈浼佷笟缁勭粐缂栫爜(鍏宠仈company锛�", example = "1")
- @ExcelExportColumn(name="鍏宠仈浼佷笟缁勭粐缂栫爜(鍏宠仈company锛�")
private Integer companyId;
@ApiModelProperty(value = "鐘舵�� 0姝e父 1宸插叧闂�", example = "1")
- @ExcelExportColumn(name="鐘舵�� 0姝e父 1宸插叧闂�")
private Integer status;
@ApiModelProperty(value = "鏄惁鎶勯�� 0涓嶆槸 1鏄�", example = "1")
- @ExcelExportColumn(name="鏄惁鎶勯�� 0涓嶆槸 1鏄�")
private Integer sendacopy;
@ApiModelProperty(value = "鏄惁宸茶 0鏈 1宸茶", example = "1")
- @ExcelExportColumn(name="鏄惁宸茶 0鏈 1宸茶")
private Integer readed;
}
diff --git a/server/src/main/java/com/doumee/dao/business/model/Workorder.java b/server/src/main/java/com/doumee/dao/business/model/Workorder.java
index 8a9d440..5d4384b 100644
--- a/server/src/main/java/com/doumee/dao/business/model/Workorder.java
+++ b/server/src/main/java/com/doumee/dao/business/model/Workorder.java
@@ -1,7 +1,6 @@
package com.doumee.dao.business.model;
import com.baomidou.mybatisplus.annotation.TableField;
-import com.doumee.core.annotation.excel.ExcelExportColumn;
import com.doumee.dao.web.dto.DCANoProblemDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -25,179 +24,135 @@
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "涓婚敭", example = "1")
- @ExcelExportColumn(name="涓婚敭")
private Integer id;
@ApiModelProperty(value = "鍒涘缓浜虹紪鐮�", example = "1")
- @ExcelExportColumn(name="鍒涘缓浜虹紪鐮�")
private Integer creator;
@ApiModelProperty(value = "鍒涘缓鏃堕棿")
- @ExcelExportColumn(name="鍒涘缓鏃堕棿")
private Date createDate;
@ApiModelProperty(value = "鏇存柊浜虹紪鐮�", example = "1")
- @ExcelExportColumn(name="鏇存柊浜虹紪鐮�")
private Integer editor;
@ApiModelProperty(value = "鏇存柊鏃堕棿")
- @ExcelExportColumn(name="鏇存柊鏃堕棿")
private Date editDate;
@ApiModelProperty(value = "鏄惁鍒犻櫎0鍚� 1鏄�", example = "1")
- @ExcelExportColumn(name="鏄惁鍒犻櫎0鍚� 1鏄�")
private Integer isdeleted;
@ApiModelProperty(value = "DCA鍒嗙被锛堝叧鑱攃ategory)")
- @ExcelExportColumn(name="DCA鍒嗙被锛堝叧鑱攃ategory)")
private String categoryId;
@ApiModelProperty(value = "澶囨敞")
- @ExcelExportColumn(name="澶囨敞")
private String remark;
@ApiModelProperty(value = "鐘舵�� 鐘舵�� 0寰呯‘璁�/寰呭垵瀹� 1寰呭垎閰�/寰呯粓瀹� 2寰呭鐞� 3SHE鍏抽棴 4WTS鍏抽棴 5宸ョ▼甯堝叧闂�", example = "1")
- @ExcelExportColumn(name="鐘舵�� 鐘舵�� 0寰呯‘璁�/寰呭垵瀹� 1寰呭垎閰�/寰呯粓瀹� 2寰呭鐞� 3SHE鍏抽棴 4WTS鍏抽棴 5宸ョ▼甯堝叧闂�")
private Integer status;
@ApiModelProperty(value = "鎺掑簭鐮�", example = "1")
- @ExcelExportColumn(name="鎺掑簭鐮�")
private Integer sortnum;
@ApiModelProperty(value = "绫诲瀷 0SHE浜嬩欢 1DCA浜嬩欢鎻愪氦璁板綍 2DCA宸ュ崟 3璺岀粖婊戜簨浠�", example = "1")
- @ExcelExportColumn(name="绫诲瀷 0SHE浜嬩欢 1DCA浜嬩欢鎻愪氦璁板綍 2DCA宸ュ崟 3璺岀粖婊戜簨浠�")
private Integer type;
@ApiModelProperty(value = "涓婃姤浜哄憳缂栫爜锛堝叧鑱攎ember)", example = "1")
- @ExcelExportColumn(name="涓婃姤浜哄憳缂栫爜锛堝叧鑱攎ember)")
private Integer memberId;
@ApiModelProperty(value = "閮ㄩ棬缂栫爜", example = "1")
- @ExcelExportColumn(name="閮ㄩ棬缂栫爜")
private Integer companyId;
@ApiModelProperty(value = "涓婃姤鏃堕棿", example = "1")
- @ExcelExportColumn(name="涓婃姤鏃堕棿")
private Date submitDate;
@ApiModelProperty(value = "SHE娑夊強浜哄憳绫诲瀷 0鏈汉 1鍚屼簨 2渚涘簲鍟�", example = "1")
- @ExcelExportColumn(name="SHE娑夊強浜哄憳绫诲瀷 0鏈汉 1鍚屼簨 2渚涘簲鍟�")
private Integer memberType;
@ApiModelProperty(value = "SHE娑夊強浜哄憳浼佷笟缂栫爜闆嗗悎")
- @ExcelExportColumn(name="SHE娑夊強浜哄憳浼佷笟缂栫爜闆嗗悎")
private String memberQwids;
@ApiModelProperty(value = "SHE娑夊強浜哄憳渚涘簲鍟嗛泦鍚�")
- @ExcelExportColumn(name="SHE娑夊強浜哄憳渚涘簲鍟嗛泦鍚�")
private String memberNames;
@ApiModelProperty(value = "鍙戠敓鍦扮偣/浣嶇疆缂栫爜锛堝叧鑱攃ategory锛�", example = "1")
- @ExcelExportColumn(name="鍙戠敓鍦扮偣/浣嶇疆缂栫爜锛堝叧鑱攃ategory锛�")
private Integer localtionId;
@ApiModelProperty(value = "鏄惁澶栭儴灏卞尰 0鍚� 1鏄�")
- @ExcelExportColumn(name="鏄惁澶栭儴灏卞尰 0鍚� 1鏄�")
private Integer outJiuyi;
@ApiModelProperty(value = "鏄惁鍖诲姟瀹� 0鍚� 1鏄�", example = "1")
- @ExcelExportColumn(name="鏄惁鍖诲姟瀹� 0鍚� 1鏄�")
private Integer isYiwushi;
@ApiModelProperty(value = "鏄惁鍙椾激 0鍚� 1鏄�", example = "1")
- @ExcelExportColumn(name="鏄惁鍙椾激 0鍚� 1鏄�")
private Integer isHurted;
@ApiModelProperty(value = "鏄惁鍜屽伐浣滅浉鍏�", example = "1")
- @ExcelExportColumn(name="鏄惁鍜屽伐浣滅浉鍏�")
private Integer workRelated;
@ApiModelProperty(value = "浜嬩欢璇存槑", example = "1")
- @ExcelExportColumn(name="浜嬩欢璇存槑")
private String eventInfo;
@ApiModelProperty(value = "閭欢閫氱煡浜哄憳缂栫爜闆嗗悎")
- @ExcelExportColumn(name="閭欢閫氱煡浜哄憳缂栫爜闆嗗悎")
private String emialMemberIds;
@ApiModelProperty(value = "浼佷笟寰俊閫氱煡浜哄憳缂栫爜闆嗗悎")
- @ExcelExportColumn(name="浼佷笟寰俊閫氱煡浜哄憳缂栫爜闆嗗悎")
private String qwnoticeMemberIds;
@ApiModelProperty(value = "鍙戠敓鏃堕棿")
- @ExcelExportColumn(name="鍙戠敓鏃堕棿")
private Date happenTime;
@ApiModelProperty(value = "椋庨櫓銆佷激瀹炽�佽瀵熶富棰樼被鍨�(鍏宠仈category锛�")
- @ExcelExportColumn(name="椋庨櫓銆佷激瀹炽�佽瀵熶富棰樼被鍨�(鍏宠仈category锛�")
private Integer typeId;
@ApiModelProperty(value = "椋庨櫓鎻忚堪", example = "1")
- @ExcelExportColumn(name="椋庨櫓鎻忚堪")
private String riskInfo;
@ApiModelProperty(value = "褰撳墠鐗╀笟涓荤浼佷笟寰俊缂栫爜", example = "1")
- @ExcelExportColumn(name="褰撳墠鐗╀笟涓荤浼佷笟寰俊缂栫爜")
private String managerId;
@ApiModelProperty(value = "褰撳墠澶勭悊浜哄憳浼佷笟寰俊缂栫爜", example = "1")
- @ExcelExportColumn(name="褰撳墠澶勭悊浜哄憳浼佷笟寰俊缂栫爜")
private String dealerId;
@ApiModelProperty(value = "鍒嗛厤鏃堕棿")
- @ExcelExportColumn(name="鍒嗛厤鏃堕棿")
private Date dispatchTime;
@ApiModelProperty(value = "鍒嗛厤澶囨敞")
- @ExcelExportColumn(name="鍒嗛厤澶囨敞")
private String dispatchInfo;
@ApiModelProperty(value = "澶勭悊鏃堕棿")
- @ExcelExportColumn(name="澶勭悊鏃堕棿")
private Date dealTime;
@ApiModelProperty(value = "澶勭悊澶囨敞")
- @ExcelExportColumn(name="澶勭悊澶囨敞")
private String dealInfo;
@ApiModelProperty(value = "DCA闂鏍囬")
- @ExcelExportColumn(name="DCA闂鏍囬")
private String problemTitle;
@ApiModelProperty(value = "DCA闂缂栫爜(鍏宠仈category锛�", example = "1")
- @ExcelExportColumn(name="DCA闂缂栫爜(鍏宠仈category锛�")
private Integer problemId;
@ApiModelProperty(value = "DCA闂鎻忚堪")
- @ExcelExportColumn(name="DCA闂鎻忚堪")
private String problemInfo;
@ApiModelProperty(value = "浣嶇疆鍦扮偣璺緞鍚嶇О")
- @ExcelExportColumn(name="浣嶇疆鍦扮偣璺緞鍚嶇О")
private String locationName;
@ApiModelProperty(value = "宸ュ崟鍙�")
- @ExcelExportColumn(name="宸ュ崟鍙�")
private String code;
@ApiModelProperty(value = "DCA绗﹀悎鏁伴噺", example = "1")
- @ExcelExportColumn(name="DCA绗﹀悎鏁伴噺")
private Integer dcaYesNum;
@ApiModelProperty(value = "DCA涓嶇鍚堟暟閲�", example = "1")
- @ExcelExportColumn(name="DCA涓嶇鍚堟暟閲�")
private Integer dcaNoNum;
@ApiModelProperty(value = "DCA鎻愪氦璁板綍缂栫爜锛堣嚜鍏宠仈锛�", example = "1")
- @ExcelExportColumn(name="DCA鎻愪氦璁板綍缂栫爜锛堣嚜鍏宠仈锛�")
private Integer dcaRecordId;
@ApiModelProperty(value = "DCA宸ュ崟鎶勯�佷汉鍛樹紒涓氬井淇$紪鐮侀泦鍚�(澶氫釜鑻辨枃閫楀彿闅斿紑锛�")
- @ExcelExportColumn(name="DCA宸ュ崟鎶勯�佷汉鍛樹紒涓氬井淇$紪鐮侀泦鍚�(澶氫釜鑻辨枃閫楀彿闅斿紑锛�")
private String dcaCsIds;
@ApiModelProperty(value = "涓嬫鍌績鏃堕棿")
- @ExcelExportColumn(name="涓嬫鍌績鏃堕棿")
private Date urgeDate;
@ApiModelProperty("闄勪欢淇℃伅")
diff --git a/server/src/main/java/com/doumee/dao/business/model/WorkorderLog.java b/server/src/main/java/com/doumee/dao/business/model/WorkorderLog.java
index 30815f8..d3b4657 100644
--- a/server/src/main/java/com/doumee/dao/business/model/WorkorderLog.java
+++ b/server/src/main/java/com/doumee/dao/business/model/WorkorderLog.java
@@ -1,14 +1,13 @@
package com.doumee.dao.business.model;
import com.baomidou.mybatisplus.annotation.TableField;
-import com.doumee.core.annotation.excel.ExcelExportColumn;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
-import com.fasterxml.jackson.annotation.JsonFormat;
+
import java.util.Date;
import java.util.List;
@@ -24,77 +23,59 @@
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "涓婚敭", example = "1")
- @ExcelExportColumn(name="涓婚敭")
private Integer id;
@ApiModelProperty(value = "鍒涘缓浜虹紪鐮�", example = "1")
- @ExcelExportColumn(name="鍒涘缓浜虹紪鐮�")
private Integer creator;
@ApiModelProperty(value = "鍒涘缓鏃堕棿")
- @ExcelExportColumn(name="鍒涘缓鏃堕棿")
private Date createDate;
@ApiModelProperty(value = "鏇存柊浜虹紪鐮�", example = "1")
- @ExcelExportColumn(name="鏇存柊浜虹紪鐮�")
private Integer editor;
@ApiModelProperty(value = "鏇存柊鏃堕棿")
- @ExcelExportColumn(name="鏇存柊鏃堕棿")
private Date editDate;
@ApiModelProperty(value = "鏄惁鍒犻櫎0鍚� 1鏄�", example = "1")
- @ExcelExportColumn(name="鏄惁鍒犻櫎0鍚� 1鏄�")
private Integer isdeleted;
@ApiModelProperty(value = "澶囨敞")
- @ExcelExportColumn(name="澶囨敞")
private String remark;
@ApiModelProperty(value = "宸ュ崟缂栫爜锛堝叧鑱攚orkorder)", example = "1")
- @ExcelExportColumn(name="宸ュ崟缂栫爜锛堝叧鑱攚orkorder)")
private Integer workorderId;
@ApiModelProperty(value = "鏍囬")
- @ExcelExportColumn(name="鏍囬")
private String title;
@ApiModelProperty(value = "绠�浠�")
- @ExcelExportColumn(name="绠�浠�")
private String content;
@ApiModelProperty(value = "鎿嶄綔绫诲瀷 0浠诲姟涓婃姤 1浠诲姟鍒嗛厤鐗╀笟涓荤 2浠诲姟鍒嗛厤澶勭悊浜� 3浠诲姟澶勭悊鍏抽棴 4浠诲姟鍌績", example = "1")
- @ExcelExportColumn(name="鎿嶄綔绫诲瀷 0浠诲姟涓婃姤 1浠诲姟鍒嗛厤鐗╀笟涓荤 2浠诲姟鍒嗛厤澶勭悊浜� 3浠诲姟澶勭悊鍏抽棴 4浠诲姟鍌績")
private Integer objType;
@ApiModelProperty(value = "鍏宠仈瀵硅薄缂栫爜")
- @ExcelExportColumn(name="鍏宠仈瀵硅薄缂栫爜")
private String objId;
@ApiModelProperty(value = "鎿嶄綔鍓嶅唴瀹�")
- @ExcelExportColumn(name="鎿嶄綔鍓嶅唴瀹�")
private String beforeContent;
@ApiModelProperty(value = "鎿嶄綔鍚庡唴瀹�")
- @ExcelExportColumn(name="鎿嶄綔鍚庡唴瀹�")
private String afterContent;
@ApiModelProperty(value = "鎿嶄綔浜�")
- @ExcelExportColumn(name="鍙傛暟1")
private String param1;
@ApiModelProperty(value = "澶勭悊浜�")
- @ExcelExportColumn(name="鍙傛暟2")
private String param2;
@ApiModelProperty(value = "鍙傛暟3")
- @ExcelExportColumn(name="鍙傛暟3")
private String param3;
@ApiModelProperty(value = "鍙傛暟4")
- @ExcelExportColumn(name="鍙傛暟4")
private String param4;
@ApiModelProperty(value = "鎿嶄綔浜哄悕绉�")
diff --git a/server/src/main/java/com/doumee/dao/business/vo/WorkorderAllDto.java b/server/src/main/java/com/doumee/dao/business/vo/WorkorderAllDto.java
new file mode 100644
index 0000000..18150e4
--- /dev/null
+++ b/server/src/main/java/com/doumee/dao/business/vo/WorkorderAllDto.java
@@ -0,0 +1,97 @@
+package com.doumee.dao.business.vo;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.doumee.core.annotation.excel.ExcelColumn;
+import com.doumee.dao.business.model.Multifile;
+import com.doumee.dao.business.model.Workorder;
+import com.doumee.dao.business.model.WorkorderLog;
+import com.doumee.dao.web.dto.DCANoProblemDTO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Created by IntelliJ IDEA.
+ *
+ * @Author : Rk
+ * @create 2023/7/13 10:40
+ */
+@Data
+@ApiModel("宸ュ崟瀵煎嚭淇℃伅")
+public class WorkorderAllDto {
+ @ApiModelProperty(value = "鍒涘缓鏃堕棿")
+ @ExcelColumn(name="鎻愪氦鏃堕棿",index =10 ,dateFormat = "yyyy-MM-dd HH:mm:ss",width = 10)
+ private Date createDate;
+ @ApiModelProperty(value = "鏈�杩戞搷浣滄椂闂�")
+ @ExcelColumn(name="鎻愪氦鏃堕棿",index =10 ,dateFormat = "yyyy-MM-dd HH:mm:ss",width = 10)
+ private Date editDate;
+ @ApiModelProperty(value = "澶囨敞")
+ @ExcelColumn(name="澶囨敞",index =10 ,width = 10)
+ private String remark;
+ @ApiModelProperty(value = "鐘舵�� 鐘舵�� 0寰呯‘璁�/寰呭垵瀹� 1寰呭垎閰�/寰呯粓瀹� 2寰呭鐞� 4WTS鍏抽棴 5宸ョ▼甯堝叧闂�", example = "1")
+ @ExcelColumn(name="鐘舵��",index =13,width = 6, valueMapping = "0=寰呭鐞�;1=寰呭垎閰�;2=寰呭鐞�;3=SHE鍏抽棴;4=WTS鍏抽棴;5=宸ョ▼甯堝叧闂�;")
+ private Integer status;
+ @ApiModelProperty(value = "涓婃姤鏃堕棿", example = "1")
+ @ExcelColumn(name="涓婃姤鏃堕棿",index =10 ,dateFormat = "yyyy-MM-dd HH:mm:ss",width = 10)
+ private Date submitDate;
+ @ApiModelProperty(value = "SHE娑夊強浜哄憳渚涘簲鍟嗛泦鍚�")
+ private String memberNames;
+ @ApiModelProperty(value = "鏄惁澶栭儴灏卞尰")
+ @ExcelColumn(name="鏄惁澶栭儴灏卞尰",index =13,width = 6, valueMapping = "0=鍚�;1=鏄�;")
+ private Integer outJiuyi;
+ @ApiModelProperty(value = "鏄惁鍖诲姟瀹�", example = "1")
+ @ExcelColumn(name="鏄惁鍖诲姟瀹�",index =13,width = 6, valueMapping = "0=鍚�;1=鏄�;")
+ private Integer isYiwushi;
+ @ApiModelProperty(value = "鏄惁鍙椾激", example = "1")
+ @ExcelColumn(name="鏄惁鍙椾激",index =13,width = 6, valueMapping = "0=鍚�;1=鏄�;")
+ private Integer isHurted;
+ @ApiModelProperty(value = "鏄惁鍜屽伐浣滅浉鍏�", example = "1")
+ @ExcelColumn(name="鏄惁鍜屽伐浣滅浉鍏�",index =13,width = 6, valueMapping = "0=鍚�;1=鏄�;")
+ private Integer workRelated;
+ @ApiModelProperty(value = "浜嬩欢璇存槑", example = "1")
+ @ExcelColumn(name="浜嬩欢璇存槑",index =13,width = 6)
+ private String eventInfo;
+ @ApiModelProperty(value = "鍙戠敓鏃堕棿")
+ @ExcelColumn(name="鍙戠敓鏃堕棿",index =10 ,dateFormat = "yyyy-MM-dd HH:mm:ss",width = 10)
+ private Date happenTime;
+ @ApiModelProperty(value = "椋庨櫓鎻忚堪", example = "1")
+ @ExcelColumn(name="椋庨櫓鎻忚堪",index =13,width = 6)
+ private String riskInfo;
+ @ApiModelProperty(value = "瑙傚療椤�")
+ @ExcelColumn(name="椋庨櫓鎻忚堪",index =13,width = 6)
+ private String problemTitle;
+ @ApiModelProperty(value = "DCA闂鎻忚堪")
+ @ExcelColumn(name="DCA闂鎻忚堪",index =13,width = 6)
+ private String problemInfo;
+ @ApiModelProperty(value = "浣嶇疆鍦扮偣璺緞鍚嶇О")
+ @ExcelColumn(name="浣嶇疆鍦扮偣璺緞鍚嶇О",index =13,width = 6)
+ private String locationName;
+ @ApiModelProperty(value = "绗﹀悎椤规暟閲�", example = "1")
+ @ExcelColumn(name="绗﹀悎椤规暟閲�",index =13,width = 6)
+ private Integer dcaYesNum;
+ @ApiModelProperty(value = "DCA涓嶇鍚堟暟閲�", example = "1")
+ @ExcelColumn(name="绗﹀悎椤规暟閲�",index =13,width = 6)
+ private Integer dcaNoNum;
+ @ApiModelProperty("鎻愭姤浜哄憳鍚嶇О")
+ @ExcelColumn(name="鎻愭姤浜哄憳",index =13,width = 6)
+ private String memberName;
+ @ApiModelProperty("鍛樺伐鎵嬫満鍙�")
+ @ExcelColumn(name="鍛樺伐鎵嬫満鍙�",index =13,width = 6)
+ private String memberPhone;
+ @ApiModelProperty("鎻愭姤浜哄憳鎵�灞為儴闂�")
+ @ExcelColumn(name="鎵�灞為儴闂�",index =13,width = 6)
+ private String companyName;
+ @ApiModelProperty("椋庨櫓绫诲瀷鍚嶇О")
+ @ExcelColumn(name="椋庨櫓绫诲瀷",index =13,width = 6)
+ private String typeName;
+ @ApiModelProperty("浜岀骇涓婚鍚嶇О")
+ @ExcelColumn(name="浜岀骇涓婚",index =13,width = 6)
+ @TableField(exist = false)
+ private String categoryName;
+
+
+
+}
diff --git a/server/src/main/java/com/doumee/dao/business/vo/WorkorderDbhDto.java b/server/src/main/java/com/doumee/dao/business/vo/WorkorderDbhDto.java
new file mode 100644
index 0000000..71767d5
--- /dev/null
+++ b/server/src/main/java/com/doumee/dao/business/vo/WorkorderDbhDto.java
@@ -0,0 +1,57 @@
+package com.doumee.dao.business.vo;
+
+import com.doumee.core.annotation.excel.ExcelColumn;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * Created by IntelliJ IDEA.
+ *
+ * @Author : Rk
+ * @create 2023/7/13 10:40
+ */
+@Data
+@ApiModel("璺岀粖婊戝伐鍗曞鍑轰俊鎭�")
+public class WorkorderDbhDto {
+ @ApiModelProperty(value = "搴忓彿")
+ @ExcelColumn(name="搴忓彿",index =1 ,width = 4)
+ private Long index;
+ @ApiModelProperty(value = "宸ュ崟鍙�")
+ @ExcelColumn(name="宸ュ崟鍙�",index =2 ,width = 8)
+ private String code;
+ @ApiModelProperty("椋庨櫓绫诲瀷")
+ @ExcelColumn(name="椋庨櫓绫诲瀷",index =3,width = 6)
+ private String typeName;
+ @ApiModelProperty(value = "鐘舵�� 鐘舵�� 0寰呯‘璁�/寰呭垵瀹� 1寰呭垎閰�/寰呯粓瀹� 2寰呭鐞� 4WTS鍏抽棴 5宸ョ▼甯堝叧闂�", example = "1")
+ @ExcelColumn(name="鐘舵��",index =4,width = 4, valueMapping = "0=寰呭鐞�;1=澶勭悊涓�;2=澶勭悊涓�;3=宸插鐞�;4=宸插鐞�;5=宸插鐞�;")
+ private Integer status;
+ @ApiModelProperty(value = "涓婃姤鏃堕棿", example = "1")
+ @ExcelColumn(name="涓婃姤鏃堕棿",index =5 ,dateFormat = "yyyy-MM-dd HH:mm:ss",width = 10)
+ private Date submitDate;
+ @ApiModelProperty(value = "鍙戠幇鏃堕棿", example = "1")
+ @ExcelColumn(name="鍙戠幇鏃堕棿",index =6 ,dateFormat = "yyyy-MM-dd HH:mm:ss",width = 10)
+ private Date happenTime;
+ @ApiModelProperty(value = "浣嶇疆", example = "1")
+ @ExcelColumn(name="浣嶇疆",index =7 ,width = 6)
+ private String locationName;
+ @ApiModelProperty(value = "椋庨櫓鎻忚堪", example = "1")
+ @ExcelColumn(name="riskInfo",index =11,width = 10)
+ private String eventInfo;
+ @ApiModelProperty("鎻愭姤浜哄憳鍚嶇О")
+ @ExcelColumn(name="涓婃姤鍛樺伐",index =12,width = 4)
+ private String memberName;
+ @ApiModelProperty("鍛樺伐鎵嬫満鍙�")
+ @ExcelColumn(name="鍛樺伐鎵嬫満鍙�",index =13,width = 6)
+ private String memberPhone;
+ @ApiModelProperty("鎻愭姤浜哄憳鎵�灞為儴闂�")
+ @ExcelColumn(name="鎵�灞為儴闂�",index =14,width = 8)
+ private String companyName;
+ @ApiModelProperty(value = "鎻愪氦鏃堕棿")
+ @ExcelColumn(name="鎻愪氦鏃堕棿",index =15 ,dateFormat = "yyyy-MM-dd HH:mm:ss",width = 10)
+ private Date createDate;
+
+
+}
diff --git a/server/src/main/java/com/doumee/dao/business/vo/WorkorderDcaChildDto.java b/server/src/main/java/com/doumee/dao/business/vo/WorkorderDcaChildDto.java
new file mode 100644
index 0000000..5e89ba1
--- /dev/null
+++ b/server/src/main/java/com/doumee/dao/business/vo/WorkorderDcaChildDto.java
@@ -0,0 +1,65 @@
+package com.doumee.dao.business.vo;
+
+import com.doumee.core.annotation.excel.ExcelColumn;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * Created by IntelliJ IDEA.
+ *
+ * @Author : Rk
+ * @create 2023/7/13 10:40
+ */
+@Data
+@ApiModel("DCA宸ュ崟璁板綍瀵煎嚭淇℃伅")
+public class WorkorderDcaChildDto {
+ @ApiModelProperty(value = "搴忓彿")
+ @ExcelColumn(name="搴忓彿",index =1 ,width = 4)
+ private Long index;
+ @ApiModelProperty(value = "宸ュ崟鍙�")
+ @ExcelColumn(name="宸ュ崟鍙�",index =2 ,width = 8)
+ private String code;
+ @ApiModelProperty("涓�绾ц瀵熶富棰�")
+ @ExcelColumn(name="涓�绾ц瀵熶富棰�",index =3,width = 6)
+ private String typeName;
+ @ApiModelProperty("浜岀骇瑙傚療涓婚")
+ @ExcelColumn(name="浜岀骇瑙傚療涓婚",index =4,width = 6)
+ private String categoryName;
+ @ApiModelProperty("涓嶇鍚堥」")
+ @ExcelColumn(name="涓嶇鍚堥」",index =5,width = 10)
+ private String problemTitle;
+ @ApiModelProperty(value = "鐘舵�� 鐘舵�� 0寰呯‘璁�/寰呭垵瀹� 1寰呭垎閰�/寰呯粓瀹� 2寰呭鐞� 4WTS鍏抽棴 5宸ョ▼甯堝叧闂�", example = "1")
+ @ExcelColumn(name="鐘舵��",index =6,width = 4, valueMapping = "0=寰呭鐞�;1=澶勭悊涓�;2=澶勭悊涓�;3=宸插鐞�;4=宸插鐞�;5=宸插鐞�;")
+ private Integer status;
+ @ApiModelProperty(value = "涓婃姤鏃堕棿", example = "1")
+ @ExcelColumn(name="涓婃姤鏃堕棿",index =7 ,dateFormat = "yyyy-MM-dd HH:mm:ss",width = 10)
+ private Date submitDate;
+ @ApiModelProperty(value = "鍙戠幇鏃堕棿", example = "1")
+ @ExcelColumn(name="鍙戠幇鏃堕棿",index =8 ,dateFormat = "yyyy-MM-dd HH:mm:ss",width = 10)
+ private Date happenTime;
+ @ApiModelProperty(value = "浣嶇疆", example = "1")
+ @ExcelColumn(name="浣嶇疆",index =9 ,width = 6)
+ private String locationName;
+ @ApiModelProperty(value = "闂鎻忚堪", example = "1")
+ @ExcelColumn(name="闂鎻忚堪",index =10,width = 4)
+ private String eventInfo;
+ @ApiModelProperty("鎻愭姤浜哄憳鍚嶇О")
+ @ExcelColumn(name="涓婃姤鍛樺伐",index =12,width = 4)
+ private String memberName;
+ @ApiModelProperty("鍛樺伐鎵嬫満鍙�")
+ @ExcelColumn(name="鍛樺伐鎵嬫満鍙�",index =13,width = 6)
+ private String memberPhone;
+ @ApiModelProperty("鎻愭姤浜哄憳鎵�灞為儴闂�")
+ @ExcelColumn(name="鎵�灞為儴闂�",index =14,width = 8)
+ private String companyName;
+ @ApiModelProperty(value = "鎻愪氦鏃堕棿")
+ @ExcelColumn(name="鎻愪氦鏃堕棿",index =15 ,dateFormat = "yyyy-MM-dd HH:mm:ss",width = 10)
+ private Date createDate;
+
+
+
+
+}
diff --git a/server/src/main/java/com/doumee/dao/business/vo/WorkorderDcaDto.java b/server/src/main/java/com/doumee/dao/business/vo/WorkorderDcaDto.java
new file mode 100644
index 0000000..d9e5f3b
--- /dev/null
+++ b/server/src/main/java/com/doumee/dao/business/vo/WorkorderDcaDto.java
@@ -0,0 +1,56 @@
+package com.doumee.dao.business.vo;
+
+import com.doumee.core.annotation.excel.ExcelColumn;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * Created by IntelliJ IDEA.
+ *
+ * @Author : Rk
+ * @create 2023/7/13 10:40
+ */
+@Data
+@ApiModel("DCA宸ュ崟璁板綍瀵煎嚭淇℃伅")
+public class WorkorderDcaDto {
+ @ApiModelProperty(value = "搴忓彿")
+ @ExcelColumn(name="搴忓彿",index =1 ,width = 4)
+ private Long index;
+ @ApiModelProperty(value = "宸ュ崟鍙�")
+ @ExcelColumn(name="宸ュ崟鍙�",index =2 ,width = 8)
+ private String code;
+ @ApiModelProperty("瑙傚療涓婚")
+ @ExcelColumn(name="瑙傚療涓婚",index =3,width = 6)
+ private String typeName;
+ @ApiModelProperty(value = "涓婃姤鏃堕棿", example = "1")
+ @ExcelColumn(name="涓婃姤鏃堕棿",index =5 ,dateFormat = "yyyy-MM-dd HH:mm:ss",width = 10)
+ private Date submitDate;
+ @ApiModelProperty(value = "鍙戠幇鏃堕棿", example = "1")
+ @ExcelColumn(name="鍙戠幇鏃堕棿",index =6 ,dateFormat = "yyyy-MM-dd HH:mm:ss",width = 10)
+ private Date happenTime;
+ @ApiModelProperty(value = "绗﹀悎椤规暟閲�", example = "1")
+ @ExcelColumn(name="绗﹀悎椤规暟閲�",index =7,width = 4)
+ private Integer dcaYesNum;
+ @ApiModelProperty(value = "涓嶇鍚堥」鏁伴噺", example = "1")
+ @ExcelColumn(name="涓嶇鍚堥」鏁伴噺",index =8,width = 4)
+ private Integer dcaNoNum;
+ @ApiModelProperty("鎻愭姤浜哄憳鍚嶇О")
+ @ExcelColumn(name="涓婃姤鍛樺伐",index =12,width = 4)
+ private String memberName;
+ @ApiModelProperty("鍛樺伐鎵嬫満鍙�")
+ @ExcelColumn(name="鍛樺伐鎵嬫満鍙�",index =13,width = 6)
+ private String memberPhone;
+ @ApiModelProperty("鎻愭姤浜哄憳鎵�灞為儴闂�")
+ @ExcelColumn(name="鎵�灞為儴闂�",index =14,width = 8)
+ private String companyName;
+ @ApiModelProperty(value = "鎻愪氦鏃堕棿")
+ @ExcelColumn(name="鎻愪氦鏃堕棿",index =15 ,dateFormat = "yyyy-MM-dd HH:mm:ss",width = 10)
+ private Date createDate;
+
+
+
+
+}
diff --git a/server/src/main/java/com/doumee/dao/business/vo/WorkorderSheDto.java b/server/src/main/java/com/doumee/dao/business/vo/WorkorderSheDto.java
new file mode 100644
index 0000000..2a4e7a9
--- /dev/null
+++ b/server/src/main/java/com/doumee/dao/business/vo/WorkorderSheDto.java
@@ -0,0 +1,77 @@
+package com.doumee.dao.business.vo;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.doumee.core.annotation.excel.ExcelColumn;
+import com.doumee.dao.business.model.Category;
+import com.doumee.dao.business.model.Multifile;
+import com.doumee.dao.business.model.Workorder;
+import com.doumee.dao.business.model.WorkorderLog;
+import com.doumee.dao.web.dto.DCANoProblemDTO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * Created by IntelliJ IDEA.
+ *
+ * @Author : Rk
+ * @create 2023/7/13 10:40
+ */
+@Data
+@ApiModel("SHE宸ュ崟瀵煎嚭淇℃伅")
+public class WorkorderSheDto {
+ @ApiModelProperty(value = "搴忓彿")
+ @ExcelColumn(name="搴忓彿",index =1 ,width = 4)
+ private Long index;
+ @ApiModelProperty(value = "宸ュ崟鍙�")
+ @ExcelColumn(name="宸ュ崟鍙�",index =2 ,width = 8)
+ private String code;
+ @ApiModelProperty("浼ゅ绫诲瀷")
+ @ExcelColumn(name="浼ゅ绫诲瀷",index =3,width = 6)
+ private String typeName;
+ @ApiModelProperty(value = "涓婃姤鏃堕棿", example = "1")
+ @ExcelColumn(name="涓婃姤鏃堕棿",index =4 ,dateFormat = "yyyy-MM-dd HH:mm:ss",width = 10)
+ private Date submitDate;
+ @ApiModelProperty(value = "鐘舵�� 鐘舵�� 0寰呯‘璁�/寰呭垵瀹� 1寰呭垎閰�/寰呯粓瀹� 2寰呭鐞� 4WTS鍏抽棴 5宸ョ▼甯堝叧闂�", example = "1")
+ @ExcelColumn(name="鐘舵��",index =5,width = 4, valueMapping = "0=寰呭鐞�;1=澶勭悊涓�;2=澶勭悊涓�;3=宸插鐞�;4=宸插鐞�;5=宸插鐞�;")
+ private Integer status;
+ @ApiModelProperty(value = "鍙戠敓鍦扮偣")
+ @ExcelColumn(name="鍙戠敓鍦扮偣",index =6,width = 8)
+ private String locationName;
+ @ApiModelProperty(value = "SHE娑夊強浜哄憳渚涘簲鍟嗛泦鍚�")
+ @ExcelColumn(name="娑夊強浜哄憳",index =7,width = 8)
+ private String memberNames;
+ @ApiModelProperty(value = "鍏蜂綋浣嶇疆")
+ @ExcelColumn(name="鍏蜂綋浣嶇疆",index =8,width = 8)
+ private String remark;
+ @ApiModelProperty(value = "灏卞尰鎯呭喌")
+ @ExcelColumn(name="灏卞尰鎯呭喌",index =9,width = 8)
+ private String jiuyiInfo;
+ @ApiModelProperty(value = "鏄惁鍜屽伐浣滅浉鍏�", example = "1")
+ @ExcelColumn(name="鏄惁鍜屽伐浣滅浉鍏�",index =10,width = 4, valueMapping = "0=鍚�;1=鏄�;")
+ private Integer workRelated;
+ @ApiModelProperty(value = "浜嬩欢璇存槑", example = "1")
+ @ExcelColumn(name="浜嬩欢璇存槑",index =11,width = 10)
+ private String eventInfo;
+
+ @ApiModelProperty("鎻愭姤浜哄憳鍚嶇О")
+ @ExcelColumn(name="涓婃姤鍛樺伐",index =12,width = 4)
+ private String memberName;
+ @ApiModelProperty("鍛樺伐鎵嬫満鍙�")
+ @ExcelColumn(name="鍛樺伐鎵嬫満鍙�",index =13,width = 6)
+ private String memberPhone;
+ @ApiModelProperty("鎻愭姤浜哄憳鎵�灞為儴闂�")
+ @ExcelColumn(name="鎵�灞為儴闂�",index =14,width = 8)
+ private String companyName;
+
+ @ApiModelProperty(value = "鎻愪氦鏃堕棿")
+ @ExcelColumn(name="鎻愪氦鏃堕棿",index =15 ,dateFormat = "yyyy-MM-dd HH:mm:ss",width = 10)
+ private Date createDate;
+
+
+}
diff --git a/server/src/main/java/com/doumee/dao/system/model/SystemLoginLog.java b/server/src/main/java/com/doumee/dao/system/model/SystemLoginLog.java
index d554baa..fa83b30 100644
--- a/server/src/main/java/com/doumee/dao/system/model/SystemLoginLog.java
+++ b/server/src/main/java/com/doumee/dao/system/model/SystemLoginLog.java
@@ -1,13 +1,10 @@
package com.doumee.dao.system.model;
-import com.doumee.core.annotation.excel.ExcelExportColumn;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
-import org.apache.poi.ss.usermodel.HorizontalAlignment;
-import org.apache.poi.ss.usermodel.IndexedColors;
import java.util.Date;
@@ -28,47 +25,36 @@
private Integer userId;
@ApiModelProperty(value = "鐧诲綍鐢ㄦ埛鍚�")
- @ExcelExportColumn(name="鐧诲綍鐢ㄦ埛鍚�")
private String loginUsername;
@ApiModelProperty(value = "鐧诲綍IP")
- @ExcelExportColumn(name="鐧诲綍IP", color = IndexedColors.RED, width = 8)
private String ip;
@ApiModelProperty(value = "鐧诲綍鍦板潃")
- @ExcelExportColumn(name="鐧诲綍鍦板潃", width = 10)
private String location;
@ApiModelProperty(value = "瀹㈡埛绔�")
- @ExcelExportColumn(name="瀹㈡埛绔�", width = 10)
private String clientInfo;
@ApiModelProperty(value = "鎿嶄綔绯荤粺")
- @ExcelExportColumn(name="鎿嶄綔绯荤粺")
private String osInfo;
@ApiModelProperty(value = "鐧诲綍骞冲彴")
- @ExcelExportColumn(name="鐧诲綍骞冲彴")
private String platform;
@ApiModelProperty(value = "绯荤粺鐗堟湰")
- @ExcelExportColumn(name="绯荤粺鐗堟湰")
private String systemVersion;
@ApiModelProperty(value = "鏈嶅姟鍣↖P")
- @ExcelExportColumn(name="鏈嶅姟鍣↖P", width = 8)
private String serverIp;
@ApiModelProperty(value = "鏄惁鐧诲綍鎴愬姛")
- @ExcelExportColumn(name="鏄惁鐧诲綍鎴愬姛", valueMapping = "true=鏄�;false=鍚�", align = HorizontalAlignment.CENTER)
private Boolean success;
@ApiModelProperty(value = "澶辫触鍘熷洜")
- @ExcelExportColumn(name="澶辫触鍘熷洜", color = IndexedColors.RED, width = 16)
private String reason;
@ApiModelProperty(value = "鐧诲綍鏃堕棿")
- @ExcelExportColumn(name="鐧诲綍鏃堕棿", dateFormat = "yyyy-MM-dd HH:mm:ss", width = 10)
private Date loginTime;
}
diff --git a/server/src/main/java/com/doumee/dao/system/model/SystemTraceLog.java b/server/src/main/java/com/doumee/dao/system/model/SystemTraceLog.java
index bf77f5d..2213746 100644
--- a/server/src/main/java/com/doumee/dao/system/model/SystemTraceLog.java
+++ b/server/src/main/java/com/doumee/dao/system/model/SystemTraceLog.java
@@ -1,6 +1,5 @@
package com.doumee.dao.system.model;
-import com.doumee.core.annotation.excel.ExcelExportColumn;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
@@ -27,11 +26,9 @@
private Integer userId;
@ApiModelProperty(value = "鍥哄寲鐢ㄦ埛鍚�")
- @ExcelExportColumn(name="鎿嶄綔浜虹敤鎴峰悕")
private String username;
@ApiModelProperty(value = "鍥哄寲鐢ㄦ埛濮撳悕")
- @ExcelExportColumn(name="鎿嶄綔浜哄鍚�")
private String userRealname;
@ApiModelProperty(value = "鍥哄寲鐢ㄦ埛瑙掕壊")
@@ -41,75 +38,57 @@
private String userPermissions;
@ApiModelProperty(value = "鎿嶄綔妯″潡")
- @ExcelExportColumn(name="鎿嶄綔妯″潡")
private String operaModule;
@ApiModelProperty(value = "鎿嶄綔绫诲瀷")
- @ExcelExportColumn(name="鎿嶄綔绫诲瀷")
private String operaType;
@ApiModelProperty(value = "鎿嶄綔澶囨敞")
- @ExcelExportColumn(name="澶囨敞", width = 5)
private String operaRemark;
@ApiModelProperty(value = "鎿嶄綔寮�濮嬫椂闂�")
- @ExcelExportColumn(name="鎿嶄綔寮�濮嬫椂闂�", dateFormat = "yyyy-MM-dd HH:mm:ss", width = 10)
private Date operaTime;
@ApiModelProperty(value = "鑰楁椂", example = "1")
- @ExcelExportColumn(name="鑰楁椂锛坢s锛�")
private Integer operaSpendTime;
@ApiModelProperty(value = "璇锋眰鏂瑰紡")
- @ExcelExportColumn(name="璇锋眰鏂瑰紡")
private String requestMethod;
@ApiModelProperty(value = "璇锋眰鍦板潃")
- @ExcelExportColumn(name="璇锋眰鍦板潃", width = 14)
private String requestUri;
@ApiModelProperty(value = "璇锋眰鍙傛暟")
- @ExcelExportColumn(name="璇锋眰鍙傛暟", width = 16)
private String requestParams;
@ApiModelProperty(value = "璇锋眰缁撴灉")
- @ExcelExportColumn(name="璇锋眰缁撴灉", width = 10)
private String requestResult;
@ApiModelProperty(value = "鐘舵�侊紙0鎿嶄綔澶辫触锛�1鎿嶄綔鎴愬姛锛�-1鏈緱鍒板鐞嗭級", example = "1")
- @ExcelExportColumn(name="鐘舵��", valueMapping = "0=鎿嶄綔澶辫触;1=鎿嶄綔鎴愬姛;-1=鏈鐞�", width = 4)
private Integer status;
@ApiModelProperty(value = "寮傚父绛夌骇")
- @ExcelExportColumn(name="寮傚父绛夌骇", valueMapping = "0=浣�;5=涓�;10=楂�")
private Integer exceptionLevel;
@ApiModelProperty(value = "寮傚父淇℃伅")
- @ExcelExportColumn(name="寮傚父淇℃伅", width = 16)
private String exceptionStack;
@ApiModelProperty(value = "IP")
- @ExcelExportColumn(name="IP", width = 8)
private String ip;
@ApiModelProperty(value = "鏈嶅姟鍣↖P")
- @ExcelExportColumn(name="鏈嶅姟鍣↖P", width = 8)
private String serverIp;
@ApiModelProperty(value = "鎺ュ彛鐗堟湰")
- @ExcelExportColumn(name="鎺ュ彛鐗堟湰")
private String systemVersion;
@ApiModelProperty(value = "鎿嶄綔骞冲彴")
- @ExcelExportColumn(name="鎿嶄綔骞冲彴")
private String platform;
@ApiModelProperty(value = "瀹㈡埛绔俊鎭�")
- @ExcelExportColumn(name="瀹㈡埛绔俊鎭�", width = 10)
private String clientInfo;
@ApiModelProperty(value = "绯荤粺淇℃伅")
- @ExcelExportColumn(name="绯荤粺淇℃伅")
private String osInfo;
}
diff --git a/server/src/main/java/com/doumee/service/business/impl/WorkorderServiceImpl.java b/server/src/main/java/com/doumee/service/business/impl/WorkorderServiceImpl.java
index f2493b0..782492f 100644
--- a/server/src/main/java/com/doumee/service/business/impl/WorkorderServiceImpl.java
+++ b/server/src/main/java/com/doumee/service/business/impl/WorkorderServiceImpl.java
@@ -376,10 +376,10 @@
.selectAs(Member::getName,Workorder::getMemberName)
.selectAs(Member::getCompanyName,Workorder::getCompanyName)
.select(" c3.name ",Workorder::getTypeName)
- .select(" c4.name ",Workorder::getProblemName)
+ .select(" c4.name ",Workorder::getCategoryName)
.leftJoin(Member.class,Member::getId,Workorder::getMemberId)
.leftJoin(" category c3 on t.TYPE_ID = c3.id ") //椋庨櫓绫诲瀷
- .leftJoin(" category c4 on t.PROBLEM_ID = c4.id ") //DCA闂缂栫爜
+ .leftJoin(" category c4 on t.CATEGORY_ID = c4.id ") //DCA闂缂栫爜
.eq(Workorder::getId,id)
.last(" limit 1 ")
);
@@ -514,6 +514,11 @@
@Override
public List<Workorder> findList(Workorder pageWrap) {
+
+ return workorderMapper.selectJoinList(Workorder.class,getJoinQueryMapper(pageWrap));
+ }
+
+ private MPJLambdaWrapper<Workorder> getJoinQueryMapper(Workorder pageWrap) {
MPJLambdaWrapper<Workorder> queryWrapper = new MPJLambdaWrapper<>();
pageWrap.setIsdeleted(Constants.ZERO);
queryWrapper
@@ -521,11 +526,11 @@
.selectAs(Member::getName,Workorder::getMemberName)
.selectAs(Member::getCompanyName,Workorder::getCompanyName)
.selectAs(Member::getPhone,Workorder::getMemberPhone)
+ .select(" c2.name ",Workorder::getCategoryName)
.select(" c3.name ",Workorder::getTypeName)
- .select(" c4.name ",Workorder::getProblemName)
.leftJoin(Member.class,Member::getId,Workorder::getMemberId)
.leftJoin(" category c3 on t.TYPE_ID = c3.id ") //椋庨櫓绫诲瀷
- .leftJoin(" category c4 on t.PROBLEM_ID = c4.id ") //DCA闂缂栫爜
+ .leftJoin(" category c2 on t.CATEGORY_ID = c2.id ") //DCA涓�绾ч棶棰樼紪鐮�
.eq( pageWrap.getId() != null, Workorder::getId, pageWrap.getId())
.eq( pageWrap.getCreator() != null, Workorder::getCreator, pageWrap.getCreator())
.ge( pageWrap.getCreateDate() != null, Workorder::getCreateDate, Utils.Date.getStart( pageWrap.getCreateDate()))
@@ -578,15 +583,15 @@
.or().like(Member::getPhone, pageWrap.getMemberName()) );
}
queryWrapper.orderByDesc(Workorder::getProblemId);
- return workorderMapper.selectJoinList(Workorder.class,queryWrapper);
+ return queryWrapper;
}
-
+
@Override
public PageData<Workorder> findPage(PageWrap<Workorder> pageWrap) {
IPage<Workorder> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity());
Utils.MP.blankToNull(pageWrap.getModel());
- MPJLambdaWrapper<Workorder> queryWrapper = new MPJLambdaWrapper<>();
pageWrap.getModel().setIsdeleted(Constants.ZERO);
+ MPJLambdaWrapper<Workorder> queryWrapper = getJoinQueryMapper(pageWrap.getModel());
queryWrapper
.selectAll(Workorder.class)
.selectAs(Member::getName,Workorder::getMemberName)
--
Gitblit v1.9.3