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
3dd05197
Commit
3dd05197
authored
Oct 24, 2022
by
zhangsen
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_dl_plan6' into develop_dl_plan6_temp
parents
1945bcda
0b44e35e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
10 deletions
+30
-10
DutyPersonServiceImpl.java
...module/common/biz/service/impl/DutyPersonServiceImpl.java
+27
-2
TopographyController.java
.../yeejoin/equipmanage/controller/TopographyController.java
+2
-2
EquipmentSpecificSerivceImpl.java
...quipmanage/service/impl/EquipmentSpecificSerivceImpl.java
+1
-6
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/DutyPersonServiceImpl.java
View file @
3dd05197
...
...
@@ -10,8 +10,12 @@ import java.util.Map;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyPersonShiftDto
;
import
com.yeejoin.amos.boot.module.common.api.mapper.DutyPersonShiftMapper
;
import
com.yeejoin.amos.boot.module.common.biz.enums.DataDictionaryTypeEnum
;
import
com.yeejoin.amos.boot.module.common.biz.enums.DynamicGroupCodeEnum
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -74,7 +78,7 @@ public class DutyPersonServiceImpl extends DutyCommonServiceImpl implements IDut
}
Map
<
String
,
Object
>
map
=
Bean
.
BeantoMap
(
dutyPersonDto
);
buildDataMap
(
map
,
userId
);
if
(!
instances
.
isEmpty
())
{
// 0.定位instanceId,准备进行更新操作
instanceId
=
instances
.
get
(
0
).
getInstanceId
();
// 已经有了走更新方法
...
...
@@ -132,7 +136,27 @@ public class DutyPersonServiceImpl extends DutyCommonServiceImpl implements IDut
}
private
Map
<
String
,
Object
>
buildDataMap
(
Map
<
String
,
Object
>
d
,
String
userId
)
{
// 表单存在人员类型,获取用户ID,查询人员类型赋值
if
(!
ObjectUtils
.
isEmpty
(
userId
))
{
List
<
DynamicFormInstance
>
instances
=
dynamicFormInstanceService
.
list
(
new
LambdaQueryWrapper
<
DynamicFormInstance
>().
eq
(
DynamicFormInstance:
:
getFieldCode
,
"peopleType"
)
.
eq
(
DynamicFormInstance:
:
getInstanceId
,
userId
)
.
eq
(
DynamicFormInstance:
:
getGroupCode
,
DynamicGroupCodeEnum
.
JCS_PERSON
.
getCode
()));
if
(!
CollectionUtils
.
isEmpty
(
instances
))
{
String
fieldValue
=
instances
.
get
(
0
).
getFieldValue
();
List
<
DataDictionary
>
dictionaryList
=
dataDictionaryService
.
getByType
(
DataDictionaryTypeEnum
.
PERSON_TYPE
.
getCode
());
if
(
StringUtils
.
isNotBlank
(
fieldValue
)
&&
!
CollectionUtils
.
isEmpty
(
dictionaryList
))
{
Map
<
String
,
List
<
DataDictionary
>>
map
=
dictionaryList
.
stream
().
collect
(
Collectors
.
groupingBy
(
DataDictionary:
:
getCode
));
List
<
DataDictionary
>
list
=
map
.
get
(
fieldValue
);
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
d
.
put
(
"personType"
,
list
.
get
(
0
).
getName
());
}
}
}
}
return
d
;
}
@Override
public
DutyPersonDto
update
(
Long
instanceId
,
DutyPersonDto
dutyPersonDto
)
{
String
groupCode
=
this
.
getGroupCode
();
...
...
@@ -144,6 +168,7 @@ public class DutyPersonServiceImpl extends DutyCommonServiceImpl implements IDut
List
<
DynamicFormColumn
>
columns
=
dynamicFormColumnService
.
list
(
new
LambdaQueryWrapper
<
DynamicFormColumn
>().
eq
(
DynamicFormColumn:
:
getGroupCode
,
groupCode
));
//页面数据转Map
Map
<
String
,
Object
>
map
=
Bean
.
BeantoMap
(
dutyPersonDto
);
buildDataMap
(
map
,
dutyPersonDto
.
getUserId
());
//4.已列为主 填充动态表单数据
List
<
DynamicFormInstance
>
entrys
=
new
ArrayList
<>();
for
(
DynamicFormColumn
column
:
columns
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/TopographyController.java
View file @
3dd05197
...
...
@@ -885,7 +885,7 @@ public class TopographyController extends AbstractBaseController {
try
{
entity
=
iotFeign
.
selectList
(
getAppKey
(),
getProduct
(),
getToken
(),
beginDate
,
endDate
,
prefix
,
suffix
,
fieldKey
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
(
);
throw
new
RuntimeException
(
"调用AMOS-API-IOT服务失败,请检查服务是否正常!"
);
}
if
(
200
==
entity
.
getStatus
()
&&
!
ObjectUtils
.
isEmpty
(
entity
.
getResult
()))
{
String
json
=
JSON
.
toJSONString
(
entity
.
getResult
());
...
...
@@ -1046,7 +1046,7 @@ public class TopographyController extends AbstractBaseController {
try
{
entity
=
iotFeign
.
selectList
(
getAppKey
(),
getProduct
(),
getToken
(),
beginDate
,
endDate
,
prefix
,
suffix
,
st
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
(
);
throw
new
RuntimeException
(
"调用AMOS-API-IOT服务失败,请检查服务是否正常!"
);
}
if
(
200
==
entity
.
getStatus
()
&&
!
ObjectUtils
.
isEmpty
(
entity
.
getResult
()))
{
String
json
=
JSON
.
toJSONString
(
entity
.
getResult
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificSerivceImpl.java
View file @
3dd05197
...
...
@@ -1893,12 +1893,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
Date
now
=
new
Date
();
String
scrapTime
=
new
SimpleDateFormat
(
DateUtils
.
DATE_TIME_PATTERN
).
format
(
calendar
.
getTime
());
long
time1
=
calendar
.
getTimeInMillis
();
calendar
.
setTime
(
now
);
long
time2
=
calendar
.
getTimeInMillis
();
long
between_days
=(
time2
-
time1
)/(
10003600
*
24
);
int
day
=
Integer
.
parseInt
(
String
.
valueOf
(
between_days
));
int
day
=
DateUtils
.
dateBetween
(
now
,
calendar
.
getTime
());
if
(
day
<
Integer
.
parseInt
(
equipmentScrapDay
)
&&
day
>
-
1
)
{
syncSystemctlMsg
(
e
,
scrapTime
,
day
);
}
...
...
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