Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
cac67f04
Commit
cac67f04
authored
Oct 19, 2023
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新计划另存
parent
c0b2eab2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
48 deletions
+23
-48
PlanMapper.java
...m/yeejoin/amos/patrol/business/dao/mapper/PlanMapper.java
+4
-2
PlanServiceImpl.java
...in/amos/patrol/business/service/impl/PlanServiceImpl.java
+6
-1
dbTemplate_plan.xml
...m-patrol/src/main/resources/db/mapper/dbTemplate_plan.xml
+13
-45
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/mapper/PlanMapper.java
View file @
cac67f04
...
@@ -9,8 +9,10 @@ import java.util.List;
...
@@ -9,8 +9,10 @@ import java.util.List;
public
interface
PlanMapper
extends
BaseMapper
{
public
interface
PlanMapper
extends
BaseMapper
{
void
saveAs
(
String
id
);
Plan
getPlanEntityById
(
String
id
);
Long
getMaxId
();
void
updPlanStatusOrGenDate
(
HashMap
<
String
,
Object
>
id
);
void
updPlanStatusOrGenDate
(
HashMap
<
String
,
Object
>
id
);
/**
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PlanServiceImpl.java
View file @
cac67f04
...
@@ -13,6 +13,7 @@ import com.yeejoin.amos.patrol.dao.entity.Plan;
...
@@ -13,6 +13,7 @@ import com.yeejoin.amos.patrol.dao.entity.Plan;
import
liquibase.pro.packaged.L
;
import
liquibase.pro.packaged.L
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.PageImpl
;
...
@@ -115,7 +116,11 @@ public class PlanServiceImpl implements IPlanService {
...
@@ -115,7 +116,11 @@ public class PlanServiceImpl implements IPlanService {
@Override
@Override
public
void
planSaveAs
(
Long
[]
param
)
{
public
void
planSaveAs
(
Long
[]
param
)
{
for
(
int
i
=
0
;
i
<
param
.
length
;
i
++){
for
(
int
i
=
0
;
i
<
param
.
length
;
i
++){
planMapper
.
saveAs
(
param
[
i
].
toString
());
Plan
plan
=
planMapper
.
getPlanEntityById
(
param
[
i
].
toString
());
Long
longId
=
planMapper
.
getMaxId
();
plan
.
setName
(
plan
.
getName
()
+
"复制"
);
plan
.
setId
(
longId
+
1
);
planDao
.
saveAndFlush
(
plan
);
}
}
}
}
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/dbTemplate_plan.xml
View file @
cac67f04
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.patrol.business.dao.mapper.PlanMapper"
>
<mapper
namespace=
"com.yeejoin.amos.patrol.business.dao.mapper.PlanMapper"
>
<!-- 另存计划 -->
<!-- 另存计划 -->
<
insert
id=
"saveAs"
parameterType=
"String
"
>
<
select
id=
"getPlanEntityById"
resultType=
"com.yeejoin.amos.patrol.dao.entity.Plan
"
>
INSERT INTO p_plan (
SELECT
name,
name,
dept_id,
dept_id,
org_code,
org_code,
...
@@ -45,53 +45,21 @@
...
@@ -45,53 +45,21 @@
remark2,
remark2,
is_single_execution,
is_single_execution,
user_dept
user_dept
) SELECT
CONCAT(name, '复制'),
dept_id,
org_code,
route_id,
plan_type,
is_fixed_date,
in_order,
plan_begin,
plan_end,
day_rate,
day_time,
day_interval,
day_interval_unit,
day_begin,
day_end,
execute_interval,
month_type,
what_day,
what_week,
week_day,
duration,
user_id,
execute_rate,
week_begin_num,
week_end_num,
min_space,
is_score,
score_formula,
status,
error,
next_gen_date,
create_by,
create_date,
last_upd_by,
last_upd_time,
remark,
remark1,
remark2,
is_single_execution,
user_dept
FROM
FROM
p_plan
p_plan
WHERE
WHERE
id = #{id}
id = #{id}
</insert>
</select>
<select
id=
"getMaxId"
resultType=
"Long"
>
select
id
from
p_plan
order by id DESC
limit 1
</select>
<select
id=
"getPlanByRouteId"
resultType=
"com.yeejoin.amos.patrol.dao.entity.Plan"
>
<select
id=
"getPlanByRouteId"
resultType=
"com.yeejoin.amos.patrol.dao.entity.Plan"
>
SELECT * FROM p_plan
SELECT * FROM p_plan
<where>
<where>
...
...
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