Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zjsgfa_mysql
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jiangyun
zjsgfa_mysql
Commits
b3024cf7
Commit
b3024cf7
authored
Mar 18, 2026
by
jiangyun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
34954166
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
0 deletions
+44
-0
src/main/java/com/zjsgfa/project/zjsgfa/controller/SjLjzjyfzqkController.java
+8
-0
src/main/java/com/zjsgfa/project/zjsgfa/mapper/SjLjzjyfzqkMapper.java
+2
-0
src/main/java/com/zjsgfa/project/zjsgfa/service/ISjLjzjyfzqkService.java
+1
-0
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/SjLjzjyfzqkServiceImpl.java
+10
-0
src/main/resources/mybatis/zjsgfa/SjLjzjyfzqkMapper.xml
+23
-0
No files found.
src/main/java/com/zjsgfa/project/zjsgfa/controller/SjLjzjyfzqkController.java
View file @
b3024cf7
...
@@ -110,4 +110,12 @@ public class SjLjzjyfzqkController extends BaseController
...
@@ -110,4 +110,12 @@ public class SjLjzjyfzqkController extends BaseController
{
{
return
toAjax
(
sjLjzjyfzqkService
.
insertSjLjzjyfzqkBatch
(
list
));
return
toAjax
(
sjLjzjyfzqkService
.
insertSjLjzjyfzqkBatch
(
list
));
}
}
@PostMapping
(
"/pladd3"
)
public
AjaxResult
pladd3
(
@RequestBody
List
<
SjLjzjyfzqk
>
list
)
throws
Exception
{
return
toAjax
(
sjLjzjyfzqkService
.
pladd3
(
list
));
}
}
}
src/main/java/com/zjsgfa/project/zjsgfa/mapper/SjLjzjyfzqkMapper.java
View file @
b3024cf7
...
@@ -65,4 +65,6 @@ public interface SjLjzjyfzqkMapper
...
@@ -65,4 +65,6 @@ public interface SjLjzjyfzqkMapper
int
insertSjLjzjyfzqkBatch
(
List
<
SjLjfzqk
>
jsqaList
);
int
insertSjLjzjyfzqkBatch
(
List
<
SjLjfzqk
>
jsqaList
);
int
insertSjLjzjyfzqkBatch2
(
List
<
SjLjzjyfzqk
>
list
);
}
}
src/main/java/com/zjsgfa/project/zjsgfa/service/ISjLjzjyfzqkService.java
View file @
b3024cf7
...
@@ -63,4 +63,5 @@ public interface ISjLjzjyfzqkService
...
@@ -63,4 +63,5 @@ public interface ISjLjzjyfzqkService
int
insertSjLjzjyfzqkBatch
(
List
<
SjLjjw
>
list
);
int
insertSjLjzjyfzqkBatch
(
List
<
SjLjjw
>
list
);
int
pladd3
(
List
<
SjLjzjyfzqk
>
list
);
}
}
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/SjLjzjyfzqkServiceImpl.java
View file @
b3024cf7
...
@@ -129,4 +129,14 @@ public class SjLjzjyfzqkServiceImpl implements ISjLjzjyfzqkService
...
@@ -129,4 +129,14 @@ public class SjLjzjyfzqkServiceImpl implements ISjLjzjyfzqkService
return
1
;
return
1
;
}
}
@Override
public
int
pladd3
(
List
<
SjLjzjyfzqk
>
list
)
{
String
jh
=
list
.
get
(
0
).
getJh
();
SjDjjc
sjDjjc
=
sjDjjcMapper
.
selectSjDjjcByJh
(
jh
);
//先删除已有数据
sjLjzjyfzqkMapper
.
deleteSjLjzjyfzqkByZbid
(
sjDjjc
.
getId
());
sjLjzjyfzqkMapper
.
insertSjLjzjyfzqkBatch2
(
list
);
return
1
;
}
}
}
src/main/resources/mybatis/zjsgfa/SjLjzjyfzqkMapper.xml
View file @
b3024cf7
...
@@ -81,6 +81,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -81,6 +81,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
</trim>
</foreach>
</foreach>
</insert>
</insert>
<insert
id=
"insertSjLjzjyfzqkBatch2"
>
<foreach
collection=
"list"
item=
"item"
separator=
";"
>
insert into sj_ljzjyfzqk
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"item.jh != null"
>
jh,
</if>
<if
test=
"item.ljjh != null"
>
ljjh,
</if>
<if
test=
"item.jl != null"
>
jl,
</if>
<if
test=
"item.sj != null"
>
sj,
</if>
<if
test=
"item.wzjs != null"
>
wzjs,
</if>
<if
test=
"item.fzqk != null"
>
fzqk,
</if>
<if
test=
"item.zbid != null"
>
zbid,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"item.jh != null"
>
#{item.jh},
</if>
<if
test=
"item.ljjh != null"
>
#{item.ljjh},
</if>
<if
test=
"item.jl != null"
>
#{item.jl},
</if>
<if
test=
"item.sj != null"
>
#{item.sj},
</if>
<if
test=
"item.wzjs != null"
>
#{item.wzjs},
</if>
<if
test=
"item.fzqk != null"
>
#{item.fzqk},
</if>
<if
test=
"item.zbid != null"
>
#{item.zbid},
</if>
</trim>
</foreach>
</insert>
<update
id=
"updateSjLjzjyfzqk"
parameterType=
"SjLjzjyfzqk"
>
<update
id=
"updateSjLjzjyfzqk"
parameterType=
"SjLjzjyfzqk"
>
update sj_ljzjyfzqk
update sj_ljzjyfzqk
...
...
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