Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
K
klck
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
位宇华
klck
Commits
88b0dcd5
Commit
88b0dcd5
authored
Sep 02, 2024
by
Fuzy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修正
parent
98e02c8f
Changes
42
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
2087 additions
and
784 deletions
+2087
-784
ruoyi-ui/build/index.js
ruoyi-ui/build/index.js
+0
-2
ruoyi-ui/package.json
ruoyi-ui/package.json
+1
-0
ruoyi-ui/public/exportExcel.js
ruoyi-ui/public/exportExcel.js
+1
-12
ruoyi-ui/src/Wages/convers.js
ruoyi-ui/src/Wages/convers.js
+59
-93
ruoyi-ui/src/Wages/conversTsk.js
ruoyi-ui/src/Wages/conversTsk.js
+0
-1
ruoyi-ui/src/api/ruoyi-myLuckyexcel/myluckyexcel.js
ruoyi-ui/src/api/ruoyi-myLuckyexcel/myluckyexcel.js
+40
-2
ruoyi-ui/src/assets/js/power/convers.js
ruoyi-ui/src/assets/js/power/convers.js
+0
-1
ruoyi-ui/src/components/Activiti/ApplyBefore/index.vue
ruoyi-ui/src/components/Activiti/ApplyBefore/index.vue
+0
-1
ruoyi-ui/src/components/Activiti/ViewApprove/index.vue
ruoyi-ui/src/components/Activiti/ViewApprove/index.vue
+0
-1
ruoyi-ui/src/conversion/conversion.js
ruoyi-ui/src/conversion/conversion.js
+17
-42
ruoyi-ui/src/conversion/lvMine.js
ruoyi-ui/src/conversion/lvMine.js
+6
-2
ruoyi-ui/src/router/index.js
ruoyi-ui/src/router/index.js
+30
-0
ruoyi-ui/src/utils/dialogDrag.js
ruoyi-ui/src/utils/dialogDrag.js
+0
-3
ruoyi-ui/src/utils/request.js
ruoyi-ui/src/utils/request.js
+0
-1
ruoyi-ui/src/utils/tzc.js
ruoyi-ui/src/utils/tzc.js
+97
-49
ruoyi-ui/src/views/ActSuppliesConvert/convert/indexConvert.vue
...-ui/src/views/ActSuppliesConvert/convert/indexConvert.vue
+1
-4
ruoyi-ui/src/views/system/ActClassification/index.vue
ruoyi-ui/src/views/system/ActClassification/index.vue
+0
-2
ruoyi-ui/src/views/system/ActSuppliesDetails/ActSuppliesDetails/index.vue
...ws/system/ActSuppliesDetails/ActSuppliesDetails/index.vue
+0
-1
ruoyi-ui/src/views/system/ActsupplesAll/fanMine.vue
ruoyi-ui/src/views/system/ActsupplesAll/fanMine.vue
+0
-3
ruoyi-ui/src/views/system/Actsupplies/Actsupplies/index.vue
ruoyi-ui/src/views/system/Actsupplies/Actsupplies/index.vue
+0
-1
ruoyi-ui/src/views/system/Wages/LinXiWages.vue
ruoyi-ui/src/views/system/Wages/LinXiWages.vue
+414
-8
ruoyi-ui/src/views/system/Wages/TangshanWages.vue
ruoyi-ui/src/views/system/Wages/TangshanWages.vue
+437
-8
ruoyi-ui/src/views/system/Wages/contrast.vue
ruoyi-ui/src/views/system/Wages/contrast.vue
+0
-4
ruoyi-ui/src/views/system/power/ass.js
ruoyi-ui/src/views/system/power/ass.js
+0
-1
ruoyi-ui/src/views/system/power/index.vue
ruoyi-ui/src/views/system/power/index.vue
+3
-3
ruoyi-ui/src/views/system/power/linxi.vue
ruoyi-ui/src/views/system/power/linxi.vue
+160
-11
ruoyi-ui/src/views/system/run_of_coal/index.vue
ruoyi-ui/src/views/system/run_of_coal/index.vue
+0
-1
ruoyi-ui/src/views/system/supplies/index.vue
ruoyi-ui/src/views/system/supplies/index.vue
+0
-14
ruoyi-ui/src/views/system/supplies/index_template.vue
ruoyi-ui/src/views/system/supplies/index_template.vue
+55
-156
ruoyi-ui/src/views/system/supplies/index_vue.vue
ruoyi-ui/src/views/system/supplies/index_vue.vue
+2
-6
ruoyi-ui/src/views/system/supplies/indexupload.vue
ruoyi-ui/src/views/system/supplies/indexupload.vue
+0
-1
ruoyi-ui/src/views/system/supplies/materialDetailTemplateTable/index.js
...iews/system/supplies/materialDetailTemplateTable/index.js
+205
-8
ruoyi-ui/src/views/system/supplies/materialDetailTemplateTable/index.vue
...ews/system/supplies/materialDetailTemplateTable/index.vue
+251
-210
ruoyi-ui/src/views/system/supplies/salarySummary/index.vue
ruoyi-ui/src/views/system/supplies/salarySummary/index.vue
+3
-7
ruoyi-ui/src/views/system/supplies/salarySummaryintermediateTabl/index.vue
...s/system/supplies/salarySummaryintermediateTabl/index.vue
+189
-104
ruoyi-ui/src/views/system/supplies/viewuploads.vue
ruoyi-ui/src/views/system/supplies/viewuploads.vue
+0
-1
ruoyi-ui/src/views/system/suppliesrole/index.vue
ruoyi-ui/src/views/system/suppliesrole/index.vue
+0
-4
ruoyi-ui/src/views/system/suppliesroledetail/index.vue
ruoyi-ui/src/views/system/suppliesroledetail/index.vue
+0
-1
ruoyi-ui/vue.config.js
ruoyi-ui/vue.config.js
+2
-2
ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/PowerDisplayServiceImpl.java
...om/ruoyi/system/service/impl/PowerDisplayServiceImpl.java
+60
-13
ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/saveOnTheLargeScreenPower/DongHuanTuo.java
...m/service/impl/saveOnTheLargeScreenPower/DongHuanTuo.java
+28
-0
ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/saveOnTheLargeScreenPower/QianJiaYing.java
...m/service/impl/saveOnTheLargeScreenPower/QianJiaYing.java
+26
-0
No files found.
ruoyi-ui/build/index.js
View file @
88b0dcd5
...
...
@@ -24,9 +24,7 @@ if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
)
app
.
listen
(
port
,
function
()
{
console
.
log
(
chalk
.
green
(
`> Preview at http://localhost:
${
port
}${
publicPath
}
`
))
if
(
report
)
{
console
.
log
(
chalk
.
green
(
`> Report at http://localhost:
${
port
}${
publicPath
}
report.html`
))
}
})
...
...
ruoyi-ui/package.json
View file @
88b0dcd5
...
...
@@ -48,6 +48,7 @@
"clipboard"
:
"2.0.6"
,
"connect"
:
"3.6.6"
,
"core-js"
:
"3.8.1"
,
"decimal"
:
"^0.0.2"
,
"echarts"
:
"4.9.0"
,
"element-ui"
:
"2.15.0"
,
"eslint"
:
"7.15.0"
,
...
...
ruoyi-ui/public/exportExcel.js
View file @
88b0dcd5
...
...
@@ -4,7 +4,6 @@ import Excel from 'exceljs';
import
FileSaver
from
'
file-saver
'
;
const
exportExcel
=
function
(
luckysheet
,
value
,
contrast
,
id
)
{
// 函数体
// 参数为luckysheet.getluckysheetfile()获取的对象
// 1.创建工作簿,可以为工作簿添加属性
...
...
@@ -36,11 +35,9 @@ const exportExcel = function (luckysheet, value, contrast, id) {
// return
// 4.写入 buffer
const
buffer
=
workbook
.
xlsx
.
writeBuffer
().
then
(
data
=>
{
// console.log('data', data)
const
blob
=
new
Blob
([
data
],
{
type
:
'
application/vnd.ms-excel;charset=utf-8
'
});
console
.
log
(
'
导出成功!
'
);
FileSaver
.
saveAs
(
blob
,
`
${
value
}
.xlsx`
);
});
return
buffer
;
...
...
@@ -62,14 +59,11 @@ var setMerge = function (luckyMerge = {}, worksheet) {
var
setBorder
=
function
(
luckyBorderInfo
,
worksheet
)
{
if
(
!
Array
.
isArray
(
luckyBorderInfo
))
{
return
;
}
// console.log('luckyBorderInfo', luckyBorderInfo)
luckyBorderInfo
.
forEach
(
function
(
elem
)
{
// 现在只兼容到borderType 为range的情况
// console.log('ele', elem)
if
(
elem
.
rangeType
===
'
range
'
)
{
let
border
=
borderConvert
(
elem
.
borderType
,
elem
.
style
,
elem
.
color
);
let
rang
=
elem
.
range
[
0
];
// console.log('range', rang)
let
row
=
rang
.
row
;
let
column
=
rang
.
column
;
for
(
let
i
=
row
[
0
]
+
1
;
i
<
row
[
1
]
+
2
;
i
++
)
{
...
...
@@ -90,10 +84,8 @@ var setBorder = function (luckyBorderInfo, worksheet) {
delete
borderData
.
col_index
;
delete
borderData
.
row_index
;
let
border
=
addborderToCell
(
borderData
,
row_index
,
col_index
);
// console.log('bordre', border, borderData)
worksheet
.
getCell
(
row_index
+
1
,
col_index
+
1
).
border
=
border
;
}
// console.log(rang.column_focus + 1, rang.row_focus + 1)
// worksheet.getCell(rang.row_focus + 1, rang.column_focus + 1).border = border
});
};
...
...
@@ -297,7 +289,6 @@ var borderConvert = function (borderType, style = 1, color = '#000') {
}
else
{
border
[
luckyToExcel
.
type
[
borderType
]]
=
template
;
}
// console.log('border', border)
return
border
;
};
...
...
@@ -327,9 +318,7 @@ function addborderToCell(borders, row_index, col_index) {
13
:
'
thick
'
}
};
// console.log('borders', borders)
for
(
const
bor
in
borders
)
{
// console.log(bor)
if
(
borders
[
bor
].
color
.
indexOf
(
'
rgb
'
)
===
-
1
)
{
border
[
luckyExcel
.
type
[
bor
]]
=
{
style
:
luckyExcel
.
style
[
borders
[
bor
].
style
],
...
...
ruoyi-ui/src/Wages/convers.js
View file @
88b0dcd5
import
{
getSuppliesTemplate
,
listSuppliesTemplate
,
roleList
,
listMyluckyexcel
,
getyy
,
}
from
"
@/api/ruoyi-myLuckyexcel/myluckyexcel
"
;
import
{
conversionSave
,
surface
,
...
...
@@ -15,23 +12,11 @@ import {
}
from
"
@/api/conversion/index
"
;
// import luckysheet from 'luckysheet'
import
LuckyExcel
from
"
luckyexcel
"
;
//导入库export.js 这个文件是es6的,不能在普通的HTML文件直接引入js文件(虽然都是js文件,但是有区别,具体请百度es6与es5)!需要把es6转es5才可以直接引入使用!
/*import {materialList} from "@/api/ruoyi-myLuckyexcel/myluckyexcel";*/
import
{
v4
as
uuidv4
}
from
"
uuid
"
;
import
{
exportExcel
}
from
"
../../public/exportExcel
"
;
import
{
TableColumn
}
from
"
element-ui
"
;
import
{
watch
}
from
"
vue
"
;
import
{
machGzdata
}
from
"
@/Wages/conversTsk.js
"
;
import
{
machLxGzdata
}
from
"
@/Wages/conversLxk.js
"
;
import
{
data
}
from
"
jquery
"
;
import
{
transformJson
,
tzcCreateData
,
newGettransformJson
}
from
"
@/utils/tzc
"
// import { config } from "vue/types/umd";
import
{
transformJson
,
tzcCreateData
,
newGettransformJson
,
collect
}
from
"
@/utils/tzc
"
var
fileName
=
"
新建XLSX工作表
"
;
//定义表名
var
rule
=
[];
var
tempId
;
var
uuid1
;
var
modify
=
false
;
var
that
;
export
default
{
...
...
@@ -41,6 +26,7 @@ export default {
wageMonth
:
""
,
//详细信息
phone
:
""
,
//moban
//未导入成本材料表模板所有数据
jsondata
:
""
,
//编码数据
...
...
@@ -60,11 +46,11 @@ export default {
queryParams
:
{
status
:
0
,
},
mineId
:
''
,
//矿ID
mineId
:
''
,
//矿ID
};
},
created
()
{
that
=
this
;
that
=
this
;
//刷新页面时进行的操作
this
.
getList
();
},
...
...
@@ -109,6 +95,7 @@ export default {
});
this
.
depss
=
response
.
rows
;
});
getSuppliesTemplate
(
1248
).
then
((
response
)
=>
{
const
sysSupplies
=
response
.
rows
;
this
.
luckysheetDatas
=
JSON
.
parse
(
...
...
@@ -116,10 +103,10 @@ export default {
);
});
},
open4
()
{
this
.
$message
.
error
(
"
请仔细检查所导入表
"
);
},
/** Luckyexcel文档 */
init
()
{
let
options
=
{
container
:
"
luckysheet
"
,
//luckysheet为容器id
...
...
@@ -155,16 +142,7 @@ export default {
},
handleSuccess
(
response
,
file
,
fileList
)
{
//文件数量改变
// debugger
// console.log('file2222',file);
// var param = new FormData();
// param.append("file", file.raw);
// listMyluckyexcel(param).then(res=>{
// console.log('11111',res)
// })
},
//工资数据后台导入成功后,数据展示到前台
loadTableData
(
evt
)
{
this
.
sum
.
push
(
evt
);
...
...
@@ -200,8 +178,8 @@ export default {
modify
=
false
;
this
.
open
(
this
.
sum
);
})
.
then
(
async
()
=>
{})
.
catch
(()
=>
{});
.
then
(
async
()
=>
{
})
.
catch
(()
=>
{
});
})
.
catch
(()
=>
{
// 用户点击了取消按钮
...
...
@@ -216,7 +194,7 @@ export default {
LuckyExcel
(
evt
,
(
exportJson
)
=>
{
//获取导入表格所有数据exportJson
this
.
open
(
exportJson
)
.
then
(
async
()
=>
{})
.
then
(
async
()
=>
{
})
.
catch
((
error
)
=>
{
this
.
$message
({
message
:
error
.
message
,
...
...
@@ -235,7 +213,6 @@ export default {
if
(
this
.
value
.
includes
(
"
凭证
"
))
{
this
.
loadTableData
(
evt
);
}
else
if
(
this
.
value
.
includes
(
"
林西
"
))
{
//组装后台接口数据
var
param
=
new
FormData
();
param
.
append
(
"
file
"
,
evt
);
...
...
@@ -268,8 +245,8 @@ export default {
}
//前台加载数据
},
handleOptionChange
(
value
,
mine_id
)
{
that
.
mineId
=
mine_id
.
id
handleOptionChange
(
value
,
mine_id
)
{
that
.
mineId
=
mine_id
.
id
let
lod
=
this
.
$loading
({
lock
:
true
,
text
:
"
加载中
"
,
...
...
@@ -280,16 +257,10 @@ export default {
.
then
((
response
)
=>
{
lod
.
close
();
modify
=
false
;
tempId
=
this
.
selectedOption
;
uuid1
=
this
.
uuid
=
uuidv4
().
substring
(
0
,
8
);
const
sysSupplies
=
response
.
rows
;
this
.
luckysheetData
=
sysSupplies
[
0
].
templateContent
;
var
json_data
=
JSON
.
parse
(
sysSupplies
[
0
].
templateContent
);
this
.
jsondata
=
json_data
;
roleList
(
value
).
then
((
response
)
=>
{
this
.
luckyrule
=
response
.
rows
;
});
let
suffixArr
=
sysSupplies
[
0
].
templateName
.
split
(
"
.
"
);
fileName
=
suffixArr
[
0
];
//luckysheet.destroy()
...
...
@@ -307,18 +278,18 @@ export default {
if
(
!
fileName
.
includes
(
"
凭证
"
))
{
var
excel_r
=
0
;
//读取行
var
excel_c
=
0
;
//读取起始列
var
excel_r
=
0
;
//读取行
var
excel_c
=
0
;
//读取起始列
if
(
fileName
.
includes
(
"
唐山
"
))
{
excel_r
=
2
;
}
else
if
(
fileName
.
includes
(
"
林西
"
))
{
excel_r
=
3
;
excel_r
=
2
;
}
else
if
(
fileName
.
includes
(
"
林西
"
))
{
excel_r
=
3
;
}
let
head
=
this
.
jsondata
[
0
].
celldata
.
filter
(
(
item
)
=>
item
.
r
&&
item
.
r
==
excel_r
&&
item
.
c
>
excel_c
);
this
.
jsonhead
=
[];
this
.
jsonhead
=
[];
head
.
forEach
((
item
)
=>
{
let
funct
=
{
label
:
item
.
v
.
v
+
"
=
"
,
...
...
@@ -389,7 +360,7 @@ export default {
data
,
CompositeTable
);
this
.
setLuckysheetData
(
CompositeTable
,
myCompositeTable
);
this
.
setLuckysheetData
(
CompositeTable
,
myCompositeTable
);
}
else
{
}
...
...
@@ -405,7 +376,7 @@ export default {
CompositeTable
);
this
.
setLuckysheetData
(
CompositeTable
,
myCompositeTable
);
this
.
setLuckysheetData
(
CompositeTable
,
myCompositeTable
);
}
else
{
...
...
@@ -418,9 +389,8 @@ export default {
this
.
showMask
=
false
;
}
},
//工资数据后台汇总完后,回显到前台
setLuckysheetData
(
CompositeTable
,
myCompositeTable
)
{
setLuckysheetData
(
CompositeTable
,
myCompositeTable
)
{
CompositeTable
[
0
].
data
=
luckysheet
.
transToData
(
myCompositeTable
[
0
].
celldata
);
...
...
@@ -452,15 +422,15 @@ export default {
yearMonth
:
this
.
wageMonth
,
jsonData
:
JSON
.
stringify
(
CompositeTable
),
value
:
jsonString
,
mineId
:
that
.
mineId
mineId
:
that
.
mineId
,
};
modify
=
true
;
that
.
showMask
=
false
;
conversionSave
(
obj
).
then
((
response
)
=>
{});
conversionSave
(
obj
).
then
((
response
)
=>
{
});
},
//转换方法
zhuan
()
{
const
promises
=
this
.
sum
.
map
((
item
)
=>
{
...
...
@@ -483,27 +453,23 @@ export default {
this
.
dialogTableVisible
=
true
;
}
});
// .catch(error => {
// console.error("An error occurred while transforming Excel files:", error);
// // 处理错误情况
// });
},
//公式窗口关闭回调
handleClose
(){
handleClose
()
{
that
.
dialogTableVisible
=
false
;
that
.
showMask
=
false
;
that
.
showMask
=
false
;
},
async
VoucherForms
(
sum
)
{
//
try {
let
objks
=
await
newGettransformJson
(
sum
,
that
.
mineId
)
try
{
let
objks
=
await
newGettransformJson
(
sum
,
that
.
mineId
)
let
createData
=
tzcCreateData
(
this
.
luckysheetDatas
[
0
]
,
this
.
luckysheetDatas
,
transformJson
(
objks
.
data
),
luckysheet
,
this
.
phone
,
this
.
wageMonth
);
createData
=
collect
(
createData
)
luckysheet
.
create
({
container
:
"
luckysheet
"
,
// Luckysheet 的容器元素 ID
title
:
fileName
,
// Excel 文件名
...
...
@@ -515,11 +481,11 @@ export default {
modify
=
true
;
this
.
showMask
=
false
;
//
} catch {
//
modify = true;
//
this.showMask = false;
//
this.open4();
//
}
}
catch
{
modify
=
true
;
this
.
showMask
=
false
;
this
.
open4
();
}
},
handleExport
:
debounce
(
function
()
{
// handleExport
...
...
ruoyi-ui/src/Wages/conversTsk.js
View file @
88b0dcd5
...
...
@@ -90,7 +90,6 @@ export function machGzdata(list,jsonData) {
}
});
console
.
log
(
"
123
"
,
list
);
// 对比 c 和 r 是否与 CompositeTable[0]["celldata"] 中相应对象相同
for
(
let
k
=
0
;
k
<
CompositeTable
[
0
][
"
celldata
"
].
length
;
k
++
)
{
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
...
...
ruoyi-ui/src/api/ruoyi-myLuckyexcel/myluckyexcel.js
View file @
88b0dcd5
...
...
@@ -63,6 +63,22 @@ export function getyy(newData) {
data
:
newData
,
});
}
// 林西的电力汇总生成凭证
export
function
inquireAboutSubjectAssistance
(
newData
)
{
return
request
({
url
:
`powerVoucherConversion/inquireAboutSubjectAssistance`
,
method
:
"
post
"
,
data
:
newData
,
});
}
// 单侯的电力汇总生成凭证
export
function
axiosShanHouVoucherConversion
(
newData
)
{
return
request
({
url
:
`powerVoucherConversion/shanHouVoucherConversion`
,
method
:
"
post
"
,
data
:
newData
,
});
}
//展示excel模板
export
function
listSuppliesTemplateId
(
id
)
{
return
request
({
...
...
@@ -78,6 +94,13 @@ export function getSuppliesTemplate(id) {
method
:
"
get
"
,
});
}
export
function
axiosPowerDisplayPeek
(
data
)
{
return
request
({
url
:
"
/powerDisplay/peek/
"
,
method
:
"
post
"
,
data
});
}
// 修改导入规则
export
function
updateSuppliesrole
(
id
)
{
...
...
@@ -325,7 +348,7 @@ export function listMyluckyexcel(query) {
// params: query
// })
// }
//通过code和矿ID查询一二级分类
export
function
asiccData
(
data
)
{
return
request
({
url
:
'
asicc/getData
'
,
...
...
@@ -333,7 +356,7 @@ export function asiccData(data) {
data
,
});
}
// 保存通用材料模版的数据
export
function
asmInfoSave
(
data
)
{
return
request
({
url
:
'
asmInfo/save
'
,
...
...
@@ -341,3 +364,18 @@ export function asmInfoSave(data) {
data
,
});
}
export
function
axiosPowerLx
(
arr
)
{
return
request
({
url
:
'
power/lxPower
'
,
method
:
"
post
"
,
data
:{
lxPowers
:
arr
}
});
}
export
function
axiosHistorySave
(
data
)
{
return
request
({
url
:
'
history/save
'
,
method
:
"
post
"
,
data
});
}
ruoyi-ui/src/assets/js/power/convers.js
View file @
88b0dcd5
...
...
@@ -360,7 +360,6 @@ export default {
});
// .catch(error => {
// console.error("An error occurred while transforming Excel files:", error);
// // 处理错误情况
// });
},
...
...
ruoyi-ui/src/components/Activiti/ApplyBefore/index.vue
View file @
88b0dcd5
...
...
@@ -45,7 +45,6 @@
handleApply
:
function
()
{
const
id
=
this
.
row
.
id
;
const
requestMapping
=
this
.
requestMapping
;
console
.
log
(
"
requestMapping:
"
,
requestMapping
);
this
.
$confirm
(
'
是否提交ID为"
'
+
id
+
'
"的申请单据?
'
,
"
警告
"
,
{
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
...
...
ruoyi-ui/src/components/Activiti/ViewApprove/index.vue
View file @
88b0dcd5
...
...
@@ -119,7 +119,6 @@
},
handleApprove
(){
console
.
log
(
'
this.row.processKey
'
,
this
.
$refs
);
this
.
open
=
true
;
},
...
...
ruoyi-ui/src/conversion/conversion.js
View file @
88b0dcd5
...
...
@@ -14,7 +14,6 @@ import {
getSuppliesTemplate
,
listSuppliesTemplate
,
roleList
,
materialListPZ
,
accountingcode
,
department
,
roleListid
,
...
...
@@ -22,8 +21,6 @@ import {
}
from
"
@/api/ruoyi-myLuckyexcel/myluckyexcel
"
;
import
{
addInsert
,
addInsertAccount1
,
addInsertAccount2
,
datahistoryContentCopy
}
from
"
@/api/system/historydata
"
;
/*import luckysheet from 'luckysheet'*/
...
...
@@ -130,10 +127,8 @@ export default {
mounted
()
{
this
.
init
();
fileName
=
"
新建XLSX工作表
"
;
// this.list()
},
methods
:
{
delect
()
{
this
.
mine
=
""
;
this
.
selectname
=
""
;
...
...
@@ -284,6 +279,10 @@ export default {
let
suffixArr
=
sysSupplies
[
0
].
templateName
.
split
(
"
.
"
);
fileName
=
suffixArr
[
0
];
//luckysheet.destroy()
console
.
log
(
a
)
luckysheet
.
create
({
container
:
"
luckysheet
"
,
// Luckysheet 的容器元素 ID
title
:
fileName
,
// Excel 文件名
...
...
@@ -407,6 +406,7 @@ export default {
luckysheet
.
create
(
options
);
},
async
handleFileChange
(
evt
)
{
if
(
modify
)
{
this
.
$confirm
(
"
再次导入将会清空表内数据,是否继续操作?
"
,
...
...
@@ -752,7 +752,6 @@ export default {
let
material
=
CompositeTable
[
0
][
"
celldata
"
]
.
flat
()
.
filter
((
obj
)
=>
obj
.
r
&&
obj
.
r
===
matchedItems
);
console
.
log
(
material
)
duplicateData
.
forEach
((
obj
)
=>
{
obj
.
v
.
material
=
''
material
.
forEach
((
cell
)
=>
{
...
...
@@ -761,7 +760,6 @@ export default {
}
});
});
console
.
log
(
duplicateData
,
'
2222222222
'
)
var
cellList
=
[];
var
newHistoryContent
=
JSON
.
parse
(
this
.
ImportTables
.
historyContent
...
...
@@ -879,7 +877,7 @@ export default {
"
*核算账簿
"
,
"
*单据日期
"
,
"
*凭证类型
"
,
"
*
制单人
"
,
"
制单人
"
,
"
*分录摘要
"
,
"
*币种
"
,
"
本币汇率类型
"
,
...
...
@@ -997,8 +995,6 @@ export default {
this
.
generate
.
identifyingCode
=
1
;
this
.
generate
.
date
=
this
.
date
;
this
.
generate
.
mining
=
this
.
select
;
// , this.generate
let
list
=
[
this
.
ImportTables
];
let
filteredArr
;
accountingcode
(
newData
).
then
((
response
)
=>
{
// 合并起来的每行的值转换成一行一个编码 知道哪行合并了起来
...
...
@@ -1018,6 +1014,9 @@ export default {
if
(
item
.
accountingCode
)
{
extractedItem
.
accountingCode
=
item
.
accountingCode
;
}
if
(
item
.
department
)
{
extractedItem
.
department
=
item
.
department
}
if
(
item
.
indexcoloumn
)
{
extractedItem
.
indexcoloumn
=
item
.
indexcoloumn
;
}
...
...
@@ -1031,7 +1030,6 @@ export default {
});
let
historyContent
=
[];
for
(
let
i
=
0
;
i
<
this
.
ImportTables
.
historyRole
.
length
;
i
++
)
{
// && this.ImportTables.historyRole[i].accountingCode
if
(
this
.
ImportTables
.
historyRole
[
i
].
indexRow
)
{
const
indexRowArray
=
this
.
ImportTables
.
historyRole
[
i
].
indexRow
.
split
(
...
...
@@ -1041,7 +1039,7 @@ export default {
this
.
ImportTables
.
historyRole
[
i
].
indexcoloumn
;
for
(
let
j
=
0
;
j
<
indexRowArray
.
length
;
j
++
)
{
let
historyRole
=
{
value
:
`
${
this
.
ImportTables
.
historyRole
[
i
].
accountingCode
}
,
${
this
.
ImportTables
.
historyRole
[
i
].
name
}
`
,
value
:
`
${
this
.
ImportTables
.
historyRole
[
i
].
accountingCode
}
,
${
this
.
ImportTables
.
historyRole
[
i
].
name
}
-
${
this
.
ImportTables
.
historyRole
[
i
].
department
}
`
,
key
:
String
(
indexRowArray
[
j
]),
coloumn
:
String
(
indexcoloumn
),
};
...
...
@@ -1127,7 +1125,6 @@ export default {
}
isArray
.
push
(
newRow1
,
newRow2
);
}
for
(
let
i
=
0
;
i
<
filteredArr
.
length
;
i
++
)
{
const
codeValue
=
filteredArr
[
i
]?.
accountingCode
;
if
(
codeValue
)
{
...
...
@@ -1240,10 +1237,7 @@ export default {
};
isArray
.
push
(
newRow
,
newRow1
);
}
VoucherForm
[
0
].
celldata
.
push
(...
isArray
);
if
(
this
.
value
.
includes
(
"
凭证
"
))
{
luckysheet
.
create
({
container
:
"
luckysheet
"
,
// Luckysheet 的容器元素 ID
...
...
@@ -1257,7 +1251,7 @@ export default {
modify
=
true
;
this
.
showMask
=
false
;
}
console
.
log
(
list
,
'
11111111111
'
)
let
list
=
[
this
.
ImportTables
];
addInsert
(
list
).
then
((
response
)
=>
{
if
(
response
.
code
==
200
)
{
this
.
$message
({
...
...
@@ -1267,7 +1261,6 @@ export default {
}
});
if
(
this
.
mining
!==
"
011701
"
)
{
this
.
historyContent
=
[];
this
.
duplicateData
=
[];
}
...
...
@@ -1285,7 +1278,6 @@ export default {
},
};
// 配置项111
function
getss
(
data
)
{
let
setXColumnObj
=
setXColumn
(
data
,
2
,
''
,
0
,
9
)
let
arrkses
=
Object
.
keys
(
setXColumnObj
)
...
...
@@ -1351,9 +1343,7 @@ function workbookCreateAfter(operate, mining) {
})
return
neearray
}
// debounce函数定义
function
debounce
(
func
,
delay
)
{
let
timer
;
return
function
()
{
...
...
@@ -1365,18 +1355,3 @@ function debounce(func, delay) {
},
delay
);
};
}
\ No newline at end of file
function
getKeyByValue
(
map
,
value
)
{
for
(
let
[
key
,
val
]
of
map
)
{
if
(
val
===
value
)
{
return
key
;
}
if
(
Array
.
isArray
(
val
)
&&
val
.
includes
(
value
))
{
return
key
;
}
}
}
function
generateUUID
()
{
let
array
=
new
Uint32Array
(
4
);
window
.
crypto
.
getRandomValues
(
array
);
return
array
.
join
(
"
-
"
);
}
ruoyi-ui/src/conversion/lvMine.js
View file @
88b0dcd5
...
...
@@ -41,9 +41,13 @@ export function lvMine(CompositeTable,cjson,codess,code) {
});
}
else
{
mincolumn
=
head
.
filter
(
item
=>
item
.
c
>=
12
)
}
}
let
min
=
''
// 获取最小列
const
min
=
mincolumn
[
0
].
c
-
1
;
if
(
mincolumn
&&
mincolumn
[
0
]
&&
mincolumn
[
0
].
c
)
{
min
=
mincolumn
[
0
].
c
-
1
;
}
// 使用 filter 方法筛选包含有效值的对象
const
max
=
c
.
filter
(
obj
=>
obj
.
v
.
v
);
for
(
let
i
=
max
.
length
-
1
;
i
>=
0
;
i
--
)
{
...
...
ruoyi-ui/src/router/index.js
View file @
88b0dcd5
...
...
@@ -124,6 +124,36 @@ export const constantRoutes = [
meta
:
{
title
:
'
修改生成配置
'
}
}
]
},
{
path
:
'
/rules
'
,
component
:
Layout
,
hidden
:
true
,
// 隐藏在侧边栏和顶部栏
children
:
[
{
path
:
''
,
component
:
(
resolve
)
=>
require
([
'
@/views/system/rules/rules
'
],
resolve
),
name
:
'
RulesPage
'
,
meta
:
{
title
:
'
规则页面
'
,
icon
:
'
rules
'
,
breadcrumb
:
false
}
}
]
},
{
path
:
'
/rulescopy
'
,
component
:
Layout
,
hidden
:
true
,
// 隐藏在侧边栏和顶部栏
children
:
[
{
path
:
''
,
component
:
(
resolve
)
=>
require
([
'
@/views/system/rules/rulesCopy
'
],
resolve
),
name
:
'
RulesPage
'
,
meta
:
{
title
:
'
数据库规则页面
'
,
icon
:
'
rulesCopy
'
,
breadcrumb
:
false
}
}
]
}
]
...
...
ruoyi-ui/src/utils/dialogDrag.js
View file @
88b0dcd5
...
...
@@ -15,10 +15,8 @@ Vue.directive('dialogDrag', {
// 鼠标按下,计算当前元素距离可视区的距离
const
disX
=
e
.
clientX
-
headerElement
.
offsetLeft
const
disY
=
e
.
clientY
-
headerElement
.
offsetTop
console
.
log
(
e
.
clientX
,
headerElement
.
offsetLeft
)
// 获取到的值带px 正则匹配替换
let
styL
,
styT
console
.
log
(
sty
.
left
)
// 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
if
(
sty
.
left
.
includes
(
'
%
'
))
{
...
...
@@ -33,7 +31,6 @@ Vue.directive('dialogDrag', {
// 通过事件委托,计算移动的距离
const
l
=
e
.
clientX
-
disX
const
t
=
e
.
clientY
-
disY
console
.
log
(
disX
)
// 移动当前元素
dragDialog
.
style
.
left
=
`
${
l
+
styL
}
px`
dragDialog
.
style
.
top
=
`
${
t
+
styT
}
px`
...
...
ruoyi-ui/src/utils/request.js
View file @
88b0dcd5
...
...
@@ -43,7 +43,6 @@ service.interceptors.request.use(config => {
}
return
config
},
error
=>
{
console
.
log
(
error
)
Promise
.
reject
(
error
)
})
...
...
ruoyi-ui/src/utils/tzc.js
View file @
88b0dcd5
This diff is collapsed.
Click to expand it.
ruoyi-ui/src/views/ActSuppliesConvert/convert/indexConvert.vue
View file @
88b0dcd5
...
...
@@ -131,7 +131,6 @@ export default {
//根据选中的下拉选项值获取相应的信息
getSuppliesTemplate
(
this
.
selectedOption
).
then
(
response
=>
{
tempId
=
this
.
selectedOption
;
console
.
log
(
this
.
uuid
);
const
sysSupplies
=
response
.
rows
;
this
.
luckysheetData
=
sysSupplies
[
0
].
templateContent
;
//将接收到的json存到json_data中
...
...
@@ -239,14 +238,12 @@ export default {
const
exportJson
=
await
cons
;
await
this
.
summary
(
exportJson
);
this
.
submit
(
exportJson
);
//console.log('summary 执行完毕');
}
catch
(
Error
)
{
this
.
$message
({
message
:
Error
.
message
,
type
:
"
error
"
});
console
.
log
(
Error
.
message
);
console
.
log
(
"
这里是最外面的地方
"
);
}
finally
{
// 导入完成后关闭遮罩层
this
.
showMask
=
false
;
...
...
ruoyi-ui/src/views/system/ActClassification/index.vue
View file @
88b0dcd5
...
...
@@ -230,7 +230,6 @@ export default {
},
/**启用 */
toggleEnable
(
ActClassification
)
{
console
.
log
(
'
你点击了【
'
+
ActClassification
.
name
+
'
】的开关控件,当前开关值:
'
+
ActClassification
.
status
);
let
enableText
=
[
'
启用
'
,
'
禁用
'
];
if
(
ActClassification
.
status
===
0
)
{
toggleEnable
(
ActClassification
.
id
).
then
((
response
)
=>
{
...
...
@@ -331,7 +330,6 @@ export default {
},
/** 提交按钮 */
submitForm
()
{
console
.
log
(
this
.
form
)
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
id
!=
null
)
{
...
...
ruoyi-ui/src/views/system/ActSuppliesDetails/ActSuppliesDetails/index.vue
View file @
88b0dcd5
...
...
@@ -364,7 +364,6 @@ export default {
/**启用 */
toggleEnable
(
actSuppliesDetails
){
console
.
log
(
'
你点击了【
'
+
actSuppliesDetails
.
detailsName
+
'
】的开关控件,当前开关值:
'
+
actSuppliesDetails
.
status
);
let
enableText
=
[
'
启用
'
,
'
禁用
'
];
if
(
actSuppliesDetails
.
status
===
0
)
{
toggleEnable
(
actSuppliesDetails
.
id
).
then
((
response
)
=>
{
...
...
ruoyi-ui/src/views/system/ActsupplesAll/fanMine.vue
View file @
88b0dcd5
...
...
@@ -42,8 +42,6 @@
</el-col>
</el-row>
<!-- luckysheet容器 -->
<div
id=
"luckysheet"
style=
"margin: 0px; padding: 0px; position: absolute; width: 100%; height:80vh; z-index: 0"
>
</div>
...
...
@@ -54,5 +52,4 @@
</div>
</
template
>
<
script
src=
"@/conversion/conversion"
></
script
>
<
style
scoped
src=
"./actsuppMine.css"
></
style
>
ruoyi-ui/src/views/system/Actsupplies/Actsupplies/index.vue
View file @
88b0dcd5
...
...
@@ -377,7 +377,6 @@ export default {
/**启用 */
toggleEnable
(
actSupplies
){
console
.
log
(
'
你点击了【
'
+
actSupplies
.
suppliesName
+
'
】的开关控件,当前开关值:
'
+
actSupplies
.
status
);
let
enableText
=
[
'
启用
'
,
'
禁用
'
];
if
(
actSupplies
.
status
===
0
)
{
toggleEnable
(
actSupplies
.
id
).
then
((
response
)
=>
{
...
...
ruoyi-ui/src/views/system/Wages/LinXiWages.vue
View file @
88b0dcd5
This diff is collapsed.
Click to expand it.
ruoyi-ui/src/views/system/Wages/TangshanWages.vue
View file @
88b0dcd5
This diff is collapsed.
Click to expand it.
ruoyi-ui/src/views/system/Wages/contrast.vue
View file @
88b0dcd5
...
...
@@ -26,10 +26,6 @@
<el-button
plain
size=
"mini"
icon=
"el-icon-download"
type=
"primary"
>
导入
</el-button>
</el-upload>
</el-col>
</el-row>
<div
v-if=
"showMask"
class=
"mask"
>
<div
class=
"loading-spinner"
></div>
</div>
<el-table
v-loading=
"loading"
:data=
"comList"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"单位"
prop=
"mineId"
:formatter=
"deptFormat"
width=
"150"
>
...
...
ruoyi-ui/src/views/system/power/ass.js
View file @
88b0dcd5
...
...
@@ -31,7 +31,6 @@ function setDataV(itemName, CName, data, CConfig, itemConfig) {
let
funV
=
null
;
if
(
data
[
item
])
{
if
(
item
===
'
合计
'
){
console
.
log
(
data
[
item
],
1111
)
}
funV
=
getValue
(
data
[
item
],
CConfig
[
CName
])
}
else
{
...
...
ruoyi-ui/src/views/system/power/index.vue
View file @
88b0dcd5
...
...
@@ -88,7 +88,6 @@ export default {
},
methods
:
{
huizi
(){
console
.
log
(
this
.
shuju
)
this
.
views
=
'
汇总
'
;
luckysheet
.
create
({
container
:
"
luckysheet
"
,
// Luckysheet 的容器元素 ID
...
...
@@ -375,12 +374,13 @@ export default {
// 第三步 生成凭证
let
template
=
await
getSuppliesTemplate
(
1248
)
let
createData
=
tzcCreateData
(
JSON
.
parse
(
template
.
rows
[
0
].
templateContent
)
[
0
]
,
JSON
.
parse
(
template
.
rows
[
0
].
templateContent
),
transformJson
(
res
.
data
),
luckysheet
,
this
.
phone
,
this
.
phone
,
this
.
wageMonth
);
luckysheet
.
create
({
container
:
"
luckysheet
"
,
// Luckysheet 的容器元素 ID
title
:
'
凭证
'
,
// Excel 文件名
...
...
ruoyi-ui/src/views/system/power/linxi.vue
View file @
88b0dcd5
<
template
>
<testComponent
:kobj =
'
{ name: "林西矿", id: "011704" }'
:depssfilter = '[1282]'
>
</testComponent>
</
template
>
<
script
>
//1.先使用import导入你要在该组件中使用的子组件
import
testComponent
from
'
./index.vue
'
export
default
{
//2.然后,在components中写入子组件
components
:
{
testComponent
},
function
debounce
(
func
,
delay
)
{
let
timer
;
return
function
()
{
const
context
=
this
;
const
args
=
arguments
;
clearTimeout
(
timer
);
timer
=
setTimeout
(
function
()
{
func
.
apply
(
context
,
args
);
},
delay
);
};
}
import
{
choose
,
migrateCellDatas
}
from
'
@/utils/YLW
'
import
{
getSuppliesTemplate
,
}
from
'
@/api/ruoyi-myLuckyexcel/myluckyexcel
'
import
LuckyExcel
from
"
luckyexcel
"
;
import
{
listSuppliesTemplate
,
}
from
"
@/api/ruoyi-myLuckyexcel/myluckyexcel
"
;
import
{
exportExcel
}
from
'
/public/exportExcel
'
import
{
ruleselect
}
from
'
@/api/system/rules
'
;
export
default
{
data
()
{
return
{
views
:
'
a
'
,
selectedOption
:
""
,
wageMonth
:
""
,
templateList
:
[],
// 凭证模版
pzTemplate
:
null
,
// 汇总模版
huiZongTemplate
:
null
,
oldhuz
:
null
,
rulesshow
:
''
,
rulessql
:
''
};
},
mounted
()
{
this
.
initialize
()
},
methods
:
{
handleOptionChange
(
e
)
{
ruleselect
(
e
).
then
(
res
=>
{
let
rules
=
res
.
data
this
.
rulesshow
=
rules
.
filter
(
item
=>
item
.
type
==
0
)
this
.
rulessql
=
rules
.
filter
(
item
=>
item
.
type
==
1
)
})
getSuppliesTemplate
(
e
).
then
((
response
)
=>
{
let
json_data
=
JSON
.
parse
(
response
.
rows
[
0
].
templateContent
);
luckysheet
.
create
({
container
:
"
luckysheet
"
,
// Luckysheet 的容器元素 ID
title
:
'
11111111
'
,
// Excel 文件名
data
:
json_data
,
// Excel 数据
allowEdit
:
false
,
//作用:是否允许前台编辑
showinfobar
:
false
,
//是否显示顶部名称栏
lang
:
"
zh
"
,
});
});
},
initialize
()
{
listSuppliesTemplate
(
this
.
queryParams
).
then
((
response
)
=>
{
this
.
templateList
=
response
.
rows
});
// getSuppliesTemplate(1248).then((response) => {
// // this.pzTemplate = JSON.parse(response.rows[0].templateContent);
// });
},
async
handleFileChange
(
evt
)
{
const
transformPromise
=
new
Promise
((
resolve
,
reject
)
=>
{
LuckyExcel
.
transformExcelToLucky
(
evt
,
(
lucksheetfile
)
=>
{
resolve
(
lucksheetfile
);
});
});
transformPromise
.
then
((
result
)
=>
{
result
=
result
.
sheets
let
newdata
=
choose
(
this
.
rulesshow
,
result
,
luckysheet
.
getAllSheets
())
newdata
.
forEach
(
item
=>
{
item
.
data
=
luckysheet
.
transToData
(
item
.
celldata
)
item
.
celldata
=
luckysheet
.
transToCellData
(
item
.
data
)
})
console
.
log
(
newdata
)
luckysheet
.
create
({
container
:
"
luckysheet
"
,
// Luckysheet 的容器元素 ID
title
:
'
11111111
'
,
// Excel 文件名
data
:
newdata
,
// Excel 数据
allowEdit
:
false
,
//作用:是否允许前台编辑
showinfobar
:
false
,
//是否显示顶部名称栏
lang
:
"
zh
"
,
});
// let luckydata = []
// this.rulessql.forEach(item => {
// if (item.firstRule == 1) {
// item.rules.forEach(obj => {
// if (obj.secondRule == 1) {
// let data = migrateCellDatas(obj, result)
// luckydata.push(...data)
// } else {
// let data = migrateCellDatas(obj, luckysheet.getAllSheets())
// luckydata.push(...data)
// }
// })
// }
// })
// console.log(luckydata)
});
},
handleExport
:
debounce
(
function
()
{
exportExcel
(
luckysheet
.
getAllSheets
(),
'
林西
'
);
},
500
),
importData
(
e
)
{
},
},
};
</
script
>
<
template
>
<div
class=
"app-container"
>
<el-form
ref=
"queryForm"
size=
"small"
:inline=
"true"
label-width=
"68px"
>
<el-form-item
label=
"模板"
prop=
"name"
>
<el-select
@
change=
"handleOptionChange"
v-model=
"selectedOption"
size=
"mini"
filterable
placeholder=
"请选择您要查看的模板"
>
<el-option
v-for=
"item in templateList"
:key=
"item.id"
:label=
"item.templateName"
:value=
"item.id"
:disabled=
"item.disabled"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"时间"
prop=
"wageMonth"
>
<el-date-picker
v-model=
"wageMonth"
value-format=
"yyyy-MM"
type=
"month"
placeholder=
"选择月"
>
</el-date-picker>
</el-form-item>
</el-form>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-upload2"
@
click=
"handleExport"
size=
"mini"
>
导出
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-upload
type=
"file"
name=
"file"
ref=
"upload"
:before-upload=
"handleFileChange"
action=
''
accept=
'.xlsx'
:limit=
"1"
:show-file-list=
false
>
<el-button
plain
:disabled=
"!wageMonth || !selectedOption"
size=
"mini"
icon=
"el-icon-download"
type=
"primary"
>
导入
</el-button>
</el-upload>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
plain
icon=
"el-icon-upload2"
@
click=
"scpz"
v-if=
"views === 'b'"
size=
"mini"
>
生成凭证
</el-button>
<el-button
plain
icon=
"el-icon-upload2"
@
click=
"fhhz"
v-if=
"views === 'c'"
size=
"mini"
>
返回汇总
</el-button>
</el-col>
</el-row>
<div
id=
"luckysheet"
style=
"margin: 0px; padding: 0px; position: absolute; width: 100%; height:80vh; z-index: 0"
>
</div>
</div>
</
template
>
<
style
scoped
src=
"@/assets/css/power/index.css"
></
style
>
ruoyi-ui/src/views/system/run_of_coal/index.vue
View file @
88b0dcd5
...
...
@@ -113,7 +113,6 @@ export default {
luckysheet
.
create
(
options
);
},
handleSelectChange
()
{
console
.
log
(
this
.
date
,
this
.
mine
)
},
handleExport
:
debounce
(
function
()
{
// 导出
...
...
ruoyi-ui/src/views/system/supplies/index.vue
View file @
88b0dcd5
...
...
@@ -232,7 +232,6 @@ export default {
const
sysSupplies
=
response
.
rows
;
this
.
luckysheetData
=
sysSupplies
[
0
].
templateContent
;
console
.
log
(
sysSupplies
)
var
json_data
=
JSON
.
parse
(
sysSupplies
[
0
].
templateContent
);
roleList
(
this
.
selectedOption
).
then
(
response
=>
{
...
...
@@ -1479,18 +1478,6 @@ export default {
type
:
"
warning
"
});
}
// 记录结束时间
const
endTime
=
new
Date
().
getTime
();
// 计算执行时间(以毫秒为单位)
const
executionTime
=
endTime
-
startTime
;
const
executionTime1
=
endTime1
-
startTime1
;
const
executionTime2
=
endTime2
-
startTime2
;
const
executionTime3
=
endTime3
-
startTime3
;
// 输出执行时间
console
.
log
(
`代码执行时间:
${
executionTime
}
毫秒`
);
console
.
log
(
`转换编码执行时间:
${
executionTime1
}
毫秒`
);
console
.
log
(
`map汇总执行时间:
${
executionTime2
}
毫秒`
);
console
.
log
(
`页面渲染执行时间:
${
executionTime3
}
毫秒`
);
resolve
(
response
.
rows
);
innerResolve
();
// 标记当前异步任务完成
}).
catch
(
Error
=>
{
...
...
@@ -1505,7 +1492,6 @@ export default {
}
//切换到想要的sheet
luckysheet
.
setSheetActive
(
0
);
console
.
log
(
luckysheet
.
getConfig
(
0
))
Promise
.
all
(
asyncTasks
)
.
then
(()
=>
{
resolve
();
// 所有异步请求执行完成
...
...
ruoyi-ui/src/views/system/supplies/index_template.vue
View file @
88b0dcd5
This diff is collapsed.
Click to expand it.
ruoyi-ui/src/views/system/supplies/index_vue.vue
View file @
88b0dcd5
...
...
@@ -262,7 +262,6 @@ export default {
const
minvalue
=
this
.
miningValue
.
find
(
obj
=>
obj
.
id
===
this
.
mining
)
const
Luckysheetlabel
=
this
.
luckyrule
.
find
(
obj
=>
obj
.
id
===
this
.
selectedRule
);
console
.
log
(
this
.
cleaning
,
this
.
mining
)
if
(
this
.
date
==
''
||
this
.
date
==
null
)
{
this
.
disableNextButton
=
true
;
this
.
$message
.
error
(
'
请选择时间日期!
'
);
...
...
@@ -273,7 +272,6 @@ export default {
this
.
disableNextButton
=
true
;
this
.
$message
.
error
(
'
请选择清洗规则!
'
);
}
else
if
(
!
this
.
selectname
.
includes
(
this
.
mine
))
{
console
.
log
(
'
2222
'
)
this
.
disableNextButton
=
true
;
this
.
$message
.
error
(
'
清洗规则和所属矿区必须一致!
'
);
}
...
...
@@ -1609,7 +1607,6 @@ export default {
},
//成本表往凭证但转
Vouchers
(
duplicateData
)
{
console
.
log
(
duplicateData
)
this
.
detail
=
duplicateData
.
map
(
item
=>
{
if
(
typeof
item
.
v
.
v
===
'
number
'
)
{
item
.
v
.
v
=
Number
(
item
.
v
.
v
.
toFixed
(
2
));
// 如果是数字,则进行处理
...
...
@@ -1650,7 +1647,7 @@ export default {
"
*核算账簿
"
,
"
*单据日期
"
,
"
*凭证类型
"
,
"
*
制单人
"
,
"
制单人
"
,
"
*分录摘要
"
,
"
*币种
"
,
"
本币汇率类型
"
,
...
...
@@ -1783,8 +1780,7 @@ export default {
}
}
}
console
.
log
(
this
.
ImportTables
.
historyRole
)
console
.
log
(
historyContent
)
this
.
ImportTables
.
historyRole
=
JSON
.
stringify
(
historyContent
)
for
(
let
i
=
0
;
i
<
sum
.
length
;
i
++
)
{
for
(
let
j
=
0
;
j
<
filteredArr
.
length
;
j
++
)
{
...
...
ruoyi-ui/src/views/system/supplies/indexupload.vue
View file @
88b0dcd5
...
...
@@ -230,7 +230,6 @@ export default {
data
:
exportJson
.
sheets
,
userInfo
:
exportJson
.
info
.
name
.
creator
})
console
.
log
(
exportJson
.
sheets
,
'
2222222222222
'
)
data1
=
exportJson
.
sheets
[
0
];
name1
=
exportJson
.
sheets
[
0
].
name
;
let
suffixArr
=
exportJson
.
info
.
name
.
split
(
'
.
'
);
...
...
ruoyi-ui/src/views/system/supplies/materialDetailTemplateTable/index.js
View file @
88b0dcd5
export
function
ex
(
luckysheet
)
{
import
{
setXColumn
,
tzcCreateData
,
transformJson
}
from
'
@/utils/tzc
'
import
Decimal
from
'
decimal.js
'
;
import
{
getyy
,
getSuppliesTemplate
}
from
'
@/api/ruoyi-myLuckyexcel/myluckyexcel
'
import
source
from
'
echarts/src/data/Source
'
export
function
ex
(
luckysheetdata
,
roleObj
)
{
let
list
=
[]
for
(
let
index
=
1
;
index
<
luckysheet
.
length
;
index
++
)
{
for
(
let
index
=
1
;
index
<
luckysheet
data
.
length
;
index
++
)
{
let
funct
=
{}
luckysheet
[
index
].
forEach
((
item
,
e
)
=>
{
if
(
item
&&
item
.
v
&&
(
e
==
5
||
e
==
9
||
e
==
10
))
{
let
name
=
luckysheet
[
0
][
e
].
v
;
luckysheet
data
[
index
].
forEach
((
item
,
e
)
=>
{
if
(
item
&&
item
.
v
&&
(
e
==
5
||
e
==
9
||
e
==
10
))
{
let
name
=
luckysheet
data
[
0
][
e
].
v
;
funct
[
name
]
=
item
.
v
;
}
});
list
.
push
(
funct
);
}
console
.
log
(
list
)
let
result
=
list
.
reduce
((
acc
,
curr
)
=>
{
let
existing
=
acc
.
find
(
item
=>
item
.
费用来源
===
curr
.
费用来源
&&
item
.
一级材料类别
===
curr
.
一级材料类别
);
if
(
existing
)
{
existing
.
总额
=
new
Decimal
(
existing
.
总额
).
plus
(
curr
.
总额
).
toString
();
}
else
{
acc
.
push
({
...
curr
});
}
return
acc
;
},
[]);
let
newdata
=
luckysheet
.
transToData
(
roleObj
[
0
].
celldata
);
let
headers
=
setXColumn
(
newdata
,
3
)
let
obj
=
{
}
result
.
forEach
(
item
=>
{
if
(
obj
[
item
[
'
费用来源
'
]])
{
obj
[
item
[
'
费用来源
'
]].
push
(
item
)
}
else
{
obj
[
item
[
'
费用来源
'
]]
=
[
item
]
}
})
Object
.
entries
(
obj
).
forEach
(([
source
,
value
],
rowI
)
=>
{
let
row
=
newdata
[
rowI
+
4
]
// item.费用来源 === curr.费用来源 && item.一级材料类别
row
[
0
]
=
{
ct
:
{
fa
:
'
@
'
,
t
:
'
s
'
},
fc
:
"
#000000
"
,
ff
:
"
宋体
"
,
v
:
source
}
value
.
forEach
(
item
=>
{
let
ci
=
headers
[
item
[
'
一级材料类别
'
]]
if
(
ci
>
-
1
)
{
row
[
ci
]
=
{
ct
:
{
fa
:
'
@
'
,
t
:
'
s
'
},
fc
:
"
#000000
"
,
ff
:
"
宋体
"
,
v
:
item
[
'
总额
'
]
}
}
})
})
roleObj
[
0
].
celldata
=
luckysheet
.
transToCellData
(
newdata
)
roleObj
[
0
].
calcChain
=
[];
let
as
=
roleObj
[
0
].
celldata
.
filter
(
(
item
)
=>
item
.
v
.
f
);
as
.
forEach
((
item
)
=>
{
let
sum
=
{
index
:
roleObj
[
0
].
index
,
r
:
item
.
r
,
c
:
item
.
c
,
};
roleObj
[
0
].
calcChain
.
push
(
sum
);
});
luckysheet
.
destroy
();
luckysheet
.
create
({
forceCalculation
:
true
,
container
:
"
luckysheet
"
,
// Luckysheet 的容器元素 ID
lang
:
'
zh
'
,
title
:
'
汇总模板
'
,
data
:
roleObj
});
return
true
}
export
async
function
Certificate_method
(
celldatas
,
mining_id
,
date
,
phone
)
{
let
selectedOption
=
[
{
value
:
'
待分析材料分配
'
,
id
:
'
010102
'
,
noIn
:
'
基本生产原煤-火工品
'
},
{
value
:
'
材料分配
'
,
id
:
'
011701
'
,
noIn
:
''
,
},
{
value
:
'
材料分配
'
,
id
:
'
011704
'
,
noIn
:
'
基本生产原煤-木材
'
},
{
value
:
'
本月材料分析
'
,
id
:
'
011702
'
,
noIn
:
''
},
{
value
:
'
转本月材料分配
'
,
id
:
'
010101
'
,
noIn
:
'
基本生产原煤-火工品
'
},
{
value
:
'
转本月材料分配
'
,
id
:
'
011204
'
,
noIn
:
''
},
{
value
:
'
原材料分配
'
,
id
:
'
010105
'
,
noIn
:
'
基本生产原煤-火工品
'
},
{
value
:
'
宏丰
'
,
id
:
'
011502
'
,
noIn
:
''
},
{
value
:
'
云飞
'
,
id
:
'
011504
'
,
noIn
:
''
},
{
value
:
'
中润
'
,
id
:
'
011706
'
,
noIn
:
''
},
]
let
result
=
selectedOption
.
find
(
item
=>
item
.
id
==
mining_id
);
let
merge
=
[]
let
disposition
=
{
endcolumn
:
'
12
'
,
//结束列
startcolumn
:
'
1
'
,
//开始列
endrow
:
'
28
'
,
//结束行
startrow
:
'
4
'
,
//开始行
headcolumn
:
'
0
'
,
//表头列
headrow
:
'
3
'
,
//表头行
}
celldatas
.
forEach
(
item
=>
{
if
(
item
.
v
&&
item
.
v
.
v
)
{
let
funct
=
{
r
:
item
.
r
,
c
:
item
.
c
,
v
:
item
.
v
.
v
}
merge
.
push
(
funct
)
}
}
)
let
head
=
merge
.
filter
(
item
=>
item
.
r
==
disposition
.
headrow
&&
item
.
c
<=
disposition
.
endcolumn
&&
item
.
c
>
disposition
.
headcolumn
);
let
classary
=
merge
.
filter
(
item
=>
item
.
c
==
disposition
.
headcolumn
&&
item
.
r
>
disposition
.
headrow
&&
item
.
r
<
disposition
.
endrow
);
// 筛选数据
let
data
=
merge
.
filter
(
item
=>
item
.
r
>=
disposition
.
startrow
&&
item
.
r
<=
disposition
.
endrow
&&
item
.
c
>=
disposition
.
startcolumn
&&
item
.
c
<=
disposition
.
endcolumn
)
data
.
forEach
(
item
=>
{
classary
.
forEach
(
obj
=>
{
if
(
item
.
r
==
obj
.
r
)
{
item
.
r
=
obj
.
v
}
})
head
.
forEach
(
obj
=>
{
if
(
item
.
c
==
obj
.
c
)
{
item
.
c
=
obj
.
v
}
})
})
const
borrow
=
data
.
map
(
item
=>
{
const
newR
=
item
.
r
.
replace
(
/-/g
,
''
);
const
newKey
=
`
${
newR
}
-
${
item
.
c
}
`
;
return
{
"
name
"
:
newKey
,
"
money
"
:
item
.
v
,
'
mining
'
:
result
.
id
,
'
is_debit
'
:
0
,
'
classary
'
:
result
.
value
};
});
let
funct
=
{
name
:
'
其他应付款_待分析
'
,
money
:
new
Decimal
(
0
),
is_debit
:
1
,
classary
:
result
.
value
,
mining
:
result
.
id
}
let
loan
=
[]
borrow
.
forEach
(
item
=>
{
if
(
item
.
name
!==
result
.
noIn
)
{
funct
.
money
=
funct
.
money
.
plus
(
new
Decimal
(
item
.
money
));
}
else
{
const
newItem
=
{
...
item
};
newItem
.
is_debit
=
1
}
})
loan
.
push
(
funct
)
let
res
=
await
getyy
(
JSON
.
stringify
({
borrow
,
loan
}))
let
template
=
await
getSuppliesTemplate
(
1248
)
console
.
log
(
template
)
let
createData
=
tzcCreateData
(
JSON
.
parse
(
template
.
rows
[
0
].
templateContent
),
transformJson
(
res
.
data
),
luckysheet
,
date
,
phone
);
console
.
log
(
createData
)
luckysheet
.
create
({
container
:
"
luckysheet
"
,
// Luckysheet 的容器元素 ID
title
:
'
凭证
'
,
// Excel 文件名
allowEdit
:
false
,
//作用:是否允许前台编辑
data
:
createData
,
// Excel 数据
showinfobar
:
false
,
//是否显示顶部名称栏
lang
:
"
zh
"
,
});
}
\ No newline at end of file
ruoyi-ui/src/views/system/supplies/materialDetailTemplateTable/index.vue
View file @
88b0dcd5
This diff is collapsed.
Click to expand it.
ruoyi-ui/src/views/system/supplies/salarySummary/index.vue
View file @
88b0dcd5
...
...
@@ -482,7 +482,6 @@ export default {
}
});
})
console
.
log
(
newData
)
let
self
=
this
;
let
luckyData
=
luckysheet
.
getAllSheets
();
let
data
=
luckyData
[
0
].
data
...
...
@@ -596,7 +595,7 @@ export default {
// 第三步 生成凭证
let
template
=
await
getSuppliesTemplate
(
1248
)
let
createData
=
tzcCreateData
(
JSON
.
parse
(
template
.
rows
[
0
].
templateContent
)
[
0
]
,
JSON
.
parse
(
template
.
rows
[
0
].
templateContent
),
transformJson
(
res
.
data
),
luckysheet
,
13112312312
,
...
...
@@ -636,7 +635,7 @@ export default {
// 第三步 生成凭证
let
template
=
await
getSuppliesTemplate
(
1248
)
let
createData
=
tzcCreateData
(
JSON
.
parse
(
template
.
rows
[
0
].
templateContent
)
[
0
]
,
JSON
.
parse
(
template
.
rows
[
0
].
templateContent
),
transformJson
(
res
.
data
),
luckysheet
,
13112312312
,
...
...
@@ -661,8 +660,6 @@ export default {
item
.
fj
=
/^
\d
/
.
test
(
newdata
[
i
-
1
].
name
)
?
newdata
[
i
-
1
].
name
:
newdata
[
i
-
1
].
fj
}
})
console
.
log
(
newdata
)
console
.
log
(
data
)
},
jxdfxt
()
{
let
data
=
luckysheet
.
getAllSheets
().
find
(
item
=>
{
...
...
@@ -752,8 +749,7 @@ export default {
return
[
transformedJSON
[
key
],
value
];
}))
})
console
.
log
(
transformedJSON
)
console
.
log
(
transformed
)
}
},
mounted
()
{
...
...
ruoyi-ui/src/views/system/supplies/salarySummaryintermediateTabl/index.vue
View file @
88b0dcd5
This diff is collapsed.
Click to expand it.
ruoyi-ui/src/views/system/supplies/viewuploads.vue
View file @
88b0dcd5
...
...
@@ -395,7 +395,6 @@ export default {
}
else
{
name1
=
exportJson
.
sheets
[
0
].
name
;
}
//console.log(name1);
datast
=
exportJson
.
sheets
;
namest
=
exportJson
.
info
.
name
;
let
suffixArr
=
exportJson
.
info
.
name
.
split
(
'
.
'
);
...
...
ruoyi-ui/src/views/system/suppliesrole/index.vue
View file @
88b0dcd5
...
...
@@ -150,7 +150,6 @@
<!-- 生成输入框 -->
<div
v-for=
"index in instea"
:key=
"index"
>
<span
v-if=
"isTitle && index == 1"
style=
"color:red;"
>
<b>
物料编码
</b>
</span>
<span
v-if=
"isTitle && index == 2"
style=
"color:red;"
>
<b>
部门名称
</b>
</span>
<span
v-if=
"isTitle && index == 3"
style=
"color:red;"
>
<b>
计量单位
</b>
</span>
...
...
@@ -183,11 +182,9 @@
<el-form-item
label=
"物料编码所在列"
prop=
"cleanIng"
class=
"form-item-inline"
v-if=
"optionid === 6"
>
<el-input-number
size=
"medium"
v-model=
"cleanIng.CodeColumn"
:min=
"1"
:step=
"1"
>
1
</el-input-number>
</el-form-item>
<el-form-item
label=
"导入表行坐标"
prop=
"detailYH"
class=
"form-item-inline"
v-else
>
<el-input-number
size=
"medium"
v-model=
"detailYH[index - 1]"
:min=
"1"
:step=
"1"
>
1
</el-input-number>
</el-form-item>
<el-form-item
label=
"部门所在列"
prop=
"cleanIng"
class=
"form-item-inline"
v-if=
"optionid === 6"
>
<el-input-number
size=
"medium"
v-model=
"cleanIng.DepartmentColumn"
:min=
"1"
:step=
"1"
>
1
</el-input-number>
...
...
@@ -524,7 +521,6 @@ export default {
/**启用 */
toggleEnable
(
suppliesRole
)
{
console
.
log
(
'
你点击了【
'
+
suppliesRole
.
s
+
'
】的开关控件,当前开关值:
'
+
suppliesRole
.
status
);
let
enableText
=
[
'
启用
'
,
'
禁用
'
];
if
(
suppliesRole
.
status
===
0
)
{
toggleEnable
(
suppliesRole
.
id
).
then
((
response
)
=>
{
...
...
ruoyi-ui/src/views/system/suppliesroledetail/index.vue
View file @
88b0dcd5
...
...
@@ -497,7 +497,6 @@ export default {
},
toggleEnable
(
suppliesRoleDetail
)
{
console
.
log
(
'
你点击了【
'
+
suppliesRoleDetail
.
s
+
'
】的开关控件,当前开关值:
'
+
suppliesRoleDetail
.
status
);
let
enableText
=
[
'
启用
'
,
'
禁用
'
];
if
(
suppliesRoleDetail
.
status
===
0
)
{
toggleEnable
(
suppliesRoleDetail
.
id
).
then
((
response
)
=>
{
...
...
ruoyi-ui/vue.config.js
View file @
88b0dcd5
...
...
@@ -33,7 +33,7 @@ module.exports = {
proxy
:
{
// detail: https://cli.vuejs.org/config/#devserver-proxy
[
process
.
env
.
VUE_APP_BASE_API
]:
{
// target: `http://192.168.0.192:8080
`,
target
:
`http://192.168.0.59:8288
`
,
// target: `http://192.168.0.61:8080`,
// target: `http://192.168.111.228:8080`,
...
...
@@ -45,7 +45,7 @@ module.exports = {
//target: `http://192.168.3.247:8080`,
// target: `http://localhost:5001`,
target
:
`http://192.168.111.226:8080`
,
//
target: `http://192.168.111.226:8080`,
changeOrigin
:
true
,
pathRewrite
:
{
...
...
ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/PowerDisplayServiceImpl.java
View file @
88b0dcd5
package
com.ruoyi.system.service.impl
;
import
com.ruoyi.system.mapper.PowerDisplayMapper
;
import
com.ruoyi.system.model.newrule.NewRuleRequestModel
;
import
com.ruoyi.system.model.power.dao.PowerClassificationQueryDao
;
import
com.ruoyi.system.model.power.dao.PowerControlDao
;
import
com.ruoyi.system.model.power.dto.ElectricityIntoTheParameterDto
;
import
com.ruoyi.system.model.power.dto.PowerDisplayDto
;
import
com.ruoyi.system.service.PowerDisplayService
;
import
com.ruoyi.system.service.impl.saveOnTheLargeScreenPower.*
;
import
org.springframework.stereotype.Service
;
import
java.lang.reflect.Method
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicBoolean
;
import
java.util.stream.Collectors
;
...
...
@@ -22,15 +19,15 @@ import java.util.stream.Collectors;
*/
@Service
public
class
PowerDisplayServiceImpl
implements
PowerDisplayService
{
private
PowerDisplayMapper
powerDisplayMapper
;
private
final
PowerDisplayMapper
powerDisplayMapper
;
PowerDisplayServiceImpl
(
PowerDisplayMapper
powerDisplayMapper
)
{
this
.
powerDisplayMapper
=
powerDisplayMapper
;
}
@Override
public
void
peek
(
List
<
ElectricityIntoTheParameterDto
>
electricityIntoTheParameterDtoDtoList
)
{
String
mindId
=
electricityIntoTheParameterDtoDtoList
.
get
(
0
).
getMin
dI
d
().
replaceAll
(
" "
,
""
);
public
void
peek
(
List
<
NewRuleRequestModel
>
electricityIntoTheParameterDtoDtoList
)
{
String
mindId
=
electricityIntoTheParameterDtoDtoList
.
get
(
0
).
getMin
ei
d
().
replaceAll
(
" "
,
""
);
List
<
PowerControlDao
>
controlList
=
powerDisplayMapper
.
selControl
(
mindId
);
List
<
PowerDisplayDto
>
powerDisplayDtoList
=
new
ArrayList
<>();
Class
<
PowerDisplayDto
>
powerDisplayDtoClass
=
PowerDisplayDto
.
class
;
...
...
@@ -38,6 +35,8 @@ public class PowerDisplayServiceImpl implements PowerDisplayService {
electricityIntoTheParameterDtoDtoList
.
parallelStream
().
forEach
(
v
->
{
PowerDisplayDto
displayDto
;
if
(
mindId
.
equals
(
"011704"
)
&&
v
.
getRow
().
equals
(
"电价(含税)"
))
return
;
if
(
mindId
.
equals
(
"010105"
)
&&
(
v
.
getRow
().
contains
(
"(尖)"
)
||
v
.
getRow
().
contains
(
"(峰)"
)
||
v
.
getRow
().
contains
(
"(平)"
)
||
v
.
getRow
().
contains
(
"(谷)"
)
||
v
.
getColoumn
().
equals
(
"单价"
)))
return
;
if
(
powerDisplayDtoList
.
size
()
>
0
)
{
b
.
set
(
powerDisplayDtoList
.
parallelStream
().
anyMatch
(
a
->
a
.
getClassificationName
().
equals
(
v
.
getRow
())));
}
...
...
@@ -62,12 +61,13 @@ public class PowerDisplayServiceImpl implements PowerDisplayService {
});
List
<
PowerClassificationQueryDao
>
dao
=
powerDisplayMapper
.
selectClassificationToMid
(
mindId
);
SaveOnTheLargeScreenImpl
saveOnTheLargeScreen
=
null
;
List
<
String
>
linXi
=
Arrays
.
asList
(
"011704"
);
List
<
String
>
lvJiaTuo
=
Arrays
.
asList
(
"011702"
);
List
<
String
>
danHou
=
Arrays
.
asList
(
"011204"
);
List
<
String
>
dongHuanTuo
=
Arrays
.
asList
(
"010102"
);
List
<
String
>
linXi
=
Collections
.
singletonList
(
"011704"
);
List
<
String
>
lvJiaTuo
=
Collections
.
singletonList
(
"011702"
);
List
<
String
>
danHou
=
Collections
.
singletonList
(
"011204"
);
List
<
String
>
dongHuanTuo
=
Collections
.
singletonList
(
"010102"
);
List
<
String
>
qianJiaYing
=
Collections
.
singletonList
(
"010105"
);
if
(
linXi
.
contains
(
mindId
))
{
List
<
ElectricityIntoTheParameterDto
>
collect
=
electricityIntoTheParameterDtoDtoList
.
parallelStream
().
filter
(
v
->
v
.
getRow
().
equals
(
"电价(含税)"
)).
collect
(
Collectors
.
toList
());
List
<
NewRuleRequestModel
>
collect
=
electricityIntoTheParameterDtoDtoList
.
parallelStream
().
filter
(
v
->
v
.
getRow
().
equals
(
"电价(含税)"
)).
collect
(
Collectors
.
toList
());
if
(
collect
.
size
()
!=
0
)
{
collect
.
parallelStream
().
forEach
(
v
->
{
Optional
<
PowerControlDao
>
first
=
controlList
.
parallelStream
().
filter
(
a
->
a
.
getColumn
().
equals
(
v
.
getColoumn
())).
findFirst
();
...
...
@@ -91,9 +91,34 @@ public class PowerDisplayServiceImpl implements PowerDisplayService {
saveOnTheLargeScreen
=
new
SaveOnTheLargeScreenImpl
(
new
DanHou
());
}
else
if
(
dongHuanTuo
.
contains
(
mindId
))
{
saveOnTheLargeScreen
=
new
SaveOnTheLargeScreenImpl
(
new
DongHuanTuo
());
}
else
if
(
qianJiaYing
.
contains
(
mindId
))
{
List
<
NewRuleRequestModel
>
collect
=
electricityIntoTheParameterDtoDtoList
.
parallelStream
()
.
filter
(
v
->
v
.
getRow
().
contains
(
"(尖)"
)
||
v
.
getRow
().
contains
(
"(峰)"
)
||
v
.
getRow
().
contains
(
"(平)"
)
||
v
.
getRow
().
contains
(
"(谷)"
))
.
collect
(
Collectors
.
toList
());
if
(
collect
.
size
()
!=
0
)
{
PowerDisplayDto
displayDto
;
for
(
NewRuleRequestModel
dto
:
collect
)
{
String
[]
split
=
dto
.
getRow
().
split
(
"-"
);
Optional
<
PowerDisplayDto
>
first
=
powerDisplayDtoList
.
parallelStream
().
filter
(
v
->
v
.
getClassificationName
().
equals
(
split
[
0
])).
findFirst
();
if
(
first
.
isPresent
())
displayDto
=
first
.
get
();
else
{
displayDto
=
new
PowerDisplayDto
();
displayDto
.
setClassificationName
(
split
[
0
]);
}
try
{
Method
method
=
powerDisplayDtoClass
.
getMethod
(
"set"
+
dto
.
getColoumn
(),
String
.
class
);
method
.
invoke
(
displayDto
,
dto
.
getValue
());
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
saveOnTheLargeScreen
=
new
SaveOnTheLargeScreenImpl
(
new
QianJiaYing
());
}
if
(
saveOnTheLargeScreen
!=
null
)
{
List
<
PowerDisplayDto
>
list
=
saveOnTheLargeScreen
.
save
(
mindId
,
powerDisplayDtoList
,
dao
);
if
(
mindId
.
equals
(
"010105"
))
method
(
list
,
electricityIntoTheParameterDtoDtoList
);
list
.
parallelStream
().
forEach
(
v
->
{
if
(
v
.
getLevelOneClassification
()
==
null
||
""
.
equals
(
v
.
getLevelOneClassification
()))
v
.
setLevelOneClassification
(
"其他"
);
...
...
@@ -101,4 +126,26 @@ public class PowerDisplayServiceImpl implements PowerDisplayService {
powerDisplayMapper
.
insert
(
list
);
}
}
/**
* 010105电价的处理方法
*
* @param list
* @param electricityIntoTheParameterDtoDtoList
*/
private
void
method
(
List
<
PowerDisplayDto
>
list
,
List
<
NewRuleRequestModel
>
electricityIntoTheParameterDtoDtoList
)
{
for
(
PowerDisplayDto
dto
:
list
)
{
if
((
dto
.
getElectricityPriceFlat
()
==
null
||
dto
.
getElectricityPriceFlat
().
equals
(
""
))
&&
(
dto
.
getElectricityPricePeak
()
==
null
||
dto
.
getElectricityPricePeak
().
equals
(
""
))
&&
(
dto
.
getElectricityPriceTip
()
==
null
||
dto
.
getElectricityPriceTip
().
equals
(
""
))
&&
(
dto
.
getElectricityPriceValley
()
==
null
||
dto
.
getElectricityPriceValley
().
equals
(
""
)))
{
Optional
<
NewRuleRequestModel
>
first
=
electricityIntoTheParameterDtoDtoList
.
parallelStream
().
filter
(
v
->
(
v
.
getRow
().
equals
(
dto
.
getLevelOneClassification
())
||
v
.
getRow
().
equals
(
dto
.
getLevelTwoClassification
()))
&&
v
.
getColoumn
().
equals
(
"单价"
)).
findFirst
();
if
(
first
.
isPresent
())
{
NewRuleRequestModel
model
=
first
.
get
();
dto
.
setElectricityPriceValley
(
model
.
getValue
());
dto
.
setElectricityPriceFlat
(
model
.
getValue
());
dto
.
setElectricityPricePeak
(
model
.
getValue
());
dto
.
setElectricityPriceTip
(
model
.
getValue
());
}
}
}
}
}
ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/saveOnTheLargeScreenPower/DongHuanTuo.java
0 → 100644
View file @
88b0dcd5
package
com.ruoyi.system.service.impl.saveOnTheLargeScreenPower
;
import
com.ruoyi.system.model.power.dao.PowerClassificationQueryDao
;
import
com.ruoyi.system.model.power.dao.PowerControlDao
;
import
com.ruoyi.system.model.power.dto.PowerDisplayDto
;
import
java.util.List
;
/**
* 2024/8/27
*/
public
class
DongHuanTuo
implements
SaveOnTheLargeScreen
{
@Override
public
List
<
PowerDisplayDto
>
save
(
String
mindId
,
List
<
PowerDisplayDto
>
powerDisplayDtoList
,
List
<
PowerClassificationQueryDao
>
dao
)
{
powerDisplayDtoList
.
parallelStream
().
forEach
(
v
->
{
for
(
PowerClassificationQueryDao
queryDao
:
dao
)
{
if
(
queryDao
.
getClassificationName
().
equals
(
v
.
getClassificationName
())){
v
.
setLevelOneClassification
(
queryDao
.
getLevelOneClassification
());
v
.
setLevelTwoClassification
(
queryDao
.
getLevelTwoClassification
());
v
.
setLevelThreeClassification
(
queryDao
.
getLevelThreeClassification
());
dao
.
remove
(
queryDao
);
break
;
}
}
});
return
powerDisplayDtoList
;
}
}
ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/saveOnTheLargeScreenPower/QianJiaYing.java
0 → 100644
View file @
88b0dcd5
package
com.ruoyi.system.service.impl.saveOnTheLargeScreenPower
;
import
com.ruoyi.system.model.power.dao.PowerClassificationQueryDao
;
import
com.ruoyi.system.model.power.dto.PowerDisplayDto
;
import
java.util.List
;
/**
* 2024/8/28
*/
public
class
QianJiaYing
implements
SaveOnTheLargeScreen
{
@Override
public
List
<
PowerDisplayDto
>
save
(
String
mindId
,
List
<
PowerDisplayDto
>
powerDisplayDtoList
,
List
<
PowerClassificationQueryDao
>
dao
)
{
powerDisplayDtoList
.
parallelStream
().
forEach
(
v
->
{
for
(
PowerClassificationQueryDao
queryDao
:
dao
)
{
if
(
v
.
getClassificationName
()
!=
null
&&
v
.
getClassificationName
().
equals
(
queryDao
.
getClassificationName
()))
{
v
.
setLevelOneClassification
(
queryDao
.
getLevelOneClassification
());
v
.
setLevelTwoClassification
(
queryDao
.
getLevelTwoClassification
());
v
.
setLevelThreeClassification
(
queryDao
.
getLevelThreeClassification
());
break
;
}
}
});
return
null
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment