Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
indicators
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangkb
indicators
Commits
51d94765
Commit
51d94765
authored
Jun 07, 2020
by
zhangkb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
考核指标添加短板规则字段
parent
d66e8e93
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
14 deletions
+22
-14
IndicatorsDefCtrl.java
...keymobile/indicators/api/hytobacco/IndicatorsDefCtrl.java
+10
-8
DriveIndDef.java
...obile/indicators/model/entity/indicators/DriveIndDef.java
+2
-0
BaseIndDefService.java
...obile/indicators/service/hytobacco/BaseIndDefService.java
+5
-3
DriveIndDefService.java
...bile/indicators/service/hytobacco/DriveIndDefService.java
+5
-3
No files found.
src/main/java/com/keymobile/indicators/api/hytobacco/IndicatorsDefCtrl.java
View file @
51d94765
...
@@ -33,8 +33,8 @@ public class IndicatorsDefCtrl {
...
@@ -33,8 +33,8 @@ public class IndicatorsDefCtrl {
@ApiOperation
(
value
=
"新建基础指标"
,
notes
=
"新建基础指标"
)
@ApiOperation
(
value
=
"新建基础指标"
,
notes
=
"新建基础指标"
)
@PostMapping
(
value
=
"/createBaseInd"
)
@PostMapping
(
value
=
"/createBaseInd"
)
public
void
createBaseInd
(
@RequestBody
BaseIndDef
baseIndDef
,
@RequestParam
String
catalogId
,
public
void
createBaseInd
(
@RequestBody
BaseIndDef
baseIndDef
,
@RequestParam
String
catalogId
,
@RequestParam
String
user
)
throws
Exception
{
@RequestParam
String
catalogIdPath
,
@RequestParam
String
user
)
throws
Exception
{
baseIndDefService
.
saveOrUpdate
(
baseIndDef
,
catalogId
,
user
);
baseIndDefService
.
saveOrUpdate
(
baseIndDef
,
catalogId
,
catalogIdPath
,
user
);
}
}
@ApiOperation
(
value
=
"删除基础指标"
,
notes
=
"删除基础指标"
)
@ApiOperation
(
value
=
"删除基础指标"
,
notes
=
"删除基础指标"
)
...
@@ -45,16 +45,17 @@ public class IndicatorsDefCtrl {
...
@@ -45,16 +45,17 @@ public class IndicatorsDefCtrl {
@ApiOperation
(
value
=
"根据关键字查询基础指标"
,
notes
=
"根据关键字查询基础指标"
)
@ApiOperation
(
value
=
"根据关键字查询基础指标"
,
notes
=
"根据关键字查询基础指标"
)
@PostMapping
(
value
=
"/getByPageAndKeyword"
)
@PostMapping
(
value
=
"/getByPageAndKeyword"
)
public
Map
<
String
,
Object
>
getByPageAndKeyword
(
@RequestParam
String
catalogId
,
@RequestParam
String
keyword
,
public
Map
<
String
,
Object
>
getByPageAndKeyword
(
@RequestParam
String
catalogId
,
@RequestParam
int
page
,
@RequestParam
int
rows
)
throws
Exception
{
@RequestParam
(
required
=
false
)
String
keyword
,
@RequestParam
(
defaultValue
=
"0"
)
int
page
,
@RequestParam
(
defaultValue
=
"10"
)
int
rows
)
throws
Exception
{
return
baseIndDefService
.
getByPageAndKeyword
(
catalogId
,
keyword
,
page
,
rows
);
return
baseIndDefService
.
getByPageAndKeyword
(
catalogId
,
keyword
,
page
,
rows
);
}
}
@ApiOperation
(
value
=
"新建考核指标"
,
notes
=
"新建考核指标"
)
@ApiOperation
(
value
=
"新建考核指标"
,
notes
=
"新建考核指标"
)
@PostMapping
(
value
=
"/createDriveInd"
)
@PostMapping
(
value
=
"/createDriveInd"
)
public
void
createDriveInd
(
@RequestBody
DriveIndDef
driveIndDef
,
@RequestParam
String
catalogId
,
public
void
createDriveInd
(
@RequestBody
DriveIndDef
driveIndDef
,
@RequestParam
String
catalogId
,
@RequestParam
String
user
)
throws
Exception
{
@RequestParam
String
catalogIdPath
,
@RequestParam
String
user
)
throws
Exception
{
driveIndDefService
.
saveOrUpdate
(
driveIndDef
,
catalogId
,
user
);
driveIndDefService
.
saveOrUpdate
(
driveIndDef
,
catalogId
,
catalogIdPath
,
user
);
}
}
@ApiOperation
(
value
=
"删除考核指标"
,
notes
=
"删除考核指标"
)
@ApiOperation
(
value
=
"删除考核指标"
,
notes
=
"删除考核指标"
)
...
@@ -65,8 +66,9 @@ public class IndicatorsDefCtrl {
...
@@ -65,8 +66,9 @@ public class IndicatorsDefCtrl {
@ApiOperation
(
value
=
"根据关键字查询考核指标"
,
notes
=
"根据关键字查询考核指标"
)
@ApiOperation
(
value
=
"根据关键字查询考核指标"
,
notes
=
"根据关键字查询考核指标"
)
@PostMapping
(
value
=
"/getDriveByPageAndKeyword"
)
@PostMapping
(
value
=
"/getDriveByPageAndKeyword"
)
public
Map
<
String
,
Object
>
getDriveByPageAndKeyword
(
@RequestParam
String
catalogId
,
@RequestParam
String
keyword
,
public
Map
<
String
,
Object
>
getDriveByPageAndKeyword
(
@RequestParam
String
catalogId
,
@RequestParam
int
page
,
@RequestParam
int
rows
)
throws
Exception
{
@RequestParam
(
required
=
false
)
String
keyword
,
@RequestParam
(
defaultValue
=
"0"
)
int
page
,
@RequestParam
(
defaultValue
=
"10"
)
int
rows
)
throws
Exception
{
return
driveIndDefService
.
getByPageAndKeyword
(
catalogId
,
keyword
,
page
,
rows
);
return
driveIndDefService
.
getByPageAndKeyword
(
catalogId
,
keyword
,
page
,
rows
);
}
}
...
...
src/main/java/com/keymobile/indicators/model/entity/indicators/DriveIndDef.java
View file @
51d94765
...
@@ -32,6 +32,8 @@ public class DriveIndDef {
...
@@ -32,6 +32,8 @@ public class DriveIndDef {
private
String
version
;
//版本号
private
String
version
;
//版本号
private
String
catalogId
;
//挂靠目录id
private
String
catalogId
;
//挂靠目录id
private
String
catalogIdPath
;
//挂靠目录idPath,方便用目录类别找到对应的挂靠指标
private
String
catalogIdPath
;
//挂靠目录idPath,方便用目录类别找到对应的挂靠指标
private
String
indShortboardRule
;
//短板规则
private
String
indShortboardRuleDesc
;
//短板规则描述
private
String
creater
;
private
String
creater
;
private
Date
createTime
;
private
Date
createTime
;
private
String
updater
;
private
String
updater
;
...
...
src/main/java/com/keymobile/indicators/service/hytobacco/BaseIndDefService.java
View file @
51d94765
...
@@ -19,7 +19,7 @@ public class BaseIndDefService {
...
@@ -19,7 +19,7 @@ public class BaseIndDefService {
@Autowired
@Autowired
private
BaseIndDefVersionService
baseIndDefVersionService
;
private
BaseIndDefVersionService
baseIndDefVersionService
;
public
String
saveOrUpdate
(
BaseIndDef
baseIndDef
,
String
catalogId
,
String
user
)
public
String
saveOrUpdate
(
BaseIndDef
baseIndDef
,
String
catalogId
,
String
catalogIdPath
,
String
user
)
throws
Exception
{
throws
Exception
{
if
(
StringUtils
.
isBlank
(
baseIndDef
.
getIndId
()))
{
if
(
StringUtils
.
isBlank
(
baseIndDef
.
getIndId
()))
{
return
"indId can not be null"
;
return
"indId can not be null"
;
...
@@ -32,16 +32,18 @@ public class BaseIndDefService {
...
@@ -32,16 +32,18 @@ public class BaseIndDefService {
baseIndDef
.
setUpdateTime
(
new
Date
());
baseIndDef
.
setUpdateTime
(
new
Date
());
baseIndDef
.
setVersion
(
"1.0"
);
baseIndDef
.
setVersion
(
"1.0"
);
baseIndDef
.
setCatalogId
(
catalogId
);
baseIndDef
.
setCatalogId
(
catalogId
);
baseIndDef
.
setCatalogIdPath
(
catalogIdPath
);
baseIndDefMapper
.
insert
(
baseIndDef
);
baseIndDefMapper
.
insert
(
baseIndDef
);
}
else
{
}
else
{
//生成版本
//生成版本
if
(
baseIndDefVersionService
.
save
(
b
aseIndDef
))
{
if
(
baseIndDefVersionService
.
save
(
dbB
aseIndDef
))
{
String
oldVersion
=
b
aseIndDef
.
getVersion
();
String
oldVersion
=
dbB
aseIndDef
.
getVersion
();
String
newVersion
=
String
.
valueOf
(
Double
.
valueOf
(
oldVersion
)+
1
);
//旧版本+1
String
newVersion
=
String
.
valueOf
(
Double
.
valueOf
(
oldVersion
)+
1
);
//旧版本+1
baseIndDef
.
setUpdater
(
user
);
baseIndDef
.
setUpdater
(
user
);
baseIndDef
.
setUpdateTime
(
new
Date
());
baseIndDef
.
setUpdateTime
(
new
Date
());
baseIndDef
.
setVersion
(
newVersion
);
baseIndDef
.
setVersion
(
newVersion
);
baseIndDef
.
setCatalogId
(
catalogId
);
baseIndDef
.
setCatalogId
(
catalogId
);
baseIndDef
.
setCatalogIdPath
(
catalogIdPath
);
baseIndDefMapper
.
updateByPrimaryKey
(
baseIndDef
);
baseIndDefMapper
.
updateByPrimaryKey
(
baseIndDef
);
}
}
}
}
...
...
src/main/java/com/keymobile/indicators/service/hytobacco/DriveIndDefService.java
View file @
51d94765
...
@@ -19,7 +19,7 @@ public class DriveIndDefService {
...
@@ -19,7 +19,7 @@ public class DriveIndDefService {
@Autowired
@Autowired
private
DriveIndDefVersionService
driveIndDefVersionService
;
private
DriveIndDefVersionService
driveIndDefVersionService
;
public
String
saveOrUpdate
(
DriveIndDef
driveIndDef
,
String
catalogId
,
String
user
)
public
String
saveOrUpdate
(
DriveIndDef
driveIndDef
,
String
catalogId
,
String
catalogIdPath
,
String
user
)
throws
Exception
{
throws
Exception
{
if
(
StringUtils
.
isBlank
(
driveIndDef
.
getIndId
()))
{
if
(
StringUtils
.
isBlank
(
driveIndDef
.
getIndId
()))
{
return
"indId can not be null"
;
return
"indId can not be null"
;
...
@@ -32,16 +32,18 @@ public class DriveIndDefService {
...
@@ -32,16 +32,18 @@ public class DriveIndDefService {
driveIndDef
.
setUpdateTime
(
new
Date
());
driveIndDef
.
setUpdateTime
(
new
Date
());
driveIndDef
.
setVersion
(
"1.0"
);
driveIndDef
.
setVersion
(
"1.0"
);
driveIndDef
.
setCatalogId
(
catalogId
);
driveIndDef
.
setCatalogId
(
catalogId
);
driveIndDef
.
setCatalogIdPath
(
catalogIdPath
);
driveIndDefMapper
.
insert
(
driveIndDef
);
driveIndDefMapper
.
insert
(
driveIndDef
);
}
else
{
}
else
{
//生成版本
//生成版本
if
(
driveIndDefVersionService
.
save
(
d
riv
eIndDef
))
{
if
(
driveIndDefVersionService
.
save
(
d
bBas
eIndDef
))
{
String
oldVersion
=
d
riv
eIndDef
.
getVersion
();
String
oldVersion
=
d
bBas
eIndDef
.
getVersion
();
String
newVersion
=
String
.
valueOf
(
Double
.
valueOf
(
oldVersion
)+
1
);
//旧版本+1
String
newVersion
=
String
.
valueOf
(
Double
.
valueOf
(
oldVersion
)+
1
);
//旧版本+1
driveIndDef
.
setUpdater
(
user
);
driveIndDef
.
setUpdater
(
user
);
driveIndDef
.
setUpdateTime
(
new
Date
());
driveIndDef
.
setUpdateTime
(
new
Date
());
driveIndDef
.
setVersion
(
newVersion
);
driveIndDef
.
setVersion
(
newVersion
);
driveIndDef
.
setCatalogId
(
catalogId
);
driveIndDef
.
setCatalogId
(
catalogId
);
driveIndDef
.
setCatalogIdPath
(
catalogIdPath
);
driveIndDefMapper
.
updateByPrimaryKey
(
driveIndDef
);
driveIndDefMapper
.
updateByPrimaryKey
(
driveIndDef
);
}
}
}
}
...
...
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