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
34ceeb01
Commit
34ceeb01
authored
Aug 26, 2020
by
hzc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加任务规则的级别
parent
fe95c08b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
TaskRule.java
...keymobile/indicators/model/entity/dataenter/TaskRule.java
+9
-0
TaskRuleServiceImpl.java
...ndicators/service/dataenter/impl/TaskRuleServiceImpl.java
+11
-0
No files found.
src/main/java/com/keymobile/indicators/model/entity/dataenter/TaskRule.java
View file @
34ceeb01
...
...
@@ -103,8 +103,17 @@ public class TaskRule extends BaseModel {
private
Date
lastActiveTime
;
/**
* 1省 2市 3县(增加规则用户机构的级别)
*/
private
Integer
orgType
;
/**
* 关联的指标
*/
@Transient
private
List
<
TaskRuleIndicator
>
indicators
;
/**
* 接收机构编号
* */
@Transient
private
String
orgNo
;
}
src/main/java/com/keymobile/indicators/service/dataenter/impl/TaskRuleServiceImpl.java
View file @
34ceeb01
...
...
@@ -57,6 +57,17 @@ public class TaskRuleServiceImpl implements TaskRuleService {
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
createRule
(
TaskRule
rule
)
{
String
orgNo
=
rule
.
getOrgNo
();
int
size
=
orgNo
.
length
();
int
orgType
=
0
;
if
(
size
==
2
){
orgType
=
Constants
.
RULE_TYPE_PROVINCE
;
}
else
if
(
size
==
4
){
orgType
=
Constants
.
RULE_TYPE_CITY
;
}
else
if
(
size
==
6
){
orgType
=
Constants
.
RULE_TYPE_COUNTY
;
}
rule
.
setOrgType
(
orgType
);
rule
.
setState
(
Constants
.
DATA_STATE_A
);
taskRuleMapper
.
insert
(
rule
);
saveRuleIndicators
(
rule
);
...
...
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