Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
data-acquisition
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
竹天卫
data-acquisition
Commits
05e04203
Commit
05e04203
authored
May 24, 2021
by
renchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产工序业务修改
parent
9147cefa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
7 deletions
+26
-7
ProjectEnum.java
...n/wise/sc/acquisition/business/enumation/ProjectEnum.java
+24
-5
TProcessesDrillingServiceImpl.java
.../business/service/impl/TProcessesDrillingServiceImpl.java
+1
-1
TSysDictServiceImpl.java
...cquisition/business/service/impl/TSysDictServiceImpl.java
+1
-1
No files found.
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/enumation/ProjectEnum.java
View file @
05e04203
...
@@ -316,19 +316,21 @@ public class ProjectEnum {
...
@@ -316,19 +316,21 @@ public class ProjectEnum {
*/
*/
public
enum
TSysDict
{
public
enum
TSysDict
{
ID
(
0
,
"ID"
,
"ID"
),
ID
(
0
,
"ID"
,
0
,
"ID"
),
SIX
(
6
,
"6"
,
"id为6的数据"
);
TAG_DATE
(
1
,
"6"
,
6
,
"id为6的数据"
);
// 成员变量
// 成员变量
private
int
value
;
private
int
value
;
private
String
label
;
private
String
label
;
private
int
id
;
private
String
explain
;
private
String
explain
;
// 构造方法
// 构造方法
TSysDict
(
int
value
,
String
label
,
String
explain
)
{
TSysDict
(
int
value
,
String
label
,
int
id
,
String
explain
)
{
this
.
value
=
value
;
this
.
value
=
value
;
this
.
label
=
label
;
this
.
label
=
label
;
this
.
id
=
id
;
this
.
explain
=
explain
;
this
.
explain
=
explain
;
}
}
...
@@ -341,7 +343,7 @@ public class ProjectEnum {
...
@@ -341,7 +343,7 @@ public class ProjectEnum {
return
c
.
label
;
return
c
.
label
;
}
}
}
}
return
TSysDict
.
SIX
.
label
;
return
TSysDict
.
ID
.
label
;
}
}
/**
/**
...
@@ -353,13 +355,30 @@ public class ProjectEnum {
...
@@ -353,13 +355,30 @@ public class ProjectEnum {
return
c
.
value
;
return
c
.
value
;
}
}
}
}
return
TSysDict
.
SIX
.
value
;
return
TSysDict
.
ID
.
value
;
}
/**
* 根据label,获取value
*/
public
static
int
getId
(
String
label
)
{
for
(
TSysDict
c
:
TSysDict
.
values
())
{
if
(
StringUtils
.
equalsIgnoreCase
(
label
,
c
.
label
))
{
return
c
.
id
;
}
}
return
TSysDict
.
ID
.
id
;
}
}
public
int
getValue
()
{
public
int
getValue
()
{
return
value
;
return
value
;
}
}
public
int
getId
()
{
return
id
;
}
public
String
getLabel
()
{
public
String
getLabel
()
{
return
label
;
return
label
;
}
}
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/service/impl/TProcessesDrillingServiceImpl.java
View file @
05e04203
...
@@ -98,7 +98,7 @@ public class TProcessesDrillingServiceImpl extends ServiceImpl<TProcessesDrillin
...
@@ -98,7 +98,7 @@ public class TProcessesDrillingServiceImpl extends ServiceImpl<TProcessesDrillin
//例如查询出来name字段是26:上月26日到当前日期的实测孔深相加
//例如查询出来name字段是26:上月26日到当前日期的实测孔深相加
//查询字典id为6的name字段
//查询字典id为6的name字段
TSysDictQuery
tSysDictQuery
=
new
TSysDictQuery
();
TSysDictQuery
tSysDictQuery
=
new
TSysDictQuery
();
tSysDictQuery
.
setId
(
ProjectEnum
.
TSysDict
.
SIX
.
getValue
());
tSysDictQuery
.
setId
(
ProjectEnum
.
TSysDict
.
TAG_DATE
.
getId
());
R
<
String
>
name
=
itSysDictService
.
getNameByQuery
(
tSysDictQuery
);
R
<
String
>
name
=
itSysDictService
.
getNameByQuery
(
tSysDictQuery
);
if
(
name
.
getCode
()
!=
0
)
{
if
(
name
.
getCode
()
!=
0
)
{
log
.
error
(
"穿孔工序中->获取字典SysDict的id为6数据的name字段失败"
);
log
.
error
(
"穿孔工序中->获取字典SysDict的id为6数据的name字段失败"
);
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/service/impl/TSysDictServiceImpl.java
View file @
05e04203
...
@@ -41,7 +41,7 @@ public class TSysDictServiceImpl extends ServiceImpl<TSysDictMapper, TSysDict> i
...
@@ -41,7 +41,7 @@ public class TSysDictServiceImpl extends ServiceImpl<TSysDictMapper, TSysDict> i
//获取标注日期,将字典中id为6的数据的name字段做比较
//获取标注日期,将字典中id为6的数据的name字段做比较
//大于name字段记录下一个月,小于该字段记录本月
//大于name字段记录下一个月,小于该字段记录本月
//获取id为6的字典
//获取id为6的字典
TSysDict
tSysDict
=
baseMapper
.
selectById
(
ProjectEnum
.
TSysDict
.
SIX
.
getValue
());
TSysDict
tSysDict
=
baseMapper
.
selectById
(
ProjectEnum
.
TSysDict
.
TAG_DATE
.
getId
());
if
(
tSysDict
==
null
||
StringUtils
.
isBlank
(
tSysDict
.
getName
()))
{
if
(
tSysDict
==
null
||
StringUtils
.
isBlank
(
tSysDict
.
getName
()))
{
return
R
.
failed
(
"数据字典中->不存在id为6的数据"
);
return
R
.
failed
(
"数据字典中->不存在id为6的数据"
);
}
}
...
...
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