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
5a83a4a2
Commit
5a83a4a2
authored
Sep 04, 2023
by
lvzhuangzhuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
清洗规则代码实现(修改生成表json存数据库)
parent
7787cfc7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
35 deletions
+63
-35
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesCleaningRuleController.java
.../system/controller/ActSuppliesCleaningRuleController.java
+4
-1
ruoyi-supplies/src/main/java/com/ruoyi/system/domain/ActSuppliesSixMinesSummaryTable.java
.../ruoyi/system/domain/ActSuppliesSixMinesSummaryTable.java
+20
-9
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesCleaningRuleMapper.xml
...resources/mapper/system/ActSuppliesCleaningRuleMapper.xml
+4
-3
ruoyi-ui/src/views/system/supplies/cleaning_rule.vue
ruoyi-ui/src/views/system/supplies/cleaning_rule.vue
+35
-22
No files found.
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesCleaningRuleController.java
View file @
5a83a4a2
...
...
@@ -50,7 +50,10 @@ public class ActSuppliesCleaningRuleController extends BaseController
@PostMapping
(
"/addActSuppliesSixMinesSummaryTable"
)
public
AjaxResult
addActSuppliesSixMinesSummaryTable
(
@RequestBody
ActSuppliesSixMinesSummaryTable
actSuppliesSixMinesSummaryTable
)
{
return
toAjax
(
actSuppliesCleaningRuleService
.
addActSuppliesSixMinesSummaryTable
(
actSuppliesSixMinesSummaryTable
));
int
i
=
actSuppliesCleaningRuleService
.
addActSuppliesSixMinesSummaryTable
(
actSuppliesSixMinesSummaryTable
);
return
toAjax
(
i
);
}
}
...
...
ruoyi-supplies/src/main/java/com/ruoyi/system/domain/ActSuppliesSixMinesSummaryTable.java
View file @
5a83a4a2
...
...
@@ -14,13 +14,15 @@ import org.apache.commons.lang3.builder.ToStringStyle;
public
class
ActSuppliesSixMinesSummaryTable
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** id */
private
Long
id
;
/** 历史数据id */
private
Long
i
d
;
private
Long
hI
d
;
/** 项目编码 */
@Excel
(
name
=
"项目编码"
)
private
Lo
ng
projectId
;
private
Stri
ng
projectId
;
/** 项目名称 */
@Excel
(
name
=
"项目名称"
)
...
...
@@ -31,7 +33,7 @@ public class ActSuppliesSixMinesSummaryTable extends BaseEntity
private
String
departmentName
;
/** 数量 */
@Excel
(
name
=
"数量"
)
private
Long
number
;
private
Double
number
;
/** 单价 */
@Excel
(
name
=
"单价"
)
...
...
@@ -57,11 +59,19 @@ public class ActSuppliesSixMinesSummaryTable extends BaseEntity
this
.
id
=
id
;
}
public
Long
getProjectId
()
{
public
Long
gethId
()
{
return
hId
;
}
public
void
sethId
(
Long
hId
)
{
this
.
hId
=
hId
;
}
public
String
getProjectId
()
{
return
projectId
;
}
public
void
setProjectId
(
Lo
ng
projectId
)
{
public
void
setProjectId
(
Stri
ng
projectId
)
{
this
.
projectId
=
projectId
;
}
...
...
@@ -81,11 +91,11 @@ public class ActSuppliesSixMinesSummaryTable extends BaseEntity
this
.
departmentName
=
departmentName
;
}
public
Long
getNumber
()
{
public
Double
getNumber
()
{
return
number
;
}
public
void
setNumber
(
Long
number
)
{
public
void
setNumber
(
Double
number
)
{
this
.
number
=
number
;
}
...
...
@@ -117,9 +127,10 @@ public class ActSuppliesSixMinesSummaryTable extends BaseEntity
@Override
public
String
toString
()
{
return
"ActSupplies
CleaningRu
le{"
+
return
"ActSupplies
SixMinesSummaryTab
le{"
+
"id="
+
id
+
", projectId="
+
projectId
+
", hId="
+
hId
+
", projectId='"
+
projectId
+
'\''
+
", projectName='"
+
projectName
+
'\''
+
", departmentName='"
+
departmentName
+
'\''
+
", number="
+
number
+
...
...
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesCleaningRuleMapper.xml
View file @
5a83a4a2
...
...
@@ -4,7 +4,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.ruoyi.system.mapper.ActSuppliesCleaningRuleMapper"
>
<resultMap
type=
"ActSuppliesSixMinesSummaryTable"
id=
"ActSuppliesSixMinesSummaryTableResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"Id"
column=
"id"
/>
<result
property=
"hId"
column=
"h_id"
/>
<result
property=
"projectId"
column=
"project_id"
/>
<result
property=
"projectName"
column=
"project_name"
/>
<result
property=
"departmentName"
column=
"department_name"
/>
...
...
@@ -17,7 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert
id=
"addActSuppliesSixMinesSummaryTable"
parameterType=
"ActSuppliesSixMinesSummaryTable"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into act_supplies_sixminessummarytable
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"
id != null"
>
id,
</if>
<if
test=
"
hId != null"
>
h_
id,
</if>
<if
test=
"projectId != null"
>
project_id,
</if>
<if
test=
"projectName != null"
>
project_name,
</if>
<if
test=
"departmentName != null"
>
department_name,
</if>
...
...
@@ -27,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"createBy != null"
>
create_by,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"
id != null"
>
#{i
d},
</if>
<if
test=
"
hId != null"
>
#{hI
d},
</if>
<if
test=
"projectId != null"
>
#{projectId},
</if>
<if
test=
"projectName != null"
>
#{projectName},
</if>
<if
test=
"departmentName != null"
>
#{departmentName},
</if>
...
...
ruoyi-ui/src/views/system/supplies/cleaning_rule.vue
View file @
5a83a4a2
...
...
@@ -15,7 +15,7 @@ export default {
return
{
// 表单参数
from
:
{
i
d
:
""
,
hI
d
:
""
,
projectId
:
""
,
projectName
:
""
,
departmentName
:
""
,
...
...
@@ -23,6 +23,7 @@ export default {
nuitPrice
:
""
,
money
:
""
,
createBy
:
""
},
};
},
...
...
@@ -35,12 +36,14 @@ export default {
selectActSuppliesHistorydata
().
then
(
response
=>
{
var
data
=
response
.
data
;
debugger
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
if
(
data
[
i
].
identifyingCode
==
1
){
/*生成表*/
let
jsonDataa
=
JSON
.
parse
(
data
[
i
].
historyContent
);
for
(
let
j
=
0
;
j
<
jsonDataa
.
length
;
j
++
)
{
let
dataa
=
window
.
luckysheet
.
transToData
(
jsonDataa
[
j
].
celldata
);
console
.
log
(
dataa
)
for
(
let
k
=
2
;
k
<
dataa
.
length
;
k
++
)
{
let
a0
;
let
a1
;
...
...
@@ -69,26 +72,30 @@ export default {
a3
=
""
;
}
}
if
(
dataa
[
k
][
4
]
!=
null
){
a4
=
dataa
[
k
][
4
].
v
;
if
(
a4
==
undefined
){
a4
=
""
;
}
}
if
(
dataa
[
k
][
5
]
!=
null
){
a5
=
dataa
[
k
][
5
].
v
;
if
(
a5
==
undefined
){
a5
=
""
;
}
}
if
(
dataa
[
k
][
6
]
!=
null
){
a6
=
dataa
[
k
][
6
].
v
;
if
(
a6
==
undefined
){
a6
=
""
;
}
}
if
(
a0
!=
""
&&
a1
!=
""
&&
a3
!=
""
&&
a4
!=
""
&&
a5
!=
""
&&
a6
!=
""
){
this
.
from
.
id
=
data
[
i
].
id
;
debugger
if
(
data
[
i
].
id
!=
null
){
this
.
from
.
hId
=
data
[
i
].
id
;
this
.
from
.
projectId
=
a0
;
this
.
from
.
projectName
=
a1
;
this
.
from
.
departmentName
=
a3
;
...
...
@@ -96,20 +103,26 @@ export default {
this
.
from
.
nuitPrice
=
a5
;
this
.
from
.
money
=
a6
;
this
.
from
.
createBy
=
data
[
i
].
createBy
;
}
console
.
log
(
this
.
from
)
addActSuppliesSixMinesSummaryTable
(
this
.
from
).
then
(
response
=>
{});
}
}
}
}
else
{
let
jsonDatab
=
JSON
.
parse
(
data
[
i
].
historyContent
);
/*导入表*/
/*let jsonDatab = JSON.parse(data[i].historyContent);
for (let j = 0; j < jsonDatab.length; j++) {
let datab=window.luckysheet.transToData(jsonDatab[j].celldata);
}
}
*/
}
}
});
},
}
...
...
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